@cedarjs/web 4.0.0-canary.13652 → 4.0.0-canary.13656
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.
|
@@ -71,7 +71,7 @@ var setPrototypeOf = _a === void 0 ? function(obj, proto) {
|
|
|
71
71
|
} : _a;
|
|
72
72
|
var InvariantError = (
|
|
73
73
|
/** @class */
|
|
74
|
-
function(_super) {
|
|
74
|
+
(function(_super) {
|
|
75
75
|
__extends(InvariantError2, _super);
|
|
76
76
|
function InvariantError2(message) {
|
|
77
77
|
if (message === void 0) {
|
|
@@ -84,7 +84,7 @@ var InvariantError = (
|
|
|
84
84
|
return _this;
|
|
85
85
|
}
|
|
86
86
|
return InvariantError2;
|
|
87
|
-
}(Error)
|
|
87
|
+
})(Error)
|
|
88
88
|
);
|
|
89
89
|
function invariant(condition, message) {
|
|
90
90
|
if (!condition) {
|
|
@@ -1544,7 +1544,7 @@ function onNotify(subscription, type, value) {
|
|
|
1544
1544
|
}
|
|
1545
1545
|
notifySubscription(subscription, type, value);
|
|
1546
1546
|
}
|
|
1547
|
-
var Subscription = /* @__PURE__ */ function() {
|
|
1547
|
+
var Subscription = /* @__PURE__ */ (function() {
|
|
1548
1548
|
function Subscription2(observer, subscriber) {
|
|
1549
1549
|
this._cleanup = void 0;
|
|
1550
1550
|
this._observer = observer;
|
|
@@ -1572,8 +1572,8 @@ var Subscription = /* @__PURE__ */ function() {
|
|
|
1572
1572
|
}
|
|
1573
1573
|
}]);
|
|
1574
1574
|
return Subscription2;
|
|
1575
|
-
}();
|
|
1576
|
-
var SubscriptionObserver = /* @__PURE__ */ function() {
|
|
1575
|
+
})();
|
|
1576
|
+
var SubscriptionObserver = /* @__PURE__ */ (function() {
|
|
1577
1577
|
function SubscriptionObserver2(subscription) {
|
|
1578
1578
|
this._subscription = subscription;
|
|
1579
1579
|
}
|
|
@@ -1594,8 +1594,8 @@ var SubscriptionObserver = /* @__PURE__ */ function() {
|
|
|
1594
1594
|
}
|
|
1595
1595
|
}]);
|
|
1596
1596
|
return SubscriptionObserver2;
|
|
1597
|
-
}();
|
|
1598
|
-
var Observable = /* @__PURE__ */ function() {
|
|
1597
|
+
})();
|
|
1598
|
+
var Observable = /* @__PURE__ */ (function() {
|
|
1599
1599
|
function Observable2(subscriber) {
|
|
1600
1600
|
if (!(this instanceof Observable2)) throw new TypeError("Observable cannot be called as a function");
|
|
1601
1601
|
if (typeof subscriber !== "function") throw new TypeError("Observable initializer must be a function");
|
|
@@ -1869,7 +1869,7 @@ var Observable = /* @__PURE__ */ function() {
|
|
|
1869
1869
|
}
|
|
1870
1870
|
}]);
|
|
1871
1871
|
return Observable2;
|
|
1872
|
-
}();
|
|
1872
|
+
})();
|
|
1873
1873
|
if (hasSymbols()) {
|
|
1874
1874
|
Object.defineProperty(Observable, Symbol("extensions"), {
|
|
1875
1875
|
value: {
|
|
@@ -2006,7 +2006,7 @@ function isTerminating(link) {
|
|
|
2006
2006
|
}
|
|
2007
2007
|
var ApolloLink = (
|
|
2008
2008
|
/** @class */
|
|
2009
|
-
function() {
|
|
2009
|
+
(function() {
|
|
2010
2010
|
function ApolloLink2(request) {
|
|
2011
2011
|
if (request)
|
|
2012
2012
|
this.request = request;
|
|
@@ -2085,7 +2085,7 @@ var ApolloLink = (
|
|
|
2085
2085
|
return this;
|
|
2086
2086
|
};
|
|
2087
2087
|
return ApolloLink2;
|
|
2088
|
-
}()
|
|
2088
|
+
})()
|
|
2089
2089
|
);
|
|
2090
2090
|
|
|
2091
2091
|
// ../../node_modules/@apollo/client/link/http/createSignalIfSupported.js
|
|
@@ -40,9 +40,9 @@ import_vitest.vi.mock("@apollo/client/react/hooks/hooks.cjs", () => {
|
|
|
40
40
|
(0, import_dev.loadDevMessages)();
|
|
41
41
|
(0, import_dev.loadErrorMessages)();
|
|
42
42
|
});
|
|
43
|
-
const mockedUseBgQuery = () => {
|
|
43
|
+
const mockedUseBgQuery = (() => {
|
|
44
44
|
return ["mocked-query-ref", { refetch: import_vitest.vi.fn(), fetchMore: import_vitest.vi.fn() }];
|
|
45
|
-
};
|
|
45
|
+
});
|
|
46
46
|
const mockedQueryHook = () => ({ data: {} });
|
|
47
47
|
(0, import_vitest.test)("Renders a static Success component", () => {
|
|
48
48
|
const TestCell = (0, import_createSuspendingCell.createSuspendingCell)({
|
|
@@ -68,9 +68,9 @@ import_vitest.vi.mock("@apollo/client/react/hooks/hooks.cjs", () => {
|
|
|
68
68
|
QUERY: "query TestQuery { answer }",
|
|
69
69
|
Success: ({ answer }) => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("dl", null, /* @__PURE__ */ import_react.default.createElement("dt", null, "What's the meaning of life?"), /* @__PURE__ */ import_react.default.createElement("dd", null, answer)))
|
|
70
70
|
});
|
|
71
|
-
const myUseQueryHook = () => {
|
|
71
|
+
const myUseQueryHook = (() => {
|
|
72
72
|
return { data: { answer: 42 } };
|
|
73
|
-
};
|
|
73
|
+
});
|
|
74
74
|
(0, import_react2.render)(
|
|
75
75
|
/* @__PURE__ */ import_react.default.createElement(
|
|
76
76
|
import_GraphQLHooksProvider.GraphQLHooksProvider,
|
|
@@ -91,14 +91,14 @@ import_vitest.vi.mock("@apollo/client/react/hooks/hooks.cjs", () => {
|
|
|
91
91
|
Empty: () => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, "No users or posts"),
|
|
92
92
|
Success: ({ users, posts }) => /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", null, users.length > 0 ? /* @__PURE__ */ import_react.default.createElement("ul", null, users.map(({ name }) => /* @__PURE__ */ import_react.default.createElement("li", { key: name }, name))) : "no users"), /* @__PURE__ */ import_react.default.createElement("div", null, posts.length > 0 ? /* @__PURE__ */ import_react.default.createElement("ul", null, posts.map(({ title }) => /* @__PURE__ */ import_react.default.createElement("li", { key: title }, title))) : "no posts"))
|
|
93
93
|
});
|
|
94
|
-
const myReadQueryHook = () => {
|
|
94
|
+
const myReadQueryHook = (() => {
|
|
95
95
|
return {
|
|
96
96
|
data: {
|
|
97
97
|
users: [],
|
|
98
98
|
posts: [{ title: "bazinga" }, { title: "kittens" }]
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
|
-
};
|
|
101
|
+
});
|
|
102
102
|
(0, import_react2.render)(
|
|
103
103
|
/* @__PURE__ */ import_react.default.createElement(
|
|
104
104
|
import_GraphQLHooksProvider.GraphQLHooksProvider,
|
package/dist/cjs/index.js
CHANGED
|
@@ -27,8 +27,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
mod
|
|
28
28
|
));
|
|
29
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
-
var
|
|
31
|
-
__export(
|
|
30
|
+
var index_exports = {};
|
|
31
|
+
__export(index_exports, {
|
|
32
32
|
FatalErrorBoundary: () => import_FatalErrorBoundary.FatalErrorBoundary,
|
|
33
33
|
FetchConfigProvider: () => import_FetchConfigProvider.FetchConfigProvider,
|
|
34
34
|
GraphQLHooksProvider: () => import_GraphQLHooksProvider.GraphQLHooksProvider,
|
|
@@ -40,22 +40,22 @@ __export(src_exports, {
|
|
|
40
40
|
useQuery: () => import_GraphQLHooksProvider.useQuery,
|
|
41
41
|
useSubscription: () => import_GraphQLHooksProvider.useSubscription
|
|
42
42
|
});
|
|
43
|
-
module.exports = __toCommonJS(
|
|
43
|
+
module.exports = __toCommonJS(index_exports);
|
|
44
44
|
var import_global_web_auto_imports = require("./global.web-auto-imports.js");
|
|
45
45
|
var import_config = require("./config.js");
|
|
46
46
|
var import_FatalErrorBoundary = require("./components/FatalErrorBoundary.js");
|
|
47
47
|
var import_FetchConfigProvider = require("./components/FetchConfigProvider.js");
|
|
48
48
|
var import_GraphQLHooksProvider = require("./components/GraphQLHooksProvider.js");
|
|
49
|
-
__reExport(
|
|
49
|
+
__reExport(index_exports, require("./components/cell/CellCacheContext.js"), module.exports);
|
|
50
50
|
var import_createCell = require("./components/cell/createCell.js");
|
|
51
|
-
__reExport(
|
|
52
|
-
__reExport(
|
|
53
|
-
__reExport(
|
|
54
|
-
__reExport(
|
|
51
|
+
__reExport(index_exports, require("./graphql.js"), module.exports);
|
|
52
|
+
__reExport(index_exports, require("./components/RedwoodProvider.js"), module.exports);
|
|
53
|
+
__reExport(index_exports, require("./components/MetaTags.js"), module.exports);
|
|
54
|
+
__reExport(index_exports, require("./components/Metadata.js"), module.exports);
|
|
55
55
|
var helmetPkg = __toESM(require("@dr.pogodin/react-helmet"), 1);
|
|
56
|
-
__reExport(
|
|
57
|
-
__reExport(
|
|
58
|
-
__reExport(
|
|
56
|
+
__reExport(index_exports, require("./components/htmlTags.js"), module.exports);
|
|
57
|
+
__reExport(index_exports, require("./routeHooks.types.js"), module.exports);
|
|
58
|
+
__reExport(index_exports, require("./components/ServerInject.js"), module.exports);
|
|
59
59
|
const { Helmet } = helmetPkg;
|
|
60
60
|
// Annotate the CommonJS export names for ESM import in node:
|
|
61
61
|
0 && (module.exports = {
|
|
@@ -17,9 +17,9 @@ describe("createSuspendingCell", () => {
|
|
|
17
17
|
loadDevMessages();
|
|
18
18
|
loadErrorMessages();
|
|
19
19
|
});
|
|
20
|
-
const mockedUseBgQuery = () => {
|
|
20
|
+
const mockedUseBgQuery = (() => {
|
|
21
21
|
return ["mocked-query-ref", { refetch: vi.fn(), fetchMore: vi.fn() }];
|
|
22
|
-
};
|
|
22
|
+
});
|
|
23
23
|
const mockedQueryHook = () => ({ data: {} });
|
|
24
24
|
test("Renders a static Success component", () => {
|
|
25
25
|
const TestCell = createSuspendingCell({
|
|
@@ -45,9 +45,9 @@ describe("createSuspendingCell", () => {
|
|
|
45
45
|
QUERY: "query TestQuery { answer }",
|
|
46
46
|
Success: ({ answer }) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("dl", null, /* @__PURE__ */ React.createElement("dt", null, "What's the meaning of life?"), /* @__PURE__ */ React.createElement("dd", null, answer)))
|
|
47
47
|
});
|
|
48
|
-
const myUseQueryHook = () => {
|
|
48
|
+
const myUseQueryHook = (() => {
|
|
49
49
|
return { data: { answer: 42 } };
|
|
50
|
-
};
|
|
50
|
+
});
|
|
51
51
|
render(
|
|
52
52
|
/* @__PURE__ */ React.createElement(
|
|
53
53
|
GraphQLHooksProvider,
|
|
@@ -68,14 +68,14 @@ describe("createSuspendingCell", () => {
|
|
|
68
68
|
Empty: () => /* @__PURE__ */ React.createElement(React.Fragment, null, "No users or posts"),
|
|
69
69
|
Success: ({ users, posts }) => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("div", null, users.length > 0 ? /* @__PURE__ */ React.createElement("ul", null, users.map(({ name }) => /* @__PURE__ */ React.createElement("li", { key: name }, name))) : "no users"), /* @__PURE__ */ React.createElement("div", null, posts.length > 0 ? /* @__PURE__ */ React.createElement("ul", null, posts.map(({ title }) => /* @__PURE__ */ React.createElement("li", { key: title }, title))) : "no posts"))
|
|
70
70
|
});
|
|
71
|
-
const myReadQueryHook = () => {
|
|
71
|
+
const myReadQueryHook = (() => {
|
|
72
72
|
return {
|
|
73
73
|
data: {
|
|
74
74
|
users: [],
|
|
75
75
|
posts: [{ title: "bazinga" }, { title: "kittens" }]
|
|
76
76
|
}
|
|
77
77
|
};
|
|
78
|
-
};
|
|
78
|
+
});
|
|
79
79
|
render(
|
|
80
80
|
/* @__PURE__ */ React.createElement(
|
|
81
81
|
GraphQLHooksProvider,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/web",
|
|
3
|
-
"version": "4.0.0-canary.
|
|
3
|
+
"version": "4.0.0-canary.13656+8a19315ca",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -144,8 +144,8 @@
|
|
|
144
144
|
},
|
|
145
145
|
"dependencies": {
|
|
146
146
|
"@apollo/client": "3.13.9",
|
|
147
|
-
"@cedarjs/auth": "4.0.0-canary.
|
|
148
|
-
"@cedarjs/server-store": "4.0.0-canary.
|
|
147
|
+
"@cedarjs/auth": "4.0.0-canary.13656",
|
|
148
|
+
"@cedarjs/server-store": "4.0.0-canary.13656",
|
|
149
149
|
"@dr.pogodin/react-helmet": "2.0.4",
|
|
150
150
|
"@whatwg-node/fetch": "0.10.13",
|
|
151
151
|
"apollo-upload-client": "18.0.1",
|
|
@@ -164,8 +164,8 @@
|
|
|
164
164
|
"@babel/core": "^7.26.10",
|
|
165
165
|
"@babel/plugin-transform-runtime": "7.29.0",
|
|
166
166
|
"@babel/runtime": "7.29.2",
|
|
167
|
-
"@cedarjs/framework-tools": "4.0.0-canary.
|
|
168
|
-
"@cedarjs/internal": "4.0.0-canary.
|
|
167
|
+
"@cedarjs/framework-tools": "4.0.0-canary.13656",
|
|
168
|
+
"@cedarjs/internal": "4.0.0-canary.13656",
|
|
169
169
|
"@rollup/plugin-babel": "6.1.0",
|
|
170
170
|
"@testing-library/jest-dom": "6.9.1",
|
|
171
171
|
"@testing-library/react": "14.3.1",
|
|
@@ -189,5 +189,5 @@
|
|
|
189
189
|
"publishConfig": {
|
|
190
190
|
"access": "public"
|
|
191
191
|
},
|
|
192
|
-
"gitHead": "
|
|
192
|
+
"gitHead": "8a19315ca33a674f71575730b73169c48b6a48dd"
|
|
193
193
|
}
|