Skip to content

Commit 7e088b3

Browse files
committed
near complete
1 parent f5f6bdb commit 7e088b3

19 files changed

+2260
-555
lines changed

.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
build/
33
node_modules
44
npm-debug.log
5-
package-lock.json

.jshintrc

Lines changed: 0 additions & 76 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 0 additions & 137 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2016-2019 Ahmad Shiina and Gabriel Potter
3+
Copyright (c) 2021 Matthew Keil
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/lib/_context.ts renamed to no_compile/_context.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
* https://docs.aws.amazon.com/en_us/lambda/latest/dg/nodejs-prog-model-context.html
77
*/
88

9-
import utils = require('./utils.js');
10-
import mute = require('./mute.js');
9+
import utils = require('../src/lib/utils.js');
10+
import mute = require('../src/lib/getLogger.js');
1111

1212
function Context() {
1313
this.logger = null;

src/cli.ts renamed to no_compile/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
'use strict';
44

55
import lambdaLocal = require('./lambdalocal');
6-
import utils = require('./lib/utils');
6+
import utils = require('../src/lib/utils');
77

88
/*
99
* Local executor for Amazon Lambda function

src/lambdalocal.ts renamed to no_compile/lambdalocal.ts

Lines changed: 2 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -11,45 +11,9 @@ import fs = require('fs');
1111
import path = require('path');
1212
import os = require('os');
1313
import { createServer, IncomingMessage, ServerResponse } from 'http';
14-
import utils = require('./lib/utils.js');
15-
import Context = require('./lib/_context.js');
14+
import utils = require('../src/lib/utils.js');
15+
import Context = require('./_context.js');
1616

17-
/*
18-
* Lambda local version
19-
*/
20-
export const version = "2.0.0";
21-
22-
var logger = utils.getWinstonConsole();
23-
24-
export function setLogger(_logger){
25-
if(_logger != null && typeof _logger.transports != 'undefined'){
26-
logger = _logger;
27-
} else {
28-
console.warn("Invalid logger object ! Using default logger");
29-
}
30-
}
31-
32-
export function getLogger() {
33-
return logger;
34-
}
35-
36-
export function execute(opts) {
37-
if (opts.callback) {
38-
_executeSync.apply(this, [opts]);
39-
} else {
40-
var that = this;
41-
return new Promise(function (resolve, reject) {
42-
var _opts = Object.assign({}, opts); /* Copy the opts to avoid modifying the external opts */
43-
_opts.callback = function (_err, _done) {
44-
if (_err) {
45-
reject(_err);
46-
}
47-
resolve(_done);
48-
};
49-
_executeSync.apply(that, [_opts]);
50-
});
51-
}
52-
};
5317

5418
export function watch(opts) {
5519
if (!opts.verboseLevel){
@@ -135,15 +99,6 @@ function _executeSync(opts) {
13599

136100
}
137101

138-
if (lambdaFunc && lambdaPath) {
139-
throw new SyntaxError("Cannot specify both lambdaFunc and lambdaPath !");
140-
return;
141-
}
142-
143-
if (lambdaPath){
144-
lambdaPath = utils.getAbsolutePath(lambdaPath);
145-
}
146-
147102
// set environment variables before the require
148103
var envVars = {
149104
'AWS_LAMBDA_FUNCTION_NAME': lambdaHandler,

0 commit comments

Comments
 (0)