@cedarjs/web 6.0.0-canary.2818 → 6.0.0-rc.189
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/dist/apollo/ApolloProviderWithFetchConfig.d.ts +1 -1
- package/dist/apollo/ApolloProviderWithFetchConfig.d.ts.map +1 -1
- package/dist/apollo/ApolloProviderWithFetchConfig.js +16 -23
- package/dist/apollo/CedarApolloProvider.js +1 -1
- package/dist/apollo/apolloLinkTypes.d.ts +4 -4
- package/dist/apollo/apolloLinkTypes.d.ts.map +1 -1
- package/dist/apollo/fragmentRegistry.d.ts +3 -3
- package/dist/apollo/fragmentRegistry.d.ts.map +1 -1
- package/dist/apollo/fragmentRegistry.js +8 -35
- package/dist/apollo/links.d.ts +5 -4
- package/dist/apollo/links.d.ts.map +1 -1
- package/dist/apollo/links.js +7 -7
- package/dist/apollo/sseLink.d.ts +8 -5
- package/dist/apollo/sseLink.d.ts.map +1 -1
- package/dist/apollo/sseLink.js +12 -9
- package/dist/apollo/suspense.d.ts +3 -3
- package/dist/apollo/suspense.d.ts.map +1 -1
- package/dist/apollo/suspense.js +1 -1
- package/dist/apollo/useCache.d.ts +6 -4
- package/dist/apollo/useCache.d.ts.map +1 -1
- package/dist/apollo/useCache.js +1 -1
- package/dist/bundled/apollo-upload-client.d.ts +2 -2
- package/dist/bundled/apollo-upload-client.d.ts.map +1 -1
- package/dist/bundled/apollo-upload-client.js +1685 -1513
- package/dist/components/DevFatalErrorPage.d.ts +3 -3
- package/dist/components/DevFatalErrorPage.d.ts.map +1 -1
- package/dist/components/DevFatalErrorPage.js +2 -2
- package/dist/components/cell/CellErrorBoundary.d.ts +3 -3
- package/dist/components/cell/CellErrorBoundary.d.ts.map +1 -1
- package/dist/components/cell/cellTypes.d.ts +5 -6
- package/dist/components/cell/cellTypes.d.ts.map +1 -1
- package/dist/components/cell/createCell.d.ts.map +1 -1
- package/dist/components/cell/createCell.js +3 -4
- package/dist/components/cell/createSuspendingCell.d.ts.map +1 -1
- package/dist/components/cell/createSuspendingCell.js +3 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/server/middleware.d.ts +1 -1
- package/dist/server/middleware.d.ts.map +1 -1
- package/package.json +14 -15
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { GraphQLError } from 'graphql';
|
|
3
3
|
type RequestDetails = {
|
|
4
4
|
query: string;
|
|
5
5
|
operationName: string;
|
|
6
6
|
operationKind: string;
|
|
7
7
|
variables: any;
|
|
8
8
|
};
|
|
9
|
-
interface EnhancedGqlError extends
|
|
9
|
+
interface EnhancedGqlError extends GraphQLError {
|
|
10
10
|
__RedwoodEnhancedError: RequestDetails;
|
|
11
11
|
}
|
|
12
12
|
type ErrorWithRequestMeta = Error & {
|
|
13
13
|
mostRecentRequest?: RequestDetails;
|
|
14
|
-
|
|
14
|
+
graphQLErrors?: EnhancedGqlError[];
|
|
15
15
|
mostRecentResponse?: any;
|
|
16
16
|
};
|
|
17
17
|
export declare const DevFatalErrorPage: (props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DevFatalErrorPage.d.ts","sourceRoot":"","sources":["../../src/components/DevFatalErrorPage.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAE1D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"DevFatalErrorPage.d.ts","sourceRoot":"","sources":["../../src/components/DevFatalErrorPage.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAE1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAmB3C,KAAK,cAAc,GAAG;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,MAAM,CAAA;IACrB,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,GAAG,CAAA;CACf,CAAA;AAED,UAAU,gBAAiB,SAAQ,YAAY;IAC7C,sBAAsB,EAAE,cAAc,CAAA;CACvC;AAGD,KAAK,oBAAoB,GAAG,KAAK,GAAG;IAClC,iBAAiB,CAAC,EAAE,cAAc,CAAA;IAClC,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAClC,kBAAkB,CAAC,EAAE,GAAG,CAAA;CACzB,CAAA;AAiGD,eAAO,MAAM,iBAAiB,GAAI,OAAO;IAAE,KAAK,CAAC,EAAE,oBAAoB,CAAA;CAAE,sBA4FxE,CAAA"}
|
|
@@ -19,7 +19,7 @@ function formatErrorForClipboard(err, stack, typeName, msg, errorWithMeta) {
|
|
|
19
19
|
lines.push(`ERROR TYPE: ${typeName}`);
|
|
20
20
|
lines.push(`ERROR MESSAGE: ${msg}`);
|
|
21
21
|
lines.push("");
|
|
22
|
-
const mostRecentRequest = errorWithMeta.mostRecentRequest || errorWithMeta.
|
|
22
|
+
const mostRecentRequest = errorWithMeta.mostRecentRequest || errorWithMeta.graphQLErrors?.find((gqlErr) => gqlErr.__RedwoodEnhancedError)?.__RedwoodEnhancedError;
|
|
23
23
|
if (mostRecentRequest) {
|
|
24
24
|
lines.push("-".repeat(80));
|
|
25
25
|
lines.push("REQUEST CONTEXT");
|
|
@@ -194,7 +194,7 @@ function ResponseRequest(props) {
|
|
|
194
194
|
if (!props.error) {
|
|
195
195
|
return null;
|
|
196
196
|
}
|
|
197
|
-
const mostRecentRequest = props.error.mostRecentRequest || props.error.
|
|
197
|
+
const mostRecentRequest = props.error.mostRecentRequest || props.error.graphQLErrors?.find((gqlErr) => gqlErr.__RedwoodEnhancedError)?.__RedwoodEnhancedError;
|
|
198
198
|
const mostRecentResponse = props.error.mostRecentResponse;
|
|
199
199
|
return /* @__PURE__ */ React.createElement("div", { className: "request-response" }, mostRecentRequest ? /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h4", null, "Request: ", mostRecentRequest.operationName), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h5", null, "Variables:"), /* @__PURE__ */ React.createElement("code", null, /* @__PURE__ */ React.createElement("pre", null, JSON.stringify(mostRecentRequest.variables, null, " ")))), /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement("h5", null, "Query:"), /* @__PURE__ */ React.createElement("code", null, /* @__PURE__ */ React.createElement(
|
|
200
200
|
"pre",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { QueryResult } from '@apollo/client';
|
|
3
3
|
import type { CellFailureProps } from './cellTypes.js';
|
|
4
4
|
export type FallbackProps = {
|
|
5
|
-
error:
|
|
5
|
+
error: QueryResult['error'];
|
|
6
6
|
resetErrorBoundary: () => void;
|
|
7
7
|
};
|
|
8
8
|
export type CellErrorBoundaryProps = {
|
|
@@ -11,7 +11,7 @@ export type CellErrorBoundaryProps = {
|
|
|
11
11
|
};
|
|
12
12
|
interface ErrState {
|
|
13
13
|
hasError: boolean;
|
|
14
|
-
error?:
|
|
14
|
+
error?: QueryResult['error'];
|
|
15
15
|
}
|
|
16
16
|
export declare class CellErrorBoundary extends React.Component<CellErrorBoundaryProps, ErrState> {
|
|
17
17
|
constructor(props: CellErrorBoundaryProps);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CellErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/cell/CellErrorBoundary.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"CellErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/cell/CellErrorBoundary.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAEjD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAEtD,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;IAC3B,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,sBAAsB,GAAG;IAGnC,cAAc,EAAE,CACd,OAAO,EAAE,aAAa,KACnB,KAAK,CAAC,YAAY,CAAC,gBAAgB,CAAC,CAAA;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAA;AAED,UAAU,QAAQ;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAC7B;AAED,qBAAa,iBAAkB,SAAQ,KAAK,CAAC,SAAS,CACpD,sBAAsB,EACtB,QAAQ,CACT;gBACa,KAAK,EAAE,sBAAsB;IAKzC,MAAM,CAAC,wBAAwB,CAAC,KAAK,EAAE,KAAK;;;;IAI5C,iBAAiB,CAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS;IAQ1D,MAAM;CAgBP"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps, JSXElementConstructor } from 'react';
|
|
2
|
-
import type { ApolloClient, NetworkStatus, OperationVariables } from '@apollo/client';
|
|
3
|
-
import type { QueryRef, useBackgroundQuery, useQuery } from '@apollo/client/react';
|
|
2
|
+
import type { ApolloClient, NetworkStatus, OperationVariables, QueryRef, QueryResult, UseBackgroundQueryResult } from '@apollo/client';
|
|
4
3
|
import type { DocumentNode } from 'graphql';
|
|
5
4
|
import type { A, L, O, U } from 'ts-toolbelt';
|
|
6
5
|
/**
|
|
@@ -28,7 +27,7 @@ export type CellLoadingProps<TVariables extends OperationVariables = any> = {
|
|
|
28
27
|
} & InputVarProps<TVariables>;
|
|
29
28
|
export type CellFailureProps<TVariables extends OperationVariables = any> = {
|
|
30
29
|
queryResult?: NonSuspenseCellQueryResult<TVariables, any> | SuspenseCellQueryResult;
|
|
31
|
-
error?:
|
|
30
|
+
error?: QueryResult['error'] | Error;
|
|
32
31
|
/**
|
|
33
32
|
* @see {@link https://www.apollographql.com/docs/apollo-server/data/errors/#error-codes}
|
|
34
33
|
*/
|
|
@@ -156,9 +155,9 @@ export type SuspendingSuccessProps = React.PropsWithChildren<Record<string, unkn
|
|
|
156
155
|
suspenseQueryResult: SuspenseCellQueryResult<DataObject, any>;
|
|
157
156
|
userProps: Record<string, any>;
|
|
158
157
|
};
|
|
159
|
-
export type NonSuspenseCellQueryResult<TVariables extends OperationVariables = any, TData = any> = Partial<Omit<
|
|
160
|
-
export interface SuspenseCellQueryResult<_TData = any, _TVariables extends OperationVariables = any> extends
|
|
161
|
-
client: ApolloClient
|
|
158
|
+
export type NonSuspenseCellQueryResult<TVariables extends OperationVariables = any, TData = any> = Partial<Omit<QueryResult<TData, TVariables>, 'loading' | 'error' | 'data'>>;
|
|
159
|
+
export interface SuspenseCellQueryResult<_TData = any, _TVariables extends OperationVariables = any> extends UseBackgroundQueryResult {
|
|
160
|
+
client: ApolloClient<any>;
|
|
162
161
|
networkStatus?: NetworkStatus;
|
|
163
162
|
called: boolean;
|
|
164
163
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cellTypes.d.ts","sourceRoot":"","sources":["../../../src/components/cell/cellTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAElE,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,kBAAkB,
|
|
1
|
+
{"version":3,"file":"cellTypes.d.ts","sourceRoot":"","sources":["../../../src/components/cell/cellTypes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAA;AAElE,OAAO,KAAK,EACV,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,QAAQ,EACR,WAAW,EACX,wBAAw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AAC,CAAA;IACvD;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAA;IACxD;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,MAAM,sBAAsB,GAAG,KAAK,CAAC,iBAAiB,CAC1D,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CACxB,GAAG;IACF,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAA;IAC9B,mBAAmB,EAAE,uBAAuB,CAAC,UAAU,EAAE,GAAG,CAAC,CAAA;IAC7D,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC/B,CAAA;AAED,MAAM,MAAM,0BAA0B,CACpC,UAAU,SAAS,kBAAkB,GAAG,GAAG,EAC3C,KAAK,GAAG,GAAG,IACT,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC,CAAA;AAI/E,MAAM,WAAW,uBAAuB,CACtC,MAAM,GAAG,GAAG,EACZ,WAAW,SAAS,kBAAkB,GAAG,GAAG,CAC5C,SAAQ,wBAAwB;IAChC,MAAM,EAAE,YAAY,CAAC,GAAG,CAAC,CAAA;IAEzB,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,MAAM,EAAE,OAAO,CAAA;CAChB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCell.d.ts","sourceRoot":"","sources":["../../../src/components/cell/createCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"createCell.d.ts","sourceRoot":"","sources":["../../../src/components/cell/createCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAKrD,wBAAgB,UAAU,CACxB,SAAS,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACzC,aAAa,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAE7C,eAAe,EAAE,eAAe,CAAC,SAAS,EAAE,aAAa,CAAC,GACzD,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,CAiCrB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
3
|
-
import { useQuery } from "@apollo/client/react";
|
|
2
|
+
import { useQuery } from "@apollo/client/react/hooks/hooks.cjs";
|
|
4
3
|
import { fragmentRegistry } from "../../apollo/fragmentRegistry.js";
|
|
5
4
|
import { getOperationName } from "../../graphql.js";
|
|
6
5
|
import { useCellCacheContext } from "./CellCacheContext.js";
|
|
@@ -97,7 +96,7 @@ function createNonSuspendingCell({
|
|
|
97
96
|
error,
|
|
98
97
|
errorCode: (
|
|
99
98
|
// Use the ad-hoc QueryResultWithErrorCode type to access the errorCode
|
|
100
|
-
queryResult.errorCode ??
|
|
99
|
+
queryResult.errorCode ?? error.graphQLErrors?.[0]?.extensions?.["code"]
|
|
101
100
|
),
|
|
102
101
|
...props,
|
|
103
102
|
updating: loading,
|
|
@@ -105,7 +104,7 @@ function createNonSuspendingCell({
|
|
|
105
104
|
}
|
|
106
105
|
);
|
|
107
106
|
} else {
|
|
108
|
-
throw error
|
|
107
|
+
throw error;
|
|
109
108
|
}
|
|
110
109
|
} else if (data) {
|
|
111
110
|
const afterQueryData = afterQuery(data);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createSuspendingCell.d.ts","sourceRoot":"","sources":["../../../src/components/cell/createSuspendingCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"createSuspendingCell.d.ts","sourceRoot":"","sources":["../../../src/components/cell/createSuspendingCell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAWvC,OAAO,KAAK,EACV,eAAe,EAIhB,MAAM,gBAAgB,CAAA;AAGvB,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AACrC;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,SAAS,MAAM,EACxB,aAAa,SAAS,MAAM,EAE5B,eAAe,EAAE,eAAe,CAAC,MAAM,EAAE,aAAa,CAAC,GACtD,KAAK,CAAC,EAAE,CAAC,SAAS,CAAC,CAiJrB"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React, { Suspense } from "react";
|
|
2
|
-
import { CombinedGraphQLErrors } from "@apollo/client";
|
|
3
2
|
import {
|
|
4
3
|
useApolloClient,
|
|
5
4
|
useBackgroundQuery,
|
|
6
5
|
useReadQuery
|
|
7
|
-
} from "@apollo/client/react";
|
|
6
|
+
} from "@apollo/client/react/hooks/hooks.cjs";
|
|
8
7
|
import { CellErrorBoundary } from "./CellErrorBoundary.js";
|
|
9
8
|
import { isDataEmpty } from "./isCellEmpty.js";
|
|
10
9
|
function createSuspendingCell(createCellProps) {
|
|
@@ -78,7 +77,7 @@ function createSuspendingCell(createCellProps) {
|
|
|
78
77
|
const FailureComponent = ({ error, resetErrorBoundary }) => {
|
|
79
78
|
if (!Failure) {
|
|
80
79
|
if (error) {
|
|
81
|
-
throw error
|
|
80
|
+
throw error;
|
|
82
81
|
}
|
|
83
82
|
throw new Error("Unreachable code: FailureComponent without a Failure");
|
|
84
83
|
}
|
|
@@ -93,7 +92,7 @@ function createSuspendingCell(createCellProps) {
|
|
|
93
92
|
Failure,
|
|
94
93
|
{
|
|
95
94
|
error,
|
|
96
|
-
errorCode:
|
|
95
|
+
errorCode: error?.graphQLErrors?.[0]?.extensions?.["code"],
|
|
97
96
|
queryResult: queryResultWithErrorReset
|
|
98
97
|
}
|
|
99
98
|
);
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import './global.web-auto-imports.js';
|
|
|
2
2
|
import './config.js';
|
|
3
3
|
export { FatalErrorBoundary } from './components/FatalErrorBoundary.js';
|
|
4
4
|
export { FetchConfigProvider, useFetchConfig, } from './components/FetchConfigProvider.js';
|
|
5
|
-
export { useQuery, useMutation, useSubscription } from '@apollo/client/react';
|
|
5
|
+
export { useQuery, useMutation, useSubscription, } from '@apollo/client/react/hooks/hooks.cjs';
|
|
6
6
|
export { useFragment } from './apollo/fragmentRegistry.js';
|
|
7
7
|
export type { FragmentHookOptions, FragmentHookResult, } from './apollo/fragmentRegistry.js';
|
|
8
8
|
export * from './components/cell/CellCacheContext.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AACrC,OAAO,aAAa,CAAA;AAEpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAA;AAEvE,OAAO,EACL,mBAAmB,EACnB,cAAc,GACf,MAAM,qCAAqC,CAAA;AAC5C,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AACrC,OAAO,aAAa,CAAA;AAEpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAA;AAEvE,OAAO,EACL,mBAAmB,EACnB,cAAc,GACf,MAAM,qCAAqC,CAAA;AAC5C,OAAO,EACL,QAAQ,EACR,WAAW,EACX,eAAe,GAChB,MAAM,sCAAsC,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAA;AAC1D,YAAY,EACV,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,8BAA8B,CAAA;AAErC,cAAc,uCAAuC,CAAA;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAA;AAE5E,YAAY,EACV,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,GAChB,MAAM,gCAAgC,CAAA;AAEvC,cAAc,cAAc,CAAA;AAE5B,cAAc,iCAAiC,CAAA;AAE/C,cAAc,0BAA0B,CAAA;AACxC,cAAc,0BAA0B,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAA;AACjD,OAAO,EAAE,MAAM,IAAI,IAAI,EAAE,MAAM,EAAE,CAAA;AAEjC,cAAc,0BAA0B,CAAA;AACxC,cAAc,uBAAuB,CAAA;AAErC,cAAc,8BAA8B,CAAA;AAE5C,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,11 @@ import {
|
|
|
5
5
|
FetchConfigProvider,
|
|
6
6
|
useFetchConfig
|
|
7
7
|
} from "./components/FetchConfigProvider.js";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
useQuery,
|
|
10
|
+
useMutation,
|
|
11
|
+
useSubscription
|
|
12
|
+
} from "@apollo/client/react/hooks/hooks.cjs";
|
|
9
13
|
import { useFragment } from "./apollo/fragmentRegistry.js";
|
|
10
14
|
export * from "./components/cell/CellCacheContext.js";
|
|
11
15
|
import { createCell } from "./components/cell/createCell.js";
|
|
@@ -8,7 +8,7 @@ export type MiddlewareInvokeOptions = {
|
|
|
8
8
|
route?: RWRouteManifestItem;
|
|
9
9
|
cssPaths?: string[];
|
|
10
10
|
params?: Record<string, unknown>;
|
|
11
|
-
|
|
11
|
+
viteDevServer?: ViteDevServer;
|
|
12
12
|
};
|
|
13
13
|
export type Middleware = (req: MiddlewareRequest, res: MiddlewareResponse, options?: MiddlewareInvokeOptions) => Promise<MiddlewareResponse> | MiddlewareResponse | void;
|
|
14
14
|
export interface MiddlewareClass {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/server/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AAIzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AAE3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AAEvC,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,CAAC,EAAE,mBAAmB,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../src/server/middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,MAAM,CAAA;AAIzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAA;AAE3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAA;AAEjE,cAAc,wBAAwB,CAAA;AACtC,cAAc,yBAAyB,CAAA;AAEvC,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,CAAC,EAAE,mBAAmB,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAChC,aAAa,CAAC,EAAE,aAAa,CAAA;CAC9B,CAAA;AAED,MAAM,MAAM,UAAU,GAAG,CACvB,GAAG,EAAE,iBAAiB,EACtB,GAAG,EAAE,kBAAkB,EACvB,OAAO,CAAC,EAAE,uBAAuB,KAC9B,OAAO,CAAC,kBAAkB,CAAC,GAAG,kBAAkB,GAAG,IAAI,CAAA;AAE5D,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,UAAU,CAAA;CACnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/web",
|
|
3
|
-
"version": "6.0.0-
|
|
3
|
+
"version": "6.0.0-rc.189",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -80,50 +80,49 @@
|
|
|
80
80
|
"test:watch": "vitest watch"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@apollo/client": "
|
|
84
|
-
"@cedarjs/server-store": "6.0.0-
|
|
83
|
+
"@apollo/client": "3.14.1",
|
|
84
|
+
"@cedarjs/server-store": "6.0.0-rc.189",
|
|
85
85
|
"@dr.pogodin/react-helmet": "2.0.4",
|
|
86
86
|
"@whatwg-node/fetch": "0.10.13",
|
|
87
|
-
"apollo-upload-client": "
|
|
87
|
+
"apollo-upload-client": "18.0.1",
|
|
88
88
|
"cookie": "1.1.1",
|
|
89
89
|
"graphql": "16.14.2",
|
|
90
90
|
"graphql-sse": "2.6.0",
|
|
91
91
|
"graphql-tag": "2.12.6",
|
|
92
92
|
"react-hot-toast": "2.6.0",
|
|
93
|
-
"rxjs": "7.8.2",
|
|
94
93
|
"stacktracey": "2.2.0",
|
|
95
94
|
"ts-toolbelt": "9.6.0"
|
|
96
95
|
},
|
|
97
96
|
"devDependencies": {
|
|
98
|
-
"@apollo/client-react-streaming": "0.
|
|
97
|
+
"@apollo/client-react-streaming": "0.12.3",
|
|
99
98
|
"@arethetypeswrong/cli": "0.18.5",
|
|
100
99
|
"@babel/cli": "7.29.7",
|
|
101
100
|
"@babel/core": "^7.26.10",
|
|
102
101
|
"@babel/plugin-transform-runtime": "7.29.7",
|
|
103
102
|
"@babel/runtime": "7.29.7",
|
|
104
|
-
"@cedarjs/auth": "6.0.0-
|
|
105
|
-
"@cedarjs/framework-tools": "6.0.0-
|
|
106
|
-
"@cedarjs/internal": "6.0.0-
|
|
103
|
+
"@cedarjs/auth": "6.0.0-rc.189",
|
|
104
|
+
"@cedarjs/framework-tools": "6.0.0-rc.189",
|
|
105
|
+
"@cedarjs/internal": "6.0.0-rc.189",
|
|
107
106
|
"@rollup/plugin-babel": "6.1.0",
|
|
108
107
|
"@testing-library/dom": "10.4.1",
|
|
109
108
|
"@testing-library/jest-dom": "6.9.1",
|
|
110
109
|
"@testing-library/react": "16.3.2",
|
|
111
|
-
"@types/apollo-upload-client": "^
|
|
110
|
+
"@types/apollo-upload-client": "^18",
|
|
112
111
|
"@types/react": "^18.2.55",
|
|
113
112
|
"@types/react-dom": "^18.2.19",
|
|
114
113
|
"concurrently": "9.2.4",
|
|
115
114
|
"nodemon": "3.1.14",
|
|
116
115
|
"publint": "0.3.22",
|
|
117
|
-
"react": "
|
|
118
|
-
"react-dom": "
|
|
116
|
+
"react": "18.3.1",
|
|
117
|
+
"react-dom": "18.3.1",
|
|
119
118
|
"tstyche": "5.0.2",
|
|
120
119
|
"typescript": "5.9.3",
|
|
121
120
|
"vitest": "4.1.10"
|
|
122
121
|
},
|
|
123
122
|
"peerDependencies": {
|
|
124
|
-
"@cedarjs/auth": "6.0.0-
|
|
125
|
-
"react": "
|
|
126
|
-
"react-dom": "
|
|
123
|
+
"@cedarjs/auth": "6.0.0-rc.189",
|
|
124
|
+
"react": "18.3.1",
|
|
125
|
+
"react-dom": "18.3.1"
|
|
127
126
|
},
|
|
128
127
|
"engines": {
|
|
129
128
|
"node": ">=24"
|