pinokiod 3.7.9 → 3.7.10
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 +1 -1
- package/server/index.js +14 -7
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -329,15 +329,22 @@ class Server {
|
|
|
329
329
|
}
|
|
330
330
|
const env = await this.kernel.env("api/" + name)
|
|
331
331
|
|
|
332
|
+
// profile + feed
|
|
332
333
|
const repositoryPath = path.resolve(this.kernel.api.userdir, name)
|
|
333
334
|
let gitRemote = await git.getConfig({ fs, http, dir: repositoryPath, path: 'remote.origin.url' })
|
|
334
|
-
|
|
335
|
+
let profile
|
|
336
|
+
let feed
|
|
337
|
+
if (gitRemote) {
|
|
338
|
+
gitRemote = gitRemote.replace(/\.git$/i, '')
|
|
335
339
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
340
|
+
let system_env = {}
|
|
341
|
+
if (this.kernel.homedir) {
|
|
342
|
+
system_env = await Environment.get(this.kernel.homedir)
|
|
343
|
+
}
|
|
344
|
+
const PINOKIO_HOMEPAGE = system_env.PINOKIO_HOMEPAGE || "https://pinokio.computer"
|
|
345
|
+
profile = `${PINOKIO_HOMEPAGE}/i?uri=${gitRemote}&display=profile`
|
|
346
|
+
feed = `${PINOKIO_HOMEPAGE}/i?uri=${gitRemote}&display=feed`
|
|
339
347
|
}
|
|
340
|
-
const PINOKIO_HOMEPAGE = system_env.PINOKIO_HOMEPAGE || "https://pinokio.computer"
|
|
341
348
|
|
|
342
349
|
res.render("app", {
|
|
343
350
|
error,
|
|
@@ -351,8 +358,8 @@ class Server {
|
|
|
351
358
|
memory: this.kernel.memory,
|
|
352
359
|
sidebar: "/pinokio/sidebar/" + name,
|
|
353
360
|
name,
|
|
354
|
-
profile
|
|
355
|
-
feed
|
|
361
|
+
profile,
|
|
362
|
+
feed,
|
|
356
363
|
tabs: (this.tabs[name] || []),
|
|
357
364
|
config,
|
|
358
365
|
// sidebar_url: "/pinokio/sidebar/" + name,
|