aws-architect 6.7.96 → 6.7.98

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.
@@ -4,8 +4,25 @@ const commander = require('commander');
4
4
  const aws = require('aws-sdk');
5
5
  const AwsArchitect = require('aws-architect');
6
6
 
7
- let ci = require('ci-build-tools')(process.env.GIT_TAG_PUSHER);
8
- let version = ci.GetVersion();
7
+ function getVersion() {
8
+ let release_version = '0.0';
9
+ const pull_request = '';
10
+ const branch = process.env.GITHUB_REF;
11
+ const build_number = process.env.GITHUB_RUN_NUMBER;
12
+
13
+ //Builds of pull requests
14
+ if (pull_request && !pull_request.match(/false/i)) {
15
+ release_version = `0.${pull_request}`;
16
+ } else if (!branch || !branch.match(/^(refs\/heads\/)?release[/-]/i)) {
17
+ //Builds of branches that aren't master or release
18
+ release_version = '0.0';
19
+ } else {
20
+ //Builds of release branches (or locally or on server)
21
+ release_version = branch.match(/^(?:refs\/heads\/)?release[/-](\d+(?:\.\d+){0,3})$/i)[1];
22
+ }
23
+ return `${release_version}.${(build_number || '0')}.0.0.0.0`.split('.').slice(0, 3).join('.');
24
+ }
25
+ const version = getVersion();
9
26
  commander.version(version);
10
27
 
11
28
  let packageMetadataFile = path.join(__dirname, 'package.json');
@@ -16,7 +16,6 @@
16
16
  "dependencies": {
17
17
  "authress-sdk": "^2.0.56",
18
18
  "axios": "^0.21.4",
19
- "ci-build-tools": "^1.0.13",
20
19
  "fs-extra": "^7.0.1",
21
20
  "microservice-utilities": "^0.1.121",
22
21
  "openapi-factory": "^5.3.48"
@@ -27,12 +26,11 @@
27
26
  "chai": "^4.2.0",
28
27
  "commander": "^2.19.0",
29
28
  "error-object-polyfill": "^1.0.13",
30
- "eslint": "^6.1.0",
31
- "eslint-friendly-formatter": "^4.0.1",
32
- "eslint-plugin-import": "^2.14.0",
33
- "eslint-plugin-mocha": "^5.2.0",
34
- "eslint-plugin-node": "^8.0.0",
35
- "eslint-plugin-promise": "^4.0.1",
29
+ "eslint": "^8.35.0",
30
+ "eslint-config-cimpress-atsquad": "^1.0.67",
31
+ "eslint-plugin-import": "^2.22.1",
32
+ "eslint-plugin-mocha": "^10.0.5",
33
+ "eslint-plugin-node": "^11.1.0",
36
34
  "glob": "^7.1.3",
37
35
  "mocha": "^5.2.0",
38
36
  "nodemon": "^1.18.7",
@@ -52,6 +50,6 @@
52
50
  },
53
51
  "homepage": "https://source-code.com",
54
52
  "engines": {
55
- "node": ">=8.10.0"
53
+ "node": ">=16.15.0"
56
54
  }
57
55
  }
