-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: update exeample to use @nordicsemiconductor/bdd-markdown
- Loading branch information
1 parent
5e90536
commit d499668
Showing
40 changed files
with
6,770 additions
and
9,690 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
dist/ | ||
node_modules/ | ||
cdk.out/ | ||
commitlint.config.js | ||
aws/lambda.js | ||
commitlint.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
{ | ||
"extends": "@nordicsemiconductor/eslint-config-asset-tracker-cloud-typescript" | ||
"extends": "@nordicsemiconductor/eslint-config-asset-tracker-cloud-typescript", | ||
"rules": { | ||
"no-constant-condition": ["off"], | ||
"import/extensions": [ | ||
"error", | ||
"ignorePackages", | ||
{ | ||
"ts": "never", | ||
"tsx": "never" | ||
} | ||
] | ||
}, | ||
"plugins": ["import"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
/dist/ | ||
/node_modules/ | ||
cdk.out/ | ||
cdk.context.json |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"app": "node dist/aws/cloudformation-test.js" | ||
"app": "npx tsx cdk/cloudformation-test.ts" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import * as CDK from 'aws-cdk-lib' | ||
import { AppProps } from 'aws-cdk-lib' | ||
import { PackedLambda } from './packLambda.js' | ||
import { PackedLayer } from './packLayer.js' | ||
import { WebhookReceiverStack } from './WebhookReceiverStack.js' | ||
|
||
export class TestApp extends CDK.App { | ||
public constructor({ | ||
stackName, | ||
context, | ||
lambdaSource, | ||
layer, | ||
}: { | ||
stackName: string | ||
lambdaSource: PackedLambda | ||
layer: PackedLayer | ||
context?: AppProps['context'] | ||
}) { | ||
super({ context }) | ||
new WebhookReceiverStack(this, stackName, { lambdaSource, layer }) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import path from 'path' | ||
import { packLambda } from './packLambda.js' | ||
import { packLayer } from './packLayer.js' | ||
import { stackBaseName } from './stackBaseName.js' | ||
import { TestApp } from './TestApp.js' | ||
|
||
const baseDir = path.join(process.cwd(), 'lambda') | ||
|
||
new TestApp({ | ||
stackName: `${stackBaseName()}-test`, | ||
lambdaSource: await packLambda({ | ||
id: 'webhookReceiver', | ||
baseDir, | ||
}), | ||
layer: await packLayer({ | ||
id: 'baseLayer', | ||
dependencies: ['@aws-sdk/client-sqs', '@aws-lambda-powertools/tracer'], | ||
}), | ||
context: { | ||
isTest: true, | ||
}, | ||
}).synth() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import dependencyTree from 'dependency-tree' | ||
import { statSync } from 'fs' | ||
import path from 'path' | ||
|
||
export const listLambdaDependencies = (entryFile: string): string[] => { | ||
statSync(entryFile) | ||
return dependencyTree.toList({ | ||
filename: entryFile, | ||
directory: process.cwd(), | ||
tsConfig: path.join(process.cwd(), 'tsconfig.json'), | ||
filter: (path) => !path.includes('node_modules'), // do not include node_modules | ||
}) | ||
} |
Oops, something went wrong.