gamelet-cli 0.6.2 → 0.6.3

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.
Files changed (68) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +0 -0
  3. package/assets/common.d.ts +4 -4
  4. package/assets/gitignore.txt +65 -65
  5. package/assets/launch.json +21 -21
  6. package/assets/package.json.twig +22 -22
  7. package/assets/server/greenlock.d/config.json +25 -25
  8. package/assets/server/static/css/style.css +0 -0
  9. package/assets/server/static/js/monitor.js +0 -0
  10. package/assets/server/static/js/test.js +0 -0
  11. package/assets/server/views/error.twig +0 -0
  12. package/assets/server/views/index.twig +0 -0
  13. package/assets/server/views/monitor.twig +0 -0
  14. package/assets/server/views/test.twig +0 -0
  15. package/assets/tsconfig.json.twig +42 -42
  16. package/build/package.json +67 -67
  17. package/build/src/gamelet/download.js +736 -736
  18. package/build/src/gamelet/merges.js +143 -143
  19. package/build/src/gamelet/prepare.js +274 -274
  20. package/build/src/gamelet/upload.js +278 -278
  21. package/build/src/index.js +85 -85
  22. package/build/src/server/Constant.js +9 -9
  23. package/build/src/server/entities/Client.js +77 -77
  24. package/build/src/server/entities/ClientOwner.js +66 -66
  25. package/build/src/server/entities/ClientProject.js +83 -83
  26. package/build/src/server/entities/Gameroom.js +88 -88
  27. package/build/src/server/entities/GameroomBase.js +275 -275
  28. package/build/src/server/entities/Gamezone.js +72 -72
  29. package/build/src/server/entities/ListFilter.js +192 -192
  30. package/build/src/server/entities/Monitor.js +80 -80
  31. package/build/src/server/entities/Player.js +131 -131
  32. package/build/src/server/managers/ApiManager.js +74 -74
  33. package/build/src/server/managers/ClientManager.js +63 -63
  34. package/build/src/server/managers/Database.js +593 -593
  35. package/build/src/server/managers/GameroomManager.js +391 -391
  36. package/build/src/server/managers/ManagerBase.js +16 -16
  37. package/build/src/server/managers/MonitorManager.js +72 -72
  38. package/build/src/server/managers/PlayerManager.js +103 -103
  39. package/build/src/server/managers/SocketManager.js +55 -55
  40. package/build/src/server/managers/UserManager.js +57 -57
  41. package/build/src/server/messages/Message.js +141 -141
  42. package/build/src/server/server.js +109 -109
  43. package/build/src/server/services/ServiceBase.js +24 -24
  44. package/build/src/server/services/clientService.js +23 -23
  45. package/build/src/server/services/gameroomService.js +121 -121
  46. package/build/src/server/services/gltserver.service.js +23 -23
  47. package/build/src/server/services/playerService.js +29 -29
  48. package/build/src/server/startServer.js +32 -32
  49. package/build/src/server/types/BadgeStatus.js +24 -24
  50. package/build/src/server/types/OrderType.js +37 -37
  51. package/build/src/server/types/SubmitType.js +23 -23
  52. package/build/src/server/types/TimeRange.js +25 -25
  53. package/build/src/server/utils/ArrayUtil.js +125 -125
  54. package/build/src/server/utils/IntUtil.js +9 -9
  55. package/build/src/server/utils/ObjectUtil.js +190 -190
  56. package/build/src/server/utils/StringUtil.js +36 -36
  57. package/build/src/server/vo/Database.js +0 -0
  58. package/build/src/server/vo/Gameroom.js +0 -0
  59. package/build/src/server/vo/Gamezone.js +0 -0
  60. package/build/src/server/vo/Player.js +0 -0
  61. package/build/src/server/vo/Response.js +0 -0
  62. package/build/src/server/vo/System.js +0 -0
  63. package/build/src/utils/cli.js +48 -48
  64. package/build/src/utils/file.js +326 -326
  65. package/build/src/utils/init.js +41 -41
  66. package/build/src/utils/log.js +16 -16
  67. package/build/src/utils/net.js +38 -38
  68. package/package.json +2 -2
