@Override
	public ResourceRef resolve(String resource) {
		ResourceRef result = null;

		try {
			// support stdin
			if (ResourceRef.isStdin(resource)) {
				String scriptText = new BufferedReader(
						new InputStreamReader(System.in, StandardCharsets.UTF_8))
					.lines()
					.collect(Collectors.joining(
							System.lineSeparator()));

				result = stringToResourceRef(resource, scriptText);
			}
		} catch (IOException e) {
			throw new ExitException(BaseCommand.EXIT_UNEXPECTED_STATE, "Could not cache script from stdin", e);
		}

		return result;
	}
A <code>ResourceResolver</code> that, when given "-" as a resource string,
will try to create a copy in the cache with a proper file name and return a
reference to that file.
src/main/java/dev/jbang/source/resolvers/LiteralScriptResourceResolver.java