diff --git a/.env.development b/.env.development new file mode 100644 index 00000000..9e5c0060 --- /dev/null +++ b/.env.development @@ -0,0 +1,4 @@ +# Only the variables that start with VUE_APP_ are seen in the application process.env in Vue. + +# this won't resolve as a URL on production; it's a URN only found in the test system +VUE_APP_BVC_MEETUPS_PROJECT_CLAIM_ID=https://endorser.ch/entity/01HNTZYJJXTGT0EZS3VEJGX7AK diff --git a/.env.production b/.env.production new file mode 100644 index 00000000..d3438007 --- /dev/null +++ b/.env.production @@ -0,0 +1,3 @@ +# Only the variables that start with VUE_APP_ are seen in the application process.env in Vue. +VUE_APP_BVC_MEETUPS_PROJECT_CLAIM_ID=https://endorser.ch/entity/01GXYPFF7FA03NXKPYY142PY4H +VUE_APP_DEFAULT_ENDORSER_API_SERVER=https://api.endorser.ch diff --git a/CHANGELOG.md b/CHANGELOG.md index 96e74adb..bab2bbc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] -### Changed in DB -- ? +### Fixed +- Environment variable for BVC meetings project +### Changed in DB or environment +- Test that a new browser session will get the right default API +- Test that a new browser session will send the right BVC meetings project -## [0.2.17] - 2024.03.01- 3612ea42240c5e1b7d7eff29a39ff18f1b869b36 +## [0.2.17] - 2024.03.01 - 3612ea42240c5e1b7d7eff29a39ff18f1b869b36 ### Added - Shortcut page for Bountiful Voluntaryist Community ### Changed diff --git a/README.md b/README.md index be28ce06..04286a07 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,9 @@ npm run lint * Update the project.task.yaml & CHANGELOG.md & the version in package.json, run `npm install`. -* If production: change src/constants/app.ts DEFAULT_*_SERVER to be "PROD" and package.json to remove "_Test". Also record what version is on production. +* If production: change package.json to remove "_Test". Also record what version is on production. -* `npm run build` +* `npm run build-dev` for test servers or `npm run build` for production. * Get on the server and back up the time-safari folder. @@ -44,9 +44,9 @@ npm run lint * Revert src/constants/app.ts and package.json (if that was prod). -* Commit changes. Record the new hash in the changelog. Edit package.json to increment version & add "-beta", `npm install`, and commit. Tag if you didn't before. Also record what version is on production. +* Commit changes. Record the new hash in the changelog. Edit package.json to increment version & add "-beta", `npm install`, and commit. Also record what version is on production. -* [Tag wth the new version.](https://gitea.anomalistdesign.com/trent_larson/crowd-funder-for-time-pwa/releases) +* [Tag with the new version.](https://gitea.anomalistdesign.com/trent_larson/crowd-funder-for-time-pwa/releases) diff --git a/package.json b/package.json index 58446809..07cae38b 100644 --- a/package.json +++ b/package.json @@ -5,6 +5,7 @@ "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", + "build-dev": "vue-cli-service build --mode development", "lint": "vue-cli-service lint" }, "dependencies": { diff --git a/src/constants/app.ts b/src/constants/app.ts index 4e94d01f..92961076 100644 --- a/src/constants/app.ts +++ b/src/constants/app.ts @@ -15,7 +15,9 @@ export enum AppString { NO_CONTACT_NAME = "(no name)", } -export const DEFAULT_ENDORSER_API_SERVER = AppString.TEST_ENDORSER_API_SERVER; +export const DEFAULT_ENDORSER_API_SERVER = + process.env.VUE_APP_DEFAULT_ENDORSER_API_SERVER || + AppString.TEST_ENDORSER_API_SERVER; export const DEFAULT_PUSH_SERVER = window.location.protocol + "//" + window.location.host; diff --git a/src/libs/endorserServer.ts b/src/libs/endorserServer.ts index 48856114..ad508c09 100644 --- a/src/libs/endorserServer.ts +++ b/src/libs/endorserServer.ts @@ -780,8 +780,8 @@ export const claimSpecialDescription = ( }; export const BVC_MEETUPS_PROJECT_CLAIM_ID = - //"https://endorser.ch/entity/01GXYPFF7FA03NXKPYY142PY4H"; - "https://endorser.ch/entity/01HNTZYJJXTGT0EZS3VEJGX7AK"; + process.env.VUE_APP_BVC_MEETUPS_PROJECT_CLAIM_ID || + "https://endorser.ch/entity/01HNTZYJJXTGT0EZS3VEJGX7AK"; // this won't resolve as a URL on production; it's a URN only found in the test system export const bvcMeetingJoinClaim = (did: string, startTime: string) => { return {