package/LICENSE CHANGED
File without changes
package/README.md CHANGED
File without changes
@@ -1,5 +1,5 @@
1
- export type mixed = { [key: string]: any } | object | number | string | boolean | symbol | undefined | null | void
2
-
3
- declare global {
4
- type unknown = mixed
1
+ export type mixed = { [key: string]: any } | object | number | string | boolean | symbol | undefined | null | void
2
+
3
+ declare global {
4
+ type unknown = mixed
5
5
  }
@@ -1,66 +1,66 @@
1
- # NPM #
2
- ##########
3
- # Ignore all directories called node_modules in current folder and any subfolders.
4
- node_modules/
5
- /node_modules/
6
-
7
- # Logs and databases #
8
- ######################
9
- *.log
10
- *.sql
11
- *.env
12
-
13
- # OS generated files #
14
- ######################
15
- **.DS_Store*
16
- ehthumbs.db
17
- Icon?
18
- Thumbs.db
19
- ._*
20
- **settings.dat*
21
-
22
- # Vim generated files #
23
- ######################
24
- *.un~
25
-
26
- # SASS #
27
- ##########
28
- **/.sass-cache
29
- **/.sass-cache/*
30
- **/.map
31
-
32
- # Composer #
33
- ##########
34
- !assets/js/vendor/
35
- wpcs/
36
- /vendor/
37
-
38
- # Bower #
39
- ##########
40
- assets/bower_components/*
41
-
42
- # Codekit #
43
- ##########
44
- /codekit-config.json
45
- *.codekit
46
- **.codekit-cache/*
47
-
48
- # Compiled Files and Build Dirs #
49
- ##########
50
- /README.html
51
-
52
- # PhpStrom Project Files #
53
- .idea/
54
- library/vendors/composer
55
- assets/img/.DS_Store
56
-
57
- # CG related
58
- output
59
- resource
60
- static
61
- typings
62
- .temp
63
- .temp/*
64
- .cg
65
- .cg/*
1
+ # NPM #
2
+ ##########
3
+ # Ignore all directories called node_modules in current folder and any subfolders.
4
+ node_modules/
5
+ /node_modules/
6
+
7
+ # Logs and databases #
8
+ ######################
9
+ *.log
10
+ *.sql
11
+ *.env
12
+
13
+ # OS generated files #
14
+ ######################
15
+ **.DS_Store*
16
+ ehthumbs.db
17
+ Icon?
18
+ Thumbs.db
19
+ ._*
20
+ **settings.dat*
21
+
22
+ # Vim generated files #
23
+ ######################
24
+ *.un~
25
+
26
+ # SASS #
27
+ ##########
28
+ **/.sass-cache
29
+ **/.sass-cache/*
30
+ **/.map
31
+
32
+ # Composer #
33
+ ##########
34
+ !assets/js/vendor/
35
+ wpcs/
36
+ /vendor/
37
+
38
+ # Bower #
39
+ ##########
40
+ assets/bower_components/*
41
+
42
+ # Codekit #
43
+ ##########
44
+ /codekit-config.json
45
+ *.codekit
46
+ **.codekit-cache/*
47
+
48
+ # Compiled Files and Build Dirs #
49
+ ##########
50
+ /README.html
51
+
52
+ # PhpStrom Project Files #
53
+ .idea/
54
+ library/vendors/composer
55
+ assets/img/.DS_Store
56
+
57
+ # CG related
58
+ output
59
+ resource
60
+ static
61
+ typings
62
+ .temp
63
+ .temp/*
64
+ .cg
65
+ .cg/*
66
66
  index.html
@@ -1,22 +1,22 @@
1
- {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
- "configurations": [
7
- {
8
- "type": "pwa-chrome",
9
- "request": "launch",
10
- "name": "Play Game",
11
- "url": "http://localhost:3800",
12
- "webRoot": "${workspaceFolder}"
13
- },
14
- {
15
- "type": "pwa-chrome",
16
- "request": "launch",
17
- "name": "Test Module",
18
- "url": "http://localhost:3800?mode=test",
19
- "webRoot": "${workspaceFolder}"
20
- }
21
- ]
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "type": "chrome",
9
+ "request": "launch",
10
+ "name": "Play Game",
11
+ "url": "http://localhost:3800",
12
+ "webRoot": "${workspaceFolder}"
13
+ },
14
+ {
15
+ "type": "chrome",
16
+ "request": "launch",
17
+ "name": "Test Module",
18
+ "url": "http://localhost:3800?mode=test",
19
+ "webRoot": "${workspaceFolder}"
20
+ }
21
+ ]
22
22
  }
@@ -1,23 +1,23 @@
1
- {
2
- "name": "{{project.code | lower}}",
3
- "license": "MIT License",
4
- "version": "{{nextVer}}",
5
- "author": {
6
- "name": "{{project.owner.name}}",
7
- "url": "{{CG_URL}}/profile/{{project.owner.username}}"
8
- },
9
- "entry": "{{project.entry}}",
10
- "testEntry": "{{project.testEntry}}",
11
- "scripts": {
12
- "build": "npx tsc",
13
- "serve": "npx browser-sync start --server --port 3800 --no-open --no-ghost-mode --files=\"output/*\" --ignore \".cg/db/**/*\"",
14
- "start": "npx concurrently \"npm run watch\" \"npm run serve\"",
15
- "watch": "npx tsc -w"
16
- },
17
- "devDependencies": {
18
- "browser-sync": "^2.29.1",
19
- "concurrently": "^8.0.1",
20
- "prettier": "^2.6.2",
21
- "typescript": "^4.5.5"
22
- }
1
+ {
2
+ "name": "{{project.code | lower}}",
3
+ "license": "MIT License",
4
+ "version": "{{nextVer}}",
5
+ "author": {
6
+ "name": "{{project.owner.name}}",
7
+ "url": "{{CG_URL}}/profile/{{project.owner.username}}"
8
+ },
9
+ "entry": "{{project.entry}}",
10
+ "testEntry": "{{project.testEntry}}",
11
+ "scripts": {
12
+ "build": "npx tsc",
13
+ "serve": "npx browser-sync start --server --port 3800 --no-open --no-ghost-mode --files=\"output/*\" --ignore \".cg/db/**/*\"",
14
+ "start": "npx concurrently \"npm run watch\" \"npm run serve\"",
15
+ "watch": "npx tsc -w"
16
+ },
17
+ "devDependencies": {
18
+ "browser-sync": "^3.0.2",
19
+ "concurrently": "^8.2.2",
20
+ "prettier": "^2.6.2",
21
+ "typescript": "^5.4.5"
22
+ }
23
23
  }
