@furystack/websocket-api
Advanced tools
Comparing version 13.0.7 to 13.0.8
@@ -1,7 +0,6 @@ | ||
import { WhoAmI } from './whoami.js'; | ||
import { Injector } from '@furystack/inject'; | ||
import { HttpUserContext } from '@furystack/rest-service'; | ||
import ws from 'ws'; | ||
import { usingAsync } from '@furystack/utils'; | ||
import { Injector } from '@furystack/inject'; | ||
import { describe, it, expect, vi } from 'vitest'; | ||
import { describe, expect, it, vi } from 'vitest'; | ||
import { WhoAmI } from './whoami.js'; | ||
describe('Whoami action', () => { | ||
@@ -26,3 +25,2 @@ const currentUser = { username: 'testuser' }; | ||
injector.setExplicitInstance(contextMock, HttpUserContext); | ||
injector.setExplicitInstance(wsMock, ws); | ||
const instance = injector.getInstance(WhoAmI); | ||
@@ -29,0 +27,0 @@ await instance.execute({ request, data: '', socket: wsMock }); |
@@ -14,3 +14,2 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { | ||
import { using } from '@furystack/utils'; | ||
import { IncomingMessage } from 'http'; | ||
import { URL } from 'url'; | ||
@@ -30,4 +29,2 @@ import ws, { WebSocketServer } from 'ws'; | ||
const connectionInjector = this.injector.createChild({ owner: msg }); | ||
connectionInjector.setExplicitInstance(websocket, ws); | ||
connectionInjector.setExplicitInstance(msg, IncomingMessage); | ||
const httpUserContext = connectionInjector.getInstance(HttpUserContext); | ||
@@ -34,0 +31,0 @@ connectionInjector.setExplicitInstance({ |
{ | ||
"name": "@furystack/websocket-api", | ||
"version": "13.0.7", | ||
"version": "13.0.8", | ||
"description": "HTTP Api FuryStack package", | ||
@@ -37,5 +37,5 @@ "type": "module", | ||
"dependencies": { | ||
"@furystack/core": "^15.0.6", | ||
"@furystack/inject": "^12.0.4", | ||
"@furystack/rest-service": "^10.0.7", | ||
"@furystack/core": "^15.0.7", | ||
"@furystack/inject": "^12.0.5", | ||
"@furystack/rest-service": "^10.0.8", | ||
"@furystack/utils": "^8.0.4", | ||
@@ -42,0 +42,0 @@ "ws": "^8.18.0" |
@@ -1,8 +0,8 @@ | ||
import { WhoAmI } from './whoami.js' | ||
import { Injector } from '@furystack/inject' | ||
import { HttpUserContext } from '@furystack/rest-service' | ||
import ws from 'ws' | ||
import { usingAsync } from '@furystack/utils' | ||
import type { IncomingMessage } from 'http' | ||
import { Injector } from '@furystack/inject' | ||
import { describe, it, expect, vi } from 'vitest' | ||
import { describe, expect, it, vi } from 'vitest' | ||
import type ws from 'ws' | ||
import { WhoAmI } from './whoami.js' | ||
@@ -34,3 +34,2 @@ describe('Whoami action', () => { | ||
injector.setExplicitInstance(contextMock, HttpUserContext) | ||
injector.setExplicitInstance(wsMock, ws) | ||
const instance = injector.getInstance(WhoAmI) | ||
@@ -37,0 +36,0 @@ await instance.execute({ request, data: '', socket: wsMock }) |
@@ -37,4 +37,2 @@ import { AggregatedError, IdentityContext, type User } from '@furystack/core' | ||
const connectionInjector = this.injector.createChild({ owner: msg }) | ||
connectionInjector.setExplicitInstance(websocket, ws) | ||
connectionInjector.setExplicitInstance(msg, IncomingMessage) | ||
@@ -41,0 +39,0 @@ const httpUserContext = connectionInjector.getInstance(HttpUserContext) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
0
85559
942
Updated@furystack/core@^15.0.7
Updated@furystack/inject@^12.0.5