Skip to content

Commit

Permalink
chore: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler authored and dtfiedler committed Jul 27, 2023
0 parents commit 3cf0cb7
Show file tree
Hide file tree
Showing 120 changed files with 19,644 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/charts
**/docker-compose*
**/compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
README.md
CODEOWNERS
8 changes: 8 additions & 0 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
STRIPE_WEBHOOK_SECRET=
STRIPE_SECRET_KEY=
NODE_ENV=
DISABLE_LOGS=
DB_HOST=
DB_PORT=
DB_PASSWORD=
PORT=
17 changes: 17 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"rules": {
"no-console": 1,
"no-unused-vars": "off",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-misused-promises": "error",
"@typescript-eslint/no-unused-vars": ["error"]
},
"ignorePatterns": ["lib/*", ".vscode/*", "bundle-jobs.cjs", "migrations/*"]
}
64 changes: 64 additions & 0 deletions .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Node.js CI

on: [push]
jobs:
node_version:
runs-on: ubuntu-latest
outputs:
NODE_VERSION: ${{ steps.node_version.outputs.NODE_VERSION }}
steps:
- uses: actions/checkout@v3
- name: Read .nvmrc
id: node_version
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc |cut -c2-8)

build:
needs: [node_version]
runs-on: ubuntu-latest
strategy:
matrix:
step: ["lint:check", "format:check", "build", "test:docker"]
steps:
- uses: actions/checkout@v3
- name: Read .nvmrc
id: node_version
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc |cut -c2-8)

- name: Use Node.js ${{ needs.node_version.outputs.NODE_VERSION }}
uses: actions/setup-node@v3
with:
node-version: ${{ needs.node_version.outputs.NODE_VERSION }}

# Build Typescript
- run: |
yarn
yarn ${{ matrix.step }}
push:
needs: [node_version, build]
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
checks: write
packages: write
steps:
- uses: actions/checkout@v3
# Build and push container image to GCR (only on main branch)
- name: Log in to the GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push container image to GitHub Container Registry
uses: docker/build-push-action@v4
with:
push: true
build-args: |
NODE_VERSION=${{ needs.node_version.outputs.NODE_VERSION }}
tags: |
ghcr.io/ardriveapp/${{ github.event.repository.name }}:latest
ghcr.io/ardriveapp/${{ github.event.repository.name }}:${{ github.sha }}
26 changes: 26 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Coverage and nyc_output directories used by tools like istanbul
coverage
.nyc_output
node_modules

.husky/_
.eslintcache

# Build folder
/lib

# OSX
.DS_Store

#Yarn
#https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

.env

5 changes: 5 additions & 0 deletions .lintstagedrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## To explicitly exclude folders
## !(folderA|folderB)
./**/*.ts:
- prettier --write
- eslint --cache --fix
11 changes: 11 additions & 0 deletions .mocharc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
"use-strict";

// Mocha configuration file
// Reference for options: https://github.com/mochajs/mocha/blob/master/example/config/.mocharc.js
module.exports = {
extension: ["ts"],
require: ["ts-node/register/transpile-only", "tests/testSetup.ts"],
timeout: "3000",
parallel: true,
recursive: true,
};
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v18.16.0
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CODEOWNERS
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"plugins": ["@trivago/prettier-plugin-sort-imports"],
"importOrder": ["^[.{1,2}/]"],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true
}
786 changes: 786 additions & 0 deletions .yarn/releases/yarn-3.2.1.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, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);

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

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(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, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);

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

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(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`);
6 changes: 6 additions & 0 deletions .yarn/sdks/eslint/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "eslint",
"version": "8.19.0-sdk",
"main": "./lib/api.js",
"type": "commonjs"
}
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/index.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, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);

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

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

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

// Defer to the real prettier/index.js your application uses
module.exports = absRequire(`prettier/index.js`);
6 changes: 6 additions & 0 deletions .yarn/sdks/prettier/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name": "prettier",
"version": "2.7.1-sdk",
"main": "./index.js",
"type": "commonjs"
}
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, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);

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

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(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, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);

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

const absPnpApiPath = resolve(__dirname, relPnpApiPath);
const absRequire = (createRequire || createRequireFromPath)(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`);
20 changes: 20 additions & 0 deletions .yarn/sdks/typescript/lib/tsc.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, createRequireFromPath} = require(`module`);
const {resolve} = require(`path`);

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

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

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

// Defer to the real typescript/lib/tsc.js your application uses
module.exports = absRequire(`typescript/lib/tsc.js`);
Loading

0 comments on commit 3cf0cb7

Please sign in to comment.