Fix/add npm jsr building (#722)

* fixed github workflows to improve handling of mutl runtimes

* updating readme

* Update packages/core/src/meshDevice.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/core/package.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update packages/transport-http/package.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Dan Ditomaso
2025-07-17 20:47:25 -04:00
committed by GitHub
co-authored by Copilot
parent 0e29639222
commit 8a443e9cad
39 changed files with 8448 additions and 2934 deletions
+46 -46
View File
@@ -7,56 +7,56 @@ import { defineConfig } from "vite";
let hash = "";
try {
hash = execSync("git rev-parse --short HEAD", { encoding: "utf8" }).trim();
hash = execSync("git rev-parse --short HEAD", { encoding: "utf8" }).trim();
} catch (error) {
console.error("Error getting git hash:", error);
hash = "DEV";
console.error("Error getting git hash:", error);
hash = "DEV";
}
const CONTENT_SECURITY_POLICY =
"script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' data: https://rsms.me https://cdn.jsdelivr.net; img-src 'self' data:; font-src 'self' data: https://rsms.me https://cdn.jsdelivr.net; worker-src 'self' blob:; object-src 'none'; base-uri 'self';";
"script-src 'self' 'unsafe-inline' https://cdn.jsdelivr.net; style-src 'self' 'unsafe-inline' data: https://rsms.me https://cdn.jsdelivr.net; img-src 'self' data:; font-src 'self' data: https://rsms.me https://cdn.jsdelivr.net; worker-src 'self' blob:; object-src 'none'; base-uri 'self';";
export default defineConfig({
plugins: [
react(),
tailwindcss(),
// VitePWA({
// registerType: "autoUpdate",
// strategies: "generateSW",
// devOptions: {
// enabled: true,
// },
// workbox: {
// cleanupOutdatedCaches: true,
// sourcemap: true,
// },
// }),
],
optimizeDeps: {
include: ["react/jsx-runtime"],
},
define: {
"import.meta.env.VITE_COMMIT_HASH": JSON.stringify(hash),
},
build: {
emptyOutDir: true,
assetsDir: "./",
},
resolve: {
alias: {
"@app": path.resolve(process.cwd(), "./src"),
"@pages": path.resolve(process.cwd(), "./src/pages"),
"@components": path.resolve(process.cwd(), "./src/components"),
"@core": path.resolve(process.cwd(), "./src/core"),
"@layouts": path.resolve(process.cwd(), "./src/layouts"),
},
},
server: {
port: 3000,
headers: {
"content-security-policy": CONTENT_SECURITY_POLICY,
"Cross-Origin-Opener-Policy": "same-origin",
"Cross-Origin-Embedder-Policy": "require-corp",
},
},
plugins: [
react(),
tailwindcss(),
// VitePWA({
// registerType: "autoUpdate",
// strategies: "generateSW",
// devOptions: {
// enabled: true,
// },
// workbox: {
// cleanupOutdatedCaches: true,
// sourcemap: true,
// },
// }),
],
optimizeDeps: {
include: ["react/jsx-runtime"],
},
define: {
"import.meta.env.VITE_COMMIT_HASH": JSON.stringify(hash),
},
build: {
emptyOutDir: true,
assetsDir: "./",
},
resolve: {
alias: {
"@app": path.resolve(process.cwd(), "./src"),
"@pages": path.resolve(process.cwd(), "./src/pages"),
"@components": path.resolve(process.cwd(), "./src/components"),
"@core": path.resolve(process.cwd(), "./src/core"),
"@layouts": path.resolve(process.cwd(), "./src/layouts"),
},
},
server: {
port: 3000,
headers: {
"content-security-policy": CONTENT_SECURITY_POLICY,
"Cross-Origin-Opener-Policy": "same-origin",
"Cross-Origin-Embedder-Policy": "require-corp",
},
},
});