Skip to content

Commit c438e05

Browse files
authored
feat: plainstack (#135)
feat: plainstack
1 parent 56fda3b commit c438e05

File tree

197 files changed

+1256
-10216
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

197 files changed

+1256
-10216
lines changed

.dockerignore

-9
This file was deleted.

.github/workflows/ci.yml

+11-99
Original file line numberDiff line numberDiff line change
@@ -8,107 +8,19 @@ on:
88

99
jobs:
1010
check:
11-
runs-on: ubuntu-latest
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, windows-latest]
1215
steps:
1316
- uses: actions/checkout@v4
1417
name: checkout code 📥
15-
- name: install pnpm 📦
16-
uses: pnpm/action-setup@v4
18+
- uses: oven-sh/setup-bun@v2
1719
with:
18-
version: 9.5.0
19-
- name: setup node 🟢
20-
uses: actions/setup-node@v4
21-
with:
22-
node-version: "20.10.0"
23-
cache: "pnpm"
20+
bun-version: 1.1.29
2421
- name: install dependencies 🔧
25-
run: pnpm install
26-
- name: run check ✅
27-
run: pnpm check
28-
env:
29-
SMTP_HOST: localhost
30-
SMTP_USER: test
31-
SMTP_PASS: test
32-
CF_TURNSTILE_SECRET: test
33-
CF_TURNSTILE_SITEKEY: test
34-
ADMIN_PASSWORD: test
35-
DB_URL: ":memory:"
36-
- name: create-plainweb local 🪨
37-
run: ./create-plainweb/dist/cli.js my-plainweb-project --yes --no-git-init --debug --no-install
38-
env:
39-
npm_config_user_agent: ${{ github.actor }}
40-
- name: ensure uses local plainweb (not npm)
41-
run: |
42-
echo " - \"my-plainweb-project\"" >> pnpm-workspace.yaml
43-
sed -i 's/"plainweb": "[^"]*"/"plainweb": "workspace:*"/' my-plainweb-project/package.json
44-
- name: install my-plainweb-project dependencies 🔧
45-
run: |
46-
cd my-plainweb-project
47-
pnpm install --frozen-lockfile=false
48-
- name: run build, test, and check on my-plainweb-project 🚀
49-
run: |
50-
cd my-plainweb-project
51-
pnpm build
52-
pnpm test
53-
pnpm check
54-
pnpm routes
55-
- name: test server for my-plainweb-project 🌐
56-
run: |
57-
cd my-plainweb-project
58-
pnpm serve &
59-
sleep 5 # Wait for the server to start
60-
if curl -s http://localhost:3000 | grep -q "Let's go"; then
61-
echo "Server started successfully and contains 'Let's go'"
62-
else
63-
echo "Server check failed"
64-
exit 1
65-
fi
66-
kill $! # Stop the server
67-
rm -rf node_modules
68-
69-
create-plainweb:
70-
runs-on: ubuntu-latest
71-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
72-
steps:
73-
- name: install pnpm 📦
74-
uses: pnpm/action-setup@v4
75-
with:
76-
version: 9.5.0
77-
- name: create-plainweb 🪨
78-
run: |
79-
pnpm dlx create-plainweb@latest my-plainweb-project --yes --no-git-init --debug
80-
env:
81-
npm_config_user_agent: ${{ github.actor }}
82-
- name: run build, test, and check 🚀
83-
run: |
84-
cd my-plainweb-project
85-
pnpm build
86-
pnpm test
87-
pnpm check
88-
pnpm routes
89-
- name: test server 🌐
90-
run: |
91-
cd my-plainweb-project
92-
pnpm serve &
93-
sleep 5 # Wait for the server to start
94-
if curl -s http://localhost:3000 | grep -q "Let's go"; then
95-
echo "Server started successfully and contains 'Let's go'"
96-
else
97-
echo "Server check failed"
98-
exit 1
99-
fi
100-
kill $! # Stop the server
101-
- uses: superfly/flyctl-actions/setup-flyctl@master
102-
- name: deploy to fly 🚀
103-
run: |
104-
cd my-plainweb-project
105-
sed -i 's/app = '"'"'my-app'"'"'/app = '"'"'plainweb-template'"'"'/' fly.toml
106-
sed -i '/\[http_service\]/,/\[/ s/auto_stop_machines = false/auto_stop_machines = true/' fly.toml
107-
sed -i '/\[http_service\]/,/\[/ s/auto_start_machines = false/auto_start_machines = true/' fly.toml
108-
sed -i '/\[http_service\]/,/\[/ s/min_machines_running = 1/min_machines_running = 0/' fly.toml
109-
cat fly.toml
110-
flyctl deploy --remote-only
111-
env:
112-
FLY_API_TOKEN: ${{ secrets.FLY_PLAINWEB_TEMPLATE_DEPLOY_TOKEN }}
113-
- name: check fly deployment ⬆️
114-
run: curl -s https://plainweb-template.fly.dev | grep -q "Let's go"
22+
run: bun install
23+
- name: build ✅
24+
run: bun run build
25+
- name: test ✅
26+
run: bun test

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ yarn-error.log*
3232
# Misc
3333
.DS_Store
3434
*.pem
35+
36+
data.db*

create-plainweb/CHANGELOG.md renamed to CHANGELOG.md

