shinkansen-pantograph 1.4.7 → 1.5.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/index.d.mts CHANGED
@@ -127,6 +127,14 @@ declare global {
127
127
  CHANGE: string
128
128
  SUBMIT: string
129
129
  }
130
+
131
+ export interface PantographType {
132
+ ALPHA: AlphaType
133
+ OMEGA: OmegaType
134
+ EMBARK: EmbarkType
135
+ DEBARK: DebarkType
136
+ CONFIRM: ConfirmType
137
+ }
130
138
  }
131
139
  }
132
140
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shinkansen-pantograph",
3
- "version": "1.4.7",
3
+ "version": "1.5.0",
4
4
  "description": "Shinkansen Pantograph",
5
5
  "keywords": [
6
6
  "Shinkansen",
@@ -21,7 +21,7 @@
21
21
  },
22
22
  "license": "ISC",
23
23
  "engines": {
24
- "node": ">=18.12.0"
24
+ "node": ">=22.11.0"
25
25
  },
26
26
  "repository": {
27
27
  "type": "git",
@@ -43,9 +43,9 @@
43
43
  "@babel/core": "^7.26.9",
44
44
  "@babel/preset-env": "^7.26.9",
45
45
  "@babel/register": "^7.25.9",
46
- "@sequencemedia/eslint-config-standard": "^0.2.39",
47
- "@sequencemedia/eslint-config-typescript": "^0.1.56",
48
- "@sequencemedia/sinon-chai": "^0.0.128",
46
+ "@sequencemedia/eslint-config-standard": "^0.2.41",
47
+ "@sequencemedia/eslint-config-typescript": "^0.1.57",
48
+ "@sequencemedia/sinon-chai": "^0.0.129",
49
49
  "@types/babel__register": "^7.17.3",
50
50
  "@types/chai": "^5.2.0",
51
51
  "@types/debug": "^4.1.12",
@@ -58,8 +58,8 @@
58
58
  "globals": "^16.0.0",
59
59
  "husky": "^9.1.7",
60
60
  "mocha": "^11.1.0",
61
- "shinkansen-rails": "1.0.298",
62
- "shinkansen-signals": "1.1.227",
61
+ "shinkansen-rails": "1.1.0",
62
+ "shinkansen-signals": "1.2.0",
63
63
  "sinon": "^19.0.2"
64
64
  },
