@floegence/floe-webapp-boot 0.56.7 → 0.56.9

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.
@@ -1,5 +1,5 @@
1
1
  import { createProxyRuntime as f } from "@floegence/flowersec-core/proxy";
2
- import { connectedAcquisitionDetails as g, AcquisitionError as a } from "./acquisition.js";
2
+ import { connectedAcquisitionDetails as y, AcquisitionError as s } from "./acquisition.js";
3
3
  class d {
4
4
  #e = void 0;
5
5
  constructor() {
@@ -13,64 +13,68 @@ class d {
13
13
  }
14
14
  }
15
15
  const b = /* @__PURE__ */ new WeakMap();
16
- function m(e) {
16
+ function P(e) {
17
17
  const t = d.create();
18
18
  return b.set(t, { options: e, generation: 0 }), t;
19
19
  }
20
- function B(e, t) {
21
- const o = y(e);
20
+ function m(e, t) {
21
+ const o = h(e);
22
22
  if (t === null)
23
23
  return l(o), null;
24
24
  if (o.acquisition === t && o.snapshot !== void 0) return o.snapshot;
25
- const r = g(t);
25
+ const n = y(t);
26
26
  l(o);
27
27
  const c = o.generation + 1;
28
28
  o.generation = c;
29
- const n = r.scope, p = f({
30
- session: r.session,
31
- ...n.limits ?? {},
32
- ...n.appBasePath === void 0 ? {} : { pathPolicy: { allowedPathPrefixes: Object.freeze([n.appBasePath]) } }
29
+ const r = n.scope, p = f({
30
+ session: n.session,
31
+ ...r.limits ?? {},
32
+ ...r.http?.extraRequestHeaders === void 0 ? {} : { extraRequestHeaders: r.http.extraRequestHeaders },
33
+ ...r.appBasePath === void 0 ? {} : { pathPolicy: {
34
+ allowedPathPrefixes: Object.freeze([r.appBasePath, ...r.http?.additionalPathPrefixes ?? []]),
35
+ allowedWebSocketPathPrefixes: Object.freeze([r.appBasePath])
36
+ } }
33
37
  });
34
38
  try {
35
39
  let i;
36
- if (n.mode === "service_worker") {
37
- const s = o.options.serviceWorker;
38
- if (s === void 0) throw new a("service_worker_bootstrap_unavailable");
39
- i = s(Object.freeze({
40
+ if (r.mode === "service_worker") {
41
+ const a = o.options.serviceWorker;
42
+ if (a === void 0) throw new s("service_worker_bootstrap_unavailable");
43
+ i = a(Object.freeze({
40
44
  runtime: p,
41
45
  generation: c,
42
- bindingIdentity: r.bindingIdentity,
43
- scriptUrl: n.serviceWorker.scriptUrl,
44
- serviceWorkerScope: n.serviceWorker.scope,
45
- ...n.appBasePath === void 0 ? {} : { appBasePath: n.appBasePath }
46
+ bindingIdentity: n.bindingIdentity,
47
+ scriptUrl: r.serviceWorker.scriptUrl,
48
+ serviceWorkerScope: r.serviceWorker.scope,
49
+ ...r.appBasePath === void 0 ? {} : { appBasePath: r.appBasePath }
46
50
  }));
47
51
  } else {
48
- const s = o.options.controllerBridge;
49
- if (s === void 0) throw new a("controller_bridge_bootstrap_unavailable");
50
- i = s(Object.freeze({
52
+ const a = o.options.controllerBridge;
53
+ if (a === void 0) throw new s("controller_bridge_bootstrap_unavailable");
54
+ i = a(Object.freeze({
51
55
  runtime: p,
52
56
  generation: c,
53
- bindingIdentity: r.bindingIdentity,
54
- allowedOrigins: n.controllerBridge.allowedOrigins,
55
- ...n.appBasePath === void 0 ? {} : { appBasePath: n.appBasePath },
56
- capabilityNonce: h()
57
+ bindingIdentity: n.bindingIdentity,
58
+ allowedOrigins: r.controllerBridge.allowedOrigins,
59
+ ...r.appBasePath === void 0 ? {} : { appBasePath: r.appBasePath },
60
+ capabilityNonce: g()
57
61
  }));
58
62
  }
59
63
  if (i === null || typeof i != "object" || typeof i.dispose != "function")
60
- throw new a("invalid_proxy_bootstrap_binding");
61
- const u = Object.freeze({ generation: c, mode: n.mode, bindingIdentity: r.bindingIdentity });
64
+ throw new s("invalid_proxy_bootstrap_binding");
65
+ const u = Object.freeze({ generation: c, mode: r.mode, bindingIdentity: n.bindingIdentity });
62
66
  return o.acquisition = t, o.runtime = p, o.binding = i, o.snapshot = u, u;
63
67
  } catch (i) {
64
68
  throw p.dispose(), i;
65
69
  }
66
70
  }
67
- function P(e) {
68
- l(y(e));
71
+ function B(e) {
72
+ l(h(e));
69
73
  }
70
- function y(e) {
74
+ function h(e) {
71
75
  d.assertAuthentic(e);
72
76
  const t = b.get(e);
73
- if (t === void 0) throw new a("invalid_proxy_bootstrap_owner");
77
+ if (t === void 0) throw new s("invalid_proxy_bootstrap_owner");
74
78
  return t;
75
79
  }
76
80
  function l(e) {
@@ -82,8 +86,8 @@ function l(e) {
82
86
  o?.dispose();
83
87
  }
84
88
  }
85
- function h() {
86
- if (globalThis.crypto?.getRandomValues === void 0) throw new a("acquisition_entropy_unavailable");
89
+ function g() {
90
+ if (globalThis.crypto?.getRandomValues === void 0) throw new s("acquisition_entropy_unavailable");
87
91
  const e = globalThis.crypto.getRandomValues(new Uint8Array(32));
88
92
  let t = "";
89
93
  for (const o of e) t += String.fromCharCode(o);
@@ -91,7 +95,7 @@ function h() {
91
95
  }
92
96
  export {
93
97
  d as ProxyBootstrapOwner,
94
- P as closeProxyBootstrap,
95
- m as createProxyBootstrapOwner,
96
- B as synchronizeProxyBootstrap
98
+ B as closeProxyBootstrap,
99
+ P as createProxyBootstrapOwner,
100
+ m as synchronizeProxyBootstrap
97
101
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floegence/floe-webapp-boot",
3
- "version": "0.56.7",
3
+ "version": "0.56.9",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -35,7 +35,7 @@
35
35
  "clean": "rm -rf dist *.tsbuildinfo"
36
36
  },
37
37
  "dependencies": {
38
- "@floegence/flowersec-core": "5.2.0",
38
+ "@floegence/flowersec-core": "5.2.2",
39
39
  "@noble/hashes": "2.4.0"
40
40
  },
41
41
  "devDependencies": {