ntfy 1.6.2 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/NtfyClient.js +6 -1
- package/dist/interfaces.d.ts +4 -2
- package/package.json +4 -4
package/dist/NtfyClient.js
CHANGED
|
@@ -85,7 +85,12 @@ export async function publish(config) {
|
|
|
85
85
|
}
|
|
86
86
|
if (config.authorization) {
|
|
87
87
|
axiosConfig.withCredentials = true;
|
|
88
|
-
|
|
88
|
+
if (typeof config.authorization === 'string') {
|
|
89
|
+
axiosConfig.headers.Authorization = config.authorization;
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
axiosConfig.auth = config.authorization;
|
|
93
|
+
}
|
|
89
94
|
}
|
|
90
95
|
if (config.delay) {
|
|
91
96
|
axiosConfig.headers.set('X-Delay', config.delay);
|
package/dist/interfaces.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AxiosBasicCredentials
|
|
1
|
+
import type { AxiosBasicCredentials, Method as HTTPMethod } from 'axios';
|
|
2
2
|
export declare enum MessagePriority {
|
|
3
3
|
/** Really long vibration bursts, default notification sound with a pop-over notification. */
|
|
4
4
|
MAX = 5,
|
|
@@ -127,8 +127,10 @@ export interface BaseConfig {
|
|
|
127
127
|
* Depending on whether the server is configured to support
|
|
128
128
|
* [access control](https://docs.ntfy.sh/config/#access-control), some topics may be read/write protected so that only
|
|
129
129
|
* users with the correct credentials can subscribe or publish to them.
|
|
130
|
+
*
|
|
131
|
+
* Use either basic credentials or an access token.
|
|
130
132
|
*/
|
|
131
|
-
authorization?:
|
|
133
|
+
authorization?: AxiosBasicCredentials | string;
|
|
132
134
|
/**
|
|
133
135
|
* You can define which URL to open when a notification is clicked. This may be useful if your notification is related
|
|
134
136
|
* to a Zabbix alert or a transaction that you'd like to provide the deep-link for. Tapping the notification will open
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Florian Imdahl <git@ffflorian.de>",
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"axios": "1.7.
|
|
4
|
+
"axios": "1.7.7"
|
|
5
5
|
},
|
|
6
6
|
"description": "Send notifications over ntfy.sh.",
|
|
7
7
|
"devDependencies": {
|
|
8
8
|
"rimraf": "6.0.1",
|
|
9
|
-
"typescript": "5.
|
|
9
|
+
"typescript": "5.6.3"
|
|
10
10
|
},
|
|
11
11
|
"engines": {
|
|
12
12
|
"node": ">= 18.0"
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
"dist": "yarn clean && yarn build"
|
|
30
30
|
},
|
|
31
31
|
"type": "module",
|
|
32
|
-
"version": "1.
|
|
33
|
-
"gitHead": "
|
|
32
|
+
"version": "1.7.0",
|
|
33
|
+
"gitHead": "09b926eb48ebb1546508d9669d23a8949a467910"
|
|
34
34
|
}
|