Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@guardian/anghammarad

Package Overview
Dependencies
Maintainers
47
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@guardian/anghammarad - npm Package Compare versions

Comparing version 1.0.2 to 1.8.0-SNAPSHOT

1

dist/src/interfaces.d.ts

@@ -11,2 +11,3 @@ import { SNS } from "aws-sdk";

AwsAccount?: string;
GithubTeamSlug?: string;
}

@@ -13,0 +14,0 @@ export declare enum RequestedChannel {

2

package.json
{
"name": "@guardian/anghammarad",
"version": "1.0.2",
"version": "1.8.0-SNAPSHOT",
"description": "Notification service for the Guardian's dev teams",

@@ -5,0 +5,0 @@ "main": "dist/src/main.js",

@@ -24,6 +24,3 @@ # Anghammarad Node Client

```js
import {
Anghammarad,
RequestedChannel,
} from "@guardian/anghammarad";
import { Anghammarad, RequestedChannel } from '@guardian/anghammarad';

@@ -33,10 +30,10 @@ const client = new Anghammarad();

client.notify({
subject: "Hello",
message: "Hi there, something has happened which we'd like to tell you about",
actions: [{url: "https://example.com"}],
target: {Stack: "my-stack", Stage: "CODE", App: "my-app"},
channel: RequestedChannel.Email,
sourceSystem: "my-monitoring-tool",
topicArn: "arn:aws:123"
})
subject: 'Hello',
message: "Hi there, something has happened which we'd like to tell you about",
actions: [{ url: 'https://example.com' }],
target: { Stack: 'my-stack', Stage: 'CODE', App: 'my-app' },
channel: RequestedChannel.Email,
sourceSystem: 'my-monitoring-tool',
topicArn: 'arn:aws:123',
});
```

@@ -47,7 +44,4 @@

```js
import {
Anghammarad,
RequestedChannel,
} from "@guardian/anghammarad";
import { credentialsProvider, snsClient } from "./aws";
import { Anghammarad, RequestedChannel } from '@guardian/anghammarad';
import { credentialsProvider, snsClient } from './aws';

@@ -57,11 +51,11 @@ const client = new Anghammarad();

client.notify({
subject: "Hello",
message: "Hi there, something has happened which we'd like to tell you about",
actions: [{url: "https://example.com"}],
target: {Stack: "my-stack", Stage: "CODE", App: "my-app"},
channel: RequestedChannel.Email,
sourceSystem: "my-monitoring-tool",
topicArn: "arn:aws:123",
client: snsClient(credentialsProvider())
})
subject: 'Hello',
message: "Hi there, something has happened which we'd like to tell you about",
actions: [{ url: 'https://example.com' }],
target: { Stack: 'my-stack', Stage: 'CODE', App: 'my-app' },
channel: RequestedChannel.Email,
sourceSystem: 'my-monitoring-tool',
topicArn: 'arn:aws:123',
client: snsClient(credentialsProvider()),
});
```

@@ -80,3 +74,3 @@

| topicArn | The ARN of the topic to which the message should be send | Y | "arn:aws:..." |
| client | An optional SNS client to send the message with. | N | https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SNS.html |
| client | An optional SNS client to send the message with. | N | https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/SNS.html |

@@ -115,7 +109,4 @@ ### Channels

// Custom client for Anghammarad client
import {
Anghammarad,
RequestedChannel,
} from "@guardian/anghammarad";
import { credentialsProvider, snsClient } from "./aws";
import { Anghammarad, RequestedChannel } from '@guardian/anghammarad';
import { credentialsProvider, snsClient } from './aws';

@@ -125,10 +116,10 @@ const client = new Anghammarad(snsClient(credentialsProvider()));

client.notify({
subject: "Hello",
message: "Hi there, something has happened which we'd like to tell you about",
actions: [{url: "https://example.com"}],
target: {Stack: "my-stack", Stage: "CODE", App: "my-app"},
channel: RequestedChannel.Email,
sourceSystem: "my-monitoring-tool",
topicArn: "arn:aws:123"
})
subject: 'Hello',
message: "Hi there, something has happened which we'd like to tell you about",
actions: [{ url: 'https://example.com' }],
target: { Stack: 'my-stack', Stage: 'CODE', App: 'my-app' },
channel: RequestedChannel.Email,
sourceSystem: 'my-monitoring-tool',
topicArn: 'arn:aws:123',
});
```

@@ -138,2 +129,2 @@

The client is published to npm as `@guardian/anghammarad`. You must have an `npm` account with 2fa enabled and be part of the `guardian` organisation. You can then run `yarn publish` to publish the library, enterring your OTP when prompted.
The client is published to npm as `@guardian/anghammarad`. You must have an `npm` account with 2fa enabled and be part of the `guardian` organisation. You can then run `npm version <patch|minor|major>` followed by `npm publish` to publish the library, enterring your OTP when prompted (issues have been encountered running `yarn publish` in the past so npm is recommended).

@@ -13,2 +13,3 @@ import { SNS } from "aws-sdk";

AwsAccount?: string;
GithubTeamSlug?: string;
}

@@ -15,0 +16,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc