everyrss 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/cli.js +5 -3
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -27,9 +27,11 @@ export async function main(argv, env) {
27
27
  help: { type: "boolean", short: "h", default: false },
28
28
  },
29
29
  });
30
- const [link] = positionals;
31
- if (values.help || link === undefined)
32
- return { output: help, code: link === undefined && !values.help ? 1 : 0 };
30
+ const [input] = positionals;
31
+ if (values.help || input === undefined)
32
+ return { output: help, code: input === undefined && !values.help ? 1 : 0 };
33
+ // Links copied without their scheme, like youtube.com/@mkbhd, are fine too.
34
+ const link = /^https?:\/\//.test(input) ? input : `https://${input}`;
33
35
  const spotifyCredentials = env.SPOTIFY_CLIENT_ID && env.SPOTIFY_CLIENT_SECRET;
34
36
  if (!spotifyCredentials && URL.canParse(link) && new URL(link).hostname === "open.spotify.com")
35
37
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "everyrss",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Turn YouTube channels and Spotify shows into RSS and JSON feeds, from the command line or as a library",
5
5
  "keywords": [
6
6
  "feed",