reburn-ui 0.3.14 → 0.3.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,6 +17,9 @@ var __dirname2 = path.dirname(url.fileURLToPath(import.meta.url));
17
17
  var staticPath = path.join(__dirname2, "./client");
18
18
  var prerenderedPath = path.join(__dirname2, "./prerendered");
19
19
  var allStaticFiles = {};
20
+ function replaceWindowsPath(path2) {
21
+ return path2.replace(/\\/g, "/");
22
+ }
20
23
  function getAllFiles(dirPath, arrayOfFiles = []) {
21
24
  const files = fs.readdirSync(dirPath);
22
25
  files.forEach((file) => {
@@ -40,10 +43,10 @@ async function staticHTMLFile(file, url2) {
40
43
  try {
41
44
  const staticFiles = getAllFiles(staticPath);
42
45
  for await (const file of staticFiles) {
43
- const relativePath = path.relative(staticPath, file);
46
+ const relativePath = replaceWindowsPath(path.relative(staticPath, file));
44
47
  const readFile = Bun.file(file);
45
48
  const stats = await readFile.stat();
46
- allStaticFiles["/" + relativePath] = new Response(await readFile.bytes(), {
49
+ allStaticFiles["/" + encodeURIComponent(relativePath).replace(/%2F/g, "/")] = new Response(await readFile.bytes(), {
47
50
  headers: {
48
51
  "Content-Type": readFile.type,
49
52
  Etag: `W/"${readFile.size}-${stats.mtime.getTime()}"`,
@@ -12,6 +12,9 @@ const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
12
12
  const staticPath = path.join(__dirname, './client');
13
13
  const prerenderedPath = path.join(__dirname, './prerendered');
14
14
  const allStaticFiles = {};
15
+ function replaceWindowsPath(path) {
16
+ return path.replace(/\\/g, '/');
17
+ }
15
18
  function getAllFiles(dirPath, arrayOfFiles = []) {
16
19
  const files = fs.readdirSync(dirPath);
17
20
  files.forEach((file) => {
@@ -37,10 +40,10 @@ async function staticHTMLFile(file, url) {
37
40
  try {
38
41
  const staticFiles = getAllFiles(staticPath);
39
42
  for await (const file of staticFiles) {
40
- const relativePath = path.relative(staticPath, file);
43
+ const relativePath = replaceWindowsPath(path.relative(staticPath, file));
41
44
  const readFile = Bun.file(file);
42
45
  const stats = await readFile.stat();
43
- allStaticFiles['/' + relativePath] = new Response(await readFile.bytes(), {
46
+ allStaticFiles['/' + encodeURIComponent(relativePath).replace(/%2F/g, '/')] = new Response(await readFile.bytes(), {
44
47
  headers: {
45
48
  'Content-Type': readFile.type,
46
49
  Etag: `W/"${readFile.size}-${stats.mtime.getTime()}"`,
@@ -1,3 +1,4 @@
1
+ export { default as CompositeChart } from './CompositeChart/CompositeChart.svelte';
1
2
  export { default as ticks } from './d3/array/tick.js';
2
3
  export { scaleLinear } from './d3/scale/scaleLinear.js';
3
4
  export { default as LineChart } from './LineChart/LineChart.svelte';
@@ -1,3 +1,4 @@
1
+ export { default as CompositeChart } from './CompositeChart/CompositeChart.svelte';
1
2
  export { default as ticks } from './d3/array/tick.js';
2
3
  export { scaleLinear } from './d3/scale/scaleLinear.js';
3
4
  export { default as LineChart } from './LineChart/LineChart.svelte';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "reburn-ui",
3
- "version": "0.3.14",
3
+ "version": "0.3.16",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "scripts": {