pinokiod 1.3.7 → 1.3.8

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server/index.js +3 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "1.3.7",
3
+ "version": "1.3.8",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/server/index.js CHANGED
@@ -2054,10 +2054,12 @@ class Server {
2054
2054
  if (req.body.type === 'bin') {
2055
2055
  let folderPath = this.kernel.path("bin")
2056
2056
  await fse.remove(folderPath)
2057
+ await fs.promises.mkdir(folderPath, { recursive: true }).catch((e) => { })
2057
2058
  res.json({ success: true })
2058
2059
  } else if (req.body.type === 'cache') {
2059
2060
  let folderPath = this.kernel.path("cache")
2060
2061
  await fse.remove(folderPath)
2062
+ await fs.promises.mkdir(folderPath, { recursive: true }).catch((e) => { })
2061
2063
  res.json({ success: true })
2062
2064
  } else if (req.body.type === 'browser-cache') {
2063
2065
  if (this.browser) {
@@ -2067,6 +2069,7 @@ class Server {
2067
2069
  } else if (req.body.name) {
2068
2070
  let folderPath = this.kernel.path("api", req.body.name)
2069
2071
  await fse.remove(folderPath)
2072
+ await fs.promises.mkdir(folderPath, { recursive: true }).catch((e) => { })
2070
2073
  await new Promise((resolve, reject) => {
2071
2074
  setTimeout(() => {
2072
2075
  resolve()