peter před 5 roky
rodič
revize
094fb386db
11 změnil soubory, kde provedl 403 přidání a 239 odebrání
  1. 3
    0
      .gitignore
  2. 1
    0
      .npmignore
  3. 318
    91
      package-lock.json
  4. 13
    10
      package.json
  5. 1
    1
      src/Backend.ts
  6. 5
    1
      src/Frontend.ts
  7. 22
    42
      src/webpack.js
  8. 2
    2
      test/TestBackend.ts
  9. 2
    2
      test/TestFrontend.ts
  10. 23
    77
      test/webpack.js
  11. 13
    13
      tsconfig.json

+ 3
- 0
.gitignore Zobrazit soubor

@@ -6,4 +6,7 @@ src/**/*.d.ts
6 6
 test/**/*.js
7 7
 test/**/*.d.ts
8 8
 
9
+*.d.ts
10
+*.js
11
+
9 12
 lib

+ 1
- 0
.npmignore Zobrazit soubor

@@ -1,4 +1,5 @@
1 1
 src
2 2
 test
3
+js
3 4
 node_modules
4 5
 tsconfig.json

+ 318
- 91
package-lock.json Zobrazit soubor

@@ -62,12 +62,6 @@
62 62
       "integrity": "sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==",
63 63
       "dev": true
64 64
     },
65
-    "@types/semver": {
66
-      "version": "6.0.2",
67
-      "resolved": "https://registry.npmjs.org/@types/semver/-/semver-6.0.2.tgz",
68
-      "integrity": "sha512-G1Ggy7/9Nsa1Jt2yiBR2riEuyK2DFNnqow6R7cromXPMNynackRY1vqFTLz/gwnef1LHokbXThcPhqMRjUbkpQ==",
69
-      "dev": true
70
-    },
71 65
     "@types/serve-static": {
72 66
       "version": "1.13.3",
73 67
       "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.3.tgz",
@@ -722,6 +716,17 @@
722 716
         "ansi-styles": "^3.2.1",
723 717
         "escape-string-regexp": "^1.0.5",
724 718
         "supports-color": "^5.3.0"
719
+      },
720
+      "dependencies": {
721
+        "supports-color": {
722
+          "version": "5.5.0",
723
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
724
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
725
+          "dev": true,
726
+          "requires": {
727
+            "has-flag": "^3.0.0"
728
+          }
729
+        }
725 730
       }
726 731
     },
727 732
     "chokidar": {
@@ -953,6 +958,14 @@
953 958
         "semver": "^5.5.0",
954 959
         "shebang-command": "^1.2.0",
955 960
         "which": "^1.2.9"
961
+      },
962
+      "dependencies": {
963
+        "semver": {
964
+          "version": "5.7.1",
965
+          "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
966
+          "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
967
+          "dev": true
968
+        }
956 969
       }
957 970
     },
958 971
     "crypto-browserify": {
@@ -1383,23 +1396,24 @@
1383 1396
       }
1384 1397
     },
1385 1398
     "find-cache-dir": {
1386
-      "version": "2.1.0",
1387
-      "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
1388
-      "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==",
1399
+      "version": "3.0.0",
1400
+      "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.0.0.tgz",
1401
+      "integrity": "sha512-t7ulV1fmbxh5G9l/492O1p5+EBbr3uwpt6odhFTMc+nWyhmbloe+ja9BZ8pIBtqFWhOmCWVjx+pTW4zDkFoclw==",
1389 1402
       "dev": true,
1390 1403
       "requires": {
1391 1404
         "commondir": "^1.0.1",
1392
-        "make-dir": "^2.0.0",
1393
-        "pkg-dir": "^3.0.0"
1405
+        "make-dir": "^3.0.0",
1406
+        "pkg-dir": "^4.1.0"
1394 1407
       }
1395 1408
     },
1396 1409
     "find-up": {
1397
-      "version": "3.0.0",
1398
-      "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
1399
-      "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
1410
+      "version": "4.1.0",
1411
+      "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
1412
+      "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
1400 1413
       "dev": true,
1401 1414
       "requires": {
1402
-        "locate-path": "^3.0.0"
1415
+        "locate-path": "^5.0.0",
1416
+        "path-exists": "^4.0.0"
1403 1417
       }
1404 1418
     },
1405 1419
     "findup-sync": {
@@ -1449,6 +1463,11 @@
1449 1463
         "readable-stream": "^2.0.0"
1450 1464
       }
1451 1465
     },
