2023-03-24 19:36:11 +00:00
|
|
|
#!/bin/sh
|
|
|
|
//bin/true; exec deno run -A "$0" "$@"
|
2023-03-24 21:08:36 +00:00
|
|
|
import {
|
|
|
|
antiDuplicationPolicy,
|
|
|
|
hellthreadPolicy,
|
|
|
|
noopPolicy,
|
|
|
|
pipeline,
|
|
|
|
rateLimitPolicy,
|
|
|
|
readStdin,
|
|
|
|
writeStdout,
|
|
|
|
} from './mod.ts';
|
2023-03-24 19:36:11 +00:00
|
|
|
|
2023-03-24 21:08:36 +00:00
|
|
|
const msg = await readStdin();
|
|
|
|
|
|
|
|
const result = await pipeline(msg, [
|
2023-03-25 01:06:03 +00:00
|
|
|
noopPolicy,
|
2023-03-25 00:55:58 +00:00
|
|
|
[hellthreadPolicy, { limit: 100 }],
|
2023-03-25 01:06:03 +00:00
|
|
|
antiDuplicationPolicy,
|
|
|
|
rateLimitPolicy,
|
2023-03-24 21:08:36 +00:00
|
|
|
]);
|
|
|
|
|
|
|
|
writeStdout(result);
|