@shaankhosla/repeater 0.0.25

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.
package/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ /node_modules
2
+
package/CHANGELOG.md ADDED
@@ -0,0 +1,49 @@
1
+ ## [0.0.25] - 2026-01-06
2
+
3
+ ### ๐Ÿš€ Features
4
+
5
+ - Make hashing more robust by ignoring whitespace, punctuation, etc (#36)
6
+
7
+ ### ๐Ÿ› Bug Fixes
8
+
9
+ - Improve error display for card parsing errors (#5) (#29)
10
+ - Change tool name to repeater due to zsh reserved name
11
+
12
+ ### ๐Ÿ’ผ Other
13
+
14
+ - Bump tokio from 1.48.0 to 1.49.0 (#35)
15
+
16
+ Signed-off-by: dependabot[bot] <support@github.com>
17
+ Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
18
+ - Bump clap from 4.5.53 to 4.5.54 (#32)
19
+
20
+ Signed-off-by: dependabot[bot] <support@github.com>
21
+ Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
22
+ - Bump reqwest from 0.11.27 to 0.13.1 (#33)
23
+
24
+ Signed-off-by: dependabot[bot] <support@github.com>
25
+ Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
26
+ Co-authored-by: Shaan Khosla <35707672+shaankhosla@users.noreply.github.com>
27
+
28
+ ### ๐Ÿšœ Refactor
29
+
30
+ - Slight change to verion check
31
+ - Crud (#37)
32
+ - Theme
33
+
34
+ ### ๐Ÿ“š Documentation
35
+
36
+ - Add page on fsrs
37
+ - Fix check description
38
+ - Faq section
39
+ - Update readme
40
+ - Update readme
41
+ - Updated examples for card parsing
42
+
43
+ ### ๐Ÿงช Testing
44
+
45
+ - Use property testing to make sure testing doesn't fail
46
+
47
+ ### โš™๏ธ Miscellaneous Tasks
48
+
49
+ - Lint
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,92 @@
1
+ # repeater
2
+
3
+ <p align="center">
4
+ <a href="https://github.com/shaankhosla/repeater/actions/workflows/ci.yaml">
5
+ <img alt="CI Status" src="https://img.shields.io/github/actions/workflow/status/shaankhosla/repeater/ci.yaml?branch=main&label=CI&logo=github" />
6
+ </a>
7
+ <a href="https://shaankhosla.github.io/repeater/">
8
+ <img alt="Documentation" src="https://img.shields.io/badge/docs-GitHub%20Pages-blue?logo=github" />
9
+ </a>
10
+ <a href="https://github.com/shaankhosla/repeater/releases">
11
+ <img alt="Latest Release" src="https://img.shields.io/github/v/release/shaankhosla/repeater?display_name=tag&sort=semver&logo=github" />
12
+ </a>
13
+ <a href="LICENSE">
14
+ <img alt="License" src="https://img.shields.io/github/license/shaankhosla/repeater?color=informational" />
15
+ </a>
16
+ </p>
17
+
18
+ `repeater` is a command-line flashcard program that uses [spaced repetition](https://en.wikipedia.org/wiki/Spaced_repetition) to boost your memory retention. Itโ€™s like a lightweight, text-based Anki you run in your terminal. Your decks are kept in Markdown, progress is tracked in SQLite, and reviews are scheduled with Free Spaced Repetition Scheduler (FSRS), a state-of-the-art algorithm targeting 90% recall.
19
+
20
+
21
+ <img src="check_example.png" alt="Checking card progress" />
22
+
23
+ > [!NOTE]
24
+ > You can find the main documentation, including installation guides, at [https://shaankhosla.github.io/repeater/](https://shaankhosla.github.io/repeater/).
25
+
26
+ ## Features
27
+
28
+ - Cards live in `.md` files, so edit them using your favorite markdown editor, back them up with version control, and let them live alongside regular notes.
29
+ - Progress is tracked with a hash of the meaningful words, so real text changes reset progress while punctuation or casing tweaks do not.
30
+ - Free Spaced Repetition Scheduler (FSRS), a state-of-the-art algorithm targeting 90% recall, automatically schedules reviews for you.
31
+ - Terminal UX: `repeater drill` renders cards with ratatui; `repeater create` launches an editor dedicated to card capture; `repeater check` displays progress at a glance.
32
+ - Inline media support: reference local images/audio/video inside your decks and open them from a drill session without leaving the terminal.
33
+ - Import from Anki: convert `.apkg` exports into Markdown decks with `repeater import` so you can bring your existing collection along.
34
+
35
+
36
+ ## Installation
37
+
38
+ ### Install script (Linux & macOS) - Recommended
39
+
40
+ ```
41
+ curl --proto '=https' --tlsv1.2 -LsSf https://github.com/shaankhosla/repeater/releases/latest/download/repeater-installer.sh | sh
42
+ ```
43
+
44
+ ### Homebrew (macOS)
45
+
46
+ ```
47
+ brew tap shaankhosla/homebrew-tap
48
+ brew install repeater
49
+ ```
50
+
51
+ ### Windows (PowerShell)
52
+
53
+ ```
54
+ irm https://github.com/shaankhosla/repeater/releases/latest/download/repeater-installer.ps1 | iex
55
+ ```
56
+
57
+ ### npm
58
+
59
+ ```
60
+ npm install @shaankhosla/repeater
61
+ ```
62
+
63
+ ## Quick Start
64
+
65
+ 1. Create a deck in Markdown (`cards/neuro.md`):
66
+
67
+ ```markdown
68
+ You can put your normal notes here, `repeater` will ignore them.
69
+ Once a "Q:,A:,C:" block is detected, it will automatically
70
+ turn it into a card.
71
+
72
+ Q: What does a synaptic vesicle store?
73
+ A: Neurotransmitters awaiting release.
74
+
75
+ ---
76
+ Use a separator to mark the end of a card^
77
+ Then feel free to go back to adding regular notes.
78
+
79
+ C: Speech is [produced] in [Broca's] area.
80
+ ```
81
+
82
+
83
+ 2. Index the cards and start a session:
84
+
85
+ ```
86
+ repeater drill cards
87
+ ```
88
+
89
+ - `Space`/`Enter`: reveal the answer or cloze.
90
+ - `O`: open the first media file (image/audio/video) referenced in the current card before revealing the answer.
91
+ - `1`: mark as `Fail`, `2`: mark as `Pass`.
92
+ - `Esc` or `Ctrl+C`: end the session early (progress so far is saved).
@@ -0,0 +1,212 @@
1
+ const { createWriteStream, existsSync, mkdirSync, mkdtemp } = require("fs");
2
+ const { join, sep } = require("path");
3
+ const { spawnSync } = require("child_process");
4
+ const { tmpdir } = require("os");
5
+
6
+ const axios = require("axios");
7
+ const rimraf = require("rimraf");
8
+ const tmpDir = tmpdir();
9
+
10
+ const error = (msg) => {
11
+ console.error(msg);
12
+ process.exit(1);
13
+ };
14
+
15
+ class Package {
16
+ constructor(platform, name, url, filename, zipExt, binaries) {
17
+ let errors = [];
18
+ if (typeof url !== "string") {
19
+ errors.push("url must be a string");
20
+ } else {
21
+ try {
22
+ new URL(url);
23
+ } catch (e) {
24
+ errors.push(e);
25
+ }
26
+ }
27
+ if (name && typeof name !== "string") {
28
+ errors.push("package name must be a string");
29
+ }
30
+ if (!name) {
31
+ errors.push("You must specify the name of your package");
32
+ }
33
+ if (binaries && typeof binaries !== "object") {
34
+ errors.push("binaries must be a string => string map");
35
+ }
36
+ if (!binaries) {
37
+ errors.push("You must specify the binaries in the package");
38
+ }
39
+
40
+ if (errors.length > 0) {
41
+ let errorMsg =
42
+ "One or more of the parameters you passed to the Binary constructor are invalid:\n";
43
+ errors.forEach((error) => {
44
+ errorMsg += error;
45
+ });
46
+ errorMsg +=
47
+ '\n\nCorrect usage: new Package("my-binary", "https://example.com/binary/download.tar.gz", {"my-binary": "my-binary"})';
48
+ error(errorMsg);
49
+ }
50
+
51
+ this.platform = platform;
52
+ this.url = url;
53
+ this.name = name;
54
+ this.filename = filename;
55
+ this.zipExt = zipExt;
56
+ this.installDirectory = join(__dirname, "node_modules", ".bin_real");
57
+ this.binaries = binaries;
58
+
59
+ if (!existsSync(this.installDirectory)) {
60
+ mkdirSync(this.installDirectory, { recursive: true });
61
+ }
62
+ }
63
+
64
+ exists() {
65
+ for (const binaryName in this.binaries) {
66
+ const binRelPath = this.binaries[binaryName];
67
+ const binPath = join(this.installDirectory, binRelPath);
68
+ if (!existsSync(binPath)) {
69
+ return false;
70
+ }
71
+ }
72
+ return true;
73
+ }
74
+
75
+ install(fetchOptions, suppressLogs = false) {
76
+ if (this.exists()) {
77
+ if (!suppressLogs) {
78
+ console.error(
79
+ `${this.name} is already installed, skipping installation.`,
80
+ );
81
+ }
82
+ return Promise.resolve();
83
+ }
84
+
85
+ if (existsSync(this.installDirectory)) {
86
+ rimraf.sync(this.installDirectory);
87
+ }
88
+
89
+ mkdirSync(this.installDirectory, { recursive: true });
90
+
91
+ if (!suppressLogs) {
92
+ console.error(`Downloading release from ${this.url}`);
93
+ }
94
+
95
+ return axios({ ...fetchOptions, url: this.url, responseType: "stream" })
96
+ .then((res) => {
97
+ return new Promise((resolve, reject) => {
98
+ mkdtemp(`${tmpDir}${sep}`, (err, directory) => {
99
+ let tempFile = join(directory, this.filename);
100
+ const sink = res.data.pipe(createWriteStream(tempFile));
101
+ sink.on("error", (err) => reject(err));
102
+ sink.on("close", () => {
103
+ if (/\.tar\.*/.test(this.zipExt)) {
104
+ const result = spawnSync("tar", [
105
+ "xf",
106
+ tempFile,
107
+ // The tarballs are stored with a leading directory
108
+ // component; we strip one component in the
109
+ // shell installers too.
110
+ "--strip-components",
111
+ "1",
112
+ "-C",
113
+ this.installDirectory,
114
+ ]);
115
+ if (result.status == 0) {
116
+ resolve();
117
+ } else if (result.error) {
118
+ reject(result.error);
119
+ } else {
120
+ reject(
121
+ new Error(
122
+ `An error occurred untarring the artifact: stdout: ${result.stdout}; stderr: ${result.stderr}`,
123
+ ),
124
+ );
125
+ }
126
+ } else if (this.zipExt == ".zip") {
127
+ let result;
128
+ if (this.platform.artifactName.includes("windows")) {
129
+ // Windows does not have "unzip" by default on many installations, instead
130
+ // we use Expand-Archive from powershell
131
+ result = spawnSync("powershell.exe", [
132
+ "-NoProfile",
133
+ "-NonInteractive",
134
+ "-Command",
135
+ `& {
136
+ param([string]$LiteralPath, [string]$DestinationPath)
137
+ Expand-Archive -LiteralPath $LiteralPath -DestinationPath $DestinationPath -Force
138
+ }`,
139
+ tempFile,
140
+ this.installDirectory,
141
+ ]);
142
+ } else {
143
+ result = spawnSync("unzip", [
144
+ "-q",
145
+ tempFile,
146
+ "-d",
147
+ this.installDirectory,
148
+ ]);
149
+ }
150
+
151
+ if (result.status == 0) {
152
+ resolve();
153
+ } else if (result.error) {
154
+ reject(result.error);
155
+ } else {
156
+ reject(
157
+ new Error(
158
+ `An error occurred unzipping the artifact: stdout: ${result.stdout}; stderr: ${result.stderr}`,
159
+ ),
160
+ );
161
+ }
162
+ } else {
163
+ reject(
164
+ new Error(`Unrecognized file extension: ${this.zipExt}`),
165
+ );
166
+ }
167
+ });
168
+ });
169
+ });
170
+ })
171
+ .then(() => {
172
+ if (!suppressLogs) {
173
+ console.error(`${this.name} has been installed!`);
174
+ }
175
+ })
176
+ .catch((e) => {
177
+ error(`Error fetching release: ${e.message}`);
178
+ });
179
+ }
180
+
181
+ run(binaryName, fetchOptions) {
182
+ const promise = !this.exists()
183
+ ? this.install(fetchOptions, true)
184
+ : Promise.resolve();
185
+
186
+ promise
187
+ .then(() => {
188
+ const [, , ...args] = process.argv;
189
+
190
+ const options = { cwd: process.cwd(), stdio: "inherit" };
191
+
192
+ const binRelPath = this.binaries[binaryName];
193
+ if (!binRelPath) {
194
+ error(`${binaryName} is not a known binary in ${this.name}`);
195
+ }
196
+ const binPath = join(this.installDirectory, binRelPath);
197
+ const result = spawnSync(binPath, args, options);
198
+
199
+ if (result.error) {
200
+ error(result.error);
201
+ }
202
+
203
+ process.exit(result.status);
204
+ })
205
+ .catch((e) => {
206
+ error(e.message);
207
+ process.exit(1);
208
+ });
209
+ }
210
+ }
211
+
212
+ module.exports.Package = Package;
package/binary.js ADDED
@@ -0,0 +1,126 @@
1
+ const { Package } = require("./binary-install");
2
+ const os = require("os");
3
+ const cTable = require("console.table");
4
+ const libc = require("detect-libc");
5
+ const { configureProxy } = require("axios-proxy-builder");
6
+
7
+ const error = (msg) => {
8
+ console.error(msg);
9
+ process.exit(1);
10
+ };
11
+
12
+ const {
13
+ name,
14
+ artifactDownloadUrl,
15
+ supportedPlatforms,
16
+ glibcMinimum,
17
+ } = require("./package.json");
18
+
19
+ const builderGlibcMajorVersion = glibcMinimum.major;
20
+ const builderGlibcMInorVersion = glibcMinimum.series;
21
+
22
+ const getPlatform = () => {
23
+ const rawOsType = os.type();
24
+ const rawArchitecture = os.arch();
25
+
26
+ // We want to use rust-style target triples as the canonical key
27
+ // for a platform, so translate the "os" library's concepts into rust ones
28
+ let osType = "";
29
+ switch (rawOsType) {
30
+ case "Windows_NT":
31
+ osType = "pc-windows-msvc";
32
+ break;
33
+ case "Darwin":
34
+ osType = "apple-darwin";
35
+ break;
36
+ case "Linux":
37
+ osType = "unknown-linux-gnu";
38
+ break;
39
+ }
40
+
41
+ let arch = "";
42
+ switch (rawArchitecture) {
43
+ case "x64":
44
+ arch = "x86_64";
45
+ break;
46
+ case "arm64":
47
+ arch = "aarch64";
48
+ break;
49
+ }
50
+
51
+ if (rawOsType === "Linux") {
52
+ if (libc.familySync() == "musl") {
53
+ osType = "unknown-linux-musl-dynamic";
54
+ } else if (libc.isNonGlibcLinuxSync()) {
55
+ console.warn(
56
+ "Your libc is neither glibc nor musl; trying static musl binary instead",
57
+ );
58
+ osType = "unknown-linux-musl-static";
59
+ } else {
60
+ let libcVersion = libc.versionSync();
61
+ let splitLibcVersion = libcVersion.split(".");
62
+ let libcMajorVersion = splitLibcVersion[0];
63
+ let libcMinorVersion = splitLibcVersion[1];
64
+ if (
65
+ libcMajorVersion != builderGlibcMajorVersion ||
66
+ libcMinorVersion < builderGlibcMInorVersion
67
+ ) {
68
+ // We can't run the glibc binaries, but we can run the static musl ones
69
+ // if they exist
70
+ console.warn(
71
+ "Your glibc isn't compatible; trying static musl binary instead",
72
+ );
73
+ osType = "unknown-linux-musl-static";
74
+ }
75
+ }
76
+ }
77
+
78
+ // Assume the above succeeded and build a target triple to look things up with.
79
+ // If any of it failed, this lookup will fail and we'll handle it like normal.
80
+ let targetTriple = `${arch}-${osType}`;
81
+ let platform = supportedPlatforms[targetTriple];
82
+
83
+ if (!platform) {
84
+ error(
85
+ `Platform with type "${rawOsType}" and architecture "${rawArchitecture}" is not supported by ${name}.\nYour system must be one of the following:\n\n${Object.keys(
86
+ supportedPlatforms,
87
+ ).join(",")}`,
88
+ );
89
+ }
90
+
91
+ return platform;
92
+ };
93
+
94
+ const getPackage = () => {
95
+ const platform = getPlatform();
96
+ const url = `${artifactDownloadUrl}/${platform.artifactName}`;
97
+ let filename = platform.artifactName;
98
+ let ext = platform.zipExt;
99
+ let binary = new Package(platform, name, url, filename, ext, platform.bins);
100
+
101
+ return binary;
102
+ };
103
+
104
+ const install = (suppressLogs) => {
105
+ if (!artifactDownloadUrl || artifactDownloadUrl.length === 0) {
106
+ console.warn("in demo mode, not installing binaries");
107
+ return;
108
+ }
109
+ const package = getPackage();
110
+ const proxy = configureProxy(package.url);
111
+
112
+ return package.install(proxy, suppressLogs);
113
+ };
114
+
115
+ const run = (binaryName) => {
116
+ const package = getPackage();
117
+ const proxy = configureProxy(package.url);
118
+
119
+ package.run(binaryName, proxy);
120
+ };
121
+
122
+ module.exports = {
123
+ install,
124
+ run,
125
+ getPackage,
126
+ };
package/install.js ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { install } = require("./binary");
4
+ install(false);
@@ -0,0 +1,518 @@
1
+ {
2
+ "lockfileVersion": 3,
3
+ "name": "@shaankhosla/repeater",
4
+ "packages": {
5
+ "": {
6
+ "bin": {
7
+ "repeater": "run-repeater.js"
8
+ },
9
+ "dependencies": {
10
+ "axios": "^1.13.2",
11
+ "axios-proxy-builder": "^0.1.2",
12
+ "console.table": "^0.10.0",
13
+ "detect-libc": "^2.1.2",
14
+ "rimraf": "^6.1.2"
15
+ },
16
+ "devDependencies": {
17
+ "prettier": "^3.7.4"
18
+ },
19
+ "engines": {
20
+ "node": ">=14",
21
+ "npm": ">=6"
22
+ },
23
+ "hasInstallScript": true,
24
+ "name": "@shaankhosla/repeater",
25
+ "version": "0.0.25"
26
+ },
27
+ "node_modules/@isaacs/balanced-match": {
28
+ "engines": {
29
+ "node": "20 || >=22"
30
+ },
31
+ "integrity": "sha512-yzMTt9lEb8Gv7zRioUilSglI0c0smZ9k5D65677DLWLtWJaXIS3CqcGyUFByYKlnUj6TkjLVs54fBl6+TiGQDQ==",
32
+ "license": "MIT",
33
+ "resolved": "https://registry.npmjs.org/@isaacs/balanced-match/-/balanced-match-4.0.1.tgz",
34
+ "version": "4.0.1"
35
+ },
36
+ "node_modules/@isaacs/brace-expansion": {
37
+ "dependencies": {
38
+ "@isaacs/balanced-match": "^4.0.1"
39
+ },
40
+ "engines": {
41
+ "node": "20 || >=22"
42
+ },
43
+ "integrity": "sha512-ZT55BDLV0yv0RBm2czMiZ+SqCGO7AvmOM3G/w2xhVPH+te0aKgFjmBvGlL1dH+ql2tgGO3MVrbb3jCKyvpgnxA==",
44
+ "license": "MIT",
45
+ "resolved": "https://registry.npmjs.org/@isaacs/brace-expansion/-/brace-expansion-5.0.0.tgz",
46
+ "version": "5.0.0"
47
+ },
48
+ "node_modules/asynckit": {
49
+ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
50
+ "license": "MIT",
51
+ "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
52
+ "version": "0.4.0"
53
+ },
54
+ "node_modules/axios": {
55
+ "dependencies": {
56
+ "follow-redirects": "^1.15.6",
57
+ "form-data": "^4.0.4",
58
+ "proxy-from-env": "^1.1.0"
59
+ },
60
+ "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==",
61
+ "license": "MIT",
62
+ "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz",
63
+ "version": "1.13.2"
64
+ },
65
+ "node_modules/axios-proxy-builder": {
66
+ "dependencies": {
67
+ "tunnel": "^0.0.6"
68
+ },
69
+ "integrity": "sha512-6uBVsBZzkB3tCC8iyx59mCjQckhB8+GQrI9Cop8eC7ybIsvs/KtnNgEBfRMSEa7GqK2VBGUzgjNYMdPIfotyPA==",
70
+ "license": "MIT",
71
+ "resolved": "https://registry.npmjs.org/axios-proxy-builder/-/axios-proxy-builder-0.1.2.tgz",
72
+ "version": "0.1.2"
73
+ },
74
+ "node_modules/call-bind-apply-helpers": {
75
+ "dependencies": {
76
+ "es-errors": "^1.3.0",
77
+ "function-bind": "^1.1.2"
78
+ },
79
+ "engines": {
80
+ "node": ">= 0.4"
81
+ },
82
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
83
+ "license": "MIT",
84
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
85
+ "version": "1.0.2"
86
+ },
87
+ "node_modules/clone": {
88
+ "engines": {
89
+ "node": ">=0.8"
90
+ },
91
+ "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==",
92
+ "license": "MIT",
93
+ "optional": true,
94
+ "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz",
95
+ "version": "1.0.4"
96
+ },
97
+ "node_modules/combined-stream": {
98
+ "dependencies": {
99
+ "delayed-stream": "~1.0.0"
100
+ },
101
+ "engines": {
102
+ "node": ">= 0.8"
103
+ },
104
+ "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
105
+ "license": "MIT",
106
+ "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz",
107
+ "version": "1.0.8"
108
+ },
109
+ "node_modules/console.table": {
110
+ "dependencies": {
111
+ "easy-table": "1.1.0"
112
+ },
113
+ "engines": {
114
+ "node": "> 0.10"
115
+ },
116
+ "integrity": "sha512-dPyZofqggxuvSf7WXvNjuRfnsOk1YazkVP8FdxH4tcH2c37wc79/Yl6Bhr7Lsu00KMgy2ql/qCMuNu8xctZM8g==",
117
+ "license": "MIT",
118
+ "resolved": "https://registry.npmjs.org/console.table/-/console.table-0.10.0.tgz",
119
+ "version": "0.10.0"
120
+ },
121
+ "node_modules/defaults": {
122
+ "dependencies": {
123
+ "clone": "^1.0.2"
124
+ },
125
+ "funding": {
126
+ "url": "https://github.com/sponsors/sindresorhus"
127
+ },
128
+ "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==",
129
+ "license": "MIT",
130
+ "optional": true,
131
+ "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz",
132
+ "version": "1.0.4"
133
+ },
134
+ "node_modules/delayed-stream": {
135
+ "engines": {
136
+ "node": ">=0.4.0"
137
+ },
138
+ "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
139
+ "license": "MIT",
140
+ "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
141
+ "version": "1.0.0"
142
+ },
143
+ "node_modules/detect-libc": {
144
+ "engines": {
145
+ "node": ">=8"
146
+ },
147
+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
148
+ "license": "Apache-2.0",
149
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
150
+ "version": "2.1.2"
151
+ },
152
+ "node_modules/dunder-proto": {
153
+ "dependencies": {
154
+ "call-bind-apply-helpers": "^1.0.1",
155
+ "es-errors": "^1.3.0",
156
+ "gopd": "^1.2.0"
157
+ },
158
+ "engines": {
159
+ "node": ">= 0.4"
160
+ },
161
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
162
+ "license": "MIT",
163
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
164
+ "version": "1.0.1"
165
+ },
166
+ "node_modules/easy-table": {
167
+ "integrity": "sha512-oq33hWOSSnl2Hoh00tZWaIPi1ievrD9aFG82/IgjlycAnW9hHx5PkJiXpxPsgEE+H7BsbVQXFVFST8TEXS6/pA==",
168
+ "license": "MIT",
169
+ "optionalDependencies": {
170
+ "wcwidth": ">=1.0.1"
171
+ },
172
+ "resolved": "https://registry.npmjs.org/easy-table/-/easy-table-1.1.0.tgz",
173
+ "version": "1.1.0"
174
+ },
175
+ "node_modules/es-define-property": {
176
+ "engines": {
177
+ "node": ">= 0.4"
178
+ },
179
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
180
+ "license": "MIT",
181
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
182
+ "version": "1.0.1"
183
+ },
184
+ "node_modules/es-errors": {
185
+ "engines": {
186
+ "node": ">= 0.4"
187
+ },
188
+ "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
189
+ "license": "MIT",
190
+ "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
191
+ "version": "1.3.0"
192
+ },
193
+ "node_modules/es-object-atoms": {
194
+ "dependencies": {
195
+ "es-errors": "^1.3.0"
196
+ },
197
+ "engines": {
198
+ "node": ">= 0.4"
199
+ },
200
+ "integrity": "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==",
201
+ "license": "MIT",
202
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.1.tgz",
203
+ "version": "1.1.1"
204
+ },
205
+ "node_modules/es-set-tostringtag": {
206
+ "dependencies": {
207
+ "es-errors": "^1.3.0",
208
+ "get-intrinsic": "^1.2.6",
209
+ "has-tostringtag": "^1.0.2",
210
+ "hasown": "^2.0.2"
211
+ },
212
+ "engines": {
213
+ "node": ">= 0.4"
214
+ },
215
+ "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==",
216
+ "license": "MIT",
217
+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz",
218
+ "version": "2.1.0"
219
+ },
220
+ "node_modules/follow-redirects": {
221
+ "engines": {
222
+ "node": ">=4.0"
223
+ },
224
+ "funding": [
225
+ {
226
+ "type": "individual",
227
+ "url": "https://github.com/sponsors/RubenVerborgh"
228
+ }
229
+ ],
230
+ "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
231
+ "license": "MIT",
232
+ "peerDependenciesMeta": {
233
+ "debug": {
234
+ "optional": true
235
+ }
236
+ },
237
+ "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
238
+ "version": "1.15.6"
239
+ },
240
+ "node_modules/form-data": {
241
+ "dependencies": {
242
+ "asynckit": "^0.4.0",
243
+ "combined-stream": "^1.0.8",
244
+ "es-set-tostringtag": "^2.1.0",
245
+ "hasown": "^2.0.2",
246
+ "mime-types": "^2.1.12"
247
+ },
248
+ "engines": {
249
+ "node": ">= 6"
250
+ },
251
+ "integrity": "sha512-KrGhL9Q4zjj0kiUt5OO4Mr/A/jlI2jDYs5eHBpYHPcBEVSiipAvn2Ko2HnPe20rmcuuvMHNdZFp+4IlGTMF0Ow==",
252
+ "license": "MIT",
253
+ "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.4.tgz",
254
+ "version": "4.0.4"
255
+ },
256
+ "node_modules/function-bind": {
257
+ "funding": {
258
+ "url": "https://github.com/sponsors/ljharb"
259
+ },
260
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
261
+ "license": "MIT",
262
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
263
+ "version": "1.1.2"
264
+ },
265
+ "node_modules/get-intrinsic": {
266
+ "dependencies": {
267
+ "call-bind-apply-helpers": "^1.0.2",
268
+ "es-define-property": "^1.0.1",
269
+ "es-errors": "^1.3.0",
270
+ "es-object-atoms": "^1.1.1",
271
+ "function-bind": "^1.1.2",
272
+ "get-proto": "^1.0.1",
273
+ "gopd": "^1.2.0",
274
+ "has-symbols": "^1.1.0",
275
+ "hasown": "^2.0.2",
276
+ "math-intrinsics": "^1.1.0"
277
+ },
278
+ "engines": {
279
+ "node": ">= 0.4"
280
+ },
281
+ "funding": {
282
+ "url": "https://github.com/sponsors/ljharb"
283
+ },
284
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
285
+ "license": "MIT",
286
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
287
+ "version": "1.3.0"
288
+ },
289
+ "node_modules/get-proto": {
290
+ "dependencies": {
291
+ "dunder-proto": "^1.0.1",
292
+ "es-object-atoms": "^1.0.0"
293
+ },
294
+ "engines": {
295
+ "node": ">= 0.4"
296
+ },
297
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
298
+ "license": "MIT",
299
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
300
+ "version": "1.0.1"
301
+ },
302
+ "node_modules/glob": {
303
+ "dependencies": {
304
+ "minimatch": "^10.1.1",
305
+ "minipass": "^7.1.2",
306
+ "path-scurry": "^2.0.0"
307
+ },
308
+ "engines": {
309
+ "node": "20 || >=22"
310
+ },
311
+ "funding": {
312
+ "url": "https://github.com/sponsors/isaacs"
313
+ },
314
+ "integrity": "sha512-tvZgpqk6fz4BaNZ66ZsRaZnbHvP/jG3uKJvAZOwEVUL4RTA5nJeeLYfyN9/VA8NX/V3IBG+hkeuGpKjvELkVhA==",
315
+ "license": "BlueOak-1.0.0",
316
+ "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.0.tgz",
317
+ "version": "13.0.0"
318
+ },
319
+ "node_modules/gopd": {
320
+ "engines": {
321
+ "node": ">= 0.4"
322
+ },
323
+ "funding": {
324
+ "url": "https://github.com/sponsors/ljharb"
325
+ },
326
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
327
+ "license": "MIT",
328
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
329
+ "version": "1.2.0"
330
+ },
331
+ "node_modules/has-symbols": {
332
+ "engines": {
333
+ "node": ">= 0.4"
334
+ },
335
+ "funding": {
336
+ "url": "https://github.com/sponsors/ljharb"
337
+ },
338
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
339
+ "license": "MIT",
340
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
341
+ "version": "1.1.0"
342
+ },
343
+ "node_modules/has-tostringtag": {
344
+ "dependencies": {
345
+ "has-symbols": "^1.0.3"
346
+ },
347
+ "engines": {
348
+ "node": ">= 0.4"
349
+ },
350
+ "funding": {
351
+ "url": "https://github.com/sponsors/ljharb"
352
+ },
353
+ "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==",
354
+ "license": "MIT",
355
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz",
356
+ "version": "1.0.2"
357
+ },
358
+ "node_modules/hasown": {
359
+ "dependencies": {
360
+ "function-bind": "^1.1.2"
361
+ },
362
+ "engines": {
363
+ "node": ">= 0.4"
364
+ },
365
+ "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==",
366
+ "license": "MIT",
367
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz",
368
+ "version": "2.0.2"
369
+ },
370
+ "node_modules/lru-cache": {
371
+ "engines": {
372
+ "node": "20 || >=22"
373
+ },
374
+ "integrity": "sha512-B5Y16Jr9LB9dHVkh6ZevG+vAbOsNOYCX+sXvFWFu7B3Iz5mijW3zdbMyhsh8ANd2mSWBYdJgnqi+mL7/LrOPYg==",
375
+ "license": "BlueOak-1.0.0",
376
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.2.4.tgz",
377
+ "version": "11.2.4"
378
+ },
379
+ "node_modules/math-intrinsics": {
380
+ "engines": {
381
+ "node": ">= 0.4"
382
+ },
383
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
384
+ "license": "MIT",
385
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
386
+ "version": "1.1.0"
387
+ },
388
+ "node_modules/mime-db": {
389
+ "engines": {
390
+ "node": ">= 0.6"
391
+ },
392
+ "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
393
+ "license": "MIT",
394
+ "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz",
395
+ "version": "1.52.0"
396
+ },
397
+ "node_modules/mime-types": {
398
+ "dependencies": {
399
+ "mime-db": "1.52.0"
400
+ },
401
+ "engines": {
402
+ "node": ">= 0.6"
403
+ },
404
+ "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
405
+ "license": "MIT",
406
+ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz",
407
+ "version": "2.1.35"
408
+ },
409
+ "node_modules/minimatch": {
410
+ "dependencies": {
411
+ "@isaacs/brace-expansion": "^5.0.0"
412
+ },
413
+ "engines": {
414
+ "node": "20 || >=22"
415
+ },
416
+ "funding": {
417
+ "url": "https://github.com/sponsors/isaacs"
418
+ },
419
+ "integrity": "sha512-enIvLvRAFZYXJzkCYG5RKmPfrFArdLv+R+lbQ53BmIMLIry74bjKzX6iHAm8WYamJkhSSEabrWN5D97XnKObjQ==",
420
+ "license": "BlueOak-1.0.0",
421
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.1.1.tgz",
422
+ "version": "10.1.1"
423
+ },
424
+ "node_modules/minipass": {
425
+ "engines": {
426
+ "node": ">=16 || 14 >=14.17"
427
+ },
428
+ "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==",
429
+ "license": "ISC",
430
+ "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz",
431
+ "version": "7.1.2"
432
+ },
433
+ "node_modules/package-json-from-dist": {
434
+ "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==",
435
+ "license": "BlueOak-1.0.0",
436
+ "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz",
437
+ "version": "1.0.1"
438
+ },
439
+ "node_modules/path-scurry": {
440
+ "dependencies": {
441
+ "lru-cache": "^11.0.0",
442
+ "minipass": "^7.1.2"
443
+ },
444
+ "engines": {
445
+ "node": "20 || >=22"
446
+ },
447
+ "funding": {
448
+ "url": "https://github.com/sponsors/isaacs"
449
+ },
450
+ "integrity": "sha512-oWyT4gICAu+kaA7QWk/jvCHWarMKNs6pXOGWKDTr7cw4IGcUbW+PeTfbaQiLGheFRpjo6O9J0PmyMfQPjH71oA==",
451
+ "license": "BlueOak-1.0.0",
452
+ "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.1.tgz",
453
+ "version": "2.0.1"
454
+ },
455
+ "node_modules/prettier": {
456
+ "bin": {
457
+ "prettier": "bin/prettier.cjs"
458
+ },
459
+ "dev": true,
460
+ "engines": {
461
+ "node": ">=14"
462
+ },
463
+ "funding": {
464
+ "url": "https://github.com/prettier/prettier?sponsor=1"
465
+ },
466
+ "integrity": "sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==",
467
+ "license": "MIT",
468
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.7.4.tgz",
469
+ "version": "3.7.4"
470
+ },
471
+ "node_modules/proxy-from-env": {
472
+ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
473
+ "license": "MIT",
474
+ "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
475
+ "version": "1.1.0"
476
+ },
477
+ "node_modules/rimraf": {
478
+ "bin": {
479
+ "rimraf": "dist/esm/bin.mjs"
480
+ },
481
+ "dependencies": {
482
+ "glob": "^13.0.0",
483
+ "package-json-from-dist": "^1.0.1"
484
+ },
485
+ "engines": {
486
+ "node": "20 || >=22"
487
+ },
488
+ "funding": {
489
+ "url": "https://github.com/sponsors/isaacs"
490
+ },
491
+ "integrity": "sha512-cFCkPslJv7BAXJsYlK1dZsbP8/ZNLkCAQ0bi1hf5EKX2QHegmDFEFA6QhuYJlk7UDdc+02JjO80YSOrWPpw06g==",
492
+ "license": "BlueOak-1.0.0",
493
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.2.tgz",
494
+ "version": "6.1.2"
495
+ },
496
+ "node_modules/tunnel": {
497
+ "engines": {
498
+ "node": ">=0.6.11 <=0.7.0 || >=0.7.3"
499
+ },
500
+ "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==",
501
+ "license": "MIT",
502
+ "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
503
+ "version": "0.0.6"
504
+ },
505
+ "node_modules/wcwidth": {
506
+ "dependencies": {
507
+ "defaults": "^1.0.3"
508
+ },
509
+ "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==",
510
+ "license": "MIT",
511
+ "optional": true,
512
+ "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",
513
+ "version": "1.0.1"
514
+ }
515
+ },
516
+ "requires": true,
517
+ "version": "0.0.25"
518
+ }
package/package.json ADDED
@@ -0,0 +1,91 @@
1
+ {
2
+ "artifactDownloadUrl": "https://github.com/shaankhosla/repeater/releases/download/v0.0.25",
3
+ "author": "shaankhosla",
4
+ "bin": {
5
+ "repeater": "run-repeater.js"
6
+ },
7
+ "dependencies": {
8
+ "axios": "^1.13.2",
9
+ "axios-proxy-builder": "^0.1.2",
10
+ "console.table": "^0.10.0",
11
+ "detect-libc": "^2.1.2",
12
+ "rimraf": "^6.1.2"
13
+ },
14
+ "description": "Spaced repetition, in your terminal",
15
+ "devDependencies": {
16
+ "prettier": "^3.7.4"
17
+ },
18
+ "engines": {
19
+ "node": ">=14",
20
+ "npm": ">=6"
21
+ },
22
+ "glibcMinimum": {
23
+ "major": 2,
24
+ "series": 35
25
+ },
26
+ "homepage": "https://github.com/shaankhosla/repeater",
27
+ "name": "@shaankhosla/repeater",
28
+ "preferUnplugged": true,
29
+ "repository": "https://github.com/shaankhosla/repeater",
30
+ "scripts": {
31
+ "fmt": "prettier --write **/*.js",
32
+ "fmt:check": "prettier --check **/*.js",
33
+ "postinstall": "node ./install.js"
34
+ },
35
+ "supportedPlatforms": {
36
+ "aarch64-apple-darwin": {
37
+ "artifactName": "repeater-aarch64-apple-darwin.tar.xz",
38
+ "bins": {
39
+ "repeater": "repeater"
40
+ },
41
+ "zipExt": ".tar.xz"
42
+ },
43
+ "aarch64-pc-windows-msvc": {
44
+ "artifactName": "repeater-x86_64-pc-windows-msvc.zip",
45
+ "bins": {
46
+ "repeater": "repeater.exe"
47
+ },
48
+ "zipExt": ".zip"
49
+ },
50
+ "aarch64-unknown-linux-gnu": {
51
+ "artifactName": "repeater-aarch64-unknown-linux-gnu.tar.xz",
52
+ "bins": {
53
+ "repeater": "repeater"
54
+ },
55
+ "zipExt": ".tar.xz"
56
+ },
57
+ "x86_64-apple-darwin": {
58
+ "artifactName": "repeater-x86_64-apple-darwin.tar.xz",
59
+ "bins": {
60
+ "repeater": "repeater"
61
+ },
62
+ "zipExt": ".tar.xz"
63
+ },
64
+ "x86_64-pc-windows-gnu": {
65
+ "artifactName": "repeater-x86_64-pc-windows-msvc.zip",
66
+ "bins": {
67
+ "repeater": "repeater.exe"
68
+ },
69
+ "zipExt": ".zip"
70
+ },
71
+ "x86_64-pc-windows-msvc": {
72
+ "artifactName": "repeater-x86_64-pc-windows-msvc.zip",
73
+ "bins": {
74
+ "repeater": "repeater.exe"
75
+ },
76
+ "zipExt": ".zip"
77
+ },
78
+ "x86_64-unknown-linux-gnu": {
79
+ "artifactName": "repeater-x86_64-unknown-linux-gnu.tar.xz",
80
+ "bins": {
81
+ "repeater": "repeater"
82
+ },
83
+ "zipExt": ".tar.xz"
84
+ }
85
+ },
86
+ "version": "0.0.25",
87
+ "volta": {
88
+ "node": "18.14.1",
89
+ "npm": "9.5.0"
90
+ }
91
+ }
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { run } = require("./binary");
4
+ run("repeater");