Skip to content

Commit

Permalink
Convert to es module
Browse files Browse the repository at this point in the history
  • Loading branch information
razzeee committed Oct 9, 2023
1 parent cbbed71 commit 10dcab7
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var { DynamoDBDocument } = require("@aws-sdk/lib-dynamodb"),
{ DynamoDB } = require("@aws-sdk/client-dynamodb");
import { DynamoDBDocument } from "@aws-sdk/lib-dynamodb";
import { DynamoDB } from "@aws-sdk/client-dynamodb";

let DUMMYITEM = (item = {
amount: 0,
Expand All @@ -10,7 +10,10 @@ let DUMMYITEM = (item = {
publicName: "Dummy Record",
});

exports.sourceNodes = ({ actions, createNodeId, createContentDigest }, options) => {
export function sourceNodes(
{ actions, createNodeId, createContentDigest },
options
) {
return new Promise((resolve, reject) => {
const { createNode } = actions;
delete options.plugins;
Expand Down Expand Up @@ -93,4 +96,4 @@ exports.sourceNodes = ({ actions, createNodeId, createContentDigest }, options)
docClient.query(options.params, onQuery);
}
});
};
}

0 comments on commit 10dcab7

Please sign in to comment.