Initialisation
Added the packages and files for the backend server
This commit is contained in:
21
node_modules/@apollo/utils.createhash/LICENSE
generated
vendored
Normal file
21
node_modules/@apollo/utils.createhash/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 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.
|
||||
12
node_modules/@apollo/utils.createhash/README.md
generated
vendored
Normal file
12
node_modules/@apollo/utils.createhash/README.md
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
# createHash
|
||||
|
||||
Equivalent to Node.js's `crypto.createHash`. Uses the Node.js builtin if
|
||||
present, otherwise it falls back the the `sha.js` package's implementation.
|
||||
|
||||
## Usage
|
||||
|
||||
```ts
|
||||
import { createHash } from "@apollo/utils.createhash";
|
||||
|
||||
createHash("sha256").update("foo").digest("hex");
|
||||
```
|
||||
2
node_modules/@apollo/utils.createhash/dist/index.d.ts
generated
vendored
Normal file
2
node_modules/@apollo/utils.createhash/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare function createHash(kind: string): import("crypto").Hash;
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/@apollo/utils.createhash/dist/index.d.ts.map
generated
vendored
Normal file
1
node_modules/@apollo/utils.createhash/dist/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,QAAQ,EAAE,IAAI,CAO9D"}
|
||||
12
node_modules/@apollo/utils.createhash/dist/index.js
generated
vendored
Normal file
12
node_modules/@apollo/utils.createhash/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.createHash = void 0;
|
||||
const utils_isnodelike_1 = require("@apollo/utils.isnodelike");
|
||||
function createHash(kind) {
|
||||
if (utils_isnodelike_1.isNodeLike) {
|
||||
return module.require("crypto").createHash(kind);
|
||||
}
|
||||
return require("sha.js")(kind);
|
||||
}
|
||||
exports.createHash = createHash;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/@apollo/utils.createhash/dist/index.js.map
generated
vendored
Normal file
1
node_modules/@apollo/utils.createhash/dist/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,+DAAsD;AAEtD,SAAgB,UAAU,CAAC,IAAY;IACrC,IAAI,6BAAU,EAAE;QAGd,OAAO,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;KAClD;IACD,OAAO,OAAO,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC;AACjC,CAAC;AAPD,gCAOC"}
|
||||
27
node_modules/@apollo/utils.createhash/package.json
generated
vendored
Normal file
27
node_modules/@apollo/utils.createhash/package.json
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"name": "@apollo/utils.createhash",
|
||||
"version": "2.0.1",
|
||||
"description": "Node-agnostic hashing utility",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/apollographql/apollo-utils.git",
|
||||
"directory": "packages/createHash/"
|
||||
},
|
||||
"keywords": [
|
||||
"apollo",
|
||||
"graphql",
|
||||
"typescript",
|
||||
"node"
|
||||
],
|
||||
"author": "Apollo <packages@apollographql.com>",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"node": ">=14"
|
||||
},
|
||||
"dependencies": {
|
||||
"@apollo/utils.isnodelike": "^2.0.1",
|
||||
"sha.js": "^2.4.11"
|
||||
}
|
||||
}
|
||||
9
node_modules/@apollo/utils.createhash/src/__tests__/createHash.test.ts
generated
vendored
Normal file
9
node_modules/@apollo/utils.createhash/src/__tests__/createHash.test.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { createHash } from "..";
|
||||
|
||||
describe("createHash", () => {
|
||||
it("creates a hash", () => {
|
||||
expect(createHash("sha256").update("foo").digest("hex")).toEqual(
|
||||
"2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae",
|
||||
);
|
||||
});
|
||||
});
|
||||
6
node_modules/@apollo/utils.createhash/src/__tests__/exports.test.ts
generated
vendored
Normal file
6
node_modules/@apollo/utils.createhash/src/__tests__/exports.test.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import * as allExports from "..";
|
||||
|
||||
it("exports hashing functions", () => {
|
||||
expect(Object.keys(allExports).length).toBe(1);
|
||||
expect(typeof allExports.createHash).toBe("function");
|
||||
});
|
||||
5
node_modules/@apollo/utils.createhash/src/__tests__/tsconfig.json
generated
vendored
Normal file
5
node_modules/@apollo/utils.createhash/src/__tests__/tsconfig.json
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"extends": "../../../../tsconfig.test.base",
|
||||
"include": ["**/*"],
|
||||
"references": [{ "path": "../../" }]
|
||||
}
|
||||
10
node_modules/@apollo/utils.createhash/src/index.ts
generated
vendored
Normal file
10
node_modules/@apollo/utils.createhash/src/index.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { isNodeLike } from "@apollo/utils.isnodelike";
|
||||
|
||||
export function createHash(kind: string): import("crypto").Hash {
|
||||
if (isNodeLike) {
|
||||
// Use module.require instead of just require to avoid bundling whatever
|
||||
// crypto polyfills a non-Node bundler might fall back to.
|
||||
return module.require("crypto").createHash(kind);
|
||||
}
|
||||
return require("sha.js")(kind);
|
||||
}
|
||||
Reference in New Issue
Block a user