@pezkuwi/x-ws 14.0.10 → 14.0.11

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/browser.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ export { packageInfo } from './packageInfo.js';
2
+ export declare const WebSocket: {
3
+ new (url: string | URL, protocols?: string | string[]): WebSocket;
4
+ prototype: WebSocket;
5
+ readonly CONNECTING: 0;
6
+ readonly OPEN: 1;
7
+ readonly CLOSING: 2;
8
+ readonly CLOSED: 3;
9
+ };
package/browser.js ADDED
@@ -0,0 +1,3 @@
1
+ import { xglobal } from '@pezkuwi/x-global';
2
+ export { packageInfo } from './packageInfo.js';
3
+ export const WebSocket = xglobal.WebSocket;
@@ -0,0 +1,9 @@
1
+ export { packageInfo } from './packageInfo.js';
2
+ export declare const WebSocket: {
3
+ new (url: string | URL, protocols?: string | string[]): WebSocket;
4
+ prototype: WebSocket;
5
+ readonly CONNECTING: 0;
6
+ readonly OPEN: 1;
7
+ readonly CLOSING: 2;
8
+ readonly CLOSED: 3;
9
+ };
package/cjs/browser.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebSocket = exports.packageInfo = void 0;
4
+ const x_global_1 = require("@pezkuwi/x-global");
5
+ var packageInfo_js_1 = require("./packageInfo.js");
6
+ Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_js_1.packageInfo; } });
7
+ exports.WebSocket = x_global_1.xglobal.WebSocket;
package/cjs/node.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ export { packageInfo } from './packageInfo.js';
2
+ export declare const WebSocket: {
3
+ new (url: string | URL, protocols?: string | string[]): WebSocket;
4
+ prototype: WebSocket;
5
+ readonly CONNECTING: 0;
6
+ readonly OPEN: 1;
7
+ readonly CLOSING: 2;
8
+ readonly CLOSED: 3;
9
+ };
package/cjs/node.js ADDED
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.WebSocket = exports.packageInfo = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const ws_1 = tslib_1.__importDefault(require("ws"));
6
+ const x_global_1 = require("@pezkuwi/x-global");
7
+ var packageInfo_js_1 = require("./packageInfo.js");
8
+ Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_js_1.packageInfo; } });
9
+ exports.WebSocket = (0, x_global_1.extractGlobal)('WebSocket', ws_1.default);
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "commonjs"
3
+ }
@@ -0,0 +1,6 @@
1
+ export declare const packageInfo: {
2
+ name: string;
3
+ path: string;
4
+ type: string;
5
+ version: string;
6
+ };
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.packageInfo = void 0;
4
+ exports.packageInfo = { name: '@pezkuwi/x-ws', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '14.0.10' };
@@ -0,0 +1 @@
1
+ export * from './browser.js';
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./browser.js"), exports);
package/cjs/shim.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {};
package/cjs/shim.js ADDED
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const x_global_1 = require("@pezkuwi/x-global");
4
+ const x_ws_1 = require("@pezkuwi/x-ws");
5
+ (0, x_global_1.exposeGlobal)('WebSocket', x_ws_1.WebSocket);
package/node.d.ts ADDED
@@ -0,0 +1,9 @@
1
+ export { packageInfo } from './packageInfo.js';
2
+ export declare const WebSocket: {
3
+ new (url: string | URL, protocols?: string | string[]): WebSocket;
4
+ prototype: WebSocket;
5
+ readonly CONNECTING: 0;
6
+ readonly OPEN: 1;
7
+ readonly CLOSING: 2;
8
+ readonly CLOSED: 3;
9
+ };
package/node.js ADDED
@@ -0,0 +1,4 @@
1
+ import ws from 'ws';
2
+ import { extractGlobal } from '@pezkuwi/x-global';
3
+ export { packageInfo } from './packageInfo.js';
4
+ export const WebSocket = /*#__PURE__*/ extractGlobal('WebSocket', ws);
package/package.json CHANGED
@@ -15,16 +15,166 @@
15
15
  },
16
16
  "sideEffects": false,
17
17
  "type": "module",
18
- "version": "14.0.10",
19
- "browser": "browser.js",
20
- "main": "node.js",
21
- "react-native": "react-native.js",
18
+ "version": "14.0.11",
19
+ "main": "./cjs/node.js",
20
+ "module": "./node.js",
21
+ "browser": "./cjs/browser.js",
22
+ "react-native": "./cjs/react-native.js",
23
+ "types": "./node.d.ts",
24
+ "exports": {
25
+ "./cjs/package.json": "./cjs/package.json",
26
+ "./cjs/*": "./cjs/*.js",
27
+ ".": {
28
+ "types": "./node.d.ts",
29
+ "react-native": {
30
+ "module": {
31
+ "types": "./react-native.d.ts",
32
+ "default": "./react-native.js"
33
+ },
34
+ "require": {
35
+ "types": "./cjs/react-native.d.ts",
36
+ "default": "./cjs/react-native.js"
37
+ },
38
+ "default": {
39
+ "types": "./react-native.d.ts",
40
+ "default": "./react-native.js"
41
+ }
42
+ },
43
+ "browser": {
44
+ "module": {
45
+ "types": "./browser.d.ts",
46
+ "default": "./browser.js"
47
+ },
48
+ "require": {
49
+ "types": "./cjs/browser.d.ts",
50
+ "default": "./cjs/browser.js"
51
+ },
52
+ "default": {
53
+ "types": "./browser.d.ts",
54
+ "default": "./browser.js"
55
+ }
56
+ },
57
+ "node": {
58
+ "module": {
59
+ "types": "./node.d.ts",
60
+ "default": "./node.js"
61
+ },
62
+ "require": {
63
+ "types": "./cjs/node.d.ts",
64
+ "default": "./cjs/node.js"
65
+ },
66
+ "default": {
67
+ "types": "./node.d.ts",
68
+ "default": "./node.js"
69
+ }
70
+ }
71
+ },
72
+ "./browser": {
73
+ "module": {
74
+ "types": "./browser.d.ts",
75
+ "default": "./browser.js"
76
+ },
77
+ "require": {
78
+ "types": "./cjs/browser.d.ts",
79
+ "default": "./cjs/browser.js"
80
+ },
81
+ "default": {
82
+ "types": "./browser.d.ts",
83
+ "default": "./browser.js"
84
+ }
85
+ },
86
+ "./node": {
87
+ "module": {
88
+ "types": "./node.d.ts",
89
+ "default": "./node.js"
90
+ },
91
+ "require": {
92
+ "types": "./cjs/node.d.ts",
93
+ "default": "./cjs/node.js"
94
+ },
95
+ "default": {
96
+ "types": "./node.d.ts",
97
+ "default": "./node.js"
98
+ }
99
+ },
100
+ "./package.json": {
101
+ "require": "./cjs/package.json",
102
+ "default": "./package.json"
103
+ },
104
+ "./packageInfo.js": {
105
+ "module": {
106
+ "types": "./packageInfo.d.ts",
107
+ "default": "./packageInfo.js"
108
+ },
109
+ "require": {
110
+ "types": "./cjs/packageInfo.d.ts",
111
+ "default": "./cjs/packageInfo.js"
112
+ },
113
+ "default": {
114
+ "types": "./packageInfo.d.ts",
115
+ "default": "./packageInfo.js"
116
+ }
117
+ },
118
+ "./packageInfo": {
119
+ "module": {
120
+ "types": "./packageInfo.d.ts",
121
+ "default": "./packageInfo.js"
122
+ },
123
+ "require": {
124
+ "types": "./cjs/packageInfo.d.ts",
125
+ "default": "./cjs/packageInfo.js"
126
+ },
127
+ "default": {
128
+ "types": "./packageInfo.d.ts",
129
+ "default": "./packageInfo.js"
130
+ }
131
+ },
132
+ "./react-native": {
133
+ "module": {
134
+ "types": "./react-native.d.ts",
135
+ "default": "./react-native.js"
136
+ },
137
+ "require": {
138
+ "types": "./cjs/react-native.d.ts",
139
+ "default": "./cjs/react-native.js"
140
+ },
141
+ "default": {
142
+ "types": "./react-native.d.ts",
143
+ "default": "./react-native.js"
144
+ }
145
+ },
146
+ "./shim.js": {
147
+ "module": {
148
+ "types": "./shim.d.ts",
149
+ "default": "./shim.js"
150
+ },
151
+ "require": {
152
+ "types": "./cjs/shim.d.ts",
153
+ "default": "./cjs/shim.js"
154
+ },
155
+ "default": {
156
+ "types": "./shim.d.ts",
157
+ "default": "./shim.js"
158
+ }
159
+ },
160
+ "./shim": {
161
+ "module": {
162
+ "types": "./shim.d.ts",
163
+ "default": "./shim.js"
164
+ },
165
+ "require": {
166
+ "types": "./cjs/shim.d.ts",
167
+ "default": "./cjs/shim.js"
168
+ },
169
+ "default": {
170
+ "types": "./shim.d.ts",
171
+ "default": "./shim.js"
172
+ }
173
+ }
174
+ },
22
175
  "dependencies": {
23
- "@pezkuwi/x-global": "14.0.10",
176
+ "@pezkuwi/x-global": "14.0.11",
24
177
  "tslib": "^2.8.0",
25
178
  "ws": "^8.18.0"
26
- },
27
- "devDependencies": {
28
- "@types/ws": "^8.5.12"
29
179
  }
30
- }
180
+ }
@@ -0,0 +1,6 @@
1
+ export declare const packageInfo: {
2
+ name: string;
3
+ path: string;
4
+ type: string;
5
+ version: string;
6
+ };
package/packageInfo.js ADDED
@@ -0,0 +1 @@
1
+ export const packageInfo = { name: '@pezkuwi/x-ws', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '14.0.10' };
@@ -0,0 +1 @@
1
+ export * from './browser.js';
@@ -0,0 +1 @@
1
+ export * from './browser.js';
package/shim.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {};
package/shim.js ADDED
@@ -0,0 +1,3 @@
1
+ import { exposeGlobal } from '@pezkuwi/x-global';
2
+ import { WebSocket } from '@pezkuwi/x-ws';
3
+ exposeGlobal('WebSocket', WebSocket);