@med1802/repository-manager 3.0.1 → 3.1.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 +214 -255
- package/dist/core/index.d.ts +3 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/{workspace/modules → core}/index.js +1 -0
- package/dist/core/middleware.d.ts.map +1 -0
- package/dist/core/repository.d.ts +10 -0
- package/dist/core/repository.d.ts.map +1 -0
- package/dist/core/repository.js +83 -0
- package/dist/{workspace/modules/repository → core}/types.d.ts +2 -2
- package/dist/core/types.d.ts.map +1 -0
- package/dist/{workspace/infrastructure → infrastructure}/index.d.ts +1 -0
- package/dist/infrastructure/index.d.ts.map +1 -0
- package/dist/{workspace/infrastructure → infrastructure}/index.js +1 -0
- package/dist/{workspace/infrastructure → infrastructure}/logger.d.ts +2 -2
- package/dist/infrastructure/logger.d.ts.map +1 -0
- package/dist/infrastructure/observer/EventScope.d.ts +14 -0
- package/dist/infrastructure/observer/EventScope.d.ts.map +1 -0
- package/dist/infrastructure/observer/EventScope.js +38 -0
- package/dist/infrastructure/observer/index.d.ts +16 -0
- package/dist/infrastructure/observer/index.d.ts.map +1 -0
- package/dist/infrastructure/observer/index.js +52 -0
- package/dist/infrastructure/observer/types.d.ts +18 -0
- package/dist/infrastructure/observer/types.d.ts.map +1 -0
- package/dist/infrastructure/observer/types.js +1 -0
- package/dist/infrastructure/scope/index.d.ts.map +1 -0
- package/dist/infrastructure/scope/scope.d.ts.map +1 -0
- package/dist/{workspace/infrastructure → infrastructure}/scope/scope.js +3 -8
- package/dist/infrastructure/scope/types.d.ts +4 -0
- package/dist/infrastructure/scope/types.d.ts.map +1 -0
- package/dist/infrastructure/store.d.ts.map +1 -0
- package/dist/manager.d.ts +3 -5
- package/dist/manager.d.ts.map +1 -1
- package/dist/manager.js +8 -11
- package/dist/workspace/{modules/repository/createRepositoryModule.d.ts → client.d.ts} +5 -5
- package/dist/workspace/client.d.ts.map +1 -0
- package/dist/workspace/{modules/repository/createRepositoryModule.js → client.js} +7 -8
- package/dist/workspace/context.d.ts +13 -0
- package/dist/workspace/context.d.ts.map +1 -0
- package/dist/workspace/context.js +32 -0
- package/dist/workspace/index.d.ts +2 -12
- package/dist/workspace/index.d.ts.map +1 -1
- package/dist/workspace/index.js +2 -30
- package/dist/workspace/types/configuration.types.d.ts +6 -0
- package/dist/workspace/types/configuration.types.d.ts.map +1 -0
- package/dist/workspace/types/index.d.ts +3 -0
- package/dist/workspace/types/index.d.ts.map +1 -0
- package/dist/workspace/types/index.js +2 -0
- package/dist/workspace/types/observer.types.d.ts +15 -0
- package/dist/workspace/types/observer.types.d.ts.map +1 -0
- package/dist/workspace/types/observer.types.js +1 -0
- package/package.json +1 -1
- package/src/{workspace/modules → core}/index.ts +1 -0
- package/src/core/repository.ts +90 -0
- package/src/{workspace/modules/repository → core}/types.ts +2 -2
- package/src/{workspace/infrastructure → infrastructure}/index.ts +1 -0
- package/src/{workspace/infrastructure → infrastructure}/logger.ts +2 -2
- package/src/infrastructure/observer/EventScope.ts +51 -0
- package/src/infrastructure/observer/index.ts +91 -0
- package/src/infrastructure/observer/types.ts +23 -0
- package/src/{workspace/infrastructure → infrastructure}/scope/scope.ts +4 -9
- package/src/infrastructure/scope/types.ts +3 -0
- package/src/manager.ts +8 -15
- package/src/workspace/{modules/repository/createRepositoryModule.ts → client.ts} +11 -9
- package/src/workspace/context.ts +58 -0
- package/src/workspace/index.ts +2 -38
- package/src/workspace/types/configuration.types.ts +5 -0
- package/src/workspace/types/index.ts +2 -0
- package/src/workspace/types/observer.types.ts +18 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/dist/workspace/infrastructure/index.d.ts.map +0 -1
- package/dist/workspace/infrastructure/logger.d.ts.map +0 -1
- package/dist/workspace/infrastructure/scope/index.d.ts.map +0 -1
- package/dist/workspace/infrastructure/scope/scope.d.ts.map +0 -1
- package/dist/workspace/infrastructure/scope/types.d.ts +0 -8
- package/dist/workspace/infrastructure/scope/types.d.ts.map +0 -1
- package/dist/workspace/infrastructure/store.d.ts.map +0 -1
- package/dist/workspace/modules/index.d.ts +0 -2
- package/dist/workspace/modules/index.d.ts.map +0 -1
- package/dist/workspace/modules/repository/createRepositoryModule.d.ts.map +0 -1
- package/dist/workspace/modules/repository/index.d.ts +0 -3
- package/dist/workspace/modules/repository/index.d.ts.map +0 -1
- package/dist/workspace/modules/repository/index.js +0 -2
- package/dist/workspace/modules/repository/middleware.d.ts.map +0 -1
- package/dist/workspace/modules/repository/repositoryAccessor.d.ts +0 -9
- package/dist/workspace/modules/repository/repositoryAccessor.d.ts.map +0 -1
- package/dist/workspace/modules/repository/repositoryAccessor.js +0 -42
- package/dist/workspace/modules/repository/types.d.ts.map +0 -1
- package/dist/workspace/providers/index.d.ts +0 -5
- package/dist/workspace/providers/index.d.ts.map +0 -1
- package/dist/workspace/providers/index.js +0 -3
- package/dist/workspace/types.d.ts +0 -5
- package/dist/workspace/types.d.ts.map +0 -1
- package/src/workspace/infrastructure/scope/types.ts +0 -8
- package/src/workspace/modules/repository/index.ts +0 -2
- package/src/workspace/modules/repository/repositoryAccessor.ts +0 -48
- package/src/workspace/providers/index.ts +0 -5
- package/src/workspace/types.ts +0 -4
- /package/dist/{workspace/modules/repository → core}/middleware.d.ts +0 -0
- /package/dist/{workspace/modules/repository → core}/middleware.js +0 -0
- /package/dist/{workspace/infrastructure/scope → core}/types.js +0 -0
- /package/dist/{workspace/infrastructure → infrastructure}/logger.js +0 -0
- /package/dist/{workspace/infrastructure → infrastructure}/scope/index.d.ts +0 -0
- /package/dist/{workspace/infrastructure → infrastructure}/scope/index.js +0 -0
- /package/dist/{workspace/infrastructure → infrastructure}/scope/scope.d.ts +0 -0
- /package/dist/{workspace/modules/repository → infrastructure/scope}/types.js +0 -0
- /package/dist/{workspace/infrastructure → infrastructure}/store.d.ts +0 -0
- /package/dist/{workspace/infrastructure → infrastructure}/store.js +0 -0
- /package/dist/workspace/{types.js → types/configuration.types.js} +0 -0
- /package/src/{workspace/modules/repository → core}/middleware.ts +0 -0
- /package/src/{workspace/infrastructure → infrastructure}/scope/index.ts +0 -0
- /package/src/{workspace/infrastructure → infrastructure}/store.ts +0 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { scopedObserverType } from "../infrastructure";
|
|
2
|
+
import { applyMiddleware } from "./middleware";
|
|
3
|
+
import type { IRepositoryPlugin } from "./types";
|
|
4
|
+
|
|
5
|
+
function createRepository<I>(
|
|
6
|
+
infrastructure: I,
|
|
7
|
+
repositoryPlugin: IRepositoryPlugin<I, any>,
|
|
8
|
+
observer: scopedObserverType
|
|
9
|
+
) {
|
|
10
|
+
const { install, middlewares, onConnect, onDisconnect } = repositoryPlugin;
|
|
11
|
+
let repository = undefined as unknown;
|
|
12
|
+
let connections = 0;
|
|
13
|
+
let subscriptions: (() => void)[] = [];
|
|
14
|
+
return {
|
|
15
|
+
get repository() {
|
|
16
|
+
return repository;
|
|
17
|
+
},
|
|
18
|
+
get connections() {
|
|
19
|
+
return connections;
|
|
20
|
+
},
|
|
21
|
+
connect() {
|
|
22
|
+
if (connections === 0) {
|
|
23
|
+
const rawRepository = install({
|
|
24
|
+
instance: {
|
|
25
|
+
infrastructure,
|
|
26
|
+
observer: (() => {
|
|
27
|
+
return {
|
|
28
|
+
dispatch: ({ repositoryId, type, message }) => {
|
|
29
|
+
if (repository === repositoryPlugin.id) {
|
|
30
|
+
console.warn("WARNING: DISPATCHING TO SELF");
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
observer.dispatch({
|
|
34
|
+
scope: repositoryId,
|
|
35
|
+
eventName: "dispatch",
|
|
36
|
+
payload: {
|
|
37
|
+
type,
|
|
38
|
+
message,
|
|
39
|
+
source: repositoryPlugin.id,
|
|
40
|
+
},
|
|
41
|
+
});
|
|
42
|
+
},
|
|
43
|
+
subscribe: (handler) => {
|
|
44
|
+
if (subscriptions.length > 0) {
|
|
45
|
+
console.warn("WARNING: SUBSCRIBED ALREADY");
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const unsubscribe = observer.subscribe({
|
|
49
|
+
scope: repositoryPlugin.id,
|
|
50
|
+
eventName: "dispatch",
|
|
51
|
+
callback({ payload }) {
|
|
52
|
+
const { type, message, source } = payload;
|
|
53
|
+
handler({
|
|
54
|
+
type,
|
|
55
|
+
message: message ?? undefined,
|
|
56
|
+
source,
|
|
57
|
+
});
|
|
58
|
+
},
|
|
59
|
+
});
|
|
60
|
+
subscriptions.push(unsubscribe);
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
})(),
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
repository = middlewares
|
|
67
|
+
? applyMiddleware(rawRepository, middlewares)
|
|
68
|
+
: rawRepository;
|
|
69
|
+
if (onConnect) {
|
|
70
|
+
onConnect();
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
connections += 1;
|
|
74
|
+
},
|
|
75
|
+
disconnect() {
|
|
76
|
+
if (connections === 0) return;
|
|
77
|
+
connections -= 1;
|
|
78
|
+
if (connections === 0) {
|
|
79
|
+
repository = undefined;
|
|
80
|
+
subscriptions.forEach((unsubscribe) => unsubscribe());
|
|
81
|
+
subscriptions = [];
|
|
82
|
+
if (onDisconnect) {
|
|
83
|
+
onDisconnect();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export { createRepository };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IObserver } from "../workspace";
|
|
2
2
|
|
|
3
3
|
export type repositoryType<I = any, R = any> = (obj: {
|
|
4
4
|
instance: {
|
|
5
5
|
infrastructure: I;
|
|
6
|
-
|
|
6
|
+
observer: IObserver;
|
|
7
7
|
};
|
|
8
8
|
}) => R;
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IConfiguration } from "../
|
|
1
|
+
import type { IConfiguration } from "../workspace";
|
|
2
2
|
|
|
3
|
-
const createLogger = (config: IConfiguration) => {
|
|
3
|
+
const createLogger = (config: Omit<IConfiguration, "infrastructure">) => {
|
|
4
4
|
const { logging } = config;
|
|
5
5
|
return {
|
|
6
6
|
log: (
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
class EventScope extends EventTarget {
|
|
2
|
+
scopeName: string;
|
|
3
|
+
subScopes: Map<string, EventScope> = new Map();
|
|
4
|
+
lastEventPayloads: Map<string, any> = new Map();
|
|
5
|
+
|
|
6
|
+
constructor(scopeName: string) {
|
|
7
|
+
super();
|
|
8
|
+
this.scopeName = scopeName;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
private formatEventData(eventName: string, payload: any): any {
|
|
12
|
+
return {
|
|
13
|
+
payload,
|
|
14
|
+
eventName,
|
|
15
|
+
scope: this.scopeName,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
dispatch = ({
|
|
20
|
+
eventName,
|
|
21
|
+
payload = undefined,
|
|
22
|
+
}: {
|
|
23
|
+
eventName: string;
|
|
24
|
+
payload?: any;
|
|
25
|
+
}) => {
|
|
26
|
+
this.lastEventPayloads.set(eventName, payload);
|
|
27
|
+
|
|
28
|
+
const event = new CustomEvent(eventName, {
|
|
29
|
+
detail: {
|
|
30
|
+
payload,
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
this.dispatchEvent(event);
|
|
34
|
+
};
|
|
35
|
+
subscribe = (eventName: string, callback: (e: any) => void) => {
|
|
36
|
+
if (this.lastEventPayloads.has(eventName)) {
|
|
37
|
+
const lastPayload = this.lastEventPayloads.get(eventName);
|
|
38
|
+
callback(this.formatEventData(eventName, lastPayload));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const callbackWrapper = (e: any) => {
|
|
42
|
+
callback(this.formatEventData(eventName, e.detail.payload));
|
|
43
|
+
};
|
|
44
|
+
this.addEventListener(eventName, callbackWrapper);
|
|
45
|
+
return () => {
|
|
46
|
+
this.removeEventListener(eventName, callbackWrapper);
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { EventScope };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { EventScope } from "./EventScope";
|
|
2
|
+
import {
|
|
3
|
+
ROOT_SCOPE,
|
|
4
|
+
type ScopeNode,
|
|
5
|
+
type scopedObserverDispatchType,
|
|
6
|
+
type scopedObserverSubscribeType,
|
|
7
|
+
} from "./types";
|
|
8
|
+
|
|
9
|
+
const createScopedObserver = (props?: ScopeNode[]) => {
|
|
10
|
+
const root = new EventScope(ROOT_SCOPE);
|
|
11
|
+
props?.forEach((node) => {
|
|
12
|
+
const scope = buildScopeHierarchy(node);
|
|
13
|
+
root.subScopes.set(node.scope, scope);
|
|
14
|
+
});
|
|
15
|
+
function buildScopeHierarchy(node: ScopeNode): EventScope {
|
|
16
|
+
const eventScope = new EventScope(node.scope);
|
|
17
|
+
|
|
18
|
+
if (node.subScopes && node.subScopes.length > 0) {
|
|
19
|
+
node.subScopes.forEach((subNode) => {
|
|
20
|
+
const subScope = buildScopeHierarchy(subNode);
|
|
21
|
+
eventScope.subScopes.set(subNode.scope, subScope);
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return eventScope;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function find(scope?: string): EventScope | undefined {
|
|
29
|
+
if (!scope || scope.trim() === "") {
|
|
30
|
+
return root;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const scopeParts = scope.split(":").filter(Boolean);
|
|
34
|
+
let current: EventScope = root;
|
|
35
|
+
|
|
36
|
+
for (const part of scopeParts) {
|
|
37
|
+
const next = current.subScopes.get(part);
|
|
38
|
+
if (!next) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
current = next;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return current;
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
dispatch: ({
|
|
48
|
+
scope,
|
|
49
|
+
eventName,
|
|
50
|
+
payload = undefined,
|
|
51
|
+
}: {
|
|
52
|
+
scope?: string;
|
|
53
|
+
eventName: string;
|
|
54
|
+
payload?: any;
|
|
55
|
+
}) => {
|
|
56
|
+
const scopeEntity = find(scope);
|
|
57
|
+
if (!scopeEntity) return;
|
|
58
|
+
scopeEntity.dispatch({ eventName, payload });
|
|
59
|
+
},
|
|
60
|
+
subscribe: ({
|
|
61
|
+
scope,
|
|
62
|
+
eventName,
|
|
63
|
+
callback,
|
|
64
|
+
}: {
|
|
65
|
+
scope?: string;
|
|
66
|
+
eventName: string;
|
|
67
|
+
callback: (payload: any) => void;
|
|
68
|
+
}): (() => void) => {
|
|
69
|
+
const scopeEntity = find(scope);
|
|
70
|
+
if (!scopeEntity) {
|
|
71
|
+
console.warn(
|
|
72
|
+
`[ScopedObserver] Scope "${
|
|
73
|
+
scope || "root"
|
|
74
|
+
}" not found. Returning no-op unsubscribe.`
|
|
75
|
+
);
|
|
76
|
+
return () => {};
|
|
77
|
+
}
|
|
78
|
+
const unsubscribe = scopeEntity.subscribe(eventName, callback);
|
|
79
|
+
return unsubscribe;
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
type scopedObserverType = ReturnType<typeof createScopedObserver>;
|
|
85
|
+
export {
|
|
86
|
+
createScopedObserver,
|
|
87
|
+
type scopedObserverType,
|
|
88
|
+
type scopedObserverDispatchType,
|
|
89
|
+
type scopedObserverSubscribeType,
|
|
90
|
+
type ScopeNode,
|
|
91
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
type ScopeNodeType = ScopeNode[];
|
|
2
|
+
|
|
3
|
+
type scopedObserverDispatchType = {
|
|
4
|
+
scope?: string;
|
|
5
|
+
eventName: string;
|
|
6
|
+
payload?: any;
|
|
7
|
+
};
|
|
8
|
+
type scopedObserverSubscribeType = {
|
|
9
|
+
scope?: string;
|
|
10
|
+
eventName: string;
|
|
11
|
+
callback: (payload: any) => void;
|
|
12
|
+
};
|
|
13
|
+
export type ScopeNode = {
|
|
14
|
+
scope: string;
|
|
15
|
+
subScopes?: ScopeNode[];
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const ROOT_SCOPE = "root";
|
|
19
|
+
export {
|
|
20
|
+
type ScopeNodeType,
|
|
21
|
+
type scopedObserverDispatchType,
|
|
22
|
+
type scopedObserverSubscribeType,
|
|
23
|
+
};
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { IScope, IScopeProviderOptions } from "./types";
|
|
1
|
+
import type { IScope } from "./types";
|
|
3
2
|
|
|
4
3
|
function createScope<V = any>(
|
|
5
4
|
defaultValue: V
|
|
6
5
|
): IScope<V> & { currentValue: V } {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const stack = store.getState("stack");
|
|
10
|
-
function provider(options: IScopeProviderOptions) {
|
|
11
|
-
const { value, children } = options;
|
|
12
|
-
const stack = store.getState("stack");
|
|
6
|
+
const stack: V[] = [];
|
|
7
|
+
function provider(initialValue: V, children: () => void) {
|
|
13
8
|
if (!stack) {
|
|
14
9
|
throw new Error("Scope stack not found");
|
|
15
10
|
}
|
|
16
11
|
try {
|
|
17
|
-
stack.push(
|
|
12
|
+
stack.push(initialValue ? initialValue : defaultValue);
|
|
18
13
|
children();
|
|
19
14
|
} finally {
|
|
20
15
|
stack.pop();
|
package/src/manager.ts
CHANGED
|
@@ -1,21 +1,14 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import {
|
|
3
|
-
import { createStore } from "./workspace/infrastructure";
|
|
4
|
-
import type { IScope } from "./workspace/infrastructure/scope";
|
|
1
|
+
import { createWorkspaceContext, type IConfiguration } from "./workspace";
|
|
2
|
+
import { createWorkspaceClient } from "./workspace/client";
|
|
5
3
|
|
|
6
4
|
const repositoryManager = () => {
|
|
7
|
-
const store = createStore<ReturnType<typeof createWorkspace>>();
|
|
8
5
|
return {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
createScope: workspace.createScope as unknown as <V = any>(
|
|
16
|
-
defaultValue: V
|
|
17
|
-
) => IScope<V>,
|
|
18
|
-
};
|
|
6
|
+
createWorkspace<I>(config: IConfiguration<I>) {
|
|
7
|
+
let client: ReturnType<typeof createWorkspaceClient<I>> = undefined!;
|
|
8
|
+
createWorkspaceContext<I>(config, () => {
|
|
9
|
+
client = createWorkspaceClient<I>();
|
|
10
|
+
});
|
|
11
|
+
return client;
|
|
19
12
|
},
|
|
20
13
|
};
|
|
21
14
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import {
|
|
2
|
+
createRepository,
|
|
3
|
+
type IRepositoryPlugin,
|
|
4
|
+
type repositoryType,
|
|
5
|
+
} from "../core";
|
|
6
|
+
import { workspace } from "../workspace";
|
|
5
7
|
|
|
6
|
-
function
|
|
7
|
-
const { store, logger, infrastructure } =
|
|
8
|
+
function createWorkspaceClient<I>() {
|
|
9
|
+
const { store, logger, infrastructure, observer } = workspace<I>();
|
|
8
10
|
function hasRepository(id: string) {
|
|
9
11
|
return store.hasState(id);
|
|
10
12
|
}
|
|
@@ -24,7 +26,7 @@ function createRepositoryModule<I>() {
|
|
|
24
26
|
() => {
|
|
25
27
|
store.setState(
|
|
26
28
|
id,
|
|
27
|
-
|
|
29
|
+
createRepository(infrastructure, repositoryPlugin, observer)
|
|
28
30
|
);
|
|
29
31
|
},
|
|
30
32
|
{
|
|
@@ -64,9 +66,9 @@ function createRepositoryModule<I>() {
|
|
|
64
66
|
};
|
|
65
67
|
}
|
|
66
68
|
return {
|
|
67
|
-
queryRepository,
|
|
68
69
|
defineRepository,
|
|
70
|
+
queryRepository,
|
|
69
71
|
};
|
|
70
72
|
}
|
|
71
73
|
|
|
72
|
-
export {
|
|
74
|
+
export { createWorkspaceClient };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createLogger,
|
|
3
|
+
createScope,
|
|
4
|
+
createScopedObserver,
|
|
5
|
+
createStore,
|
|
6
|
+
useScope,
|
|
7
|
+
} from "../infrastructure";
|
|
8
|
+
import type { IRepositoryInstance } from "../core";
|
|
9
|
+
|
|
10
|
+
import type { IConfiguration } from "./types/configuration.types";
|
|
11
|
+
|
|
12
|
+
interface IWorkspaceContext<I = any> {
|
|
13
|
+
store: ReturnType<typeof createStore<IRepositoryInstance<any>>>;
|
|
14
|
+
logger: ReturnType<typeof createLogger>;
|
|
15
|
+
observer: ReturnType<typeof createScopedObserver>;
|
|
16
|
+
infrastructure: I;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const workspaceScope = createScope<IWorkspaceContext | undefined>(undefined);
|
|
20
|
+
|
|
21
|
+
function createWorkspaceContext<I>(
|
|
22
|
+
params: IConfiguration<I>,
|
|
23
|
+
child: () => void
|
|
24
|
+
) {
|
|
25
|
+
const { id, logging, infrastructure } = params;
|
|
26
|
+
const defaultConfig: Omit<IConfiguration, "infrastructure"> = {
|
|
27
|
+
id,
|
|
28
|
+
logging: logging ?? false,
|
|
29
|
+
};
|
|
30
|
+
const logger = createLogger(defaultConfig);
|
|
31
|
+
const store = createStore<IRepositoryInstance<any>>();
|
|
32
|
+
const observer = createScopedObserver([
|
|
33
|
+
{
|
|
34
|
+
scope: "user-repo",
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
scope: "company-repo",
|
|
38
|
+
},
|
|
39
|
+
]);
|
|
40
|
+
workspaceScope.provider(
|
|
41
|
+
{
|
|
42
|
+
store,
|
|
43
|
+
logger,
|
|
44
|
+
observer,
|
|
45
|
+
infrastructure,
|
|
46
|
+
},
|
|
47
|
+
() => {
|
|
48
|
+
child();
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function workspace<I>() {
|
|
54
|
+
const context = useScope<IWorkspaceContext<I>>(workspaceScope)!;
|
|
55
|
+
return context;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export { createWorkspaceContext, workspace };
|
package/src/workspace/index.ts
CHANGED
|
@@ -1,38 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
createScope,
|
|
5
|
-
createLogger,
|
|
6
|
-
createStore,
|
|
7
|
-
useScope,
|
|
8
|
-
} from "./infrastructure";
|
|
9
|
-
import { repositoryScope } from "./providers";
|
|
10
|
-
|
|
11
|
-
function createWorkspace<I>(infrastructure: I, config: IConfiguration) {
|
|
12
|
-
const defaultConfig: IConfiguration = {
|
|
13
|
-
id: config.id,
|
|
14
|
-
logging: config.logging ?? false,
|
|
15
|
-
};
|
|
16
|
-
const logger = createLogger(defaultConfig);
|
|
17
|
-
const store = createStore<IRepositoryInstance<any>>();
|
|
18
|
-
let repositoryModule!: ReturnType<typeof createRepositoryModule<I>>;
|
|
19
|
-
repositoryScope.provider({
|
|
20
|
-
value: {
|
|
21
|
-
store,
|
|
22
|
-
logger,
|
|
23
|
-
infrastructure,
|
|
24
|
-
},
|
|
25
|
-
children: () => {
|
|
26
|
-
repositoryModule = createRepositoryModule<I>();
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
return {
|
|
31
|
-
defineRepository: repositoryModule.defineRepository,
|
|
32
|
-
queryRepository: repositoryModule.queryRepository,
|
|
33
|
-
createScope,
|
|
34
|
-
useScope,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export { createWorkspace };
|
|
1
|
+
export * from "./context";
|
|
2
|
+
export * from "./types";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type IObserverDispatch<P = any> = {
|
|
2
|
+
type: string;
|
|
3
|
+
repositoryId: string;
|
|
4
|
+
message?: P;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export type IObserverSubscribePayload<P = any> = {
|
|
8
|
+
type: string;
|
|
9
|
+
source: string;
|
|
10
|
+
message: P;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type IObserver = {
|
|
14
|
+
dispatch<P = any>(payload: IObserverDispatch<P>): void;
|
|
15
|
+
subscribe<P = any>(
|
|
16
|
+
callback: (payload: IObserverSubscribePayload<P>) => void
|
|
17
|
+
): void;
|
|
18
|
+
};
|
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"fileNames":["../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.scripthost.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.full.d.ts","../../node_modules/.pnpm/@types+react@18.3.23/node_modules/@types/react/global.d.ts","../../node_modules/.pnpm/csstype@3.1.3/node_modules/csstype/index.d.ts","../../node_modules/.pnpm/@types+prop-types@15.7.15/node_modules/@types/prop-types/index.d.ts","../../node_modules/.pnpm/@types+react@18.3.23/node_modules/@types/react/index.d.ts","../../node_modules/.pnpm/@types+react@18.3.23/node_modules/@types/react/jsx-runtime.d.ts","./src/workspace/types.ts","./src/workspace/infrastructure/store.ts","./src/workspace/infrastructure/logger.ts","./src/workspace/infrastructure/scope/types.ts","./src/workspace/infrastructure/scope/scope.ts","./src/workspace/infrastructure/scope/index.ts","./src/workspace/infrastructure/index.ts","./src/workspace/modules/repository/types.ts","./src/workspace/modules/repository/middleware.ts","./src/workspace/modules/repository/repositoryaccessor.ts","./src/workspace/providers/index.ts","./src/workspace/modules/repository/createrepositorymodule.ts","./src/workspace/modules/repository/index.ts","./src/workspace/modules/index.ts","./src/workspace/index.ts","./src/manager.ts","./src/index.ts","../../node_modules/.pnpm/@types+react-dom@18.3.7_@types+react@18.3.23/node_modules/@types/react-dom/index.d.ts"],"fileIdsList":[[47,63],[47,48,53,54,62],[47,48,54,58,61],[47,49,50,53],[47,48],[47,51,52],[47,49,51],[47],[47,60],[47,54,55,57,58],[47,55,59],[47,55],[47,54,55,56],[47,53],[47,54],[46],[43,44,45]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedFormat":1},{"version":"07f073f19d67f74d732b1adea08e1dc66b1b58d77cb5b43931dee3d798a2fd53","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7a3c8b952931daebdfc7a2897c53c0a1c73624593fa070e46bd537e64dcd20a","affectsGlobalScope":true,"impliedFormat":1},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true,"impliedFormat":1},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"08f6861df84fba9719c14d5adc3ba40be9f0c687639e6c4df3c05b9301b8ff94","impliedFormat":1},{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc","impliedFormat":1},{"version":"472f5aab7edc498a0a761096e8e254c5bc3323d07a1e7f5f8b8ec0d6395b60a0","affectsGlobalScope":true,"impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"088bf5fc54cfb10dfc4a1adc099161d8a55c189b960ce48a8133a51b4427d02b","signature":"fee82ab075b9df328563f141dc86cfe1f19ac3e6349b33300f4be5db7d9627f3"},{"version":"29f45bbe2abf2b552bc0816403ae39e7650bb21f28f43c3f5d6478fafa919469","signature":"b276ce62679f7f22b60b5138be9978d1bac7a631573eb734fa9dd8bc1519fad5"},{"version":"ce3fc51a8feeb09a78dac00cf66d7b920df755cc678c17fc0fad072c017d6db6","signature":"e05bc3cb1487a511d9af633e231488cc4661c840c704beb9f223664cd9e3c823"},{"version":"44fc49938fb92bc51210c180130b9d16034f05a05994eac3309c40b751e3b3ab","signature":"a226b637b2d504b678f50ee75da4e08b465147bd504e9f013fe90852349dc4ff"},{"version":"d97f060d7855d160c613af6d55d4343c89f7c7c2e88ce8eb064499be02387306","signature":"5e0091ad25dfdb882afed7ed7366f6d35aa8e33294549be66e97c86c8cfe8be5"},"b3389f324e97088f7661fffddff7313682fdec10ac57133da6c6db01f0b0632b","f897dde2b371f855af05a59780f56cc50c9ea524d696932dc87cefa417f57c6d",{"version":"23508b3c8e2c05e8a4c73c5fce7271427ff961ba8feb221d7f9db55ad8956eff","signature":"482f05b5718a9a4e525fa0aaf36d1653a70f725c2112b825ee7606b1ac1792f7"},{"version":"cabdfa142724e1b87797672fa2febed73f82163550ad0124f8ec2ccff9847469","signature":"012d5c7d926b3fbf88a4ca2e4deab2467b2bb6516716831b86a80e41388649a0"},{"version":"13b05513270853d62777d39b9e3ca74b2889085d271dc0093a30ae8353ebcbec","signature":"47f669579b279c00fc074bca7ea9750a08a3263ff434281dd31ca389a3e26d8a"},{"version":"ec2272e5bbf43ae17b53be86f519a4eb65dc4e8ac499096609ed0813a85ad7a2","signature":"a690c85906e44ca5b0b5e81fe02d20947d84c75e2e04061d079412b4a3568157"},{"version":"3feecc76111f9d7463fa69121e767231fe14747a8f9b3de4e7714134af4f7ccc","signature":"0b9566a9e0643d194e105f027ecac7766670c2af54ead34b36ea809aa9077805"},"61487918fe2c7d20aa3acc44bf911728b603fe8984f27a660de2c837e1235d10","c9d0a6e38ebde9760f4e67663bb2de249a8d232ed1769907833ecfb243cae6b9",{"version":"20cd6760d8ad573891f3441b589e3da191284a1a69a84a0b55e2993276c6d9fd","signature":"f794505373e475d6bfd30ef683cc926e2ee74fc9c4a90345837df6bedd51b03a"},{"version":"a5555ba77e21bba4d4c7a32bab8b4a5db5ee63f37f46b501c400c981e135fb38","signature":"6684e9ff883de044a7b8a80ad65b75ea8beea63fcc64de435b93d6c144b1a533"},"8cb1c665b068690839ef946c2e794c14808eb33307dc412e45f6eda599183333",{"version":"17ed71200119e86ccef2d96b73b02ce8854b76ad6bd21b5021d4269bec527b5f","impliedFormat":1}],"root":[[48,64]],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"jsx":4,"module":99,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"strict":true,"target":6},"referencedMap":[[64,1],[63,2],[62,3],[54,4],[50,5],[53,6],[52,7],[51,8],[49,8],[61,9],[59,10],[60,11],[56,12],[57,13],[55,14],[58,15],[48,8],[65,16],[46,17],[47,16]],"latestChangedDtsFile":"./dist/index.d.ts","version":"5.8.3"}
|
|
1
|
+
{"fileNames":["../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.dom.asynciterable.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.webworker.importscripts.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.scripthost.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/.pnpm/typescript@5.8.3/node_modules/typescript/lib/lib.es2019.full.d.ts","../../node_modules/.pnpm/@types+react@18.3.23/node_modules/@types/react/global.d.ts","../../node_modules/.pnpm/csstype@3.1.3/node_modules/csstype/index.d.ts","../../node_modules/.pnpm/@types+prop-types@15.7.15/node_modules/@types/prop-types/index.d.ts","../../node_modules/.pnpm/@types+react@18.3.23/node_modules/@types/react/index.d.ts","../../node_modules/.pnpm/@types+react@18.3.23/node_modules/@types/react/jsx-runtime.d.ts","./src/infrastructure/store.ts","./src/infrastructure/logger.ts","./src/infrastructure/scope/types.ts","./src/infrastructure/scope/scope.ts","./src/infrastructure/scope/index.ts","./src/infrastructure/observer/eventscope.ts","./src/infrastructure/observer/types.ts","./src/infrastructure/observer/index.ts","./src/infrastructure/index.ts","./src/core/types.ts","./src/core/middleware.ts","./src/core/repository.ts","./src/core/index.ts","./src/workspace/types/configuration.types.ts","./src/workspace/context.ts","./src/workspace/types/observer.types.ts","./src/workspace/types/index.ts","./src/workspace/index.ts","./src/workspace/client.ts","./src/manager.ts","./src/index.ts","../../node_modules/.pnpm/@types+react-dom@18.3.7_@types+react@18.3.23/node_modules/@types/react-dom/index.d.ts"],"fileIdsList":[[47,57,59],[47,57],[47,56,57,58],[47,65],[47,67],[47,48,49,52,55],[47],[47,53,54],[47,50,51],[47,50],[47,65,66],[47,60,65],[47,56,60,61],[47,62,64],[47,61,63],[46],[43,44,45]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedFormat":1},{"version":"07f073f19d67f74d732b1adea08e1dc66b1b58d77cb5b43931dee3d798a2fd53","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7a3c8b952931daebdfc7a2897c53c0a1c73624593fa070e46bd537e64dcd20a","affectsGlobalScope":true,"impliedFormat":1},{"version":"80e18897e5884b6723488d4f5652167e7bb5024f946743134ecc4aa4ee731f89","affectsGlobalScope":true,"impliedFormat":1},{"version":"cd034f499c6cdca722b60c04b5b1b78e058487a7085a8e0d6fb50809947ee573","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"08f6861df84fba9719c14d5adc3ba40be9f0c687639e6c4df3c05b9301b8ff94","impliedFormat":1},{"version":"eb5b19b86227ace1d29ea4cf81387279d04bb34051e944bc53df69f58914b788","affectsGlobalScope":true,"impliedFormat":1},{"version":"8a8eb4ebffd85e589a1cc7c178e291626c359543403d58c9cd22b81fab5b1fb9","impliedFormat":1},{"version":"87d9d29dbc745f182683f63187bf3d53fd8673e5fca38ad5eaab69798ed29fbc","impliedFormat":1},{"version":"472f5aab7edc498a0a761096e8e254c5bc3323d07a1e7f5f8b8ec0d6395b60a0","affectsGlobalScope":true,"impliedFormat":1},{"version":"42c169fb8c2d42f4f668c624a9a11e719d5d07dacbebb63cbcf7ef365b0a75b3","impliedFormat":1},{"version":"29f45bbe2abf2b552bc0816403ae39e7650bb21f28f43c3f5d6478fafa919469","signature":"b276ce62679f7f22b60b5138be9978d1bac7a631573eb734fa9dd8bc1519fad5"},{"version":"a28eee87fafb2892eb0bbd87dba9a4cd71d7114814774446937b341fdf355183","signature":"87556fe6785e4bc3998e0bbc7d0d98abbfa4fa1a04f43aa82a87039fbe955187"},{"version":"1ca6bdd1c3a4d4a3680f543145449502b2cab083bce86fd6a3c6a00ac07a411f","signature":"75141e0e413eb8f26201a67e629783af28874fda8f9f6bfad73ef5e1957b3ff5"},{"version":"8eadae1a95f53a554f07ecd73145782bb9ba7efcb6b2d2a474126eb5a1d5dfca","signature":"5e0091ad25dfdb882afed7ed7366f6d35aa8e33294549be66e97c86c8cfe8be5"},"b3389f324e97088f7661fffddff7313682fdec10ac57133da6c6db01f0b0632b",{"version":"ec93cd4d22caa9c16da8d212d86f47c557bbf5d0d31cbd7b9cd6f4ea659b0c37","signature":"da9e445e06186b19de96ac22527411c9da1fddcfb0bfa6264bfea99fcbad90e4"},{"version":"92f93c94349abc798bf7d8aa9fbf0b0e27e73882875401569bd37ad4590a9f54","signature":"8ab9ac827421ed29de2c5eb15971107757f76d8c3afccfa7bb51d6fed66fe798"},{"version":"f014a0efc031dc519f17142f803f2dd4ebdc4119ea9ddc4e7ece2a08bbece5cf","signature":"a42620937570328d0e3cfc226aee2a6a65acecd5bf5a76f6fdf4dca010c1f865"},"e289552aa88a70a4ca2ac6ea1c580a5bf06e83e334d77034478779fb695b6d01",{"version":"0bae82bdb0943508ff87061f298fb0c524f980fabb782ec174957a191143eccb","signature":"35326ea2accd526dd6082e51d47063be9addddd5a2306c4aeebc04c69c6f463a"},{"version":"cabdfa142724e1b87797672fa2febed73f82163550ad0124f8ec2ccff9847469","signature":"012d5c7d926b3fbf88a4ca2e4deab2467b2bb6516716831b86a80e41388649a0"},{"version":"f6b10cf03a28f260ba25d3b8d43c52c84b0657f7be5d65af8731453cabd955f3","signature":"fe17e5a5db729994e9db7f0c864c5af3e25175bbf02b315a5bbc2b20f73864f6"},"3a36cd0da3c82d0a1e97935be32826aaa8d8ff9e6502127c92c4740accda8996",{"version":"d44f7463375bfd2b16f7c8e6f89a99aa01b3ae3397c1c835e6a2ab565c199179","signature":"962894bdaa397c92bc2252a9cbe5d33f7742ad548037f11dbee734ca32dbcef1"},{"version":"d6c23033573b73a0397761af7cb28678f246882e2a0f036e75f07c6c609a6ed4","signature":"749c728cf932077d1892391905d667e8e66098c7aa35a2e4ac94100c0cf600f7"},{"version":"1298a51baa700ad3af5c1a62bec06aede6763aabb75dc0dd036c3b38a9d7b5e0","signature":"c5f7df93e36543000ae6c2f3b5d78c58bd603b22a7125a637b2c3492dabb3280"},"59226b9e75e1bc3b8dd248252b3584a268a85324b1a56a3a001e43e390305e6d","97073ccbab7bf5434e63f8810651598602cb35e58f075f18dd1fa5a624db2521",{"version":"c12fe53940af15b7f76592d58e7105f726bea441e4f3e3c1ce6f58ddcca0cd51","signature":"49680edb7f970119b95ecc19bd9ca7a3096a48744f7757a008594066241545fb"},{"version":"42fc2d691e9a8d63ed6083fa523f40d01ec75cd11031286a1ac3523a73a5ec7d","signature":"73cd38f90b88924761f613ac23075f9af8611a8478c49e5480acf4ed9aaf6dcf"},"8cb1c665b068690839ef946c2e794c14808eb33307dc412e45f6eda599183333",{"version":"17ed71200119e86ccef2d96b73b02ce8854b76ad6bd21b5021d4269bec527b5f","impliedFormat":1}],"root":[[48,68]],"options":{"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"jsx":4,"module":99,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"strict":true,"target":6},"referencedMap":[[60,1],[58,2],[59,3],[57,4],[68,5],[56,6],[49,4],[53,7],[55,8],[54,7],[52,9],[51,10],[50,7],[48,7],[67,11],[66,12],[62,13],[65,14],[61,7],[64,15],[63,7],[69,16],[46,17],[47,16]],"latestChangedDtsFile":"./dist/index.d.ts","version":"5.8.3"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workspace/infrastructure/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/workspace/infrastructure/logger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C,QAAA,MAAM,YAAY,GAAI,QAAQ,cAAc;oBAI5B,MAAM,IAAI,8BAKjB;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,GAAG,CAAA;KAAE;CAgC5D,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/workspace/infrastructure/scope/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAChD,cAAc,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scope.d.ts","sourceRoot":"","sources":["../../../../src/workspace/infrastructure/scope/scope.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAyB,MAAM,SAAS,CAAC;AAE7D,iBAAS,WAAW,CAAC,CAAC,GAAG,GAAG,EAC1B,YAAY,EAAE,CAAC,GACd,MAAM,CAAC,CAAC,CAAC,GAAG;IAAE,YAAY,EAAE,CAAC,CAAA;CAAE,CAwBjC;AACD,iBAAS,QAAQ,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,KAGxC;AACD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/workspace/infrastructure/scope/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,MAAM,CAAC,CAAC,GAAG,GAAG;IAC7B,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CACnD;AAED,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,GAAG;IAC5C,KAAK,EAAE,CAAC,CAAC;IACT,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/workspace/infrastructure/store.ts"],"names":[],"mappings":"AAAA,iBAAS,WAAW,CAAC,CAAC;iBAGL,MAAM,QAAQ,CAAC;iBAGf,MAAM;iBAGN,MAAM;oBAGH,MAAM;;EAOzB;AACD,OAAO,EAAE,WAAW,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workspace/modules/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createRepositoryModule.d.ts","sourceRoot":"","sources":["../../../../src/workspace/modules/repository/createRepositoryModule.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAIjE,iBAAS,sBAAsB,CAAC,CAAC;sBAsCN,CAAC,YAAY,MAAM;oBAgBd,UAAU,CAAC,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;;;uBA1CpC,CAAC,0BACP,iBAAiB,CAAC,CAAC,EAAE,CAAC,CAAC;EAmD5C;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|