Skip to content

Commit

Permalink
chore: plainstack
Browse files Browse the repository at this point in the history
  • Loading branch information
joseferben committed Oct 4, 2024
1 parent 9238894 commit e6e4932
Show file tree
Hide file tree
Showing 198 changed files with 1,119 additions and 17,690 deletions.
9 changes: 0 additions & 9 deletions .dockerignore

This file was deleted.

86 changes: 5 additions & 81 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ on:

jobs:
check:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
name: checkout code 📥
Expand All @@ -19,7 +22,7 @@ jobs:
- name: setup node 🟢
uses: actions/setup-node@v4
with:
node-version: "20.10.0"
node-version: "22.9.0"
cache: "pnpm"
- name: install dependencies 🔧
run: pnpm install
Expand All @@ -33,82 +36,3 @@ jobs:
CF_TURNSTILE_SITEKEY: test
ADMIN_PASSWORD: test
DB_URL: ":memory:"
- name: create-plainweb local 🪨
run: ./create-plainweb/dist/cli.js my-plainweb-project --yes --no-git-init --debug --no-install
env:
npm_config_user_agent: ${{ github.actor }}
- name: ensure uses local plainweb (not npm)
run: |
echo " - \"my-plainweb-project\"" >> pnpm-workspace.yaml
sed -i 's/"plainweb": "[^"]*"/"plainweb": "workspace:*"/' my-plainweb-project/package.json
- name: install my-plainweb-project dependencies 🔧
run: |
cd my-plainweb-project
pnpm install --frozen-lockfile=false
- name: run build, test, and check on my-plainweb-project 🚀
run: |
cd my-plainweb-project
pnpm build
pnpm test
pnpm check
pnpm routes
- name: test server for my-plainweb-project 🌐
run: |
cd my-plainweb-project
pnpm serve &
sleep 5 # Wait for the server to start
if curl -s http://localhost:3000 | grep -q "Let's go"; then
echo "Server started successfully and contains 'Let's go'"
else
echo "Server check failed"
exit 1
fi
kill $! # Stop the server
rm -rf node_modules
create-plainweb:
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: install pnpm 📦
uses: pnpm/action-setup@v4
with:
version: 9.5.0
- name: create-plainweb 🪨
run: |
pnpm dlx create-plainweb@latest my-plainweb-project --yes --no-git-init --debug
env:
npm_config_user_agent: ${{ github.actor }}
- name: run build, test, and check 🚀
run: |
cd my-plainweb-project
pnpm build
pnpm test
pnpm check
pnpm routes
- name: test server 🌐
run: |
cd my-plainweb-project
pnpm serve &
sleep 5 # Wait for the server to start
if curl -s http://localhost:3000 | grep -q "Let's go"; then
echo "Server started successfully and contains 'Let's go'"
else
echo "Server check failed"
exit 1
fi
kill $! # Stop the server
- uses: superfly/flyctl-actions/setup-flyctl@master
- name: deploy to fly 🚀
run: |
cd my-plainweb-project
sed -i 's/app = '"'"'my-app'"'"'/app = '"'"'plainweb-template'"'"'/' fly.toml
sed -i '/\[http_service\]/,/\[/ s/auto_stop_machines = false/auto_stop_machines = true/' fly.toml
sed -i '/\[http_service\]/,/\[/ s/auto_start_machines = false/auto_start_machines = true/' fly.toml
sed -i '/\[http_service\]/,/\[/ s/min_machines_running = 1/min_machines_running = 0/' fly.toml
cat fly.toml
flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_PLAINWEB_TEMPLATE_DEPLOY_TOKEN }}
- name: check fly deployment ⬆️
run: curl -s https://plainweb-template.fly.dev | grep -q "Let's go"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ yarn-error.log*
# Misc
.DS_Store
*.pem

data.db*
101 changes: 63 additions & 38 deletions create-plainweb/CHANGELOG.md → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,196 +1,221 @@
# create-plainweb
# plainweb

## v0.0.36

