@colyseus/monitor 0.16.7 → 0.17.1

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.
@@ -1,153 +0,0 @@
1
- .json-view {
2
- display: block;
3
- color: #4d4d4d;
4
- text-align: left;
5
- --json-property: #009033;
6
- --json-index: #676dff;
7
- --json-number: #676dff;
8
- --json-string: #b2762e;
9
- --json-boolean: #dc155e;
10
- --json-null: #dc155e;
11
- }
12
- .json-view .json-view--property {
13
- color: var(--json-property);
14
- }
15
- .json-view .json-view--index {
16
- color: var(--json-index);
17
- }
18
- .json-view .json-view--number {
19
- color: var(--json-number);
20
- }
21
- .json-view .json-view--string {
22
- color: var(--json-string);
23
- }
24
- .json-view .json-view--boolean {
25
- color: var(--json-boolean);
26
- }
27
- .json-view .json-view--null {
28
- color: var(--json-null);
29
- }
30
-
31
- .json-view .jv-indent {
32
- padding-left: 1em;
33
- }
34
- .json-view .jv-chevron {
35
- display: inline-block;
36
- vertical-align: -20%;
37
- cursor: pointer;
38
- opacity: 0.4;
39
- width: 1em;
40
- height: 1em;
41
- }
42
- :is(.json-view .jv-chevron:hover, .json-view .jv-size:hover + .jv-chevron) {
43
- opacity: 0.8;
44
- }
45
- .json-view .jv-size {
46
- cursor: pointer;
47
- opacity: 0.4;
48
- font-size: 0.875em;
49
- font-style: italic;
50
- margin-left: 0.5em;
51
- vertical-align: -5%;
52
- line-height: 1;
53
- }
54
-
55
- .json-view :is(.json-view--copy, .json-view--edit),
56
- .json-view .json-view--link svg {
57
- display: none;
58
- width: 1em;
59
- height: 1em;
60
- margin-left: 0.25em;
61
- cursor: pointer;
62
- }
63
-
64
- .json-view .json-view--input {
65
- width: 120px;
66
- margin-left: 0.25em;
67
- border-radius: 4px;
68
- border: 1px solid currentColor;
69
- padding: 0px 4px;
70
- font-size: 87.5%;
71
- line-height: 1.25;
72
- background: transparent;
73
- }
74
- .json-view .json-view--deleting {
75
- outline: 1px solid #da0000;
76
- background-color: #da000011;
77
- text-decoration-line: line-through;
78
- }
79
-
80
- :is(.json-view:hover, .json-view--pair:hover) > :is(.json-view--copy, .json-view--edit),
81
- :is(.json-view:hover, .json-view--pair:hover) > .json-view--link svg {
82
- display: inline-block;
83
- }
84
-
85
- .json-view .jv-button {
86
- background: transparent;
87
- outline: none;
88
- border: none;
89
- cursor: pointer;
90
- color: inherit;
91
- }
92
- .json-view .cursor-pointer {
93
- cursor: pointer;
94
- }
95
-
96
- .json-view svg {
97
- vertical-align: -10%;
98
- }
99
- .jv-size-chevron ~ svg {
100
- vertical-align: -16%;
101
- }
102
-
103
- /* Themes */
104
- .json-view_a11y {
105
- color: #545454;
106
- --json-property: #aa5d00;
107
- --json-index: #007299;
108
- --json-number: #007299;
109
- --json-string: #008000;
110
- --json-boolean: #d91e18;
111
- --json-null: #d91e18;
112
- }
113
- .json-view_github {
114
- color: #005cc5;
115
- --json-property: #005cc5;
116
- --json-index: #005cc5;
117
- --json-number: #005cc5;
118
- --json-string: #032f62;
119
- --json-boolean: #005cc5;
120
- --json-null: #005cc5;
121
- }
122
- .json-view_vscode {
123
- color: #005cc5;
124
- --json-property: #0451a5;
125
- --json-index: #0000ff;
126
- --json-number: #0000ff;
127
- --json-string: #a31515;
128
- --json-boolean: #0000ff;
129
- --json-null: #0000ff;
130
- }
131
- .json-view_atom {
132
- color: #383a42;
133
- --json-property: #e45649;
134
- --json-index: #986801;
135
- --json-number: #986801;
136
- --json-string: #50a14f;
137
- --json-boolean: #0184bc;
138
- --json-null: #0184bc;
139
- }
140
- .json-view_winter-is-coming {
141
- color: #0431fa;
142
- --json-property: #3a9685;
143
- --json-index: #ae408b;
144
- --json-number: #ae408b;
145
- --json-string: #8123a9;
146
- --json-boolean: #0184bc;
147
- --json-null: #0184bc;
148
- }
149
- html, body {
150
- margin: 0;
151
- padding: 0;
152
- }
153
- /*# sourceMappingURL=styles.css.map*/
@@ -1 +0,0 @@
1
- {"version":3,"file":"styles.css","sources":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;A","sourceRoot":""}
package/build.mjs DELETED
@@ -1,112 +0,0 @@
1
- import path from 'path';
2
- import glob from 'fast-glob';
3
- import { fileURLToPath } from 'url';
4
- import ts from "typescript";
5
- import fs from "fs";
6
- import esbuild from "esbuild";
7
-
8
- // we need to change up how __dirname is used for ES6 purposes
9
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
10
-
11
- async function main() {
12
- // Absolute path to package directory
13
- const basePath = __dirname;
14
- const target = "es2017";
15
-
16
- // Get all .ts as input files
17
- const entryPoints = glob.sync(path.resolve(basePath, "src-backend", "**", "**.ts")
18
- .replace(/\\/g, '/')); // windows support
19
-
20
- const outdir = path.join(basePath, 'build');
21
-
22
- // Emit only .d.ts files
23
- const emitTSDeclaration = () => {
24
- console.log("Generating .d.ts...");
25
- const program = ts.createProgram(entryPoints, {
26
- declaration: true,
27
- emitDeclarationOnly: true,
28
- skipLibCheck: true,
29
- module: "commonjs",
30
- target,
31
- outDir: outdir,
32
- esModuleInterop: true,
33
- experimentalDecorators: true,
34
- });
35
- const emitResult = program.emit();
36
-
37
- const allDiagnostics = ts
38
- .getPreEmitDiagnostics(program)
39
- .concat(emitResult.diagnostics);
40
-
41
- allDiagnostics.forEach(diagnostic => {
42
- if (diagnostic.file) {
43
- const { line, character } = ts.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start);
44
- const message = ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n");
45
- console.log(`${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
46
- } else {
47
- console.log(ts.flattenDiagnosticMessageText(diagnostic.messageText, "\n"));
48
- }
49
- });
50
- }
51
-
52
- // CommonJS output
53
- console.log("Generating CJS build...");
54
- esbuild.build({
55
- entryPoints,
56
- outdir,
57
- target,
58
- format: "cjs",
59
- target: "es2017",
60
- sourcemap: "external",
61
- platform: "node",
62
- });
63
-
64
- // ESM output
65
- console.log("Generating ESM build...");
66
- esbuild.build({
67
- entryPoints,
68
- outdir,
69
- target: "esnext",
70
- format: "esm",
71
- bundle: true,
72
- sourcemap: "external",
73
- platform: "node",
74
- outExtension: { '.js': '.mjs', },
75
- plugins: [
76
- {
77
- name: 'add-mjs',
78
- setup(build) {
79
- build.onResolve({ filter: /.*/ }, (args) => {
80
- if (args.importer) return { path: args.path.replace(/^\.(.*)\.js$/, '.$1.mjs'), external: true }
81
- })
82
- },
83
- },
84
- {
85
- //
86
- // WORKAROUND FOR __dirname usage in ESM
87
- // TODO: need to have a better appraoch for ESM + CJS builds...
88
- //
89
- name: 'dirname',
90
- setup(build) {
91
- build.onLoad({ filter: /.*/ }, ({ path: filePath }) => {
92
- let contents = fs.readFileSync(filePath, "utf8");
93
- const loader = path.extname(filePath).substring(1);
94
- contents = contents.replace("__dirname", `path.dirname(fileURLToPath(import.meta.url))`)
95
- return {
96
- contents,
97
- loader,
98
- };
99
- });
100
- }
101
-
102
- }
103
- ]
104
- });
105
-
106
- // emit .d.ts files
107
- emitTSDeclaration();
108
- console.log("Done!");
109
- }
110
-
111
- export default await main();
112
-
package/tsconfig.json DELETED
@@ -1,22 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "outDir": "build",
4
- "module": "commonjs",
5
- "lib": ["ES2022", "DOM"],
6
- "target": "ES2022",
7
- "declaration": true,
8
- "noImplicitAny": false,
9
- "esModuleInterop": true,
10
- "experimentalDecorators": true,
11
- "useDefineForClassFields": false,
12
- "sourceMap": false,
13
- "skipLibCheck": true,
14
- "jsx": "react"
15
- },
16
- "include": [
17
- "src-backend/**/*.ts"
18
- ],
19
- "exclude": [
20
- "src/**"
21
- ]
22
- }
package/webpack.config.js DELETED
@@ -1,52 +0,0 @@
1
- const webpack = require('webpack');
2
- const path = require('path');
3
-
4
- const HtmlWebpackPlugin = require('html-webpack-plugin');
5
- const ExtractTextPlugin = require("extract-text-webpack-plugin");
6
-
7
- const pkg = require('./package.json');
8
-
9
- module.exports = function(options) {
10
- if (!options) options = {};
11
-
12
- const MODE = (options.production)
13
- ? "production"
14
- : "development";
15
-
16
- return {
17
- mode: MODE,
18
-
19
- entry: path.resolve("src", "index.tsx"),
20
-
21
- output: {
22
- path: __dirname + "/build/static",
23
- filename: 'bundle.js'
24
- },
25
-
26
- devtool: 'cheap-source-map',
27
-
28
- module: {
29
- rules: [
30
- { test: /\.tsx?$/, loader: "ts-loader" },
31
- { test: /\.css$/, loader: ExtractTextPlugin.extract({ fallback: "style-loader", use: "css-loader" }) },
32
- { test: /\.(woff|woff2|eot|ttf|svg)$/, loader: 'file-loader?limit=1024&name=[name].[ext]' },
33
- { test: /\.mjs$/, include: /node_modules/, type: 'javascript/auto' },
34
- ]
35
- },
36
-
37
- plugins: [
38
- new webpack.DefinePlugin({
39
- 'process.env.npm_package_version': JSON.stringify(pkg.version),
40
- }),
41
- new ExtractTextPlugin("styles.css"),
42
- new HtmlWebpackPlugin({
43
- template: path.resolve("src", "index.html")
44
- }),
45
- ],
46
-
47
- resolve: {
48
- extensions: ['.ts', '.tsx', '.js', '.json']
49
- }
50
-
51
- }
52
- };