Skip to content

Commit 6948397

Browse files
authored
Merge pull request #50 from Ratio1/develop
Develop
2 parents 06b2f4a + e3e49f3 commit 6948397

File tree

17 files changed

+343
-134
lines changed

17 files changed

+343
-134
lines changed

.github/workflows/build_devnet.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,22 @@ name: Build and Push Devnet Image
22

33
on:
44
push:
5-
branches: [develop]
5+
tags: ['v*']
66
# also allow manual runs
77
workflow_dispatch:
88

99
jobs:
1010
build:
11+
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v')
1112
runs-on: ubuntu-latest
1213
permissions:
1314
contents: read
1415

1516
steps:
1617
- name: Checkout source
1718
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.sha }}
1821

1922
- uses: docker/setup-qemu-action@v3
2023
- uses: docker/setup-buildx-action@v3
@@ -42,3 +45,4 @@ jobs:
4245
VERSION=${{ steps.vars.outputs.sha_short }}
4346
tags: |
4447
ratio1/deeploy_ui:devnet
48+

.github/workflows/sem_ver.yaml

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
name: Semantic Versioning
2+
3+
on:
4+
push:
5+
branches: [ develop ]
6+
7+
permissions:
8+
contents: write
9+
10+
concurrency:
11+
group: semver-${{ github.ref }}
12+
cancel-in-progress: false
13+
14+
env:
15+
VERSION_FILE: package.json
16+
17+
jobs:
18+
release:
19+
# Extra safety: don't run on the bot's own version bump commits (even though [skip ci] should skip already)
20+
if: github.actor != 'github-actions[bot]'
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0 # fetch all history + tags
28+
token: ${{ secrets.PAT_TOKEN }}
29+
30+
- name: Configure git
31+
run: |
32+
git config user.name "github-actions[bot]"
33+
git config user.email "github-actions[bot]@users.noreply.github.com"
34+
35+
- name: Fetch tags
36+
run: git fetch --force --tags
37+
38+
# Bootstrap only when there are no semver tags yet
39+
- name: Bootstrap initial tag (only if none exist)
40+
id: bootstrap
41+
shell: bash
42+
run: |
43+
set -euo pipefail
44+
45+
latest="$(git tag -l 'v[0-9]*.[0-9]*.[0-9]*' --sort=-v:refname | head -n1 || true)"
46+
if [[ -n "$latest" ]]; then
47+
echo "bootstrapped=false" >> "$GITHUB_OUTPUT"
48+
exit 0
49+
fi
50+
51+
if [[ ! -f "$VERSION_FILE" ]]; then
52+
echo "VERSION_FILE not found: $VERSION_FILE" >&2
53+
exit 1
54+
fi
55+
56+
detected="$(grep -oE "v?[0-9]+\.[0-9]+\.[0-9]+" "$VERSION_FILE" | head -n1 || true)"
57+
if [[ -z "$detected" ]]; then
58+
echo "No semver found in $VERSION_FILE" >&2
59+
exit 1
60+
fi
61+
[[ "$detected" == v* ]] || detected="v$detected"
62+
63+
echo "No semver tags found. Bootstrapping tag: $detected"
64+
git tag -a "$detected" -m "Bootstrap $detected"
65+
git push origin "$detected"
66+
67+
echo "bootstrapped=true" >> "$GITHUB_OUTPUT"
68+
69+
- name: Calculate next version
70+
if: steps.bootstrap.outputs.bootstrapped != 'true'
71+
id: semver
72+
uses: paulhatch/semantic-version@v5.4.0
73+
with:
74+
tag_prefix: "v"
75+
# Conventional Commits defaults (major if !: or BREAKING CHANGE:, minor if feat:)
76+
major_pattern: "/!:|BREAKING CHANGE:/"
77+
minor_pattern: "/feat:/"
78+
search_commit_body: true
79+
version_format: "${major}.${minor}.${patch}"
80+
81+
- name: Guard (do nothing if tag already exists)
82+
if: steps.bootstrap.outputs.bootstrapped != 'true'
83+
id: guard
84+
shell: bash
85+
run: |
86+
set -euo pipefail
87+
tag="${{ steps.semver.outputs.version_tag }}"
88+
if git show-ref --tags --verify --quiet "refs/tags/$tag"; then
89+
echo "Tag already exists: $tag"
90+
echo "should_release=false" >> "$GITHUB_OUTPUT"
91+
exit 0
92+
fi
93+
echo "should_release=true" >> "$GITHUB_OUTPUT"
94+
95+
- name: Update version file
96+
if: steps.guard.outputs.should_release == 'true'
97+
env:
98+
NEW_TAG: ${{ steps.semver.outputs.version_tag }}
99+
run: |
100+
set -euo pipefail
101+
python - <<'PY'
102+
import json, os
103+
from pathlib import Path
104+
105+
path = Path(os.environ["VERSION_FILE"])
106+
new_tag = os.environ["NEW_TAG"]
107+
# Strip leading 'v' for package.json (uses bare semver)
108+
version = new_tag.lstrip("v")
109+
110+
data = json.loads(path.read_text(encoding="utf-8"))
111+
data["version"] = version
112+
path.write_text(json.dumps(data, indent=2) + "\n", encoding="utf-8")
113+
print(f"Updated {path} -> {version}")
114+
PY
115+
116+
- name: Commit + tag + push
117+
if: steps.guard.outputs.should_release == 'true'
118+
run: |
119+
set -euo pipefail
120+
tag="${{ steps.semver.outputs.version_tag }}"
121+
122+
git add "$VERSION_FILE"
123+
if ! git diff --cached --quiet; then
124+
git commit -m "chore(release): ${tag}"
125+
fi
126+
127+
git tag -a "$tag" -m "Release $tag"
128+
129+
# Push commit (if any) and annotated tags together
130+
git push origin HEAD:develop --follow-tags
131+
132+
- name: Summary
133+
if: steps.bootstrap.outputs.bootstrapped != 'true'
134+
run: |
135+
echo "Previous Version: ${{ steps.semver.outputs.previous_version }}"
136+
echo "New Tag: ${{ steps.semver.outputs.version_tag }}"
137+
echo "Version Type: ${{ steps.semver.outputs.version_type }}"

