add changesets

This commit is contained in:
hzrd149 2024-09-25 10:41:13 -05:00
parent a02f16a86f
commit 9805492eeb
8 changed files with 3469 additions and 2909 deletions

8
.changeset/README.md Normal file
View File

@ -0,0 +1,8 @@
# Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

11
.changeset/config.json Normal file
View File

@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}

56
.github/workflows/page.yml vendored Normal file
View File

@ -0,0 +1,56 @@
name: GitHub Pages
on:
# Runs on pushes targeting the default branch
push:
tags:
- v*.*.*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Build
run: pnpm run docs
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: "./docs"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

View File

@ -0,0 +1,47 @@
name: Release
on:
push:
branches:
- master
concurrency: ${{ github.workflow }}-${{ github.ref }}
permissions:
contents: write
issues: write
pull-requests: write
packages: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
outputs:
published: ${{ steps.changesets.outputs.published }}
publishedPackages: ${{ steps.changesets.outputs.publishedPackages }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install Dependencies
run: pnpm install
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm publish --no-git-checks
env:
HOME: ${{ github.workspace }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

View File

@ -7,25 +7,22 @@
"author": "hzrd149",
"license": "MIT",
"scripts": {
"prepack": "yarn build",
"start": "node build/index.js",
"build": "tsc",
"postbuild": "cd admin && yarn build",
"dev": "nodemon -i '**/data/**' --exec 'node' --loader @swc-node/register/esm src/index.ts",
"format": "prettier -w ."
},
"bin": "build/index.js",
"files": [
"build",
"public",
"admin/dist"
"public"
],
"dependencies": {
"@keyv/sqlite": "^4.0.1",
"@koa/cors": "^5.0.0",
"@koa/router": "^12.0.1",
"@nostr-dev-kit/ndk": "^2.10.0",
"blossom-client-sdk": "^1.1.0",
"blossom-client-sdk": "^1.1.1",
"debug": "^4.3.5",
"dotenv": "^16.4.5",
"follow-redirects": "^1.15.6",
@ -43,7 +40,7 @@
"xbytes": "^1.9.1"
},
"devDependencies": {
"@changesets/cli": "^2.27.1",
"@changesets/cli": "^2.27.8",
"@swc-node/register": "^1.9.0",
"@swc/core": "^1.5.0",
"@types/better-sqlite3": "^7.6.9",

3343
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -63,7 +63,7 @@ export async function downloadSite(pubkey: string) {
try {
const res = await downloadFile(sha256, servers);
console.log(`Downloading ${pubkey}${path}`);
console.log(`Downloading ${join(pubkey, path)}`);
res.pipe(fs.createWriteStream(join("data/sites", pubkey, path)));
await files.set(join(pubkey, path), sha256);

2902
yarn.lock

File diff suppressed because it is too large Load Diff