Skip to content

Commit

Permalink
Initial public commit
Browse files Browse the repository at this point in the history
  • Loading branch information
macalinao committed Dec 12, 2023
0 parents commit e08381c
Show file tree
Hide file tree
Showing 275 changed files with 44,871 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SABER_GH_PACKAGE_REGISTRY_PAT=SET_THIS
SKIP_PREFLIGHT_CHECK=true
SENTRY_PROJECT=saber-interface
SENTRY_ORG=shipcap
7 changes: 7 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
REACT_APP_SENTRY_DSN=https://[email protected]/4506383424094208
REACT_APP_GA_ID=G-2EWZKX9B7S

SENTRY_PROJECT=saber-dapp
SENTRY_ORG=shipcap
SENTRY_REPO=saber-hq/saber-dapp
SKIP_PREFLIGHT_CHECK=true
5 changes: 5 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
watch_file flake.nix
watch_file flake.lock
mkdir -p .direnv
use flake
dotenv
28 changes: 28 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
"use strict";

// Required in Yarn 2 (PNP)
// https://github.com/yarnpkg/berry/issues/8#issuecomment-681069562
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
require("@rushstack/eslint-patch/modern-module-resolution");

module.exports = {
env: {
browser: true,
es2021: true,
node: true,
},
ignorePatterns: ["*.js"],
extends: ["@saberhq/eslint-config-react"],
parserOptions: {
tsconfigRootDir: __dirname,
project: "tsconfig.json",
},
rules: {
"react/react-in-jsx-scope": "off",
"react/no-unescaped-entities": "off",
"react/prop-types": "off",
"@typescript-eslint/no-misused-promises": "off",
"react/no-unknown-property": ["error", { ignore: ["css", "tw"] }],
},
};
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
41 changes: 41 additions & 0 deletions .github/workflows/master-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Deploy Master to Production

on:
push:
branches: [master]

env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
REACT_APP_SENTRY_RELEASE: gh-${{ github.sha }}
SENTRY_RELEASE: gh-${{ github.sha }}
GIT_COMMIT_SHA: ${{ github.sha }}
REACT_APP_SENTRY_ENV: production
SENTRY_ENV: production
REACT_APP_RPC_POOL_DEVNET_TOKEN: 8995c4f8b50b50f556aefc0a8bf4

jobs:
deploy-dist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Yarn Cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- run: yarn install
- name: Build Cache
uses: actions/cache@v3
with:
path: ./node_modules/.cache/
key: ${{ runner.os }}-site-saber-${{ github.sha }}
restore-keys: |
${{ runner.os }}-site-saber-
- run: yarn build:production
29 changes: 29 additions & 0 deletions .github/workflows/saber-interface.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: saber-interface

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
saber-interface:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
- name: Yarn Cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-modules-
- name: Install Yarn dependencies
run: yarn install
- run: yarn typecheck
- run: yarn lint
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

.vercel
.eslintcache

.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*

workers-site/
.env

src/utils/api/data/solana-token-list.json
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.18.2
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.yarn/
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"arcanis.vscode-zipfs",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
]
}
17 changes: 17 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"cSpell.words": ["pubkey", "solana", "saber"],
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
},
"eslint.nodePath": ".yarn/sdks",
"prettier.prettierPath": ".yarn/sdks/prettier/index.cjs",
"typescript.enablePromptUseWorkspaceTsdk": true,
"workbench.colorCustomizations": {
"titleBar.activeBackground": "#5e5bde",
"titleBar.inactiveBackground": "#5e5bde",
"titleBar.activeForeground": "#ffffff",
"titleBar.inactiveForeground": "#ffffff"
}
}
893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/bin/eslint.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/bin/eslint.js
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint/bin/eslint.js your application uses
module.exports = absRequire(`eslint/bin/eslint.js`);
20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/lib/api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint your application uses
module.exports = absRequire(`eslint`);
20 changes: 20 additions & 0 deletions .yarn/sdks/eslint/lib/unsupported-api.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require eslint/use-at-your-own-risk
require(absPnpApiPath).setup();
}
}

// Defer to the real eslint/use-at-your-own-risk your application uses
module.exports = absRequire(`eslint/use-at-your-own-risk`);
14 changes: 14 additions & 0 deletions .yarn/sdks/eslint/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "eslint",
"version": "8.54.0-sdk",
"main": "./lib/api.js",
"type": "commonjs",
"bin": {
"eslint": "./bin/eslint.js"
},
"exports": {
"./package.json": "./package.json",
".": "./lib/api.js",
"./use-at-your-own-risk": "./lib/unsupported-api.js"
}
}
5 changes: 5 additions & 0 deletions .yarn/sdks/integrations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# This file is automatically generated by @yarnpkg/sdks.
# Manual changes might be lost!

integrations:
- vscode
20 changes: 20 additions & 0 deletions .yarn/sdks/prettier/bin/prettier.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier/bin/prettier.cjs
require(absPnpApiPath).setup();
}
}

// Defer to the real prettier/bin/prettier.cjs your application uses
module.exports = absRequire(`prettier/bin/prettier.cjs`);
20 changes: 20 additions & 0 deletions .yarn/sdks/prettier/index.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require prettier
require(absPnpApiPath).setup();
}
}

// Defer to the real prettier your application uses
module.exports = absRequire(`prettier`);
7 changes: 7 additions & 0 deletions .yarn/sdks/prettier/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "prettier",
"version": "3.1.0-sdk",
"main": "./index.cjs",
"type": "commonjs",
"bin": "./bin/prettier.cjs"
}
20 changes: 20 additions & 0 deletions .yarn/sdks/typescript/bin/tsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsc
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/bin/tsc your application uses
module.exports = absRequire(`typescript/bin/tsc`);
20 changes: 20 additions & 0 deletions .yarn/sdks/typescript/bin/tsserver
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env node

const {existsSync} = require(`fs`);
const {createRequire} = require(`module`);
const {resolve} = require(`path`);

const relPnpApiPath = "../../../../.pnp.cjs";

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = createRequire(absPnpApiPath);

if (existsSync(absPnpApiPath)) {
if (!process.versions.pnp) {
// Setup the environment to be able to require typescript/bin/tsserver
require(absPnpApiPath).setup();
}
}

// Defer to the real typescript/bin/tsserver your application uses
module.exports = absRequire(`typescript/bin/tsserver`);
Loading

0 comments on commit e08381c

Please sign in to comment.