@ttoss/aws-appsync-nodejs 1.5.8 → 1.5.10
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/esm/index.js +0 -1
- package/dist/index.js +4 -16
- package/package.json +10 -6
package/dist/esm/index.js
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
4
|
import { HttpRequest } from "@aws-sdk/protocol-http";
|
|
5
|
-
import { Request, default as fetch } from "node-fetch";
|
|
6
5
|
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
7
6
|
import { SignatureV4 } from "@aws-sdk/signature-v4";
|
|
8
7
|
import { defaultProvider } from "@aws-sdk/credential-provider-node";
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
/** Powered by @ttoss/config. https://ttoss.dev/docs/modules/packages/config/ */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
var __create = Object.create;
|
|
5
4
|
var __defProp = Object.defineProperty;
|
|
6
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
8
|
var __export = (target, all) => {
|
|
11
9
|
for (var name in all) __defProp(target, name, {
|
|
@@ -22,15 +20,6 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
22
20
|
}
|
|
23
21
|
return to;
|
|
24
22
|
};
|
|
25
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
26
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
27
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
28
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
29
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
30
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
31
|
-
value: mod,
|
|
32
|
-
enumerable: true
|
|
33
|
-
}) : target, mod));
|
|
34
23
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
35
24
|
value: true
|
|
36
25
|
}), mod);
|
|
@@ -42,7 +31,6 @@ __export(src_exports, {
|
|
|
42
31
|
});
|
|
43
32
|
module.exports = __toCommonJS(src_exports);
|
|
44
33
|
var import_protocol_http = require("@aws-sdk/protocol-http");
|
|
45
|
-
var import_node_fetch = __toESM(require("node-fetch"));
|
|
46
34
|
var import_sha256_js = require("@aws-crypto/sha256-js");
|
|
47
35
|
var import_signature_v4 = require("@aws-sdk/signature-v4");
|
|
48
36
|
var import_credential_provider_node = require("@aws-sdk/credential-provider-node");
|
|
@@ -68,8 +56,8 @@ var queryWithApiKey = async (query2, variables) => {
|
|
|
68
56
|
variables
|
|
69
57
|
})
|
|
70
58
|
};
|
|
71
|
-
const request = new
|
|
72
|
-
const response = await (
|
|
59
|
+
const request = new Request(apiEndpoint, options);
|
|
60
|
+
const response = await fetch(request);
|
|
73
61
|
const body = await response.json();
|
|
74
62
|
return body;
|
|
75
63
|
};
|
|
@@ -109,8 +97,8 @@ var queryWithCredentials = async (query2, variables) => {
|
|
|
109
97
|
path: endpoint.pathname
|
|
110
98
|
});
|
|
111
99
|
const signed = await signer.sign(requestToBeSigned);
|
|
112
|
-
const request = new
|
|
113
|
-
const response = await (
|
|
100
|
+
const request = new Request(endpoint, signed);
|
|
101
|
+
const response = await fetch(request);
|
|
114
102
|
const body = await response.json();
|
|
115
103
|
return body;
|
|
116
104
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/aws-appsync-nodejs",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.10",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ttoss",
|
|
@@ -19,17 +19,21 @@
|
|
|
19
19
|
"@aws-crypto/sha256-js": "^2.0.2",
|
|
20
20
|
"@aws-sdk/credential-provider-node": "^3.231.0",
|
|
21
21
|
"@aws-sdk/protocol-http": "^3.226.0",
|
|
22
|
-
"@aws-sdk/signature-v4": "^3.226.0"
|
|
23
|
-
"node-fetch": "2"
|
|
22
|
+
"@aws-sdk/signature-v4": "^3.226.0"
|
|
24
23
|
},
|
|
25
24
|
"devDependencies": {
|
|
26
|
-
"@
|
|
25
|
+
"@aws-sdk/types": "^3.310.0",
|
|
26
|
+
"@ttoss/config": "^1.29.5",
|
|
27
27
|
"@types/jest": "^29.5.0",
|
|
28
|
-
"jest": "^29.5.0"
|
|
28
|
+
"jest": "^29.5.0",
|
|
29
|
+
"tsup": "^6.7.0"
|
|
29
30
|
},
|
|
30
31
|
"keywords": [],
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=18.0.0"
|
|
34
|
+
},
|
|
31
35
|
"publishConfig": {
|
|
32
36
|
"access": "public"
|
|
33
37
|
},
|
|
34
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "f30779a5ea50d60cf3099e5fde712e1ef7b7882c"
|
|
35
39
|
}
|