1466
+    "fs": {
1467
+      "version": "0.0.1-security",
1468
+      "resolved": "https://registry.npmjs.org/fs/-/fs-0.0.1-security.tgz",
1469
+      "integrity": "sha1-invTcYa23d84E/I4WLV+yq9eQdQ="
1470
+    },
1452 1471
     "fs-write-stream-atomic": {
1453 1472
       "version": "1.0.10",
1454 1473
       "resolved": "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz",
@@ -2190,6 +2209,11 @@
2190 2209
         "parse-passwd": "^1.0.0"
2191 2210
       }
2192 2211
     },
2212
+    "http": {
2213
+      "version": "0.0.0",
2214
+      "resolved": "https://registry.npmjs.org/http/-/http-0.0.0.tgz",
2215
+      "integrity": "sha1-huYybSnF0Dnen6xYSkVon5KfT3I="
2216
+    },
2193 2217
     "https-browserify": {
2194 2218
       "version": "1.0.0",
2195 2219
       "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz",
@@ -2216,6 +2240,51 @@
2216 2240
       "requires": {
2217 2241
         "pkg-dir": "^3.0.0",
2218 2242
         "resolve-cwd": "^2.0.0"
2243
+      },
2244
+      "dependencies": {
2245
+        "find-up": {
2246
+          "version": "3.0.0",
2247
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
2248
+          "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
2249
+          "dev": true,
2250
+          "requires": {
2251
+            "locate-path": "^3.0.0"
2252
+          }
2253
+        },
2254
+        "locate-path": {
2255
+          "version": "3.0.0",
2256
+          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
2257
+          "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
2258
+          "dev": true,
2259
+          "requires": {
2260
+            "p-locate": "^3.0.0",
2261
+            "path-exists": "^3.0.0"
2262
+          }
2263
+        },
2264
+        "p-locate": {
2265
+          "version": "3.0.0",
2266
+          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
2267
+          "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
2268
+          "dev": true,
2269
+          "requires": {
2270
+            "p-limit": "^2.0.0"
2271
+          }
2272
+        },
2273
+        "path-exists": {
2274
+          "version": "3.0.0",
2275
+          "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
2276
+          "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
2277
+          "dev": true
2278
+        },
2279
+        "pkg-dir": {
2280
+          "version": "3.0.0",
2281
+          "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz",
2282
+          "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==",
2283
+          "dev": true,
2284
+          "requires": {
2285
+            "find-up": "^3.0.0"
2286
+          }
2287
+        }
2219 2288
       }
2220 2289
     },
2221 2290
     "imurmurhash": {
@@ -2241,10 +2310,9 @@
2241 2310
       }
2242 2311
     },
2243 2312
     "inherits": {
2244
-      "version": "2.0.4",
2245
-      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
2246
-      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
2247
-      "dev": true
2313
+      "version": "2.0.3",
2314
+      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
2315
+      "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4="
2248 2316
     },
2249 2317
     "ini": {
2250 2318
       "version": "1.3.5",
@@ -2430,6 +2498,16 @@
2430 2498
       "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
2431 2499
       "dev": true
2432 2500
     },
2501
+    "jest-worker": {
2502
+      "version": "24.9.0",
2503
+      "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-24.9.0.tgz",
2504
+      "integrity": "sha512-51PE4haMSXcHohnSMdM42anbvZANYTqMrr52tVKPqqsPJMzoP6FYYDVqahX/HrAoKEKz3uUPzSvKs9A3qR4iVw==",
2505
+      "dev": true,
2506
+      "requires": {
2507
+        "merge-stream": "^2.0.0",
2508
+        "supports-color": "^6.1.0"
2509
+      }
2510
+    },
2433 2511
     "json-parse-better-errors": {
2434 2512
       "version": "1.0.2",
2435 2513
       "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
@@ -2492,13 +2570,12 @@
2492 2570
       }
2493 2571
     },
2494 2572
     "locate-path": {
2495
-      "version": "3.0.0",
2496
-      "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
2497
-      "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
2573
+      "version": "5.0.0",
2574
+      "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
2575
+      "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
2498 2576
       "dev": true,
2499 2577
       "requires": {
2500
-        "p-locate": "^3.0.0",
2501
-        "path-exists": "^3.0.0"
2578
+        "p-locate": "^4.1.0"
2502 2579
       }
2503 2580
     },
2504 2581
     "lru-cache": {
@@ -2511,13 +2588,12 @@
2511 2588
       }
2512 2589
     },
