instaserve 0.0.24 → 0.0.27

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/index.mjs CHANGED
@@ -11,17 +11,19 @@ const indexfile = resolve('index.html')
11
11
  console.log(routesfile, routesurl)
12
12
 
13
13
  if (!fs.existsSync(routesfile)) {
14
- fs.writeFileSync(routesfile, `export default {
15
- _debug: ({ r, s, db }) => console.log(r.url, r.method),
16
- '/': ({ s }) => s.end(fs.readFileSync('index.html', 'utf-8')),
17
- 'tables': name => ([k, v]) => k.match(name + ':')
18
- }`)
14
+ fs.writeFileSync(routesfile, `import fs from 'node:fs'
15
+ export default {
16
+ _debug: ({ r, s, db }) => console.log(r.url, r.method),
17
+ '/': ({ s }) => s.end(fs.readFileSync('index.html', 'utf-8')),
18
+ 'tables': name => ([k, v]) => k.match(name + ':')
19
+ }`)
19
20
  }
20
21
  if (!fs.existsSync(indexfile)) {
21
22
  fs.writeFileSync(indexfile, `<!DOCTYPE html>
22
23
 
23
24
  <script>navigator.serviceWorker.register('sw.js')</script>
24
25
  <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css'>
26
+ <script src='https://unpkg.com/enigmatic/enigmatic.js'></script>
25
27
 
26
28
  <div class='bg-yellow-200'>hello</div>`)
27
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "instaserve",
3
- "version": "0.0.24",
3
+ "version": "0.0.27",
4
4
  "description": "",
5
5
  "main": "index.mjs",
6
6
  "bin": "./index.mjs"
package/db.json DELETED
@@ -1 +0,0 @@
1
- [["user:admin",{"type":"user","name":"admin","pass":"01b613da484bee91c3f3806b52a6f40fd61ade874b5ffc0f62a2091cce38158b","id":"user:admin"}]]
package/index.html DELETED
@@ -1,6 +0,0 @@
1
- <!DOCTYPE html>
2
-
3
- <script>navigator.serviceWorker.register('sw.js')</script>
4
- <link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/tailwindcss/2.2.19/tailwind.min.css'>
5
-
6
- <div class='bg-yellow-200'>hello</div>
package/routes.mjs DELETED
@@ -1,5 +0,0 @@
1
- export default {
2
- _debug: ({ r, s, db }) => console.log(r.url, r.method),
3
- '/': ({ s }) => s.end(fs.readFileSync('index.html', 'utf-8')),
4
- 'tables': name => ([k, v]) => k.match(`${name}:`)
5
- }