Compare commits
No commits in common. "56be45cc94a0ae31fe256db85cd4e8fc0d2839b2" and "737dbfa1e0329ed3d5380bd27de2a006ebfad884" have entirely different histories.
56be45cc94
...
737dbfa1e0
6 changed files with 20 additions and 31 deletions
|
|
@ -7,7 +7,7 @@ on:
|
|||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: default
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
# Checkout the repository
|
||||
|
|
@ -18,6 +18,10 @@ jobs:
|
|||
- 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
|
||||
|
||||
# Set up Node.js
|
||||
- name: Set up Node.js version
|
||||
uses: actions/setup-node@v3
|
||||
|
|
@ -73,18 +77,10 @@ jobs:
|
|||
- name: Commit Version Change (if needed)
|
||||
if: steps.version_check.outputs.version_changed == 'true'
|
||||
run: |
|
||||
# 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 config user.name "GitHub Actions"
|
||||
git config user.email "actions@github.com"
|
||||
git add package.json
|
||||
git commit -m "[Forgejo Actions] Update version to ${{ env.new_version }}"
|
||||
|
||||
# Push the changes to the repository
|
||||
git commit -m "[Github Actions] Update version to ${{ env.new_version }}"
|
||||
git push origin HEAD:main
|
||||
|
||||
# Publish to private NPM registry
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@BridgemanAccessible/ba-web-framework",
|
||||
"version": "1.0.10",
|
||||
"version": "1.0.6",
|
||||
"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 <info@bridgemanaccessible.ca",
|
||||
"repository": "https://github.com/Bridgeman-Accessible/ba-web-framework.git",
|
||||
|
|
|
|||
|
|
@ -98,6 +98,15 @@ 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);
|
||||
|
|
@ -118,14 +127,5 @@ 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);
|
||||
}
|
||||
}
|
||||
|
|
@ -142,9 +142,6 @@ 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,
|
||||
|
|
@ -158,7 +155,6 @@ export class OAuthApp extends App {
|
|||
});
|
||||
|
||||
client.getSetupRoutes().forEach((route) => {
|
||||
console.log(`Adding outside framework route: ${route}`);
|
||||
app.getInitializer().getRouter().addOutsideFrameworkRoute(route);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { BaseController } from './BaseController';
|
||||
import { ErrorController } from './ErrorController';
|
||||
|
||||
export { BaseController, ErrorController };
|
||||
export { BaseController };
|
||||
|
|
@ -3,15 +3,13 @@ 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,
|
||||
OAuthApp
|
||||
StaticFileResolver
|
||||
};
|
||||
export * from './controllers';
|
||||
export * from './decorators';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue