Skip to content

Commit c450a89

Browse files
committed
fix: first release
1 parent d0e1ac0 commit c450a89

File tree

9 files changed

+6251
-2
lines changed

9 files changed

+6251
-2
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
release:
8+
name: Release
9+
runs-on: ubuntu-18.04
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v1
13+
- name: Setup Node.js
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: 12
17+
- name: Install dependencies
18+
run: yarn install
19+
- name: Release
20+
env:
21+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
23+
run: yarn semantic-release

.gitignore

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
2+
# Created by https://www.gitignore.io/api/node
3+
# Edit at https://www.gitignore.io/?templates=node
4+
5+
### Node ###
6+
# Logs
7+
logs
8+
*.log
9+
npm-debug.log*
10+
yarn-debug.log*
11+
yarn-error.log*
12+
lerna-debug.log*
13+
14+
# Diagnostic reports (https://nodejs.org/api/report.html)
15+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
16+
17+
# Runtime data
18+
pids
19+
*.pid
20+
*.seed
21+
*.pid.lock
22+
23+
# Directory for instrumented libs generated by jscoverage/JSCover
24+
lib-cov
25+
26+
# Coverage directory used by tools like istanbul
27+
coverage
28+
*.lcov
29+
30+
# nyc test coverage
31+
.nyc_output
32+
33+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
34+
.grunt
35+
36+
# Bower dependency directory (https://bower.io/)
37+
bower_components
38+
39+
# node-waf configuration
40+
.lock-wscript
41+
42+
# Compiled binary addons (https://nodejs.org/api/addons.html)
43+
build/Release
44+
45+
# Dependency directories
46+
node_modules/
47+
jspm_packages/
48+
49+
# TypeScript v1 declaration files
50+
typings/
51+
52+
# TypeScript cache
53+
*.tsbuildinfo
54+
55+
# Optional npm cache directory
56+
.npm
57+
58+
# Optional eslint cache
59+
.eslintcache
60+
61+
# Optional REPL history
62+
.node_repl_history
63+
64+
# Output of 'npm pack'
65+
*.tgz
66+
67+
# Yarn Integrity file
68+
.yarn-integrity
69+
70+
# dotenv environment variables file
71+
.env
72+
.env.test
73+
74+
# parcel-bundler cache (https://parceljs.org/)
75+
.cache
76+
77+
# next.js build output
78+
.next
79+
80+
# nuxt.js build output
81+
.nuxt
82+
83+
# rollup.js default build output
84+
dist/
85+
86+
# Uncomment the public line if your project uses Gatsby
87+
# https://nextjs.org/blog/next-9-1#public-directory-support
88+
# https://create-react-app.dev/docs/using-the-public-folder/#docsNav
89+
# public
90+
91+
# Storybook build outputs
92+
.out
93+
.storybook-out
94+
95+
# vuepress build output
96+
.vuepress/dist
97+
98+
# Serverless directories
99+
.serverless/
100+
101+
# FuseBox cache
102+
.fusebox/
103+
104+
# DynamoDB Local files
105+
.dynamodb/
106+
107+
# Temporary folders
108+
tmp/
109+
temp/
110+
111+
# End of https://www.gitignore.io/api/node
112+
113+
dist/

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
src/

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"git.ignoreLimitWarning": true
3+
}

package.json