package.json

Lines changed: 82 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,84 @@
11
{
2-
"name": "deeploy-dapp",
3-
"private": true,
4-
"type": "module",
5-
"version": "0.1.2",
6-
"scripts": {
7-
"dev": "next dev --turbo --experimental-https",
8-
"dev:logs": "NEXT_DEBUG=1 next dev --turbo --experimental-https",
9-
"build": "next build",
10-
"start": "next start",
11-
"lint": "eslint .",
12-
"add-service": "tsx scripts/add-service.ts",
13-
"validate-services": "tsx scripts/validate-services.ts"
14-
},
15-
"dependencies": {
16-
"@codemirror/autocomplete": "^6.19.0",
17-
"@codemirror/lang-json": "^6.0.2",
18-
"@codemirror/lint": "^6.9.0",
19-
"@heroui/alert": "^2.2.23",
20-
"@heroui/button": "^2.2.23",
21-
"@heroui/checkbox": "^2.3.24",
22-
"@heroui/date-picker": "^2.3.27",
23-
"@heroui/dropdown": "^2.3.23",
24-
"@heroui/form": "^2.1.23",
25-
"@heroui/input": "^2.4.24",
26-
"@heroui/modal": "^2.2.20",
27-
"@heroui/pagination": "^2.2.21",
28-
"@heroui/select": "^2.4.24",
29-
"@heroui/skeleton": "^2.2.15",
30-
"@heroui/slider": "^2.4.20",
31-
"@heroui/spinner": "^2.2.20",
32-
"@heroui/switch": "^2.2.21",
33-
"@heroui/system": "^2.4.22",
34-
"@heroui/tabs": "^2.2.20",
35-
"@heroui/theme": "^2.4.22",
36-
"@hookform/resolvers": "^5.1.1",
37-
"@tanstack/react-query": "^5.80.6",
38-
"@uiw/react-codemirror": "^4.25.2",
39-
"axios": "^1.12.0",
40-
"clsx": "^2.1.1",
41-
"connectkit": "^1.8.2",
42-
"date-fns": "^4.1.0",
43-
"dexie": "^4.0.11",
44-
"dexie-react-hooks": "^1.1.7",
45-
"framer-motion": "^12.23.22",
46-
"lodash": "^4.17.23",
47-
"next": "^16.1.5",
48-
"react": "18.3.1",
49-
"react-dom": "18.3.1",
50-
"react-hook-form": "^7.59.0",
51-
"react-hot-toast": "^2.5.2",
52-
"react-icons": "^5.5.0",
53-
"siwe": "^2.3.2",
54-
"viem": "^2.31.0",
55-
"wagmi": "^2.15.6",
56-
"world-countries": "^5.1.0",
57-
"zod": "^3.25.67"
58-
},
59-
"devDependencies": {
60-
"@eslint/js": "^9.25.0",
61-
"@tailwindcss/postcss": "^4.1.11",
62-
"@types/inquirer": "^9.0.9",
63-
"@types/lodash": "^4.17.17",
64-
"@types/node": "^24.0.0",
65-
"@types/react": "^19.1.2",
66-
"@types/react-dom": "^19.1.2",
67-
"autoprefixer": "^10.4.21",
68-
"eslint": "^9.25.0",
69-
"eslint-plugin-react-hooks": "^5.2.0",
70-
"eslint-plugin-react-refresh": "^0.4.19",
71-
"globals": "^16.0.0",
72-
"inquirer": "^12.10.0",
73-
"postcss": "^8.5.4",
74-
"prettier": "^3.5.3",
75-
"prettier-plugin-tailwindcss": "^0.6.14",
76-
"tailwindcss": "^4.1.11",
77-
"tsx": "^4.20.6",
78-
"typescript": "~5.8.3",
79-
"typescript-eslint": "^8.30.1"
80-
},
81-
"overrides": {
82-
"h3": "1.15.5"
83-
}
2+
"name": "deeploy-dapp",
3+
"private": true,
4+
"type": "module",
5+
"version": "1.1.5",
6+
"scripts": {
7+
"dev": "next dev --turbo --experimental-https",
8+
"dev:logs": "NEXT_DEBUG=1 next dev --turbo --experimental-https",
9+
"build": "next build",
10+
"start": "next start",
11+
"lint": "eslint .",
12+
"add-service": "tsx scripts/add-service.ts",
13+
"validate-services": "tsx scripts/validate-services.ts"
14+
},
15+
"dependencies": {
16+
"@codemirror/autocomplete": "^6.19.0",
17+
"@codemirror/lang-json": "^6.0.2",
18+
"@codemirror/lint": "^6.9.0",
19+
"@heroui/alert": "^2.2.23",
20+
"@heroui/button": "^2.2.23",
21+
"@heroui/checkbox": "^2.3.24",
22+
"@heroui/date-picker": "^2.3.27",
23+
"@heroui/dropdown": "^2.3.23",
24+
"@heroui/form": "^2.1.23",
25+
"@heroui/input": "^2.4.24",
26+
"@heroui/modal": "^2.2.20",
27+
"@heroui/pagination": "^2.2.21",
28+
"@heroui/select": "^2.4.24",
29+
"@heroui/skeleton": "^2.2.15",
30+
"@heroui/slider": "^2.4.20",
31+
"@heroui/spinner": "^2.2.20",
32+
"@heroui/switch": "^2.2.21",
33+
"@heroui/system": "^2.4.22",
34+
"@heroui/tabs": "^2.2.20",
35+
"@heroui/theme": "^2.4.22",
36+
"@hookform/resolvers": "^5.1.1",
37+
"@tanstack/react-query": "^5.80.6",
38+
"@uiw/react-codemirror": "^4.25.2",
39+
"axios": "^1.12.0",
40+
"clsx": "^2.1.1",
41+
"connectkit": "^1.8.2",
42+
"date-fns": "^4.1.0",
43+
"dexie": "^4.0.11",
44+
"dexie-react-hooks": "^1.1.7",
45+
"framer-motion": "^12.23.22",
46+
"lodash": "^4.17.23",
47+
"next": "^16.1.5",
48+
"react": "18.3.1",
49+
"react-dom": "18.3.1",
50+
"react-hook-form": "^7.59.0",
51+
"react-hot-toast": "^2.5.2",
52+
"react-icons": "^5.5.0",
53+
"siwe": "^2.3.2",
54+
"viem": "^2.31.0",
55+
"wagmi": "^2.15.6",
56+
"world-countries": "^5.1.0",
57+
"zod": "^3.25.67"
58+
},
59+
"devDependencies": {
60+
"@eslint/js": "^9.25.0",
61+
"@tailwindcss/postcss": "^4.1.11",
62+
"@types/inquirer": "^9.0.9",
63+
"@types/lodash": "^4.17.17",
64+
"@types/node": "^24.0.0",
65+
"@types/react": "^19.1.2",
66+
"@types/react-dom": "^19.1.2",
67+
"autoprefixer": "^10.4.21",
68+
"eslint": "^9.25.0",
69+
"eslint-plugin-react-hooks": "^5.2.0",
70+
"eslint-plugin-react-refresh": "^0.4.19",
71+
"globals": "^16.0.0",
72+
"inquirer": "^12.10.0",
73+
"postcss": "^8.5.4",
74+
"prettier": "^3.5.3",
75+
"prettier-plugin-tailwindcss": "^0.6.14",
76+
"tailwindcss": "^4.1.11",
77+
"tsx": "^4.20.6",
78+
"typescript": "~5.8.3",
79+
"typescript-eslint": "^8.30.1"
80+
},
81+
"overrides": {
82+
"h3": "1.15.5"
83+
}
8484
}

