Commit 0746ae0dd03e573e8cccf7ec2ed1cf97d6f7a044
rename to ssb-blob-modules
cel committed on 2/5/2019, 8:50:16 AMParent: a7012c41300f57391d5ac7002548d82d98a00bb4
Files changed
index.js | changed |
index.js | |||
---|---|---|---|
@@ -10,19 +10,19 @@ | |||
10 | 10 … | var hex = new Buffer(m[1], 'base64').toString('hex') | |
11 | 11 … | return require(path.join(blobsDir, m[2], hex.substr(0, 2), hex.substr(2))) | |
12 | 12 … | } | |
13 | 13 … | ||
14 | -exports.name = 'exec' | ||
14 … | +exports.name = 'blob-modules' | ||
15 | 15 … | exports.version = '1.0.0' | |
16 | 16 … | exports.manifest = { | |
17 | 17 … | } | |
18 | 18 … | exports.init = function (sbot, config) { | |
19 | 19 … | if (!sbot.ws || !sbot.ws.use) return console.trace('missing ssb-ws') | |
20 | - var conf = config.exec || {} | ||
21 | - var prefix = conf.prefix || '/exec' | ||
22 | - var dir = path.join(config.path, conf.dir || 'blobs/exec/scripts') | ||
20 … | + var prefix = '/blob-modules' | ||
21 … | + var dir = path.join(config.path, 'blob-modules') | ||
22 … | + blobsDir = path.join(config.path, 'blobs') | ||
23 | 23 … | var mtimes = {} | |
24 | - console.log('[exec] init. dir:', dir, 'prefix:', prefix) | ||
24 … | + console.log('[blob-modules] init. dir:', dir, 'prefix:', prefix) | ||
25 | 25 … | ||
26 | 26 … | function getModule(resolved, tried, cb) { | |
27 | 27 … | try { | |
28 | 28 … | var module = require(resolved) |
Built with git-ssb-web