@@ -1,26 +1,26 @@
1
- {
2
- "defaults": {
3
- "store": {
4
- "module": "greenlock-store-fs"
5
- },
6
- "challenges": {
7
- "http-01": {
8
- "module": "acme-http-01-standalone"
9
- }
10
- },
11
- "renewOffset": "-45d",
12
- "renewStagger": "3d",
13
- "accountKeyType": "EC-P256",
14
- "serverKeyType": "RSA-2048",
15
- "subscriberEmail": "haskasu@gmail.com"
16
- },
17
- "sites": [
18
- {
19
- "subject": "ms.gamelet.online",
20
- "altnames": [
21
- "ms.gamelet.online"
22
- ],
23
- "renewAt": 1
24
- }
25
- ]
1
+ {
2
+ "defaults": {
3
+ "store": {
4
+ "module": "greenlock-store-fs"
5
+ },
6
+ "challenges": {
7
+ "http-01": {
8
+ "module": "acme-http-01-standalone"
9
+ }
10
+ },
11
+ "renewOffset": "-45d",
12
+ "renewStagger": "3d",
13
+ "accountKeyType": "EC-P256",
14
+ "serverKeyType": "RSA-2048",
15
+ "subscriberEmail": "haskasu@gmail.com"
16
+ },
17
+ "sites": [
18
+ {
19
+ "subject": "ms.gamelet.online",
20
+ "altnames": [
21
+ "ms.gamelet.online"
22
+ ],
23
+ "renewAt": 1
24
+ }
25
+ ]
26
26
  }
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,43 +1,43 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es6",
4
- "module": "system",
5
- "emitDecoratorMetadata": true,
6
- "experimentalDecorators": true,
7
- "allowSyntheticDefaultImports": true,
8
- "sourceMap": true,
9
- "moduleResolution": "classic",
10
- "noEmitHelpers": false,
11
- "noUnusedLocals": false,
12
- "noUnusedParameters": false,
13
- "declaration": false,
14
- "allowJs": true,
15
- "allowUnreachableCode": true,
16
- "skipLibCheck": true,
17
- "jsx": "react",
18
- "jsxFactory": "React.createElement",
19
- "outFile": "./output/build.js",
20
- "lib": [
21
- "es2016",
22
- "dom"
23
- ],
24
- "baseUrl": ".",
25
- "typeRoots": [
26
- "./typings"
27
- ]
28
- },
29
- "include": [
30
- "src/**/*.ts",
31
- "src/**/*.tsx",
32
- "typings/*.d.ts"
33
- ],
34
- "exclude": [
35
- "output/**/*"
36
- ],
37
- "compileOnSave": true,
38
- "buildOnSave": false,
39
- "awesomeTypescriptLoaderOptions": {
40
- "forkChecker": true,
41
- "useWebpackText": true
42
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es6",
4
+ "module": "system",
5
+ "emitDecoratorMetadata": true,
6
+ "experimentalDecorators": true,
7
+ "allowSyntheticDefaultImports": true,
8
+ "sourceMap": true,
9
+ "moduleResolution": "classic",
10
+ "noEmitHelpers": false,
11
+ "noUnusedLocals": false,
12
+ "noUnusedParameters": false,
13
+ "declaration": false,
14
+ "allowJs": true,
15
+ "allowUnreachableCode": true,
16
+ "skipLibCheck": true,
17
+ "jsx": "react",
18
+ "jsxFactory": "React.createElement",
19
+ "outFile": "./output/build.js",
20
+ "lib": [
21
+ "es2016",
22
+ "dom"
23
+ ],
24
+ "baseUrl": ".",
25
+ "typeRoots": [
26
+ "./typings"
27
+ ]
28
+ },
29
+ "include": [
30
+ "src/**/*.ts",
31
+ "src/**/*.tsx",
32
+ "typings/*.d.ts"
33
+ ],
34
+ "exclude": [
35
+ "output/**/*"
36
+ ],
37
+ "compileOnSave": true,
38
+ "buildOnSave": false,
39
+ "awesomeTypescriptLoaderOptions": {
40
+ "forkChecker": true,
41
+ "useWebpackText": true
42
+ }
43
43
  }
