diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 00000000..e5b6d8d6 --- /dev/null +++ b/.changeset/README.md @@ -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) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 00000000..d2823612 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", + "changelog": ["@changesets/changelog-github", { "repo": "gabrielhicks/solv" }], + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.eslintignore b/.eslintignore index 73780038..aae21986 100755 --- a/.eslintignore +++ b/.eslintignore @@ -2,6 +2,4 @@ out dist build -src/__generated__ -src/schema.graphql -src/cli/login/login.ts \ No newline at end of file +.eslintrc.js \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100755 index 00000000..cf6334e3 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,45 @@ +// This configuration only applies to the package manager root. +/** @type {import("eslint").Linter.Config} */ +module.exports = { + ignorePatterns: [ + 'apps/**', + 'packages/**', + 'node_modules/**', + 'dist/**', + 'build.ts', + 'devBuild.ts', + ], + extends: [ + 'eslint:recommended', + 'plugin:@typescript-eslint/recommended', + 'prettier', + ], + parserOptions: { + project: './tsconfig.json', + ecmaVersion: 'latest', + sourceType: 'module', + }, + parser: '@typescript-eslint/parser', + plugins: ['@typescript-eslint'], + env: { + es6: true, + }, + rules: { + '@typescript-eslint/no-explicit-any': 0, + '@typescript-eslint/no-var-requires': 0, + '@typescript-eslint/no-unused-vars': 0, + '@typescript-eslint/no-empty-function': 0, + '@typescript-eslint/ban-ts-comment': [ + 'off', + { + 'ts-ignore': 'allow-with-description', + }, + ], + 'import/no-unresolved': ['error', { ignore: ['cloudflare:workers'] }], + 'no-useless-escape': 'off', + 'no-useless-catch': 'off', + '@typescript-eslint/no-namespace': 'off', + 'no-empty': 'off', + 'no-case-declarations': 'off', + }, +} diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100755 index aee23594..00000000 --- a/.eslintrc.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "prettier" - ], - "parserOptions": { - "ecmaVersion": "latest", - "sourceType": "module" - }, - "parser": "@typescript-eslint/parser", - "plugins": ["@typescript-eslint"], - "env": { - "es6": true - }, - "rules": { - "@typescript-eslint/no-unused-vars": 0, - "@typescript-eslint/ban-ts-comment": [ - "off", - { - "ts-ignore": "allow-with-description" - } - ], - "no-unused-vars": ["error", { "argsIgnorePattern": "^_" }] - } -} diff --git a/.github/workflows/solv-cli-release.yml b/.github/workflows/solv-cli-release.yml new file mode 100644 index 00000000..74a2e3dd --- /dev/null +++ b/.github/workflows/solv-cli-release.yml @@ -0,0 +1,65 @@ +name: SolvCliRelease + +on: + push: + branches: [main] + paths: + - 'packages/solv/**' + - '.github/workflows/solv-cli-release.yml' + +jobs: + build: + runs-on: self-hosted + strategy: + matrix: + node-version: [20] + + steps: + - name: checkout code repository + uses: actions/checkout@v4 + - uses: pnpm/action-setup@v4 + with: + version: 9.3.0 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'pnpm' + + - name: Install dependencies + run: pnpm install + + - name: Build and Add Line + run: npx turbo -F @gabrielhicks/solv build + + - name: Creating .npmrc + run: | + cat << EOF > "$HOME/.npmrc" + //registry.npmjs.org/:_authToken=$NPM_TOKEN + EOF + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: create and publish versions + id: changesets + uses: changesets/action@v1 + with: + version: pnpm ci:version + publish: pnpm ci:publish + title: 'solv new release' + commit: 'solv new release' + createGithubReleases: true + + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Send a Discord/X Notification if a publish happens + if: steps.changesets.outputs.published == 'true' + run: | + pnpm discord:epics + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} + DISCORD_CHANNEL_ID: ${{ secrets.DISCORD_CHANNEL_ID }} + DISCORD_CHANNEL_ID_JA: ${{ secrets.DISCORD_CHANNEL_ID_JA }} diff --git a/.github/workflows/solv-epics-dev.yml b/.github/workflows/solv-epics-dev.yml new file mode 100644 index 00000000..9ed24d58 --- /dev/null +++ b/.github/workflows/solv-epics-dev.yml @@ -0,0 +1,44 @@ +# name: SolvEpicsDev + +# on: +# push: +# branches: ['main'] +# paths: +# - 'website/solv-epics-dev/**' +# - '.github/workflows/solv-epics-dev.yml' + +# jobs: +# build: +# name: Build and Deploy +# timeout-minutes: 60 +# runs-on: ubuntu-latest + +# steps: +# - name: Check out code +# uses: actions/checkout@v4 +# with: +# fetch-depth: 2 + +# - uses: pnpm/action-setup@v3 +# with: +# version: 9 + +# - name: Setup Node.js environment +# uses: actions/setup-node@v4 +# with: +# node-version: 20 +# cache: 'pnpm' + +# - name: Install dependencies +# run: pnpm install + +# - name: Create .env.local file +# run: | +# echo "NEXT_PUBLIC_SOLANA_ENDPOINT=${{ secrets.NEXT_PUBLIC_SOLANA_ENDPOINT }}" > website/solv-epics-dev/.env.local +# echo "NEXT_PUBLIC_SOLANA_PRICE_ENDPOINT=${{ secrets.NEXT_PUBLIC_SOLANA_PRICE_ENDPOINT }}" >> website/solv-epics-dev/.env.local + +# - name: Deploy to Cloudflare +# run: pnpm run -F solv-epics-dev deploy +# env: +# CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN_FOR_DOC }} +# CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID_FOR_DOC }} diff --git a/.github/workflows/solve.yml b/.github/workflows/solve.yml deleted file mode 100644 index 7db9acaf..00000000 --- a/.github/workflows/solve.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: EpicsDAOSolv - -on: - push: - branches: [main] - pull_request: - branches: [main] - -jobs: - build: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [18.x] - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - - run: npm i -g yarn - - run: yarn install - - run: yarn test diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 index 3e4674a8..410e570f --- a/.gitignore +++ b/.gitignore @@ -4,9 +4,12 @@ /node_modules /.pnp .pnp.js +.pnp* +.yarn # testing /coverage +/coverage_dir # next.js /.next/ @@ -46,7 +49,8 @@ firebase-debug.log /apps/ keyfile.json /functions/ -graphql/ -/release/ - -solv-debian/debian/files \ No newline at end of file +tmp +/sql/ +dist +.turbo +node_modules \ No newline at end of file diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 00000000..68716f5c --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,2 @@ +pnpm install +npx turbo build -F @gabrielhicks/solv diff --git a/.nodeversion b/.nodeversion deleted file mode 100644 index 3c79f30e..00000000 --- a/.nodeversion +++ /dev/null @@ -1 +0,0 @@ -18.16.0 \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index 43c5ccae..3e2c75a9 100755 --- a/.prettierignore +++ b/.prettierignore @@ -1,6 +1,4 @@ .next out dist -build -src/__generated__ -src/schema.graphql \ No newline at end of file +build \ No newline at end of file diff --git a/InRelease b/InRelease deleted file mode 100644 index a40a88bc..00000000 --- a/InRelease +++ /dev/null @@ -1,26 +0,0 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA512 - -Date: Wed, 16 Aug 2023 14:09:21 +0000 -MD5Sum: - 48aaff5cfcbe636b91ed448ed8fa2ac1 38 Release -SHA1: - 63cfbac7020600a4c18e613957960739120c959d 38 Release -SHA256: - 36631926c706bf84e9cf321d792694ffa0ead7f0395726f895e408081bb07e5b 38 Release -SHA512: - f28251da9408f18e83e79b77893e79381b8e4651fb7396c96dcde69d037bf7024cecf98dd9835f8402c6e368ac92eeca2b78b60bcc3ad0fefb428cd2229cc45a 38 Release ------BEGIN PGP SIGNATURE----- - -iQGzBAEBCgAdFiEEmc72up9jOUK9hDj92kHJnU2w0wQFAmTc2KEACgkQ2kHJnU2w -0wSP5gv+Jn/aYa1HDw6l54/wRHFKoIyXSNDkrjVDaOFGH+QLivzTC/a3zfTZ76Pv -Xz7HPbGNZAnOU7WvYZkteIkeObY6Pg0Gl8QauHqbweUN3fk1PC14vXcLTugsIplS -7632ZS0ANCRGVNySBRWiMf1RHM7AaTmWoZHb0HWiCag3qsfp+McbfYtZqw3aSIWK -nyOWoU1Dl1Y+eP+tjvxXzmYi4j1pImeQlyfeJVUMXkvT3/2WPCBHsQNmYUxmy68R -ER5IZEa4Y2jufHcqmM0/+2Fc5rIohKBrT+zrQhA/LAYHrolQfC3YBtB67em61nhZ -flvFH/BJjY/1YhkNlcximfbp+I3sEP/9a/bCs5bxw1ZZvtUCZJJHlb71LxgWodky -nLHsDH+jD62f/ZXo0liJURKGyh1imk1g51owgXrn1yCFNp983Cy28zPYuhIHGX+p -i25ApzIxSaUzBcez2T5XOLeFirjFwgEM44iQFFK5bgTr8fmpil68kaMuIVt9CpcT -VAe5Gn1Q -=YChd ------END PGP SIGNATURE----- diff --git a/README.md b/README.md index d984f79d..4f3cb179 100755 --- a/README.md +++ b/README.md @@ -1,197 +1,161 @@
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
+
-
+
{m[q]--,m[q]<1&&delete m[q]})})}function t(v){let m=0;return v.forEach(function(_){_.forEach(function(w){m=Math.max(m,w.x+(w.colSpan||1))})}),m}function a(v){return v.length}function i(v,m){let _=v.y,w=v.y-1+(v.rowSpan||1),D=m.y,q=m.y-1+(m.rowSpan||1),O=!(_>q||D>w),P=v.x,I=v.x-1+(v.colSpan||1),R=m.x,A=m.x-1+(m.colSpan||1),dr=!(P>A||R>I);return O&&dr}function n(v,m,_){let w=Math.min(v.length-1,_),D={x:m,y:_};for(let q=0;q<=w;q++){let O=v[q];for(let P=0;P