2513 2590
     "make-dir": {
2514
-      "version": "2.1.0",
2515
-      "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
2516
-      "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
2591
+      "version": "3.0.0",
2592
+      "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz",
2593
+      "integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==",
2517 2594
       "dev": true,
2518 2595
       "requires": {
2519
-        "pify": "^4.0.1",
2520
-        "semver": "^5.6.0"
2596
+        "semver": "^6.0.0"
2521 2597
       }
2522 2598
     },
2523 2599
     "mamacro": {
@@ -2582,6 +2658,12 @@
2582 2658
         "readable-stream": "^2.0.1"
2583 2659
       }
2584 2660
     },
2661
+    "merge-stream": {
2662
+      "version": "2.0.0",
2663
+      "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz",
2664
+      "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==",
2665
+      "dev": true
2666
+    },
2585 2667
     "micromatch": {
2586 2668
       "version": "3.1.10",
2587 2669
       "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
@@ -2788,6 +2870,15 @@
2788 2870
           "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",
2789 2871
           "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=",
2790 2872
           "dev": true
2873
+        },
2874
+        "util": {
2875
+          "version": "0.11.1",
2876
+          "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz",
2877
+          "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==",
2878
+          "dev": true,
2879
+          "requires": {
2880
+            "inherits": "2.0.3"
2881
+          }
2791 2882
         }
2792 2883
       }
2793 2884
     },
@@ -2915,12 +3006,12 @@
2915 3006
       }
2916 3007
     },
2917 3008
     "p-locate": {
2918
-      "version": "3.0.0",
2919
-      "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
2920
-      "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
3009
+      "version": "4.1.0",
3010
+      "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
3011
+      "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
2921 3012
       "dev": true,
2922 3013
       "requires": {
2923
-        "p-limit": "^2.0.0"
3014
+        "p-limit": "^2.2.0"
2924 3015
       }
2925 3016
     },
2926 3017
     "p-try": {
@@ -2972,6 +3063,15 @@
2972 3063
       "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=",
2973 3064
       "dev": true
2974 3065
     },
3066
+    "path": {
3067
+      "version": "0.12.7",
3068
+      "resolved": "https://registry.npmjs.org/path/-/path-0.12.7.tgz",
3069
+      "integrity": "sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=",
3070
+      "requires": {
3071
+        "process": "^0.11.1",
3072
+        "util": "^0.10.3"
3073
+      }
3074
+    },
2975 3075
     "path-browserify": {
2976 3076
       "version": "0.0.1",
2977 3077
       "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz",
@@ -2985,9 +3085,9 @@
2985 3085
       "dev": true
2986 3086
     },
2987 3087
     "path-exists": {
2988
-      "version": "3.0.0",
2989
-      "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
2990
-      "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
3088
+      "version": "4.0.0",
3089
+      "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
3090
+      "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
2991 3091
       "dev": true
2992 3092
     },
2993 3093
     "path-is-absolute": {
@@ -3022,12 +3122,12 @@
3022 3122
       "dev": true
3023 3123
     },
3024 3124
     "pkg-dir": {
3025
-      "version": "3.0.0",
3026
-      "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz",
3027
-      "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==",
3125
+      "version": "4.2.0",
3126
+      "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",
3127
+      "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==",
3028 3128
       "dev": true,
3029 3129
       "requires": {
3030
-        "find-up": "^3.0.0"
3130
+        "find-up": "^4.0.0"
3031 3131
       }
3032 3132
     },
3033 3133
     "posix-character-classes": {
@@ -3039,8 +3139,7 @@
3039 3139
     "process": {
3040 3140
       "version": "0.11.10",
3041 3141
       "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz",
3042
-      "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=",
3043
-      "dev": true
3142
+      "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI="
3044 3143
     },
3045 3144
     "process-nextick-args": {
3046 3145
       "version": "2.0.1",
@@ -3304,26 +3403,25 @@
3304 3403
       }
3305 3404
     },
3306 3405
     "schema-utils": {
3307
-      "version": "1.0.0",
3308
-      "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz",
3309
-      "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==",
3406
+      "version": "2.2.0",
3407
+      "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.2.0.tgz",
3408
+      "integrity": "sha512-5EwsCNhfFTZvUreQhx/4vVQpJ/lnCAkgoIHLhSpp4ZirE+4hzFvdJi0FMub6hxbFVBJYSpeVVmon+2e7uEGRrA==",
3310 3409
       "dev": true,
3311 3410
       "requires": {
3312
-        "ajv": "^6.1.0",
3313
-        "ajv-errors": "^1.0.0",
3314
-        "ajv-keywords": "^3.1.0"
3411
+        "ajv": "^6.10.2",
3412
+        "ajv-keywords": "^3.4.1"
3315 3413
       }
3316 3414
     },