src/components/create-job/JobFormWrapper.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ function JobFormWrapper({ projectName, draftJobsCount }) {
112112
{
113113
basePluginType: BasePluginType.Native,
114114
pluginSignature: PLUGIN_SIGNATURE_TYPES[0],
115-
...getBaseSchemaTunnelingDefaults(),
115+
enableTunneling: BOOLEAN_TYPES[1],
116+
port: '',
116117
customParams: [],
117118
},
118119
],

src/components/create-job/plugins/NativeInputsSection.tsx

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,38 @@
11
import ConfigSectionTitle from '@components/job/config/ConfigSectionTitle';
2-
import { PLUGIN_SIGNATURE_TYPES } from '@data/pluginSignatureTypes';
2+
import { BOOLEAN_TYPES } from '@data/booleanTypes';
3+
import { CUSTOM_PLUGIN_SIGNATURE, PLUGIN_SIGNATURE_TYPES } from '@data/pluginSignatureTypes';
34
import CustomParametersSection from '@shared/jobs/native/CustomParametersSection';
45
import NativeAppIdentitySection from '@shared/jobs/native/NativeAppIdentitySection';
56
import PortMappingSection from '@shared/PortMappingSection';
7+
import { useEffect } from 'react';
68
import { useFormContext } from 'react-hook-form';
79
import AppParametersSection from '../sections/AppParametersSection';
810