@@ -158,9 +158,9 @@ class BucketManager {
158
158
  Bucket: bucket,
159
159
  LifecycleConfiguration: {
160
160
  Rules: [{
161
- ID: 'AutoDeleteOldArtifacts',
161
+ ID: 'AwsArchitect-AutoDeleteOldArtifacts',
162
162
  Expiration: {
163
- Days: 365
163
+ Days: 31
164
164
  },
165
165
  Prefix: '',
166
166
  NoncurrentVersionExpiration: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aws-architect",
3
- "version": "6.7.96",
3
+ "version": "6.7.98",
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",
@@ -38,11 +38,16 @@
38
38
  "aws-sdk": ">=2.877.0"
39
39
  },
40
40
  "devDependencies": {
41
+ "@authress/eslint-config": "^1.0.2",
41
42
  "aws-sdk": "*",
42
43
  "chai": "^3.5.0",
43
- "ci-build-tools": "^1.0.13",
44
44
  "error-object-polyfill": "^1.1.14",
45
+ "eslint": "~8.35.0",
45
46
  "eslint-config-cimpress-atsquad": "^1.0.67",
47
+ "eslint-plugin-import": "^2.22.1",
48
+ "eslint-plugin-mocha": "^10.0.5",
49
+ "eslint-plugin-node": "^11.1.0",
50
+ "eslint-plugin-promise": "^6.1.1",
46
51
  "glob": "^5.0.15",
47
52
  "mocha": "^10.1.0",
48
53
  "sinon": "^1.17.3"
package/CHANGELOG.md DELETED
@@ -1,125 +0,0 @@
1
- # Change log
2
- This is the changelog for [AWS Architect](readme.md).
3
-
4
- ## 6.7 ##
5
- * Fix handlers for /route and /route/ so that the index.html is always duplicated.
6
- * Add support for organizational stack set deployment
7
- * Remove invalid regions from organizational deployment [eu-central-2, ap-south-2, eu-south-2, me-central-1, ap-southeast-4]
8
- * Support pnpm lock files
9
- * Support the new version of openapi-factory 5.4.
10
- * Duplicate all .html files as cleaned files. `file.html` => `file` and `file/`, all three will work
11
- * Fix validateTemplate so that it actually uses S3 when available.
12
- * Add support for new status `CONFIGURATION_COMPLETE`
13
- * Add missing `tags` properties to all interfaces.
14
-
15
- ## 6.6 ##
16
- * Add support to `deleteWebsiteVersion(version)`
17
- * Fix `The function must be in an Active state. The current state for function arn:aws:lambda:Function:514 is Pending`.
18
- * Automatically delete existing ROLLBACK_COMPLETE stacks.
19
- * Add Ipv6 records to the cloudformation templates.
20
-
21
- ## 6.5 ##
22
- * Support APIGW version 2
23
-
24
- ## 6.4 ##
25
- * Add stackset support for AWS to cross regions
26
- * Skip stack deployment if template body already matches stack
27
-
28
- ## 6.3 ##
29
- * Automatically delete the stage lambda alias and version when deleting a stage by passing in the lambda function name as the second parameter to `awsArchitect.removeStagePromise`.
30
- * Add support for all mime-types for S3 uploads
31
-
32
- ## 6.2 ##
33
- * Allow setting upload zip file directly to support creating lambda layers
34
- * Add `publishZipArchive` to publish layers and other zip files directly to S3, using the package name and version automatically.
35
- * New option in `publishLambdaArtifactPromise` to allow turning off running npm or yarn for package deployment `autoHandleCompileOfSourceDirectory = false`.
36
- * Now uploads to the S3 directory file that matches any directory that contains an index.html for automatic redirects to the index.html.
37
-
38
- ## 6.1 ##
39
- * Deploy CF templates to S3 deployment bucket before deploying to CF to increase allow size of templates to 450KB.
40
- * Allow cache control to be the full string, not just an number
41
- * Dynamically inject `http` and `api` subpath into Location urls.
42
- * `cacheControlRegexMap` supports array to keep order of regex mappings
43
- * `deployTemplate` StackConfiguration `options` now accepts `automaticallyProtectStack` which defaults to be `true`, to protect stacks. This will only protect stacks which are successfully created.
44
-
45
- ## 6.0 ##
46
- * Remove hosting index html, recommendation is to use nodemon and serve for that.
47
- * Removed deprecated methods
48
- * Now supports calling schedule and event triggers locally via the REST api.
49
- * Nodejs8.10 by default
50
- * Auto increment port starting at 8080 or specified up to 10 ports before falling back to a random port.
51
- * Use `-`s in stage names instead of `_` so that more CIs can match their environments stages correctly.
52
- * Added default override for S3 content type uploads.
53
- * Allow deploying `.files` using the `bucketManager`
54
- * Dynamically inject `http` and `api` subpath into url hrefs.
55
- * Remove autocreation of api gateway when attempting to find it. The expectation is that "searching for the API" happens always after the CF stack creation.
56
- * `awsArchitect.run` now returns the `server` which contains the only method `stop` allowing manual shutdown.
57
-
58
- ## 5.1 ##
59
- * Provide lower case names for methods.
60
- * Add deprecation warning to removal methods in **6.0**.
61
- * Index.html is uploaded last.
62
- * Add in dynamic resolving of ACM certs by domain name.
63
-
64
- ## 5.0 ##
65
- * Upgrade to OpenAPI-factory 3.0, see [openapi factory](https://github.com/wparad/openapi-factory.js/blob/master/CHANGELOG.md#30) for breaking changes. This means that the authorizer now takes `event` and the authorization token must be manually extracted.
66
- * Support authorizer resolution in express `server.run`
67
- * Allow providing a custom logger to run function.
68
-
69
- ## 4.2 ##
70
- * Include cloud formation deployment for standard resources.
71
- * Added example cloud formation template to template service.
72
- * New `RemoveStage` in AWS Architect.
73
- * Add Support for `yarn.lock` files by assuming `yarn` should be executed.
74
-
75
- ## 4.1 ##
76
- * Add `+AwsArchitect.prototype.publishLambdaArtifactPromise` to perform the action to deploy a microservice zip package to S3.
77
- * Allow specifying S3 artifacts cache-control times as overrides.
78
-
79
- ## 4.0 ##
80
- * Removed passing the bucket as configuration into `publishWebsite`. Bucket is required as part of `contentOptions`.
81
- * Prevent overwriting the bucket configuration using the `options` parameter in `publishWebsite`.
82
-
83
- ## 3.7 ##
84
- * Default to region set in aws config, rather than us-east-1.
85
-
86
- ## 3.6 ##
87
- * Allow sending binary Buffer bodies via local server to match API Gateway functionality.
88
-
89
- ## 3.5 ##
90
- * Upgrade default nodejs version to 6.10.
91
-
92
- ## 3.4 ##
93
- * Upgrade jwt resolution to include by default RS256.
94
-
95
- ## 3.3 ##
96
- * Remove CORS headers from local server.
97
-
98
- ## 3.2 ##
99
- * Automatically create the service role to execute the lambda functions.
100
- * Automatically create the s3 bucket with the website policy if it doesn't exist.
101
-
102
- ## 3.1 ##
103
- * Moved website bucket configuration to contentOptions.
104
- * Added `AwsArchitect.promoteToStage(source, stage)` function which will copy a bucket directory.
105
-
106
- ## 3.0 ##
107
- * Upgrade to handle ANY on aws resources.
108
- * Allow running just a website on port 8080, without any extra api files.
109
-
110
- ## 2.1 ##
111
- * Add support for creating dynamoDB Tables.
112
- * Separate policy examples into their own documents.
113
- * Allow specifying specific port to run on.
114
- * Deploy content directory to s3.
115
-
116
- ## 2.0 ##
117
- * All configuration is now contained in the api files. Generation, run, and testing is completed via index.js. New templates created.
118
- * A single lambda function is created, for the purpose of the whole microservice.
119
- * Introduced configuration options for the api and content (s3).
120
-
121
- ## 1.1 ##
122
- * Lambdas are not all specified in the file specified by the constructor call. Default is the `src/index.js` file in `make.js`. `aws-config.js` will be removed in version 2.0, and all configuration can be specified in the index.js composition root.
123
-
124
- ## 1.0 ##
125
- * Introduced commandline ruby tool `aws-architect` for configuring a AWS Microservice instance using Cloud Formation and AWS API.
@@ -1 +0,0 @@
1
- node_modules