pomdtr
I mainly enjoy building dev tools:
- VS Code integration: https://github.com/pomdtr/valtown-vscode
- CLI: https://github.com/pomdtr/vt
Public vals
355
pomdtr
fetchValInfo
Script
Usage import { fetchValInfo } from "https://esm.town/v/pomdtr/fetchValInfo"
const val = await fetchValInfo(import.meta.url)
console.log(val.id) What's the difference with extractValInfo ? @pomdtr/extractValInfo get metadata synchronously by analysing the val import url, while @pomdtr/fetchValInfo perform an http call to the val.town REST api. Only use fetchValInfo if you need some metadata that are not available from extractValInfo .
1
pomdtr
webdavServer
Script
Webdav Manage your vals from a webdav client (ex: https://cyberduck.io/) ⚠️ some webdav operations are not supported, so support can vary between clients. Installation Click "Create Val" on the code block, and change it's type to http. import { basicAuth } from "https://esm.town/v/pomdtr/basicAuth";
import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
import { serveVals } from "https://esm.town/v/pomdtr/webdavServer";
export default basicAuth(serveVals, {
verifyUser: (user) => {
return verifyToken(user);
},
}); Use a val town token as the username, and keep the password blank to authenticate.
5
pomdtr
esm
HTTP
Esm.town proxy (to get proper highlighting in VS Code) Usage https://pomdtr-esm.web.val.run/<author>/<val>@<version>/<filename> Supported filenames: mod.js mod.ts mod.jsx mod.tsx README.md Example: @pomdtr/serveGithubRepo -> https://pomdtr-esm.web.val.run/pomdtr/serveGithubRepo@34/mod.ts
0