Skip to content

Commit

Permalink
use priority export for default
Browse files Browse the repository at this point in the history
  • Loading branch information
dangowans committed Jan 8, 2025
1 parent 475bb68 commit 39b880c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
6 changes: 3 additions & 3 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { NtfyMessageOptions, NtfyMessagePriority } from './types.js';
import type { NtfyMessageOptions } from './types.js';
/**
* The default ntfy server to use.
*/
Expand All @@ -10,11 +10,11 @@ export declare const DEFAULT_SERVER = "https://ntfy.sh";
/**
* The default priority to use when sending a message.
*/
export declare const DEFAULT_NTFY_PRIORITY: NtfyMessagePriority;
export declare const DEFAULT_NTFY_PRIORITY: "3";
/**
* @deprecated Use `DEFAULT_NTFY_PRIORITY` instead.
*/
export declare const DEFAULT_PRIORITY: "default";
export declare const DEFAULT_PRIORITY: "3";
/**
* Send a message through an ntfy server.
* @param ntfyMessage The message to post.
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import fs from 'node:fs/promises';
import { ntfyMessagePriorityDefault } from './priorities.js';
/**
* The default ntfy server to use.
*/
Expand All @@ -10,7 +11,7 @@ export const DEFAULT_SERVER = DEFAULT_NTFY_SERVER;
/**
* The default priority to use when sending a message.
*/
export const DEFAULT_NTFY_PRIORITY = 'default';
export const DEFAULT_NTFY_PRIORITY = ntfyMessagePriorityDefault;
/**
* @deprecated Use `DEFAULT_NTFY_PRIORITY` instead.
*/
Expand Down
9 changes: 3 additions & 6 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import fs from 'node:fs/promises'

import type {
FetchHeaders,
NtfyMessageOptions,
NtfyMessagePriority
} from './types.js'
import { ntfyMessagePriorityDefault } from './priorities.js'
import type { FetchHeaders, NtfyMessageOptions } from './types.js'

/**
* The default ntfy server to use.
Expand All @@ -19,7 +16,7 @@ export const DEFAULT_SERVER = DEFAULT_NTFY_SERVER
/**
* The default priority to use when sending a message.
*/
export const DEFAULT_NTFY_PRIORITY: NtfyMessagePriority = 'default'
export const DEFAULT_NTFY_PRIORITY = ntfyMessagePriorityDefault

/**
* @deprecated Use `DEFAULT_NTFY_PRIORITY` instead.
Expand Down

0 comments on commit 39b880c

Please sign in to comment.