socket-function 0.157.0 → 0.159.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.
@@ -6,7 +6,7 @@ import { SocketServerConfig } from "./src/webSocketServer";
6
6
  import { Args, MaybePromise } from "./src/types";
7
7
  import "./SetProcessVariables";
8
8
  type ExtractShape<ClassType, Shape> = {
9
- [key in keyof ClassType]: (key extends keyof Shape ? ClassType[key] extends SocketExposedInterface[""] ? ClassType[key] : ClassType[key] extends Function ? "All exposed function must be async (or return a Promise)" : never : "Function is in shape, but not in class");
9
+ [key in keyof ClassType]: (key extends keyof Shape ? ClassType[key] extends SocketExposedInterface[""] ? ClassType[key] : ClassType[key] extends Function ? "All exposed function must be async (or return a Promise)" : never : "Function has implementation but is not exposed in the SocketFunction.register call");
10
10
  };
11
11
  export declare class SocketFunction {
12
12
  static logMessages: boolean;
@@ -25,6 +25,13 @@ function generateIndexDts() {
25
25
  const dtsFiles = getAllDtsFiles(renderUtilsPath);
26
26
 
27
27
  const modules = dtsFiles
28
+ .filter(filePath => {
29
+ // Exclude SocketFunction.d.ts from being wrapped in a module declaration
30
+ const relativePath = path.relative(renderUtilsPath, filePath);
31
+ const withoutExt = relativePath.replace(/\.d\.ts$/, "");
32
+ const modulePath = "socket-function/" + withoutExt.replace(/\\/g, "/");
33
+ return modulePath !== "socket-function/SocketFunction";
34
+ })
28
35
  .map(filePath => {
29
36
  const relativePath = path.relative(renderUtilsPath, filePath);
30
37
  const withoutExt = relativePath.replace(/\.d\.ts$/, "");