@@ -1,67 +1,67 @@
1
- {
2
- "name": "gamelet-cli",
3
- "description": "Download project from code.gamelet.com, edit/test in vscode and sync back to server.",
4
- "version": "0.6.2",
5
- "license": "MIT",
6
- "repository": {
7
- "url": "https://github.com/haskasu/gamelet-cli"
8
- },
9
- "bin": {
10
- "gamelet": "build/src/index.js"
11
- },
12
- "author": {
13
- "name": "Haska Su",
14
- "email": "haskasu@gmail.com",
15
- "url": "https://haskasu.com"
16
- },
17
- "keywords": [
18
- "gamelet",
19
- "Haska Su"
20
- ],
21
- "files": [
22
- "assets",
23
- "build"
24
- ],
25
- "scripts": {
26
- "deploy": "npm run build && npm publish",
27
- "build": "run-s clean && run-p build:*",
28
- "build:main": "tsc -p tsconfig.json",
29
- "watch:main": "run-p \"build:main -- -w\"",
30
- "watch": "run-s clean build:main && run-p watch:*",
31
- "test": "node build/src/index.js",
32
- "clean": "trash build test"
33
- },
34
- "dependencies": {
35
- "axios": "^0.27.2",
36
- "chalk": "^5.2.0",
37
- "cli-alerts": "^1.2.2",
38
- "cli-handle-error": "^4.4.0",
39
- "cli-handle-unhandled": "^1.1.1",
40
- "cli-meow-help": "^2.0.2",
41
- "cli-progress": "^3.9.1",
42
- "cli-welcome": "^2.2.2",
43
- "cors": "^2.8.5",
44
- "debug": "^4.3.4",
45
- "express": "^4.18.2",
46
- "inquirer": "^8.2.0",
47
- "isbinaryfile": "^4.0.8",
48
- "istextorbinary": "^5.15.0",
49
- "jszip": "^3.7.1",
50
- "md5": "^2.3.0",
51
- "md5-file": "^5.0.0",
52
- "meow": "^9.0.0",
53
- "mkdirp": "^1.0.4",
54
- "node-diff3": "^3.1.0",
55
- "rimraf": "^3.0.2",
56
- "simple-git": "^3.19.0",
57
- "socket.io": "^2.5.0",
58
- "twig": "^1.16.0"
59
- },
60
- "devDependencies": {
61
- "@types/express": "^4.17.13",
62
- "@types/socket.io": "^2.1.2",
63
- "cpy": "^6.0.0",
64
- "npm-run-all": "^4.1.5",
65
- "typescript": "^3.9.6"
66
- }
67
- }
1
+ {
2
+ "name": "gamelet-cli",
3
+ "description": "Download project from code.gamelet.com, edit/test in vscode and sync back to server.",
4
+ "version": "0.6.3",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "url": "https://github.com/haskasu/gamelet-cli"
8
+ },
9
+ "bin": {
10
+ "gamelet": "build/src/index.js"
11
+ },
12
+ "author": {
13
+ "name": "Haska Su",
14
+ "email": "haskasu@gmail.com",
15
+ "url": "https://haskasu.com"
16
+ },
17
+ "keywords": [
18
+ "gamelet",
19
+ "Haska Su"
20
+ ],
21
+ "files": [
22
+ "assets",
23
+ "build"
24
+ ],
25
+ "scripts": {
26
+ "deploy": "npm run build && npm publish",
27
+ "build": "run-s clean && run-p build:*",
28
+ "build:main": "tsc -p tsconfig.json",
29
+ "watch:main": "run-p \"build:main -- -w\"",
30
+ "watch": "run-s clean build:main && run-p watch:*",
31
+ "test": "node build/src/index.js",
32
+ "clean": "npx rimraf build test"
33
+ },
34
+ "dependencies": {
35
+ "axios": "^0.27.2",
36
+ "chalk": "^5.2.0",
37
+ "cli-alerts": "^1.2.2",
38
+ "cli-handle-error": "^4.4.0",
39
+ "cli-handle-unhandled": "^1.1.1",
40
+ "cli-meow-help": "^2.0.2",
41
+ "cli-progress": "^3.9.1",
42
+ "cli-welcome": "^2.2.2",
43
+ "cors": "^2.8.5",
44
+ "debug": "^4.3.4",
45
+ "express": "^4.18.2",
46
+ "inquirer": "^8.2.0",
47
+ "isbinaryfile": "^4.0.8",
48
+ "istextorbinary": "^5.15.0",
49
+ "jszip": "^3.7.1",
50
+ "md5": "^2.3.0",
51
+ "md5-file": "^5.0.0",
52
+ "meow": "^9.0.0",
53
+ "mkdirp": "^1.0.4",
54
+ "node-diff3": "^3.1.0",
55
+ "rimraf": "^3.0.2",
56
+ "simple-git": "^3.19.0",
57
+ "socket.io": "^2.5.0",
58
+ "twig": "^1.16.0"
59
+ },
60
+ "devDependencies": {
61
+ "@types/express": "^4.17.13",
62
+ "@types/socket.io": "^2.1.2",
63
+ "cpy": "^6.0.0",
64
+ "npm-run-all": "^4.1.5",
65
+ "typescript": "^3.9.6"
66
+ }
67
+ }