extwee 2.2.6 → 2.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.
Files changed (63) hide show
  1. package/.github/dependabot.yml +1 -1
  2. package/.github/workflows/dependabot-automerge.yml +23 -0
  3. package/.github/workflows/nodejs.yml +4 -1
  4. package/README.md +9 -0
  5. package/SECURITY.md +1 -1
  6. package/build/extwee.web.min.js +2 -0
  7. package/build/extwee.web.min.js.LICENSE.txt +1 -0
  8. package/docs/README.md +79 -55
  9. package/docs/_sidebar.md +0 -1
  10. package/docs/install/npm.md +0 -4
  11. package/docs/install/npx.md +70 -0
  12. package/extwee.config.json +6 -0
  13. package/extwee.config.md +67 -0
  14. package/package.json +22 -22
  15. package/src/CLI/CommandLineProcessing.js +196 -0
  16. package/src/CLI/ProcessConfig/loadStoryFormat.js +102 -0
  17. package/src/CLI/ProcessConfig/readDirectories.js +46 -0
  18. package/src/CLI/ProcessConfig.js +175 -0
  19. package/src/CLI/isDirectory.js +27 -0
  20. package/src/CLI/isFile.js +28 -0
  21. package/src/Config/parser.js +30 -8
  22. package/src/Passage.js +17 -2
  23. package/src/Story.js +92 -1
  24. package/src/extwee.js +20 -195
  25. package/test/Config/Config.test.js +40 -10
  26. package/test/Config/files/full.json +8 -0
  27. package/test/Config/files/valid.json +4 -3
  28. package/test/Config/isDirectory.test.js +44 -0
  29. package/test/Config/isFile.test.js +50 -0
  30. package/test/Config/loadStoryFormat.test.js +101 -0
  31. package/test/Config/readDirectories.test.js +68 -0
  32. package/test/Objects/Passage.test.js +5 -0
  33. package/test/Objects/Story.test.js +131 -0
  34. package/test/TWS/Parse.test.js +0 -22
  35. package/test/Web/window.Extwee.test.js +85 -0
  36. package/types/Story.d.ts +25 -0
  37. package/types/index.d.ts +4 -2
  38. package/types/src/CLI/CommandLineProcessing.d.ts +8 -0
  39. package/types/src/CLI/ProcessConfig/loadStoryFormat.d.ts +20 -0
  40. package/types/src/CLI/ProcessConfig/readDirectories.d.ts +9 -0
  41. package/types/src/CLI/ProcessConfig.d.ts +12 -0
  42. package/types/src/CLI/isDirectory.d.ts +1 -0
  43. package/types/src/CLI/isFile.d.ts +1 -0
  44. package/types/src/Config/parser.d.ts +6 -0
  45. package/types/src/Config/reader.d.ts +11 -0
  46. package/types/src/IFID/generate.d.ts +14 -0
  47. package/types/src/JSON/parse.d.ts +44 -1
  48. package/types/src/Passage.d.ts +49 -4
  49. package/types/src/Story.d.ts +110 -16
  50. package/types/src/StoryFormat/compile.d.ts +8 -0
  51. package/types/src/StoryFormat/parse.d.ts +46 -3
  52. package/types/src/StoryFormat.d.ts +69 -38
  53. package/types/src/TWS/parse.d.ts +3 -3
  54. package/types/src/Twee/parse.d.ts +3 -4
  55. package/types/src/Twine1HTML/compile.d.ts +3 -1
  56. package/types/src/Twine1HTML/parse.d.ts +3 -4
  57. package/types/src/Twine2ArchiveHTML/compile.d.ts +8 -0
  58. package/types/src/Twine2ArchiveHTML/parse.d.ts +31 -1
  59. package/types/src/Twine2HTML/compile.d.ts +7 -2
  60. package/types/src/Twine2HTML/parse.d.ts +12 -9
  61. package/docs/install/binaries.md +0 -9
  62. package/index.html +0 -22
  63. package/test/TWS/TWSParser/Example1.tws +0 -150
@@ -8,4 +8,4 @@ updates:
8
8
  - package-ecosystem: "npm" # See documentation for possible values
9
9
  directory: "/" # Location of package manifests
10
10
  schedule:
11
- interval: "weekly"
11
+ interval: "monthly"
@@ -0,0 +1,23 @@
1
+ name: Dependabot auto-merge
2
+ on: pull_request
3
+
4
+ permissions:
5
+ contents: write
6
+ pull-requests: write
7
+
8
+ jobs:
9
+ dependabot:
10
+ runs-on: ubuntu-latest
11
+ if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'videlais/extwee'
12
+ steps:
13
+ - name: Dependabot metadata
14
+ id: metadata
15
+ uses: dependabot/fetch-metadata@d7267f607e9d3fb96fc2fbe83e0af444713e90b7
16
+ with:
17
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
18
+ - name: Enable auto-merge for Dependabot PRs
19
+ if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
20
+ run: gh pr merge --auto --merge "$PR_URL"
21
+ env:
22
+ PR_URL: ${{github.event.pull_request.html_url}}
23
+ GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
@@ -2,6 +2,9 @@ name: Node CI
2
2
 
3
3
  on: [push]
4
4
 
5
+ permissions:
6
+ contents: read
7
+
5
8
  jobs:
6
9
  build:
7
10
 
@@ -9,7 +12,7 @@ jobs:
9
12
 
10
13
  strategy:
11
14
  matrix:
12
- node-version: [20.x]
15
+ node-version: [23.x]
13
16
 
14
17
  steps:
15
18
  - uses: actions/checkout@v4
package/README.md CHANGED
@@ -21,6 +21,7 @@
21
21
  </ol>
22
22
  <li><a href="#documentation">Documentation</a></li>
23
23
  <li><a href="#command-line-usage">Command-Line Usage</a></li>
24
+ <li><a href="#config-file-usage">Config File Usage</a></li>
24
25
  <li><a href="#escaping- meta-characters">Escaping Meta-Characters</a></li>
25
26
  <li><a href="#license">License</a></li>
26
27
  </ol>
@@ -169,6 +170,14 @@ Enabling Twine 1 mode requires using the `--twine1` flag.
169
170
 
170
171
  <p align="right">(<a href="#readme-top">back to top</a>)</p>
171
172
 
173
+ ## Config File Usage
174
+
175
+ When invoked from its command-line interface using `npx extwee`, it will look for a `extwee.config.json` file in the local directory. If found, and its fields are valid, processing will use the values found in the file.
176
+
177
+ Consult the possible options in its [dedicated file](extwee.config.md).
178
+
179
+ <p align="right">(<a href="#readme-top">back to top</a>)</p>
180
+
172
181
  ## Tree Shaking Support
173
182
 
174
183
  For [advanced tree shaking](https://developer.mozilla.org/en-US/docs/Glossary/Tree_shaking) patterns, most formats are broke into `compile.js` and `parse.js` files exporting associated `compile()` and `parse()` functions.
package/SECURITY.md CHANGED
@@ -5,7 +5,7 @@
5
5
  | Version | Supported |
6
6
  | ------- | ------------------ |
7
7
  | 1.6 | :x: |
8
- | 2.2 | :white_check_mark: |
8
+ | 2.X | :white_check_mark: |
9
9
 
10
10
  ## Reporting a Vulnerability
11
11