Initial Save

This commit is contained in:
jackbeeby
2025-03-28 12:30:19 +11:00
parent e381994f19
commit d8773925e8
9910 changed files with 982718 additions and 0 deletions

21
node_modules/apollo-server-env/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2016-2020 Apollo Graph, Inc. (Formerly Meteor Development Group, Inc.)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

9
node_modules/apollo-server-env/README.md generated vendored Normal file
View File

@@ -0,0 +1,9 @@
# `apollo-server-env`
This package is used internally by Apollo Server and not meant to be consumed
directly.
Its primary function is to provide polyfills (e.g. via
[`core-js`](https://npm.im/core-js)) for newer language features which might
not be available in the underlying JavaScript Engine (i.e. more bare-bones V8
environments, older versions of Node.js, etc.).

121
node_modules/apollo-server-env/dist/fetch.d.ts generated vendored Normal file
View File

@@ -0,0 +1,121 @@
import { Agent as HttpAgent } from 'http';
import { Agent as HttpsAgent } from 'https';
export declare function fetch(
input: RequestInfo,
init?: RequestInit,
): Promise<Response>;
export type RequestAgent = HttpAgent | HttpsAgent;
export type RequestInfo = Request | string;
export declare class Headers implements Iterable<[string, string]> {
constructor(init?: HeadersInit);
append(name: string, value: string): void;
delete(name: string): void;
get(name: string): string | null;
has(name: string): boolean;
set(name: string, value: string): void;
entries(): Iterator<[string, string]>;
keys(): Iterator<string>;
values(): Iterator<string>;
[Symbol.iterator](): Iterator<[string, string]>;
}
export type HeadersInit = Headers | string[][] | { [name: string]: string };
export declare class Body {
readonly bodyUsed: boolean;
arrayBuffer(): Promise<ArrayBuffer>;
json(): Promise<any>;
text(): Promise<string>;
}
export declare class Request extends Body {
constructor(input: Request | string, init?: RequestInit);
readonly method: string;
readonly url: string;
readonly headers: Headers;
clone(): Request;
}
export interface RequestInit {
method?: string;
headers?: HeadersInit;
body?: BodyInit;
mode?: RequestMode;
credentials?: RequestCredentials;
cache?: RequestCache;
redirect?: RequestRedirect;
referrer?: string;
referrerPolicy?: ReferrerPolicy;
integrity?: string;
// The following properties are node-fetch extensions
follow?: number;
timeout?: number;
compress?: boolean;
size?: number;
agent?: RequestAgent | false;
// Cloudflare Workers accept a `cf` property to control Cloudflare features
// See https://developers.cloudflare.com/workers/reference/cloudflare-features/
cf?: {
[key: string]: any;
};
}
export type RequestMode = 'navigate' | 'same-origin' | 'no-cors' | 'cors';
export type RequestCredentials = 'omit' | 'same-origin' | 'include';
export type RequestCache =
| 'default'
| 'no-store'
| 'reload'
| 'no-cache'
| 'force-cache'
| 'only-if-cached';
export type RequestRedirect = 'follow' | 'error' | 'manual';
export type ReferrerPolicy =
| ''
| 'no-referrer'
| 'no-referrer-when-downgrade'
| 'same-origin'
| 'origin'
| 'strict-origin'
| 'origin-when-cross-origin'
| 'strict-origin-when-cross-origin'
| 'unsafe-url';
export declare class Response extends Body {
constructor(body?: BodyInit, init?: ResponseInit);
static error(): Response;
static redirect(url: string, status?: number): Response;
readonly url: string;
readonly redirected: boolean;
readonly status: number;
readonly ok: boolean;
readonly statusText: string;
readonly headers: Headers;
clone(): Response;
}
export interface ResponseInit {
headers?: HeadersInit;
status?: number;
statusText?: string;
// Although this isn't part of the spec, `node-fetch` accepts a `url` property
url?: string;
}
export type BodyInit = ArrayBuffer | ArrayBufferView | string;

26
node_modules/apollo-server-env/dist/global.d.ts generated vendored Normal file
View File

@@ -0,0 +1,26 @@
declare function fetch(
input: RequestInfo,
init?: RequestInit,
): Promise<Response>;
declare interface GlobalFetch {
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
}
type RequestInfo = import('./fetch').RequestInfo;
type Headers = import('./fetch').Headers;
type HeadersInit = import('./fetch').HeadersInit;
type Body = import('./fetch').Body;
type Request = import('./fetch').Request;
type RequestAgent = import('./fetch').RequestAgent;
type RequestInit = import('./fetch').RequestInit;
type RequestMode = import('./fetch').RequestMode;
type RequestCredentials = import('./fetch').RequestCredentials;
type RequestCache = import('./fetch').RequestCache;
type RequestRedirect = import('./fetch').RequestRedirect;
type ReferrerPolicy = import('./fetch').ReferrerPolicy;
type Response = import('./fetch').Response;
type ResponseInit = import('./fetch').ResponseInit;
type BodyInit = import('./fetch').BodyInit;
type URLSearchParams = import('./url').URLSearchParams;
type URLSearchParamsInit = import('./url').URLSearchParamsInit;

45
node_modules/apollo-server-env/dist/index.browser.js generated vendored Normal file
View File

@@ -0,0 +1,45 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.URLSearchParams = exports.URL = exports.Headers = exports.Response = exports.Request = exports.fetch = void 0;
if (!global) {
global = self;
}
let { fetch, Request, Response, Headers, URL, URLSearchParams } = global;
exports.fetch = fetch;
exports.Request = Request;
exports.Response = Response;
exports.Headers = Headers;
exports.URL = URL;
exports.URLSearchParams = URLSearchParams;
exports.fetch = fetch = fetch.bind(global);
if (!global.process) {
global.process = {};
}
if (!global.process.env) {
global.process.env = {
NODE_ENV: typeof app !== 'undefined' ? app.env : 'production',
};
}
if (!global.process.version) {
global.process.version = '';
}
if (!global.process.hrtime) {
global.process.hrtime = function hrtime(previousTimestamp) {
var clocktime = Date.now() * 1e-3;
var seconds = Math.floor(clocktime);
var nanoseconds = Math.floor((clocktime % 1) * 1e9);
if (previousTimestamp) {
seconds = seconds - previousTimestamp[0];
nanoseconds = nanoseconds - previousTimestamp[1];
if (nanoseconds < 0) {
seconds--;
nanoseconds += 1e9;
}
}
return [seconds, nanoseconds];
};
}
if (!global.os) {
global.os = {};
}
//# sourceMappingURL=index.browser.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"index.browser.js","sourceRoot":"","sources":["../src/index.browser.js"],"names":[],"mappings":";;;AAAA,IAAI,CAAC,MAAM,EAAE;IACX,MAAM,GAAG,IAAI,CAAC;CACf;AAED,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,GAAG,MAAM,CAAC;AAEhE,sBAAK;AAAE,0BAAO;AAAE,4BAAQ;AAAE,0BAAO;AAAE,kBAAG;AAAE,0CAAe;AADhE,gBAAA,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAG3B,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;IACnB,MAAM,CAAC,OAAO,GAAG,EAAE,CAAC;CACrB;AAED,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE;IACvB,MAAM,CAAC,OAAO,CAAC,GAAG,GAAG;QAEnB,QAAQ,EAAE,OAAO,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,YAAY;KAC9D,CAAC;CACH;AAED,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,EAAE;IAC3B,MAAM,CAAC,OAAO,CAAC,OAAO,GAAG,EAAE,CAAC;CAC7B;AAED,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE;IAE1B,MAAM,CAAC,OAAO,CAAC,MAAM,GAAG,SAAS,MAAM,CAAC,iBAAiB;QACvD,IAAI,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;QAClC,IAAI,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACpC,IAAI,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC;QACpD,IAAI,iBAAiB,EAAE;YACrB,OAAO,GAAG,OAAO,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;YACzC,WAAW,GAAG,WAAW,GAAG,iBAAiB,CAAC,CAAC,CAAC,CAAC;YACjD,IAAI,WAAW,GAAG,CAAC,EAAE;gBACnB,OAAO,EAAE,CAAC;gBACV,WAAW,IAAI,GAAG,CAAC;aACpB;SACF;QACD,OAAO,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IAChC,CAAC,CAAC;CACH;AAED,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE;IAEd,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC;CAChB"}

3
node_modules/apollo-server-env/dist/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export * from './fetch';
export * from './url';
export * from './typescript-utility-types';

24
node_modules/apollo-server-env/dist/index.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
require("./polyfills/Object.values");
require("./polyfills/Object.entries");
const runtimeSupportsPromisify_1 = __importDefault(require("./utils/runtimeSupportsPromisify"));
if (!runtimeSupportsPromisify_1.default) {
require('util.promisify').shim();
}
__exportStar(require("./polyfills/fetch"), exports);
__exportStar(require("./polyfills/url"), exports);
//# sourceMappingURL=index.js.map

1
node_modules/apollo-server-env/dist/index.js.map generated vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qCAAmC;AACnC,sCAAoC;AAEpC,gGAAwE;AAExE,IAAI,CAAC,kCAAwB,EAAE;IAC7B,OAAO,CAAC,gBAAgB,CAAC,CAAC,IAAI,EAAE,CAAC;CAClC;AAED,oDAAkC;AAClC,kDAAgC"}

View File

@@ -0,0 +1,7 @@
"use strict";
if (!global.Object.entries) {
global.Object.entries = function (object) {
return Object.keys(object).map(key => [key, object[key]]);
};
}
//# sourceMappingURL=Object.entries.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Object.entries.js","sourceRoot":"","sources":["../../src/polyfills/Object.entries.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE;IAC1B,MAAM,CAAC,MAAM,CAAC,OAAO,GAAG,UAAS,MAAW;QAC1C,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,CAAC,CAAkB,CAAC,CAAC;IAC7E,CAAC,CAAC;CACH"}

View File

@@ -0,0 +1,7 @@
"use strict";
if (!global.Object.values) {
global.Object.values = function (object) {
return Object.keys(object).map(key => object[key]);
};
}
//# sourceMappingURL=Object.values.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"Object.values.js","sourceRoot":"","sources":["../../src/polyfills/Object.values.ts"],"names":[],"mappings":";AAAA,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE;IACzB,MAAM,CAAC,MAAM,CAAC,MAAM,GAAG,UAAS,MAAW;QACzC,OAAO,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC;IACrD,CAAC,CAAC;CACH"}

View File

@@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var node_fetch_1 = require("node-fetch");
Object.defineProperty(exports, "fetch", { enumerable: true, get: function () { return node_fetch_1.default; } });
Object.defineProperty(exports, "Request", { enumerable: true, get: function () { return node_fetch_1.Request; } });
Object.defineProperty(exports, "Response", { enumerable: true, get: function () { return node_fetch_1.Response; } });
Object.defineProperty(exports, "Headers", { enumerable: true, get: function () { return node_fetch_1.Headers; } });
//# sourceMappingURL=fetch.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../src/polyfills/fetch.js"],"names":[],"mappings":";;AAAA,yCAA0E;AAAjE,mGAAA,OAAO,OAAS;AAAE,qGAAA,OAAO,OAAA;AAAE,sGAAA,QAAQ,OAAA;AAAE,qGAAA,OAAO,OAAA"}

6
node_modules/apollo-server-env/dist/polyfills/url.js generated vendored Normal file
View File

@@ -0,0 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var url_1 = require("url");
Object.defineProperty(exports, "URL", { enumerable: true, get: function () { return url_1.URL; } });
Object.defineProperty(exports, "URLSearchParams", { enumerable: true, get: function () { return url_1.URLSearchParams; } });
//# sourceMappingURL=url.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/polyfills/url.js"],"names":[],"mappings":";;AAAA,2BAA2C;AAAlC,0FAAA,GAAG,OAAA;AAAE,sGAAA,eAAe,OAAA"}

View File

@@ -0,0 +1,2 @@
export type ValueOrPromise<T> = T | Promise<T>;
export type WithRequired<T, K extends keyof T> = T & Required<Pick<T, K>>;

41
node_modules/apollo-server-env/dist/url.d.ts generated vendored Normal file
View File

@@ -0,0 +1,41 @@
export declare class URL {
constructor(input: string, base?: string | URL);
hash: string;
host: string;
hostname: string;
href: string;
readonly origin: string;
password: string;
pathname: string;
port: string;
protocol: string;
search: string;
readonly searchParams: URLSearchParams;
username: string;
toString(): string;
toJSON(): string;
}
export declare class URLSearchParams implements Iterable<[string, string]> {
constructor(init?: URLSearchParamsInit);
append(name: string, value: string): void;
delete(name: string): void;
entries(): IterableIterator<[string, string]>;
forEach(callback: (value: string, name: string) => void): void;
get(name: string): string | null;
getAll(name: string): string[];
has(name: string): boolean;
keys(): IterableIterator<string>;
set(name: string, value: string): void;
sort(): void;
toString(): string;
values(): IterableIterator<string>;
[Symbol.iterator](): IterableIterator<[string, string]>;
}
export type URLSearchParamsInit =
| URLSearchParams
| string
| { [key: string]: Object | Object[] | undefined }
| Iterable<[string, Object]>
| Array<[string, Object]>;

View File

@@ -0,0 +1,20 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const runtimeSupportsPromisify = (() => {
if (process &&
process.release &&
process.release.name === 'node' &&
process.versions &&
typeof process.versions.node === 'string') {
const [nodeMajor] = process.versions.node
.split('.', 1)
.map(segment => parseInt(segment, 10));
if (nodeMajor >= 8) {
return true;
}
return false;
}
return false;
})();
exports.default = runtimeSupportsPromisify;
//# sourceMappingURL=runtimeSupportsPromisify.js.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"runtimeSupportsPromisify.js","sourceRoot":"","sources":["../../src/utils/runtimeSupportsPromisify.ts"],"names":[],"mappings":";;AAAA,MAAM,wBAAwB,GAAG,CAAC,GAAG,EAAE;IACrC,IACE,OAAO;QACP,OAAO,CAAC,OAAO;QACf,OAAO,CAAC,OAAO,CAAC,IAAI,KAAK,MAAM;QAC/B,OAAO,CAAC,QAAQ;QAChB,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,KAAK,QAAQ,EACzC;QACA,MAAM,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,IAAI;aACtC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC;aACb,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;QAEzC,IAAI,SAAS,IAAI,CAAC,EAAE;YAClB,OAAO,IAAI,CAAC;SACb;QACD,OAAO,KAAK,CAAC;KACd;IAID,OAAO,KAAK,CAAC;AACf,CAAC,CAAC,EAAE,CAAC;AAEL,kBAAe,wBAAwB,CAAC"}

31
node_modules/apollo-server-env/package.json generated vendored Normal file
View File

@@ -0,0 +1,31 @@
{
"name": "apollo-server-env",
"version": "3.2.0",
"author": "Apollo <opensource@apollographql.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/apollographql/apollo-server",
"directory": "packages/apollo-server-env"
},
"homepage": "https://github.com/apollographql/apollo-server#readme",
"bugs": {
"url": "https://github.com/apollographql/apollo-server/issues"
},
"main": "dist/index.js",
"browser": "dist/index.browser.js",
"types": "dist/index.d.ts",
"scripts": {
"clean": "git clean -fdX -- dist",
"compile": "tsc && cp src/*.d.ts dist",
"prepare": "npm run clean && npm run compile"
},
"engines": {
"node": ">=6"
},
"dependencies": {
"node-fetch": "^2.6.1",
"util.promisify": "^1.0.0"
},
"gitHead": "91de501bb389c07ccfc5e684811153267b91e9ac"
}

121
node_modules/apollo-server-env/src/fetch.d.ts generated vendored Normal file
View File

@@ -0,0 +1,121 @@
import { Agent as HttpAgent } from 'http';
import { Agent as HttpsAgent } from 'https';
export declare function fetch(
input: RequestInfo,
init?: RequestInit,
): Promise<Response>;
export type RequestAgent = HttpAgent | HttpsAgent;
export type RequestInfo = Request | string;
export declare class Headers implements Iterable<[string, string]> {
constructor(init?: HeadersInit);
append(name: string, value: string): void;
delete(name: string): void;
get(name: string): string | null;
has(name: string): boolean;
set(name: string, value: string): void;
entries(): Iterator<[string, string]>;
keys(): Iterator<string>;
values(): Iterator<string>;
[Symbol.iterator](): Iterator<[string, string]>;
}
export type HeadersInit = Headers | string[][] | { [name: string]: string };
export declare class Body {
readonly bodyUsed: boolean;
arrayBuffer(): Promise<ArrayBuffer>;
json(): Promise<any>;
text(): Promise<string>;
}
export declare class Request extends Body {
constructor(input: Request | string, init?: RequestInit);
readonly method: string;
readonly url: string;
readonly headers: Headers;
clone(): Request;
}
export interface RequestInit {
method?: string;
headers?: HeadersInit;
body?: BodyInit;
mode?: RequestMode;
credentials?: RequestCredentials;
cache?: RequestCache;
redirect?: RequestRedirect;
referrer?: string;
referrerPolicy?: ReferrerPolicy;
integrity?: string;
// The following properties are node-fetch extensions
follow?: number;
timeout?: number;
compress?: boolean;
size?: number;
agent?: RequestAgent | false;
// Cloudflare Workers accept a `cf` property to control Cloudflare features
// See https://developers.cloudflare.com/workers/reference/cloudflare-features/
cf?: {
[key: string]: any;
};
}
export type RequestMode = 'navigate' | 'same-origin' | 'no-cors' | 'cors';
export type RequestCredentials = 'omit' | 'same-origin' | 'include';
export type RequestCache =
| 'default'
| 'no-store'
| 'reload'
| 'no-cache'
| 'force-cache'
| 'only-if-cached';
export type RequestRedirect = 'follow' | 'error' | 'manual';
export type ReferrerPolicy =
| ''
| 'no-referrer'
| 'no-referrer-when-downgrade'
| 'same-origin'
| 'origin'
| 'strict-origin'
| 'origin-when-cross-origin'
| 'strict-origin-when-cross-origin'
| 'unsafe-url';
export declare class Response extends Body {
constructor(body?: BodyInit, init?: ResponseInit);
static error(): Response;
static redirect(url: string, status?: number): Response;
readonly url: string;
readonly redirected: boolean;
readonly status: number;
readonly ok: boolean;
readonly statusText: string;
readonly headers: Headers;
clone(): Response;
}
export interface ResponseInit {
headers?: HeadersInit;
status?: number;
statusText?: string;
// Although this isn't part of the spec, `node-fetch` accepts a `url` property
url?: string;
}
export type BodyInit = ArrayBuffer | ArrayBufferView | string;

26
node_modules/apollo-server-env/src/global.d.ts generated vendored Normal file
View File

@@ -0,0 +1,26 @@
declare function fetch(
input: RequestInfo,
init?: RequestInit,
): Promise<Response>;
declare interface GlobalFetch {
fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
}
type RequestInfo = import('./fetch').RequestInfo;
type Headers = import('./fetch').Headers;
type HeadersInit = import('./fetch').HeadersInit;
type Body = import('./fetch').Body;
type Request = import('./fetch').Request;
type RequestAgent = import('./fetch').RequestAgent;
type RequestInit = import('./fetch').RequestInit;
type RequestMode = import('./fetch').RequestMode;
type RequestCredentials = import('./fetch').RequestCredentials;
type RequestCache = import('./fetch').RequestCache;
type RequestRedirect = import('./fetch').RequestRedirect;
type ReferrerPolicy = import('./fetch').ReferrerPolicy;
type Response = import('./fetch').Response;
type ResponseInit = import('./fetch').ResponseInit;
type BodyInit = import('./fetch').BodyInit;
type URLSearchParams = import('./url').URLSearchParams;
type URLSearchParamsInit = import('./url').URLSearchParamsInit;

45
node_modules/apollo-server-env/src/index.browser.js generated vendored Normal file
View File

@@ -0,0 +1,45 @@
if (!global) {
global = self;
}
let { fetch, Request, Response, Headers, URL, URLSearchParams } = global;
fetch = fetch.bind(global);
export { fetch, Request, Response, Headers, URL, URLSearchParams };
if (!global.process) {
global.process = {};
}
if (!global.process.env) {
global.process.env = {
// app is a global available on fly.io
NODE_ENV: typeof app !== 'undefined' ? app.env : 'production',
};
}
if (!global.process.version) {
global.process.version = '';
}
if (!global.process.hrtime) {
// Adapted from https://github.com/kumavis/browser-process-hrtime
global.process.hrtime = function hrtime(previousTimestamp) {
var clocktime = Date.now() * 1e-3;
var seconds = Math.floor(clocktime);
var nanoseconds = Math.floor((clocktime % 1) * 1e9);
if (previousTimestamp) {
seconds = seconds - previousTimestamp[0];
nanoseconds = nanoseconds - previousTimestamp[1];
if (nanoseconds < 0) {
seconds--;
nanoseconds += 1e9;
}
}
return [seconds, nanoseconds];
};
}
if (!global.os) {
// TODO: Add some sensible values
global.os = {};
}

3
node_modules/apollo-server-env/src/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,3 @@
export * from './fetch';
export * from './url';
export * from './typescript-utility-types';

11
node_modules/apollo-server-env/src/index.ts generated vendored Normal file
View File

@@ -0,0 +1,11 @@
import './polyfills/Object.values';
import './polyfills/Object.entries';
import runtimeSupportsPromisify from './utils/runtimeSupportsPromisify';
if (!runtimeSupportsPromisify) {
require('util.promisify').shim();
}
export * from './polyfills/fetch';
export * from './polyfills/url';

View File

@@ -0,0 +1,5 @@
if (!global.Object.entries) {
global.Object.entries = function(object: any) {
return Object.keys(object).map(key => [key, object[key]] as [string, any]);
};
}

View File

@@ -0,0 +1,5 @@
if (!global.Object.values) {
global.Object.values = function(object: any) {
return Object.keys(object).map(key => object[key]);
};
}

View File

@@ -0,0 +1 @@
export { default as fetch, Request, Response, Headers } from 'node-fetch';

1
node_modules/apollo-server-env/src/polyfills/url.js generated vendored Normal file
View File

@@ -0,0 +1 @@
export { URL, URLSearchParams } from 'url';

View File

@@ -0,0 +1,2 @@
export type ValueOrPromise<T> = T | Promise<T>;
export type WithRequired<T, K extends keyof T> = T & Required<Pick<T, K>>;

41
node_modules/apollo-server-env/src/url.d.ts generated vendored Normal file
View File

@@ -0,0 +1,41 @@
export declare class URL {
constructor(input: string, base?: string | URL);
hash: string;
host: string;
hostname: string;
href: string;
readonly origin: string;
password: string;
pathname: string;
port: string;
protocol: string;
search: string;
readonly searchParams: URLSearchParams;
username: string;
toString(): string;
toJSON(): string;
}
export declare class URLSearchParams implements Iterable<[string, string]> {
constructor(init?: URLSearchParamsInit);
append(name: string, value: string): void;
delete(name: string): void;
entries(): IterableIterator<[string, string]>;
forEach(callback: (value: string, name: string) => void): void;
get(name: string): string | null;
getAll(name: string): string[];
has(name: string): boolean;
keys(): IterableIterator<string>;
set(name: string, value: string): void;
sort(): void;
toString(): string;
values(): IterableIterator<string>;
[Symbol.iterator](): IterableIterator<[string, string]>;
}
export type URLSearchParamsInit =
| URLSearchParams
| string
| { [key: string]: Object | Object[] | undefined }
| Iterable<[string, Object]>
| Array<[string, Object]>;

View File

@@ -0,0 +1,24 @@
const runtimeSupportsPromisify = (() => {
if (
process &&
process.release &&
process.release.name === 'node' &&
process.versions &&
typeof process.versions.node === 'string'
) {
const [nodeMajor] = process.versions.node
.split('.', 1)
.map(segment => parseInt(segment, 10));
if (nodeMajor >= 8) {
return true;
}
return false;
}
// If we haven't matched any of the above criteria, we'll remain unsupported
// for this mysterious environment until a pull-request proves us otherwise.
return false;
})();
export default runtimeSupportsPromisify;