@brunwig/mup-aws-beanstalk 0.8.7 → 2.0.5

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.
Files changed (56) hide show
  1. package/.babelrc +15 -4
  2. package/.eslintrc.yml +2 -2
  3. package/.yarn/install-state.gz +0 -0
  4. package/docs/getting-started.md +1 -1
  5. package/docs/index.md +22 -6
  6. package/index.js +1 -1
  7. package/lib/assets/Procfile +1 -0
  8. package/lib/assets/health-check.js +9 -1
  9. package/lib/assets/health-check.js.map +1 -1
  10. package/lib/assets/nginx-server.conf +5 -0
  11. package/lib/assets/node.sh +37 -7
  12. package/lib/assets/npm.sh +14 -0
  13. package/lib/assets/prevent-npm.sh +4 -0
  14. package/lib/assets/role-start.sh +61 -0
  15. package/lib/assets/start.sh +1 -1
  16. package/lib/assets/yarn.sh +17 -0
  17. package/lib/aws.js +43 -77
  18. package/lib/aws.js.map +1 -1
  19. package/lib/certificates.js +56 -59
  20. package/lib/certificates.js.map +1 -1
  21. package/lib/command-handlers.js +613 -637
  22. package/lib/command-handlers.js.map +1 -1
  23. package/lib/commands.js +144 -111
  24. package/lib/commands.js.map +1 -1
  25. package/lib/deployment-logs.js +127 -0
  26. package/lib/deployment-logs.js.map +1 -0
  27. package/lib/download.js +11 -18
  28. package/lib/download.js.map +1 -1
  29. package/lib/eb-config.js +246 -242
  30. package/lib/eb-config.js.map +1 -1
  31. package/lib/env-ready.js +87 -88
  32. package/lib/env-ready.js.map +1 -1
  33. package/lib/env-settings.js +13 -14
  34. package/lib/env-settings.js.map +1 -1
  35. package/lib/index.js +111 -81
  36. package/lib/index.js.map +1 -1
  37. package/lib/policies.js +130 -115
  38. package/lib/policies.js.map +1 -1
  39. package/lib/prepare-bundle.js +187 -194
  40. package/lib/prepare-bundle.js.map +1 -1
  41. package/lib/recheck.js +16 -13
  42. package/lib/recheck.js.map +1 -1
  43. package/lib/tsconfig.tsbuildinfo +1 -0
  44. package/lib/types.js +3 -0
  45. package/lib/types.js.map +1 -0
  46. package/lib/upload.js +35 -49
  47. package/lib/upload.js.map +1 -1
  48. package/lib/utils.js +556 -577
  49. package/lib/utils.js.map +1 -1
  50. package/lib/validate.js +61 -59
  51. package/lib/validate.js.map +1 -1
  52. package/lib/versions.js +74 -81
  53. package/lib/versions.js.map +1 -1
  54. package/package.json +60 -26
  55. package/readme.md +2 -1
  56. package/tsconfig.json +41 -0
@@ -1,211 +1,204 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.archiveApp = archiveApp;
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
7
6
  exports.injectFiles = injectFiles;
8
- var _archiver = _interopRequireDefault(require("archiver"));
9
- var _fs = _interopRequireDefault(require("fs"));
10
- var _ejs = _interopRequireDefault(require("ejs"));
11
- var _lodash = require("lodash");
12
- var _path = _interopRequireDefault(require("path"));
13
- var _utils = require("./utils");
14
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
16
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
17
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
18
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
19
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ exports.archiveApp = archiveApp;
8
+ const archiver_1 = __importDefault(require("archiver"));
9
+ const fs_1 = __importDefault(require("fs"));
10
+ const ejs_1 = __importDefault(require("ejs"));
11
+ const lodash_1 = require("lodash");
12
+ const path_1 = __importDefault(require("path"));
13
+ const utils_1 = require("./utils");
20
14
  function copyFolderSync(src, dest) {
21
- if (!_fs.default.existsSync(src)) return;
22
- if (!_fs.default.existsSync(dest)) _fs.default.mkdirSync(dest, {
23
- recursive: true
24
- });
25
- _fs.default.readdirSync(src).forEach(dirent => {
26
- const [srcPath, destPath] = [src, dest].map(dirPath => _path.default.join(dirPath, dirent));
27
- const stat = _fs.default.lstatSync(srcPath);
28
- switch (true) {
29
- case stat.isFile():
30
- console.log(` ... copying ${srcPath} ${destPath}`);
31
- _fs.default.copyFileSync(srcPath, destPath);
32
- break;
33
- case stat.isDirectory():
34
- copyFolderSync(srcPath, destPath);
35
- break;
36
- default:
37
- break;
38
- }
39
- });
15
+ if (!fs_1.default.existsSync(src))
16
+ return;
17
+ if (!fs_1.default.existsSync(dest))
18
+ fs_1.default.mkdirSync(dest, { recursive: true });
19
+ fs_1.default.readdirSync(src).forEach((dirent) => {
20
+ const [srcPath, destPath] = [src, dest].map(dirPath => path_1.default.join(dirPath, dirent));
21
+ const stat = fs_1.default.lstatSync(srcPath);
22
+ switch (true) {
23
+ case stat.isFile():
24
+ console.log(` ... copying ${srcPath} ${destPath}`);
25
+ fs_1.default.copyFileSync(srcPath, destPath);
26
+ break;
27
+ case stat.isDirectory():
28
+ copyFolderSync(srcPath, destPath);
29
+ break;
30
+ default:
31
+ break;
32
+ }
33
+ });
40
34
  }
