From 79585b4788df314df034a5503f0dcc9e609438cf Mon Sep 17 00:00:00 2001 From: Andy Brunner Date: Wed, 16 Feb 2022 11:40:25 +0100 Subject: [PATCH] feat: release 0.0.1 --- .projenrc.js | 7 +-- API.md | 101 +++++++++++++++++++++++++++++++++++++++ package.json | 8 ++-- src/integ.default.ts | 7 +++ test/hello.test.ts | 5 -- test/iotwireless.test.ts | 14 ++++++ 6 files changed, 130 insertions(+), 12 deletions(-) create mode 100644 API.md create mode 100644 src/integ.default.ts delete mode 100644 test/hello.test.ts create mode 100644 test/iotwireless.test.ts diff --git a/.projenrc.js b/.projenrc.js index dd5d51a..e3c462f 100644 --- a/.projenrc.js +++ b/.projenrc.js @@ -1,10 +1,11 @@ const { awscdk } = require('projen'); const project = new awscdk.AwsCdkConstructLibrary({ - author: 'Andy Brunner', - authorAddress: 'andy@cloudxs.ch', + author: 'cloudxs GmbH', + authorAddress: 'https://www.cloudxs.ch', + authorOrganization: true, cdkVersion: '2.1.0', defaultReleaseBranch: 'main', - name: 'cdk-iot-lorawan', + name: '@cloudxs/cdk-iot-lorawan', repositoryUrl: 'https://github.com/cloudxsgmbh/cdk-iot-lorawan.git', // deps: [], /* Runtime dependencies of this module. */ diff --git a/API.md b/API.md new file mode 100644 index 0000000..78f1cd8 --- /dev/null +++ b/API.md @@ -0,0 +1,101 @@ +# API Reference + +## Constructs + +### IotWirelessGatewayRole + +Creates a role called 'IoTWirelessGatewayCertManagerRole' that is needed by the IoT Wireless gateway https://docs.aws.amazon.com/iot/latest/developerguide/connect-iot-lorawan-rfregion-permissions.html#connect-iot-lorawan-onboard-permissions. + +#### Initializers + +```typescript +import { IotWirelessGatewayRole } from '@cloudxs/cdk-iot-lorawan' + +new IotWirelessGatewayRole(scope: Construct, id: string) +``` + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| scope | constructs.Construct | *No description.* | +| id | string | *No description.* | + +--- + +##### `scope`Required + +- *Type:* constructs.Construct + +--- + +##### `id`Required + +- *Type:* string + +--- + +#### Methods + +| **Name** | **Description** | +| --- | --- | +| toString | Returns a string representation of this construct. | + +--- + +##### `toString` + +```typescript +public toString(): string +``` + +Returns a string representation of this construct. + +#### Static Functions + +| **Name** | **Description** | +| --- | --- | +| isConstruct | Checks if `x` is a construct. | + +--- + +##### ~~`isConstruct`~~ + +```typescript +import { IotWirelessGatewayRole } from '@cloudxs/cdk-iot-lorawan' + +IotWirelessGatewayRole.isConstruct(x: any) +``` + +Checks if `x` is a construct. + +###### `x`Required + +- *Type:* any + +Any object. + +--- + +#### Properties + +| **Name** | **Type** | **Description** | +| --- | --- | --- | +| node | constructs.Node | The tree node. | + +--- + +##### `node`Required + +```typescript +public readonly node: Node; +``` + +- *Type:* constructs.Node + +The tree node. + +--- + + + + + diff --git a/package.json b/package.json index b795341..fec03e3 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "cdk-iot-lorawan", + "name": "@cloudxs/cdk-iot-lorawan", "repository": { "type": "git", "url": "https://github.com/cloudxsgmbh/cdk-iot-lorawan.git" @@ -31,9 +31,9 @@ "projen": "npx projen" }, "author": { - "name": "Andy Brunner", - "email": "andy@cloudxs.ch", - "organization": false + "name": "cloudxs GmbH", + "url": "https://www.cloudxs.ch", + "organization": true }, "devDependencies": { "@types/jest": "^27.4.0", diff --git a/src/integ.default.ts b/src/integ.default.ts new file mode 100644 index 0000000..4f24a3c --- /dev/null +++ b/src/integ.default.ts @@ -0,0 +1,7 @@ +import * as cdk from 'aws-cdk-lib'; +import { IotWirelessGatewayRole } from './index'; + +const app = new cdk.App(); +const stack = new cdk.Stack(app, 'MyStack'); + +new IotWirelessGatewayRole(stack, 'IotWirelessGatewayRole'); \ No newline at end of file diff --git a/test/hello.test.ts b/test/hello.test.ts deleted file mode 100644 index acbacd4..0000000 --- a/test/hello.test.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Hello } from '../src'; - -test('hello', () => { - expect(new Hello().sayHello()).toBe('hello, world!'); -}); \ No newline at end of file diff --git a/test/iotwireless.test.ts b/test/iotwireless.test.ts new file mode 100644 index 0000000..d8e2e49 --- /dev/null +++ b/test/iotwireless.test.ts @@ -0,0 +1,14 @@ +import * as cdk from 'aws-cdk-lib'; +import { Template } from 'aws-cdk-lib/assertions'; +import { IotWirelessGatewayRole } from '../src/index'; + +test('create app', () => { + const app = new cdk.App(); + const stack = new cdk.Stack(app); + new IotWirelessGatewayRole(stack, 'TestStack'); + + const template = Template.fromStack( stack ); + template.hasResource('AWS::IAM::Role', { + + }); +}); \ No newline at end of file