serverless-offline 8.3.0 → 8.3.1
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.
|
@@ -321,7 +321,7 @@ class ServerlessOffline {
|
|
|
321
321
|
|
|
322
322
|
if (this.log) {
|
|
323
323
|
this.log.notice();
|
|
324
|
-
this.log.notice(`Starting Offline at stage ${provider.stage} ${_chalk.default.gray(`
|
|
324
|
+
this.log.notice(`Starting Offline at stage ${provider.stage} ${_chalk.default.gray(`(${provider.region})`)}`);
|
|
325
325
|
this.log.notice();
|
|
326
326
|
this.log.debug('options:', _classPrivateFieldLooseBase(this, _options)[_options]);
|
|
327
327
|
} else {
|
|
@@ -311,7 +311,7 @@ class DockerContainer {
|
|
|
311
311
|
async _downloadLayer(layerArn, layerDir) {
|
|
312
312
|
const layerName = layerArn.split(':layer:')[1];
|
|
313
313
|
const layerZipFile = `${layerDir}/${layerName}.zip`;
|
|
314
|
-
const layerProgress = this.
|
|
314
|
+
const layerProgress = this.log && this.progress.get(`layer-${layerName}`);
|
|
315
315
|
|
|
316
316
|
if (this.log) {
|
|
317
317
|
this.log.verbose(`[${layerName}] ARN: ${layerArn}`);
|
|
@@ -325,12 +325,11 @@ class DockerContainer {
|
|
|
325
325
|
|
|
326
326
|
if (this.log) {
|
|
327
327
|
this.log.verbose(`[${layerName}] Getting Info`);
|
|
328
|
+
layerProgress.notice(`Retrieving "${layerName}": Getting info`);
|
|
328
329
|
} else {
|
|
329
330
|
(0, _serverlessLog.logLayers)(`[${layerName}] Getting Info`);
|
|
330
331
|
}
|
|
331
332
|
|
|
332
|
-
layerProgress.notice(`Retrieving "${layerName}": Getting info`);
|
|
333
|
-
|
|
334
333
|
try {
|
|
335
334
|
let layer = null;
|
|
336
335
|
|
|
@@ -360,13 +359,14 @@ class DockerContainer {
|
|
|
360
359
|
|
|
361
360
|
const layerSize = layer.Content.CodeSize;
|
|
362
361
|
await (0, _fsExtra.ensureDir)(layerDir);
|
|
363
|
-
(0, _serverlessLog.logLayers)(`[${layerName}] Downloading ${this._formatBytes(layerSize)}...`);
|
|
364
362
|
|
|
365
363
|
if (this.log) {
|
|
366
|
-
this.log.verbose(`
|
|
364
|
+
this.log.verbose(`Retrieving "${layerName}": Downloading ${this._formatBytes(layerSize)}...`);
|
|
365
|
+
layerProgress.notice(`Retrieving "${layerName}": Downloading ${this._formatBytes(layerSize)}`);
|
|
366
|
+
} else {
|
|
367
|
+
(0, _serverlessLog.logLayers)(`[${layerName}] Downloading ${this._formatBytes(layerSize)}...`);
|
|
367
368
|
}
|
|
368
369
|
|
|
369
|
-
layerProgress.notice(`Retrieving "${layerName}": Downloading ${this._formatBytes(layerSize)}`);
|
|
370
370
|
const res = await (0, _nodeFetch.default)(layerUrl, {
|
|
371
371
|
method: 'get'
|
|
372
372
|
});
|
|
@@ -393,12 +393,12 @@ class DockerContainer {
|
|
|
393
393
|
});
|
|
394
394
|
|
|
395
395
|
if (this.log) {
|
|
396
|
-
this.log.verbose(`
|
|
396
|
+
this.log.verbose(`Retrieving "${layerName}": Unzipping to .layers directory`);
|
|
397
|
+
layerProgress.notice(`Retrieving "${layerName}": Unzipping to .layers directory`);
|
|
397
398
|
} else {
|
|
398
399
|
(0, _serverlessLog.logLayers)(`[${layerName}] Unzipping to .layers directory`);
|
|
399
400
|
}
|
|
400
401
|
|
|
401
|
-
layerProgress.notice(`Retrieving "${layerName}": Unzipping to .layers directory`);
|
|
402
402
|
const data = await (0, _fsExtra.readFile)(`${layerZipFile}`);
|
|
403
403
|
const zip = await _jszip.default.loadAsync(data);
|
|
404
404
|
await Promise.all(keys(zip.files).map(async filename => {
|
|
@@ -422,7 +422,7 @@ class DockerContainer {
|
|
|
422
422
|
|
|
423
423
|
(0, _fs.unlinkSync)(`${layerZipFile}`);
|
|
424
424
|
} finally {
|
|
425
|
-
layerProgress.remove();
|
|
425
|
+
if (this.log) layerProgress.remove();
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
428
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"dedicatedTo": "Blue, a great migrating bird.",
|
|
3
3
|
"name": "serverless-offline",
|
|
4
|
-
"version": "8.3.
|
|
4
|
+
"version": "8.3.1",
|
|
5
5
|
"description": "Emulate AWS λ and API Gateway locally when developing your Serverless project",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/main.js",
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
"@hapi/boom": "^9.1.4",
|
|
177
177
|
"@hapi/h2o2": "^9.1.0",
|
|
178
178
|
"@hapi/hapi": "^20.2.1",
|
|
179
|
-
"aws-sdk": "^2.
|
|
179
|
+
"aws-sdk": "^2.1036.0",
|
|
180
180
|
"boxen": "^5.1.2",
|
|
181
181
|
"chalk": "^4.1.2",
|
|
182
182
|
"cuid": "^2.1.8",
|
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
"semver": "^7.3.5",
|
|
202
202
|
"update-notifier": "^5.1.0",
|
|
203
203
|
"velocityjs": "^2.0.5",
|
|
204
|
-
"ws": "^7.5.
|
|
204
|
+
"ws": "^7.5.6"
|
|
205
205
|
},
|
|
206
206
|
"devDependencies": {
|
|
207
207
|
"@babel/cli": "^7.16.0",
|
|
@@ -230,6 +230,6 @@
|
|
|
230
230
|
"serverless": "^2.66.2"
|
|
231
231
|
},
|
|
232
232
|
"peerDependencies": {
|
|
233
|
-
"serverless": "^1.60.0 || 2"
|
|
233
|
+
"serverless": "^1.60.0 || 2 || 3"
|
|
234
234
|
}
|
|
235
235
|
}
|