Skip to content

Commit a367c74

Browse files
committed
feat: adds support for web interface file
1 parent b734e35 commit a367c74

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

action.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@ author: Supertokens
99

1010
inputs:
1111
has-cdi:
12-
description: Whether the repository contains a coreDriverInterface file
12+
description: Whether the repository contains a coreDriverInterfaceSupported file
1313
required: false
1414
default: false
1515

1616
has-fdi:
17-
description: Whether the repository contains a frontendDriverInterface file
17+
description: Whether the repository contains a frontendDriverInterfaceSupported file
18+
required: false
19+
default: false
20+
21+
has-web-js:
22+
description: Whether the repository contains a webJsInterfaceSupported file
1823
required: false
1924
default: false
2025

@@ -25,10 +30,13 @@ inputs:
2530

2631
outputs:
2732
cdiVersions:
28-
description: List of CDI versions from the coreDriverInterface file
33+
description: List of CDI versions from the coreDriverInterfaceSupported file
2934

3035
fdiVersions:
31-
description: List of FDI versions from the frontendDriverInterface file
36+
description: List of FDI versions from the frontendDriverInterfaceSupported file
37+
38+
webJsVersion:
39+
description: The web-js interface version from the webJsInterfaceSupported file
3240

3341
versions:
3442
description: Stringified JSON of the versions file

src/main.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ function getInputs() {
55
return {
66
hasCdi: core.getBooleanInput('has-cdi', { required: false }),
77
hasFdi: core.getBooleanInput('has-fdi', { required: false }),
8+
hasWebJs: core.getBooleanInput('has-web-js', { required: false }),
89
hasCommon: core.getBooleanInput('has-common', { required: false })
910
}
1011
}
@@ -34,6 +35,14 @@ export async function run() {
3435
core.setOutput('fdiVersions', JSON.stringify(fdiVersions))
3536
}
3637

38+
if (inputs.hasWebJs) {
39+
const webJsFile = await fs.readFile('webJsInterfaceSupported.json', 'utf-8')
40+
const webJsVersion: string = JSON.parse(webJsFile).version
41+
42+
core.info(`webJsVersion=${webJsVersion}`)
43+
core.setOutput('webJsVersion', webJsVersion)
44+
}
45+
3746
if (inputs.hasCommon) {
3847
const commonFile = await fs.readFile('supportedVersions.json', 'utf-8')
3948
const versions = JSON.parse(commonFile)

0 commit comments

Comments
 (0)