3317 3415
     "semver": {
3318
-      "version": "5.7.1",
3319
-      "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
3320
-      "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
3416
+      "version": "6.3.0",
3417
+      "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
3418
+      "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
3321 3419
       "dev": true
3322 3420
     },
3323 3421
     "serialize-javascript": {
3324
-      "version": "1.9.1",
3325
-      "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz",
3326
-      "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==",
3422
+      "version": "2.1.0",
3423
+      "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-2.1.0.tgz",
3424
+      "integrity": "sha512-a/mxFfU00QT88umAJQsNWOnUKckhNCqOl028N48e7wFmo2/EHpTo9Wso+iJJCMrQnmFvcjto5RJdAHEvVhcyUQ==",
3327 3425
       "dev": true
3328 3426
     },
3329 3427
     "set-blocking": {
@@ -3660,9 +3758,9 @@
3660 3758
       "dev": true
3661 3759
     },
3662 3760
     "supports-color": {
3663
-      "version": "5.5.0",
3664
-      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
3665
-      "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
3761
+      "version": "6.1.0",
3762
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
3763
+      "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
3666 3764
       "dev": true,
3667 3765
       "requires": {
3668 3766
         "has-flag": "^3.0.0"
@@ -3686,20 +3784,19 @@
3686 3784
       }
3687 3785
     },
3688 3786
     "terser-webpack-plugin": {
3689
-      "version": "1.4.1",
3690
-      "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz",
3691
-      "integrity": "sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg==",
3787
+      "version": "2.1.0",
3788
+      "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-2.1.0.tgz",
3789
+      "integrity": "sha512-sZs43FVvNTqHp5hTkTSIC3XKB7rEC2FCbx9Uv0rM7D4iJsbTA1Q84tiaRYSSKSojBe6LCONX44RF73AEHGasvw==",
3692 3790
       "dev": true,
3693 3791
       "requires": {
3694
-        "cacache": "^12.0.2",
3695
-        "find-cache-dir": "^2.1.0",
3696
-        "is-wsl": "^1.1.0",
3697
-        "schema-utils": "^1.0.0",
3698
-        "serialize-javascript": "^1.7.0",
3792
+        "cacache": "^12.0.3",
3793
+        "find-cache-dir": "^3.0.0",
3794
+        "jest-worker": "^24.9.0",
3795
+        "schema-utils": "^2.2.0",
3796
+        "serialize-javascript": "^2.1.0",
3699 3797
         "source-map": "^0.6.1",
3700
-        "terser": "^4.1.2",
3701
-        "webpack-sources": "^1.4.0",
3702
-        "worker-farm": "^1.7.0"
3798
+        "terser": "^4.3.1",
3799
+        "webpack-sources": "^1.4.3"
3703 3800
       }
3704 3801
     },
3705 3802
     "through2": {
@@ -3780,6 +3877,14 @@
3780 3877
         "loader-utils": "^1.0.2",
3781 3878
         "micromatch": "^3.1.4",
3782 3879
         "semver": "^5.0.1"
3880
+      },
3881
+      "dependencies": {
3882
+        "semver": {
3883
+          "version": "5.7.1",
3884
+          "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
3885
+          "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
3886
+          "dev": true
3887
+        }
3783 3888
       }
3784 3889
     },
3785 3890
     "tslib": {
@@ -3922,20 +4027,11 @@
3922 4027
       "dev": true
3923 4028
     },
3924 4029
     "util": {
3925
-      "version": "0.11.1",
3926
-      "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz",
3927
-      "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==",
3928
-      "dev": true,
4030
+      "version": "0.10.4",
4031
+      "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz",
4032
+      "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==",
3929 4033
       "requires": {
3930 4034
         "inherits": "2.0.3"
3931
-      },
3932
-      "dependencies": {
3933
-        "inherits": {
3934
-          "version": "2.0.3",
3935
-          "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz",
3936
-          "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=",
3937
-          "dev": true
3938
-        }
3939 4035
       }
3940 4036
     },
3941 4037
     "util-deprecate": {
@@ -4001,6 +4097,112 @@
4001 4097
         "terser-webpack-plugin": "^1.4.1",
4002 4098
         "watchpack": "^1.6.0",
4003 4099
         "webpack-sources": "^1.4.1"
4100
+      },
4101
+      "dependencies": {
4102
+        "find-cache-dir": {
4103
+          "version": "2.1.0",
4104
+          "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz",
4105
+          "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==",
4106
+          "dev": true,
4107
+          "requires": {
4108
+            "commondir": "^1.0.1",
4109
+            "make-dir": "^2.0.0",
4110
+            "pkg-dir": "^3.0.0"
4111
+          }
4112
+        },
4113
+        "find-up": {
4114
+          "version": "3.0.0",
4115
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
4116
+          "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
4117
+          "dev": true,
4118
+          "requires": {
4119
+            "locate-path": "^3.0.0"
4120
+          }
4121
+        },
4122
+        "locate-path": {
4123
+          "version": "3.0.0",
4124
+          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
4125
+          "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
4126
+          "dev": true,
4127
+          "requires": {
4128
+            "p-locate": "^3.0.0",
4129
+            "path-exists": "^3.0.0"
4130
+          }
4131
+        },
4132
+        "make-dir": {
4133
+          "version": "2.1.0",
4134
+          "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
4135
+          "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
4136
+          "dev": true,
4137
+          "requires": {
4138
+            "pify": "^4.0.1",
4139
+            "semver": "^5.6.0"
4140
+          }
4141
+        },
4142
+        "p-locate": {
4143
+          "version": "3.0.0",
4144
+          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
4145
+          "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
4146
+          "dev": true,
4147
+          "requires": {
4148
+            "p-limit": "^2.0.0"
4149
+          }
4150
+        },
4151
+        "path-exists": {
4152
+          "version": "3.0.0",
4153
+          "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
4154
+          "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
4155
+          "dev": true
4156
+        },
4157
+        "pkg-dir": {
4158
+          "version": "3.0.0",
4159
+          "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz",
4160
+          "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==",
4161
+          "dev": true,
4162
+          "requires": {
4163
+            "find-up": "^3.0.0"
4164
+          }
4165
+        },
4166
+        "schema-utils": {
4167
+          "version": "1.0.0",
4168
+          "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz",
4169
+          "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==",
4170
+          "dev": true,
4171
+          "requires": {
4172
+            "ajv": "^6.1.0",
4173
+            "ajv-errors": "^1.0.0",
4174
+            "ajv-keywords": "^3.1.0"
4175
+          }
4176
+        },
4177
+        "semver": {
4178
+          "version": "5.7.1",
4179
+          "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
4180
+          "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
4181
+          "dev": true
4182
+        },
4183
+        "serialize-javascript": {
4184
+          "version": "1.9.1",
4185
+          "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-1.9.1.tgz",
4186
+          "integrity": "sha512-0Vb/54WJ6k5v8sSWN09S0ora+Hnr+cX40r9F170nT+mSkaxltoE/7R3OrIdBSUv1OoiobH1QoWQbCnAO+e8J1A==",
4187
+          "dev": true
4188
+        },
4189
+        "terser-webpack-plugin": {
4190
+          "version": "1.4.1",
4191
+          "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.4.1.tgz",
4192
+          "integrity": "sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg==",
4193
+          "dev": true,
4194
+          "requires": {
4195
+            "cacache": "^12.0.2",
4196
+            "find-cache-dir": "^2.1.0",
4197
+            "is-wsl": "^1.1.0",
4198
+            "schema-utils": "^1.0.0",
4199
+            "serialize-javascript": "^1.7.0",
4200
+            "source-map": "^0.6.1",
4201
+            "terser": "^4.1.2",
4202
+            "webpack-sources": "^1.4.0",
4203
+            "worker-farm": "^1.7.0"
4204
+          }
4205
+        }
4004 4206
       }
4005 4207
     },
4006 4208
     "webpack-cli": {
@@ -4020,17 +4222,6 @@
4020 4222
         "supports-color": "6.1.0",
4021 4223
         "v8-compile-cache": "2.0.3",
4022 4224
         "yargs": "13.2.4"
4023
-      },
4024
-      "dependencies": {
4025
-        "supports-color": {
4026
-          "version": "6.1.0",
4027
-          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz",
4028
-          "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==",
4029
-          "dev": true,
4030
-          "requires": {
4031
-            "has-flag": "^3.0.0"
4032
-          }
4033
-        }
4034 4225
       }
4035 4226
     },
