pinokiod 1.2.56 → 1.2.58

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "1.2.56",
3
+ "version": "1.2.58",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -1855,6 +1855,9 @@ class Server {
1855
1855
  // if there is no menu, display all files
1856
1856
  let p = this.kernel.path("api", name)
1857
1857
  let files = await fs.promises.readdir(p, { withFileTypes: true })
1858
+ files = files.filter((file) => {
1859
+ return file.name.endsWith(".json") || file.name.endsWith(".js")
1860
+ })
1858
1861
  config = {
1859
1862
  title: name,
1860
1863
  menu: files.map((file) => {
@@ -1,6 +1,6 @@
1
1
  document.addEventListener("click", async (e) => {
2
2
  // [data-filepath] should open in file explorer
3
- let el = e.target.closest("data-filepath")
3
+ let el = e.target.closest("[data-filepath]")
4
4
  if (!el) {
5
5
  let filepath = e.target.getAttribute("data-filepath")
6
6
  if (filepath) {