@finsemble/finsemble-electron-adapter 6.2.0 → 6.3.0-beta.20211008

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.
@@ -0,0 +1,9 @@
1
+ // @ts-nocheck
2
+ require("../e2o_view.ts");
3
+ globalThis.grpc = require("@grpc/grpc-js");
4
+ globalThis.grpcProtoLoader = require("@grpc/proto-loader");
5
+
6
+ if (globalThis.e2o) {
7
+ globalThis.e2o.grpc = globalThis.grpc;
8
+ globalThis.e2o.grpcProtoLoader = globalThis.grpcProtoLoader;
9
+ }
package/exports.js CHANGED
@@ -6,4 +6,5 @@
6
6
  * the word "exports" on to the end: `require("@finsemble/finsemble-electron-apapter/exports")`
7
7
  */
8
8
 
9
- module.exports = require("./dist/exports");
9
+ const fea = require("./dist/exports").default
10
+ module.exports = fea
@@ -444,6 +444,37 @@ function generateEnumInterface(formatter, enumType, options, nameOverride) {
444
444
  formatter.unindent();
445
445
  formatter.writeLine('}');
446
446
  }
447
+ /**
448
+ * This is a list of methods that are exist in the generic Client class in the
449
+ * gRPC libraries. TypeScript has a problem with methods in subclasses with the
450
+ * same names as methods in the superclass, but with mismatched APIs. So, we
451
+ * avoid generating methods with these names in the service client interfaces.
452
+ * We always generate two service client methods per service method: one camel
453
+ * cased, and one with the original casing. So we will still generate one
454
+ * service client method for any conflicting name.
455
+ *
456
+ * Technically, at runtime conflicting name in the service client method
457
+ * actually shadows the original method, but TypeScript does not have a good
458
+ * way to represent that. So this change is not 100% accurate, but it gets the
459
+ * generated code to compile.
460
+ *
461
+ * This is just a list of the methods in the Client class definitions in
462
+ * grpc@1.24.11 and @grpc/grpc-js@1.4.0.
463
+ */
464
+ const CLIENT_RESERVED_METHOD_NAMES = new Set([
465
+ 'close',
466
+ 'getChannel',
467
+ 'waitForReady',
468
+ 'makeUnaryRequest',
469
+ 'makeClientStreamRequest',
470
+ 'makeServerStreamRequest',
471
+ 'makeBidiStreamRequest',
472
+ 'resolveCallInterceptors',
473
+ /* These methods are private, but TypeScript is not happy with overriding even
474
+ * private methods with mismatched APIs. */
475
+ 'checkOptionalUnaryResponseArguments',
476
+ 'checkMetadataAndOptions'
477
+ ]);
447
478
  function generateServiceClientInterface(formatter, serviceType, options) {
448
479
  if (options.includeComments) {
449
480
  formatComment(formatter, serviceType.comment);
@@ -453,6 +484,9 @@ function generateServiceClientInterface(formatter, serviceType, options) {
453
484
  for (const methodName of Object.keys(serviceType.methods).sort()) {
454
485
  const method = serviceType.methods[methodName];
455
486
  for (const name of [methodName, camelCase(methodName)]) {
487
+ if (CLIENT_RESERVED_METHOD_NAMES.has(name)) {
488
+ continue;
489
+ }
456
490
  if (options.includeComments) {
457
491
  formatComment(formatter, method.comment);
458
492
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grpc/proto-loader",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "author": "Google Inc.",
5
5
  "contributors": [
6
6
  {
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@finsemble/finsemble-electron-adapter",
3
3
  "productName": "finsemble-electron-adapter",
4
4
  "description": "Adapter for running finsemble on electron",
5
- "version": "6.2.0",
5
+ "version": "6.3.0-beta.20211008",
6
6
  "main": "dist/app.js",
7
7
  "types": "types/exports.d.ts",
8
8
  "files": [
@@ -20,7 +20,7 @@
20
20
  "obfuscate:dev": "set obfuscate=true&& set NODE_ENV=development&& gulp buildE2O",
21
21
  "prod": "set NODE_ENV=production&& gulp buildE2O",
22
22
  "startbrk": "---need to re-write this---gulp dev:noLaunch --gulpfile=./finsemble-seed/gulpfile.js & set ELECTRON_DEV=true && electron dist/app.js --inspect-brk=5858 --remote-debugging-port=9090 --manifest http://localhost:3375/configs/application/manifest-local.json",
23
- "test": "npx electron-mocha --require ./babel-register.js \"src/**/*.spec.js\" --timeout 10000",
23
+ "test": "npx electron-mocha --full-trace --require ./babel-register.js --require esm \"src/**/*.spec.ts\" --timeout 10000",
24
24
  "test-coverage": "nyc yarn test && nyc merge .nyc_output ../../.nyc_output/electron.json"
25
25
  },
26
26
  "build": {
@@ -38,28 +38,39 @@
38
38
  "author": "Cosaic",
39
39
  "license": "SEE LICENSE IN LICENSE",
40
40
  "dependencies": {
41
+ "@electron/remote": "^2.0.1",
41
42
  "@grpc/grpc-js": "1.3.7",
42
- "@grpc/proto-loader": "0.6.4",
43
- "electron": "13.2.1",
43
+ "@grpc/proto-loader": "0.6.5",
44
+ "@types/async": "^3.2.8",
45
+ "@types/electron-installer-dmg": "^3.0.0",
46
+ "@types/lodash": "^4.14.175",
47
+ "@types/lodash.get": "^4.4.6",
48
+ "@types/mkdirp": "^1.0.2",
49
+ "@types/unzipper": "^0.10.4",
50
+ "@types/uuid": "^8.3.1",
51
+ "electron": "13.3.0",
44
52
  "electron-installer-dmg": "3.0.0",
45
- "electron-packager": "15.3.0",
53
+ "electron-packager": "15.4.0",
46
54
  "electron-winstaller": "5.0.0"
47
55
  },
48
56
  "devDependencies": {
49
- "@babel/core": "7.15.0",
57
+ "@babel/core": "7.15.8",
50
58
  "@babel/plugin-proposal-class-properties": "7.14.5",
51
- "@babel/preset-env": "7.15.0",
59
+ "@babel/preset-env": "7.15.6",
52
60
  "@babel/preset-typescript": "7.15.0",
53
61
  "@babel/register": "7.15.3",
54
62
  "@types/archiver": "^5.1.0",
63
+ "@types/chai-http": "^4.2.0",
55
64
  "@types/deepmerge": "^2.2.0",
56
65
  "@types/express": "^4.17.11",
57
66
  "@types/express-fileupload": "^1.1.6",
58
67
  "@types/fs-extra": "^9.0.6",
59
68
  "@types/minimist": "^1.2.1",
69
+ "@types/mocha": "^9.0.0",
60
70
  "@types/node": "^14.14.22",
71
+ "@types/sinon": "^10.0.4",
61
72
  "@types/webpack": "^5.28.0",
62
- "@types/ws": "7.4.7",
73
+ "@types/ws": "8.2.0",
63
74
  "add-filename-increment": "^1.0.0",
64
75
  "archiver": "^5.2.0",
65
76
  "async": "3.2.1",
@@ -74,9 +85,10 @@
74
85
  "electron-mocha": "10.1.0",
75
86
  "eslint": "7.32.0",
76
87
  "eslint-plugin-import": "2.24.2",
88
+ "esm": "^3.2.25",
77
89
  "express": "^4.17.1",
78
90
  "express-fileupload": "^1.2.1",
79
- "fast-safe-stringify": "2.0.8",
91
+ "fast-safe-stringify": "2.1.1",
80
92
  "fs-extra": "^10.0.0",
81
93
  "gulp": "4.0.2",
82
94
  "image-size": "1.0.0",
@@ -93,16 +105,16 @@
93
105
  "signtool": "1.0.0",
94
106
  "sinon": "11.1.2",
95
107
  "source-map-loader": "3.0.0",
96
- "systeminformation": "5.8.6",
97
- "ts-loader": "9.2.5",
108
+ "systeminformation": "5.9.4",
109
+ "ts-loader": "9.2.6",
98
110
  "ts-node": "^10.0.0",
99
111
  "typescript": "4.3.5",
100
112
  "unzipper": "0.10.11",
101
113
  "uuid": "8.3.2",
102
- "webpack": "5.51.1",
103
- "webpack-cli": "4.8.0",
114
+ "webpack": "5.57.1",
115
+ "webpack-cli": "4.9.0",
104
116
  "webpack-obfuscator": "3.4.1",
105
- "webpack-stream": "6.1.2",
117
+ "webpack-stream": "7.0.0",
106
118
  "winston": "3.3.3",
107
119
  "winston-daily-rotate-file": "4.5.5",
108
120
  "ws": "7.5.3"
@@ -1,12 +0,0 @@
1
- /*!
2
- * FileStreamRotator
3
- * Copyright(c) 2012-2017 Holiday Extras.
4
- * Copyright(c) 2017 Roger C.
5
- * MIT Licensed
6
- */
7
-
8
- /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
9
-
10
- //! moment.js
11
-
12
- //! moment.js locale configuration
@@ -1,12 +0,0 @@
1
- /*!
2
- * FileStreamRotator
3
- * Copyright(c) 2012-2017 Holiday Extras.
4
- * Copyright(c) 2017 Roger C.
5
- * MIT Licensed
6
- */
7
-
8
- /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
9
-
10
- //! moment.js
11
-
12
- //! moment.js locale configuration
package/dist/grpc/grpc.js DELETED
@@ -1,8 +0,0 @@
1
- require("../e2o_view.js");
2
- window.grpc = require("@grpc/grpc-js");
3
- window.grpcProtoLoader = require("@grpc/proto-loader");
4
-
5
- if (window.e2o) {
6
- window.e2o.grpc = window.grpc;
7
- window.e2o.grpcProtoLoader = window.grpcProtoLoader;
8
- }