@fossa-app/bridge 0.1.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.
Files changed (64) hide show
  1. package/.build.ps1 +307 -0
  2. package/.github/dependabot.yml +38 -0
  3. package/.github/release-drafter.yml +52 -0
  4. package/.github/workflows/cicd.yml +106 -0
  5. package/.github/workflows/lint.yml +34 -0
  6. package/.github/workflows/release-drafter.yml +27 -0
  7. package/Fossa.Bridge.slnx +8 -0
  8. package/LICENSE +21 -0
  9. package/README.md +5 -0
  10. package/build.ps1 +11 -0
  11. package/dotnet-tools.json +27 -0
  12. package/format.ps1 +11 -0
  13. package/gig.ps1 +16 -0
  14. package/global.json +6 -0
  15. package/lint.ps1 +20 -0
  16. package/pack.ps1 +11 -0
  17. package/package.json +21 -0
  18. package/publish.ps1 +11 -0
  19. package/restore.ps1 +11 -0
  20. package/src/Fossa.Bridge/Fossa.Bridge.fsproj +17 -0
  21. package/src/Fossa.Bridge/Models/ApiModels.fs +136 -0
  22. package/src/Fossa.Bridge/Services/UrlHelpers.fs +18 -0
  23. package/src/Fossa.Bridge/bin/Release/net8.0/Fossa.Bridge.deps.json +98 -0
  24. package/src/Fossa.Bridge/bin/Release/net8.0/Fossa.Bridge.fable-temp.deps.json +41 -0
  25. package/src/Fossa.Bridge/bin/Release/net8.0/Fossa.Bridge.xml +6 -0
  26. package/src/Fossa.Bridge/obj/Fossa.Bridge.fable-temp.csproj.nuget.dgspec.json +81 -0
  27. package/src/Fossa.Bridge/obj/Fossa.Bridge.fable-temp.csproj.nuget.g.props +26 -0
  28. package/src/Fossa.Bridge/obj/Fossa.Bridge.fable-temp.csproj.nuget.g.targets +2 -0
  29. package/src/Fossa.Bridge/obj/Fossa.Bridge.fsproj.nuget.dgspec.json +84 -0
  30. package/src/Fossa.Bridge/obj/Fossa.Bridge.fsproj.nuget.g.props +30 -0
  31. package/src/Fossa.Bridge/obj/Fossa.Bridge.fsproj.nuget.g.targets +2 -0
  32. package/src/Fossa.Bridge/obj/Release/Fossa.Bridge.0.1.0.nuspec +20 -0
  33. package/src/Fossa.Bridge/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs +4 -0
  34. package/src/Fossa.Bridge/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.fs +3 -0
  35. package/src/Fossa.Bridge/obj/Release/net8.0/Fossa.Bridge.AssemblyInfo.fs +18 -0
  36. package/src/Fossa.Bridge/obj/Release/net8.0/Fossa.Bridge.fable-temp.AssemblyInfo.cs +23 -0
  37. package/src/Fossa.Bridge/obj/Release/net8.0/Fossa.Bridge.fable-temp.GeneratedMSBuildEditorConfig.editorconfig +17 -0
  38. package/src/Fossa.Bridge/obj/Release/net8.0/Fossa.Bridge.fable-temp.csproj.FileListAbsolute.txt +4 -0
  39. package/src/Fossa.Bridge/obj/Release/net8.0/Fossa.Bridge.fsproj.FileListAbsolute.txt +14 -0
  40. package/src/Fossa.Bridge/obj/Release/net8.0/Fossa.Bridge.sourcelink.json +1 -0
  41. package/src/Fossa.Bridge/obj/Release/net8.0/Fossa.Bridge.xml +6 -0
  42. package/src/Fossa.Bridge/obj/Release/net8.0/ILLink.Substitutions.xml +15 -0
  43. package/src/Fossa.Bridge/obj/project.assets.json +229 -0
  44. package/test.ps1 +11 -0
  45. package/tests/Fossa.Bridge.Tests/Fossa.Bridge.Tests.fsproj +19 -0
  46. package/tests/Fossa.Bridge.Tests/Main.fs +7 -0
  47. package/tests/Fossa.Bridge.Tests/UrlHelpersTests.fs +33 -0
  48. package/tests/Fossa.Bridge.Tests/bin/Release/net8.0/.msCoverageSourceRootsMapping_Fossa.Bridge.Tests +0 -0
  49. package/tests/Fossa.Bridge.Tests/bin/Release/net8.0/Fossa.Bridge.Tests.deps.json +806 -0
  50. package/tests/Fossa.Bridge.Tests/bin/Release/net8.0/Fossa.Bridge.Tests.runtimeconfig.json +14 -0
  51. package/tests/Fossa.Bridge.Tests/bin/Release/net8.0/Fossa.Bridge.xml +6 -0
  52. package/tests/Fossa.Bridge.Tests/obj/Fossa.Bridge.Tests.fsproj.nuget.dgspec.json +174 -0
  53. package/tests/Fossa.Bridge.Tests/obj/Fossa.Bridge.Tests.fsproj.nuget.g.props +31 -0
  54. package/tests/Fossa.Bridge.Tests/obj/Fossa.Bridge.Tests.fsproj.nuget.g.targets +11 -0
  55. package/tests/Fossa.Bridge.Tests/obj/Release/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.fs +3 -0
  56. package/tests/Fossa.Bridge.Tests/obj/Release/net8.0/Fossa.Br.E9949494.Up2Date +0 -0
  57. package/tests/Fossa.Bridge.Tests/obj/Release/net8.0/Fossa.Bridge.Tests.AssemblyInfo.fs +17 -0
  58. package/tests/Fossa.Bridge.Tests/obj/Release/net8.0/Fossa.Bridge.Tests.fsproj.FileListAbsolute.txt +191 -0
  59. package/tests/Fossa.Bridge.Tests/obj/Release/net8.0/Fossa.Bridge.Tests.sourcelink.json +1 -0
  60. package/tests/Fossa.Bridge.Tests/obj/Release/net8.0/ILLink.Substitutions.xml +15 -0
  61. package/tests/Fossa.Bridge.Tests/obj/project.assets.json +2018 -0
  62. package/trigger.ps1 +32 -0
  63. package/tsconfig.json +16 -0
  64. package/version.ps1 +11 -0
