Skip to content

Commit

Permalink
Merge pull request #9 from fresh-app/2024
Browse files Browse the repository at this point in the history
2024
  • Loading branch information
dtinth authored Jan 31, 2024
2 parents 4f62734 + 79a1847 commit 7cbb512
Show file tree
Hide file tree
Showing 260 changed files with 2,090 additions and 1,049 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/factory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
- fresh-playwright-project
- fresh-react-app-typescript
- fresh-react-app
- fresh-remix-app-vercel
- fresh-remix-app
- fresh-solid-app-ts
- fresh-sveltekit-app-typescript
Expand All @@ -45,28 +44,30 @@ jobs:
- fresh-vitepress-site
- fresh-vscode-extension
- fresh-vscode-web-extension
- fresh-yarn-pnp-project

# Removed from the factory on 2024-01-31 due Remix no longer has a special Vercel config in their setup wizard.
# - fresh-remix-app-vercel

# Removed from the factory on 2024-01-31 due to lack of maintenance from my side (I have since switched to using pnpm).
# - fresh-yarn-pnp-project

# Removed from the factory on 2023-03-19 because the generator script fails very often.
# - fresh-redwood-app-typescript
# - fresh-redwood-app

# Removed from the factory on 2021-03-19 because the generator script fails on
# recent Node.js versions and the generator is not maintained anymore
# (no updates since 2020-10-13).
# Removed from the factory on 2021-03-19 because the generator script fails on recent Node.js versions and the generator is not maintained anymore (no updates since 2020-10-13).
# See: https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported)
# - fresh-tsdx-lib
# - fresh-tsdx-react-component-with-storybook
# - fresh-tsdx-react-component

# Removed from the factory on 2021-03-19 because the generator script does not
# support Node.js v18.
# Removed from the factory on 2021-03-19 because the generator script does not support Node.js v18.
# See: https://github.com/microsoft/rushstack/issues/4017
# - fresh-rush-monorepo
env:
BUILD_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v1
- uses: docker/build-push-action@v2
with:
Expand All @@ -82,21 +83,22 @@ jobs:
TOKEN="$(npx obtain-github-app-installation-access-token ci ${{ secrets.GH_APP_CREDENTIALS_TOKEN }})"
echo "::add-mask::$TOKEN"
echo "::set-output name=token::$TOKEN"
- uses: actions/setup-node@v1
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: 16.x
- run: yarn
cache: 'pnpm'
node-version: '20'
- run: pnpm install
- run: bin/run ${{ matrix.generator }}
- run: yarn node provision ${{ matrix.generator }}
- run: node provision ${{ matrix.generator }}
if: '!inputs.dry-run'
env:
GH_PUSH_TOKEN: ${{ steps.githubAppAuth.outputs.token }}
- run: bash sync.sh
if: '!inputs.dry-run'
env:
GH_PUSH_TOKEN: ${{ steps.githubAppAuth.outputs.token }}
- run: yarn factory upload-result
- run: pnpm factory upload-result
if: '!inputs.dry-run'
env:
GH_PUSH_TOKEN: ${{ steps.githubAppAuth.outputs.token }}
12 changes: 7 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ jobs:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: 16.x
- uses: actions/checkout@v2
- run: yarn
- run: yarn tsc
cache: 'pnpm'
node-version: '20'
- run: pnpm install
- run: pnpm tsc
12 changes: 7 additions & 5 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,22 @@ jobs:
echo "::add-mask::$TOKEN"
echo "::set-output name=token::$TOKEN"
- uses: actions/setup-node@v1
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: 16.x
- run: yarn
cache: 'pnpm'
node-version: '20'
- run: pnpm install
- run: bin/run ${{ github.event.inputs.generator }}
- run: yarn node provision ${{ github.event.inputs.generator }}
- run: node provision ${{ github.event.inputs.generator }}
if: '!inputs.dry-run'
env:
GH_PUSH_TOKEN: ${{ steps.githubAppAuth.outputs.token }}
- run: bash sync.sh
if: '!inputs.dry-run'
env:
GH_PUSH_TOKEN: ${{ steps.githubAppAuth.outputs.token }}
- run: yarn factory upload-result
- run: pnpm factory upload-result
if: '!inputs.dry-run'
env:
GH_PUSH_TOKEN: ${{ steps.githubAppAuth.outputs.token }}
12 changes: 7 additions & 5 deletions .github/workflows/tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,13 @@ jobs:
name: Ensure codebase is tidy
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v1
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v4
with:
node-version: 16.x
- uses: actions/checkout@v2
- run: yarn
- run: yarn prettier --write .
cache: 'pnpm'
node-version: '20'
- run: pnpm install
- run: pnpm prettier --write .
- run: git add --update
- uses: dtinth/patch-generator-action@main
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/.pnp.cjs
/.yarn/
/.yarn/
pnpm-lock.yaml
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
nodejs 16.19.0
nodejs 20.11.0
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/depd-npm-1.1.2-b0c8414da7-6b406620d2.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/glob-npm-7.1.6-1ce3a5189a-351d549dd9.zip
Binary file not shown.
Binary file removed .yarn/cache/glob-npm-7.1.7-5698ad9c48-b61f48973b.zip
Binary file not shown.
Binary file removed .yarn/cache/glob-npm-7.2.3-2d866d17a5-29452e97b3.zip
Binary file not shown.
Binary file removed .yarn/cache/glob-npm-8.0.3-750f909025-50bcdea19d.zip
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/has-npm-1.0.3-b7f00631c1-b9ad53d53b.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ip-npm-2.0.0-204facb3cc-cfcfac6b87.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/jwa-npm-1.4.1-4f19d6572c-ff30ea7c2d.zip
Binary file not shown.
Binary file removed .yarn/cache/jws-npm-3.2.2-c1ae59c7af-f0213fe5b7.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/ms-npm-2.1.2-ec0c1512ff-673cdb2c31.zip
Binary file not shown.
Binary file removed .yarn/cache/ms-npm-2.1.3-81ff3cfac1-aa92de6080.zip
Binary file not shown.
Binary file removed .yarn/cache/nan-npm-2.17.0-bf36a21d6f-ec609aeaf7.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/nopt-npm-5.0.0-304b40fbfe-d35fdec187.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/once-npm-1.4.0-ccf03ef07a-cd0a885013.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/resolve-patch-b4a69197d3-a0dd7d16a8.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/tr46-npm-0.0.3-de53018915-726321c5ea.zip
Binary file not shown.
Binary file removed .yarn/cache/tsx-npm-3.9.0-c7f787cde9-871dd3f8f1.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
783 changes: 0 additions & 783 deletions .yarn/releases/yarn-3.2.3.cjs

