Skip to content

Commit

Permalink
feat(os): initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Rubilmax committed Jul 16, 2024
0 parents commit a5ea9ba
Show file tree
Hide file tree
Showing 126 changed files with 19,853 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
// Root leverages the cascading feature of ESLint.
// Children can still overrides settings.
// https://eslint.org/docs/latest/user-guide/configuring/configuration-files#cascading-and-hierarchy
"root": true,

// Common config shared accross all children projects.
"parser": "@typescript-eslint/parser",
"extends": ["plugin:prettier/recommended"],
"plugins": ["@typescript-eslint", "unused-imports", "address"],
"rules": {
"no-console": "error",
"unused-imports/no-unused-imports": "error",
"no-unused-vars": [
"error",
{
"vars": "all",
"args": "after-used",
"ignoreRestSiblings": true
}
],
"address/addr-type": ["error", "checksum"]
},
"ignorePatterns": ["out", ".next", "dist", "cache", "lib", "storybook-*"]
}
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint code

on:
push:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version-file: .nvmrc
cache: yarn

- run: yarn install --immutable

- run: yarn lint
23 changes: 23 additions & 0 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish on NPM

on:
workflow_dispatch:

jobs:
publish-to-npm:
name: Publish to NPM
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version-file: .nvmrc
cache: yarn

- run: yarn install --immutable

- run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
yarn run publish --y
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build & test packages

on:
push:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
jest:
strategy:
fail-fast: false
matrix:
package:
- "@morpho-org/morpho-ts"
- "@morpho-org/morpho-test"
- "@morpho-org/blue-sdk"
- "@morpho-org/blue-sdk-ethers"

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version-file: .nvmrc
cache: yarn

- run: yarn install --immutable

- run: yarn workspace ${{ matrix.package }} build

- run: yarn workspace ${{ matrix.package }} test --passWithNoTests
74 changes: 74 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# IDE
.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# dependencies
node_modules

# testing
coverage
.nyc_output
.mp4

# production
build
artifacts
dist
packages/**/lib
sdks/**/lib
services/**/lib
services/**/.esbuild
services/**/.serverless

# misc
.DS_Store
*.env*
!*.env.example*
!*.env.test
*.pem
stats-*.json
**/disk-store


# debug
cache
*.log*
*.tsbuildinfo

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


# auto generated files
manifest.json
!**/public/manifest.json

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Local
local_*

# Cypress
**/cypress/videos
**/cypress/screenshots

# Local Netlify folder
.netlify
10 changes: 10 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

STAGED_TS_FILES=$(git diff --staged --name-only --diff-filter=d | grep '\.tsx\?$' | xargs)

if [ -n "$STAGED_TS_FILES" ]; then
# yarn eslint --fix $STAGED_TS_FILES
yarn prettier --write $STAGED_TS_FILES
git add $STAGED_TS_FILES
fi
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
20.11.0
92 changes: 92 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# IDE
.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# dependencies
node_modules

# testing
coverage
.nyc_output
.mp4

# production
build
dist
packages/**/lib
sdks/**/lib
services/**/lib
services/**/.esbuild
services/**/.serverless

# misc
.DS_Store
*.env*
!*.env.example*
!*.env.test
*.pem
stats-*.json
**/disk-store


# debug
cache
*.log*
*.tsbuildinfo

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


# auto generated files
manifest.json
!**/public/manifest.json

# Logs
logs
*.log
npm-debug.log*
pnpm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Local
local_*

# Cypress
**/cypress/videos
**/cypress/screenshots

# Local Netlify folder
.netlify

# next.js
.next
out



# Ignore artifacts
**/.next
**/out
**/deployments
**/generated

.json
**/.yarn

*.hbs
artifacts
typechain-types
15 changes: 15 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
embeddedLanguageFormatting: "off",
importOrder: [
"^react.*",
"^(?![@\\.]).*",
"^@(?!morpho|/).*",
"^@morpho.*",
"^@",
"^\\.\\.",
"^\\.",
],
importOrderSeparation: true,
importOrderParserPlugins: ["typescript", "decorators-legacy"],
plugins: [require("@trivago/prettier-plugin-sort-imports")],
};
894 changes: 894 additions & 0 deletions .yarn/releases/yarn-4.3.1.cjs

Large diffs are not rendered by default.

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

const {existsSync} = require(`fs`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

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

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

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

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

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

const {existsSync} = require(`fs`);
const {createRequire, register} = require(`module`);
const {resolve} = require(`path`);
const {pathToFileURL} = require(`url`);

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

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

const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`);
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath);

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

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

0 comments on commit a5ea9ba

Please sign in to comment.