@cedarjs/auth 8.0.0-canary.3628 → 8.0.0-canary.3629

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,3 +1,4 @@
1
+ import { jsx } from "react/jsx-runtime";
1
2
  import React, { useCallback, useContext, useEffect, useState } from "react";
2
3
  import { currentUserHasPermission } from "../currentUserHasPermission.js";
3
4
  import { spaDefaultAuthProviderState } from "./AuthProviderState.js";
@@ -62,7 +63,7 @@ function createAuthProvider(AuthContext, authImplementation, customProviderHooks
62
63
  }
63
64
  doRestoreState();
64
65
  }, [reauthenticate, serverAuthState]);
65
- return /* @__PURE__ */ React.createElement(
66
+ return /* @__PURE__ */ jsx(
66
67
  AuthContext.Provider,
67
68
  {
68
69
  value: {
@@ -81,9 +82,9 @@ function createAuthProvider(AuthContext, authImplementation, customProviderHooks
81
82
  changePassword,
82
83
  client,
83
84
  type
84
- }
85
- },
86
- children
85
+ },
86
+ children
87
+ }
87
88
  );
88
89
  };
89
90
  return AuthProvider;
@@ -1,3 +1,4 @@
1
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
1
2
  import React from "react";
2
3
  import { middlewareDefaultAuthProviderState } from "./AuthProviderState.js";
3
4
  const getAuthInitialStateFromServer = () => {
@@ -22,15 +23,18 @@ const ServerAuthProvider = ({
22
23
  const stringifiedAuthState = `__REDWOOD__SERVER__AUTH_STATE__ = ${JSON.stringify(
23
24
  sanitizeServerAuthState(value)
24
25
  )};`;
25
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(
26
- "script",
27
- {
28
- id: "__REDWOOD__SERVER_AUTH_STATE__",
29
- dangerouslySetInnerHTML: {
30
- __html: stringifiedAuthState
26
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
27
+ /* @__PURE__ */ jsx(
28
+ "script",
29
+ {
30
+ id: "__REDWOOD__SERVER_AUTH_STATE__",
31
+ dangerouslySetInnerHTML: {
32
+ __html: stringifiedAuthState
33
+ }
31
34
  }
32
- }
33
- ), /* @__PURE__ */ React.createElement(ServerAuthContext.Provider, { value }, children));
35
+ ),
36
+ /* @__PURE__ */ jsx(ServerAuthContext.Provider, { value, children })
37
+ ] });
34
38
  };
35
39
  function sanitizeServerAuthState(value) {
36
40
  const sanitizedState = { ...value };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/auth",
3
- "version": "8.0.0-canary.3628",
3
+ "version": "8.0.0-canary.3629",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "devDependencies": {
60
60
  "@arethetypeswrong/cli": "0.18.5",
61
- "@cedarjs/framework-tools": "8.0.0-canary.3628",
61
+ "@cedarjs/framework-tools": "8.0.0-canary.3629",
62
62
  "@testing-library/dom": "10.4.2",
63
63
  "@testing-library/jest-dom": "6.9.1",
64
64
  "@testing-library/react": "16.3.3",