fscr 6.2.6 → 7.3.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.
- package/README.md +48 -30
- package/dist/index.js +502 -186
- package/dist/lib/auth/auth-conf.js +49 -45
- package/dist/lib/cache/README.md +341 -0
- package/dist/lib/cache/cli.js +152 -0
- package/dist/lib/cache/file-watcher.js +193 -0
- package/dist/lib/cache/index.js +422 -0
- package/dist/lib/cache/monitor.js +224 -0
- package/dist/lib/commands/doctor.js +225 -0
- package/dist/lib/completions/completion.js +342 -0
- package/dist/lib/completions/generator.js +152 -0
- package/dist/lib/completions/scripts/bash.sh +108 -0
- package/dist/lib/completions/scripts/fish.sh +105 -0
- package/dist/lib/completions/scripts/powershell.ps1 +168 -0
- package/dist/lib/completions/scripts/zsh.sh +124 -0
- package/dist/lib/diagnostics/cache.js +121 -0
- package/dist/lib/diagnostics/fileSystem.js +236 -0
- package/dist/lib/diagnostics/gitCheck.js +41 -0
- package/dist/lib/diagnostics/nodeVersion.js +68 -0
- package/dist/lib/diagnostics/packageManager.js +64 -0
- package/dist/lib/diagnostics/performance.js +141 -0
- package/dist/lib/encryption/decryptConfig.js +3 -2
- package/dist/lib/encryption/encryption.js +153 -113
- package/dist/lib/generators/generateFScripts.js +16 -13
- package/dist/lib/generators/generateToc.js +23 -14
- package/dist/lib/generators/index.js +1 -1
- package/dist/lib/git/pub.js +27 -17
- package/dist/lib/git/taskRunner.js +79 -69
- package/dist/lib/git/validateNotDev.js +65 -54
- package/dist/lib/optionList.js +69 -57
- package/dist/lib/parsers/parseScriptsMd.cached.js +208 -0
- package/dist/lib/parsers/parseScriptsMd.js +88 -79
- package/dist/lib/parsers/parseScriptsPackage.js +4 -3
- package/dist/lib/performance/cache.js +199 -0
- package/dist/lib/performance/lazy-loader.js +189 -0
- package/dist/lib/performance/monitor.js +303 -0
- package/dist/lib/plugins/deployment/index.js +112 -0
- package/dist/lib/plugins/hooks.js +17 -0
- package/dist/lib/plugins/loader.js +91 -0
- package/dist/lib/plugins/task-notifier/index.js +72 -0
- package/dist/lib/release/bump.js +50 -45
- package/dist/lib/release/commitWithMessage.js +80 -52
- package/dist/lib/release/publish.js +19 -14
- package/dist/lib/release/pushToGit.js +40 -31
- package/dist/lib/release/releasenotes.js +116 -97
- package/dist/lib/release/seeChangedFiles.js +68 -60
- package/dist/lib/release/sort.js +200 -116
- package/dist/lib/release/tree.js +161 -147
- package/dist/lib/release/validateNotDev.js +52 -44
- package/dist/lib/running/index.js +1 -1
- package/dist/lib/running/runCLICommand.js +41 -31
- package/dist/lib/running/runParallel.js +61 -59
- package/dist/lib/running/runSequence.js +55 -53
- package/dist/lib/startScripts.js +129 -114
- package/dist/lib/taskList.js +97 -90
- package/dist/lib/test-files/.fscripts.md +113 -0
- package/dist/lib/test-files/.fscripts.test.md +103 -0
- package/dist/lib/test-files/.fscriptsb.md +107 -0
- package/dist/lib/test-files/.mdtest.md +40 -0
- package/dist/lib/test-files/consoleSample.js +13 -9
- package/dist/lib/test-files/inputSample.js +17 -14
- package/dist/lib/test-files/testConsole.js +1 -1
- package/dist/lib/test-files/testInput.js +1 -1
- package/dist/lib/upgradePackages.js +56 -46
- package/dist/lib/utils/clear.js +16 -13
- package/dist/lib/utils/console.js +27 -21
- package/dist/lib/utils/encryption.js +55 -13
- package/dist/lib/utils/hash.js +128 -0
- package/dist/lib/utils/helpers.js +153 -142
- package/dist/lib/utils/index.js +1 -1
- package/dist/lib/utils/prompt.js +24 -29
- package/package.json +15 -62
package/README.md
CHANGED
|
@@ -1,53 +1,71 @@
|
|
|
1
|
-
|
|
1
|
+
# fsr — the Freedcamp Script Runner (`fsr`)
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> The simplest way to run your npm‑type tasks. Write a beautiful, documented Markdown file —
|
|
4
|
+
> `fsr` runs it for you, with a lot of flexibility.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
# Group 1
|
|
9
|
-
|
|
10
|
-
## run
|
|
6
|
+
Instead of cramming logic into `package.json` `"scripts"`, you keep an **`fscripts.md`** file
|
|
7
|
+
where every task is a Markdown section: a title, an optional description, and a fenced code
|
|
8
|
+
block. `fsr` parses it and runs the task you pick — interactively or by name.
|
|
11
9
|
|
|
12
10
|
```bash
|
|
13
|
-
|
|
11
|
+
npm install -g fsr # gives you the `fsr` and `fsr` commands
|
|
12
|
+
fsr # interactive menu
|
|
13
|
+
fsr run start:web # run a specific task
|
|
14
|
+
fsr list # fuzzy-find any task
|
|
14
15
|
```
|
|
15
16
|
|
|
17
|
+
## Example `fscripts.md`
|
|
18
|
+
|
|
19
|
+
````markdown
|
|
20
|
+
# Start Scripts
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
Start running in development mode
|
|
18
23
|
|
|
19
|
-
|
|
20
|
-
yarn fsr run-s run:one run:two
|
|
21
|
-
```
|
|
24
|
+
## start:web
|
|
22
25
|
|
|
23
|
-
|
|
26
|
+
Boots the web server with hot reload.
|
|
24
27
|
|
|
25
|
-
```
|
|
26
|
-
|
|
28
|
+
```bash
|
|
29
|
+
NODE_ENV=development vite
|
|
27
30
|
```
|
|
28
31
|
|
|
29
|
-
##
|
|
32
|
+
## say:hello
|
|
30
33
|
|
|
31
|
-
```
|
|
32
|
-
console.log(
|
|
34
|
+
```javascript
|
|
35
|
+
console.log(`HELLO! ${Date.now()}`);
|
|
33
36
|
```
|
|
34
37
|
````
|
|
35
38
|
|
|
36
|
-
Each
|
|
39
|
+
Each `#` heading is a **category**; each `##` heading is a **task** (its title is the task
|
|
40
|
+
name, the paragraph after it is the description, and the following code block is the script).
|
|
41
|
+
` ```bash ` blocks run as shell commands; ` ```javascript ` blocks run in‑process.
|
|
37
42
|
|
|
38
|
-
|
|
39
|
-
# Start Scripts
|
|
43
|
+
## Common commands
|
|
40
44
|
|
|
41
|
-
|
|
45
|
+
| Command | What it does |
|
|
46
|
+
|---|---|
|
|
47
|
+
| `fsr` | Interactive top‑level menu |
|
|
48
|
+
| `fsr start` | Pick a category, then a task (recent tasks pinned on top) |
|
|
49
|
+
| `fsr list` | Fuzzy‑autocomplete across all tasks |
|
|
50
|
+
| `fsr run <task>` | Run one task by name |
|
|
51
|
+
| `fsr run-s <a> <b>` | Run tasks **sequentially** |
|
|
52
|
+
| `fsr run-p <a> <b>` | Run tasks **in parallel** |
|
|
53
|
+
| `fsr generate` | Scaffold `sample.fscripts.md` from `package.json` |
|
|
54
|
+
| `fsr toc` | Generate/refresh the table of contents |
|
|
55
|
+
| `fsr doctor` | Environment diagnostics (`--fix` to auto‑fix) |
|
|
56
|
+
| `fsr encryption` | Encrypt/decrypt secret files (AES‑192‑CBC) |
|
|
57
|
+
| `fsr upgrade` / `fsr bump` | Upgrade deps / bump version |
|
|
42
58
|
|
|
43
|
-
##
|
|
59
|
+
## 📖 Full documentation
|
|
44
60
|
|
|
45
|
-
|
|
61
|
+
**See [`docs/FSR.md`](./docs/FSR.md) for the complete guide** to the `fscripts.md` format,
|
|
62
|
+
every command and option, configuration, encryption, caching, and shell completions.
|
|
46
63
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
```
|
|
64
|
+
Other references live in [`docs/`](./docs); historical v7 implementation notes are archived in
|
|
65
|
+
[`docs/archive/`](./docs/archive).
|
|
50
66
|
|
|
51
|
-
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
> The sample `config.json` in this repo decrypts with the password **`secret`**.
|
|
52
70
|
|
|
53
|
-
|
|
71
|
+
MIT © Angel Grablev
|