4036 4227
     "webpack-sources": {
@@ -4119,6 +4310,42 @@
4119 4310
         "which-module": "^2.0.0",
4120 4311
         "y18n": "^4.0.0",
4121 4312
         "yargs-parser": "^13.1.0"
4313
+      },
4314
+      "dependencies": {
4315
+        "find-up": {
4316
+          "version": "3.0.0",
4317
+          "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
4318
+          "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
4319
+          "dev": true,
4320
+          "requires": {
4321
+            "locate-path": "^3.0.0"
4322
+          }
4323
+        },
4324
+        "locate-path": {
4325
+          "version": "3.0.0",
4326
+          "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
4327
+          "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
4328
+          "dev": true,
4329
+          "requires": {
4330
+            "p-locate": "^3.0.0",
4331
+            "path-exists": "^3.0.0"
4332
+          }
4333
+        },
4334
+        "p-locate": {
4335
+          "version": "3.0.0",
4336
+          "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
4337
+          "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
4338
+          "dev": true,
4339
+          "requires": {
4340
+            "p-limit": "^2.0.0"
4341
+          }
4342
+        },
4343
+        "path-exists": {
4344
+          "version": "3.0.0",
4345
+          "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
4346
+          "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
4347
+          "dev": true
4348
+        }
4122 4349
       }
4123 4350
     },
