From 6014e910a6e9d007756dc1c32bc0b9712ec20196 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 30 Apr 2025 20:02:03 +0000 Subject: [PATCH 1/9] [Github Actions] Update version to v1.0.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6c2d082..0914031 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@BridgemanAccessible/ba-web-framework", - "version": "1.0.6", + "version": "1.0.7", "description": "A framework for web apps built atop Node, Express and other libraries and utilties that makes creating and maintaining Bridgeman Accessible web apps easier.", "author": "Bridgeman Accessible Date: Wed, 30 Apr 2025 17:21:20 -0500 Subject: [PATCH 2/9] Forgot to export one of the classes --- src/controllers/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/index.ts b/src/controllers/index.ts index a96f133..ee5ea83 100644 --- a/src/controllers/index.ts +++ b/src/controllers/index.ts @@ -1,3 +1,4 @@ import { BaseController } from './BaseController'; +import { ErrorController } from './ErrorController'; -export { BaseController }; \ No newline at end of file +export { BaseController, ErrorController }; \ No newline at end of file From b32c58f29294f1fc864bab783b22a958ef40d35e Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Wed, 30 Apr 2025 22:22:59 +0000 Subject: [PATCH 3/9] [Github Actions] Update version to v1.0.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0914031..e39c9fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@BridgemanAccessible/ba-web-framework", - "version": "1.0.7", + "version": "1.0.8", "description": "A framework for web apps built atop Node, Express and other libraries and utilties that makes creating and maintaining Bridgeman Accessible web apps easier.", "author": "Bridgeman Accessible Date: Wed, 30 Apr 2025 22:02:59 -0500 Subject: [PATCH 4/9] Reordered how things are setup in the Intializer so that static files get treated properly --- src/Initializer.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Initializer.ts b/src/Initializer.ts index e8d6a22..b2f2284 100644 --- a/src/Initializer.ts +++ b/src/Initializer.ts @@ -98,15 +98,6 @@ export class Initializer { // Setup global middleware await this.setupMiddleware(app); - // Setup the router (how the app handles requests) - if(typeof this.controllersPath !== 'undefined') { - this.router = new Router(this.controllersPath); - } - else { - this.router = new Router(); - } - await this.router.setup(app); - // Setup the static file resolver (how the app serves static files) if(typeof this.staticFilesPath !== 'undefined') { await (new StaticFileResolver(this.staticFilesPath)).setup(app); @@ -127,5 +118,14 @@ export class Initializer { else { await (new Renderer()).setup(app); } + + // Setup the router (how the app handles requests) + if(typeof this.controllersPath !== 'undefined') { + this.router = new Router(this.controllersPath); + } + else { + this.router = new Router(); + } + await this.router.setup(app); } } \ No newline at end of file From 0c998767d08871e6ddac9a5e312d55639faabc3b Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 1 May 2025 03:03:25 +0000 Subject: [PATCH 5/9] [Github Actions] Update version to v1.0.9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e39c9fd..0b9034e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@BridgemanAccessible/ba-web-framework", - "version": "1.0.8", + "version": "1.0.9", "description": "A framework for web apps built atop Node, Express and other libraries and utilties that makes creating and maintaining Bridgeman Accessible web apps easier.", "author": "Bridgeman Accessible Date: Thu, 1 May 2025 12:22:54 -0500 Subject: [PATCH 6/9] Forgot to export OAuthApp class --- src/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index f3214ad..f3775e0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,13 +3,15 @@ import { Initializer } from './Initializer'; import { Router } from './Router'; import { Renderer } from './Renderer'; import { StaticFileResolver } from './StaticFileResolver'; +import { OAuthApp } from './OAuthApp'; export { App, Initializer, Router, Renderer, - StaticFileResolver + StaticFileResolver, + OAuthApp }; export * from './controllers'; export * from './decorators'; From eb662a603d4cfd98a56e4357db6408d02a3ad24b Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 1 May 2025 17:24:23 +0000 Subject: [PATCH 7/9] [Github Actions] Update version to v1.0.10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0b9034e..0bd8d22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@BridgemanAccessible/ba-web-framework", - "version": "1.0.9", + "version": "1.0.10", "description": "A framework for web apps built atop Node, Express and other libraries and utilties that makes creating and maintaining Bridgeman Accessible web apps easier.", "author": "Bridgeman Accessible Date: Thu, 1 May 2025 12:57:47 -0500 Subject: [PATCH 8/9] An order of operations oversight in terms of needing a route to not 404 before/during the registration rather than setting it up after --- src/OAuthApp.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/OAuthApp.ts b/src/OAuthApp.ts index 6d9f2c7..a0f4e8e 100644 --- a/src/OAuthApp.ts +++ b/src/OAuthApp.ts @@ -142,6 +142,9 @@ export class OAuthApp extends App { console.log(`Attempting to create/register the app:\n\tApp Base URL: ${baseAppUrl}\n\tApp Abbreviation: ${appAbbrv}\n\tApp Name: ${typeof this.appName === 'undefined' ? 'uses APP_NAME environment variable (' + process.env.APP_NAME + ')' : this.appName}\n\tScopes: ${typeof this.scopes === 'undefined' ? 'uses SCOPES environment variable (' + process.env.SCOPES + ')' : this.scopes.join(', ')}`); + // Because we need this for registration to work properly. It make sense to put it here + app.getInitializer().getRouter().addOutsideFrameworkRoute('/.well-known/jwks.json'); + const client = await Client.setup(app.getExpressApp(), baseAppUrl, this.onAuth, this.saveSecret, appAbbrv, this.appName, this.scopes, { contacts: this.contacts, logo_url: this.logo_url, @@ -155,6 +158,7 @@ export class OAuthApp extends App { }); client.getSetupRoutes().forEach((route) => { + console.log(`Adding outside framework route: ${route}`); app.getInitializer().getRouter().addOutsideFrameworkRoute(route); }); } From 56be45cc94a0ae31fe256db85cd4e8fc0d2839b2 Mon Sep 17 00:00:00 2001 From: Alan Bridgeman Date: Wed, 18 Jun 2025 05:03:17 -0500 Subject: [PATCH 9/9] Changed automation from GitHub to Forgejo + some small improvements --- {.github => .forgejo}/workflows/publish.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) rename {.github => .forgejo}/workflows/publish.yml (84%) diff --git a/.github/workflows/publish.yml b/.forgejo/workflows/publish.yml similarity index 84% rename from .github/workflows/publish.yml rename to .forgejo/workflows/publish.yml index 082ef9b..d277eb4 100644 --- a/.github/workflows/publish.yml +++ b/.forgejo/workflows/publish.yml @@ -7,17 +7,13 @@ on: jobs: publish: - runs-on: ubuntu-latest + runs-on: default steps: # Checkout the repository - name: Checkout code uses: actions/checkout@v3 - # Set up NPM Auth Token - - name: Set up NPM Auth Token - run: echo "NODE_AUTH_TOKEN=${{ secrets.NPM_TOKEN }}" >> $GITHUB_ENV - # Set up NPM Auth Token - name: Set up NPM Auth Token run: echo "NODE_AUTH_TOKEN=${{ secrets.NPM_TOKEN }}" >> $GITHUB_ENV @@ -77,10 +73,18 @@ jobs: - name: Commit Version Change (if needed) if: steps.version_check.outputs.version_changed == 'true' run: | - git config user.name "GitHub Actions" - git config user.email "actions@github.com" + # Update remote URL to use the GITHUB_TOKEN for authentication + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@git.bridgemanaccessible.ca/${{ github.repository }}.git + + # Setup git user details for committing the version change + git config user.name "Forgejo Actions" + git config user.email "actions@git.bridgemanaccessible.ca" + + # Commit the version change to the `package.json` file git add package.json - git commit -m "[Github Actions] Update version to ${{ env.new_version }}" + git commit -m "[Forgejo Actions] Update version to ${{ env.new_version }}" + + # Push the changes to the repository git push origin HEAD:main # Publish to private NPM registry