simplex-chat 6.5.0-beta.4.2 → 6.5.0-beta.4.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.
package/README.md CHANGED
@@ -14,7 +14,7 @@ Please share your use cases and implementations.
14
14
  ## Quick start: a simple bot
15
15
 
16
16
  ```
17
- npm i simplex-chat@6.5.0-beta.4.2
17
+ npm i simplex-chat@6.5.0-beta.4.3
18
18
  ```
19
19
 
20
20
  Simple bot that replies with squares of numbers you send to it:
package/binding.gyp CHANGED
@@ -9,15 +9,15 @@
9
9
  "dependencies": [
10
10
  "<!(node -p \"require('node-addon-api').gyp\")"
11
11
  ],
12
- "libraries": [
13
- "-L<(module_root_dir)/libs",
14
- "-lsimplex"
15
- ],
16
12
  "cflags!": [ "-fno-exceptions" ],
17
13
  "cflags_cc!": [ "-fno-exceptions" ],
18
14
  "defines": [ "NAPI_DISABLE_CPP_EXCEPTIONS" ],
19
15
  "conditions": [
20
16
  ["OS=='mac'", {
17
+ "libraries": [
18
+ "-L<(module_root_dir)/libs",
19
+ "-lsimplex"
20
+ ],
21
21
  "xcode_settings": {
22
22
  "OTHER_LDFLAGS": [
23
23
  "-Wl,-rpath,@loader_path/../../libs"
@@ -25,9 +25,24 @@
25
25
  }
26
26
  }],
27
27
  ["OS=='linux'", {
28
+ "libraries": [
29
+ "-L<(module_root_dir)/libs",
30
+ "-lsimplex"
31
+ ],
28
32
  "ldflags": [
29
33
  "-Wl,-rpath,'$$ORIGIN'/../../libs"
30
34
  ]
35
+ }],
36
+ ["OS=='win'", {
37
+ "libraries": [
38
+ "<(module_root_dir)/libs/libsimplex.lib"
39
+ ],
40
+ "copies": [{
41
+ "destination": "<(PRODUCT_DIR)",
42
+ "files": [
43
+ "<(module_root_dir)/libs/*"
44
+ ]
45
+ }]
31
46
  }]
32
47
  ]
33
48
  }
package/cpp/simplex.cc CHANGED
@@ -10,6 +10,17 @@ namespace simplex {
10
10
  using namespace Napi;
11
11
 
12
12
  void haskell_init() {
13
+ #ifdef _WIN32
14
+ // non-moving GC is broken on windows with GHC 9.4-9.6.3
15
+ int argc = 5;
16
+ const char *argv[] = {
17
+ "simplex",
18
+ "+RTS", // requires `hs_init_with_rtsopts`
19
+ "-A64m", // chunk size for new allocations
20
+ "-H64m", // initial heap size
21
+ "--install-signal-handlers=no",
22
+ nullptr};
23
+ #else
13
24
  int argc = 6;
14
25
  const char *argv[] = {
15
26
  "simplex",
@@ -19,6 +30,7 @@ void haskell_init() {
19
30
  "-xn", // non-moving GC
20
31
  "--install-signal-handlers=no",
21
32
  nullptr};
33
+ #endif
22
34
  char **pargv = const_cast<char **>(argv);
23
35
  hs_init_with_rtsopts(&argc, &pargv);
24
36
  }
package/dist/index.d.ts CHANGED
@@ -1,4 +1,19 @@
1
+ /**
2
+ * A simple declarative API to run a chat-bot with a single function call.
3
+ * It automates creating and updating of the bot profile, address and bot commands shown in the app UI.
4
+ */
5
+ export * as bot from "./bot";
6
+ /**
7
+ * An API to send chat commands and receive chat events to/from chat core.
8
+ * You need to use it in bot event handlers, and for any other use cases.
9
+ */
10
+ export * as api from "./api";
11
+ /**
12
+ * A low level API to the core library - the same that is used in desktop clients.
13
+ * You are unlikely to ever need to use this module directly.
14
+ */
1
15
  export * as core from "./core";
16
+ /**
17
+ * Useful functions for chat events and types.
18
+ */
2
19
  export * as util from "./util";
3
- export * as api from "./api";
4
- export * as bot from "./bot";
package/dist/index.js CHANGED
@@ -1,8 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.bot = exports.api = exports.util = exports.core = void 0;
3
+ exports.util = exports.core = exports.api = exports.bot = void 0;
4
+ /**
5
+ * A simple declarative API to run a chat-bot with a single function call.
6
+ * It automates creating and updating of the bot profile, address and bot commands shown in the app UI.
7
+ */
8
+ exports.bot = require("./bot");
9
+ /**
10
+ * An API to send chat commands and receive chat events to/from chat core.
11
+ * You need to use it in bot event handlers, and for any other use cases.
12
+ */
13
+ exports.api = require("./api");
14
+ /**
15
+ * A low level API to the core library - the same that is used in desktop clients.
16
+ * You are unlikely to ever need to use this module directly.
17
+ */
4
18
  exports.core = require("./core");
19
+ /**
20
+ * Useful functions for chat events and types.
21
+ */
5
22
  exports.util = require("./util");
6
- exports.api = require("./api");
7
- exports.bot = require("./bot");
8
23
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iCAA8B;AAC9B,iCAA8B;AAC9B,+BAA4B;AAC5B,+BAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA;;;GAGG;AACH,+BAA4B;AAE5B;;;GAGG;AACH,+BAA4B;AAE5B;;;GAGG;AACH,iCAA8B;AAE9B;;GAEG;AACH,iCAA8B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simplex-chat",
3
- "version": "6.5.0-beta.4.2",
3
+ "version": "6.5.0-beta.4.3",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [