Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions js-src/Connector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,20 @@ import {Channel} from "./Channel";
export const broadcaster = (options: object): Connector => new Connector(options);

export class Connector extends BaseConnector {
/**
* The Socket.io connection instance.
*/

constructor(options: object) {
super(options);
}


socket: Websocket;

/**
* All of the subscribed channel names.
*/
channels: { [name: string]: Channel } = {};

/**
* Create a fresh Socket.io connection.
*/

connect(): void {
this.socket = new Websocket(this.options);

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@babel/plugin-transform-object-assign": "^7.8.3",
"@babel/preset-env": "^7.9.6",
"@rollup/plugin-babel": "^5.0.0",
"@types/babel__traverse": "^7.20.6",
"@types/jest": "^24.0.18",
"@types/node": "^12.7.5",
"@typescript-eslint/eslint-plugin": "^3.7.0",
Expand All @@ -48,7 +49,7 @@
"eslint": "^7.5.0",
"jest": "^24.9.0",
"jest-websocket-mock": "^2.2.0",
"laravel-echo": "^1.10.0",
"laravel-echo": "1.10.0",
"mock-socket": "^9.0.3",
"rollup": "^2.10.2",
"rollup-plugin-commonjs": "^10.1.0",
Expand All @@ -58,7 +59,7 @@
"standard-version": "^8.0.1",
"ts-jest": "^24.1.0",
"tslib": "^1.10.0",
"typescript": "^3.6.3"
"typescript": "^5.7.2"
},
"engines": {
"node": ">=10"
Expand Down
16 changes: 3 additions & 13 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import babel from '@rollup/plugin-babel';
import typescript from 'rollup-plugin-typescript2';

import rollupNodeResolve from 'rollup-plugin-node-resolve';
import rollupJson from 'rollup-plugin-json';
import rollupCommonjs from 'rollup-plugin-commonjs';

export default {
input: './js-src/Connector.ts',
output: [
Expand All @@ -13,16 +9,10 @@ export default {
{ file: './dist/laravel-echo-api-gateway.iife.js', format: 'iife', name: 'LaravelEchoApiGateway' },
],
plugins: [
rollupCommonjs({
include: 'node_modules/axios/**'
}),
rollupNodeResolve({
jsnext: true,
preferBuiltins: true,
browser: true
typescript({
tsconfig: './tsconfig.json', // Chemin explicite vers votre fichier TypeScript
useTsconfigDeclarationDir: true, // Respecte les options `outDir` et `declarationDir`
}),
rollupJson(),
typescript(),
babel({
babelHelpers: 'bundled',
exclude: 'node_modules/**',
Expand Down
Loading
Loading