Skip to content

Commit

Permalink
feat(release): update 9b07530
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Dec 18, 2023
1 parent 3cf0cb7 commit 05932ec
Show file tree
Hide file tree
Showing 85 changed files with 6,423 additions and 3,046 deletions.
11 changes: 4 additions & 7 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
STRIPE_WEBHOOK_SECRET=
STRIPE_SECRET_KEY=
NODE_ENV=
DISABLE_LOGS=
DB_HOST=
DB_PORT=
DB_PASSWORD=
PORT=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
PRIVATE_ROUTE_SECRET=
MIGRATE_ON_STARTUP=
13 changes: 11 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,23 @@
"parserOptions": {
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint"],
"plugins": ["@typescript-eslint", "header"],
"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"]
"@typescript-eslint/no-unused-vars": [
"error",
{
"vars": "all",
"args": "after-used",
"argsIgnorePattern": "^_", // Ignore variables starting with an underscore
"ignoreRestSiblings": true
}
],
"header/header": [2, "./resources/license.header.js"]
},
"ignorePatterns": ["lib/*", ".vscode/*", "bundle-jobs.cjs", "migrations/*"]
}
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged --verbose && yarn tsc --noEmit --pretty
2 changes: 1 addition & 1 deletion .mocharc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
module.exports = {
extension: ["ts"],
require: ["ts-node/register/transpile-only", "tests/testSetup.ts"],
timeout: "3000",
timeout: "7000",
parallel: true,
recursive: true,
};
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.16.0
v18.17.0
9 changes: 9 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"recommendations": [
"arcanis.vscode-zipfs",
"dbaeumer.vscode-eslint",
"ms-azuretools.vscode-docker",
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker"
]
}
11 changes: 11 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"configurations": [
{
"name": "Docker Node.js Launch",
"type": "docker",
"request": "launch",
"preLaunchTask": "docker-run: debug",
"platform": "node"
}
]
}
41 changes: 41 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"files.insertFinalNewline": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "file",
"typescript.preferences.importModuleSpecifier": "relative",
"cSpell.words": [
"abcdefghijklmnopqrxtuvwxyz",
"alexsasharegan",
"ario",
"bignumber",
"capturable",
"chargeback",
"Chargebacks",
"Clawback",
"Hodler",
"knexfile",
"livemode",
"nvmrc",
"openapi",
"Readables",
"sats",
"sslmode",
"trivago",
"typecheck",
"uncategorized",
"winc",
"winstons"
],
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
},
"eslint.nodePath": ".yarn/sdks",
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
"typescript.tsdk": ".yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"[dockerfile]": {
"editor.defaultFormatter": "ms-azuretools.vscode-docker"
}
}
38 changes: 38 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "docker-build",
"label": "ArDrive Upload Service Koa Server Container",
"platform": "node",
"dockerBuild": {
"dockerfile": "${workspaceFolder}/Dockerfile",
"context": "${workspaceFolder}",
"pull": true,
"buildArgs": { "NODE_VERSION": "$(cat .nvmrc | tr -cd [:digit:].)" },
"tag": "upload-service-ecr",
"target": "dev"
}
},
{
"type": "docker-run",
"label": "docker-run: release",
"dependsOn": ["docker-build"],
"platform": "node"
},
{
"type": "docker-run",
"label": "docker-run: debug",
"dependsOn": ["docker-build"],
"dockerRun": {
"env": {
"DEBUG": "*",
"NODE_ENV": "development"
}
},
"node": {
"enableDebugging": true
}
}
]
}
28 changes: 28 additions & 0 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
nodeLinker: node-modules

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.2.1.cjs
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# CODEOWNERS

# The @ardriveapp/services team is the code owner for the entire repository.
# The @ar-io/services team is the code owner for the entire repository.

* @ardriveapp/services
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ In case of any issues or concerns related to reporting, enforcement, or implemen

## Attribution

This Code of Conduct is adapted from the Contributor Covenant, version 2.0, available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
This Code of Conduct is adapted from the Contributor Covenant, version 2.0, available at <https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.

## Scope

Expand Down
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG NODE_VERSION=18.16.0
ARG NODE_VERSION=18.17.0
ARG NODE_VERSION_SHORT=18

FROM node:${NODE_VERSION}-bullseye-slim AS builder
Expand All @@ -8,8 +8,11 @@ WORKDIR /usr/src/app
COPY . .
RUN yarn && yarn build

# Clean out dependencies
RUN yarn workspaces focus --production

# Extract dist
FROM gcr.io/distroless/nodejs:${NODE_VERSION_SHORT}
FROM gcr.io/distroless/nodejs${NODE_VERSION_SHORT}-debian11
WORKDIR /usr/src/app

# Add shell
Expand Down
22 changes: 22 additions & 0 deletions appspec.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version": 0,
"Resources": [
{
"TargetService": {
"Type": "AWS::ECS::Service",
"Properties": {
"TaskDefinition": "PLACEHOLDER",
"LoadBalancerInfo": {
"ContainerName": "PLACEHOLDER",
"ContainerPort": 3000
}
}
}
}
],
"Hooks": [
{
"AfterAllowTestTraffic": "PLACEHOLDER"
}
]
}
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
build:
context: .
args:
NODE_VERSION: ${NODE_VERSION:-18.16.0}
NODE_VERSION: ${NODE_VERSION:-18.17.0}
NODE_VERSION_SHORT: ${NODE_VERSION_SHORT:-18}
environment:
NODE_ENV: ${NODE_ENV:-test}
Expand All @@ -16,6 +16,7 @@ services:
DISABLE_LOGS: ${DISABLE_LOGS:-false}
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY}
STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET}
MIGRATE_ON_STARTUP: ${MIGRATE_ON_STARTUP:-}
ports:
- "${PORT:-3000}:${PORT:-3000}"
depends_on:
Expand All @@ -37,7 +38,7 @@ services:
context: .
dockerfile: tests/Dockerfile.integration
args:
NODE_VERSION: ${NODE_VERSION:-18.16.0}
NODE_VERSION: ${NODE_VERSION:-18.17.0}
environment:
DB_HOST: payment-service-pg
DB_PASSWORD: postgres
Expand Down
Loading

0 comments on commit 05932ec

Please sign in to comment.