4124 4351
     "yargs-parser": {

+ 13
- 10
package.json Zobrazit soubor

@@ -1,32 +1,35 @@
1 1
 {
2 2
   "name": "rpclibrary",
3
-  "version": "1.0.1",
3
+  "version": "1.0.2",
4 4
   "description": "",
5 5
   "scripts": {
6 6
     "tsc": "tsc",
7 7
     "webpack": "webpack",
8
-    "build-lib": "npm run webpack --config ./src/webpack.js",
9
-    "build-test": "npm run webpack --config ./test/webpack.js",
10
-    "build": "npm run clean && npm run tsc && npm run build-lib && npm run build-test",
11
-    "clean": "rm -rf lib ./*.js ./*.d.ts"
8
+    "build-lib": "webpack --config ./src/webpack.js",
9
+    "build-test": "webpack --config ./test/webpack.js",
10
+    "build": "npm run clean && npm run build-lib && npm run build-test && mv js/**/*.d.ts .",
11
+    "clean": "rm -rf ./*.js ./*.d.ts js"
12 12
   },
13 13
   "author": "",
14 14
   "license": "ISC",
15 15
   "devDependencies": {
16 16
     "@types/express": "^4.17.0",
17 17
     "@types/node": "^11.13.19",
18
-    "@types/semver": "^6.0.1",
19
-    "terser-webpack-plugin": "^1.4.1",
20 18
     "ts-loader": "^5.3.3",
21 19
     "typescript": "^3.5.3",
22
-    "webpack": "^4.39.2",
23
-    "webpack-cli": "^3.3.5"
20
+    "webpack": "^4.40.2",
21
+    "webpack-cli": "^3.3.9",
22
+    "terser-webpack-plugin": "^2.1.0"
24 23
   },
25 24
   "dependencies": {
26 25
     "bsock": "^0.1.9",
26
+    "fs": "0.0.1-security",
27
+    "http": "0.0.0",
28
+    "path": "^0.12.7",
27 29
     "uuid": "^3.3.3"
28 30
   },
29 31
   "files": [
30
-    "lib/*.js"
32
+    "*.js",
33
+    "*.d.ts"
31 34
   ]
32 35
 }

+ 1
- 1
src/Backend.ts Zobrazit soubor

@@ -15,7 +15,7 @@ export {
15 15
     R as Responses
16 16
 }
17 17
 
18
-export class Backend{
18
+export class Server{
19 19
     private ws = http.createServer()
20 20
     private io = bsock.createServer()
21 21
 

+ 5
- 1
src/Frontend.ts Zobrazit soubor

@@ -3,11 +3,15 @@
3 3
 var bsock = require('bsock')
4 4
 
5 5
 import * as T from './Types'; 
6
+import * as U from './Utils'; 
6 7
 import * as I from './Interfaces';
8
+import * as R from './Responses';
7 9
 
8 10
 export { 
9 11
     T as Types, 
12
+    U as Utils, 
10 13
     I as Interfaces,
14
+    R as Responses
11 15
 }
12 16
 
13 17
 
@@ -16,7 +20,7 @@ function stripAfterEquals(str:string){
16 20
     return str.split("=")[0]
17 21
 }
18 22
 
19
-export class Frontend implements I.Socket{
23
+export class Client implements I.Socket{
20 24
 
21 25
     private socket: I.Socket
22 26
     constructor(public port:number, private server: string, private tls: boolean = false){

+ 22
- 42
src/webpack.js Zobrazit soubor

@@ -1,13 +1,11 @@
1 1
 const path = require('path');
2
-const TerserPlugin = require('terser-webpack-plugin');
3
-
4 2
 
5 3
 const frontendConf = {
6 4
   mode: 'production',
7 5
   target: "web",
8
-  entry: path.resolve(__dirname, 'src', 'Frontend.ts'),
6
+  entry: path.resolve(__dirname, 'Frontend.ts'),
9 7
   output: {
10
-      path: path.resolve(__dirname, 'lib'),
8
+      path: path.resolve(__dirname, '..'),
11 9
       filename: "Frontend.js",
12 10
       libraryTarget: 'commonjs',
13 11
   },
@@ -21,47 +19,29 @@ const frontendConf = {
21 19
   },
22 20
   optimization: {
23 21
     minimize: true,
24
-    minimizer: [
25
-      new TerserPlugin({
26
-        parallel: true,
27
-        exclude: [
28
-          /\.\/(.*)\/.ts/,
29
-          /\.\/(.*).ts/,
30
-        ],
31
-      }),
32
-    ],
33 22
   },
34 23
 }
35 24
 
36 25
 const backendConf = {
37
-mode: 'production',
38
-target: "node",
39
-entry: path.resolve(__dirname, 'src', 'Backend.ts'),
40
-output: {
41
-    path: path.resolve(__dirname, 'lib'),
42
-    filename: "Backend.js",
43
-    libraryTarget: 'commonjs',
44
-},
45
-module: {
46
-  rules: [
47
-    { test: /\.ts?$/, loader: "ts-loader" }
48
-  ]
49
-},
50
-resolve: {
51
-  extensions: [".ts", ".tsx", ".js"]
52
-},
53
-optimization: {
54
-  minimize: true,
55
-  minimizer: [
56
-    new TerserPlugin({
57
-      parallel: true,
58
-      exclude: [
59
-        /\.\/(.*)\/.ts/,
60
-        /\.\/(.*).ts/,
61
-      ],
62
-    }),
63
-  ],
64
-},
26
+  mode: 'production',
27
+  target: "node",
28
+  entry: path.resolve(__dirname, 'Backend.ts'),
29
+  output: {
30
+      path: path.resolve(__dirname, '..'),
31
+      filename: "Backend.js",
32
+      libraryTarget: 'commonjs'
33
+  },
34
+  module: {
35
+    rules: [
36
+      { test: /\.ts?$/, loader: "ts-loader" }
37
+    ]
38
+  },
39
+  resolve: {
40
+    extensions: [".ts", ".tsx", ".js"]
41
+  },
42
+  optimization: {
43
+    minimize: false,
44
+  },
65 45
 }
66 46
 
67
-module.exports = [frontendConf, backendConf]
47
+module.exports =  [backendConf, frontendConf]

+ 2
- 2
test/TestBackend.ts Zobrazit soubor

@@ -1,6 +1,6 @@
1
-import { Backend } from '../src/Backend'
1
+import { Server } from '../src/Backend'
2 2
 
3
-const testServer = new Backend(20000, [{
3
+const testServer = new Server(20000, [{
4 4
     name: "HelloWorldRPCGroup",
5 5
     publicRPCs: () => [],
6 6
     localRPCs: () => [{

+ 2
- 2
test/TestFrontend.ts Zobrazit soubor

@@ -1,6 +1,6 @@
1
-import { Frontend } from '../src/Frontend'
1
+import { Client } from '../src/Frontend'
2 2
 
3
-const testClient = new Frontend(20000, 'localhost')
3
+const testClient = new Client(20000, 'localhost')
4 4
 testClient.connect().then(_ => {
5 5
     testClient.info().then(console.log)
6 6
     testClient["HelloWorldRPCGroup"].echo("x").then(console.log)

+ 23
- 77
test/webpack.js Zobrazit soubor

@@ -1,12 +1,12 @@
1 1
 const path = require('path');
2
-const TerserPlugin = require('terser-webpack-plugin');
3
-
4 2
 
5 3
 const frontendConf = {
6 4
   mode: 'production',
7 5
   target: "web",
6
+  entry: path.resolve(__dirname, 'TestFrontend.ts'),
8 7
   output: {
9
-      path: path.resolve(__dirname, 'lib'),
8
+      path: path.resolve(__dirname, '..'),
9
+      filename: "TestFrontend.js",
10 10
       libraryTarget: 'commonjs',
11 11
   },
12 12
   module: {
@@ -19,83 +19,29 @@ const frontendConf = {
19 19
   },
20 20
   optimization: {
21 21
     minimize: true,
22
-    minimizer: [
23
-      new TerserPlugin({
24
-        parallel: true,
25
-        exclude: [
26
-          /\.\/(.*)\/.ts/,
27
-          /\.\/(.*).ts/,
28
-        ],
29
-      }),
30
-    ],
31 22
   },
32 23
 }
33 24
 
34 25
 const backendConf = {
35
-mode: 'production',
36
-target: "node",
37
-output: {
38
-    path: path.resolve(__dirname, 'lib'),
39
-    libraryTarget: 'commonjs',
40
-},
41
-module: {
42
-  rules: [
43
-    { test: /\.ts?$/, loader: "ts-loader" }
44
-  ]
45
-},
46
-resolve: {
47
-  extensions: [".ts", ".tsx", ".js"]
48
-},
49
-optimization: {
50
-  minimize: true,
51
-  minimizer: [
52
-    new TerserPlugin({
53
-      parallel: true,
54
-      exclude: [
55
-        /\.\/(.*)\/.ts/,
56
-        /\.\/(.*).ts/,
57
-      ],
58
-    }),
59
-  ],
60
-},
61
-}
62
-
63
-const clientConf = {
64
-  ...frontendConf, 
65
-  ...{
66
-    entry: path.resolve(__dirname, 'src', 'Client.ts'),
67
-    output: {
68
-      filename: 'Frontend.js',
69
-    }
70
-  }
71
-}
72
-const clientTestConf = {
73
-  ...frontendConf, 
74
-  ...{
75
-    entry: path.resolve(__dirname, 'test', 'TestClient.ts'),
76
-    output: {
77
-      filename: 'TestFrontend.js',
78
-    }
79
-  } 
80
-}
81
-
82
-const serverConf = {
83
-  ...backendConf, 
84
-  ...{
85
-    entry: path.resolve(__dirname, 'src', 'Server.ts'),
86
-    output: {
87
-      filename: 'Backend.js',
88
-    }
89
-  }
90
-}
91
-const serverTestConf = {
92
-  ...backendConf, 
93
-  ...{
94
-    entry: path.resolve(__dirname, 'test', 'TestServer.ts'),
95
-    output: {
96
-      filename: 'TestBackend.js',
97
-    }
98
-  } 
26
+  mode: 'production',
27
+  target: "node",
28
+  entry: path.resolve(__dirname, 'TestBackend.ts'),
29
+  output: {
30
+      path: path.resolve(__dirname, '..'),
31
+      filename: "TestBackend.js",
32
+      libraryTarget: 'commonjs',
33
+  },
34
+  module: {
35
+    rules: [
36
+      { test: /\.ts?$/, loader: "ts-loader" }
37
+    ]
38
+  },
39
+  resolve: {
40
+    extensions: [".ts", ".tsx", ".js"]
41
+  },
42
+  optimization: {
43
+    minimize: false,
44
+  },
99 45
 }
100 46
 
101
-module.exports = [clientConf, clientTestConf, serverConf, serverTestConf]
47
+module.exports =  [backendConf, frontendConf]

+ 13
- 13
tsconfig.json Zobrazit soubor

@@ -1,14 +1,14 @@
1 1
 {
2
-  "compilerOptions": {
3
-    "strictPropertyInitialization": false,
4
-    "noImplicitAny": false,
5
-    "target": "ESnext",
6
-    "module": "commonjs",
7
-    "declaration": true,
8
-    "outDir": "./lib",
9
-    "strict": true,
10
-    "experimentalDecorators": true
11
-  },
12
-  "include": ["src/**/*.ts", "test/**/*.ts"],
13
-  "exclude": ["node_modules"],
14
-}
2
+    "compilerOptions": {
3
+      "strictPropertyInitialization": false,
4
+      "noImplicitAny": false,
5
+      "target": "ESnext",
6
+      "module": "commonjs",
7
+      "declaration": true,
8
+      "outDir": "./js",
9
+      "strict": true,
10
+      "experimentalDecorators": true
11
+    },
12
+    "include": ["src/**/*.ts", "test/**/*.ts"],
13
+    "exclude": ["node_modules"]
14
+  }

Načítá se…
Zrušit
Uložit