@burdenoff/microfe-vibecontrols 2026.522.3 → 2026.522.4
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/node_modules/@apollo/client/errors/ServerError.js +17 -0
- package/dist/node_modules/@apollo/client/errors/ServerError.js.map +1 -0
- package/dist/node_modules/@apollo/client/errors/ServerParseError.js +17 -0
- package/dist/node_modules/@apollo/client/errors/ServerParseError.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/batch/batchLink.js +28 -0
- package/dist/node_modules/@apollo/client/link/batch/batchLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/batch/batching.js +70 -0
- package/dist/node_modules/@apollo/client/link/batch/batching.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/batch-http/BaseBatchHttpLink.js +74 -0
- package/dist/node_modules/@apollo/client/link/batch-http/BaseBatchHttpLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/batch-http/batchHttpLink.js +17 -0
- package/dist/node_modules/@apollo/client/link/batch-http/batchHttpLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/client-awareness/ClientAwarenessLink.js +32 -0
- package/dist/node_modules/@apollo/client/link/client-awareness/ClientAwarenessLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +52 -0
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/http/checkFetcher.js +9 -0
- package/dist/node_modules/@apollo/client/link/http/checkFetcher.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js +45 -0
- package/dist/node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js +60 -0
- package/dist/node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/http/selectURI.js +6 -0
- package/dist/node_modules/@apollo/client/link/http/selectURI.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js +34 -0
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -0
- package/dist/node_modules/@apollo/client/link/utils/filterOperationVariables.js +14 -0
- package/dist/node_modules/@apollo/client/link/utils/filterOperationVariables.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +6 -0
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js +16 -0
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js +19 -0
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +21 -0
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/compact.js +14 -0
- package/dist/node_modules/@apollo/client/utilities/internal/compact.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +9 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +9 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +8 -0
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +9 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +10 -0
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +10 -0
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +23 -0
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +10 -0
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -0
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js +57 -0
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -0
- package/dist/node_modules/@apollo/client/version.js +6 -0
- package/dist/node_modules/@apollo/client/version.js.map +1 -0
- package/dist/node_modules/@wry/caches/lib/weak.js +67 -0
- package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -0
- package/dist/node_modules/@wry/trie/lib/index.js +53 -0
- package/dist/node_modules/@wry/trie/lib/index.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +21 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +78 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +117 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +93 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js +12 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +9 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/throwError.js +17 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/throwError.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +16 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +8 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +13 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +11 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +11 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +22 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +8 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +8 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +6 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +13 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +14 -0
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -0
- package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js +52 -0
- package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/pages/AgentsPage.js +242 -239
- package/dist/pages/AgentsPage.js.map +1 -1
- package/dist/pages/CatalogPage.js +146 -98
- package/dist/pages/CatalogPage.js.map +1 -1
- package/dist/pages/ComponentsPage.js +163 -117
- package/dist/pages/ComponentsPage.js.map +1 -1
- package/dist/pages/TemplatesPage.js +74 -26
- package/dist/pages/TemplatesPage.js.map +1 -1
- package/dist/providers/VibeControlsProvider.js +35 -30
- package/dist/providers/VibeControlsProvider.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { brand as e, isBranded as t } from "./utils.js";
|
|
2
|
+
//#region node_modules/@apollo/client/errors/ServerError.js
|
|
3
|
+
var n = class n extends Error {
|
|
4
|
+
static is(e) {
|
|
5
|
+
return t(e, "ServerError");
|
|
6
|
+
}
|
|
7
|
+
response;
|
|
8
|
+
statusCode;
|
|
9
|
+
bodyText;
|
|
10
|
+
constructor(t, r) {
|
|
11
|
+
super(t), this.name = "ServerError", this.response = r.response, this.statusCode = r.response.status, this.bodyText = r.bodyText, e(this), Object.setPrototypeOf(this, n.prototype);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { n as ServerError };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=ServerError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerError.js","names":[],"sources":["../../../../../node_modules/@apollo/client/errors/ServerError.js"],"sourcesContent":["import { brand, isBranded } from \"./utils.js\";\n/**\n * Represents an error when a non-200 HTTP status code is returned from the\n * server according to the [GraphQL Over HTTP specification](https://graphql.github.io/graphql-over-http/draft/). This error\n * contains the full server response, including status code and body text.\n *\n * @remarks\n *\n * This error occurs when your GraphQL server responds with an HTTP status code\n * other than 200 (such as 4xx or 5xx status codes) with any media type other\n * than [`application/graphql-response+json`](https://graphql.github.io/graphql-over-http/draft/#sec-application-graphql-response-json).\n *\n * Servers that return non-200 status codes with other media types are not\n * guaranteed to contain a well-formed GraphQL response and may indicate issues\n * at the HTTP level, such as authentication failures, server unavailability,\n * or other HTTP-level problems.\n *\n * @example\n *\n * ```ts\n * import { ServerError } from \"@apollo/client/errors\";\n *\n * // Check if an error is a ServerError instance\n * if (ServerError.is(error)) {\n * console.log(`Server returned status: ${error.statusCode}`);\n * console.log(`Response body: ${error.bodyText}`);\n *\n * // Handle specific status codes\n * if (error.statusCode === 401) {\n * // Handle unauthorized access\n * }\n * }\n * ```\n */\nexport class ServerError extends Error {\n /**\n * A method that determines whether an error is a `ServerError` object. This\n * method enables TypeScript to narrow the error type.\n *\n * @example\n *\n * ```ts\n * if (ServerError.is(error)) {\n * // TypeScript now knows `error` is a ServerError object\n * console.log(error.errors);\n * }\n * ```\n */\n static is(error) {\n return isBranded(error, \"ServerError\");\n }\n /**\n * The raw [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) object provided by the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).\n */\n response;\n /**\n * The status code returned by the server in the response. This is provided as\n * a shortcut for `response.status`.\n */\n statusCode;\n /**\n * The raw response body text.\n */\n bodyText;\n constructor(message, options) {\n super(message);\n this.name = \"ServerError\";\n this.response = options.response;\n this.statusCode = options.response.status;\n this.bodyText = options.bodyText;\n brand(this);\n Object.setPrototypeOf(this, ServerError.prototype);\n }\n}\n//# sourceMappingURL=ServerError.js.map\n"],"x_google_ignoreList":[0],"mappings":";;AAkCA,IAAa,IAAb,MAAa,UAAoB,MAAM;CAcnC,OAAO,GAAG,GAAO;AACb,SAAO,EAAU,GAAO,cAAc;;CAK1C;CAKA;CAIA;CACA,YAAY,GAAS,GAAS;AAO1B,EANA,MAAM,EAAQ,EACd,KAAK,OAAO,eACZ,KAAK,WAAW,EAAQ,UACxB,KAAK,aAAa,EAAQ,SAAS,QACnC,KAAK,WAAW,EAAQ,UACxB,EAAM,KAAK,EACX,OAAO,eAAe,MAAM,EAAY,UAAU"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { brand as e, isBranded as t } from "./utils.js";
|
|
2
|
+
//#region node_modules/@apollo/client/errors/ServerParseError.js
|
|
3
|
+
var n = class n extends Error {
|
|
4
|
+
static is(e) {
|
|
5
|
+
return t(e, "ServerParseError");
|
|
6
|
+
}
|
|
7
|
+
response;
|
|
8
|
+
statusCode;
|
|
9
|
+
bodyText;
|
|
10
|
+
constructor(t, r) {
|
|
11
|
+
super(t instanceof Error ? t.message : "Could not parse server response", { cause: t }), this.name = "ServerParseError", this.response = r.response, this.statusCode = r.response.status, this.bodyText = r.bodyText, e(this), Object.setPrototypeOf(this, n.prototype);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { n as ServerParseError };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=ServerParseError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ServerParseError.js","names":[],"sources":["../../../../../node_modules/@apollo/client/errors/ServerParseError.js"],"sourcesContent":["import { brand, isBranded } from \"./utils.js\";\n/**\n * Represents a failure to parse the response as JSON from the server. This\n * error helps debug issues where the server returns malformed JSON or non-JSON\n * content.\n *\n * @remarks\n *\n * This error occurs when Apollo Client receives a response from the server but\n * cannot parse it as valid JSON. This typically happens when the server returns\n * HTML error pages, plain text responses, or malformed JSON instead of the\n * expected GraphQL JSON response format.\n *\n * @example\n *\n * ```ts\n * import { ServerParseError } from \"@apollo/client/errors\";\n *\n * // Check if an error is a ServerParseError instance\n * if (ServerParseError.is(error)) {\n * console.log(`Failed to parse response from ${error.response.url}`);\n * console.log(`Raw response: ${error.bodyText}`);\n * console.log(`Status code: ${error.statusCode}`);\n *\n * // Access the original parse error\n * console.log(`Parse error: ${error.cause}`);\n * }\n * ```\n */\nexport class ServerParseError extends Error {\n /**\n * A method that determines whether an error is a `ServerParseError`\n * object. This method enables TypeScript to narrow the error type.\n *\n * @example\n *\n * ```ts\n * if (ServerParseError.is(error)) {\n * // TypeScript now knows `error` is a ServerParseError object\n * console.log(error.statusCode);\n * }\n * ```\n */\n static is(error) {\n return isBranded(error, \"ServerParseError\");\n }\n /**\n * The raw [`Response`](https://developer.mozilla.org/en-US/docs/Web/API/Response) object provided by the [Fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API).\n */\n response;\n /**\n * The status code returned by the server in the response. This is provided\n * as a shortcut for `response.status`.\n */\n statusCode;\n /**\n * The raw response body text.\n */\n bodyText;\n constructor(originalParseError, options) {\n super(originalParseError instanceof Error ?\n originalParseError.message\n : \"Could not parse server response\", { cause: originalParseError });\n this.name = \"ServerParseError\";\n this.response = options.response;\n this.statusCode = options.response.status;\n this.bodyText = options.bodyText;\n brand(this);\n Object.setPrototypeOf(this, ServerParseError.prototype);\n }\n}\n//# sourceMappingURL=ServerParseError.js.map\n"],"x_google_ignoreList":[0],"mappings":";;AA6BA,IAAa,IAAb,MAAa,UAAyB,MAAM;CAcxC,OAAO,GAAG,GAAO;AACb,SAAO,EAAU,GAAO,mBAAmB;;CAK/C;CAKA;CAIA;CACA,YAAY,GAAoB,GAAS;AASrC,EARA,MAAM,aAA8B,QAChC,EAAmB,UACjB,mCAAmC,EAAE,OAAO,GAAoB,CAAC,EACvE,KAAK,OAAO,oBACZ,KAAK,WAAW,EAAQ,UACxB,KAAK,aAAa,EAAQ,SAAS,QACnC,KAAK,WAAW,EAAQ,UACxB,EAAM,KAAK,EACX,OAAO,eAAe,MAAM,EAAiB,UAAU"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EMPTY as e } from "../../../../rxjs/dist/esm5/internal/observable/empty.js";
|
|
2
|
+
import { ApolloLink as t } from "../core/ApolloLink.js";
|
|
3
|
+
import { OperationBatcher as n } from "./batching.js";
|
|
4
|
+
//#region node_modules/@apollo/client/link/batch/batchLink.js
|
|
5
|
+
var r = class extends t {
|
|
6
|
+
batcher;
|
|
7
|
+
constructor(t) {
|
|
8
|
+
super();
|
|
9
|
+
let { batchDebounce: r, batchInterval: i = 10, batchMax: a = 0, batchHandler: o = () => e, batchKey: s = () => "" } = t || {};
|
|
10
|
+
this.batcher = new n({
|
|
11
|
+
batchDebounce: r,
|
|
12
|
+
batchInterval: i,
|
|
13
|
+
batchMax: a,
|
|
14
|
+
batchHandler: o,
|
|
15
|
+
batchKey: s
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
request(e, t) {
|
|
19
|
+
return this.batcher.enqueueRequest({
|
|
20
|
+
operation: e,
|
|
21
|
+
forward: t
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
//#endregion
|
|
26
|
+
export { r as BatchLink };
|
|
27
|
+
|
|
28
|
+
//# sourceMappingURL=batchLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batchLink.js","names":[],"sources":["../../../../../../node_modules/@apollo/client/link/batch/batchLink.js"],"sourcesContent":["import { EMPTY } from \"rxjs\";\nimport { ApolloLink } from \"@apollo/client/link\";\nimport { OperationBatcher } from \"./batching.js\";\n/**\n * `BatchLink` is a non-terminating link that provides the core batching\n * functionality for grouping multiple GraphQL operations into batches based\n * on configurable timing and key-based grouping strategies. It serves as a base\n * link to `BatchHttpLink`.\n *\n * @remarks\n *\n * > [!NOTE]\n * > You will not generally use `BatchLink` on your own unless you need to\n * > provide batching capabilities to third-party terminating links. Prefer\n * > using `BatchHttpLink` to batch GraphQL operations over HTTP.\n *\n * @example\n *\n * ```ts\n * import { BatchLink } from \"@apollo/client/link/batch\";\n *\n * const link = new BatchLink({\n * batchInterval: 20,\n * batchMax: 5,\n * batchHandler: (operations, forwards) => {\n * // Custom logic to process batch of operations\n * return handleBatch(operations, forwards);\n * },\n * });\n * ```\n */\nexport class BatchLink extends ApolloLink {\n batcher;\n constructor(options) {\n super();\n const { batchDebounce, batchInterval = 10, batchMax = 0, batchHandler = () => EMPTY, batchKey = () => \"\", } = options || {};\n this.batcher = new OperationBatcher({\n batchDebounce,\n batchInterval,\n batchMax,\n batchHandler,\n batchKey,\n });\n }\n request(operation, forward) {\n return this.batcher.enqueueRequest({ operation, forward });\n }\n}\n//# sourceMappingURL=batchLink.js.map"],"x_google_ignoreList":[0],"mappings":";;;;AA+BA,IAAa,IAAb,cAA+B,EAAW;CACtC;CACA,YAAY,GAAS;AACjB,SAAO;EACP,IAAM,EAAE,kBAAe,mBAAgB,IAAI,cAAW,GAAG,wBAAqB,GAAO,oBAAiB,OAAQ,KAAW,EAAE;AAC3H,OAAK,UAAU,IAAI,EAAiB;GAChC;GACA;GACA;GACA;GACA;GACH,CAAC;;CAEN,QAAQ,GAAW,GAAS;AACxB,SAAO,KAAK,QAAQ,eAAe;GAAE;GAAW;GAAS,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Observable as e } from "../../../../rxjs/dist/esm5/internal/Observable.js";
|
|
2
|
+
//#region node_modules/@apollo/client/link/batch/batching.js
|
|
3
|
+
var t = class {
|
|
4
|
+
batchesByKey = /* @__PURE__ */ new Map();
|
|
5
|
+
scheduledBatchTimerByKey = /* @__PURE__ */ new Map();
|
|
6
|
+
batchDebounce;
|
|
7
|
+
batchInterval;
|
|
8
|
+
batchMax;
|
|
9
|
+
batchHandler;
|
|
10
|
+
batchKey;
|
|
11
|
+
constructor({ batchDebounce: e, batchInterval: t, batchMax: n, batchHandler: r, batchKey: i }) {
|
|
12
|
+
this.batchDebounce = e, this.batchInterval = t, this.batchMax = n || 0, this.batchHandler = r, this.batchKey = i || (() => "");
|
|
13
|
+
}
|
|
14
|
+
enqueueRequest(t) {
|
|
15
|
+
let n = {
|
|
16
|
+
...t,
|
|
17
|
+
next: [],
|
|
18
|
+
error: [],
|
|
19
|
+
complete: [],
|
|
20
|
+
subscribers: /* @__PURE__ */ new Set()
|
|
21
|
+
}, r = this.batchKey(t.operation);
|
|
22
|
+
return n.observable ||= new e((e) => {
|
|
23
|
+
let t = this.batchesByKey.get(r);
|
|
24
|
+
t || this.batchesByKey.set(r, t = /* @__PURE__ */ new Set());
|
|
25
|
+
let i = t.size === 0, a = n.subscribers.size === 0;
|
|
26
|
+
return n.subscribers.add(e), a && t.add(n), e.next && n.next.push(e.next.bind(e)), e.error && n.error.push(e.error.bind(e)), e.complete && n.complete.push(e.complete.bind(e)), (i || this.batchDebounce) && this.scheduleQueueConsumption(r), t.size === this.batchMax && this.consumeQueue(r), () => {
|
|
27
|
+
n.subscribers.delete(e) && n.subscribers.size < 1 && t.delete(n) && t.size < 1 && (this.consumeQueue(r), t.subscription?.unsubscribe());
|
|
28
|
+
};
|
|
29
|
+
}), n.observable;
|
|
30
|
+
}
|
|
31
|
+
consumeQueue(e = "") {
|
|
32
|
+
let t = this.batchesByKey.get(e);
|
|
33
|
+
if (this.batchesByKey.delete(e), !t || !t.size) return;
|
|
34
|
+
let n = [], r = [], i = [], a = [], o = [], s = [];
|
|
35
|
+
t.forEach((e) => {
|
|
36
|
+
n.push(e.operation), r.push(e.forward), i.push(e.observable), a.push(e.next), o.push(e.error), s.push(e.complete);
|
|
37
|
+
});
|
|
38
|
+
let c = this.batchHandler(n, r), l = (e) => {
|
|
39
|
+
o.forEach((t) => {
|
|
40
|
+
t && t.forEach((t) => t(e));
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
return t.subscription = c.subscribe({
|
|
44
|
+
next: (e) => {
|
|
45
|
+
if (Array.isArray(e) || (e = [e]), a.length !== e.length) {
|
|
46
|
+
let t = /* @__PURE__ */ Error(`server returned results with length ${e.length}, expected length of ${a.length}`);
|
|
47
|
+
return t.result = e, l(t);
|
|
48
|
+
}
|
|
49
|
+
e.forEach((e, t) => {
|
|
50
|
+
a[t] && a[t].forEach((t) => t(e));
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
error: l,
|
|
54
|
+
complete: () => {
|
|
55
|
+
s.forEach((e) => {
|
|
56
|
+
e && e.forEach((e) => e());
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
}), i;
|
|
60
|
+
}
|
|
61
|
+
scheduleQueueConsumption(e) {
|
|
62
|
+
clearTimeout(this.scheduledBatchTimerByKey.get(e)), this.scheduledBatchTimerByKey.set(e, setTimeout(() => {
|
|
63
|
+
this.consumeQueue(e), this.scheduledBatchTimerByKey.delete(e);
|
|
64
|
+
}, this.batchInterval));
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { t as OperationBatcher };
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=batching.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batching.js","names":[],"sources":["../../../../../../node_modules/@apollo/client/link/batch/batching.js"],"sourcesContent":["import { Observable } from \"rxjs\";\n// QueryBatcher doesn't fire requests immediately. Requests that were enqueued within\n// a certain amount of time (configurable through `batchInterval`) will be batched together\n// into one query.\nexport class OperationBatcher {\n // Queue on which the QueryBatcher will operate on a per-tick basis.\n batchesByKey = new Map();\n scheduledBatchTimerByKey = new Map();\n batchDebounce;\n batchInterval;\n batchMax;\n //This function is called to the queries in the queue to the server.\n batchHandler;\n batchKey;\n constructor({ batchDebounce, batchInterval, batchMax, batchHandler, batchKey, }) {\n this.batchDebounce = batchDebounce;\n this.batchInterval = batchInterval;\n this.batchMax = batchMax || 0;\n this.batchHandler = batchHandler;\n this.batchKey = batchKey || (() => \"\");\n }\n enqueueRequest(request) {\n const requestCopy = {\n ...request,\n next: [],\n error: [],\n complete: [],\n subscribers: new Set(),\n };\n const key = this.batchKey(request.operation);\n if (!requestCopy.observable) {\n requestCopy.observable = new Observable((observer) => {\n let batch = this.batchesByKey.get(key);\n if (!batch)\n this.batchesByKey.set(key, (batch = new Set()));\n // These booleans seem to me (@benjamn) like they might always be the\n // same (and thus we could do with only one of them), but I'm not 100%\n // sure about that.\n const isFirstEnqueuedRequest = batch.size === 0;\n const isFirstSubscriber = requestCopy.subscribers.size === 0;\n requestCopy.subscribers.add(observer);\n if (isFirstSubscriber) {\n batch.add(requestCopy);\n }\n // called for each subscriber, so need to save all listeners (next, error, complete)\n if (observer.next) {\n requestCopy.next.push(observer.next.bind(observer));\n }\n if (observer.error) {\n requestCopy.error.push(observer.error.bind(observer));\n }\n if (observer.complete) {\n requestCopy.complete.push(observer.complete.bind(observer));\n }\n // The first enqueued request triggers the queue consumption after `batchInterval` milliseconds.\n if (isFirstEnqueuedRequest || this.batchDebounce) {\n this.scheduleQueueConsumption(key);\n }\n // When amount of requests reaches `batchMax`, trigger the queue consumption without waiting on the `batchInterval`.\n if (batch.size === this.batchMax) {\n this.consumeQueue(key);\n }\n return () => {\n // If this is last subscriber for this request, remove request from queue\n if (requestCopy.subscribers.delete(observer) &&\n requestCopy.subscribers.size < 1) {\n // If this is last request from queue, remove queue entirely\n if (batch.delete(requestCopy) && batch.size < 1) {\n this.consumeQueue(key);\n // If queue was in flight, cancel it\n batch.subscription?.unsubscribe();\n }\n }\n };\n });\n }\n return requestCopy.observable;\n }\n // Consumes the queue.\n // Returns a list of promises (one for each query).\n consumeQueue(key = \"\") {\n const batch = this.batchesByKey.get(key);\n // Delete this batch and process it below.\n this.batchesByKey.delete(key);\n if (!batch || !batch.size) {\n // No requests to be processed.\n return;\n }\n const operations = [];\n const forwards = [];\n const observables = [];\n const nexts = [];\n const errors = [];\n const completes = [];\n // Even though batch is a Set, it preserves the order of first insertion\n // when iterating (per ECMAScript specification), so these requests will be\n // handled in the order they were enqueued (minus any deleted ones).\n batch.forEach((request) => {\n operations.push(request.operation);\n forwards.push(request.forward);\n observables.push(request.observable);\n nexts.push(request.next);\n errors.push(request.error);\n completes.push(request.complete);\n });\n const batchedObservable = this.batchHandler(operations, forwards);\n const onError = (error) => {\n //each callback list in batch\n errors.forEach((rejecters) => {\n if (rejecters) {\n //each subscriber to request\n rejecters.forEach((e) => e(error));\n }\n });\n };\n batch.subscription = batchedObservable.subscribe({\n next: (results) => {\n if (!Array.isArray(results)) {\n results = [results];\n }\n if (nexts.length !== results.length) {\n const error = new Error(`server returned results with length ${results.length}, expected length of ${nexts.length}`);\n error.result = results;\n return onError(error);\n }\n results.forEach((result, index) => {\n if (nexts[index]) {\n nexts[index].forEach((next) => next(result));\n }\n });\n },\n error: onError,\n complete: () => {\n completes.forEach((complete) => {\n if (complete) {\n //each subscriber to request\n complete.forEach((c) => c());\n }\n });\n },\n });\n return observables;\n }\n scheduleQueueConsumption(key) {\n clearTimeout(this.scheduledBatchTimerByKey.get(key));\n this.scheduledBatchTimerByKey.set(key, setTimeout(() => {\n this.consumeQueue(key);\n this.scheduledBatchTimerByKey.delete(key);\n }, this.batchInterval));\n }\n}\n//# sourceMappingURL=batching.js.map"],"x_google_ignoreList":[0],"mappings":";;AAIA,IAAa,IAAb,MAA8B;CAE1B,+BAAe,IAAI,KAAK;CACxB,2CAA2B,IAAI,KAAK;CACpC;CACA;CACA;CAEA;CACA;CACA,YAAY,EAAE,kBAAe,kBAAe,aAAU,iBAAc,eAAa;AAK7E,EAJA,KAAK,gBAAgB,GACrB,KAAK,gBAAgB,GACrB,KAAK,WAAW,KAAY,GAC5B,KAAK,eAAe,GACpB,KAAK,WAAW,YAAmB;;CAEvC,eAAe,GAAS;EACpB,IAAM,IAAc;GAChB,GAAG;GACH,MAAM,EAAE;GACR,OAAO,EAAE;GACT,UAAU,EAAE;GACZ,6BAAa,IAAI,KAAK;GACzB,EACK,IAAM,KAAK,SAAS,EAAQ,UAAU;AA+C5C,SA9CA,AACI,EAAY,eAAa,IAAI,GAAY,MAAa;GAClD,IAAI,IAAQ,KAAK,aAAa,IAAI,EAAI;AACtC,GAAK,KACD,KAAK,aAAa,IAAI,GAAM,oBAAQ,IAAI,KAAK,CAAE;GAInD,IAAM,IAAyB,EAAM,SAAS,GACxC,IAAoB,EAAY,YAAY,SAAS;AAuB3D,UAtBA,EAAY,YAAY,IAAI,EAAS,EACjC,KACA,EAAM,IAAI,EAAY,EAGtB,EAAS,QACT,EAAY,KAAK,KAAK,EAAS,KAAK,KAAK,EAAS,CAAC,EAEnD,EAAS,SACT,EAAY,MAAM,KAAK,EAAS,MAAM,KAAK,EAAS,CAAC,EAErD,EAAS,YACT,EAAY,SAAS,KAAK,EAAS,SAAS,KAAK,EAAS,CAAC,GAG3D,KAA0B,KAAK,kBAC/B,KAAK,yBAAyB,EAAI,EAGlC,EAAM,SAAS,KAAK,YACpB,KAAK,aAAa,EAAI,QAEb;AAET,IAAI,EAAY,YAAY,OAAO,EAAS,IACxC,EAAY,YAAY,OAAO,KAE3B,EAAM,OAAO,EAAY,IAAI,EAAM,OAAO,MAC1C,KAAK,aAAa,EAAI,EAEtB,EAAM,cAAc,aAAa;;IAI/C,EAEC,EAAY;;CAIvB,aAAa,IAAM,IAAI;EACnB,IAAM,IAAQ,KAAK,aAAa,IAAI,EAAI;AAGxC,MADA,KAAK,aAAa,OAAO,EAAI,EACzB,CAAC,KAAS,CAAC,EAAM,KAEjB;EAEJ,IAAM,IAAa,EAAE,EACf,IAAW,EAAE,EACb,IAAc,EAAE,EAChB,IAAQ,EAAE,EACV,IAAS,EAAE,EACX,IAAY,EAAE;AAIpB,IAAM,SAAS,MAAY;AAMvB,GALA,EAAW,KAAK,EAAQ,UAAU,EAClC,EAAS,KAAK,EAAQ,QAAQ,EAC9B,EAAY,KAAK,EAAQ,WAAW,EACpC,EAAM,KAAK,EAAQ,KAAK,EACxB,EAAO,KAAK,EAAQ,MAAM,EAC1B,EAAU,KAAK,EAAQ,SAAS;IAClC;EACF,IAAM,IAAoB,KAAK,aAAa,GAAY,EAAS,EAC3D,KAAW,MAAU;AAEvB,KAAO,SAAS,MAAc;AAC1B,IAAI,KAEA,EAAU,SAAS,MAAM,EAAE,EAAM,CAAC;KAExC;;AA4BN,SA1BA,EAAM,eAAe,EAAkB,UAAU;GAC7C,OAAO,MAAY;AAIf,QAHK,MAAM,QAAQ,EAAQ,KACvB,IAAU,CAAC,EAAQ,GAEnB,EAAM,WAAW,EAAQ,QAAQ;KACjC,IAAM,IAAQ,gBAAI,MAAM,uCAAuC,EAAQ,OAAO,uBAAuB,EAAM,SAAS;AAEpH,YADA,EAAM,SAAS,GACR,EAAQ,EAAM;;AAEzB,MAAQ,SAAS,GAAQ,MAAU;AAC/B,KAAI,EAAM,MACN,EAAM,GAAO,SAAS,MAAS,EAAK,EAAO,CAAC;MAElD;;GAEN,OAAO;GACP,gBAAgB;AACZ,MAAU,SAAS,MAAa;AAC5B,KAAI,KAEA,EAAS,SAAS,MAAM,GAAG,CAAC;MAElC;;GAET,CAAC,EACK;;CAEX,yBAAyB,GAAK;AAE1B,EADA,aAAa,KAAK,yBAAyB,IAAI,EAAI,CAAC,EACpD,KAAK,yBAAyB,IAAI,GAAK,iBAAiB;AAEpD,GADA,KAAK,aAAa,EAAI,EACtB,KAAK,yBAAyB,OAAO,EAAI;KAC1C,KAAK,cAAc,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Observable as e } from "../../../../rxjs/dist/esm5/internal/Observable.js";
|
|
2
|
+
import { throwError as t } from "../../../../rxjs/dist/esm5/internal/observable/throwError.js";
|
|
3
|
+
import { maybe as n } from "../../utilities/internal/globals/maybe.js";
|
|
4
|
+
import { compact as r } from "../../utilities/internal/compact.js";
|
|
5
|
+
import { filterOperationVariables as i } from "../utils/filterOperationVariables.js";
|
|
6
|
+
import { ApolloLink as a } from "../core/ApolloLink.js";
|
|
7
|
+
import { BatchLink as o } from "../batch/batchLink.js";
|
|
8
|
+
import { parseAndCheckHttpResponse as s } from "../http/parseAndCheckHttpResponse.js";
|
|
9
|
+
import { defaultPrinter as c, fallbackHttpConfig as l, selectHttpOptionsAndBodyInternal as u } from "../http/selectHttpOptionsAndBody.js";
|
|
10
|
+
import "../http/checkFetcher.js";
|
|
11
|
+
import { selectURI as d } from "../http/selectURI.js";
|
|
12
|
+
//#region node_modules/@apollo/client/link/batch-http/BaseBatchHttpLink.js
|
|
13
|
+
var f = n(() => fetch), p = class extends a {
|
|
14
|
+
batchDebounce;
|
|
15
|
+
batchInterval;
|
|
16
|
+
batchMax;
|
|
17
|
+
batcher;
|
|
18
|
+
constructor(a = {}) {
|
|
19
|
+
super();
|
|
20
|
+
let { uri: p = "/graphql", fetch: m, print: h = c, includeExtensions: g, preserveHeaderCase: _, batchInterval: v, batchDebounce: y, batchMax: b, batchKey: x, includeUnusedVariables: S = !1, ...C } = a, w = {
|
|
21
|
+
http: r({
|
|
22
|
+
includeExtensions: g,
|
|
23
|
+
preserveHeaderCase: _
|
|
24
|
+
}),
|
|
25
|
+
options: C.fetchOptions,
|
|
26
|
+
credentials: C.credentials,
|
|
27
|
+
headers: C.headers
|
|
28
|
+
};
|
|
29
|
+
this.batchDebounce = y, this.batchInterval = v || 10, this.batchMax = b || 10, x ||= ((e) => {
|
|
30
|
+
let t = e.getContext(), n = {
|
|
31
|
+
http: t.http,
|
|
32
|
+
options: t.fetchOptions,
|
|
33
|
+
credentials: t.credentials,
|
|
34
|
+
headers: t.headers
|
|
35
|
+
};
|
|
36
|
+
return d(e, p) + JSON.stringify(n);
|
|
37
|
+
}), this.batcher = new o({
|
|
38
|
+
batchDebounce: this.batchDebounce,
|
|
39
|
+
batchInterval: this.batchInterval,
|
|
40
|
+
batchMax: this.batchMax,
|
|
41
|
+
batchKey: x,
|
|
42
|
+
batchHandler: (r) => {
|
|
43
|
+
let a = d(r[0], p), o = r[0].getContext(), c = {
|
|
44
|
+
http: o.http,
|
|
45
|
+
options: o.fetchOptions,
|
|
46
|
+
credentials: o.credentials,
|
|
47
|
+
headers: o.headers
|
|
48
|
+
}, g = r.map((e) => {
|
|
49
|
+
let t = u(e, h, l, w, c);
|
|
50
|
+
return t.body.variables && !S && (t.body.variables = i(t.body.variables, e.query)), t;
|
|
51
|
+
}), _ = g.map(({ body: e }) => e), v = g[0].options;
|
|
52
|
+
if (v.method === "GET") return t(() => /* @__PURE__ */ Error("apollo-link-batch-http does not support GET requests"));
|
|
53
|
+
try {
|
|
54
|
+
v.body = JSON.stringify(_);
|
|
55
|
+
} catch (e) {
|
|
56
|
+
return t(() => e);
|
|
57
|
+
}
|
|
58
|
+
let y;
|
|
59
|
+
return !v.signal && typeof AbortController < "u" && (y = new AbortController(), v.signal = y.signal), new e((e) => ((m || n(() => fetch) || f)(a, v).then((e) => (r.forEach((t) => t.setContext({ response: e })), e)).then(s(r)).then((t) => (y = void 0, e.next(t), e.complete(), t)).catch((t) => {
|
|
60
|
+
y = void 0, e.error(t);
|
|
61
|
+
}), () => {
|
|
62
|
+
y && y.abort();
|
|
63
|
+
}));
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
request(e, t) {
|
|
68
|
+
return this.batcher.request(e, t);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
//#endregion
|
|
72
|
+
export { p as BaseBatchHttpLink };
|
|
73
|
+
|
|
74
|
+
//# sourceMappingURL=BaseBatchHttpLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BaseBatchHttpLink.js","names":[],"sources":["../../../../../../node_modules/@apollo/client/link/batch-http/BaseBatchHttpLink.js"],"sourcesContent":["import { Observable, throwError } from \"rxjs\";\nimport { ApolloLink } from \"@apollo/client/link\";\nimport { BatchLink } from \"@apollo/client/link/batch\";\nimport { checkFetcher, defaultPrinter, fallbackHttpConfig, parseAndCheckHttpResponse, selectHttpOptionsAndBodyInternal, selectURI, } from \"@apollo/client/link/http\";\nimport { filterOperationVariables } from \"@apollo/client/link/utils\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { compact } from \"@apollo/client/utilities/internal\";\nimport { maybe } from \"@apollo/client/utilities/internal/globals\";\nconst backupFetch = maybe(() => fetch);\n/**\n * `BaseBatchHttpLink` is a terminating link that batches array of individual\n * GraphQL operations into a single HTTP request that's sent to a single GraphQL\n * endpoint. It serves as a base link to `BatchHttpLink`.\n *\n * @remarks\n *\n * > [!NOTE]\n * > Prefer using `BatchHttpLink` over `BaseBatchHttpLink`. Use\n * > `BaseBatchHttpLink` when you need to disable client awareness features and\n * > would like to tree-shake the implementation of `ClientAwarenessLink` out\n * > of your app bundle.\n *\n * @example\n *\n * ```ts\n * import { BaseBatchHttpLink } from \"@apollo/client/link/batch-http\";\n *\n * const link = new BaseBatchHttpLink({\n * uri: \"http://localhost:4000/graphql\",\n * batchMax: 5, // No more than 5 operations per batch\n * batchInterval: 20, // Wait no more than 20ms after first batched operation\n * });\n * ```\n */\nexport class BaseBatchHttpLink extends ApolloLink {\n batchDebounce;\n batchInterval;\n batchMax;\n batcher;\n constructor(options = {}) {\n super();\n let { uri = \"/graphql\", \n // use default global fetch if nothing is passed in\n fetch: preferredFetch, print = defaultPrinter, includeExtensions, preserveHeaderCase, batchInterval, batchDebounce, batchMax, batchKey, includeUnusedVariables = false, ...requestOptions } = options;\n if (__DEV__) {\n // Make sure at least one of preferredFetch, window.fetch, or backupFetch\n // is defined, so requests won't fail at runtime.\n checkFetcher(preferredFetch || backupFetch);\n }\n const linkConfig = {\n http: compact({ includeExtensions, preserveHeaderCase }),\n options: requestOptions.fetchOptions,\n credentials: requestOptions.credentials,\n headers: requestOptions.headers,\n };\n this.batchDebounce = batchDebounce;\n this.batchInterval = batchInterval || 10;\n this.batchMax = batchMax || 10;\n const batchHandler = (operations) => {\n const chosenURI = selectURI(operations[0], uri);\n const context = operations[0].getContext();\n const contextConfig = {\n http: context.http,\n options: context.fetchOptions,\n credentials: context.credentials,\n headers: context.headers,\n };\n //uses fallback, link, and then context to build options\n const optsAndBody = operations.map((operation) => {\n const result = selectHttpOptionsAndBodyInternal(operation, print, fallbackHttpConfig, linkConfig, contextConfig);\n if (result.body.variables && !includeUnusedVariables) {\n result.body.variables = filterOperationVariables(result.body.variables, operation.query);\n }\n return result;\n });\n const loadedBody = optsAndBody.map(({ body }) => body);\n const options = optsAndBody[0].options;\n // There's no spec for using GET with batches.\n if (options.method === \"GET\") {\n return throwError(() => new Error(\"apollo-link-batch-http does not support GET requests\"));\n }\n try {\n options.body = JSON.stringify(loadedBody);\n }\n catch (parseError) {\n return throwError(() => parseError);\n }\n let controller;\n if (!options.signal && typeof AbortController !== \"undefined\") {\n controller = new AbortController();\n options.signal = controller.signal;\n }\n return new Observable((observer) => {\n // Prefer BatchHttpLink.Options.fetch (preferredFetch) if provided, and\n // otherwise fall back to the *current* global window.fetch function\n // (see issue #7832), or (if all else fails) the backupFetch function we\n // saved when this module was first evaluated. This last option protects\n // against the removal of window.fetch, which is unlikely but not\n // impossible.\n const currentFetch = preferredFetch || maybe(() => fetch) || backupFetch;\n currentFetch(chosenURI, options)\n .then((response) => {\n // Make the raw response available in the context.\n operations.forEach((operation) => operation.setContext({ response }));\n return response;\n })\n .then(parseAndCheckHttpResponse(operations))\n .then((result) => {\n controller = undefined;\n // we have data and can send it to back up the link chain\n observer.next(result);\n observer.complete();\n return result;\n })\n .catch((err) => {\n controller = undefined;\n observer.error(err);\n });\n return () => {\n // XXX support canceling this request\n // https://developers.google.com/web/updates/2017/09/abortable-fetch\n if (controller)\n controller.abort();\n };\n });\n };\n batchKey =\n batchKey ||\n ((operation) => {\n const context = operation.getContext();\n const contextConfig = {\n http: context.http,\n options: context.fetchOptions,\n credentials: context.credentials,\n headers: context.headers,\n };\n //may throw error if config not serializable\n return selectURI(operation, uri) + JSON.stringify(contextConfig);\n });\n this.batcher = new BatchLink({\n batchDebounce: this.batchDebounce,\n batchInterval: this.batchInterval,\n batchMax: this.batchMax,\n batchKey,\n batchHandler,\n });\n }\n request(operation, forward) {\n return this.batcher.request(operation, forward);\n }\n}\n//# sourceMappingURL=BaseBatchHttpLink.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;;;;;;AAQA,IAAM,IAAc,QAAY,MAAM,EA0BzB,IAAb,cAAuC,EAAW;CAC9C;CACA;CACA;CACA;CACA,YAAY,IAAU,EAAE,EAAE;AACtB,SAAO;EACP,IAAI,EAAE,SAAM,YAEZ,OAAO,GAAgB,WAAQ,GAAgB,sBAAmB,uBAAoB,kBAAe,kBAAe,aAAU,aAAU,4BAAyB,IAAO,GAAG,MAAmB,GAMxL,IAAa;GACf,MAAM,EAAQ;IAAE;IAAmB;IAAoB,CAAC;GACxD,SAAS,EAAe;GACxB,aAAa,EAAe;GAC5B,SAAS,EAAe;GAC3B;AAqFD,EApFA,KAAK,gBAAgB,GACrB,KAAK,gBAAgB,KAAiB,IACtC,KAAK,WAAW,KAAY,IAqE5B,QAEU,MAAc;GACZ,IAAM,IAAU,EAAU,YAAY,EAChC,IAAgB;IAClB,MAAM,EAAQ;IACd,SAAS,EAAQ;IACjB,aAAa,EAAQ;IACrB,SAAS,EAAQ;IACpB;AAED,UAAO,EAAU,GAAW,EAAI,GAAG,KAAK,UAAU,EAAc;MAE5E,KAAK,UAAU,IAAI,EAAU;GACzB,eAAe,KAAK;GACpB,eAAe,KAAK;GACpB,UAAU,KAAK;GACf;GACA,eAtFkB,MAAe;IACjC,IAAM,IAAY,EAAU,EAAW,IAAI,EAAI,EACzC,IAAU,EAAW,GAAG,YAAY,EACpC,IAAgB;KAClB,MAAM,EAAQ;KACd,SAAS,EAAQ;KACjB,aAAa,EAAQ;KACrB,SAAS,EAAQ;KACpB,EAEK,IAAc,EAAW,KAAK,MAAc;KAC9C,IAAM,IAAS,EAAiC,GAAW,GAAO,GAAoB,GAAY,EAAc;AAIhH,YAHI,EAAO,KAAK,aAAa,CAAC,MAC1B,EAAO,KAAK,YAAY,EAAyB,EAAO,KAAK,WAAW,EAAU,MAAM,GAErF;MACT,EACI,IAAa,EAAY,KAAK,EAAE,cAAW,EAAK,EAChD,IAAU,EAAY,GAAG;AAE/B,QAAI,EAAQ,WAAW,MACnB,QAAO,QAAiB,gBAAI,MAAM,uDAAuD,CAAC;AAE9F,QAAI;AACA,OAAQ,OAAO,KAAK,UAAU,EAAW;aAEtC,GAAY;AACf,YAAO,QAAiB,EAAW;;IAEvC,IAAI;AAKJ,WAJI,CAAC,EAAQ,UAAU,OAAO,kBAAoB,QAC9C,IAAa,IAAI,iBAAiB,EAClC,EAAQ,SAAS,EAAW,SAEzB,IAAI,GAAY,QAOE,KAAkB,QAAY,MAAM,IAAI,GAChD,GAAW,EAAQ,CAC3B,MAAM,OAEP,EAAW,SAAS,MAAc,EAAU,WAAW,EAAE,aAAU,CAAC,CAAC,EAC9D,GACT,CACG,KAAK,EAA0B,EAAW,CAAC,CAC3C,MAAM,OACP,IAAa,KAAA,GAEb,EAAS,KAAK,EAAO,EACrB,EAAS,UAAU,EACZ,GACT,CACG,OAAO,MAAQ;AAEhB,KADA,IAAa,KAAA,GACb,EAAS,MAAM,EAAI;MACrB,QACW;AAGT,KAAI,KACA,EAAW,OAAO;OAE5B;;GAqBL,CAAC;;CAEN,QAAQ,GAAW,GAAS;AACxB,SAAO,KAAK,QAAQ,QAAQ,GAAW,EAAQ"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ApolloLink as e } from "../core/ApolloLink.js";
|
|
2
|
+
import { ClientAwarenessLink as t } from "../client-awareness/ClientAwarenessLink.js";
|
|
3
|
+
import { BaseBatchHttpLink as n } from "./BaseBatchHttpLink.js";
|
|
4
|
+
//#region node_modules/@apollo/client/link/batch-http/batchHttpLink.js
|
|
5
|
+
var r = class extends e {
|
|
6
|
+
constructor(r = {}) {
|
|
7
|
+
let { left: i, right: a, request: o } = e.from([new t(r), new n(r)]);
|
|
8
|
+
super(o), Object.assign(this, {
|
|
9
|
+
left: i,
|
|
10
|
+
right: a
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
//#endregion
|
|
15
|
+
export { r as BatchHttpLink };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=batchHttpLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batchHttpLink.js","names":[],"sources":["../../../../../../node_modules/@apollo/client/link/batch-http/batchHttpLink.js"],"sourcesContent":["import { ApolloLink } from \"@apollo/client/link\";\nimport { ClientAwarenessLink } from \"@apollo/client/link/client-awareness\";\nimport { BaseBatchHttpLink } from \"./BaseBatchHttpLink.js\";\n/**\n * `BatchHttpLink` is a terminating link that batches array of individual\n * GraphQL operations into a single HTTP request that's sent to a single GraphQL\n * endpoint. It combines the functionality of `BaseBatchHttpLink` and\n * `ClientAwarenessLink` into a single link.\n *\n * @remarks\n *\n * If you use `BatchHttpLink` instead of `HttpLink` as your terminating link,\n * Apollo Client automatically batches executed GraphQL operations and transmits\n * them to your server according to the batching options you provide.\n *\n * @example\n *\n * ```ts\n * import { BatchHttpLink } from \"@apollo/client/link/batch-http\";\n *\n * const link = new BatchHttpLink({\n * uri: \"http://localhost:4000/graphql\",\n * batchMax: 5, // No more than 5 operations per batch\n * batchInterval: 20, // Wait no more than 20ms after first batched operation\n * });\n * ```\n */\nexport class BatchHttpLink extends ApolloLink {\n constructor(options = {}) {\n const { left, right, request } = ApolloLink.from([\n new ClientAwarenessLink(options),\n new BaseBatchHttpLink(options),\n ]);\n super(request);\n Object.assign(this, { left, right });\n }\n}\n//# sourceMappingURL=batchHttpLink.js.map"],"x_google_ignoreList":[0],"mappings":";;;;AA2BA,IAAa,IAAb,cAAmC,EAAW;CAC1C,YAAY,IAAU,EAAE,EAAE;EACtB,IAAM,EAAE,SAAM,UAAO,eAAY,EAAW,KAAK,CAC7C,IAAI,EAAoB,EAAQ,EAChC,IAAI,EAAkB,EAAQ,CACjC,CAAC;AAEF,EADA,MAAM,EAAQ,EACd,OAAO,OAAO,MAAM;GAAE;GAAM;GAAO,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { compact as e } from "../../utilities/internal/compact.js";
|
|
2
|
+
import { ApolloLink as t } from "../core/ApolloLink.js";
|
|
3
|
+
//#region node_modules/@apollo/client/link/client-awareness/ClientAwarenessLink.js
|
|
4
|
+
var n = class extends t {
|
|
5
|
+
constructor(t = {}) {
|
|
6
|
+
super((n, r) => {
|
|
7
|
+
let i = n.client, a = i.queryManager.clientOptions, o = n.getContext();
|
|
8
|
+
{
|
|
9
|
+
let { name: r, version: i, transport: s = "headers" } = e({}, a.clientAwareness, t.clientAwareness, o.clientAwareness);
|
|
10
|
+
s === "headers" && n.setContext(({ headers: t }) => ({ headers: e({
|
|
11
|
+
"apollographql-client-name": r,
|
|
12
|
+
"apollographql-client-version": i
|
|
13
|
+
}, t) }));
|
|
14
|
+
}
|
|
15
|
+
{
|
|
16
|
+
let { transport: r = "extensions" } = e({}, a.enhancedClientAwareness, t.enhancedClientAwareness);
|
|
17
|
+
r === "extensions" && (n.extensions = e({ clientLibrary: {
|
|
18
|
+
name: "@apollo/client",
|
|
19
|
+
version: i.version
|
|
20
|
+
} }, n.extensions)), r === "headers" && n.setContext(({ headers: t }) => ({ headers: e({
|
|
21
|
+
"apollographql-library-name": "@apollo/client",
|
|
22
|
+
"apollographql-library-version": i.version
|
|
23
|
+
}, t) }));
|
|
24
|
+
}
|
|
25
|
+
return r(n);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { n as ClientAwarenessLink };
|
|
31
|
+
|
|
32
|
+
//# sourceMappingURL=ClientAwarenessLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClientAwarenessLink.js","names":[],"sources":["../../../../../../node_modules/@apollo/client/link/client-awareness/ClientAwarenessLink.js"],"sourcesContent":["import { ApolloLink } from \"@apollo/client/link\";\nimport { compact } from \"@apollo/client/utilities/internal\";\n/**\n * `ClientAwarenessLink` provides support for providing client awareness\n * features.\n *\n * @remarks\n *\n * Client awareness adds identifying information about the client to HTTP\n * requests for use with metrics reporting tools, such as [Apollo GraphOS](https://apollographql.com/docs/graphos/platform).\n * It is included in the functionality of [`HttpLink`](https://apollographql.com/docs/react/api/link/apollo-link-http) by default.\n *\n * Client awareness distinguishes between user-provided client awareness\n * (provided by the `clientAwareness` option) and enhanced client awareness\n * (provided by the `enhancedClientAwareness` option). User-provided client\n * awareness enables you to set a customized client name and version for\n * identification in metrics reporting tools. Enhanced client awareness enables\n * the identification of the Apollo Client package name and version.\n *\n * @example\n *\n * ```ts\n * import { ClientAwarenessLink } from \"@apollo/client/link/client-awareness\";\n *\n * const link = new ClientAwarenessLink({\n * clientAwareness: {\n * name: \"My Client\",\n * version: \"1\",\n * },\n * enhancedClientAwareness: {\n * transport: \"extensions\",\n * },\n * });\n * ```\n */\nexport class ClientAwarenessLink extends ApolloLink {\n constructor(options = {}) {\n super((operation, forward) => {\n const client = operation.client;\n const clientOptions = client[\"queryManager\"].clientOptions;\n const context = operation.getContext();\n {\n const { name, version, transport = \"headers\", } = compact({}, clientOptions.clientAwareness, options.clientAwareness, context.clientAwareness);\n if (transport === \"headers\") {\n operation.setContext(({ headers }) => {\n return {\n headers: compact(\n // setting these first so that they can be overridden by user-provided headers\n {\n \"apollographql-client-name\": name,\n \"apollographql-client-version\": version,\n }, headers),\n };\n });\n }\n }\n {\n const { transport = \"extensions\" } = compact({}, clientOptions.enhancedClientAwareness, options.enhancedClientAwareness);\n if (transport === \"extensions\") {\n operation.extensions = compact(\n // setting these first so that it can be overridden by user-provided extensions\n {\n clientLibrary: {\n name: \"@apollo/client\",\n version: client.version,\n },\n }, operation.extensions);\n }\n if (transport === \"headers\") {\n operation.setContext(({ headers }) => {\n return {\n headers: compact(\n // setting these first so that they can be overridden by user-provided headers\n {\n \"apollographql-library-name\": \"@apollo/client\",\n \"apollographql-library-version\": client.version,\n }, headers),\n };\n });\n }\n }\n return forward(operation);\n });\n }\n}\n//# sourceMappingURL=ClientAwarenessLink.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAmCA,IAAa,IAAb,cAAyC,EAAW;CAChD,YAAY,IAAU,EAAE,EAAE;AACtB,SAAO,GAAW,MAAY;GAC1B,IAAM,IAAS,EAAU,QACnB,IAAgB,EAAO,aAAgB,eACvC,IAAU,EAAU,YAAY;GACtC;IACI,IAAM,EAAE,SAAM,YAAS,eAAY,cAAe,EAAQ,EAAE,EAAE,EAAc,iBAAiB,EAAQ,iBAAiB,EAAQ,gBAAgB;AAC9I,IAAI,MAAc,aACd,EAAU,YAAY,EAAE,kBACb,EACH,SAAS,EAET;KACI,6BAA6B;KAC7B,gCAAgC;KACnC,EAAE,EAAQ,EACd,EACH;;GAGV;IACI,IAAM,EAAE,eAAY,iBAAiB,EAAQ,EAAE,EAAE,EAAc,yBAAyB,EAAQ,wBAAwB;AAWxH,IAVI,MAAc,iBACd,EAAU,aAAa,EAEvB,EACI,eAAe;KACX,MAAM;KACN,SAAS,EAAO;KACnB,EACJ,EAAE,EAAU,WAAW,GAExB,MAAc,aACd,EAAU,YAAY,EAAE,kBACb,EACH,SAAS,EAET;KACI,8BAA8B;KAC9B,iCAAiC,EAAO;KAC3C,EAAE,EAAQ,EACd,EACH;;AAGV,UAAO,EAAQ,EAAU;IAC3B"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { EMPTY as e } from "../../../../rxjs/dist/esm5/internal/observable/empty.js";
|
|
2
|
+
import { newInvariantError as t } from "../../utilities/invariant/index.js";
|
|
3
|
+
import { createOperation as n } from "../utils/createOperation.js";
|
|
4
|
+
//#region node_modules/@apollo/client/link/core/ApolloLink.js
|
|
5
|
+
var r = class r {
|
|
6
|
+
static empty() {
|
|
7
|
+
return new r(() => e);
|
|
8
|
+
}
|
|
9
|
+
static from(e) {
|
|
10
|
+
if (e.length === 0) return r.empty();
|
|
11
|
+
let [t, ...n] = e;
|
|
12
|
+
return t.concat(...n);
|
|
13
|
+
}
|
|
14
|
+
static split(e, t, n = new r((e, t) => t(e))) {
|
|
15
|
+
let i = new r((r, i) => e(r) ? t.request(r, i) : n.request(r, i));
|
|
16
|
+
return Object.assign(i, {
|
|
17
|
+
left: t,
|
|
18
|
+
right: n
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
static execute(t, r, i) {
|
|
22
|
+
return t.request(n(r, i), () => e);
|
|
23
|
+
}
|
|
24
|
+
static concat(...e) {
|
|
25
|
+
return r.from(e);
|
|
26
|
+
}
|
|
27
|
+
constructor(e) {
|
|
28
|
+
e && (this.request = e);
|
|
29
|
+
}
|
|
30
|
+
split(e, t, n) {
|
|
31
|
+
return this.concat(r.split(e, t, n));
|
|
32
|
+
}
|
|
33
|
+
concat(...e) {
|
|
34
|
+
return e.length === 0 ? this : e.reduce(this.combine.bind(this), this);
|
|
35
|
+
}
|
|
36
|
+
combine(e, t) {
|
|
37
|
+
let n = new r((n, r) => e.request(n, (e) => t.request(e, r)));
|
|
38
|
+
return Object.assign(n, {
|
|
39
|
+
left: e,
|
|
40
|
+
right: t
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
request(e, n) {
|
|
44
|
+
throw t(65);
|
|
45
|
+
}
|
|
46
|
+
left;
|
|
47
|
+
right;
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
export { r as ApolloLink };
|
|
51
|
+
|
|
52
|
+
//# sourceMappingURL=ApolloLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApolloLink.js","names":[],"sources":["../../../../../../node_modules/@apollo/client/link/core/ApolloLink.js"],"sourcesContent":["import { EMPTY } from \"rxjs\";\nimport { createOperation } from \"@apollo/client/link/utils\";\nimport { __DEV__ } from \"@apollo/client/utilities/environment\";\nimport { invariant, newInvariantError, } from \"@apollo/client/utilities/invariant\";\n/**\n * The base class for all links in Apollo Client. A link represents either a\n * self-contained modification to a GraphQL operation or a side effect (such as\n * logging).\n *\n * @remarks\n *\n * Links enable you to customize Apollo Client's request flow by composing\n * together different pieces of functionality into a chain of links. Each\n * link represents a specific capability, such as adding authentication headers,\n * retrying failed requests, batching operations, or sending requests to a\n * GraphQL server.\n *\n * Every link must define a request handler via its constructor or by extending\n * this class and implementing the `request` method.\n *\n * @example\n *\n * ```ts\n * import { ApolloLink } from \"@apollo/client\";\n *\n * const link = new ApolloLink((operation, forward) => {\n * console.log(\"Operation:\", operation.operationName);\n * return forward(operation);\n * });\n * ```\n */\nexport class ApolloLink {\n /**\n * Creates a link that completes immediately and does not emit a result.\n *\n * @example\n *\n * ```ts\n * const link = ApolloLink.empty();\n * ```\n */\n static empty() {\n return new ApolloLink(() => EMPTY);\n }\n /**\n * Composes multiple links into a single composed link that executes each\n * provided link in serial order.\n *\n * @example\n *\n * ```ts\n * import { from, HttpLink, ApolloLink } from \"@apollo/client\";\n * import { RetryLink } from \"@apollo/client/link/retry\";\n * import MyAuthLink from \"../auth\";\n *\n * const link = ApolloLink.from([\n * new RetryLink(),\n * new MyAuthLink(),\n * new HttpLink({ uri: \"http://localhost:4000/graphql\" }),\n * ]);\n * ```\n *\n * @param links - An array of `ApolloLink` instances or request handlers that\n * are executed in serial order.\n */\n static from(links) {\n if (links.length === 0)\n return ApolloLink.empty();\n const [first, ...rest] = links;\n return first.concat(...rest);\n }\n /**\n * Creates a link that conditionally routes a request to different links.\n *\n * @example\n *\n * ```ts\n * import { ApolloLink, HttpLink } from \"@apollo/client\";\n *\n * const link = ApolloLink.split(\n * (operation) => operation.getContext().version === 1,\n * new HttpLink({ uri: \"http://localhost:4000/v1/graphql\" }),\n * new HttpLink({ uri: \"http://localhost:4000/v2/graphql\" })\n * );\n * ```\n *\n * @param test - A predicate function that receives the current `operation`\n * and returns a boolean indicating which link to execute. Returning `true`\n * executes the `left` link. Returning `false` executes the `right` link.\n *\n * @param left - The link that executes when the `test` function returns\n * `true`.\n *\n * @param right - The link that executes when the `test` function returns\n * `false`. If the `right` link is not provided, the request is forwarded to\n * the next link in the chain.\n */\n static split(test, left, right = new ApolloLink((op, forward) => forward(op))) {\n const link = new ApolloLink((operation, forward) => {\n const result = test(operation);\n if (__DEV__) {\n if (typeof result !== \"boolean\") {\n __DEV__ && invariant.warn(63, result);\n }\n }\n return result ?\n left.request(operation, forward)\n : right.request(operation, forward);\n });\n return Object.assign(link, { left, right });\n }\n /**\n * Executes a GraphQL request against a link. The `execute` function begins\n * the request by calling the request handler of the link.\n *\n * @example\n *\n * ```ts\n * const observable = ApolloLink.execute(link, { query, variables }, { client });\n *\n * observable.subscribe({\n * next(value) {\n * console.log(\"Received\", value);\n * },\n * error(error) {\n * console.error(\"Oops got error\", error);\n * },\n * complete() {\n * console.log(\"Request complete\");\n * },\n * });\n * ```\n *\n * @param link - The `ApolloLink` instance to execute the request.\n *\n * @param request - The GraphQL request details, such as the `query` and\n * `variables`.\n *\n * @param context - The execution context for the request, such as the\n * `client` making the request.\n */\n static execute(link, request, context) {\n return link.request(createOperation(request, context), () => {\n if (__DEV__) {\n __DEV__ && invariant.warn(64);\n }\n return EMPTY;\n });\n }\n /**\n * Combines multiple links into a single composed link.\n *\n * @example\n *\n * ```ts\n * const link = ApolloLink.concat(firstLink, secondLink, thirdLink);\n * ```\n *\n * @param links - The links to concatenate into a single link. Each link will\n * execute in serial order.\n *\n * @deprecated Use `ApolloLink.from` instead. `ApolloLink.concat` will be\n * removed in a future major version.\n */\n static concat(...links) {\n return ApolloLink.from(links);\n }\n constructor(request) {\n if (request)\n this.request = request;\n }\n /**\n * Concatenates a link that conditionally routes a request to different links.\n *\n * @example\n *\n * ```ts\n * import { ApolloLink, HttpLink } from \"@apollo/client\";\n *\n * const previousLink = new ApolloLink((operation, forward) => {\n * // Handle the request\n *\n * return forward(operation);\n * });\n *\n * const link = previousLink.split(\n * (operation) => operation.getContext().version === 1,\n * new HttpLink({ uri: \"http://localhost:4000/v1/graphql\" }),\n * new HttpLink({ uri: \"http://localhost:4000/v2/graphql\" })\n * );\n * ```\n *\n * @param test - A predicate function that receives the current `operation`\n * and returns a boolean indicating which link to execute. Returning `true`\n * executes the `left` link. Returning `false` executes the `right` link.\n *\n * @param left - The link that executes when the `test` function returns\n * `true`.\n *\n * @param right - The link that executes when the `test` function returns\n * `false`. If the `right` link is not provided, the request is forwarded to\n * the next link in the chain.\n */\n split(test, left, right) {\n return this.concat(ApolloLink.split(test, left, right));\n }\n /**\n * Combines the link with other links into a single composed link.\n *\n * @example\n *\n * ```ts\n * import { ApolloLink, HttpLink } from \"@apollo/client\";\n *\n * const previousLink = new ApolloLink((operation, forward) => {\n * // Handle the request\n *\n * return forward(operation);\n * });\n *\n * const link = previousLink.concat(\n * link1,\n * link2,\n * new HttpLink({ uri: \"http://localhost:4000/graphql\" })\n * );\n * ```\n */\n concat(...links) {\n if (links.length === 0) {\n return this;\n }\n return links.reduce(this.combine.bind(this), this);\n }\n combine(left, right) {\n const link = new ApolloLink((operation, forward) => {\n return left.request(operation, (op) => right.request(op, forward));\n });\n return Object.assign(link, { left, right });\n }\n /**\n * Runs the request handler for the provided operation.\n *\n * > [!NOTE]\n * > This is called by the `ApolloLink.execute` function for you and should\n * > not be called directly. Prefer using `ApolloLink.execute` to make the\n * > request instead.\n */\n request(operation, forward) {\n throw newInvariantError(65);\n }\n /**\n * @internal\n * Used to iterate through all links that are concatenations or `split` links.\n * \n * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n */\n left;\n /**\n * @internal\n * Used to iterate through all links that are concatenations or `split` links.\n * \n * @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n */\n right;\n}\n//# sourceMappingURL=ApolloLink.js.map\n"],"x_google_ignoreList":[0],"mappings":";;;;AA+BA,IAAa,IAAb,MAAa,EAAW;CAUpB,OAAO,QAAQ;AACX,SAAO,IAAI,QAAiB,EAAM;;CAuBtC,OAAO,KAAK,GAAO;AACf,MAAI,EAAM,WAAW,EACjB,QAAO,EAAW,OAAO;EAC7B,IAAM,CAAC,GAAO,GAAG,KAAQ;AACzB,SAAO,EAAM,OAAO,GAAG,EAAK;;CA4BhC,OAAO,MAAM,GAAM,GAAM,IAAQ,IAAI,GAAY,GAAI,MAAY,EAAQ,EAAG,CAAC,EAAE;EAC3E,IAAM,IAAO,IAAI,GAAY,GAAW,MACrB,EAAK,EAAU,GAO1B,EAAK,QAAQ,GAAW,EAAQ,GAC9B,EAAM,QAAQ,GAAW,EAAQ,CACzC;AACF,SAAO,OAAO,OAAO,GAAM;GAAE;GAAM;GAAO,CAAC;;CAgC/C,OAAO,QAAQ,GAAM,GAAS,GAAS;AACnC,SAAO,EAAK,QAAQ,EAAgB,GAAS,EAAQ,QAI1C,EACT;;CAiBN,OAAO,OAAO,GAAG,GAAO;AACpB,SAAO,EAAW,KAAK,EAAM;;CAEjC,YAAY,GAAS;AACjB,EAAI,MACA,KAAK,UAAU;;CAkCvB,MAAM,GAAM,GAAM,GAAO;AACrB,SAAO,KAAK,OAAO,EAAW,MAAM,GAAM,GAAM,EAAM,CAAC;;CAuB3D,OAAO,GAAG,GAAO;AAIb,SAHI,EAAM,WAAW,IACV,OAEJ,EAAM,OAAO,KAAK,QAAQ,KAAK,KAAK,EAAE,KAAK;;CAEtD,QAAQ,GAAM,GAAO;EACjB,IAAM,IAAO,IAAI,GAAY,GAAW,MAC7B,EAAK,QAAQ,IAAY,MAAO,EAAM,QAAQ,GAAI,EAAQ,CAAC,CACpE;AACF,SAAO,OAAO,OAAO,GAAM;GAAE;GAAM;GAAO,CAAC;;CAU/C,QAAQ,GAAW,GAAS;AACxB,QAAM,EAAkB,GAAG;;CAQ/B;CAOA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { invariant as e } from "../../utilities/invariant/index.js";
|
|
2
|
+
//#region node_modules/@apollo/client/link/http/checkFetcher.js
|
|
3
|
+
var t = (t) => {
|
|
4
|
+
e(t || typeof fetch < "u", 61);
|
|
5
|
+
};
|
|
6
|
+
//#endregion
|
|
7
|
+
export { t as checkFetcher };
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=checkFetcher.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"checkFetcher.js","names":[],"sources":["../../../../../../node_modules/@apollo/client/link/http/checkFetcher.js"],"sourcesContent":["import { invariant } from \"@apollo/client/utilities/invariant\";\nexport const checkFetcher = (fetcher) => {\n invariant(fetcher || typeof fetch !== \"undefined\", 61);\n};\n//# sourceMappingURL=checkFetcher.js.map\n"],"x_google_ignoreList":[0],"mappings":";;AACA,IAAa,KAAgB,MAAY;AACrC,GAAU,KAAW,OAAO,QAAU,KAAa,GAAG"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ServerError as e } from "../../errors/ServerError.js";
|
|
2
|
+
import { ServerParseError as t } from "../../errors/ServerParseError.js";
|
|
3
|
+
//#region node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js
|
|
4
|
+
var { hasOwnProperty: n } = Object.prototype;
|
|
5
|
+
function r(n, r) {
|
|
6
|
+
if (n.status >= 300) throw new e(`Response not successful: Received status code ${n.status}`, {
|
|
7
|
+
response: n,
|
|
8
|
+
bodyText: r
|
|
9
|
+
});
|
|
10
|
+
try {
|
|
11
|
+
return JSON.parse(r);
|
|
12
|
+
} catch (e) {
|
|
13
|
+
throw new t(e, {
|
|
14
|
+
response: n,
|
|
15
|
+
bodyText: r
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
function i(e, n) {
|
|
20
|
+
try {
|
|
21
|
+
return JSON.parse(n);
|
|
22
|
+
} catch (r) {
|
|
23
|
+
throw new t(r, {
|
|
24
|
+
response: e,
|
|
25
|
+
bodyText: n
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function a(e, t) {
|
|
30
|
+
return e.headers.get("content-type")?.includes("application/graphql-response+json") ? i(e, t) : r(e, t);
|
|
31
|
+
}
|
|
32
|
+
function o(t) {
|
|
33
|
+
return (r) => r.text().then((i) => {
|
|
34
|
+
let o = a(r, i);
|
|
35
|
+
if (!Array.isArray(o) && !n.call(o, "data") && !n.call(o, "errors")) throw new e(`Server response was malformed for query '${Array.isArray(t) ? t.map((e) => e.operationName) : t.operationName}'.`, {
|
|
36
|
+
response: r,
|
|
37
|
+
bodyText: i
|
|
38
|
+
});
|
|
39
|
+
return o;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { o as parseAndCheckHttpResponse };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=parseAndCheckHttpResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseAndCheckHttpResponse.js","names":[],"sources":["../../../../../../node_modules/@apollo/client/link/http/parseAndCheckHttpResponse.js"],"sourcesContent":["import { CombinedProtocolErrors, PROTOCOL_ERRORS_SYMBOL, ServerError, ServerParseError, } from \"@apollo/client/errors\";\nimport { isNonNullObject } from \"@apollo/client/utilities/internal\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nconst { hasOwnProperty } = Object.prototype;\n/**\n * This function detects an Apollo payload result before it is transformed\n * into a FetchResult via HttpLink; it cannot detect an ApolloPayloadResult\n * once it leaves the link chain.\n */\nfunction isApolloPayloadResult(value) {\n return isNonNullObject(value) && \"payload\" in value;\n}\nasync function* consumeMultipartBody(response) {\n const decoder = new TextDecoder(\"utf-8\");\n const contentType = response.headers?.get(\"content-type\");\n // parse boundary value and ignore any subsequent name/value pairs after ;\n // https://www.rfc-editor.org/rfc/rfc9110.html#name-parameters\n // e.g. multipart/mixed;boundary=\"graphql\";deferSpec=20220824\n // if no boundary is specified, default to -\n const match = contentType?.match(\n /*\n ;\\s*boundary= # Match the boundary parameter\n (?: # either\n '([^']*)' # a string starting with ' doesn't contain ', ends with '\n | # or\n \"([^\"]*)\" # a string starting with \" doesn't contain \", ends with \"\n | # or\n ([^\"'].*?) # a string that doesn't start with ' or \", parsed non-greedily\n ) # end of the group\n \\s* # optional whitespace\n (?:;|$) # match a semicolon or end of string\n */\n /;\\s*boundary=(?:'([^']+)'|\"([^\"]+)\"|([^\"'].+?))\\s*(?:;|$)/i);\n const boundary = \"\\r\\n--\" + (match ? match[1] ?? match[2] ?? match[3] ?? \"-\" : \"-\");\n let buffer = \"\";\n invariant(response.body && typeof response.body.getReader === \"function\", 62);\n const stream = response.body;\n const reader = stream.getReader();\n let done = false;\n let encounteredBoundary = false;\n let value;\n // check to see if we received the final boundary, which is a normal boundary followed by \"--\"\n // as described in https://www.rfc-editor.org/rfc/rfc2046#section-5.1.1\n const passedFinalBoundary = () => encounteredBoundary && buffer[0] == \"-\" && buffer[1] == \"-\";\n try {\n while (!done) {\n ({ value, done } = await reader.read());\n const chunk = typeof value === \"string\" ? value : decoder.decode(value);\n const searchFrom = buffer.length - boundary.length + 1;\n buffer += chunk;\n let bi = buffer.indexOf(boundary, searchFrom);\n while (bi > -1 && !passedFinalBoundary()) {\n encounteredBoundary = true;\n let message;\n [message, buffer] = [\n buffer.slice(0, bi),\n buffer.slice(bi + boundary.length),\n ];\n const i = message.indexOf(\"\\r\\n\\r\\n\");\n const headers = parseHeaders(message.slice(0, i));\n const contentType = headers[\"content-type\"];\n if (contentType &&\n contentType.toLowerCase().indexOf(\"application/json\") === -1) {\n throw new Error(\"Unsupported patch content type: application/json is required.\");\n }\n // nb: Technically you'd want to slice off the beginning \"\\r\\n\" but since\n // this is going to be `JSON.parse`d there is no need.\n const body = message.slice(i);\n if (body) {\n yield body;\n }\n bi = buffer.indexOf(boundary);\n }\n if (passedFinalBoundary()) {\n return;\n }\n }\n throw new Error(\"premature end of multipart body\");\n }\n finally {\n reader.cancel();\n }\n}\nexport async function readMultipartBody(response, nextValue) {\n for await (const body of consumeMultipartBody(response)) {\n const result = parseJsonEncoding(response, body);\n if (Object.keys(result).length == 0)\n continue;\n if (isApolloPayloadResult(result)) {\n if (Object.keys(result).length === 1 && result.payload === null) {\n return;\n }\n let next = { ...result.payload };\n if (\"errors\" in result) {\n next.extensions = {\n ...next.extensions,\n [PROTOCOL_ERRORS_SYMBOL]: new CombinedProtocolErrors(result.errors ?? []),\n };\n }\n nextValue(next);\n }\n else {\n nextValue(result);\n }\n }\n}\nfunction parseHeaders(headerText) {\n const headersInit = {};\n headerText.split(\"\\n\").forEach((line) => {\n const i = line.indexOf(\":\");\n if (i > -1) {\n // normalize headers to lowercase\n const name = line.slice(0, i).trim().toLowerCase();\n const value = line.slice(i + 1).trim();\n headersInit[name] = value;\n }\n });\n return headersInit;\n}\nfunction parseJsonEncoding(response, bodyText) {\n if (response.status >= 300) {\n throw new ServerError(`Response not successful: Received status code ${response.status}`, { response, bodyText });\n }\n try {\n return JSON.parse(bodyText);\n }\n catch (err) {\n throw new ServerParseError(err, { response, bodyText });\n }\n}\nfunction parseGraphQLResponseJsonEncoding(response, bodyText) {\n try {\n return JSON.parse(bodyText);\n }\n catch (err) {\n throw new ServerParseError(err, { response, bodyText });\n }\n}\nfunction parseResponse(response, bodyText) {\n const contentType = response.headers.get(\"content-type\");\n if (contentType?.includes(\"application/graphql-response+json\")) {\n return parseGraphQLResponseJsonEncoding(response, bodyText);\n }\n return parseJsonEncoding(response, bodyText);\n}\nexport function parseAndCheckHttpResponse(operations) {\n return (response) => response.text().then((bodyText) => {\n const result = parseResponse(response, bodyText);\n if (!Array.isArray(result) &&\n !hasOwnProperty.call(result, \"data\") &&\n !hasOwnProperty.call(result, \"errors\")) {\n throw new ServerError(`Server response was malformed for query '${Array.isArray(operations) ?\n operations.map((op) => op.operationName)\n : operations.operationName}'.`, { response, bodyText });\n }\n return result;\n });\n}\n//# sourceMappingURL=parseAndCheckHttpResponse.js.map\n"],"x_google_ignoreList":[0],"mappings":";;;AAGA,IAAM,EAAE,sBAAmB,OAAO;AAoHlC,SAAS,EAAkB,GAAU,GAAU;AAC3C,KAAI,EAAS,UAAU,IACnB,OAAM,IAAI,EAAY,iDAAiD,EAAS,UAAU;EAAE;EAAU;EAAU,CAAC;AAErH,KAAI;AACA,SAAO,KAAK,MAAM,EAAS;UAExB,GAAK;AACR,QAAM,IAAI,EAAiB,GAAK;GAAE;GAAU;GAAU,CAAC;;;AAG/D,SAAS,EAAiC,GAAU,GAAU;AAC1D,KAAI;AACA,SAAO,KAAK,MAAM,EAAS;UAExB,GAAK;AACR,QAAM,IAAI,EAAiB,GAAK;GAAE;GAAU;GAAU,CAAC;;;AAG/D,SAAS,EAAc,GAAU,GAAU;AAKvC,QAJoB,EAAS,QAAQ,IAAI,eAAe,EACvC,SAAS,oCAAoC,GACnD,EAAiC,GAAU,EAAS,GAExD,EAAkB,GAAU,EAAS;;AAEhD,SAAgB,EAA0B,GAAY;AAClD,SAAQ,MAAa,EAAS,MAAM,CAAC,MAAM,MAAa;EACpD,IAAM,IAAS,EAAc,GAAU,EAAS;AAChD,MAAI,CAAC,MAAM,QAAQ,EAAO,IACtB,CAAC,EAAe,KAAK,GAAQ,OAAO,IACpC,CAAC,EAAe,KAAK,GAAQ,SAAS,CACtC,OAAM,IAAI,EAAY,4CAA4C,MAAM,QAAQ,EAAW,GACvF,EAAW,KAAK,MAAO,EAAG,cAAc,GACtC,EAAW,cAAc,KAAK;GAAE;GAAU;GAAU,CAAC;AAE/D,SAAO;GACT"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { print as e } from "../../utilities/graphql/print.js";
|
|
2
|
+
var t = {
|
|
3
|
+
http: {
|
|
4
|
+
includeQuery: !0,
|
|
5
|
+
includeExtensions: !0,
|
|
6
|
+
preserveHeaderCase: !1
|
|
7
|
+
},
|
|
8
|
+
headers: {
|
|
9
|
+
accept: "application/graphql-response+json,application/json;q=0.9",
|
|
10
|
+
"content-type": "application/json"
|
|
11
|
+
},
|
|
12
|
+
options: { method: "POST" }
|
|
13
|
+
}, n = (e, t) => t(e);
|
|
14
|
+
function r(t, n, ...r) {
|
|
15
|
+
let a = {}, o = {};
|
|
16
|
+
r.forEach((e) => {
|
|
17
|
+
a = {
|
|
18
|
+
...a,
|
|
19
|
+
...e.options,
|
|
20
|
+
headers: {
|
|
21
|
+
...a.headers,
|
|
22
|
+
...e.headers
|
|
23
|
+
}
|
|
24
|
+
}, e.credentials && (a.credentials = e.credentials), a.headers.accept = (e.http?.accept || []).concat(a.headers.accept).join(","), o = {
|
|
25
|
+
...o,
|
|
26
|
+
...e.http
|
|
27
|
+
};
|
|
28
|
+
}), a.headers = i(a.headers, o.preserveHeaderCase);
|
|
29
|
+
let { operationName: s, extensions: c, variables: l, query: u } = t, d = {
|
|
30
|
+
operationName: s,
|
|
31
|
+
variables: l
|
|
32
|
+
};
|
|
33
|
+
return o.includeExtensions && Object.keys(c || {}).length && (d.extensions = c), o.includeQuery && (d.query = n(u, e)), {
|
|
34
|
+
options: a,
|
|
35
|
+
body: d
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function i(e, t) {
|
|
39
|
+
if (!t) {
|
|
40
|
+
let t = {};
|
|
41
|
+
return Object.keys(Object(e)).forEach((n) => {
|
|
42
|
+
t[n.toLowerCase()] = e[n];
|
|
43
|
+
}), t;
|
|
44
|
+
}
|
|
45
|
+
let n = {};
|
|
46
|
+
Object.keys(Object(e)).forEach((t) => {
|
|
47
|
+
n[t.toLowerCase()] = {
|
|
48
|
+
originalName: t,
|
|
49
|
+
value: e[t]
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
let r = {};
|
|
53
|
+
return Object.keys(n).forEach((e) => {
|
|
54
|
+
r[n[e].originalName] = n[e].value;
|
|
55
|
+
}), r;
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { n as defaultPrinter, t as fallbackHttpConfig, r as selectHttpOptionsAndBodyInternal };
|
|
59
|
+
|
|
60
|
+
//# sourceMappingURL=selectHttpOptionsAndBody.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectHttpOptionsAndBody.js","names":[],"sources":["../../../../../../node_modules/@apollo/client/link/http/selectHttpOptionsAndBody.js"],"sourcesContent":["import { print } from \"@apollo/client/utilities\";\nconst defaultHttpOptions = {\n includeQuery: true,\n includeExtensions: true,\n preserveHeaderCase: false,\n};\nconst defaultHeaders = {\n // headers are case insensitive (https://stackoverflow.com/a/5259004)\n accept: \"application/graphql-response+json,application/json;q=0.9\",\n // The content-type header describes the type of the body of the request, and\n // so it typically only is sent with requests that actually have bodies. One\n // could imagine that Apollo Client would remove this header when constructing\n // a GET request (which has no body), but we historically have not done that.\n // This means that browsers will preflight all Apollo Client requests (even\n // GET requests). Apollo Server's CSRF prevention feature (introduced in\n // AS3.7) takes advantage of this fact and does not block requests with this\n // header. If you want to drop this header from GET requests, then you should\n // probably replace it with a `apollo-require-preflight` header, or servers\n // with CSRF prevention enabled might block your GET request. See\n // https://www.apollographql.com/docs/apollo-server/security/cors/#preventing-cross-site-request-forgery-csrf\n // for more details.\n \"content-type\": \"application/json\",\n};\nconst defaultOptions = {\n method: \"POST\",\n};\nexport const fallbackHttpConfig = {\n http: defaultHttpOptions,\n headers: defaultHeaders,\n options: defaultOptions,\n};\nexport const defaultPrinter = (ast, printer) => printer(ast);\nexport function selectHttpOptionsAndBody(operation, fallbackConfig, ...configs) {\n configs.unshift(fallbackConfig);\n return selectHttpOptionsAndBodyInternal(operation, defaultPrinter, ...configs);\n}\nexport function selectHttpOptionsAndBodyInternal(operation, printer, ...configs) {\n let options = {};\n let http = {};\n configs.forEach((config) => {\n options = {\n ...options,\n ...config.options,\n headers: {\n ...options.headers,\n ...config.headers,\n },\n };\n if (config.credentials) {\n options.credentials = config.credentials;\n }\n options.headers.accept = (config.http?.accept || [])\n .concat(options.headers.accept)\n .join(\",\");\n http = {\n ...http,\n ...config.http,\n };\n });\n options.headers = removeDuplicateHeaders(options.headers, http.preserveHeaderCase);\n //The body depends on the http options\n const { operationName, extensions, variables, query } = operation;\n const body = { operationName, variables };\n if (http.includeExtensions && Object.keys(extensions || {}).length)\n body.extensions = extensions;\n // not sending the query (i.e persisted queries)\n if (http.includeQuery)\n body.query = printer(query, print);\n return {\n options,\n body,\n };\n}\n// Remove potential duplicate header names, preserving last (by insertion order).\n// This is done to prevent unintentionally duplicating a header instead of\n// overwriting it (See #8447 and #8449).\nfunction removeDuplicateHeaders(headers, preserveHeaderCase) {\n // If we're not preserving the case, just remove duplicates w/ normalization.\n if (!preserveHeaderCase) {\n const normalizedHeaders = {};\n Object.keys(Object(headers)).forEach((name) => {\n normalizedHeaders[name.toLowerCase()] = headers[name];\n });\n return normalizedHeaders;\n }\n // If we are preserving the case, remove duplicates w/ normalization,\n // preserving the original name.\n // This allows for non-http-spec-compliant servers that expect intentionally\n // capitalized header names (See #6741).\n const headerData = {};\n Object.keys(Object(headers)).forEach((name) => {\n headerData[name.toLowerCase()] = {\n originalName: name,\n value: headers[name],\n };\n });\n const normalizedHeaders = {};\n Object.keys(headerData).forEach((name) => {\n normalizedHeaders[headerData[name].originalName] = headerData[name].value;\n });\n return normalizedHeaders;\n}\n//# sourceMappingURL=selectHttpOptionsAndBody.js.map"],"x_google_ignoreList":[0],"mappings":";AA0BA,IAAa,IAAqB;CAC9B,MA1BuB;EACvB,cAAc;EACd,mBAAmB;EACnB,oBAAoB;EACvB;CAuBG,SAtBmB;EAEnB,QAAQ;EAaR,gBAAgB;EACnB;CAOG,SANmB,EACnB,QAAQ,QACX;CAKA,EACY,KAAkB,GAAK,MAAY,EAAQ,EAAI;AAK5D,SAAgB,EAAiC,GAAW,GAAS,GAAG,GAAS;CAC7E,IAAI,IAAU,EAAE,EACZ,IAAO,EAAE;AAqBb,CApBA,EAAQ,SAAS,MAAW;AAexB,EAdA,IAAU;GACN,GAAG;GACH,GAAG,EAAO;GACV,SAAS;IACL,GAAG,EAAQ;IACX,GAAG,EAAO;IACb;GACJ,EACG,EAAO,gBACP,EAAQ,cAAc,EAAO,cAEjC,EAAQ,QAAQ,UAAU,EAAO,MAAM,UAAU,EAAE,EAC9C,OAAO,EAAQ,QAAQ,OAAO,CAC9B,KAAK,IAAI,EACd,IAAO;GACH,GAAG;GACH,GAAG,EAAO;GACb;GACH,EACF,EAAQ,UAAU,EAAuB,EAAQ,SAAS,EAAK,mBAAmB;CAElF,IAAM,EAAE,kBAAe,eAAY,cAAW,aAAU,GAClD,IAAO;EAAE;EAAe;EAAW;AAMzC,QALI,EAAK,qBAAqB,OAAO,KAAK,KAAc,EAAE,CAAC,CAAC,WACxD,EAAK,aAAa,IAElB,EAAK,iBACL,EAAK,QAAQ,EAAQ,GAAO,EAAM,GAC/B;EACH;EACA;EACH;;AAKL,SAAS,EAAuB,GAAS,GAAoB;AAEzD,KAAI,CAAC,GAAoB;EACrB,IAAM,IAAoB,EAAE;AAI5B,SAHA,OAAO,KAAK,OAAO,EAAQ,CAAC,CAAC,SAAS,MAAS;AAC3C,KAAkB,EAAK,aAAa,IAAI,EAAQ;IAClD,EACK;;CAMX,IAAM,IAAa,EAAE;AACrB,QAAO,KAAK,OAAO,EAAQ,CAAC,CAAC,SAAS,MAAS;AAC3C,IAAW,EAAK,aAAa,IAAI;GAC7B,cAAc;GACd,OAAO,EAAQ;GAClB;GACH;CACF,IAAM,IAAoB,EAAE;AAI5B,QAHA,OAAO,KAAK,EAAW,CAAC,SAAS,MAAS;AACtC,IAAkB,EAAW,GAAM,gBAAgB,EAAW,GAAM;GACtE,EACK"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selectURI.js","names":[],"sources":["../../../../../../node_modules/@apollo/client/link/http/selectURI.js"],"sourcesContent":["export const selectURI = (operation, fallbackURI) => {\n const context = operation.getContext();\n const contextURI = context.uri;\n if (contextURI) {\n return contextURI;\n }\n else if (typeof fallbackURI === \"function\") {\n return fallbackURI(operation);\n }\n else {\n return fallbackURI || \"/graphql\";\n }\n};\n//# sourceMappingURL=selectURI.js.map"],"x_google_ignoreList":[0],"mappings":";AAAA,IAAa,KAAa,GAAW,MACjB,EAAU,YAAY,CACX,QAIlB,OAAO,KAAgB,aACrB,EAAY,EAAU,GAGtB,KAAe"}
|