ms-teams-webhook
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -73,18 +73,19 @@ // src/IncomingWebhook.ts | ||
// src/utils/url-deprecated-warning.ts | ||
import chalk from "chalk"; | ||
var deprecatedURLs = ["webhook.office.com/webhookb2"]; | ||
function showWebhookUrlDeprecatedWarning(url) { | ||
async function showWebhookUrlDeprecatedWarning(url) { | ||
for (const deprecatedURL of deprecatedURLs) { | ||
if (url.includes(deprecatedURL)) { | ||
console.warn( | ||
` | ||
await import("chalk").then((_chalk) => { | ||
const chalk = _chalk.default; | ||
console.warn( | ||
` | ||
${chalk.yellowBright( | ||
"############# WARNING #############" | ||
)} | ||
"############# WARNING #############" | ||
)} | ||
${chalk.yellowBright( | ||
"You are using a deprecated Webhook URL:" | ||
)} ${chalk.yellow(url)} | ||
"You are using a deprecated Webhook URL:" | ||
)} ${chalk.yellow(url)} | ||
@@ -94,9 +95,10 @@ Retirement of Office 365 connectors within Microsoft Teams. Create a new Workspace App and use the new URL with this library. | ||
${chalk.gray( | ||
"Upgrade documentation: https://github.com/waigel/node-ms-teams-webhook/blob/master/MIGRATION.md" | ||
)} | ||
"Upgrade documentation: https://github.com/waigel/node-ms-teams-webhook/blob/master/MIGRATION.md" | ||
)} | ||
${chalk.gray( | ||
"Original message from Microsoft: https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams" | ||
)} | ||
"Original message from Microsoft: https://devblogs.microsoft.com/microsoft365dev/retirement-of-office-365-connectors-within-microsoft-teams" | ||
)} | ||
` | ||
); | ||
); | ||
}); | ||
} | ||
@@ -103,0 +105,0 @@ } |
{ | ||
"name": "ms-teams-webhook", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"type": "module", | ||
@@ -29,9 +29,17 @@ "description": "Library for using the Microsoft Teams Incomming Webhooks", | ||
], | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
"import": "./dist/index.js" | ||
}, | ||
"require": { | ||
"types": "./dist/index.d.cts", | ||
"require": "./dist/index.cjs" | ||
} | ||
}, | ||
"devDependencies": { | ||
"@arethetypeswrong/cli": "^0.15.3", | ||
"@tsconfig/strictest": "^2.0.5", | ||
@@ -56,4 +64,5 @@ "@types/body-parser": "^1.19.5", | ||
"typegen": "json2ts -i \"schemas/*.json\" -o \"src\" --no-top-ref --no-version --no-banner", | ||
"fetch-json-schemas": "curl -o schemas/adaptive-card.json https://adaptivecards.io/schemas/adaptive-card.json" | ||
"fetch-json-schemas": "curl -o schemas/adaptive-card.json https://adaptivecards.io/schemas/adaptive-card.json", | ||
"test-types": "attw -P" | ||
} | ||
} |
@@ -22,3 +22,3 @@ # Microsoft Incoming Webhooks | ||
```javascript | ||
const { IncomingWebhook } = require("ms-teams-webhook"); | ||
const { IncomingWebhook } = import("ms-teams-webhook"); | ||
@@ -25,0 +25,0 @@ // Read a url from the environment variables |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
123818
7
2168
0
9