gameglue 4.0.1 → 4.0.2
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/LICENSE +21 -21
- package/README.md +275 -275
- package/babel.config.cjs +5 -5
- package/coverage/auth.js.html +525 -525
- package/coverage/base.css +224 -224
- package/coverage/block-navigation.js +87 -87
- package/coverage/favicon.png +0 -0
- package/coverage/index.html +175 -175
- package/coverage/index.js.html +309 -309
- package/coverage/lcov-report/auth.js.html +525 -525
- package/coverage/lcov-report/base.css +224 -224
- package/coverage/lcov-report/block-navigation.js +87 -87
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +175 -175
- package/coverage/lcov-report/index.js.html +309 -309
- package/coverage/lcov-report/listener.js.html +528 -528
- package/coverage/lcov-report/prettify.css +1 -1
- package/coverage/lcov-report/prettify.js +2 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +210 -210
- package/coverage/lcov-report/user.js.html +117 -117
- package/coverage/lcov-report/utils.js.html +117 -117
- package/coverage/lcov.info +391 -391
- package/coverage/listener.js.html +528 -528
- package/coverage/prettify.css +1 -1
- package/coverage/prettify.js +2 -2
- package/coverage/sort-arrow-sprite.png +0 -0
- package/coverage/sorter.js +210 -210
- package/coverage/user.js.html +117 -117
- package/coverage/utils.js.html +117 -117
- package/dist/gg.cjs.js +1 -1
- package/dist/gg.cjs.js.map +1 -1
- package/dist/gg.esm.js +1 -1
- package/dist/gg.esm.js.map +1 -1
- package/dist/gg.umd.js +1 -1
- package/dist/gg.umd.js.map +1 -1
- package/examples/certs/cert.pem +19 -19
- package/examples/certs/key.pem +28 -28
- package/examples/flight-dashboard.html +431 -431
- package/examples/server.js +99 -99
- package/examples/telemetry-validator.html +1410 -1410
- package/jest.config.cjs +33 -33
- package/package.json +56 -56
- package/rollup.config.js +57 -57
- package/src/auth.js +255 -255
- package/src/auth.spec.js +481 -481
- package/src/index.js +168 -168
- package/src/listener.js +196 -196
- package/src/listener.spec.js +598 -598
- package/src/presence_listener.js +112 -112
- package/src/test/fixtures.js +106 -106
- package/src/test/setup.js +51 -51
- package/src/utils.js +63 -63
- package/src/utils.spec.js +78 -78
- package/types/index.d.ts +338 -338
- package/webpack.config.js +15 -15
package/jest.config.cjs
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
testEnvironment: 'jsdom',
|
|
3
|
-
roots: ['<rootDir>/src'],
|
|
4
|
-
testMatch: ['**/*.spec.js', '**/*.test.js'],
|
|
5
|
-
moduleFileExtensions: ['js'],
|
|
6
|
-
transform: {
|
|
7
|
-
'^.+\\.js$': 'babel-jest'
|
|
8
|
-
},
|
|
9
|
-
moduleNameMapper: {
|
|
10
|
-
'^@gameglue/schemas$': '<rootDir>/../schemas/dist/index.js'
|
|
11
|
-
},
|
|
12
|
-
transformIgnorePatterns: [
|
|
13
|
-
'node_modules/(?!(oidc-client-ts|jwt-decode|event-emitter|socket.io-client|socket.io-parser|engine.io-client|@gameglue/schemas)/)'
|
|
14
|
-
],
|
|
15
|
-
collectCoverageFrom: [
|
|
16
|
-
'src/**/*.js',
|
|
17
|
-
'!src/**/*.test.js',
|
|
18
|
-
'!src/**/*.spec.js',
|
|
19
|
-
'!src/test/**/*.js'
|
|
20
|
-
],
|
|
21
|
-
coverageDirectory: 'coverage',
|
|
22
|
-
coverageReporters: ['text', 'lcov', 'html'],
|
|
23
|
-
coverageThreshold: {
|
|
24
|
-
global: {
|
|
25
|
-
branches: 70,
|
|
26
|
-
functions: 80,
|
|
27
|
-
lines: 80,
|
|
28
|
-
statements: 80
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
setupFilesAfterEnv: ['<rootDir>/src/test/setup.js'],
|
|
32
|
-
testTimeout: 10000
|
|
33
|
-
};
|
|
1
|
+
module.exports = {
|
|
2
|
+
testEnvironment: 'jsdom',
|
|
3
|
+
roots: ['<rootDir>/src'],
|
|
4
|
+
testMatch: ['**/*.spec.js', '**/*.test.js'],
|
|
5
|
+
moduleFileExtensions: ['js'],
|
|
6
|
+
transform: {
|
|
7
|
+
'^.+\\.js$': 'babel-jest'
|
|
8
|
+
},
|
|
9
|
+
moduleNameMapper: {
|
|
10
|
+
'^@gameglue/schemas$': '<rootDir>/../schemas/dist/index.js'
|
|
11
|
+
},
|
|
12
|
+
transformIgnorePatterns: [
|
|
13
|
+
'node_modules/(?!(oidc-client-ts|jwt-decode|event-emitter|socket.io-client|socket.io-parser|engine.io-client|@gameglue/schemas)/)'
|
|
14
|
+
],
|
|
15
|
+
collectCoverageFrom: [
|
|
16
|
+
'src/**/*.js',
|
|
17
|
+
'!src/**/*.test.js',
|
|
18
|
+
'!src/**/*.spec.js',
|
|
19
|
+
'!src/test/**/*.js'
|
|
20
|
+
],
|
|
21
|
+
coverageDirectory: 'coverage',
|
|
22
|
+
coverageReporters: ['text', 'lcov', 'html'],
|
|
23
|
+
coverageThreshold: {
|
|
24
|
+
global: {
|
|
25
|
+
branches: 70,
|
|
26
|
+
functions: 80,
|
|
27
|
+
lines: 80,
|
|
28
|
+
statements: 80
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
setupFilesAfterEnv: ['<rootDir>/src/test/setup.js'],
|
|
32
|
+
testTimeout: 10000
|
|
33
|
+
};
|
package/package.json
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "gameglue",
|
|
3
|
-
"version": "4.0.
|
|
4
|
-
"description": "Javascript SDK for the GameGlue developer platform.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "dist/gg.cjs.js",
|
|
7
|
-
"module": "dist/gg.esm.js",
|
|
8
|
-
"browser": "dist/gg.umd.js",
|
|
9
|
-
"types": "types/index.d.ts",
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"types": "./types/index.d.ts",
|
|
13
|
-
"import": "./dist/gg.esm.js",
|
|
14
|
-
"require": "./dist/gg.cjs.js",
|
|
15
|
-
"browser": "./dist/gg.umd.js"
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
"scripts": {
|
|
19
|
-
"build": "rollup -c",
|
|
20
|
-
"serve": "node examples/server.js",
|
|
21
|
-
"serve:https": "HTTPS=true node examples/server.js",
|
|
22
|
-
"test": "jest",
|
|
23
|
-
"test:watch": "jest --watch",
|
|
24
|
-
"test:coverage": "jest --coverage"
|
|
25
|
-
},
|
|
26
|
-
"repository": {
|
|
27
|
-
"type": "git",
|
|
28
|
-
"url": "https://github.com/GameGlue/GameGlueJS.git"
|
|
29
|
-
},
|
|
30
|
-
"author": "GameGlue",
|
|
31
|
-
"license": "MIT",
|
|
32
|
-
"homepage": "https://gameglue.gg",
|
|
33
|
-
"bugs": {
|
|
34
|
-
"url": "https://github.com/GameGlue/GameGlueJS/issues"
|
|
35
|
-
},
|
|
36
|
-
"dependencies": {
|
|
37
|
-
"event-emitter": "^0.3.5",
|
|
38
|
-
"jwt-decode": "^3.1.2",
|
|
39
|
-
"oidc-client-ts": "^2.2.1",
|
|
40
|
-
"socket.io-client": "^4.5.4"
|
|
41
|
-
},
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"@gameglue/schemas": "file:../schemas",
|
|
44
|
-
"@babel/core": "^7.28.5",
|
|
45
|
-
"@babel/preset-env": "^7.28.5",
|
|
46
|
-
"@rollup/plugin-commonjs": "^28.0.0",
|
|
47
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
48
|
-
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
49
|
-
"@rollup/plugin-terser": "^0.4.0",
|
|
50
|
-
"@types/jest": "^30.0.0",
|
|
51
|
-
"babel-jest": "^30.2.0",
|
|
52
|
-
"jest": "^30.2.0",
|
|
53
|
-
"jest-environment-jsdom": "^30.2.0",
|
|
54
|
-
"rollup": "^4.0.0"
|
|
55
|
-
}
|
|
56
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "gameglue",
|
|
3
|
+
"version": "4.0.2",
|
|
4
|
+
"description": "Javascript SDK for the GameGlue developer platform.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/gg.cjs.js",
|
|
7
|
+
"module": "dist/gg.esm.js",
|
|
8
|
+
"browser": "dist/gg.umd.js",
|
|
9
|
+
"types": "types/index.d.ts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./types/index.d.ts",
|
|
13
|
+
"import": "./dist/gg.esm.js",
|
|
14
|
+
"require": "./dist/gg.cjs.js",
|
|
15
|
+
"browser": "./dist/gg.umd.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "rollup -c",
|
|
20
|
+
"serve": "node examples/server.js",
|
|
21
|
+
"serve:https": "HTTPS=true node examples/server.js",
|
|
22
|
+
"test": "jest",
|
|
23
|
+
"test:watch": "jest --watch",
|
|
24
|
+
"test:coverage": "jest --coverage"
|
|
25
|
+
},
|
|
26
|
+
"repository": {
|
|
27
|
+
"type": "git",
|
|
28
|
+
"url": "https://github.com/GameGlue/GameGlueJS.git"
|
|
29
|
+
},
|
|
30
|
+
"author": "GameGlue",
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"homepage": "https://gameglue.gg",
|
|
33
|
+
"bugs": {
|
|
34
|
+
"url": "https://github.com/GameGlue/GameGlueJS/issues"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"event-emitter": "^0.3.5",
|
|
38
|
+
"jwt-decode": "^3.1.2",
|
|
39
|
+
"oidc-client-ts": "^2.2.1",
|
|
40
|
+
"socket.io-client": "^4.5.4"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@gameglue/schemas": "file:../schemas",
|
|
44
|
+
"@babel/core": "^7.28.5",
|
|
45
|
+
"@babel/preset-env": "^7.28.5",
|
|
46
|
+
"@rollup/plugin-commonjs": "^28.0.0",
|
|
47
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
48
|
+
"@rollup/plugin-node-resolve": "^16.0.0",
|
|
49
|
+
"@rollup/plugin-terser": "^0.4.0",
|
|
50
|
+
"@types/jest": "^30.0.0",
|
|
51
|
+
"babel-jest": "^30.2.0",
|
|
52
|
+
"jest": "^30.2.0",
|
|
53
|
+
"jest-environment-jsdom": "^30.2.0",
|
|
54
|
+
"rollup": "^4.0.0"
|
|
55
|
+
}
|
|
56
|
+
}
|
package/rollup.config.js
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
-
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
-
import json from '@rollup/plugin-json';
|
|
4
|
-
import terser from '@rollup/plugin-terser';
|
|
5
|
-
|
|
6
|
-
export default [
|
|
7
|
-
// ESM build (for modern bundlers like Vite, Rollup)
|
|
8
|
-
// Bundle all dependencies so consumers don't need to install them
|
|
9
|
-
{
|
|
10
|
-
input: 'src/index.js',
|
|
11
|
-
output: {
|
|
12
|
-
file: 'dist/gg.esm.js',
|
|
13
|
-
format: 'esm',
|
|
14
|
-
sourcemap: true,
|
|
15
|
-
},
|
|
16
|
-
plugins: [
|
|
17
|
-
resolve({ browser: true }),
|
|
18
|
-
commonjs(),
|
|
19
|
-
json(),
|
|
20
|
-
terser(),
|
|
21
|
-
],
|
|
22
|
-
},
|
|
23
|
-
// CommonJS build (for Node.js require())
|
|
24
|
-
{
|
|
25
|
-
input: 'src/index.js',
|
|
26
|
-
output: {
|
|
27
|
-
file: 'dist/gg.cjs.js',
|
|
28
|
-
format: 'cjs',
|
|
29
|
-
sourcemap: true,
|
|
30
|
-
exports: 'named',
|
|
31
|
-
},
|
|
32
|
-
external: ['socket.io-client', 'oidc-client-ts', 'jwt-decode', 'event-emitter'],
|
|
33
|
-
plugins: [
|
|
34
|
-
resolve({ browser: true }),
|
|
35
|
-
commonjs(),
|
|
36
|
-
json(),
|
|
37
|
-
terser(),
|
|
38
|
-
],
|
|
39
|
-
},
|
|
40
|
-
// UMD build (for script tags, includes all deps)
|
|
41
|
-
{
|
|
42
|
-
input: 'src/index.js',
|
|
43
|
-
output: {
|
|
44
|
-
file: 'dist/gg.umd.js',
|
|
45
|
-
format: 'umd',
|
|
46
|
-
name: 'GameGlue',
|
|
47
|
-
sourcemap: true,
|
|
48
|
-
globals: {},
|
|
49
|
-
},
|
|
50
|
-
plugins: [
|
|
51
|
-
resolve({ browser: true }),
|
|
52
|
-
commonjs(),
|
|
53
|
-
json(),
|
|
54
|
-
terser(),
|
|
55
|
-
],
|
|
56
|
-
},
|
|
57
|
-
];
|
|
1
|
+
import resolve from '@rollup/plugin-node-resolve';
|
|
2
|
+
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
+
import json from '@rollup/plugin-json';
|
|
4
|
+
import terser from '@rollup/plugin-terser';
|
|
5
|
+
|
|
6
|
+
export default [
|
|
7
|
+
// ESM build (for modern bundlers like Vite, Rollup)
|
|
8
|
+
// Bundle all dependencies so consumers don't need to install them
|
|
9
|
+
{
|
|
10
|
+
input: 'src/index.js',
|
|
11
|
+
output: {
|
|
12
|
+
file: 'dist/gg.esm.js',
|
|
13
|
+
format: 'esm',
|
|
14
|
+
sourcemap: true,
|
|
15
|
+
},
|
|
16
|
+
plugins: [
|
|
17
|
+
resolve({ browser: true }),
|
|
18
|
+
commonjs(),
|
|
19
|
+
json(),
|
|
20
|
+
terser(),
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
// CommonJS build (for Node.js require())
|
|
24
|
+
{
|
|
25
|
+
input: 'src/index.js',
|
|
26
|
+
output: {
|
|
27
|
+
file: 'dist/gg.cjs.js',
|
|
28
|
+
format: 'cjs',
|
|
29
|
+
sourcemap: true,
|
|
30
|
+
exports: 'named',
|
|
31
|
+
},
|
|
32
|
+
external: ['socket.io-client', 'oidc-client-ts', 'jwt-decode', 'event-emitter'],
|
|
33
|
+
plugins: [
|
|
34
|
+
resolve({ browser: true }),
|
|
35
|
+
commonjs(),
|
|
36
|
+
json(),
|
|
37
|
+
terser(),
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
// UMD build (for script tags, includes all deps)
|
|
41
|
+
{
|
|
42
|
+
input: 'src/index.js',
|
|
43
|
+
output: {
|
|
44
|
+
file: 'dist/gg.umd.js',
|
|
45
|
+
format: 'umd',
|
|
46
|
+
name: 'GameGlue',
|
|
47
|
+
sourcemap: true,
|
|
48
|
+
globals: {},
|
|
49
|
+
},
|
|
50
|
+
plugins: [
|
|
51
|
+
resolve({ browser: true }),
|
|
52
|
+
commonjs(),
|
|
53
|
+
json(),
|
|
54
|
+
terser(),
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
];
|