(feat): redesign WASM module, add TypeScript SDK, migrate to pnpm
Some checks failed
CI / rustfmt (push) Successful in 17s
CI / wasm build (push) Successful in 1m16s
CI / clippy (push) Successful in 1m28s
CI / test (push) Successful in 1m48s
CI / example (push) Successful in 1m31s
CI / duplicate code (push) Failing after 33s
CI / web client (push) Failing after 34s
CI / cargo-machete (push) Successful in 1m18s
CI / cargo-deny (push) Failing after 3m2s

This commit is contained in:
Alois 2026-06-27 23:44:27 +02:00
commit 5caa1c9d5f
49 changed files with 3717 additions and 1501 deletions

View file

@ -1,6 +1,7 @@
import { defineConfig } from 'vite';
import fs from 'fs';
import path from 'path';
import { mtp } from 'mtp/vite';
const devCertDir = path.resolve(__dirname, '../dev-cert');
const certPath = process.env.MTP_DEV_CERT ?? path.join(devCertDir, 'cert.pem');
@ -9,11 +10,7 @@ const keyPath = process.env.MTP_DEV_KEY ?? path.join(devCertDir, 'key.pem');
const hasDevCert = fs.existsSync(certPath) && fs.existsSync(keyPath);
export default defineConfig({
resolve: {
alias: {
'mtp-wasm': path.resolve(__dirname, '../../wasm/pkg'),
},
},
plugins: [mtp({ typeMaps: '../../example/type-maps.yaml' })],
server: {
https: hasDevCert
? {
@ -21,8 +18,5 @@ export default defineConfig({
key: fs.readFileSync(keyPath),
}
: undefined,
fs: {
allow: ['.', path.resolve(__dirname, '../../wasm/pkg')],
},
},
});