Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,30 @@ const stubOptionalNodePlugin = {
},
};

// Community plugins ship as one JS file. sql.js normally loads its WASM as a
// second file, so wrap its browser loader and embed that binary in main.js.
// Tests still import sql.js normally and use its Node loader.
const inlineSqlJsPlugin = {
name: 'inline-sqljs',
setup(build) {
build.onResolve({ filter: /^sql\.js$/ }, () => ({
path: 'sql.js',
namespace: 'inline-sqljs',
}));
build.onLoad({ filter: /.*/, namespace: 'inline-sqljs' }, () => ({
contents: `
import initSqlJs from ${JSON.stringify(path.resolve('node_modules/sql.js/dist/sql-wasm-browser.js'))};
import wasmBinary from ${JSON.stringify(path.resolve('node_modules/sql.js/dist/sql-wasm-browser.wasm'))};
export default function init(config = {}) {
return initSqlJs({ ...config, wasmBinary });
}
`,
loader: 'js',
resolveDir: process.cwd(),
}));
},
};

const PLUGIN_ID = JSON.parse(fs.readFileSync("manifest.json", "utf8")).id;

// Load OBSIDIAN_PATH from .env (path to your vault's plugins folder, relative
Expand Down Expand Up @@ -262,7 +286,10 @@ const context = await esbuild.context({

// We don't need to include code to create zip files (deflate), only read them (inflate),
// so this cuts it out and makes the final bundle smaller.
alias: {'@zip.js/zip.js': '@zip.js/zip.js/lib/zip-no-worker-inflate.js'},
alias: {
'@zip.js/zip.js': '@zip.js/zip.js/lib/zip-no-worker-inflate.js',
},
loader: { '.wasm': 'binary' },
format: "cjs",
target: "es2018",
logLevel: "info",
Expand All @@ -271,8 +298,8 @@ const context = await esbuild.context({
platform: 'browser',
treeShaking: true,
plugins: prod
? [stubInquirePlugin, stubOptionalNodePlugin]
: [stubInquirePlugin, stubOptionalNodePlugin, copyPlugin],
? [stubInquirePlugin, stubOptionalNodePlugin, inlineSqlJsPlugin]
: [stubInquirePlugin, stubOptionalNodePlugin, inlineSqlJsPlugin, copyPlugin],
outfile,
});

Expand Down
16 changes: 12 additions & 4 deletions locale/ar.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1191,19 +1191,19 @@ original=Bear
translation=Bear

[importer.bear.option-text]
original=Bear (.bear2bk)
translation=Bear (.bear2bk)
original=Bear (.bear2bk, .zip)
translation=Bear (.bear2bk, .zip)

[importer.bear.file-type]
original=Bear2bk
original=Bear backups
translation=Bear2bk

[importer.bear.label-id]
original=Bear ID
translation=معرّف Bear

[importer.bear.desc-export]
original=Back up your notes in Bear, you will receive a .bear2bk file.
original=Back up your notes in Bear and choose the resulting .bear2bk file. On iPhone and iPad, you can also export Application Data and choose its .zip file.
translation=أنشئ نسخة احتياطية من ملاحظاتك في Bear، وستحصل على ملف .bear2bk.

[importer.bear.name-tags-property]
Expand Down Expand Up @@ -1234,6 +1234,14 @@ translation=جارٍ تحديث الروابط الداخلية…
original=unknown type of file
translation=نوع ملف غير معروف

[importer.bear.reason-encrypted]
original=encrypted note
translation=

[importer.bear.reason-missing-attachment]
original=the attachment is missing from the export
translation=

[importer.csv.name]
original=CSV
translation=CSV
Expand Down
16 changes: 12 additions & 4 deletions locale/bn.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1191,19 +1191,19 @@ original=Bear
translation=Bear

[importer.bear.option-text]
original=Bear (.bear2bk)
translation=Bear (.bear2bk)
original=Bear (.bear2bk, .zip)
translation=Bear (.bear2bk, .zip)

[importer.bear.file-type]
original=Bear2bk
original=Bear backups
translation=Bear2bk

[importer.bear.label-id]
original=Bear ID
translation=Bear ID

[importer.bear.desc-export]
original=Back up your notes in Bear, you will receive a .bear2bk file.
original=Back up your notes in Bear and choose the resulting .bear2bk file. On iPhone and iPad, you can also export Application Data and choose its .zip file.
translation=Bear-এ আপনার নোটগুলো ব্যাকআপ করুন, আপনি একটি .bear2bk ফাইল পাবেন।

[importer.bear.name-tags-property]
Expand Down Expand Up @@ -1234,6 +1234,14 @@ translation=অভ্যন্তরীণ লিঙ্ক আপডেট ক
original=unknown type of file
translation=অজানা ধরনের ফাইল

[importer.bear.reason-encrypted]
original=encrypted note
translation=

[importer.bear.reason-missing-attachment]
original=the attachment is missing from the export
translation=

[importer.csv.name]
original=CSV
translation=CSV
Expand Down
16 changes: 12 additions & 4 deletions locale/ca.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1191,19 +1191,19 @@ original=Bear
translation=Bear

[importer.bear.option-text]
original=Bear (.bear2bk)
translation=Bear (.bear2bk)
original=Bear (.bear2bk, .zip)
translation=Bear (.bear2bk, .zip)

[importer.bear.file-type]
original=Bear2bk
original=Bear backups
translation=Bear2bk

[importer.bear.label-id]
original=Bear ID
translation=ID de Bear

[importer.bear.desc-export]
original=Back up your notes in Bear, you will receive a .bear2bk file.
original=Back up your notes in Bear and choose the resulting .bear2bk file. On iPhone and iPad, you can also export Application Data and choose its .zip file.
translation=Fes una còpia de seguretat de les teves notes a Bear; rebràs un fitxer .bear2bk.

[importer.bear.name-tags-property]
Expand Down Expand Up @@ -1234,6 +1234,14 @@ translation=Actualitzant els enllaços interns…
original=unknown type of file
translation=tipus de fitxer desconegut

[importer.bear.reason-encrypted]
original=encrypted note
translation=

[importer.bear.reason-missing-attachment]
original=the attachment is missing from the export
translation=

[importer.csv.name]
original=CSV
translation=CSV
Expand Down
16 changes: 12 additions & 4 deletions locale/cs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1191,19 +1191,19 @@ original=Bear
translation=Bear

[importer.bear.option-text]
original=Bear (.bear2bk)
translation=Bear (.bear2bk)
original=Bear (.bear2bk, .zip)
translation=Bear (.bear2bk, .zip)

[importer.bear.file-type]
original=Bear2bk
original=Bear backups
translation=Bear2bk

[importer.bear.label-id]
original=Bear ID
translation=Bear ID

[importer.bear.desc-export]
original=Back up your notes in Bear, you will receive a .bear2bk file.
original=Back up your notes in Bear and choose the resulting .bear2bk file. On iPhone and iPad, you can also export Application Data and choose its .zip file.
translation=Zálohujte své poznámky v Bear, obdržíte soubor .bear2bk.

[importer.bear.name-tags-property]
Expand Down Expand Up @@ -1234,6 +1234,14 @@ translation=Aktualizace interních odkazů…
original=unknown type of file
translation=Neznáma typ souboru

[importer.bear.reason-encrypted]
original=encrypted note
translation=

[importer.bear.reason-missing-attachment]
original=the attachment is missing from the export
translation=

[importer.csv.name]
original=CSV
translation=CSV
Expand Down
16 changes: 12 additions & 4 deletions locale/da.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1191,19 +1191,19 @@ original=Bear
translation=Bear

[importer.bear.option-text]
original=Bear (.bear2bk)
translation=Bear (.bear2bk)
original=Bear (.bear2bk, .zip)
translation=Bear (.bear2bk, .zip)

[importer.bear.file-type]
original=Bear2bk
original=Bear backups
translation=Bear2bk

[importer.bear.label-id]
original=Bear ID
translation=Bear ID

[importer.bear.desc-export]
original=Back up your notes in Bear, you will receive a .bear2bk file.
original=Back up your notes in Bear and choose the resulting .bear2bk file. On iPhone and iPad, you can also export Application Data and choose its .zip file.
translation=Sikkerhedskopiér dine noter i Bear, så modtager du en .bear2bk-fil.

[importer.bear.name-tags-property]
Expand Down Expand Up @@ -1234,6 +1234,14 @@ translation=Opdaterer interne links…
original=unknown type of file
translation=Ukendt filtype

[importer.bear.reason-encrypted]
original=encrypted note
translation=

[importer.bear.reason-missing-attachment]
original=the attachment is missing from the export
translation=

[importer.csv.name]
original=CSV
translation=CSV
Expand Down
16 changes: 12 additions & 4 deletions locale/de.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1191,19 +1191,19 @@ original=Bear
translation=Bear

[importer.bear.option-text]
original=Bear (.bear2bk)
translation=Bear (.bear2bk)
original=Bear (.bear2bk, .zip)
translation=Bear (.bear2bk, .zip)

[importer.bear.file-type]
original=Bear2bk
original=Bear backups
translation=Bear2bk

[importer.bear.label-id]
original=Bear ID
translation=Bear ID

[importer.bear.desc-export]
original=Back up your notes in Bear, you will receive a .bear2bk file.
original=Back up your notes in Bear and choose the resulting .bear2bk file. On iPhone and iPad, you can also export Application Data and choose its .zip file.
translation=Sichere deine Notizen in Bear – du erhältst eine .bear2bk-Datei.

[importer.bear.name-tags-property]
Expand Down Expand Up @@ -1234,6 +1234,14 @@ translation=Interne Links werden aktualisiert…
original=unknown type of file
translation=Unbekannter Dateityp

[importer.bear.reason-encrypted]
original=encrypted note
translation=

[importer.bear.reason-missing-attachment]
original=the attachment is missing from the export
translation=

[importer.csv.name]
original=CSV
translation=CSV
Expand Down
16 changes: 12 additions & 4 deletions locale/el.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1191,19 +1191,19 @@ original=Bear
translation=Bear

[importer.bear.option-text]
original=Bear (.bear2bk)
translation=Bear (.bear2bk)
original=Bear (.bear2bk, .zip)
translation=Bear (.bear2bk, .zip)

[importer.bear.file-type]
original=Bear2bk
original=Bear backups
translation=Bear2bk

[importer.bear.label-id]
original=Bear ID
translation=Bear ID

[importer.bear.desc-export]
original=Back up your notes in Bear, you will receive a .bear2bk file.
original=Back up your notes in Bear and choose the resulting .bear2bk file. On iPhone and iPad, you can also export Application Data and choose its .zip file.
translation=Δημιουργήστε αντίγραφο ασφαλείας των σημειώσεών σας στο Bear, θα λάβετε ένα αρχείο .bear2bk.

[importer.bear.name-tags-property]
Expand Down Expand Up @@ -1234,6 +1234,14 @@ translation=Ενημέρωση εσωτερικών συνδέσμων…
original=unknown type of file
translation=Άγνωστο τύπος αρχείου

[importer.bear.reason-encrypted]
original=encrypted note
translation=

[importer.bear.reason-missing-attachment]
original=the attachment is missing from the export
translation=

[importer.csv.name]
original=CSV
translation=CSV
Expand Down
14 changes: 11 additions & 3 deletions locale/en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1191,19 +1191,19 @@ original=Bear
translation=

[importer.bear.option-text]
original=Bear (.bear2bk)
original=Bear (.bear2bk, .zip)
translation=

[importer.bear.file-type]
original=Bear2bk
original=Bear backups
translation=

[importer.bear.label-id]
original=Bear ID
translation=

[importer.bear.desc-export]
original=Back up your notes in Bear, you will receive a .bear2bk file.
original=Back up your notes in Bear and choose the resulting .bear2bk file. On iPhone and iPad, you can also export Application Data and choose its .zip file.
translation=

[importer.bear.name-tags-property]
Expand Down Expand Up @@ -1234,6 +1234,14 @@ translation=
original=unknown type of file
translation=

[importer.bear.reason-encrypted]
original=encrypted note
translation=

[importer.bear.reason-missing-attachment]
original=the attachment is missing from the export
translation=

[importer.csv.name]
original=CSV
translation=
Expand Down
Loading
Loading