this is a simple static text page showing current version from
the npm package and git commit hash at which the app was built.
it's served at /about.html but i didn't link it from the root.
not sure where the best place is. @offbyn i'll let you figure out where to put the link.
this is a simple static text page showing current version from
the npm package and git commit hash at which the app was built.
it's served at /about.html but i didn't link it from the root.
not sure where the best place is. @offbyn i'll let you figure out where to put the link.
part of https://git.qcode.ch/nostr/nostrweb/issues/3
this is a simple static text page showing current version from
the npm package and git commit hash at which the app was built.
it's served at /about.html but i didn't link it from the root.
not sure where the best place is.
The main difference is that spawn is more suitable for long-running processes with huge output. That's because spawn streams input/output with a child process. On the other hand, exec buffers output in a small (by default 200K) buffer.
also could async/await instead Promise, but not strong opinion.
I think `exec` slightly be preferred instead of `spawn` https://nodejs.org/api/child_process.html#child_processexeccommand-options-callback
> The main difference is that spawn is more suitable for long-running processes with huge output. That's because spawn streams input/output with a child process. On the other hand, exec buffers output in a small (by default 200K) buffer.
https://stackoverflow.com/questions/48698234/node-js-spawn-vs-execute
also could async/await instead Promise, but not strong opinion.
Never pass unsanitized user input to this function. Any input containing shell metacharacters may be used to trigger arbitrary command execution.
should it sanitize rev so we can't write evil stuff in git tag string?
> Never pass unsanitized user input to this function. Any input containing shell metacharacters may be used to trigger arbitrary command execution.
should it sanitize `rev` so we can't write evil stuff in git tag string?
didn't want to use exec because it runs in a shell but i didn't need one. it made me look again and turns out there's execFile, spot on.
rewrote to async using util.promisify. this removed a few lines. much easier to read now!
and wrapped all input/output into a sanitizeStr func.
didn't want to use exec because it runs in a shell but i didn't need one. it made me look again and turns out there's `execFile`, spot on.
rewrote to async using `util.promisify`. this removed a few lines. much easier to read now!
and wrapped all input/output into a `sanitizeStr` func.
not sure where the best place is. @offbyn i'll let you figure out where to put the link.
I think for now a link in the profile view should be fine.
also I want to change profile to some gear icon soon, maybe then it would make more sense.
> not sure where the best place is. @offbyn i'll let you figure out where to put the link.
I think for now a link in the profile view should be fine.
also I want to change profile to some gear icon soon, maybe then it would make more sense.
hm... merged and pushed from command line but gitea doesn't let me click the button. nothing happens.
hm... merged and pushed from command line but gitea doesn't let me click the button. nothing happens.
![image](/attachments/06c6aabe-64a8-4821-8159-0a5931f787b5)
this is a simple static text page showing current version from
the npm package and git commit hash at which the app was built.
it's served at /about.html but i didn't link it from the root.
not sure where the best place is. @offbyn i'll let you figure out where to put the link.
part of #3
💩 the build fails becase node:18-slim docker image doesn't have git installed
6d6a3be8a8
to72f8085b17
2 years agook, swapped docker image on the ci from 18-slim to 18-alpine and made it install git. alpine is usually faster to install packages.
Nice, LGTM with small nits, added some comments.
@ -0,0 +7,4 @@
<link rel="stylesheet" href="main.css" type="text/css">
</head>
<body>
<main class="text">
Nice, maybe also add
<h1>
title? :)@ -0,0 +12,4 @@
proc.stdout.on('data', (data) => commit += data.toString().trim());
proc.stderr.on('data', (data) => err += err.toString());
proc.on('close', (code) => code === 0 ? resolve(commit) : reject(err));
});
I think
exec
slightly be preferred instead ofspawn
https://nodejs.org/api/child_process.html#child_processexeccommand-options-callbackhttps://stackoverflow.com/questions/48698234/node-js-spawn-vs-execute
also could async/await instead Promise, but not strong opinion.
should it sanitize
rev
so we can't write evil stuff in git tag string?didn't want to use exec because it runs in a shell but i didn't need one. it made me look again and turns out there's
execFile
, spot on.rewrote to async using
util.promisify
. this removed a few lines. much easier to read now!and wrapped all input/output into a
sanitizeStr
func.@ -0,0 +42,4 @@
loader: 'copy',
}
});
}
didn't know that
setup(build) {
here is es6 shorthand forsetup: (build) => {
👍I think for now a link in the profile view should be fine.
also I want to change profile to some gear icon soon, maybe then it would make more sense.
72f8085b17
to69f7b6c2e0
2 years ago69f7b6c2e0
toe238bd9018
2 years agohm... merged and pushed from command line but gitea doesn't let me click the button. nothing happens.
linked the about page in #27
Reviewers
Step 1:
From your project repository, check out a new branch and test the changes.Step 2:
Merge the changes and update on Gitea.