@amohamud23/notihub 1.0.178 → 1.0.179
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/index.cjs +15 -8
- package/dist/index.js +15 -8
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -173,14 +173,21 @@ var DocumentNotFoundException = class _DocumentNotFoundException extends Error {
|
|
|
173
173
|
var import_client_dynamodb = require("@aws-sdk/client-dynamodb");
|
|
174
174
|
var import_lib_dynamodb = require("@aws-sdk/lib-dynamodb");
|
|
175
175
|
var isOffline = process.env.IS_OFFLINE === "true";
|
|
176
|
-
var ddbClient
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
176
|
+
var ddbClient;
|
|
177
|
+
if (isOffline) {
|
|
178
|
+
console.log("Running in offline mode");
|
|
179
|
+
ddbClient = new import_client_dynamodb.DynamoDBClient({
|
|
180
|
+
region: "localhost",
|
|
181
|
+
endpoint: "http://0.0.0.0:8000",
|
|
182
|
+
credentials: {
|
|
183
|
+
accessKeyId: "MockAccessKeyId",
|
|
184
|
+
secretAccessKey: "MockSecretAccessKey"
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
} else {
|
|
188
|
+
console.log("Running in production mode");
|
|
189
|
+
ddbClient = new import_client_dynamodb.DynamoDBClient();
|
|
190
|
+
}
|
|
184
191
|
var ddbDocClient = import_lib_dynamodb.DynamoDBDocumentClient.from(ddbClient, {
|
|
185
192
|
marshallOptions: {
|
|
186
193
|
removeUndefinedValues: true
|
package/dist/index.js
CHANGED
|
@@ -134,14 +134,21 @@ var DocumentNotFoundException = class _DocumentNotFoundException extends Error {
|
|
|
134
134
|
import { DynamoDBClient } from "@aws-sdk/client-dynamodb";
|
|
135
135
|
import { DynamoDBDocumentClient } from "@aws-sdk/lib-dynamodb";
|
|
136
136
|
var isOffline = process.env.IS_OFFLINE === "true";
|
|
137
|
-
var ddbClient
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
137
|
+
var ddbClient;
|
|
138
|
+
if (isOffline) {
|
|
139
|
+
console.log("Running in offline mode");
|
|
140
|
+
ddbClient = new DynamoDBClient({
|
|
141
|
+
region: "localhost",
|
|
142
|
+
endpoint: "http://0.0.0.0:8000",
|
|
143
|
+
credentials: {
|
|
144
|
+
accessKeyId: "MockAccessKeyId",
|
|
145
|
+
secretAccessKey: "MockSecretAccessKey"
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
} else {
|
|
149
|
+
console.log("Running in production mode");
|
|
150
|
+
ddbClient = new DynamoDBClient();
|
|
151
|
+
}
|
|
145
152
|
var ddbDocClient = DynamoDBDocumentClient.from(ddbClient, {
|
|
146
153
|
marshallOptions: {
|
|
147
154
|
removeUndefinedValues: true
|