Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.0.2 #1340

Merged
merged 178 commits into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
178 commits
Select commit Hold shift + click to select a range
8c9aa80
New git branches setup (#1296)
goastler Jul 19, 2024
c6a9443
Cache cypress install (#1305)
goastler Jul 23, 2024
42ef8d3
Merge branch 'main' into dev
goastler Jul 23, 2024
4b5a70d
Add staging branch to workflow (#1311)
forgetso Jul 29, 2024
20c0e12
New linting (#1309)
goastler Jul 29, 2024
86400eb
fix npm script error handling (#1306)
goastler Jul 29, 2024
35e7505
fix auto merge (#1302)
goastler Jul 29, 2024
cd6b236
Remove contract calls (#1308)
HughParry Jul 29, 2024
5bff693
Removing unused deps, bumping package lock
HughParry Jul 30, 2024
fa08353
Working pow captcha with timeouts
HughParry Jul 30, 2024
42e1102
Add missing deps and bundling command for staging
forgetso Jul 30, 2024
30e686d
Remove version from docker compose files
forgetso Jul 30, 2024
70d1ec5
Use NODE_ENV var for pulling in env var file into docker compose file
forgetso Jul 30, 2024
a28b142
Add staging deploy process
forgetso Jul 30, 2024
7831942
Add staging bundle command
forgetso Jul 30, 2024
a0212ff
package lock
forgetso Jul 30, 2024
64bf575
Remove old deps.
forgetso Jul 30, 2024
802d47e
Update package-lock.json
forgetso Jul 30, 2024
f374527
Update event name
forgetso Jul 30, 2024
8793b54
Add missing dep
forgetso Jul 30, 2024
79b214c
Use latest image to create container from
forgetso Jul 30, 2024
c09b367
Use staging tag for container
forgetso Jul 30, 2024
0aac58f
Await crypto WASM blob
forgetso Jul 31, 2024
29902b7
Allow NODE_ENV to be passed into Vite config
forgetso Jul 31, 2024
f93a81b
Add load-balancer refs to tsconfigs
forgetso Jul 31, 2024
6bf009b
Allow PROSOPO_DEFAULT_ENVIRONMENT to inherit from NODE_ENV
forgetso Jul 31, 2024
7aa256d
Add some logging and change some imports
forgetso Jul 31, 2024
17983c7
exporting hardcoded provider from types
HughParry Jul 31, 2024
129be99
Cleanup linting process (#1312)
goastler Jul 31, 2024
7f9b730
Fix provider not erroring on database connection error. Add option to…
forgetso Jul 31, 2024
9ef7504
Add staging command back in
forgetso Jul 31, 2024
5a70867
deploy staging workflow to bundle branch
HughParry Jul 31, 2024
2a77f02
addit commit details for bumps
HughParry Jul 31, 2024
dad13ec
Add watchtower to provider docker compose
forgetso Jul 31, 2024
b20be8e
Don't mount missing file
forgetso Jul 31, 2024
61fa810
watch provider container only
forgetso Jul 31, 2024
eaab4ca
Change container name
forgetso Jul 31, 2024
61390ca
Use createConnection instead of connection
forgetso Aug 1, 2024
5b02bee
Fix build
forgetso Aug 1, 2024
d9717ea
Staging deploy workflow (#1314)
goastler Aug 5, 2024
81a4421
Pkg json
HughParry Aug 5, 2024
8466c4b
bump version to v2.0.0
goastler Aug 5, 2024
3951216
no build specified
HughParry Aug 5, 2024
3bbaf77
Merge branch 'staging' into release/2.0.0
forgetso Aug 5, 2024
5348243
remove deploy_X scripts
goastler Aug 5, 2024
c408692
Merge branch 'release/2.0.0' of github.com:prosopo/captcha into relea…
goastler Aug 5, 2024
b1bbfe8
remove deploy_X scripts
goastler Aug 5, 2024
b95a62a
remove deploy_protocol script call
goastler Aug 5, 2024
a97880b
remove deploy_protocol workflow step
goastler Aug 5, 2024
ac0a6aa
remove github assets for contract
goastler Aug 5, 2024
ea6db02
remove deploy_protool
goastler Aug 5, 2024
4a08205
Use 2.0.0 everywhere
forgetso Aug 5, 2024
3116a13
Merge branch 'release/2.0.0' of github.com:prosopo/captcha into relea…
forgetso Aug 5, 2024
190b248
Provider tests passing
HughParry Aug 5, 2024
d8f3bc6
Adding if present to cjs
HughParry Aug 5, 2024
4eab1e4
Dropping auto merge
HughParry Aug 5, 2024
65e2b41
Dropping dapp example demo
HughParry Aug 5, 2024
cff6194
fix check version bump all history available
goastler Aug 5, 2024
50503e0
Update check_version_bump.yml
goastler Aug 5, 2024
e949d6f
Update check_version_bump.yml
goastler Aug 5, 2024
8518742
Remove out of date readme
forgetso Aug 5, 2024
4ebced2
Update check_version_bump.yml
goastler Aug 5, 2024
e538432
Merge branch 'release/2.0.0' of github.com:prosopo/captcha into relea…
goastler Aug 5, 2024
f18b989
Re-add old babel plugins
forgetso Aug 5, 2024
98b70b2
start provider
HughParry Aug 6, 2024
b96fe50
Always add the token to the form
forgetso Aug 6, 2024
ff21ed4
Supply token to onHuman function
forgetso Aug 6, 2024
29e2c69
Fix build
forgetso Aug 6, 2024
915b414
Adding button next for cypress tests
HughParry Aug 6, 2024
0918250
Fixing hanging test
HughParry Aug 6, 2024
86a84db
Fixing get dataset being broken
HughParry Aug 6, 2024
af7bcb1
Remove substrate from docker compose
forgetso Aug 6, 2024
1fa1787
Cypress tests passing
HughParry Aug 6, 2024
f802200
stop the provider workflow from falling over if the npm packages are …
forgetso Aug 6, 2024
1e3ae78
Only load the provider mock container if we built it
forgetso Aug 6, 2024
b68f60c
Try to upload screenshots
forgetso Aug 6, 2024
ca04b68
Try to store screenshots on failure
forgetso Aug 6, 2024
a61368f
Try using withinSubject:null
forgetso Aug 6, 2024
2ec1fe4
Wait for button to be visible
forgetso Aug 6, 2024
34f547c
Wait for the the API call
forgetso Aug 6, 2024
844783c
Remove wait for solution request
forgetso Aug 6, 2024
0d1d924
try to force the click
forgetso Aug 6, 2024
dc74abb
Just force, don't expect the element
forgetso Aug 6, 2024
bf2f2fe
try waiting after clicking
forgetso Aug 6, 2024
61befa1
Store videos of cypress runs
forgetso Aug 6, 2024
bed1ba6
Remove the then
forgetso Aug 6, 2024
8e9e149
Remove duplicate click
forgetso Aug 6, 2024
858d126
Fix function return type
forgetso Aug 6, 2024
82a2fec
try within
forgetso Aug 6, 2024
ddd95c3
Adding setup step for setup env in test
HughParry Aug 7, 2024
a6d7298
Add data-cy attributes if environment is not production
forgetso Aug 7, 2024
a904c21
wait for docker containers to setup env
HughParry Aug 7, 2024
44efdbc
Merge branch 'release/2.0.0' of github.com:prosopo/captcha into relea…
forgetso Aug 7, 2024
51cfce2
Adding setup step for setup env in test
HughParry Aug 7, 2024
7282e1c
Start docker first
forgetso Aug 7, 2024
bc4d19f
Check if there are references
forgetso Aug 7, 2024
6ed8217
remove within
forgetso Aug 7, 2024
b4152cc
Try to kill processes with concurrently
forgetso Aug 7, 2024
d0d987f
Size fixes for widget and logo
forgetso Aug 7, 2024
1af2dd4
Make signature stuff less confusing
forgetso Aug 8, 2024
62ac3b4
Fix license header positions
forgetso Aug 8, 2024
edf4536
Fix tests
forgetso Aug 8, 2024
3a83cdf
Get it all working
forgetso Aug 8, 2024
581662d
Merge branch 'staging' into size-fixes
forgetso Aug 8, 2024
d8a5ecf
Fix size
forgetso Aug 8, 2024
6e938a6
Fix lint issues (#1318)
goastler Aug 9, 2024
fe99949
use package workspaces rather than cd'ing (#1321)
goastler Aug 9, 2024
7f5caf2
Add push to js branch again to get live staging bundle
forgetso Aug 11, 2024
1b115ce
Remove any existing procaptcha responses on human
forgetso Aug 11, 2024
8eed75c
deploy staging on push to staging
forgetso Aug 12, 2024
89ce6bf
Use duplicate JS Server for now
forgetso Aug 12, 2024
669f6e7
Silence GH warning about NoSQL injection in demo
forgetso Aug 12, 2024
9beaa38
Silence GH warning about NoSQL injection in demo
forgetso Aug 12, 2024
8b7563e
Set GH_TOKEN env
forgetso Aug 12, 2024
fc0e4a7
Remove production step for JS Server
forgetso Aug 12, 2024
50013d1
Add back command to push to js-bundle branch. Remove quotes in asset …
forgetso Aug 12, 2024
514164a
Use correct docker tag
forgetso Aug 12, 2024
a6f22a7
Try moving to its own step
forgetso Aug 12, 2024
0035f24
don't fail if nothing to commit
forgetso Aug 12, 2024
806dbff
Update provider docker run CMD
forgetso Aug 12, 2024
b92dbd1
Always pull new version of tag for provider image
forgetso Aug 12, 2024
400c5a9
Update provider CMD
forgetso Aug 12, 2024
3f033a0
Alter the verify endpoint when in non-production environments in clie…
forgetso Aug 12, 2024
4f58e79
Allow PoW captchas to be stored and counted
forgetso Aug 13, 2024
4a1258c
Removing exportData from Manager
HughParry Aug 13, 2024
81dde17
Adding synamic config for load balancer
HughParry Aug 13, 2024
4b949d8
Fix build
forgetso Aug 13, 2024
7a75dc4
fix server build
forgetso Aug 13, 2024
4ce946a
fix server again
forgetso Aug 13, 2024
7918d9e
Merge branch 'release/2.0.0' of github.com:prosopo/captcha into relea…
forgetso Aug 13, 2024
a127542
fix provider build
forgetso Aug 13, 2024
eb8a958
Merge branch 'staging' into release/2.0.0
forgetso Aug 13, 2024
25d4bd0
Removing dangerou
HughParry Aug 13, 2024
6ff6f25
Change scale-ts type to u64 to avoid losing data
forgetso Aug 13, 2024
0c287c5
revert change to number for timestamp
forgetso Aug 13, 2024
4e89de6
make sure procaptcha-response is deleted
forgetso Aug 13, 2024
2ce41a8
Fix scheduler database name and add env option for storage schedule
forgetso Aug 13, 2024
c0557d8
Make the models available once the connection has been made
forgetso Aug 13, 2024
1ab5169
Merge branch 'main' into staging
forgetso Aug 13, 2024
7665044
Merge branch 'staging' into size-fixes
forgetso Aug 14, 2024
3e0053a
Move headers
forgetso Aug 14, 2024
be85cd9
Update js_server release step
forgetso Aug 14, 2024
48eeeb1
Try using secret directly
forgetso Aug 14, 2024
b4daac5
Add some debug
forgetso Aug 14, 2024
8f26856
Modify debug
forgetso Aug 14, 2024
f639fad
Yet more debug
forgetso Aug 14, 2024
383c73f
I give up
forgetso Aug 14, 2024
5da691d
Working captcha results in mongo (#1322)
HughParry Aug 14, 2024
40d8d73
Use a var for mongo image
forgetso Aug 14, 2024
1c86647
more debug
forgetso Aug 14, 2024
cd33a71
Removing lint fix from version bump
HughParry Aug 14, 2024
54b953f
Merge branch 'main' into staging
forgetso Aug 19, 2024
5f35181
User data mvp (#1327)
forgetso Aug 21, 2024
15e1289
only run prosoponator on non-draft pr's (#1333)
goastler Aug 21, 2024
2a0a69e
fix dir capitalisation (#1329)
goastler Aug 21, 2024
8f1d57a
Introduce dotenv package for finding environment files (#1334)
forgetso Aug 21, 2024
4df38b8
Fix dataset IDs for staging providers
forgetso Aug 21, 2024
4aeab1e
Allow pow challenges to be submitted more than once for verification
forgetso Aug 21, 2024
02e3045
Fail if the challenge exists in the db
forgetso Aug 21, 2024
30bf49f
Revert unlimited challenge checking
forgetso Aug 21, 2024
eec7235
Make demo re-render captcha component when form changes
forgetso Aug 21, 2024
6d40870
Allow navigating between the captcha types
forgetso Aug 21, 2024
eee3867
Fix license location
forgetso Aug 21, 2024
ad05937
remove debug
forgetso Aug 21, 2024
095f595
Store something on each request. Update PoW types. Additional checks …
forgetso Aug 26, 2024
4feb72c
Bug fix for missing status in scheduled task record
forgetso Aug 26, 2024
da57633
Fix captcha storage mechanism. Add tests (#1337)
forgetso Aug 28, 2024
8104c93
use correct branch name in bump version
forgetso Aug 28, 2024
920fdfe
Merge branch 'main' into staging
forgetso Aug 28, 2024
1d4c29b
Bump version to 2.0.2
prosoponator Aug 28, 2024
b91be41
Merge branch 'release/2.0.2' of github.com:prosopo/captcha into relea…
forgetso Aug 28, 2024
f62ee80
Merge branch 'main' into staging
forgetso Aug 28, 2024
7a9ebb5
Merge branch 'main' into staging
forgetso Aug 28, 2024
a634f05
Merge branch 'main' into staging
forgetso Aug 28, 2024
973a9ca
Merge branch 'main' into staging
forgetso Aug 28, 2024
f99f896
Bump version to 2.0.2
prosoponator Aug 28, 2024
4f9d353
Merge branch 'release/2.0.2' of github.com:prosopo/captcha into relea…
forgetso Aug 28, 2024
7cc88f7
bump versions
forgetso Aug 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/prosoponator_bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on: issue_comment
jobs:
comment:
# This job only runs for pull request comments
if: ${{ github.event.issue.pull_request }}
if: ${{ github.event.issue.pull_request }} && github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Print contexts
Expand Down
42 changes: 21 additions & 21 deletions demos/client-bundle-example/package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"name": "@prosopo/client-bundle-example",
"main": "index.js",
"engines": {
"node": ">=20",
"npm": ">=9"
},
"scripts": {
"test": "echo \"No test specified\"",
"build": "echo \"No build specified\"",
"start": "vite serve ./src --port 9232 --config vite.config.ts",
"clean": "echo 'nothing to clean'"
},
"dependencies": {
"dotenv": "^16.0.1",
"vite": "^5.1.7"
},
"version": "2.0.1",
"devDependencies": {
"tslib": "2.6.2",
"typescript": "5.1.6"
}
"name": "@prosopo/client-bundle-example",
"main": "index.js",
"engines": {
"node": ">=20",
"npm": ">=9"
},
"scripts": {
"test": "echo \"No test specified\"",
"build": "echo \"No build specified\"",
"start": "vite serve ./src --port 9232 --config vite.config.ts",
"clean": "echo 'nothing to clean'"
},
"dependencies": {
"dotenv": "^16.0.1",
"vite": "^5.1.7"
},
"version": "2.0.2",
"devDependencies": {
"tslib": "2.6.2",
"typescript": "5.1.6"
}
}
2 changes: 1 addition & 1 deletion demos/client-bundle-example/src/jsBundleTest.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div
class="procaptcha"
data-theme="light"
data-sitekey="5HUBceb4Du6dvMA9BiwN5VzUrzUsX9Zp7z7nSR2cC1TCv5jg"
data-sitekey="5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw"
></div>
</form>
</body>
Expand Down
5 changes: 1 addition & 4 deletions demos/client-example-server/env.development
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
PROSOPO_VERIFY_ENDPOINT=http://localhost:9237/dev/siteverify
PROSOPO_VERIFICATION_TYPE=local
PROSOPO_SITE_KEY=5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw
PROSOPO_SUBSTRATE_ENDPOINT=ws://localhost:9944
PROSOPO_CONTRACT_ADDRESS=
PROSOPO_WEB2=true
PROSOPO_SERVER_URL=https://localhost
PROSOPO_SITE_PRIVATE_KEY=//Eve
PROSOPO_SERVER_PORT=9228
PROSOPO_DEFAULT_ENVIRONMENT=development
PROSOPO_DEFAULT_NETWORK=development
PROSOPO_MONGO_EVENTS_URI=mongodb+srv://<MONGO_URI_HERE>/frictionless_events
_DEV_ONLY_WATCH_EVENTS=false
_DEV_ONLY_WATCH_EVENTS=false
100 changes: 50 additions & 50 deletions demos/client-example-server/package.json
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
{
"name": "@prosopo/client-example-server",
"version": "2.0.1",
"description": "Backend for client-example",
"main": "dist/app.js",
"type": "module",
"engines": {
"node": ">=20",
"npm": ">=9"
},
"scripts": {
"test": "echo \"No test specified\"",
"dev": "NODE_ENV=${NODE_ENV:-development}; vite serve --mode=$NODE_ENV --config ./vite.config.ts --host",
"start": "node ./dist/app.js",
"start:bundle": "node ./dist/bundle/prosopo_client_example_server.app.bundle.js",
"build": "tsc --build --verbose",
"bundle": "NODE_ENV=${NODE_ENV:-production}; vite build --mode=$NODE_ENV --config ./vite.config.ts",
"clean": "tsc --build --clean"
},
"repository": {
"type": "git",
"url": "git+https://github.com/prosopo/client-example-server.git"
},
"author": "PROSOPO LIMITED <info@prosopo.io>",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/prosopo/client-example-server/issues"
},
"homepage": "https://github.com/prosopo/client-example-server#readme",
"dependencies": {
"@noble/hashes": "^1.3.1",
"@polkadot/util": "12.6.2",
"@polkadot/util-crypto": "12.6.2",
"@prosopo/api": "2.0.1",
"@prosopo/contract": "2.0.1",
"@prosopo/procaptcha": "2.0.1",
"@prosopo/server": "2.0.1",
"@prosopo/types": "2.0.1",
"@typegoose/auto-increment": "^4.5.0",
"cors": "^2.8.5",
"jsonwebtoken": "^9.0.0",
"mongoose": "^8.5.1",
"zod": "^3.22.3"
},
"devDependencies": {
"@prosopo/config": "2.0.1",
"@types/jsonwebtoken": "^9.0.2",
"tslib": "2.6.2",
"typescript": "5.1.6",
"vite": "^5.1.7"
}
"name": "@prosopo/client-example-server",
"version": "2.0.2",
"description": "Backend for client-example",
"main": "dist/app.js",
"type": "module",
"engines": {
"node": ">=20",
"npm": ">=9"
},
"scripts": {
"test": "echo \"No test specified\"",
"dev": "NODE_ENV=${NODE_ENV:-development}; vite serve --mode=$NODE_ENV --config ./vite.config.ts --host",
"start": "node ./dist/app.js",
"start:bundle": "node ./dist/bundle/prosopo_client_example_server.app.bundle.js",
"build": "tsc --build --verbose",
"bundle": "NODE_ENV=${NODE_ENV:-production}; vite build --mode=$NODE_ENV --config ./vite.config.ts",
"clean": "tsc --build --clean"
},
"repository": {
"type": "git",
"url": "git+https://github.com/prosopo/client-example-server.git"
},
"author": "PROSOPO LIMITED <info@prosopo.io>",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/prosopo/client-example-server/issues"
},
"homepage": "https://github.com/prosopo/client-example-server#readme",
"dependencies": {
"@noble/hashes": "^1.3.1",
"@polkadot/util": "12.6.2",
"@polkadot/util-crypto": "12.6.2",
"@prosopo/api": "2.0.2",
"@prosopo/dotenv": "2.0.2",
"@prosopo/procaptcha": "2.0.2",
"@prosopo/server": "2.0.2",
"@prosopo/types": "2.0.2",
"@typegoose/auto-increment": "^4.5.0",
"cors": "^2.8.5",
"jsonwebtoken": "^9.0.0",
"mongoose": "^8.5.1",
"zod": "^3.22.3"
},
"devDependencies": {
"@prosopo/config": "2.0.2",
"@types/jsonwebtoken": "^9.0.2",
"tslib": "2.6.2",
"typescript": "5.1.6",
"vite": "^5.1.7"
}
}
6 changes: 2 additions & 4 deletions demos/client-example-server/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@ import { ProsopoEnvError, getLoggerDefault } from "@prosopo/common";
import { getServerConfig } from "@prosopo/server";
import { at } from "@prosopo/util";
import cors from "cors";
import dotenv from "dotenv";
import { loadEnv } from "@prosopo/dotenv";
import express from "express";
import routesFactory from "./routes/routes.js";
import connectionFactory from "./utils/connection.js";
import memoryServerSetup from "./utils/database.js";

export function loadEnv() {
dotenv.config({ path: getEnvFile() });
}
loadEnv();

export function getEnvFile(filename = ".env", filepath = "./") {
const env = process.env.NODE_ENV || "development";
Expand Down
15 changes: 7 additions & 8 deletions demos/client-example-server/src/controllers/auth.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
import { blake2b } from "@noble/hashes/blake2b";
import { u8aToHex } from "@polkadot/util";
import { randomAsHex } from "@polkadot/util-crypto";
import { ProsopoEnvError } from "@prosopo/common";
import { getPairAsync } from "@prosopo/contract";
import { ProsopoServer } from "@prosopo/server";
// Copyright 2021-2024 Prosopo (UK) Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -17,6 +11,13 @@ import { ProsopoServer } from "@prosopo/server";
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

import { blake2b } from "@noble/hashes/blake2b";
import { u8aToHex } from "@polkadot/util";
import { randomAsHex } from "@polkadot/util-crypto";
import { ProsopoEnvError } from "@prosopo/common";
import { getPairAsync } from "@prosopo/contract";
import { ProsopoServer } from "@prosopo/server";
import {
ApiParams,
type ProcaptchaToken,
Expand Down Expand Up @@ -86,7 +87,6 @@ const signup = async (
});
const payload = SubscribeBodySpec.parse(req.body);
const pair = await getPairAsync(
config.networks[config.defaultNetwork],
config.account.secret,
);
const prosopoServer = new ProsopoServer(config, pair);
Expand Down Expand Up @@ -153,7 +153,6 @@ const login = async (
) => {
const User = mongoose.model<UserInterface>("User");
const pair = await getPairAsync(
config.networks[config.defaultNetwork],
config.account.secret,
);
const prosopoServer = new ProsopoServer(config, pair);
Expand Down
28 changes: 14 additions & 14 deletions demos/client-example-server/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
import * as path from "node:path";
import { loadEnv } from "@prosopo/cli";
import { loadEnv } from "@prosopo/dotenv";
import { ViteBackendConfig } from "@prosopo/config";
import { defineConfig } from "vite";
import { version } from "./package.json";
Expand All @@ -31,17 +31,17 @@ process.env.TS_NODE_PROJECT = path.resolve("./tsconfig.json");

// Merge with generic backend config
export default defineConfig(async ({ command, mode }) => {
const backendConfig = await ViteBackendConfig(
packageName,
packageVersion,
bundleName,
dir,
entry,
command,
mode,
);
return defineConfig({
...backendConfig,
server: { port: process.env.PROSOPO_SERVER_PORT },
});
const backendConfig = await ViteBackendConfig(
packageName,
packageVersion,
bundleName,
dir,
entry,
command,
mode,
);
return defineConfig({
...backendConfig,
server: { port: process.env.PROSOPO_SERVER_PORT },
});
});
2 changes: 0 additions & 2 deletions demos/client-example/env.development
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
PROSOPO_SITE_KEY=5HGjWAeFDfFCWPsjFQdVV2Msvz2XtMktvgocEZcCj68kUMaw
PROSOPO_SUBSTRATE_ENDPOINT=ws://127.0.0.1:9944
PROSOPO_CONTRACT_ADDRESS=
PROSOPO_WEB2=true
PROSOPO_SERVER_URL=http://localhost
PROSOPO_PORT=9230
PROSOPO_DEFAULT_NETWORK=development
PROSOPO_DEFAULT_ENVIRONMENT=development
PROSOPO_MONGO_EVENTS_URI=mongodb+srv://<MONGO_URI_HERE>/frictionless_events
_DEV_ONLY_WATCH_EVENTS=false
Loading
Loading