aws-architect 6.7.145 → 6.7.146
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aws-architect",
|
|
3
|
-
"version": "6.7.
|
|
3
|
+
"version": "6.7.146",
|
|
4
4
|
"description": "AWS Architect is a node based tool to configure and deploy AWS-based microservices.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
],
|
|
13
13
|
"scripts": {
|
|
14
14
|
"lint": "eslint --ext .js tests lib index.js",
|
|
15
|
-
"test": "
|
|
15
|
+
"test": "vitest run"
|
|
16
16
|
},
|
|
17
17
|
"bin": {
|
|
18
18
|
"aws-architect": "./bin/aws-architect.js"
|
|
@@ -42,17 +42,15 @@
|
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@authress/eslint-config": "^1.0.2",
|
|
44
44
|
"aws-sdk": "*",
|
|
45
|
-
"chai": "^3.5.0",
|
|
46
45
|
"error-object-polyfill": "^1.1.14",
|
|
47
46
|
"eslint": "~8.35.0",
|
|
48
47
|
"eslint-config-cimpress-atsquad": "^1.0.67",
|
|
49
48
|
"eslint-plugin-import": "^2.22.1",
|
|
50
|
-
"eslint-plugin-mocha": "^10.0.5",
|
|
51
49
|
"eslint-plugin-node": "^11.1.0",
|
|
52
50
|
"eslint-plugin-promise": "^6.1.1",
|
|
53
51
|
"glob": "^5.0.15",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
52
|
+
"sinon": "^1.17.3",
|
|
53
|
+
"vitest": "^3.0.0"
|
|
56
54
|
},
|
|
57
55
|
"repository": {
|
|
58
56
|
"type": "git",
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
let { describe, it } = require('mocha');
|
|
2
|
-
let assert = require('chai').assert;
|
|
3
|
-
|
|
4
|
-
describe('src/index.js', function() {
|
|
5
|
-
describe('Test Handler', function () {
|
|
6
|
-
it('GET livecheck', function() {
|
|
7
|
-
try {
|
|
8
|
-
let api = require('../src/index');
|
|
9
|
-
|
|
10
|
-
let result = api.Routes['GET']['/livecheck'].Handler();
|
|
11
|
-
let expectedResult = {
|
|
12
|
-
statusCode: 200,
|
|
13
|
-
body: JSON.stringify({
|
|
14
|
-
'field': 'hello world'
|
|
15
|
-
}),
|
|
16
|
-
headers: {
|
|
17
|
-
'Content-Type': 'application/json'
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
assert.equal(result.statusCode, expectedResult.statusCode, 'Expected ANY /proxy status code to have matching value.')
|
|
21
|
-
assert.deepEqual(result.headers, expectedResult.headers, 'Expected ANY /proxy headers to have matching value.')
|
|
22
|
-
assert.equal(result.body, expectedResult.body, 'Expected ANY /proxy body to have matching value.')
|
|
23
|
-
}
|
|
24
|
-
catch(e) {
|
|
25
|
-
console.error(e.stack);
|
|
26
|
-
assert(false, e.toString());
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
it('ANY', function() {
|
|
30
|
-
try {
|
|
31
|
-
let api = require('../src/index');
|
|
32
|
-
|
|
33
|
-
let result = api.Routes['ANY']['/{proxy+}'].Handler();
|
|
34
|
-
let expectedResult = {
|
|
35
|
-
statusCode: 404,
|
|
36
|
-
body: JSON.stringify({}),
|
|
37
|
-
headers: {
|
|
38
|
-
'Content-Type': 'application/json'
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
assert.equal(result.statusCode, expectedResult.statusCode, 'Expected ANY /proxy status code to have matching value.')
|
|
42
|
-
assert.deepEqual(result.headers, expectedResult.headers, 'Expected ANY /proxy headers to have matching value.')
|
|
43
|
-
assert.equal(result.body, expectedResult.body, 'Expected ANY /proxy body to have matching value.')
|
|
44
|
-
}
|
|
45
|
-
catch(e) {
|
|
46
|
-
console.error(e.stack);
|
|
47
|
-
assert(false, e.toString());
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
describe('Non-RESTful Test', function () {
|
|
52
|
-
/*
|
|
53
|
-
it('GET', function(done) {
|
|
54
|
-
try {
|
|
55
|
-
let lambda = require('../src/index');
|
|
56
|
-
new Promise((s, f) => {
|
|
57
|
-
lambda({}, {}, (failure, success) => {
|
|
58
|
-
if(success && !failure) { return s(success); }
|
|
59
|
-
else { f(failure); }
|
|
60
|
-
});
|
|
61
|
-
})
|
|
62
|
-
.then(output => {
|
|
63
|
-
done();
|
|
64
|
-
})
|
|
65
|
-
.catch(failure => done(failure));
|
|
66
|
-
}
|
|
67
|
-
catch(e) {
|
|
68
|
-
console.error(e.stack);
|
|
69
|
-
assert(false, e.toString());
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
*/
|
|
73
|
-
});
|
|
74
|
-
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
let { describe, it } = require('mocha');
|
|
2
|
-
let assert = require('chai').assert;
|
|
3
|
-
let fs = require('fs');
|
|
4
|
-
let path = require('path');
|
|
5
|
-
|
|
6
|
-
describe('make.js', function() {
|
|
7
|
-
describe('Syntax', function () {
|
|
8
|
-
it('Should be valid node', function(){
|
|
9
|
-
try {
|
|
10
|
-
let app = require('../make');
|
|
11
|
-
assert(true);
|
|
12
|
-
}
|
|
13
|
-
catch(e) {
|
|
14
|
-
console.log(e.stack);
|
|
15
|
-
assert(false, e.toString());
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
});
|