[compare changes](https://github.com/joseferben/plainweb/compare/v0.0.35...v0.0.36)

## v0.0.35

[compare changes](https://github.com/joseferben/plainweb/compare/v0.0.34...v0.0.35)

## v0.0.34

[compare changes](https://github.com/joseferben/plainweb/compare/[email protected])

## 0.0.33

### Patch Changes

- fix: don't start server twice

## 0.0.32

### Patch Changes

- release: plainweb
- wait for http server

## 0.0.31

### Patch Changes

- fix
- fix serve command

## 0.0.30

### Patch Changes

- fix
- fixing env file loading

## 0.0.29

### Patch Changes

- update
- fix loading of .env.test

## 0.0.28

### Patch Changes

- use [email protected]
- fix build
- test rollback

## 0.0.27

### Patch Changes

- use latest version
- set NODE_ENV=test

## 0.0.26

### Patch Changes

- use recent plainweb version
- use built-in test runner

## 0.0.25

### Patch Changes

- fix: downgrade esm dependency
- changes

## 0.0.24

### Patch Changes

- fix: downgrade another deps for esm reasons
- fix import

## 0.0.23

### Patch Changes

- fix: downgrade dependency to fix esm issue
- check for os windows

## 0.0.22

### Patch Changes

- fix: downgrade execa to use without esm
- log debug module loading

## 0.0.21

### Patch Changes

- chore: update several dependencies
- be more liberal when validating job name

## 0.0.20

### Patch Changes

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

## 0.0.19

### Patch Changes

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

## 0.0.18

### Patch Changes

- 364ff59: fix: better debugging for used plainweb version
- api revamp

## 0.0.17

### Patch Changes

- - docs: add recipes for sitemap.xml and robots.txt
- docs: add icons
- docs: improve motivation bit
- chore: switch to pnpm
- feat: switch from prettier and eslint to biome
- chore: add knip
- feat: swtich from node test runner to vitest
- initial release plainstack
- Updated dependencies
- [email protected]

## 0.0.16

### Patch Changes

- write env file
- fix: remove security middleware

## 0.0.15

### Patch Changes

- smaller fixes
- fix

## 0.0.14

### Patch Changes

- many fixes
- fix test db urk

## 0.0.13

### Patch Changes

- tasks
- smaller fixes regarding deployment

## 0.0.12

### Patch Changes

- add utils for testing
- centralized config architecture

## 0.0.11

### Patch Changes

- fixing routing issue
- - feat: admin dashboard preview
- feat: `pnpm routes` prints all http routes
- feat: prettier/eslint -> biome
- feat: plainweb.dev dark mode
- chore: updating several dependencies

## 0.0.10

### Patch Changes

- fix
- b408ede: fix: default formatting of package.json

## 0.0.9

### Patch Changes

- fixing
- fix: issue where drizzle.config.ts would fail to load

## 0.0.8

### Patch Changes

- fixing
- - docs: add recipes for sitemap.xml and robots.txt
- docs: add icons
- docs: improve motivation bit
- chore: switch to pnpm
- feat: switch from prettier and eslint to biome
- chore: add knip
- feat: swtich from node test runner to vitest

## 0.0.7

### Patch Changes

- fixing
- write env file

## 0.0.6

### Patch Changes

- fixing esm
- smaller fixes

## 0.0.5

### Patch Changes

- fixing
- fix tests

## 0.0.4

### Patch Changes

- fixing
- tasks

## 0.0.3

### Patch Changes

- fix modules issue
- add utils for testing

## 0.0.2

### Patch Changes

- fix shebang
- fixing routing issue

## 0.0.1

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# plainweb
# plainstack

The all-in-one web framework obsessing about velocity 🏎️.

## Getting Started

`npx create-plainweb`
`npm create plainstack`

## Documentation

[https://www.plainweb.dev/docs/getting-started](https://www.plainweb.dev/docs/getting-started)
[https://www.plainstack.dev/docs/getting-started](https://www.plainstack.dev/docs/getting-started)
Loading

0 comments on commit e6e4932

Please sign in to comment.