package/.build.ps1 ADDED
@@ -0,0 +1,307 @@
1
+ <#
2
+ .Synopsis
3
+ Build script
4
+
5
+ .Description
6
+ TASKS AND REQUIREMENTS
7
+ Initialize and Clean repository
8
+ Restore packages, workflows, tools
9
+ Format code
10
+ Build projects and the solution
11
+ Run Tests
12
+ Pack
13
+ Publish
14
+ #>
15
+
16
+ [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute('PSReviewUnusedParameter', '', Justification = 'Parameter is used actually.')]
17
+ param(
18
+ # Build Version
19
+ [Parameter()]
20
+ [string]
21
+ $Version,
22
+ # Build Instance
23
+ [Parameter()]
24
+ [string]
25
+ $Instance
26
+ )
27
+
28
+ Set-StrictMode -Version Latest
29
+
30
+ # Synopsis: Initialize folders and variables
31
+ Task Init {
32
+ $trashFolder = Join-Path -Path . -ChildPath '.trash'
33
+ $trashFolder = Join-Path -Path $trashFolder -ChildPath $Instance
34
+ New-Item -Path $trashFolder -ItemType Directory | Out-Null
35
+ $trashFolder = Resolve-Path -Path $trashFolder
36
+
37
+ $buildArtifactsFolder = Join-Path -Path $trashFolder -ChildPath 'artifacts'
38
+ New-Item -Path $buildArtifactsFolder -ItemType Directory | Out-Null
39
+
40
+ $distArtifactsFolder = Join-Path -Path $buildArtifactsFolder -ChildPath 'dist'
41
+ New-Item -Path $distArtifactsFolder -ItemType Directory | Out-Null
42
+
43
+ $fableOutputArtifactsFolder = Join-Path -Path $buildArtifactsFolder -ChildPath 'fable_output'
44
+ New-Item -Path $fableOutputArtifactsFolder -ItemType Directory | Out-Null
45
+
46
+ $state = [PSCustomObject]@{
47
+ NextVersion = $null
48
+ TrashFolder = $trashFolder
49
+ BuildArtifactsFolder = $buildArtifactsFolder
50
+ DistArtifactsFolder = $distArtifactsFolder
51
+ FableOutputArtifactsFolder = $fableOutputArtifactsFolder
52
+ NuGetPackagePath = $null
53
+ NPMPackagePath = $null
54
+ }
55
+
56
+ $state | Export-Clixml -Path ".\.trash\$Instance\state.clixml"
57
+ Write-Output $state
58
+ }
59
+
60
+ # Synopsis: Clean previous build leftovers
61
+ Task Clean Init, {
62
+ Get-ChildItem -Directory
63
+ | Where-Object { -not $_.Name.StartsWith('.') }
64
+ | ForEach-Object { Get-ChildItem -Path $_ -Recurse -Directory }
65
+ | Where-Object { ( $_.Name -eq 'bin') -or ( $_.Name -eq 'obj') }
66
+ | ForEach-Object { Remove-Item -Path $_ -Recurse -Force }
67
+ }
68
+
69
+ # Synopsis: Ensure Central Package Versions compliance
70
+ Task EnsureCentralPackageVersions Clean, {
71
+
72
+ $projectFiles = Get-ChildItem -Path . `
73
+ -Recurse `
74
+ -Include *.csproj, *.fsproj, *.vbproj `
75
+ -File
76
+
77
+ $violations = @()
78
+
79
+ foreach ($projectFile in $projectFiles) {
80
+ try {
81
+ [xml]$xml = Get-Content $projectFile.FullName -Raw
82
+ }
83
+ catch {
84
+ throw "Failed to parse XML: $($projectFile.FullName)"
85
+ }
86
+
87
+ $ns = New-Object System.Xml.XmlNamespaceManager($xml.NameTable)
88
+ $ns.AddNamespace('msb', $xml.DocumentElement.NamespaceURI)
89
+
90
+ $nodes = $xml.SelectNodes('//*[@VersionOverride]', $ns)
91
+
92
+ foreach ($node in $nodes) {
93
+ $violations += [PSCustomObject]@{
94
+ File = $projectFile.FullName
95
+ Node = $node.Name
96
+ Value = $node.GetAttribute('VersionOverride')
97
+ }
98
+ }
99
+ }
100
+
101
+ if ($violations.Count -gt 0) {
102
+ throw "VersionOverride attributes are not allowed. File: $($violations[0].File) Node: <$($violations[0].Node)>"
103
+ }
104
+ }
105
+
106
+ # Synopsis: Restore workloads
107
+ Task RestoreWorkloads Clean, {
108
+ Exec { dotnet workload restore }
109
+ }
110
+
111
+ # Synopsis: Restore tools
112
+ Task RestoreTools Clean, {
113
+ Exec { dotnet tool restore }
114
+ }
115
+
116
+ # Synopsis: Restore NuGet packages
117
+ Task RestoreNuGetPackages Clean, EnsureCentralPackageVersions, {
118
+ $solution = Resolve-Path -Path 'Fossa.Bridge.slnx'
119
+ Exec { dotnet restore $solution }
120
+ }
121
+
122
+ # Synopsis: Restore NPM packages
123
+ Task RestoreNPMPackages Clean, {
124
+ Exec { npm ci }
125
+ }
126
+
127
+ # Synopsis: Restore
128
+ Task Restore RestoreWorkloads, RestoreTools, RestoreNuGetPackages, RestoreNPMPackages
129
+
130
+ # Synopsis: Scan with DevSkim for security issues
131
+ Task DevSkim Restore, {
132
+ $state = Import-Clixml -Path ".\.trash\$Instance\state.clixml"
133
+ $trashFolder = $state.TrashFolder
134
+ $sarifFile = Join-Path -Path $trashFolder -ChildPath 'DevSkim.sarif'
135
+ Exec { dotnet tool run devskim analyze --source-code . --output-file $sarifFile }
136
+ Exec { dotnet tool run devskim fix --source-code . --sarif-result $sarifFile --all }
137
+ }
138
+
139
+ # Synopsis: Format XML Files
140
+ Task FormatXmlFiles Clean, {
141
+ Get-ChildItem -Include *.xml, *.config, *.props, *.targets, *.nuspec, *.resx, *.ruleset, *.vsixmanifest, *.vsct, *.xlf, *.csproj, *.fsproj, *.vbproj, *.slnx -Recurse -File
142
+ | Where-Object { -not (git check-ignore $PSItem) }
143
+ | ForEach-Object {
144
+ Write-Output "Formatting XML File: $PSItem"
145
+ $content = Get-Content -Path $PSItem -Raw
146
+ $xml = [xml]$content
147
+ $xml.Save($PSItem)
148
+ }
149
+ }
150
+
151
+ # Synopsis: Format Fantomas
152
+ Task FormatFantomas Restore, {
153
+ $solution = Resolve-Path -Path 'Fossa.Bridge.slnx'
154
+ Exec { dotnet fantomas . }
155
+ }
156
+
157
+ # Synopsis: Format
158
+ Task Format Restore, FormatXmlFiles, FormatFantomas
159
+
160
+ # Synopsis: Estimate Next Version
161
+ Task EstimateVersion Restore, {
162
+ $state = Import-Clixml -Path ".\.trash\$Instance\state.clixml"
163
+ if ($Version) {
164
+ $state.NextVersion = [System.Management.Automation.SemanticVersion]$Version
165
+ }
166
+ else {
167
+ $gitversion = Exec { dotnet tool run dotnet-gitversion } | ConvertFrom-Json
168
+ $state.NextVersion = [System.Management.Automation.SemanticVersion]::Parse($gitversion.SemVer)
169
+ }
170
+
171
+ $state | Export-Clixml -Path ".\.trash\$Instance\state.clixml"
172
+ Write-Output "Next version estimated to be $($state.NextVersion)"
173
+ Write-Output $state
174
+ }
175
+
176
+ # Synopsis: Build Project
177
+ Task BuildProject EstimateVersion, {
178
+ $state = Import-Clixml -Path ".\.trash\$Instance\state.clixml"
179
+ $project = Resolve-Path -Path 'src/Fossa.Bridge/Fossa.Bridge.fsproj'
180
+ $nextVersion = $state.NextVersion
181
+
182
+ Exec { dotnet build $project /v:m --configuration Release /p:version=$nextVersion }
183
+ }
184
+
185
+ # Synopsis: Build
186
+ Task Build Format, BuildProject, {
187
+ $solution = Resolve-Path -Path 'Fossa.Bridge.slnx'
188
+ Exec { dotnet build $solution --configuration Release }
189
+ }
190
+
191
+ # Synopsis: Unit Test
192
+ Task UnitTest Build, {
193
+ $project = Resolve-Path -Path 'tests/Fossa.Bridge.Tests/Fossa.Bridge.Tests.fsproj'
194
+ Exec { dotnet run --project $project --configuration Release }
195
+ }
196
+
197
+ # Synopsis: Functional Test
198
+ Task FunctionalTest Build, {
199
+ }
200
+
201
+ # Synopsis: Integration Test
202
+ Task IntegrationTest Build, {
203
+ if (-not $env:CI) {
204
+ }
205
+ }
206
+
207
+ # Synopsis: Test
208
+ Task Test UnitTest, FunctionalTest, IntegrationTest
209
+
210
+ # Synopsis: Pack NuGet package
211
+ Task PackNuGet Build, Test, {
212
+ $state = Import-Clixml -Path ".\.trash\$Instance\state.clixml"
213
+ $buildArtifactsFolder = $state.BuildArtifactsFolder
214
+ $nextVersion = $state.NextVersion
215
+ $projectPath = Resolve-Path -Path 'src/Fossa.Bridge/Fossa.Bridge.fsproj'
216
+
217
+ Exec { dotnet pack $projectPath /v:m /p:Configuration=Release /p:version=$nextVersion --output $buildArtifactsFolder }
218
+
219
+ $nugetPackage = Get-ChildItem -Path $buildArtifactsFolder -Filter '*.nupkg' | Select-Object -First 1
220
+
221
+ $state.NuGetPackagePath = $nugetPackage.FullName
222
+
223
+ $state | Export-Clixml -Path ".\.trash\$Instance\state.clixml"
224
+ Write-Output $state
225
+ }
226
+
227
+ # Synopsis: Pack NPM package
228
+ Task PackNPM Build, Test, {
229
+ $state = Import-Clixml -Path ".\.trash\$Instance\state.clixml"
230
+ $buildArtifactsFolder = $state.BuildArtifactsFolder
231
+ $distArtifactsFolder = $state.DistArtifactsFolder
232
+ $fableOutputArtifactsFolder = $state.FableOutputArtifactsFolder
233
+ $nextVersion = $state.NextVersion
234
+ $projectPath = Resolve-Path -Path 'src/Fossa.Bridge/Fossa.Bridge.fsproj'
235
+
236
+ Exec { dotnet fable $projectPath --outDir $fableOutputArtifactsFolder --language typescript }
237
+ Exec { npm version $nextVersion --no-git-tag-version --allow-same-version }
238
+ Exec { npm install }
239
+
240
+ $baseTsConfig = (Resolve-Path .\tsconfig.json).Path.Replace('\', '/')
241
+ $tempTsConfigPath = Join-Path -Path $buildArtifactsFolder -ChildPath 'tsconfig.build.json'
242
+ $fablePattern = "$($fableOutputArtifactsFolder.Replace('\', '/'))/**/*"
243
+ $distPath = $distArtifactsFolder.Replace('\', '/')
244
+ $fablePath = $fableOutputArtifactsFolder.Replace('\', '/')
245
+ $tempTsConfig = @"
246
+ {
247
+ `"extends`": `"$baseTsConfig`",
248
+ `"compilerOptions`": {
249
+ `"outDir`": `"$distPath`",
250
+ `"rootDir`": `"$fablePath`"
251
+ },
252
+ `"include`": [
253
+ `"$fablePattern`"
254
+ ]
255
+ }
256
+ "@
257
+ Set-Content -Path $tempTsConfigPath -Value $tempTsConfig
258
+
259
+ Exec { npm run build -- --project $tempTsConfigPath }
260
+ Exec { npm pack --pack-destination $buildArtifactsFolder }
261
+
262
+ $npmPackage = Get-ChildItem -Path $buildArtifactsFolder -Filter '*.tgz' | Select-Object -First 1
263
+
264
+ $state.NPMPackagePath = $npmPackage.FullName
265
+
266
+ $state | Export-Clixml -Path ".\.trash\$Instance\state.clixml"
267
+ Write-Output $state
268
+ }
269
+
270
+ # Synopsis: Pack
271
+ Task Pack PackNuGet, PackNPM
272
+
273
+ # Synopsis: Publish NuGet package
274
+ Task PublishNuGet PackNuGet, {
275
+ $state = Import-Clixml -Path ".\.trash\$Instance\state.clixml"
276
+ $nugetPackagePath = $state.NuGetPackagePath
277
+
278
+ if ($null -eq $env:NUGET_API_KEY) {
279
+ Import-Module -Name Microsoft.PowerShell.SecretManagement
280
+ $apiKey = Get-Secret -Name 'Fossa-Bridge-NuGet-API-Key' -AsPlainText
281
+ }
282
+ else {
283
+ $apiKey = $env:NUGET_API_KEY
284
+ }
285
+
286
+ Exec { dotnet nuget push $nugetPackagePath --source https://api.nuget.org/v3/index.json --api-key $apiKey }
287
+ }
288
+
289
+ # Synopsis: Publish NPM package
290
+ Task PublishNPM PackNPM, {
291
+ $state = Import-Clixml -Path ".\.trash\$Instance\state.clixml"
292
+ $npmPackagePath = $state.NPMPackagePath
293
+
294
+ if ($null -eq $env:NPM_TOKEN) {
295
+ Import-Module -Name Microsoft.PowerShell.SecretManagement
296
+ $token = Get-Secret -Name 'Fossa-Bridge-NPM-Token' -AsPlainText
297
+ }
298
+ else {
299
+ $token = $env:NPM_TOKEN
300
+ }
301
+
302
+ Exec { npm config set //registry.npmjs.org/:_authToken $token }
303
+ Exec { npm publish $npmPackagePath --access public }
304
+ }
305
+
306
+ # Synopsis: Publish
307
+ Task Publish PublishNuGet, PublishNPM
@@ -0,0 +1,38 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: nuget
4
+ directory: "/"
5
+ labels:
6
+ - "dependencies"
7
+ - "maintenance"
8
+ schedule:
9
+ interval: daily
10
+ open-pull-requests-limit: 10
11
+ reviewers:
12
+ - tiksn
13
+ assignees:
14
+ - tiksn
15
+ - package-ecosystem: npm
16
+ directory: '/'
17
+ labels:
18
+ - 'dependencies'
19
+ - 'maintenance'
20
+ schedule:
21
+ interval: monthly
22
+ open-pull-requests-limit: 10
23
+ reviewers:
24
+ - tiksn
25
+ assignees:
26
+ - tiksn
27
+ - package-ecosystem: "github-actions"
28
+ directory: "/"
29
+ labels:
30
+ - "dependencies"
31
+ - "maintenance"
32
+ open-pull-requests-limit: 10
33
+ schedule:
34
+ interval: "daily"
35
+ reviewers:
36
+ - "tiksn"
37
+ assignees:
38
+ - "tiksn"
@@ -0,0 +1,52 @@
1
+ # release-drafter automatically creates a draft release for you each time you complete a PR in the main branch.
2
+ # It uses GitHub labels to categorize changes (See categories) and draft the release.
3
+ # release-drafter also generates a version for your release based on GitHub labels. You can add a label of 'major',
4
+ # 'minor' or 'patch' to determine which number in the version to increment.
5
+ # You may need to add these labels yourself.
6
+ # See https://github.com/release-drafter/release-drafter
7
+ name-template: "$RESOLVED_VERSION"
8
+ tag-template: "$RESOLVED_VERSION"
9
+ change-template: "- $TITLE by @$AUTHOR (#$NUMBER)"
10
+ no-changes-template: "- No changes"
11
+ categories:
12
+ - title: "📚 Documentation"
13
+ labels:
14
+ - "documentation"
15
+ - title: "🚀 New Features"
16
+ labels:
17
+ - "enhancement"
18
+ - title: "🐛 Bug Fixes"
19
+ labels:
20
+ - "bug"
21
+ - title: "🧰 Maintenance"
22
+ labels:
23
+ - "maintenance"
24
+ version-resolver:
25
+ major:
26
+ labels:
27
+ - "major"
28
+ minor:
29
+ labels:
30
+ - "minor"
31
+ patch:
32
+ labels:
33
+ - "patch"
34
+ default: patch
35
+ template: |
36
+ $CHANGES
37
+
38
+ ## 👨🏼‍💻 Contributors
39
+
40
+ $CONTRIBUTORS
41
+ autolabeler:
42
+ - label: "documentation"
43
+ files:
44
+ - "**/*.md"
45
+ - label: "enhancement"
46
+ files:
47
+ - "Source/**/*"
48
+ - label: "maintenance"
49
+ files:
50
+ - ".github/**/*"
51
+ - "Images/**/*"
52
+ - "Tests/**/*"
@@ -0,0 +1,106 @@
1
+ name: CICD
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ release:
9
+ types:
10
+ - published
11
+ workflow_dispatch:
12
+
13
+ permissions: read-all
14
+
15
+ env:
16
+ DOTNET_NOLOGO: true
17
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
18
+ DOTNET_CLI_TELEMETRY_OPTOUT: true
19
+
20
+ jobs:
21
+ ci:
22
+ name: CI
23
+ runs-on: ubuntu-latest
24
+ steps:
25
+ - name: "Checkout"
26
+ uses: actions/checkout@v6
27
+ with:
28
+ lfs: true
29
+ fetch-depth: 0
30
+ - name: Set up Docker with containerd
31
+ uses: docker/setup-docker-action@v4
32
+ with:
33
+ daemon-config: |
34
+ {
35
+ "features": {
36
+ "containerd-snapshotter": true
37
+ }
38
+ }
39
+ - name: "Install .NET Core SDK"
40
+ uses: actions/setup-dotnet@v5.1.0
41
+ - name: "Install InvokeBuild Module"
42
+ shell: pwsh
43
+ run: Install-Module -Name InvokeBuild -Force
44
+ - name: Set up Docker Buildx
45
+ uses: docker/setup-buildx-action@v3
46
+ - name: "Restore"
47
+ shell: pwsh
48
+ run: .\restore.ps1 -Instance ${{github.run_id}}
49
+ - name: "Format"
50
+ shell: pwsh
51
+ run: .\format.ps1 -Instance ${{github.run_id}}
52
+ - name: "Version"
53
+ shell: pwsh
54
+ run: .\version.ps1 -Instance ${{github.run_id}}
55
+ - name: "Build"
56
+ shell: pwsh
57
+ run: .\build.ps1 -Instance ${{github.run_id}}
58
+ - name: "Test"
59
+ shell: pwsh
60
+ run: .\test.ps1 -Instance ${{github.run_id}}
61
+ - name: "Pack"
62
+ shell: pwsh
63
+ run: .\pack.ps1 -Instance ${{github.run_id}}
64
+ - name: "Publish Artefacts"
65
+ uses: actions/upload-artifact@v6.0.0
66
+ with:
67
+ name: .trash
68
+ path: ".trash"
69
+ include-hidden-files: true
70
+
71
+ cd:
72
+ name: CD
73
+ needs: ci
74
+ if: github.event_name == 'release'
75
+ environment:
76
+ name: "DockerHub"
77
+ url: https://hub.docker.com/r/tiksn/fossa-api
78
+ runs-on: ubuntu-latest
79
+ steps:
80
+ - name: "Checkout"
81
+ uses: actions/checkout@v6
82
+ with:
83
+ lfs: true
84
+ fetch-depth: 0
85
+ - name: "Download Artefact"
86
+ uses: actions/download-artifact@v7.0.0
87
+ with:
88
+ name: ".trash"
89
+ path: "./.trash"
90
+ - name: Set up Docker with containerd
91
+ uses: docker/setup-docker-action@v4
92
+ with:
93
+ daemon-config: |
94
+ {
95
+ "features": {
96
+ "containerd-snapshotter": true
97
+ }
98
+ }
99
+ - name: "Install InvokeBuild Module"
100
+ shell: pwsh
101
+ run: Install-Module -Name InvokeBuild -Force
102
+ - name: "Publish"
103
+ env:
104
+ DOCKER_ACCESS_TOKEN: ${{secrets.DOCKER_ACCESS_TOKEN}}
105
+ shell: pwsh
106
+ run: .\publish.ps1 -Instance ${{github.run_id}}
@@ -0,0 +1,34 @@
1
+ name: Lint
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+
9
+ permissions: read-all
10
+
11
+ env:
12
+ DOTNET_NOLOGO: true
13
+ DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
14
+ DOTNET_CLI_TELEMETRY_OPTOUT: true
15
+
16
+ jobs:
17
+ lint:
18
+ name: Lint
19
+ runs-on: ubuntu-latest
20
+
21
+ permissions:
22
+ statuses: write
23
+
24
+ steps:
25
+ - name: Checkout code
26
+ uses: actions/checkout@v6
27
+ with:
28
+ fetch-depth: 0
29
+
30
+ - name: Super-linter
31
+ uses: super-linter/super-linter@v8.5.0
32
+ env:
33
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34
+ VALIDATE_JSCPD: false
@@ -0,0 +1,27 @@
1
+ name: Release Drafter
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request_target:
8
+ types:
9
+ - edited
10
+ - opened
11
+ - reopened
12
+ - synchronize
13
+ workflow_dispatch:
14
+
15
+ permissions: read-all
16
+
17
+ jobs:
18
+ update_release_draft:
19
+ permissions:
20
+ contents: write
21
+ pull-requests: write
22
+ runs-on: ubuntu-latest
23
+ steps:
24
+ - name: "Draft Release"
25
+ uses: release-drafter/release-drafter@v6.2.0
26
+ env:
27
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,8 @@
1
+ <Solution>
2
+ <Folder Name="/src/">
3
+ <Project Path="src/Fossa.Bridge/Fossa.Bridge.fsproj" />
4
+ </Folder>
5
+ <Folder Name="/tests/">
6
+ <Project Path="tests/Fossa.Bridge.Tests/Fossa.Bridge.Tests.fsproj" />
7
+ </Folder>
8
+ </Solution>
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 fossa-app
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # FossaApp Bridge
2
+ [![Developed by Tigran (TIKSN) Torosyan](https://img.shields.io/badge/Developed%20by-%20Tigran%20%28TIKSN%29%20Torosyan-orange.svg)](https://tiksn.com/)
3
+ [![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)
4
+
5
+ The FossaApp Bridge provides shared froentend and backend functionality.
package/build.ps1 ADDED
@@ -0,0 +1,11 @@
1
+ [CmdletBinding()]
2
+ param (
3
+ [Parameter()]
4
+ [string]
5
+ $Version,
6
+ [Parameter()]
7
+ [string]
8
+ $Instance
9
+ )
10
+
11
+ .\trigger.ps1 -Task Build -Instance $Instance -Version $Version
@@ -0,0 +1,27 @@
1
+ {
2
+ "version": 1,
3
+ "isRoot": true,
4
+ "tools": {
5
+ "fable": {
6
+ "version": "4.29.0",
7
+ "commands": [
8
+ "fable"
9
+ ],
10
+ "rollForward": false
11
+ },
12
+ "fantomas": {
13
+ "version": "7.0.5",
14
+ "commands": [
15
+ "fantomas"
16
+ ],
17
+ "rollForward": false
18
+ },
19
+ "gitversion.tool": {
20
+ "version": "6.6.0",
21
+ "commands": [
22
+ "dotnet-gitversion"
23
+ ],
24
+ "rollForward": false
25
+ }
26
+ }
27
+ }
package/format.ps1 ADDED
@@ -0,0 +1,11 @@
1
+ [CmdletBinding()]
2
+ param (
3
+ [Parameter()]
4
+ [string]
5
+ $Version,
6
+ [Parameter()]
7
+ [string]
8
+ $Instance
9
+ )
10
+
11
+ .\trigger.ps1 -Task Format -Instance $Instance -Version $Version
package/gig.ps1 ADDED
@@ -0,0 +1,16 @@
1
+ #For PowerShell v3
2
+ Function gig {
3
+ param(
4
+ [Parameter(Mandatory = $true)]
5
+ [string[]]$list
6
+ )
7
+ $params = ($list | ForEach-Object { [uri]::EscapeDataString($_) }) -join ','
8
+ Invoke-WebRequest -Uri "https://www.toptal.com/developers/gitignore/api/$params"
9
+ | Select-Object -ExpandProperty content | Out-File -FilePath $(Join-Path -Path $pwd -ChildPath '.gitignore') -Encoding ascii
10
+ }
11
+
12
+ gig -list visualstudio, visualstudiocode, rider, fsharp, powershell, macos, intellij+all
13
+
14
+ Add-Content -Path .\.gitignore -Value '# Repository Specific' -Encoding ascii
15
+ Add-Content -Path .\.gitignore -Value '.trash' -Encoding ascii
16
+ Add-Content -Path .\.gitignore -Value '.idea/' -Encoding ascii
package/global.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "sdk": {
3
+ "version": "10.0.100",
4
+ "rollForward": "latestMajor"
5
+ }
6
+ }