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

fix(dcellar-web-ui): disable selection of SPs with invalid status in … #365

Merged
merged 4 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 apps/dcellar-web-ui/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {
sourceType: 'module',
},
plugins: ['react', '@typescript-eslint'],
ignorePatterns: ['next.config.js', 'public/wasm/**.js'],
ignorePatterns: ['next.config.js', 'public/wasm/**.js', 'scripts/**.js'],
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unused-vars': 'off',
Expand Down
12 changes: 12 additions & 0 deletions apps/dcellar-web-ui/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
{
"name": "dcellar-web-ui",
"entries": [
{
"version": "0.3.1",
"tag": "dcellar-web-ui_v0.3.1",
"date": "Wed, 20 Mar 2024 07:14:31 GMT",
"comments": {
"patch": [
{
"comment": "disable selection of SPs with invalid status in SPSelector"
}
]
}
},
{
"version": "0.3.0",
"tag": "dcellar-web-ui_v0.3.0",
Expand Down
9 changes: 8 additions & 1 deletion apps/dcellar-web-ui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log - dcellar-web-ui

This log was last generated on Fri, 15 Mar 2024 09:48:45 GMT and should not be manually modified.
This log was last generated on Wed, 20 Mar 2024 07:14:31 GMT and should not be manually modified.

## 0.3.1
Wed, 20 Mar 2024 07:14:31 GMT

### Patches

- disable selection of SPs with invalid status in SPSelector

## 0.3.0
Fri, 15 Mar 2024 09:48:45 GMT
Expand Down
7 changes: 4 additions & 3 deletions apps/dcellar-web-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "dcellar-web-ui",
"version": "0.3.0",
"version": "0.3.1",
"private": false,
"scripts": {
"dev": "next dev -p 3101",
"dev": "node ./scripts/dev.js -p 3200",
"build": "next build",
"start": "next start",
"lint": "next lint",
Expand Down Expand Up @@ -56,7 +56,8 @@
"react-dnd-html5-backend": "16.0.1",
"viem": "~1.19.11",
"@wagmi/core": "~1.4.10",
"set-interval-async": "~3.0.3"
"set-interval-async": "~3.0.3",
"radash": "~12.1.0"
},
"devDependencies": {
"@commitlint/cli": "^17.4.3",
Expand Down
40 changes: 40 additions & 0 deletions apps/dcellar-web-ui/scripts/dev.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#!/usr/bin/env node

const { execSync } = require('child_process');

const args = process.argv.slice(2);

let port = 3200; // Default port is 3200

// Parsing command line arguments
for (let i = 0; i < args.length; i++) {
const arg = args[i];
if (arg === '-p' || arg === '--port') {
const nextArg = args[i + 1];
if (nextArg && !isNaN(nextArg)) {
port = parseInt(nextArg, 10);
} else {
console.error('Invalid port number. Please provide a valid port number.');
process.exit(1);
}
}
}

function getNextAvailablePort(port) {
const command = `lsof -ti:${port}`;
try {
execSync(command);
return getNextAvailablePort(port + 1);
} catch (error) {
return port;
}
}

function startNextServer(port) {
const command = `next dev -p ${port}`;
console.log(`Starting Next.js server on port ${port}`);
execSync(command, { stdio: 'inherit' });
}

const availablePort = getNextAvailablePort(port);
startNextServer(availablePort);
Loading
Loading