shinkansen-relay 1.0.329 → 1.0.331
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/index.d.mts
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
declare global {
|
|
2
2
|
namespace RelayTypes {
|
|
3
|
+
export type InitiateType = Record<PropertyKey, boolean>
|
|
4
|
+
|
|
3
5
|
export interface RegulateType {
|
|
4
6
|
SIGNAL: string
|
|
5
7
|
SERVICE: string
|
|
6
8
|
}
|
|
7
9
|
|
|
8
|
-
export
|
|
10
|
+
export interface InitiateParamsType {
|
|
11
|
+
was?: Record<PropertyKey, string> | Record<PropertyKey, never>,
|
|
12
|
+
now?: Record<PropertyKey, string> | Record<PropertyKey, never>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type RegulateParamsType = InitiateType | Record<PropertyKey, never>
|
|
9
16
|
}
|
|
10
17
|
}
|
|
11
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shinkansen-relay",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.331",
|
|
4
4
|
"description": "Shinkansen Relay",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Shinkansen",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"@babel/eslint-parser": "^7.26.8",
|
|
43
43
|
"@babel/preset-env": "^7.26.8",
|
|
44
44
|
"@babel/register": "^7.25.9",
|
|
45
|
-
"@sequencemedia/eslint-config-standard": "^0.2.
|
|
46
|
-
"@sequencemedia/eslint-config-typescript": "^0.1.
|
|
45
|
+
"@sequencemedia/eslint-config-standard": "^0.2.20",
|
|
46
|
+
"@sequencemedia/eslint-config-typescript": "^0.1.29",
|
|
47
47
|
"@types/babel__register": "^7.17.3",
|
|
48
48
|
"@types/debug": "^4.1.12",
|
|
49
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
50
|
-
"@typescript-eslint/parser": "^8.
|
|
49
|
+
"@typescript-eslint/eslint-plugin": "^8.24.0",
|
|
50
|
+
"@typescript-eslint/parser": "^8.24.0",
|
|
51
51
|
"babel-plugin-module-resolver": "^5.0.2",
|
|
52
52
|
"chai": "^5.1.2",
|
|
53
53
|
"core-js": "^3.40.0",
|
package/src/relay/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
declare module '#relay/relay' {
|
|
2
2
|
export default class Relay { // eslint-disable-line @typescript-eslint/no-extraneous-class -- Static class
|
|
3
|
-
static initiate (
|
|
3
|
+
static initiate (params: RelayTypes.InitiateParamsType): RelayTypes.InitiateType
|
|
4
4
|
|
|
5
|
-
static regulate (
|
|
5
|
+
static regulate (params: RelayTypes.RegulateParamsType): RelayTypes.RegulateType
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare module '#relay/relay/initiate' {
|
|
2
|
-
export function initiate (
|
|
2
|
+
export function initiate (params: RelayTypes.InitiateParamsType): RelayTypes.InitiateType
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
declare module 'shinkansen-relay/relay/initiate' {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
+
* @typedef {RelayTypes.InitiateParamsType} InitiateParamsType
|
|
2
3
|
* @typedef {RelayTypes.InitiateType} InitiateType
|
|
3
4
|
*/
|
|
4
5
|
|
|
@@ -13,10 +14,7 @@ const log = debug('shinkansen-relay')
|
|
|
13
14
|
log('`shinkansen` is awake')
|
|
14
15
|
|
|
15
16
|
/**
|
|
16
|
-
* @param {
|
|
17
|
-
* was?: Record<PropertyKey, string> | Record<PropertyKey, never>,
|
|
18
|
-
* now?: Record<PropertyKey, string> | Record<PropertyKey, never>
|
|
19
|
-
* }} relay
|
|
17
|
+
* @param {InitiateParamsType} params
|
|
20
18
|
* @returns {InitiateType}
|
|
21
19
|
*/
|
|
22
20
|
export default function initiate ({ now = {}, was = {} } = {}) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare module '#relay/relay/regulate' {
|
|
2
|
-
export function regulate (
|
|
2
|
+
export function regulate (params: RelayTypes.RegulateParamsType): RelayTypes.RegulateType
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
declare module 'shinkansen-relay/relay/regulate' {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @typedef {RelayTypes.
|
|
2
|
+
* @typedef {RelayTypes.RegulateParamsType} RegulateParamsType
|
|
3
3
|
* @typedef {RelayTypes.RegulateType} RegulateType
|
|
4
4
|
*/
|
|
5
5
|
|
|
@@ -14,7 +14,7 @@ const log = debug('shinkansen-relay')
|
|
|
14
14
|
log('`shinkansen` is awake')
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
* @param {
|
|
17
|
+
* @param {RegulateParamsType} params
|
|
18
18
|
* @returns {RegulateType}
|
|
19
19
|
*/
|
|
20
20
|
export default function regulate ({
|
|
@@ -26,6 +26,7 @@ export default function regulate ({
|
|
|
26
26
|
WAS_OMEGA_DEFINED = false
|
|
27
27
|
} = {}) {
|
|
28
28
|
log('regulate')
|
|
29
|
+
|
|
29
30
|
if (
|
|
30
31
|
HAS_ALPHA
|
|
31
32
|
) {
|