spec-up-t 1.1.16 → 1.1.17
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spec-up-t",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.17",
|
|
4
4
|
"description": "Technical specification drafting tool that generates rich specification documents from markdown. Forked from https://github.com/decentralized-identity/spec-up by Daniel Buchner (https://github.com/csuwildcat)",
|
|
5
5
|
"main": "./index",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@ function collectExternalReferences(options = {}) {
|
|
|
31
31
|
`;
|
|
32
32
|
|
|
33
33
|
const explanationNoExternalReferences =
|
|
34
|
-
|
|
34
|
+
`❌ No external references were found in the specs.json file.
|
|
35
35
|
|
|
36
36
|
There is no point in continuing without external references, so we stop here.
|
|
37
37
|
|
|
@@ -30,25 +30,35 @@ jobs:
|
|
|
30
30
|
contents: write
|
|
31
31
|
steps:
|
|
32
32
|
- name: Checkout 🛎️
|
|
33
|
-
uses: actions/checkout@
|
|
33
|
+
uses: actions/checkout@v4
|
|
34
34
|
with:
|
|
35
35
|
persist-credentials: false
|
|
36
36
|
|
|
37
|
+
- name: Set up Node.js
|
|
38
|
+
uses: actions/setup-node@v4
|
|
39
|
+
with:
|
|
40
|
+
node-version: '18'
|
|
41
|
+
|
|
37
42
|
- name: Extract output_path from JSON
|
|
38
|
-
|
|
43
|
+
id: extract-output
|
|
39
44
|
run: |
|
|
40
|
-
OUTPUT_PATH=$(jq -r '.specs[0].output_path' specs.json)
|
|
45
|
+
OUTPUT_PATH=$(jq -r '.specs[0].output_path // "default/output"' specs.json)
|
|
46
|
+
if [ "$OUTPUT_PATH" = "null" ] || [ -z "$OUTPUT_PATH" ]; then
|
|
47
|
+
echo "Error: Unable to extract output_path from specs.json"
|
|
48
|
+
exit 1
|
|
49
|
+
fi
|
|
41
50
|
echo "OUTPUT_PATH=$OUTPUT_PATH" >> $GITHUB_ENV
|
|
42
51
|
|
|
43
|
-
- name: Install
|
|
52
|
+
- name: Install dependencies 🔧
|
|
44
53
|
run: |
|
|
45
|
-
echo "
|
|
54
|
+
echo "Installing dependencies..."
|
|
46
55
|
npm install
|
|
47
|
-
echo "end install"
|
|
48
56
|
echo "Spec-Up-T version:"
|
|
49
|
-
npm list spec-up-t
|
|
57
|
+
npm list spec-up-t || echo "spec-up-t not found"
|
|
50
58
|
|
|
51
59
|
- name: Run selected script
|
|
60
|
+
env:
|
|
61
|
+
MY_PAT: ${{ secrets.MY_PAT }} # Make the secret available as an env var
|
|
52
62
|
run: |
|
|
53
63
|
case ${{ github.event.inputs.script }} in
|
|
54
64
|
"edit")
|
|
@@ -64,7 +74,7 @@ jobs:
|
|
|
64
74
|
node --no-warnings -e "require('spec-up-t/src/collect-external-references.js').collectExternalReferences({cache: true})"
|
|
65
75
|
;;
|
|
66
76
|
"collectExternalReferencesNoCache")
|
|
67
|
-
node --no-warnings -e "require('spec-up-t/src/collect-external-references.js').collectExternalReferences({cache: false})"
|
|
77
|
+
node --no-warnings -e "require('spec-up-t/src/collect-external-references.js').collectExternalReferences({cache: false, pat: process.env.MY_PAT})"
|
|
68
78
|
;;
|
|
69
79
|
"topdf")
|
|
70
80
|
node -e "require('spec-up-t/src/create-pdf.js')"
|
|
@@ -76,10 +86,7 @@ jobs:
|
|
|
76
86
|
node -e "require('spec-up-t/src/references.js')"
|
|
77
87
|
;;
|
|
78
88
|
"help")
|
|
79
|
-
cat ./node_modules/spec-up-t/src/install-from-boilerplate/help.txt
|
|
80
|
-
;;
|
|
81
|
-
"menu")
|
|
82
|
-
bash ./node_modules/spec-up-t/src/install-from-boilerplate/menu.sh
|
|
89
|
+
cat ./node_modules/spec-up-t/src/install-from-boilerplate/help.txt || echo "Help file not found"
|
|
83
90
|
;;
|
|
84
91
|
"addremovexrefsource")
|
|
85
92
|
node --no-warnings -e "require('spec-up-t/src/add-remove-xref-source.js')"
|
|
@@ -91,20 +98,22 @@ jobs:
|
|
|
91
98
|
npm update && node -e "require('spec-up-t/src/install-from-boilerplate/custom-update.js')"
|
|
92
99
|
;;
|
|
93
100
|
*)
|
|
94
|
-
echo "Unknown script
|
|
101
|
+
echo "Unknown script: ${{ github.event.inputs.script }}"
|
|
95
102
|
exit 1
|
|
96
103
|
;;
|
|
97
104
|
esac
|
|
98
105
|
|
|
99
|
-
- name:
|
|
100
|
-
|
|
101
|
-
echo "end render"
|
|
102
|
-
rm -rf node_modules
|
|
103
|
-
|
|
104
|
-
- name: Deploy
|
|
106
|
+
- name: Deploy to GitHub Pages
|
|
107
|
+
if: success() && github.event.inputs.script != 'help'
|
|
105
108
|
uses: peaceiris/actions-gh-pages@v3.7.3
|
|
106
109
|
with:
|
|
107
110
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
108
111
|
publish_dir: ${{ env.OUTPUT_PATH }}
|
|
109
112
|
allow_empty_commit: true
|
|
110
|
-
force_orphan: true
|
|
113
|
+
force_orphan: true
|
|
114
|
+
|
|
115
|
+
- name: Clean up
|
|
116
|
+
if: always() # Run even if previous steps fail
|
|
117
|
+
run: |
|
|
118
|
+
echo "Cleaning up..."
|
|
119
|
+
rm -rf node_modules
|