svelteesp32 1.2.1 → 1.2.2

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.
package/dist/cppCode.js CHANGED
@@ -10,6 +10,10 @@ const psychicTemplate = `
10
10
  //files: {{fileCount}}
11
11
  //memory: {{fileSize}}
12
12
 
13
+ #include <Arduino.h>
14
+ #include <PsychicHttp.h>
15
+ #include <PsychicHttpsServer.h>
16
+
13
17
  {{#each sources}}
14
18
  const uint8_t data{{this.index}}[{{this.length}}] = { {{this.bytes}} };
15
19
  {{#if ../isEtag}}
@@ -49,6 +53,9 @@ const asyncTemplate = `
49
53
  //files: {{fileCount}}
50
54
  //memory: {{fileSize}}
51
55
 
56
+ #include <Arduino.h>
57
+ #include <ESPAsyncWebServer.h>
58
+
52
59
  {{#each sources}}
53
60
  const uint8_t data{{this.index}}[{{this.length}}] PROGMEM = { {{this.bytes}} };
54
61
  {{#if ../isEtag}}
package/dist/index.js CHANGED
@@ -15,7 +15,12 @@ const summary = {
15
15
  };
16
16
  const sources = [];
17
17
  let sourceIndex = 0;
18
- for (const file of (0, file_1.getFiles)()) {
18
+ const files = (0, file_1.getFiles)();
19
+ if (files.length === 0) {
20
+ console.error(`Directory ${commandLine_1.cmdLine.sourcepath} is empty`);
21
+ process.exit(1);
22
+ }
23
+ for (const file of files) {
19
24
  const mime = (0, mime_types_1.lookup)(file) || 'text/plain';
20
25
  summary.filecount++;
21
26
  console.log(`[${file}]`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelteesp32",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "Convert Svelte (or any frontend) JS application to serve it from ESP32 webserver (PsychicHttp)",
5
5
  "author": "BCsabaEngine",
6
6
  "license": "ISC",