socket-function 0.156.0 → 0.158.0

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/SocketFunction.ts CHANGED
@@ -41,7 +41,7 @@ type ExtractShape<ClassType, Shape> = {
41
41
  ? ClassType[key] extends SocketExposedInterface[""]
42
42
  ? ClassType[key]
43
43
  : ClassType[key] extends Function ? "All exposed function must be async (or return a Promise)" : never
44
- : "Function is in shape, but not in class"
44
+ : "Function has implementation but is not exposed in the SocketFunction.register call"
45
45
  );
46
46
  };
47
47
 
@@ -188,6 +188,8 @@ class HotReloadControllerBase {
188
188
  let callerId = SocketFunction.getCaller().nodeId;
189
189
  clientWatcherNodes.add(callerId);
190
190
  }
191
+ // TODO: This is actually broken related to lazy loaded and server-only code, as the server will tell us a file changed, and then we'll see that we don't have it loaded, and so we will try to refresh.
192
+ // - The reason we refresh is because it might be a new file. I don't know how we could check to see if it was lazy loaded. Maybe we just shouldn't refresh ever if we can't find the module? We'll see how much we run into the extra refresh due to lazy loading...
191
193
  async fileUpdated(files: string[], changeTime: number) {
192
194
  try {
193
195
  console.groupCollapsed(magenta(`Trigger hotreload for files ${formatTime(Date.now() - changeTime)} after file change`));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socket-function",
3
- "version": "0.156.0",
3
+ "version": "0.158.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {