Skip to content

Commit bffc32b

Browse files
committed
Merge branch 'dev' into main
2 parents 75560f6 + eb73ed5 commit bffc32b

File tree

87 files changed

+849
-869
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+849
-869
lines changed

apps/app-server/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ RUN pnpm add -g pm2
1818
WORKDIR /app
1919
COPY --from=builder /build/apps/app-server/dist/ ./
2020
RUN pnpm init
21-
RUN pnpm install knex ws pg
21+
RUN pnpm install knex ws pg @getbrevo/brevo
2222
CMD pm2 start /app/index.js -i max && pm2 logs

apps/app-server/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@
55
"dependencies": {
66
"@deeplib/data": "workspace:*",
77
"@deeplib/db": "workspace:*",
8+
"@deeplib/mail": "workspace:*",
89
"@deeplib/misc": "workspace:*",
910
"@fastify/cookie": "^9.1.0",
1011
"@fastify/cors": "^8.4.1",
1112
"@fastify/helmet": "^11.1.1",
1213
"@fastify/rate-limit": "^8.0.3",
1314
"@fastify/websocket": "^8.2.0",
15+
"@getbrevo/brevo": "^1.0.1",
1416
"@sendgrid/mail": "^7.7.0",
1517
"@stdlib/base64": "workspace:*",
1618
"@stdlib/crypto": "workspace:*",
@@ -38,7 +40,6 @@
3840
"objection": "3.0.1",
3941
"otplib": "^12.0.1",
4042
"redlock": "5.0.0-beta.2",
41-
"sib-api-v3-typescript": "^2.2.2",
4243
"stripe": "^14.3.0",
4344
"superjson": "npm:@deepnotes/superjson@^1.12.4",
4445
"unilogr": "^0.0.27",

apps/app-server/src/env.d.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,10 @@ declare namespace NodeJS {
4545
MAILJET_API_KEY: string;
4646
MAILJET_API_SECRET: string;
4747

48-
SENDINBLUE_API_KEY: string;
48+
BREVO_API_KEY: string;
4949

5050
SENDGRID_API_KEY: string;
5151

52-
ZOHO_HOST: string;
53-
ZOHO_PORT: string;
54-
ZOHO_USER: string;
55-
ZOHO_PASSWORD: string;
56-
5752
STRIPE_SECRET_KEY: string;
5853
STRIPE_WEBHOOK_SECRET: string;
5954
STRIPE_MONTHLY_PRICE_ID: string;

apps/app-server/src/mail/sendinblue.ts

-32
This file was deleted.

apps/app-server/src/mail/zoho.ts

-34
This file was deleted.

apps/app-server/src/trpc/api/users/account/email-change/request.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { encryptUserEmail, hashUserEmail } from '@deeplib/data';
22
import { UserModel } from '@deeplib/db';
3+
import { sendMail } from '@deeplib/mail';
34
import { padZeroes } from '@stdlib/misc';
45
import { checkRedlockSignalAborted } from '@stdlib/redlock';
56
import { TRPCError } from '@trpc/server';
67
import { randomInt } from 'crypto';
78
import { once } from 'lodash';
8-
import { sendMail } from 'src/mail';
99
import type { InferProcedureOpts } from 'src/trpc/helpers';
1010
import { authProcedure } from 'src/trpc/helpers';
1111
import { z } from 'zod';

apps/app-server/src/trpc/api/users/account/register.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { hashUserEmail } from '@deeplib/data';
22
import { UserModel } from '@deeplib/db';
3+
import { sendMail } from '@deeplib/mail';
34
import { w3cEmailRegex } from '@stdlib/misc';
45
import { TRPCError } from '@trpc/server';
56
import { once } from 'lodash';
6-
import { sendMail } from 'src/mail';
77
import type { InferProcedureOpts } from 'src/trpc/helpers';
88
import { publicProcedure } from 'src/trpc/helpers';
99
import { derivePasswordValues } from 'src/utils/crypto';

apps/app-server/tsconfig.json

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"references": [
3131
{ "path": "../../packages/@deeplib/data/tsconfig.json" },
3232
{ "path": "../../packages/@deeplib/db/tsconfig.json" },
33+
{ "path": "../../packages/@deeplib/mail/tsconfig.json" },
3334
{ "path": "../../packages/@deeplib/misc/tsconfig.json" },
3435
{ "path": "../../packages/@stdlib/base64/tsconfig.json" },
3536
{ "path": "../../packages/@stdlib/crypto/tsconfig.json" },

apps/app-server/tsup.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ export default defineConfig({
99
sourcemap: false,
1010
splitting: false,
1111
dts: false,
12-
noExternal: [/^(?!knex|ws).+$/],
12+
noExternal: [/^(?!knex|ws|@getbrevo\/brevo).+$/],
1313
});

apps/client/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@deepnotes/client",
33
"description": "DeepNotes",
44
"homepage": "https://deepnotes.app",
5-
"version": "1.0.14",
5+
"version": "1.0.15",
66
"author": "Gustavo Toyota <[email protected]>",
77
"dependencies": {
88
"@_ueberdosis/prosemirror-tables": "~1.1.3",
@@ -69,6 +69,7 @@
6969
"lodash": "^4.17.21",
7070
"lowlight": "^2.9.0",
7171
"marked": "^9.1.5",
72+
"marked-gfm-heading-id": "^3.1.1",
7273
"msgpackr": "^1.9.9",
7374
"nanoid": "^3.3.7",
7475
"node-fetch": "^2.7.0",
@@ -97,7 +98,7 @@
9798
},
9899
"devDependencies": {
99100
"@intlify/vite-plugin-vue-i18n": "^3.4.0",
100-
"@quasar/app-vite": "npm:@deepnotes/quasar-app-vite@^2.0.0-alpha.41",
101+
"@quasar/app-vite": "npm:@deepnotes/quasar-app-vite@^2.0.0-alpha.42",
101102
"@types/argon2-browser": "^1.18.3",
102103
"@types/color": "^3.0.5",
103104
"@types/cookie": "^0.5.3",
@@ -106,7 +107,6 @@
106107
"@types/katex": "^0.16.5",
107108
"@types/libsodium-wrappers-sumo": "^0.7.7",
108109
"@types/lodash": "^4.14.200",
109-
"@types/marked": "^6.0.0",
110110
"@types/node-fetch": "^2.6.3",
111111
"@types/qrcode": "^1.5.4",
112112
"@types/showdown": "^2.0.3",
Binary file not shown.

apps/client/src-capacitor/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/**/capacitor.config.json
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
/build/*
2-
!/build/.npmkeep
3-
4-
/keystore.properties
2+
!/build/.npmkeep

apps/client/src-capacitor/android/app/build.gradle

+4-4
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ android {
2121
storePassword keyStoreProperties['releaseStorePassword']
2222
}
2323
}
24-
24+
25+
namespace "app.deepnotes"
2526
compileSdkVersion rootProject.ext.compileSdkVersion
26-
2727
defaultConfig {
2828
applicationId "app.deepnotes"
2929
minSdkVersion rootProject.ext.minSdkVersion
@@ -39,8 +39,8 @@ android {
3939
}
4040
buildTypes {
4141
release {
42-
signingConfig signingConfigs.release
43-
minifyEnabled true
42+
signingConfig signingConfigs.release
43+
minifyEnabled false
4444
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
4545
}
4646
}

apps/client/src-capacitor/android/app/capacitor.build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
android {
44
compileOptions {
5-
sourceCompatibility JavaVersion.VERSION_11
6-
targetCompatibility JavaVersion.VERSION_11
5+
sourceCompatibility JavaVersion.VERSION_17
6+
targetCompatibility JavaVersion.VERSION_17
77
}
88
}
99

apps/client/src-capacitor/android/app/src/main/AndroidManifest.xml

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

54
<application
65
android:usesCleartextTraffic="true"
@@ -13,7 +12,7 @@
1312

1413
<activity
1514
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
16-
android:name="app.deepnotes.MainActivity"
15+
android:name=".MainActivity"
1716
android:label="@string/title_activity_main"
1817
android:theme="@style/AppTheme.NoActionBarLaunch"
1918
android:launchMode="singleTask"

apps/client/src-capacitor/android/app/src/main/assets/capacitor.config.json

-21
This file was deleted.

apps/client/src-capacitor/android/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ buildscript {
77
mavenCentral()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:7.2.1'
11-
classpath 'com.google.gms:google-services:4.3.13'
10+
classpath 'com.android.tools.build:gradle:8.0.0'
11+
classpath 'com.google.gms:google-services:4.3.15'
1212

1313
// NOTE: Do not place your application dependencies here; they belong
1414
// in the individual module build.gradle files
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// DO NOT EDIT THIS FILE! IT IS GENERATED EACH TIME "capacitor update" IS RUN
22
include ':capacitor-android'
3-
project(':capacitor-android').projectDir = new File('../../../../node_modules/.pnpm/@capacitor+android@4.8.1_@capacitor+core@4.8.1/node_modules/@capacitor/android/capacitor')
3+
project(':capacitor-android').projectDir = new File('../../../../node_modules/.pnpm/@capacitor+android@5.5.1_@capacitor+core@5.5.1/node_modules/@capacitor/android/capacitor')
44

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

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

1111
include ':capacitor-splash-screen'
12-
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')
12+
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')

apps/client/src-capacitor/android/gradle.properties

+1-2
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,4 @@ org.gradle.jvmargs=-Xmx1536m
2020
# Android operating system, and which are packaged with your app's APK
2121
# https://developer.android.com/topic/libraries/support-library/androidx-rn
2222
android.useAndroidX=true
23-
# Automatically convert third-party libraries to use AndroidX
24-
android.enableJetifier=true
23+
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-all.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

apps/client/src-capacitor/android/gradlew

+14-4
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,10 +80,10 @@ do
8080
esac
8181
done
8282

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

8888
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
8989
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
@@ -143,12 +143,16 @@ fi
143143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144144
case $MAX_FD in #(
145145
max*)
146+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147+
# shellcheck disable=SC3045
146148
MAX_FD=$( ulimit -H -n ) ||
147149
warn "Could not query maximum file descriptor limit"
148150
esac
149151
case $MAX_FD in #(
150152
'' | soft) :;; #(
151153
*)
154+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155+
# shellcheck disable=SC3045
152156
ulimit -n "$MAX_FD" ||
153157
warn "Could not set maximum file descriptor limit to $MAX_FD"
154158
esac
@@ -205,6 +209,12 @@ set -- \
205209
org.gradle.wrapper.GradleWrapperMain \
206210
"$@"
207211

212+
# Stop when "xargs" is not available.
213+
if ! command -v xargs >/dev/null 2>&1
214+
then
215+
die "xargs is not available"
216+
fi
217+
208218
# Use "xargs" to parse quoted args.
209219
#
210220
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

0 commit comments

Comments
 (0)