loaner-sdk 0.8.0 → 0.8.2

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "app": "loaner",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "commands": [
5
5
  {
6
6
  "name": "deploy",
@@ -63,7 +63,7 @@ const followed = async (ctx, first, next, ready) => {
63
63
  };
64
64
  /** Sends a folder to an upload link and follows the deploy, needing no sign-in: the link is the key. */
65
65
  const toLink = async (ctx, folder, link) => {
66
- // Handed over without its scheme (so a gateway leaves it alone): https, or http for this computer
66
+ // A link without its scheme (as servers before 0.8.1 handed it over): https, or http for this computer
67
67
  const url = new URL(/^https?:\/\//.test(link) ? link : `${/^(localhost|127\.0\.0\.1)[:/]/.test(link) ? 'http' : 'https'}://${link}`);
68
68
  if (!/\/api\/v1\/uploads\/[A-Za-z0-9]+$/.test(url.pathname))
69
69
  ctx.fail({ title: `${link} is not an upload link (…/api/v1/uploads/<token>)`, status: 400 });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "loaner-sdk",
3
- "version": "0.8.0",
3
+ "version": "0.8.2",
4
4
  "description": "TypeScript client and `loaner` command for Loaner: disposable Linux machines for AI agents, on your own server",
5
5
  "license": "MIT",
6
6
  "type": "module",