This file was deleted.

2 changes: 0 additions & 2 deletions .yarnrc.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ This project aims to make it easier for developers to get started with new app f

### Prerequisites

- Node.js and Yarn
- Node.js and Corepack
- Docker

### Setup

```sh
# Install dependencies
yarn
pnpm install

# Build docker image
bin/build
Expand Down
1 change: 1 addition & 0 deletions bin/build
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/bash -e
docker build -t factory-runner runner
docker build -t factory-screenshotter screenshotter
2 changes: 1 addition & 1 deletion bin/run
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash -e
yarn factory run -g "$1"
pnpm factory run -g "$1"
1 change: 1 addition & 0 deletions bin/runner
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ exec docker run \
-v "$PWD:/opt/factory:ro" \
-ti \
--ipc=host \
--network=host \
--hostname=factory \
--tmpfs=/tmp \
factory-runner \
Expand Down
3 changes: 2 additions & 1 deletion bin/screenshot
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ if [ ! -d "/ms-playwright/" ]; then
fi

set -x
start-test "$1" :"$2" "cd /workspace && (playwright screenshot --viewport-size=1280,720 http://localhost:$2 /workspace/screenshot.png; playwright screenshot --viewport-size=1280,720 --wait-for-timeout=4096 http://localhost:$2 /workspace/screenshot.png)"
playwright screenshot --viewport-size=1280,720 "$1" /workspace/screenshot.png
playwright screenshot --viewport-size=1280,720 --wait-for-timeout=4096 "$1" /workspace/screenshot.png
12 changes: 12 additions & 0 deletions bin/screenshotter
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash -e
docker rm -f factory-screenshotter-instance >/dev/null 2>&1
exec docker run \
--name=factory-screenshotter-instance \
-v "$PWD:/opt/factory:ro" \
-ti \
--ipc=host \
--network=host \
--hostname=factory \
--tmpfs=/tmp \
factory-screenshotter \
"$@"
2 changes: 1 addition & 1 deletion hacktoberfest.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { execSync } from 'child_process'

const list = execSync('yarn factory list --json').toString()
const list = execSync('pnpm factory list --json').toString()
let n = 0
const task = (text) => {
const id = ++n
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,18 @@
"shelljs": "^0.8.5",
"tsx": "^3.9.0",
"typescript": "^4.8.4",
"wait-on": "^7.2.0",
"xterm-addon-serialize": "^0.8.0",
"xterm-headless": "^5.0.0"
},
"scripts": {
"factory": "tsx src/main.ts"
},
"packageManager": "[email protected]",
"engines": {
"node": "16.x"
"node": "20.x"
},
"packageManager": "[email protected]+sha256.245fe901f8e7fa8782d7f17d32b6a83995e2ae03984cb5b62b8949bfdc27c7b5",
"devDependencies": {
"@types/wait-on": "^5.3.4"
}
}
Loading

0 comments on commit 7cbb512

Please sign in to comment.