Lines changed: 76 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,83 @@
11
{
22
"name": "insomnia-plugin-cloudformation-output",
3-
"version": "1.0.0",
3+
"version": "0.0.1",
44
"description": "Get CloudFormation output values within insomnia",
55
"main": "dist/index.js",
66
"repository": "git@github.com:drg-adaptive/insomnia-plugin-cloudformation-output.git",
77
"author": "Ben Force",
8-
"license": "MIT"
8+
"license": "MIT",
9+
"devDependencies": {
10+
"@semantic-release/changelog": "^5.0.1",
11+
"@semantic-release/commit-analyzer": "^8.0.1",
12+
"@semantic-release/github": "^7.0.5",
13+
"@semantic-release/npm": "^7.0.5",
14+
"@semantic-release/release-notes-generator": "^9.0.1",
15+
"commitizen": "^4.0.4",
16+
"cz-conventional-changelog": "^3.1.0",
17+
"semantic-release": "^17.0.7",
18+
"typescript": "^3.8.3"
19+
},
20+
"scripts": {
21+
"build": "tsc",
22+
"prepublish": "yarn build"
23+
},
24+
"insomnia": {
25+
"name": "cfoutput",
26+
"description": "Get CloudFormation output values within insomnia"
27+
},
28+
"dependencies": {
29+
"aws-sdk": "^2.661.0"
30+
},
31+
"config": {
32+
"commitizen": {
33+
"path": "./node_modules/cz-conventional-changelog"
34+
}
35+
},
36+
"release": {
37+
"branches": [
38+
"master"
39+
],
40+
"plugins": [
41+
"@semantic-release/commit-analyzer",
42+
"@semantic-release/release-notes-generator",
43+
[
44+
"@semantic-release/changelog",
45+
{
46+
"changelogTitle": "# insomnia-plugin-cloudformation-output Change Log",
47+
"changelogFile": "CHANGELOG.md"
48+
}
49+
],
50+
[
51+
"@semantic-release/github",
52+
{
53+
"assets": [
54+
{
55+
"path": "CHANGELOG.md",
56+
"label": "Changelog"
57+
},
58+
{
59+
"path": "insomnia-plugin-cloudformation-output.vsix",
60+
"label": "VSCode Extension Package"
61+
}
62+
]
63+
}
64+
],
65+
"@semantic-release/npm"
66+
],
67+
"verifyConditions": [
68+
"@semantic-release/github",
69+
"@semantic-release/npm"
70+
],
71+
"prepare": [
72+
"@semantic-release/npm",
73+
"@semantic-release/changelog"
74+
],
75+
"publish": [
76+
"@semantic-release/npm",
77+
{
78+
"path": "@semantic-release/github",
79+
"assets": "insomnia-plugin-cloudformation-output.vsix"
80+
}
81+
]
82+
}
983
}

src/index.ts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import * as AWS from "aws-sdk";
2+
3+
export const templateTags = [
4+
{
5+
name: "cfoutput",
6+
displayName: "CF Output",
7+
description: "Get CloudFormation Outputs",
8+
args: [
9+
{
10+
displayName: "StackName",
11+
description: "Name of the CloudFormation stack",
12+
type: "string",
13+
},
14+
{
15+
displayName: "Output",
16+
description: "Name of the stack output",
17+
type: "string",
18+
},
19+
{
20+
displayName: "Region",
21+
description: "AWS Region",
22+
type: "string",
23+
defaultValue: "us-east-1",
24+
},
25+
],
26+
async run(context, StackName, output, region): Promise<string> {
27+
const cf = new AWS.CloudFormation({ region: region });
28+
const stackDescriptions = await cf
29+
.describeStacks({
30+
StackName,
31+
})
32+
.promise();
33+
34+
console.info(
35+
`cfoutput found the following information: ${JSON.stringify(
36+
stackDescriptions.Stacks
37+
)}`
38+
);
39+
return "Test Value";
40+
},
41+
},
42+
] as Array<Insomnia.TemplateTag>;

src/insomnia.d.ts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
declare module Insomnia {
2+
export interface TemplateTag {
3+
name: string;
4+
displayName: string;
5+
disablePreview?: () => boolean;
6+
description?: string;
7+
deprecated?: boolean;
8+
liveDisplayName?: (args) => string | undefined;
9+
validate?: (value: any) => string | undefined;
10+
priority?: number;
11+
args: Array<{
12+
displayName: string;
13+
description?: string;
14+
defaultValue: string | number | boolean;
15+
type: "string" | "number" | "enum" | "model";
16+
17+
// Only type === 'string'
18+
placeholder?: string;
19+
20+
// Only type === 'model'
21+
modelType: string;
22+
23+
// Only type === 'enum'
24+
options: Array<{
25+
displayName: string;
26+
value: string;
27+
description?: string;
28+
placeholder?: string;
29+
}>;
30+
}>;
31+
run: () => Promise<any>;
32+
}
33+
}

tsconfig.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"compilerOptions": {
3+
"lib": ["ES2019"],
4+
"module": "commonjs",
5+
"target": "ES2019",
6+
"outDir": "dist"
7+
}
8+
}

0 commit comments

Comments
 (0)