41
35
  function copy(source, destination, vars = {}) {
42
- let contents = _fs.default.readFileSync(source).toString();
43
- contents = _ejs.default.render(contents, _objectSpread(_objectSpread({}, vars), {}, {
44
- padScript(content, spaces) {
45
- const padding = ''.padStart(spaces, ' ');
46
- return content.split('\n').map(line => padding + line).join('\n');
47
- }
48
- }), {
49
- filename: source
50
- });
51
- _fs.default.writeFileSync(destination, contents);
36
+ let contents = fs_1.default.readFileSync(source).toString();
37
+ contents = ejs_1.default.render(contents, {
38
+ ...vars,
39
+ padScript(content, spaces) {
40
+ const padding = ''.padStart(spaces, ' ');
41
+ return content.split('\n').map(line => padding + line).join('\n');
42
+ }
43
+ }, {
44
+ filename: source
45
+ });
46
+ fs_1.default.writeFileSync(destination, contents);
52
47
  }
53
48
  function injectFiles(api, name, version, appConfig) {
54
- const {
55
- yumPackages,
56
- forceSSL,
57
- gracefulShutdown,
58
- buildOptions,
59
- path: appPath
60
- } = appConfig;
61
- const bundlePath = buildOptions.buildLocation;
62
- const {
63
- bucket
64
- } = (0, _utils.names)({
65
- app: appConfig
66
- });
67
- let sourcePath = api.resolvePath(__dirname, './assets/package.json');
68
- let destPath = api.resolvePath(bundlePath, 'bundle/package.json');
69
- copy(sourcePath, destPath, {
70
- name,
71
- version
72
- });
73
- sourcePath = api.resolvePath(__dirname, './assets/npmrc');
74
- destPath = api.resolvePath(bundlePath, 'bundle/.npmrc');
75
- copy(sourcePath, destPath);
76
- sourcePath = api.resolvePath(__dirname, './assets/start.sh');
77
- destPath = api.resolvePath(bundlePath, 'bundle/start.sh');
78
- copy(sourcePath, destPath);
79
- ['.ebextensions', '.platform', '.platform/hooks', '.platform/hooks/prebuild', '.platform/nginx', '.platform/nginx/conf.d', '.platform/nginx/conf.d/elasticbeanstalk'].forEach(folder => {
80
- try {
81
- _fs.default.mkdirSync(api.resolvePath(bundlePath, 'bundle', folder));
82
- } catch (e) {
83
- if (e.code !== 'EEXIST') {
84
- throw e;
85
- }
86
- }
87
- });
88
-
89
- // For some resources we make two copies of scripts:
90
- // 1) In .platform/hooks. These are used in AWS Linux 2
91
- // 2) as part of a config file in .ebextensions for older platforms
92
- const {
93
- nodeVersion,
94
- npmVersion
95
- } = (0, _utils.getNodeVersion)(api, bundlePath);
96
- sourcePath = api.resolvePath(__dirname, './assets/node.yaml');
97
- destPath = api.resolvePath(bundlePath, 'bundle/.ebextensions/node.config');
98
- copy(sourcePath, destPath, {
99
- nodeVersion,
100
- npmVersion
101
- });
102
- sourcePath = api.resolvePath(__dirname, './assets/node.sh');
103
- destPath = api.resolvePath(bundlePath, 'bundle/.platform/hooks/prebuild/45node.sh');
104
- copy(sourcePath, destPath, {
105
- nodeVersion,
106
- npmVersion
107
- });
108
- sourcePath = api.resolvePath(__dirname, './assets/nginx.yaml');
109
- destPath = api.resolvePath(bundlePath, 'bundle/.ebextensions/nginx.config');
110
- copy(sourcePath, destPath, {
111
- forceSSL
112
- });
113
- sourcePath = api.resolvePath(__dirname, './assets/nginx-server.conf');
114
- destPath = api.resolvePath(bundlePath, 'bundle/.platform/nginx/conf.d/elasticbeanstalk/00_application.conf');
115
- copy(sourcePath, destPath, {
116
- forceSSL
117
- });
118
- if (yumPackages) {
119
- sourcePath = api.resolvePath(__dirname, './assets/packages.yaml');
120
- destPath = api.resolvePath(bundlePath, 'bundle/.ebextensions/packages.config');
49
+ const { yumPackages, forceSSL, gracefulShutdown, buildOptions, longEnvVars, requireInstanceRole, path: appPath } = appConfig;
50
+ const bundlePath = buildOptions.buildLocation;
51
+ const { bucket } = (0, utils_1.names)({ app: appConfig });
52
+ let sourcePath = api.resolvePath(__dirname, './assets/package.json');
53
+ let destPath = api.resolvePath(bundlePath, 'bundle/package.json');
121
54
  copy(sourcePath, destPath, {
122
- packages: yumPackages
55
+ name,
56
+ version
123
57
  });
124
- }
125
- if (gracefulShutdown) {
126
- sourcePath = api.resolvePath(__dirname, './assets/graceful_shutdown.yaml');
127
- destPath = api.resolvePath(bundlePath, 'bundle/.ebextensions/graceful_shutdown.config');
58
+ sourcePath = api.resolvePath(__dirname, './assets/npmrc');
59
+ destPath = api.resolvePath(bundlePath, 'bundle/.npmrc');
128
60
  copy(sourcePath, destPath);
129
- sourcePath = api.resolvePath(__dirname, './assets/graceful_shutdown.sh');
130
- destPath = api.resolvePath(bundlePath, 'bundle/.platform/hooks/prebuild/48graceful_shutdown.sh');
61
+ //merge with our custom settings
62
+ let appNpmrcPath = api.resolvePath(api.getBasePath(), `${appPath}/.npmrc`);
63
+ try {
64
+ let originalNpmrcContent = fs_1.default.readFileSync(appNpmrcPath).toString();
65
+ if (originalNpmrcContent) {
66
+ console.log(' Merging custom npmrc', appNpmrcPath);
67
+ }
68
+ fs_1.default.appendFileSync(destPath, '\n' + originalNpmrcContent);
69
+ }
70
+ catch (err) {
71
+ //doesn't exist ignore
72
+ }
73
+ if (requireInstanceRole) {
74
+ //to use with apps that can do multiple roles
75
+ sourcePath = api.resolvePath(__dirname, './assets/role-start.sh');
76
+ }
77
+ else {
78
+ sourcePath = api.resolvePath(__dirname, './assets/start.sh');
79
+ }
80
+ destPath = api.resolvePath(bundlePath, 'bundle/start.sh');
131
81
  copy(sourcePath, destPath);
132
- }
133
- sourcePath = api.resolvePath(__dirname, './assets/env.yaml');
134
- destPath = api.resolvePath(bundlePath, 'bundle/.ebextensions/env.config');
135
- copy(sourcePath, destPath, {
136
- bucketName: bucket
137
- });
138
- sourcePath = api.resolvePath(__dirname, './assets/env.sh');
139
- destPath = api.resolvePath(bundlePath, 'bundle/.platform/hooks/prebuild/47env.sh');
140
- copy(sourcePath, destPath, {
141
- bucketName: bucket
142
- });
143
- sourcePath = api.resolvePath(__dirname, './assets/health-check.js');
144
- destPath = api.resolvePath(bundlePath, 'bundle/health-check.js');
145
- copy(sourcePath, destPath);
146
- let customConfigPath = api.resolvePath(api.getBasePath(), `${appPath}/.ebextensions`);
147
- let customConfig = _fs.default.existsSync(customConfigPath);
148
- if (customConfig) {
149
- console.log(' Copying files from project .ebextensions folder');
150
- _fs.default.readdirSync(customConfigPath).forEach(file => {
151
- sourcePath = api.resolvePath(customConfigPath, file);
152
- destPath = api.resolvePath(bundlePath, `bundle/.ebextensions/${file}`);
153
- copy(sourcePath, destPath);
82
+ [
83
+ '.ebextensions',
84
+ '.platform',
85
+ '.platform/hooks',
86
+ '.platform/hooks/prebuild',
87
+ '.platform/confighooks/',
88
+ '.platform/confighooks/prebuild',
89
+ '.platform/nginx',
90
+ '.platform/nginx/conf.d',
91
+ '.platform/nginx/conf.d/elasticbeanstalk'
92
+ ].forEach((folder) => {
93
+ try {
94
+ fs_1.default.mkdirSync(api.resolvePath(bundlePath, 'bundle', folder));
95
+ }
96
+ catch (e) {
97
+ // @ts-ignore
98
+ if (e.code !== 'EEXIST') {
99
+ throw e;
100
+ }
101
+ }
154
102
  });
155
- }
156
- customConfigPath = api.resolvePath(api.getBasePath(), `${appPath}/.platform`);
157
- customConfig = _fs.default.existsSync(customConfigPath);
158
- if (customConfig) {
159
- console.log(' Copying files from project .platform folder');
160
- copyFolderSync(customConfigPath, api.resolvePath(bundlePath, 'bundle/.platform'));
161
- }
103
+ // For some resources we make two copies of scripts:
104
+ // 1) In .platform/hooks. These are used in AWS Linux 2
105
+ // 2) as part of a config file in .ebextensions for older platforms
106
+ const { nodeVersion, npmVersion, meteorVersion } = (0, utils_1.getNodeVersion)(api, bundlePath);
107
+ sourcePath = api.resolvePath(__dirname, './assets/node.sh');
108
+ destPath = api.resolvePath(bundlePath, 'bundle/.platform/hooks/prebuild/45node.sh');
109
+ copy(sourcePath, destPath, { nodeVersion, npmVersion, meteorVersion });
110
+ destPath = api.resolvePath(bundlePath, 'bundle/.platform/confighooks/prebuild/45node.sh');
111
+ copy(sourcePath, destPath, { nodeVersion, npmVersion, meteorVersion });
112
+ //sourcePath = api.resolvePath(__dirname, './assets/nginx.yaml');
113
+ //destPath = api.resolvePath(bundlePath, 'bundle/.ebextensions/nginx.config');
114
+ //copy(sourcePath, destPath, { forceSSL });
115
+ sourcePath = api.resolvePath(__dirname, './assets/nginx-server.conf');
116
+ destPath = api.resolvePath(bundlePath, 'bundle/.platform/nginx/conf.d/elasticbeanstalk/00_application.conf');
117
+ copy(sourcePath, destPath, { forceSSL });
118
+ console.log("---> injectFiles", sourcePath, destPath);
119
+ if (yumPackages) {
120
+ sourcePath = api.resolvePath(__dirname, './assets/packages.yaml');
121
+ destPath = api.resolvePath(bundlePath, 'bundle/.ebextensions/packages.config');
122
+ copy(sourcePath, destPath, { packages: yumPackages });
123
+ }
124
+ if (gracefulShutdown) {
125
+ sourcePath = api.resolvePath(__dirname, './assets/graceful_shutdown.sh');
126
+ destPath = api.resolvePath(bundlePath, 'bundle/.platform/hooks/prebuild/48graceful_shutdown.sh');
127
+ copy(sourcePath, destPath);
128
+ }
129
+ if (longEnvVars) {
130
+ sourcePath = api.resolvePath(__dirname, './assets/env.sh');
131
+ destPath = api.resolvePath(bundlePath, 'bundle/.platform/hooks/prebuild/47env.sh');
132
+ copy(sourcePath, destPath, {
133
+ bucketName: bucket
134
+ });
135
+ }
136
+ sourcePath = api.resolvePath(__dirname, './assets/health-check.js');
137
+ destPath = api.resolvePath(bundlePath, 'bundle/health-check.js');
138
+ copy(sourcePath, destPath);
139
+ let customConfigPath = api.resolvePath(api.getBasePath(), `${appPath}/.ebextensions`);
140
+ let customConfig = fs_1.default.existsSync(customConfigPath);
141
+ if (customConfig) {
142
+ console.log(' Copying files from project .ebextensions folder');
143
+ fs_1.default.readdirSync(customConfigPath).forEach((file) => {
144
+ sourcePath = api.resolvePath(customConfigPath, file);
145
+ destPath = api.resolvePath(bundlePath, `bundle/.ebextensions/${file}`);
146
+ copy(sourcePath, destPath);
147
+ });
148
+ }
149
+ customConfigPath = api.resolvePath(api.getBasePath(), `${appPath}/.platform`);
150
+ customConfig = fs_1.default.existsSync(customConfigPath);
151
+ if (customConfig) {
152
+ console.log(' Copying files from project .platform folder');
153
+ copyFolderSync(customConfigPath, api.resolvePath(bundlePath, 'bundle/.platform'));
154
+ }
162
155
  }
163
156
  function archiveApp(buildLocation, api) {
164
- const bundlePath = api.resolvePath(buildLocation, 'bundle.zip');
165
- try {
166
- _fs.default.unlinkSync(bundlePath);
167
- } catch (e) {
168
- // empty
169
- }
170
- return new Promise((resolve, reject) => {
171
- (0, _utils.logStep)('=> Archiving Bundle');
172
- const sourceDir = api.resolvePath(buildLocation, 'bundle');
173
- const output = _fs.default.createWriteStream(bundlePath);
174
- const archive = (0, _archiver.default)('zip', {
175
- gzip: true,
176
- gzipOptions: {
177
- level: 9
178
- }
179
- });
180
- archive.pipe(output);
181
- output.once('close', resolve);
182
- archive.once('error', err => {
183
- (0, _utils.logStep)('=> Archiving failed:', err.message);
184
- reject(err);
185
- });
186
- let nextProgress = 0.1;
187
- archive.on('progress', ({
188
- entries
189
- }) => {
190
- try {
191
- const progress = entries.processed / entries.total;
192
- if (progress > nextProgress) {
193
- console.log(` ${(0, _lodash.round)(Math.floor(nextProgress * 100), -1)}% Archived`);
194
- nextProgress += 0.1;
195
- }
196
- } catch (e) {
197
- console.log(e);
198
- }
157
+ const bundlePath = api.resolvePath(buildLocation, 'bundle.zip');
158
+ try {
159
+ fs_1.default.unlinkSync(bundlePath);
160
+ }
161
+ catch (e) {
162
+ // empty
163
+ }
164
+ return new Promise((resolve, reject) => {
165
+ (0, utils_1.logStep)('=> Archiving Bundle');
166
+ const sourceDir = api.resolvePath(buildLocation, 'bundle');
167
+ const output = fs_1.default.createWriteStream(bundlePath);
168
+ const archive = (0, archiver_1.default)('zip', {
169
+ gzip: true,
170
+ gzipOptions: {
171
+ level: 9
172
+ }
173
+ });
174
+ archive.pipe(output);
175
+ output.once('close', resolve);
176
+ archive.once('error', (err) => {
177
+ (0, utils_1.logStep)(`=> Archiving failed: ${err.message}`);
178
+ reject(err);
179
+ });
180
+ let nextProgress = 0.1;
181
+ archive.on('progress', ({ entries }) => {
182
+ try {
183
+ const progress = entries.processed / entries.total;
184
+ if (progress > nextProgress) {
185
+ console.log(` ${(0, lodash_1.round)(Math.floor(nextProgress * 100), -1)}% Archived`);
186
+ nextProgress += 0.1;
187
+ }
188
+ }
189
+ catch (e) {
190
+ console.log(e);
191
+ }
192
+ });
193
+ archive.directory(sourceDir, false, (entry) => {
194
+ if (entry.name.startsWith('.platform/hooks/') || entry.name.startsWith('.platform/confighooks/')) {
195
+ // Hooks must be executable for AWS Beanstalk to run them
196
+ // Windows doesn't have a way to make a file be executable, so we
197
+ // set it in the zip file
198
+ entry.mode = 0o777;
199
+ }
200
+ return entry;
201
+ }).finalize();
199
202
  });
200
- archive.directory(sourceDir, false, entry => {
201
- if (entry.name.startsWith('.platform/hooks/')) {
202
- // Hooks must be executable for AWS Beanstalk to run them
203
- // Windows doesn't have a way to make a file be executable, so we
204
- // set it in the zip file
205
- entry.mode = 0o777;
206
- }
207
- return entry;
208
- }).finalize();
209
- });
210
203
  }
211
204
  //# sourceMappingURL=prepare-bundle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prepare-bundle.js","names":["_archiver","_interopRequireDefault","require","_fs","_ejs","_lodash","_path","_utils","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","copyFolderSync","src","dest","fs","existsSync","mkdirSync","recursive","readdirSync","dirent","srcPath","destPath","map","dirPath","path","join","stat","lstatSync","isFile","console","log","copyFileSync","isDirectory","copy","source","destination","vars","contents","readFileSync","toString","ejs","render","padScript","content","spaces","padding","padStart","split","line","filename","writeFileSync","injectFiles","api","name","version","appConfig","yumPackages","forceSSL","gracefulShutdown","buildOptions","appPath","bundlePath","buildLocation","bucket","names","app","sourcePath","resolvePath","__dirname","folder","code","nodeVersion","npmVersion","getNodeVersion","packages","bucketName","customConfigPath","getBasePath","customConfig","file","archiveApp","unlinkSync","Promise","resolve","reject","logStep","sourceDir","output","createWriteStream","archive","archiver","gzip","gzipOptions","level","pipe","once","err","message","nextProgress","on","entries","progress","processed","total","round","Math","floor","directory","entry","startsWith","mode","finalize"],"sources":["../src/prepare-bundle.js"],"sourcesContent":["import archiver from 'archiver';\nimport fs from 'fs';\nimport ejs from 'ejs';\nimport { round } from 'lodash';\nimport path from 'path';\nimport { getNodeVersion, logStep, names } from './utils';\n\nfunction copyFolderSync(src, dest) {\n if (!fs.existsSync(src)) return;\n if (!fs.existsSync(dest)) fs.mkdirSync(dest, { recursive: true });\n\n fs.readdirSync(src).forEach((dirent) => {\n const [srcPath, destPath] = [src, dest].map(dirPath => path.join(dirPath, dirent));\n const stat = fs.lstatSync(srcPath);\n\n switch (true) {\n case stat.isFile():\n console.log(` ... copying ${srcPath} ${destPath}`);\n fs.copyFileSync(srcPath, destPath);\n break;\n case stat.isDirectory():\n copyFolderSync(srcPath, destPath);\n break;\n default:\n break;\n }\n });\n}\n\nfunction copy(source, destination, vars = {}) {\n let contents = fs.readFileSync(source).toString();\n\n contents = ejs.render(\n contents,\n {\n ...vars,\n padScript(content, spaces) {\n const padding = ''.padStart(spaces, ' ');\n return content.split('\\n').map(line => padding + line).join('\\n');\n }\n },\n {\n filename: source\n }\n );\n\n fs.writeFileSync(destination, contents);\n}\n\nexport function injectFiles(api, name, version, appConfig) {\n const {\n yumPackages,\n forceSSL,\n gracefulShutdown,\n buildOptions,\n path: appPath\n } = appConfig;\n const bundlePath = buildOptions.buildLocation;\n const {\n bucket\n } = names({ app: appConfig });\n\n let sourcePath = api.resolvePath(__dirname, './assets/package.json');\n let destPath = api.resolvePath(bundlePath, 'bundle/package.json');\n copy(sourcePath, destPath, {\n name,\n version\n });\n\n sourcePath = api.resolvePath(__dirname, './assets/npmrc');\n destPath = api.resolvePath(bundlePath, 'bundle/.npmrc');\n copy(sourcePath, destPath);\n\n sourcePath = api.resolvePath(__dirname, './assets/start.sh');\n destPath = api.resolvePath(bundlePath, 'bundle/start.sh');\n copy(sourcePath, destPath);\n\n [\n '.ebextensions',\n '.platform',\n '.platform/hooks',\n '.platform/hooks/prebuild',\n '.platform/nginx',\n '.platform/nginx/conf.d',\n '.platform/nginx/conf.d/elasticbeanstalk'\n ].forEach((folder) => {\n try {\n fs.mkdirSync(api.resolvePath(bundlePath, 'bundle', folder));\n } catch (e) {\n if (e.code !== 'EEXIST') {\n throw e;\n }\n }\n });\n\n\n // For some resources we make two copies of scripts:\n // 1) In .platform/hooks. These are used in AWS Linux 2\n // 2) as part of a config file in .ebextensions for older platforms\n const { nodeVersion, npmVersion } = getNodeVersion(api, bundlePath);\n sourcePath = api.resolvePath(__dirname, './assets/node.yaml');\n destPath = api.resolvePath(bundlePath, 'bundle/.ebextensions/node.config');\n copy(sourcePath, destPath, { nodeVersion, npmVersion });\n\n sourcePath = api.resolvePath(__dirname, './assets/node.sh');\n destPath = api.resolvePath(bundlePath, 'bundle/.platform/hooks/prebuild/45node.sh');\n copy(sourcePath, destPath, { nodeVersion, npmVersion });\n\n sourcePath = api.resolvePath(__dirname, './assets/nginx.yaml');\n destPath = api.resolvePath(bundlePath, 'bundle/.ebextensions/nginx.config');\n copy(sourcePath, destPath, { forceSSL });\n\n sourcePath = api.resolvePath(__dirname, './assets/nginx-server.conf');\n destPath = api.resolvePath(bundlePath, 'bundle/.platform/nginx/conf.d/elasticbeanstalk/00_application.conf');\n copy(sourcePath, destPath, { forceSSL });\n\n if (yumPackages) {\n sourcePath = api.resolvePath(__dirname, './assets/packages.yaml');\n destPath = api.resolvePath(bundlePath, 'bundle/.ebextensions/packages.config');\n copy(sourcePath, destPath, { packages: yumPackages });\n }\n\n if (gracefulShutdown) {\n sourcePath = api.resolvePath(__dirname, './assets/graceful_shutdown.yaml');\n destPath = api.resolvePath(bundlePath, 'bundle/.ebextensions/graceful_shutdown.config');\n copy(sourcePath, destPath);\n\n sourcePath = api.resolvePath(__dirname, './assets/graceful_shutdown.sh');\n destPath = api.resolvePath(bundlePath, 'bundle/.platform/hooks/prebuild/48graceful_shutdown.sh');\n copy(sourcePath, destPath);\n }\n\n sourcePath = api.resolvePath(__dirname, './assets/env.yaml');\n destPath = api.resolvePath(bundlePath, 'bundle/.ebextensions/env.config');\n copy(sourcePath, destPath, {\n bucketName: bucket\n });\n\n sourcePath = api.resolvePath(__dirname, './assets/env.sh');\n destPath = api.resolvePath(bundlePath, 'bundle/.platform/hooks/prebuild/47env.sh');\n copy(sourcePath, destPath, {\n bucketName: bucket\n });\n\n sourcePath = api.resolvePath(__dirname, './assets/health-check.js');\n destPath = api.resolvePath(bundlePath, 'bundle/health-check.js');\n copy(sourcePath, destPath);\n\n let customConfigPath = api.resolvePath(api.getBasePath(), `${appPath}/.ebextensions`);\n let customConfig = fs.existsSync(customConfigPath);\n if (customConfig) {\n console.log(' Copying files from project .ebextensions folder');\n fs.readdirSync(customConfigPath).forEach((file) => {\n sourcePath = api.resolvePath(customConfigPath, file);\n destPath = api.resolvePath(bundlePath, `bundle/.ebextensions/${file}`);\n copy(sourcePath, destPath);\n });\n }\n\n customConfigPath = api.resolvePath(api.getBasePath(), `${appPath}/.platform`);\n customConfig = fs.existsSync(customConfigPath);\n if (customConfig) {\n console.log(' Copying files from project .platform folder');\n copyFolderSync(customConfigPath, api.resolvePath(bundlePath, 'bundle/.platform'));\n }\n}\n\nexport function archiveApp(buildLocation, api) {\n const bundlePath = api.resolvePath(buildLocation, 'bundle.zip');\n\n try {\n fs.unlinkSync(bundlePath);\n } catch (e) {\n // empty\n }\n\n return new Promise((resolve, reject) => {\n logStep('=> Archiving Bundle');\n const sourceDir = api.resolvePath(buildLocation, 'bundle');\n\n const output = fs.createWriteStream(bundlePath);\n const archive = archiver('zip', {\n gzip: true,\n gzipOptions: {\n level: 9\n }\n });\n\n archive.pipe(output);\n output.once('close', resolve);\n\n archive.once('error', (err) => {\n logStep('=> Archiving failed:', err.message);\n reject(err);\n });\n\n let nextProgress = 0.1;\n archive.on('progress', ({ entries }) => {\n try {\n const progress = entries.processed / entries.total;\n\n if (progress > nextProgress) {\n console.log(` ${round(Math.floor(nextProgress * 100), -1)}% Archived`);\n nextProgress += 0.1;\n }\n } catch (e) {\n console.log(e);\n }\n });\n\n archive.directory(sourceDir, false, (entry) => {\n if (entry.name.startsWith('.platform/hooks/')) {\n // Hooks must be executable for AWS Beanstalk to run them\n // Windows doesn't have a way to make a file be executable, so we\n // set it in the zip file\n entry.mode = 0o777;\n }\n return entry;\n }).finalize();\n });\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,GAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,IAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAAyD,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,QAAAH,CAAA,EAAAI,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAP,CAAA,OAAAM,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAR,CAAA,GAAAI,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAX,CAAA,EAAAI,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ,CAAA;AAAA,SAAAU,cAAAf,CAAA,aAAAI,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAD,OAAA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CAAC,YAAY,CAAC,CAAC;oBACxE,YAAY,IAAI,GAAG,CAAC;gBACtB,CAAC;YACH,CAAC;YAAC,OAAO,CAAC,EAAE,CAAC;gBACX,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACjB,CAAC;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,SAAS,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE;YAC5C,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,kBAAkB,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC,EAAE,CAAC;gBACjG,yDAAyD;gBACzD,iEAAiE;gBACjE,yBAAyB;gBACzB,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC;YACrB,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC"}
package/lib/recheck.js CHANGED
@@ -1,24 +1,27 @@
1
1
  "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.checkForThrottlingException = checkForThrottlingException;
2
+ Object.defineProperty(exports, "__esModule", { value: true });
7
3
  exports.getRecheckInterval = getRecheckInterval;
4
+ exports.checkForThrottlingException = checkForThrottlingException;
8
5
  exports.handleThrottlingException = handleThrottlingException;
9
6
  let throttlingExceptionCounter = 0;
10
7
  function getRecheckInterval() {
11
- if (throttlingExceptionCounter === 10) {
12
- throw new Error('Maximum throttling backoff exceeded');
13
- } else {
14
- return 2 ** throttlingExceptionCounter * 10000;
15
- }
8
+ if (throttlingExceptionCounter === 10) {
9
+ throw new Error('Maximum throttling backoff exceeded');
10
+ }
11
+ else {
12
+ return (2 ** throttlingExceptionCounter * 10000);
13
+ }
16
14
  }
17
15
  function checkForThrottlingException(exception) {
18
- return exception && exception.code === 'Throttling' && exception.message === 'Rate exceeded';
16
+ return (exception
17
+ && typeof exception === 'object'
18
+ && "code" in exception
19
+ && (exception.code === 'Throttling')
20
+ && "message" in exception
21
+ && (exception.message === 'Rate exceeded'));
19
22
  }
20
23
  function handleThrottlingException() {
21
- throttlingExceptionCounter++;
22
- console.log(`Setting new re-check interval to ${getRecheckInterval()}ms`);
24
+ throttlingExceptionCounter++;
25
+ console.log(`Setting new re-check interval to ${getRecheckInterval()}ms`);
23
26
  }
24
27
  //# sourceMappingURL=recheck.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"recheck.js","names":["throttlingExceptionCounter","getRecheckInterval","Error","checkForThrottlingException","exception","code","message","handleThrottlingException","console","log"],"sources":["../src/recheck.js"],"sourcesContent":["let throttlingExceptionCounter = 0;\n\nexport function getRecheckInterval() {\n if (throttlingExceptionCounter === 10) {\n throw new Error('Maximum throttling backoff exceeded');\n } else {\n return (2 ** throttlingExceptionCounter * 10000);\n }\n}\n\nexport function checkForThrottlingException(exception) {\n return (exception && (exception.code === 'Throttling') && (exception.message === 'Rate exceeded'));\n}\n\nexport function handleThrottlingException() {\n throttlingExceptionCounter++;\n console.log(`Setting new re-check interval to ${getRecheckInterval()}ms`);\n}\n"],"mappings":";;;;;;;;AAAA,IAAIA,0BAA0B,GAAG,CAAC;AAE3B,SAASC,kBAAkBA,CAAA,EAAG;EACnC,IAAID,0BAA0B,KAAK,EAAE,EAAE;IACrC,MAAM,IAAIE,KAAK,CAAC,qCAAqC,CAAC;EACxD,CAAC,MAAM;IACL,OAAQ,CAAC,IAAIF,0BAA0B,GAAG,KAAK;EACjD;AACF;AAEO,SAASG,2BAA2BA,CAACC,SAAS,EAAE;EACrD,OAAQA,SAAS,IAAKA,SAAS,CAACC,IAAI,KAAK,YAAa,IAAKD,SAAS,CAACE,OAAO,KAAK,eAAgB;AACnG;AAEO,SAASC,yBAAyBA,CAAA,EAAG;EAC1CP,0BAA0B,EAAE;EAC5BQ,OAAO,CAACC,GAAG,CAAC,oCAAoCR,kBAAkB,CAAC,CAAC,IAAI,CAAC;AA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