65
65
  "imports": {
@@ -1,9 +1,12 @@
1
+ import '#pantograph/pantograph/pantograph'
2
+
1
3
  type RedirectToAlphaParams = PantographTypes.RedirectToAlphaParams
2
4
  type RedirectToOmegaParams = PantographTypes.RedirectToOmegaParams
3
5
  type RedirectToEmbarkParams = PantographTypes.RedirectToEmbarkParams
4
6
  type RedirectToDebarkParams = PantographTypes.RedirectToDebarkParams
5
7
  type RedirectToConfirmParams = PantographTypes.RedirectToConfirmParams
6
8
  type RedirectToParams = PantographTypes.RedirectToParams
9
+
7
10
  type RedirectFromAlphaParams = PantographTypes.RedirectFromAlphaParams
8
11
  type RedirectFromOmegaParams = PantographTypes.RedirectFromOmegaParams
9
12
  type RedirectFromEmbarkParams = PantographTypes.RedirectFromEmbarkParams
@@ -11,6 +14,8 @@ type RedirectFromDebarkParams = PantographTypes.RedirectFromDebarkParams
11
14
  type RedirectFromConfirmParams = PantographTypes.RedirectFromConfirmParams
12
15
  type GraphiteParams = PantographTypes.GraphiteParams
13
16
 
17
+ type PantographType = PantographTypes.Pantograph.PantographType
18
+
14
19
  export function getRedirectToAlpha (params: RedirectToAlphaParams): string | undefined
15
20
  export function getRedirectToOmega (params: RedirectToOmegaParams): string | undefined
16
21
  export function getRedirectToEmbark (params: RedirectToEmbarkParams): string | undefined
@@ -24,4 +29,6 @@ export function getRedirectFromDebark (params: RedirectFromDebarkParams): string
24
29
  export function getRedirectFromConfirm (params: RedirectFromConfirmParams): string | undefined
25
30
  export function graphite (params: GraphiteParams) : string | undefined
26
31
 
27
- export { default } from './pantograph.mjs'
32
+ declare const Pantograph: PantographType
33
+
34
+ export default Pantograph
@@ -16,6 +16,8 @@
16
16
  * @typedef {PantographTypes.RedirectFromDebarkParams} RedirectFromDebarkParams
17
17
  * @typedef {PantographTypes.RedirectFromConfirmParams} RedirectFromConfirmParams
18
18
  * @typedef {PantographTypes.GraphiteParams} GraphiteParams
19
+ *
20
+ * @typedef {PantographTypes.Pantograph.PantographType} PantographType
19
21
  */
20
22
 
21
23
  import debug from 'debug'
@@ -28,7 +30,7 @@ import {
28
30
  Rails
29
31
  } from 'shinkansen-rails'
30
32
 
31
- import pantograph, {
33
+ import {
32
34
  ALPHA,
33
35
  OMEGA,
34
36
  EMBARK,
@@ -231,4 +233,15 @@ export function graphite ({ action: { type } = ACTION, state = STATE, route = RO
231
233
  }
232
234
  }
233
235
 
234
- export default Object.freeze(pantograph)
236
+ /**
237
+ * @type {PantographType}
238
+ */
239
+ const Pantograph = {
240
+ ALPHA,
241
+ OMEGA,
242
+ EMBARK,
243
+ DEBARK,
244
+ CONFIRM
245
+ }
246
+
247
+ export default Object.freeze(Pantograph)
@@ -4,18 +4,14 @@ type EmbarkType = PantographTypes.Pantograph.EmbarkType
4
4
  type DebarkType = PantographTypes.Pantograph.DebarkType
5
5
  type ConfirmType = PantographTypes.Pantograph.ConfirmType
6
6
 
7
+ type PantographType = PantographTypes.Pantograph.PantographType
8
+
7
9
  export declare const ALPHA: AlphaType
8
10
  export declare const OMEGA: OmegaType
9
11
  export declare const EMBARK: EmbarkType
10
12
  export declare const DEBARK: DebarkType
11
13
  export declare const CONFIRM: ConfirmType
12
14
 
13
- declare const pantograph: {
14
- ALPHA: AlphaType
15
- OMEGA: OmegaType
16
- EMBARK: EmbarkType
17
- DEBARK: DebarkType
18
- CONFIRM: ConfirmType
19
- }
15
+ declare const Pantograph: PantographType
20
16
 
21
- export default pantograph
17
+ export default Pantograph
@@ -4,6 +4,8 @@
4
4
  * @typedef {PantographTypes.Pantograph.EmbarkType} EmbarkType
5
5
  * @typedef {PantographTypes.Pantograph.DebarkType} DebarkType
6
6
  * @typedef {PantographTypes.Pantograph.ConfirmType} ConfirmType
7
+ *
8
+ * @typedef {PantographTypes.Pantograph.PantographType} PantographType
7
9
  */
8
10
 
9
11
  import debug from 'debug'
@@ -79,10 +81,15 @@ export const CONFIRM = {
79
81
  SUBMIT: 'CONFIRM_SUBMIT'
80
82
  }
81
83
 
82
- export default {
84
+ /**
85
+ * @type {PantographType}
86
+ */
87
+ const Pantograph = {
83
88
  ALPHA,
84
89
  OMEGA,
85
90
  EMBARK,
86
91
  DEBARK,
87
92
  CONFIRM
88
93
  }
94
+
95
+ export default Pantograph
package/tsconfig.json CHANGED
@@ -6,7 +6,6 @@
6
6
  "checkJs": true,
7
7
  "noEmit": true,
8
8
  "strict": true,
9
- "isolatedModules": true,
10
9
  "baseUrl": ".",
11
10
  "paths": {
12
11
  "#pantograph": [
@@ -20,5 +19,11 @@
20
19
  "src/pantograph/pantograph.mjs"
21
20
  ]
22
21
  }
23
- }
22
+ },
23
+ "include": [
24
+ "."
25
+ ],
26
+ "exclude": [
27
+ "test/**/*"
28
+ ]
24
29
  }