webstonehq / webstone-plugins Goto Github PK
View Code? Open in Web Editor NEWStart your next full-stack application with Webstone and configure it as you go.
License: MIT License
Start your next full-stack application with Webstone and configure it as you go.
License: MIT License
A few requirements:
docs
directory at the root of this repo as an entry pointpackages/*
package contains a README.md
which acts as the main docs entry point for a given packagepackages/*
package contains its own docs
directory for additional documentation that does not fit into the package's README.md
packages/cli/docs/commands/*
should be auto-generated and updated with a pre-commit
git hook. One file per command.Blocked by #75
Read https://shift.infinite.red/integration-testing-interactive-clis-93af3cc0d56f
Requirements
pnpm test
at the root tests all packagestest
NPM scriptpre-commit
git hook, only for packages that have changed compared to the main
branchpnpm test
at the root) run as a GitHub Action for each pull requestThis is to ensure every Webstone app comes with a testing framework configured and ready to be extended by developers as they work on their application.
For e2e tests, we'll use Cypress Playwright.
For unit tests, we'll use uvu.
Creating app directory...
Copying template...
Installing web app in test/services/web...
Installing dependencies...
Scope: all 2 workspace projects
(node:3540) TimeoutOverflowWarning: Infinity does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
(Use `node --trace-warnings ...` to show where the warning was created)
(node:3540) TimeoutOverflowWarning: Infinity does not fit into a 32-bit signed integer.
Timeout duration was set to 1.
create-webstone-app
console output when the command completes (use webstone dev
instead of pnpm dev
)Some examples:
ws w c p <name>
=> webstone web create page <name>
ws w d p <name>
=> webstone web delete page <name>
Not all commands need an alias, e.g. deploy
is short enough.
From an initial investigation, it looks like the content of webstone-dev-app/services/web
is either not generated in the prebuild or lost between the prebuild and the workspace startup.
Blocked by architect/architect#1236
Investigate https://github.com/f/omelette
Implement a process to auto-generate changelogs and publish packages to NPM.
We don't want template/node_modules
to be copied, this causes problems for contributors. The filter
we added recently took care of that, but now that the template is ignored as a pnpm workspace package, we no longer need the filter.
Some projects work with npm
, some with yarn
. Some ensure you can use both package managers.
Webstone requires pnpm
and is not tested with any other package manager.
Hence, let's implement https://pnpm.io/only-allow-pnpm and update the documentation accordingly.
Requirements
ws web configure tailwind
)ws --help
Available CLI tools
Blocked by #77
webstone web configure deployment
--preview
flag to run
pnpm build --filter ./services/web
pnpm preview --filter ./services/web
Alright I should have seen that coming, using workspace:*
in the template clearly doesn't work ๐. Let's try with the actual dependency version number and keep the template as part of the pnpm workspace.
Ideally, we get to a point where the CLI dependency for the template is updated automatically when a new release of the CLI happens. Can't be that hard, eh?
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
node
, @types/node
)fs-extra
, @types/fs-extra
)@trpc/client
, @trpc/server
)sinon
, @types/sinon
)These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
@typescript-eslint/eslint-plugin
, @typescript-eslint/parser
)These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
.github/workflows/release.yml
jetpack-io/devbox-install-action v0.5.0
changesets/action v1
package.json
@changesets/cli ^2.26.2
@playwright/test ^1.37.0
@svitejs/changesets-changelog-github-compact ^1.1.0
@types/fs-extra ^11.0.1
@types/node 20.4.10
@types/sinon ^10.0.16
@typescript-eslint/eslint-plugin ^6.2.1
@typescript-eslint/parser ^6.2.1
c8 ^8.0.1
commitizen ^4.3.0
cz-conventional-changelog ^3.3.0
eslint ^8.46.0
eslint-config-prettier ^9.0.0
husky ^8.0.3
lint-staged ^13.2.3
prettier ^3.0.1
sinon ^15.2.0
tsx ^3.12.7
typescript ^5.1.6
uvu ^0.5.6
node >=v20
packages/cli/package.json
@webstone/gluegun ^0.0.5
npm-watch ^0.11.0
node >=v20
packages/core/package.json
tsup ^6.7.0
packages/create-webstone-app/package.json
chalk 5.3.0
create-svelte ^5.0.5
enquirer 2.4.1
fs-extra 11.1.1
ts-deepmerge ^6.2.0
@types/node 20.4.10
tsup ^6.7.0
type-fest ^4.2.0
typescript ^5.1.6
packages/plugin-request-logger/package.json
@playwright/test ^1.37.1
@sveltejs/adapter-auto ^2.1.0
@sveltejs/kit ^1.22.6
@sveltejs/package ^2.2.1
@typescript-eslint/eslint-plugin ^6.4.0
@typescript-eslint/parser ^6.4.0
@webstone/gluegun 0.0.5
eslint ^8.47.0
eslint-config-prettier ^9.0.0
eslint-plugin-svelte ^2.32.4
fs-jetpack ^5.1.0
nodemon ^3.0.1
npm-run-all ^4.1.5
prettier ^3.0.2
prettier-plugin-svelte ^3.0.3
publint ^0.2.1
rimraf ^5.0.1
svelte ^4.2.0
svelte-check ^3.5.0
tslib ^2.6.2
tsup ^7.2.0
typescript ^5.1.6
vite ^4.4.9
vitest ^0.34.2
svelte ^4.0.0
packages/plugin-trpc/cli/package.json
@mrleebo/prisma-ast ^0.4.3
ts-morph ^17.0.1
@webstone/gluegun ^0.0.5
copyfiles ^2.4.1
npm-run-all ^4.1.5
npm-watch ^0.11.0
prettier ^2.8.8
rimraf ^3.0.2
typescript ^4.7.4
packages/plugin-trpc/web/package.json
@trpc/client ^10.37.1
@trpc/server ^10.37.1
zod ^3.21.4
@playwright/test ^1.37.0
@sveltejs/adapter-auto ^2.1.0
@sveltejs/kit ^1.22.5
@sveltejs/package ^2.2.1
@typescript-eslint/eslint-plugin ^6.3.0
@typescript-eslint/parser ^6.3.0
eslint ^8.46.0
eslint-config-prettier ^9.0.0
eslint-plugin-svelte3 ^4.0.0
prettier ^3.0.1
prettier-plugin-svelte ^3.0.3
svelte ^4.1.2
svelte-check ^3.4.6
tslib ^2.6.1
typescript ^5.1.6
vite ^4.4.9
Fixes the broken release workflow for #4 and makes monorepo management easier.
Experiment with a cleaner approach to the tasks defined in .gitpod.yml
Blocked by #87
Before we dive into developing the API, let's define & document its hierarchy. Due to its complexity in later versions, there is likely not a single pattern we can follow.
Requirements
Service commands
Commands specific to a given service (located in services/*
)
Pattern: webstone <service> <action> <arguments>
Examples:
webstone web svelte-add tailwind|mdsvex|auth|payment
webstone web create page about-us
webstone db create model team
webstone db update model team
webstone db delete model team
webstone api create team
Development commands
Commands solely related to development, either for Webstone itself or for a Webstone app
Pattern: webstone dev <category> <action>
Examples:
webstone dev [service]
webstone dev gitpod web-patch-svelte-config-js
webstone dev stats [service]
Deployment commands
Commands needed to deploy a Webstone app
Pattern: webstone deploy [service]
Examples:
webstone deploy
webstone deploy web
<name>
or provide choices to pick from if <name>
is missingChallenge
When the CLI is linked into the webstone-dev-app
project, the link is overwritten when the CLI runs a pnpm add
command.
pnpm link
command in development mode after a pnpm add
pnpm add -w -D ../webstone/packages/cli
insteadRequirements
pnpm test:e2e
for every Gitpod workspacewebstone-dev-app
currently created via CLI in the .gitpod.yml
filecreate-webstone-app
script directlyDue to changesets/changesets#585, the most recent release failed (logs).
Let's use fixed dependency versions until the above PR is merged.
Tasks
@webstone/cli
dependency to the @webstone/core
package@webstone/core
dependency to the web app template package.json
create-webstone-app
init script after the Sveltekit init script completesdev
script to the app template package.json
that starts the web
(and later the api
) services
"dev": "webstone dev"
This is to avoid the GitHub workflow failure as seen in this case.
The svelte-add
project (repo link) is a convenient way to configure various things in SvelteKit apps, e.g. Tailwind CSS, mdsvex
, etc.
The Webstone CLI should provide a command which acts as a thin wrapper around svelte-add
. For example, webstone web configure tailwind
is a wrapper for npx svelte-add@latest tailwindcss
(docs).
Update: Since this is the first CLI command, let's also set us up for success as we add more commands. See best practices docs.
After pnpm changeset
, we also need to run pnpm install
to update the lockfile with the new package versions as documented.
Some of the README.md
files are a bit stale and need an update. It's best to review each one, clean up spelling errors and ensure everything is well documented and explained.
CONTRIBUTING.md
README.md
packages/cli
/README.mdpackages/core/README.md
packages/create-webstone-app/README.md
packages/create-webstone-app/template/README.md
Docs: https://commitizen.github.io/cz-cli/
Notes
git commit
" chapterSee GitHub Actions log.
In this initial version of the Webstone CLI, the focus is:
README.md
@webstone/core
packagewebstone dev
command (which for now starts the web
service)pnpm
and dev
scripts in the services' package.json
file. This may turn out to be confusing or not powerful enough, at which time we can revisit this decision.A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.