Skip to content

Commit

Permalink
Merge branch 'dev' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavotoyota committed Nov 17, 2023
2 parents 75560f6 + eb73ed5 commit bffc32b
Show file tree
Hide file tree
Showing 87 changed files with 849 additions and 869 deletions.
2 changes: 1 addition & 1 deletion apps/app-server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ RUN pnpm add -g pm2
WORKDIR /app
COPY --from=builder /build/apps/app-server/dist/ ./
RUN pnpm init
RUN pnpm install knex ws pg
RUN pnpm install knex ws pg @getbrevo/brevo
CMD pm2 start /app/index.js -i max && pm2 logs
3 changes: 2 additions & 1 deletion apps/app-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
"dependencies": {
"@deeplib/data": "workspace:*",
"@deeplib/db": "workspace:*",
"@deeplib/mail": "workspace:*",
"@deeplib/misc": "workspace:*",
"@fastify/cookie": "^9.1.0",
"@fastify/cors": "^8.4.1",
"@fastify/helmet": "^11.1.1",
"@fastify/rate-limit": "^8.0.3",
"@fastify/websocket": "^8.2.0",
"@getbrevo/brevo": "^1.0.1",
"@sendgrid/mail": "^7.7.0",
"@stdlib/base64": "workspace:*",
"@stdlib/crypto": "workspace:*",
Expand Down Expand Up @@ -38,7 +40,6 @@
"objection": "3.0.1",
"otplib": "^12.0.1",
"redlock": "5.0.0-beta.2",
"sib-api-v3-typescript": "^2.2.2",
"stripe": "^14.3.0",
"superjson": "npm:@deepnotes/superjson@^1.12.4",
"unilogr": "^0.0.27",
Expand Down
7 changes: 1 addition & 6 deletions apps/app-server/src/env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,10 @@ declare namespace NodeJS {
MAILJET_API_KEY: string;
MAILJET_API_SECRET: string;

SENDINBLUE_API_KEY: string;
BREVO_API_KEY: string;

SENDGRID_API_KEY: string;

ZOHO_HOST: string;
ZOHO_PORT: string;
ZOHO_USER: string;
ZOHO_PASSWORD: string;

STRIPE_SECRET_KEY: string;
STRIPE_WEBHOOK_SECRET: string;
STRIPE_MONTHLY_PRICE_ID: string;
Expand Down
32 changes: 0 additions & 32 deletions apps/app-server/src/mail/sendinblue.ts

This file was deleted.

34 changes: 0 additions & 34 deletions apps/app-server/src/mail/zoho.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { encryptUserEmail, hashUserEmail } from '@deeplib/data';
import { UserModel } from '@deeplib/db';
import { sendMail } from '@deeplib/mail';
import { padZeroes } from '@stdlib/misc';
import { checkRedlockSignalAborted } from '@stdlib/redlock';
import { TRPCError } from '@trpc/server';
import { randomInt } from 'crypto';
import { once } from 'lodash';
import { sendMail } from 'src/mail';
import type { InferProcedureOpts } from 'src/trpc/helpers';
import { authProcedure } from 'src/trpc/helpers';
import { z } from 'zod';
Expand Down
2 changes: 1 addition & 1 deletion apps/app-server/src/trpc/api/users/account/register.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { hashUserEmail } from '@deeplib/data';
import { UserModel } from '@deeplib/db';
import { sendMail } from '@deeplib/mail';
import { w3cEmailRegex } from '@stdlib/misc';
import { TRPCError } from '@trpc/server';
import { once } from 'lodash';
import { sendMail } from 'src/mail';
import type { InferProcedureOpts } from 'src/trpc/helpers';
import { publicProcedure } from 'src/trpc/helpers';
import { derivePasswordValues } from 'src/utils/crypto';
Expand Down
1 change: 1 addition & 0 deletions apps/app-server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"references": [
{ "path": "../../packages/@deeplib/data/tsconfig.json" },
{ "path": "../../packages/@deeplib/db/tsconfig.json" },
{ "path": "../../packages/@deeplib/mail/tsconfig.json" },
{ "path": "../../packages/@deeplib/misc/tsconfig.json" },
{ "path": "../../packages/@stdlib/base64/tsconfig.json" },
{ "path": "../../packages/@stdlib/crypto/tsconfig.json" },
Expand Down
2 changes: 1 addition & 1 deletion apps/app-server/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ export default defineConfig({
sourcemap: false,
splitting: false,
dts: false,
noExternal: [/^(?!knex|ws).+$/],
noExternal: [/^(?!knex|ws|@getbrevo\/brevo).+$/],
});
6 changes: 3 additions & 3 deletions apps/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@deepnotes/client",
"description": "DeepNotes",
"homepage": "https://deepnotes.app",
"version": "1.0.14",
"version": "1.0.15",
"author": "Gustavo Toyota <[email protected]>",
"dependencies": {
"@_ueberdosis/prosemirror-tables": "~1.1.3",
Expand Down Expand Up @@ -69,6 +69,7 @@
"lodash": "^4.17.21",
"lowlight": "^2.9.0",
"marked": "^9.1.5",
"marked-gfm-heading-id": "^3.1.1",
"msgpackr": "^1.9.9",
"nanoid": "^3.3.7",
"node-fetch": "^2.7.0",
Expand Down Expand Up @@ -97,7 +98,7 @@
},
"devDependencies": {
"@intlify/vite-plugin-vue-i18n": "^3.4.0",
"@quasar/app-vite": "npm:@deepnotes/quasar-app-vite@^2.0.0-alpha.41",
"@quasar/app-vite": "npm:@deepnotes/quasar-app-vite@^2.0.0-alpha.42",
"@types/argon2-browser": "^1.18.3",
"@types/color": "^3.0.5",
"@types/cookie": "^0.5.3",
Expand All @@ -106,7 +107,6 @@
"@types/katex": "^0.16.5",
"@types/libsodium-wrappers-sumo": "^0.7.7",
"@types/lodash": "^4.14.200",
"@types/marked": "^6.0.0",
"@types/node-fetch": "^2.6.3",
"@types/qrcode": "^1.5.4",
"@types/showdown": "^2.0.3",
Expand Down
Binary file modified apps/client/public/applications/flashcards-thumbnail.webp
Binary file not shown.
1 change: 1 addition & 0 deletions apps/client/src-capacitor/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/**/capacitor.config.json
4 changes: 1 addition & 3 deletions apps/client/src-capacitor/android/app/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
/build/*
!/build/.npmkeep

/keystore.properties
!/build/.npmkeep
8 changes: 4 additions & 4 deletions apps/client/src-capacitor/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ android {
storePassword keyStoreProperties['releaseStorePassword']
}
}


namespace "app.deepnotes"
compileSdkVersion rootProject.ext.compileSdkVersion

defaultConfig {
applicationId "app.deepnotes"
minSdkVersion rootProject.ext.minSdkVersion
Expand All @@ -39,8 +39,8 @@ android {
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
signingConfig signingConfigs.release
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Expand Down
4 changes: 2 additions & 2 deletions apps/client/src-capacitor/android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="app.deepnotes">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<application
android:usesCleartextTraffic="true"
Expand All @@ -13,7 +12,7 @@

<activity
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
android:name="app.deepnotes.MainActivity"
android:name=".MainActivity"
android:label="@string/title_activity_main"
android:theme="@style/AppTheme.NoActionBarLaunch"
android:launchMode="singleTask"
Expand Down

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions apps/client/src-capacitor/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.1'
classpath 'com.google.gms:google-services:4.3.13'
classpath 'com.android.tools.build:gradle:8.0.0'
classpath 'com.google.gms:google-services:4.3.15'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
8 changes: 4 additions & 4 deletions apps/client/src-capacitor/android/capacitor.settings.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../../../../node_modules/.pnpm/@capacitor+android@4.8.1_@capacitor+core@4.8.1/node_modules/@capacitor/android/capacitor')
project(':capacitor-android').projectDir = new File('../../../../node_modules/.pnpm/@capacitor+android@5.5.1_@capacitor+core@5.5.1/node_modules/@capacitor/android/capacitor')

include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../../../../node_modules/.pnpm/@capacitor+app@4.1.1_@capacitor+core@4.8.1/node_modules/@capacitor/app/android')
project(':capacitor-app').projectDir = new File('../../../../node_modules/.pnpm/@capacitor+app@5.0.6_@capacitor+core@5.5.1/node_modules/@capacitor/app/android')

include ':capacitor-clipboard'
project(':capacitor-clipboard').projectDir = new File('../../../../node_modules/.pnpm/@capacitor+clipboard@4.1.0_@capacitor+core@4.8.1/node_modules/@capacitor/clipboard/android')
project(':capacitor-clipboard').projectDir = new File('../../../../node_modules/.pnpm/@capacitor+clipboard@5.0.6_@capacitor+core@5.5.1/node_modules/@capacitor/clipboard/android')

include ':capacitor-splash-screen'
project(':capacitor-splash-screen').projectDir = new File('../../../../node_modules/.pnpm/@capacitor+splash-screen@4.2.0_@capacitor+core@4.8.1/node_modules/@capacitor/splash-screen/android')
project(':capacitor-splash-screen').projectDir = new File('../../../../node_modules/.pnpm/@capacitor+splash-screen@5.0.6_@capacitor+core@5.5.1/node_modules/@capacitor/splash-screen/android')
3 changes: 1 addition & 2 deletions apps/client/src-capacitor/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,4 @@ org.gradle.jvmargs=-Xmx1536m
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
18 changes: 14 additions & 4 deletions apps/client/src-capacitor/android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand All @@ -80,10 +80,10 @@ do
esac
done

APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

APP_NAME="Gradle"
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
Expand Down Expand Up @@ -143,12 +143,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -205,6 +209,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
Loading

0 comments on commit bffc32b

Please sign in to comment.