+63-38
Original file line numberDiff line numberDiff line change
@@ -1,196 +1,221 @@
1-
# create-plainweb
1+
# plainweb
2+
3+
## v0.0.36
4+
5+
[compare changes](https://github.com/joseferben/plainweb/compare/v0.0.35...v0.0.36)
6+
7+
## v0.0.35
8+
9+
[compare changes](https://github.com/joseferben/plainweb/compare/v0.0.34...v0.0.35)
10+
11+
## v0.0.34
12+
13+
[compare changes](https://github.com/joseferben/plainweb/compare/[email protected])
14+
15+
## 0.0.33
16+
17+
### Patch Changes
18+
19+
- fix: don't start server twice
220

321
## 0.0.32
422

523
### Patch Changes
624

7-
- release: plainweb
25+
- wait for http server
826

927
## 0.0.31
1028

1129
### Patch Changes
1230

13-
- fix
31+
- fix serve command
1432

1533
## 0.0.30
1634

1735
### Patch Changes
1836

19-
- fix
37+
- fixing env file loading
2038

2139
## 0.0.29
2240

2341
### Patch Changes
2442

25-
- update
43+
- fix loading of .env.test
2644

2745
## 0.0.28
2846

2947
### Patch Changes
3048

31-
49+
- fix build
50+
- test rollback
3251

3352
## 0.0.27
3453

3554
### Patch Changes
3655

37-
- use latest version
56+
- set NODE_ENV=test
3857

3958
## 0.0.26
4059

4160
### Patch Changes
4261

43-
- use recent plainweb version
62+
- use built-in test runner
4463

4564
## 0.0.25
4665

4766
### Patch Changes
4867

49-
- fix: downgrade esm dependency
68+
- changes
5069

5170
## 0.0.24
5271

5372
### Patch Changes
5473

55-
- fix: downgrade another deps for esm reasons
74+
- fix import
5675

5776
## 0.0.23
5877

5978
### Patch Changes
6079

61-
- fix: downgrade dependency to fix esm issue
80+
- check for os windows
6281

6382
## 0.0.22
6483

6584
### Patch Changes
6685

67-
- fix: downgrade execa to use without esm
86+
- log debug module loading
6887

6988
## 0.0.21
7089

7190
### Patch Changes
7291

73-
- chore: update several dependencies
92+
- be more liberal when validating job name
7493

7594
## 0.0.20
7695

7796
### Patch Changes
7897

79-
- b408ede: fix: default formatting of package.json
98+
- 0d4320d: fix issue with windows filepaths
8099

81100
## 0.0.19
82101

83102
### Patch Changes
84103

85-
- fix: issue where drizzle.config.ts would fail to load
104+
- better error reporting during bootstrap
86105

87106
## 0.0.18
88107

89108
### Patch Changes
90109

91-
- 364ff59: fix: better debugging for used plainweb version
110+
- api revamp
92111

93112
## 0.0.17
94113

95114
### Patch Changes
96115

97-
- - docs: add recipes for sitemap.xml and robots.txt
98-
- docs: add icons
99-
- docs: improve motivation bit
100-
- chore: switch to pnpm
101-
- feat: switch from prettier and eslint to biome
102-
- chore: add knip
103-
- feat: swtich from node test runner to vitest
116+
- initial release plainstack
117+
- Updated dependencies
118+
104119

105120
## 0.0.16
106121

107122
### Patch Changes
108123

109-
- write env file
124+
- fix: remove security middleware
110125

111126
## 0.0.15
112127

113128
### Patch Changes
114129

115-
- smaller fixes
130+
- fix
116131

117132
## 0.0.14
118133

119134
### Patch Changes
120135

121-
- many fixes
136+
- fix test db urk
122137

123138
## 0.0.13
124139

125140
### Patch Changes
126141

127-
- tasks
142+
- smaller fixes regarding deployment
128143

129144
## 0.0.12
130145

131146
### Patch Changes
132147

133-
- add utils for testing
148+
- centralized config architecture
134149

135150
## 0.0.11
136151

137152
### Patch Changes
138153

139-
- fixing routing issue
154+
- - feat: admin dashboard preview
155+
- feat: `pnpm routes` prints all http routes
156+
- feat: prettier/eslint -> biome
157+
- feat: plainweb.dev dark mode
158+
- chore: updating several dependencies
140159

141160
## 0.0.10
142161

143162
### Patch Changes
144163

145-
- fix
164+
- b408ede: fix: default formatting of package.json
146165

147166
## 0.0.9
148167

149168
### Patch Changes
150169

151-
- fixing
170+
- fix: issue where drizzle.config.ts would fail to load
152171

153172
## 0.0.8
154173

155174
### Patch Changes
156175

157-
- fixing
176+
- - docs: add recipes for sitemap.xml and robots.txt
177+
- docs: add icons
178+
- docs: improve motivation bit
179+
- chore: switch to pnpm
180+
- feat: switch from prettier and eslint to biome
181+
- chore: add knip
182+
- feat: swtich from node test runner to vitest
158183

159184
## 0.0.7
160185

161186
### Patch Changes
162187

163-
- fixing
188+
- write env file
164189

165190
## 0.0.6
166191

167192
### Patch Changes
168193

169-
- fixing esm
194+
- smaller fixes
170195

171196
## 0.0.5
172197

173198
### Patch Changes
174199

175-
- fixing
200+
- fix tests
176201

177202
## 0.0.4
178203

179204
### Patch Changes
180205

181-
- fixing
206+
- tasks
182207

183208
## 0.0.3
184209

185210
### Patch Changes
186211

187-
- fix modules issue
212+
- add utils for testing
188213

189214
## 0.0.2
190215

191216
### Patch Changes
192217

193-
- fix shebang
218+
- fixing routing issue
194219

195220
## 0.0.1
196221

0 commit comments

Comments
 (0)