@byaga/cdk-patterns 0.9.2 → 0.10.0
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/.fleet/run.json +11 -0
- package/LICENSE.md +21 -0
- package/README.md +37 -0
- package/lib/DeployStack.d.ts +3 -7
- package/lib/DeployStack.js +7 -8
- package/lib/NodeJsLambda.d.ts +22 -0
- package/lib/NodeJsLambda.js +18 -2
- package/lib/NodeJsLambdaLayer.d.ts +13 -0
- package/lib/NodeJsLambdaLayer.js +13 -2
- package/lib/StaticWebSite.d.ts +20 -4
- package/lib/StaticWebSite.js +29 -15
- package/lib/methods/BuildOptions.d.ts +3 -0
- package/lib/methods/BuildOptions.js +2 -0
- package/lib/methods/apply-honeycomb-to-lambda.js +1 -1
- package/lib/methods/build-ecmascript.d.ts +9 -0
- package/lib/methods/build-ecmascript.js +20 -0
- package/lib/methods/build-node-source.d.ts +10 -13
- package/lib/methods/build-node-source.js +30 -96
- package/lib/methods/build-typescript.d.ts +8 -0
- package/lib/methods/build-typescript.js +33 -0
- package/lib/methods/copy-files.d.ts +8 -0
- package/lib/methods/{empty-directory.js → copy-files.js} +21 -14
- package/lib/methods/duration.d.ts +8 -6
- package/lib/methods/duration.js +17 -11
- package/lib/methods/generate-hash.d.ts +7 -15
- package/lib/methods/generate-hash.js +25 -53
- package/lib/methods/get-files.d.ts +9 -0
- package/lib/methods/get-files.js +38 -0
- package/lib/methods/get-source-directory.d.ts +16 -2
- package/lib/methods/get-source-directory.js +31 -30
- package/lib/methods/hash-file.d.ts +18 -0
- package/lib/methods/hash-file.js +45 -0
- package/lib/methods/install-node-modules.d.ts +12 -0
- package/lib/methods/install-node-modules.js +30 -0
- package/package.json +30 -10
- package/tsconfig.json +1 -1
- package/lib/IDeployStack.d.ts +0 -20
- package/lib/IDeployStack.js +0 -48
- package/lib/methods/empty-directory.d.ts +0 -2
- package/lib/methods/walk-directory.d.ts +0 -14
- package/lib/methods/walk-directory.js +0 -48
@@ -1,48 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
-
if (k2 === undefined) k2 = k;
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
exports.no = exports.yes = void 0;
|
27
|
-
const path = __importStar(require("path"));
|
28
|
-
const fs = __importStar(require("fs"));
|
29
|
-
const yes = () => true;
|
30
|
-
exports.yes = yes;
|
31
|
-
const no = () => false;
|
32
|
-
exports.no = no;
|
33
|
-
function walkDirectory(directory, options, filepaths = []) {
|
34
|
-
const { excluded = exports.no, included = exports.yes, childrenExcluded = exports.no, childrenIncluded = exports.yes } = options;
|
35
|
-
const files = fs.readdirSync(directory, { withFileTypes: true });
|
36
|
-
for (let stats of files) {
|
37
|
-
const filepath = path.join(directory, stats.name);
|
38
|
-
stats.fullpath = () => filepath;
|
39
|
-
if (stats.isDirectory() && !childrenExcluded(stats) && childrenIncluded(stats)) {
|
40
|
-
walkDirectory(filepath, options, filepaths);
|
41
|
-
}
|
42
|
-
else if (stats.isFile() && !excluded(stats) && included(stats)) {
|
43
|
-
filepaths.push(stats);
|
44
|
-
}
|
45
|
-
}
|
46
|
-
return filepaths;
|
47
|
-
}
|
48
|
-
exports.default = walkDirectory;
|