911
export default function NativeInputsSection({ name }: { name: string }) {
10-
const { watch } = useFormContext();
12+
const { watch, setValue, clearErrors } = useFormContext();
1113

1214
const pluginSignature: (typeof PLUGIN_SIGNATURE_TYPES)[number] = watch(`${name}.pluginSignature`);
1315

16+
const isCustomSignature = pluginSignature === CUSTOM_PLUGIN_SIGNATURE;
17+
18+
useEffect(() => {
19+
if (!isCustomSignature) {
20+
setValue(`${name}.enableTunneling`, BOOLEAN_TYPES[1]);
21+
setValue(`${name}.tunnelingToken`, undefined);
22+
clearErrors(`${name}.tunnelingToken`);
23+
}
24+
}, [isCustomSignature, name, setValue, clearErrors]);
25+
1426
return (
1527
<div className="col gap-4">
1628
<NativeAppIdentitySection pluginSignature={pluginSignature} baseName={name} />
1729

1830
<ConfigSectionTitle title="App Parameters" />
19-
<AppParametersSection baseName={name} />
31+
<AppParametersSection
32+
baseName={name}
33+
disableTunneling={!isCustomSignature}
34+
tunnelingDisabledNote="Tunneling is disabled by default for the selected plugin signature."
35+
/>
2036

2137
<ConfigSectionTitle title="Port Mapping" />
2238
<PortMappingSection baseName={name} />

0 commit comments

Comments
 (0)