socket-function 0.126.0 → 0.128.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
@@ -63,6 +63,7 @@ export class SocketFunction {
63
63
  // If you have HTTP resources that require cookies you might to set `SocketFunction.COEP = "require-corp"`
64
64
  // - Cross-origin-resource-policy.
65
65
  public static COEP = "credentialless";
66
+ public static COOP = "same-origin";
66
67
 
67
68
  // In retrospect... dynamically changing the wire serializer is a BAD idea. If any calls happen
68
69
  // before it is changed, things just break. Also, it needs to be changed on both sides,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socket-function",
3
- "version": "0.126.0",
3
+ "version": "0.128.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -1,3 +1,5 @@
1
+ /// <reference path="../index.d.ts" />
2
+
1
3
  import { GetModulesArgs } from "./RequireController";
2
4
 
3
5
 
@@ -64,7 +64,7 @@ export async function httpCallHandler(request: http.IncomingMessage, response: h
64
64
  // CORS bs (due to having to explictly allow subdomains)
65
65
  {
66
66
  response.setHeader("Strict-Transport-Security", "max-age=63072000; includeSubDomains; preload");
67
- response.setHeader("Cross-Origin-Opener-Policy", "same-origin-allow-popups");
67
+ response.setHeader("Cross-Origin-Opener-Policy", SocketFunction.COOP);
68
68
  response.setHeader("Cross-Origin-Embedder-Policy", SocketFunction.COEP);
69
69
 
70
70
  let origin = request.headers.origin || request.headers.referer;
@@ -3,7 +3,7 @@ import { isNode } from "../misc";
3
3
  // TODO: We could probably make this an optional / dev dependency, to allow
4
4
  // for use on machines without the ability to compile?
5
5
  //import { now } from "rdtsc-now";
6
- let now = () => Date.now();
6
+ let now = () => performance.now();
7
7
  if (isNode()) {
8
8
  now = () => performance.now();
9
9
  }
@@ -201,7 +201,7 @@ export function logMeasureTable(
201
201
  process.stdout.write(`\x1b]0;${title}\x07`);
202
202
  }
203
203
  let pid = isNode() ? `(${process.pid}) ` : "";
204
- let title = yellow(`${pid}Profiled ${formatTime(totalTime)} (${percent(fraction)} CPU)${extraInfos.map(x => x ? ` (${x})` : "")} (logged at ${new Date().toISOString()}, profile for ${formatTime(timeRunFor)})`);
204
+ let title = yellow(`${pid}Profiled ${formatTime(totalTime)} (${percent(fraction)} CPU)${extraInfos.map(x => x ? ` (${x})` : "").filter(x => x).join(" |")} (logged at ${new Date().toISOString()}, profile for ${formatTime(timeRunFor)})`);
205
205
  if (name) {
206
206
  title = `(${blue(name)}) ${title}`;
207
207
  }