spec-up-t 1.6.16 → 1.6.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.6.
|
|
3
|
+
"version": "1.6.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": {
|
|
@@ -30,10 +30,17 @@ async function updateGitignore(gitignorePath, filesToAdd) {
|
|
|
30
30
|
// Split the content into lines and remove empty lines
|
|
31
31
|
const gitignoreLines = gitignoreContent.split('\n').filter(line => line.trim() !== '');
|
|
32
32
|
|
|
33
|
-
// Add files to .gitignore if they are not already present
|
|
33
|
+
// Add files to .gitignore if they are not already present.
|
|
34
|
+
// Strip inline comments from existing lines before comparing, so that
|
|
35
|
+
// entries like "*.lnk # some comment" are not duplicated.
|
|
34
36
|
filesToAdd.forEach(file => {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
const pattern = file.trim();
|
|
38
|
+
const alreadyPresent = gitignoreLines.some(line => {
|
|
39
|
+
const linePattern = line.trim().split('#')[0].trim();
|
|
40
|
+
return linePattern === pattern;
|
|
41
|
+
});
|
|
42
|
+
if (!alreadyPresent) {
|
|
43
|
+
gitignoreLines.push(pattern);
|
|
37
44
|
}
|
|
38
45
|
});
|
|
39
46
|
|
|
@@ -3,19 +3,41 @@ const path = require('path');
|
|
|
3
3
|
// Configuration
|
|
4
4
|
const gitIgnoreEntries = {
|
|
5
5
|
gitignorePath: path.join(process.cwd(), '.gitignore'),
|
|
6
|
-
filesToAdd: [
|
|
6
|
+
filesToAdd: [
|
|
7
|
+
// Generated by render-and-deploy.yml — do not commit build output
|
|
8
|
+
'docs/',
|
|
9
|
+
// Dependencies
|
|
10
|
+
'node_modules/',
|
|
11
|
+
// Logs
|
|
7
12
|
'*.log',
|
|
8
|
-
|
|
13
|
+
// Editor / OS temporaries & backups
|
|
9
14
|
'*.bak',
|
|
10
15
|
'*.tmp',
|
|
16
|
+
'.idea',
|
|
17
|
+
'.vscode/',
|
|
18
|
+
// Environment / secrets
|
|
19
|
+
'.env*',
|
|
20
|
+
// Test coverage
|
|
21
|
+
'coverage/',
|
|
22
|
+
// Various caches & history
|
|
23
|
+
'.history/',
|
|
24
|
+
'.cache/',
|
|
25
|
+
// macOS
|
|
11
26
|
'.DS_Store',
|
|
12
|
-
'.
|
|
13
|
-
'
|
|
14
|
-
|
|
15
|
-
'.
|
|
16
|
-
|
|
17
|
-
'
|
|
18
|
-
|
|
27
|
+
'.AppleDouble',
|
|
28
|
+
'.LSOverride',
|
|
29
|
+
// Windows
|
|
30
|
+
'Thumbs.db',
|
|
31
|
+
'ehthumbs.db',
|
|
32
|
+
'Desktop.ini',
|
|
33
|
+
'$RECYCLE.BIN/',
|
|
34
|
+
'*.lnk',
|
|
35
|
+
// Linux / Ubuntu / general Unix-like
|
|
36
|
+
'*~',
|
|
37
|
+
'.*.swp',
|
|
38
|
+
'.*.swo',
|
|
39
|
+
'.fuse_hidden*',
|
|
40
|
+
],
|
|
19
41
|
};
|
|
20
42
|
|
|
21
43
|
module.exports = { gitIgnoreEntries };
|
|
@@ -111,9 +111,12 @@ function migrateVersionsToSnapshots(outputPath) {
|
|
|
111
111
|
}
|
|
112
112
|
|
|
113
113
|
if (migratedCount > 0) {
|
|
114
|
-
Logger.
|
|
115
|
-
`Migrated ${migratedCount} snapshot(s) from ${src} to ${dest}
|
|
116
|
-
|
|
114
|
+
Logger.action(
|
|
115
|
+
`Migrated ${migratedCount} snapshot(s) from ${src} to ${dest}/.`,
|
|
116
|
+
{
|
|
117
|
+
hint: `git rm -r --cached ${outputPath}`,
|
|
118
|
+
context: 'Remove old docs from git tracking'
|
|
119
|
+
}
|
|
117
120
|
);
|
|
118
121
|
}
|
|
119
122
|
}
|
package/src/utils/logger.js
CHANGED
|
@@ -131,6 +131,66 @@ class Logger {
|
|
|
131
131
|
console.log(); // Extra newline for readability
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Action required messages - red with pointing hand icon
|
|
136
|
+
*
|
|
137
|
+
* Indicates that the user must take action to proceed.
|
|
138
|
+
* More urgent than a warning, used when user intervention is required.
|
|
139
|
+
*
|
|
140
|
+
* @param {string} message - The main action required message
|
|
141
|
+
* @param {...any} args - Additional arguments. Can include:
|
|
142
|
+
* - Regular values (strings, numbers, objects) for message formatting
|
|
143
|
+
* - An options object (if last arg is object with 'hint', 'context', or 'details' keys):
|
|
144
|
+
* - hint: Clear instruction on what action to take
|
|
145
|
+
* - context: Additional context about why action is needed
|
|
146
|
+
* - details: Technical details or related information
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* Logger.action('Configuration required before proceeding', {
|
|
150
|
+
* context: 'specs.json is incomplete',
|
|
151
|
+
* hint: 'Add the "title" and "github_url" fields to specs.json',
|
|
152
|
+
* details: 'See https://example.com/docs'
|
|
153
|
+
* });
|
|
154
|
+
*/
|
|
155
|
+
static action(message, ...args) {
|
|
156
|
+
// Extract options object if present (last arg with special keys)
|
|
157
|
+
const lastArg = args[args.length - 1];
|
|
158
|
+
const isOptionsObject = lastArg && typeof lastArg === 'object' &&
|
|
159
|
+
(lastArg.hint || lastArg.context || lastArg.details);
|
|
160
|
+
|
|
161
|
+
const options = isOptionsObject ? args.pop() : {};
|
|
162
|
+
const regularArgs = args;
|
|
163
|
+
|
|
164
|
+
// Display main action required message - red to signal urgency
|
|
165
|
+
console.log(chalk.red('👉'), chalk.red(message), ...regularArgs);
|
|
166
|
+
|
|
167
|
+
// Display context if provided - explains why action is needed
|
|
168
|
+
if (options.context) {
|
|
169
|
+
console.log(chalk.red(' Context:'), chalk.gray(options.context));
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Display technical details if provided - helps understand the situation
|
|
173
|
+
if (options.details) {
|
|
174
|
+
const detailsStr = typeof options.details === 'object'
|
|
175
|
+
? JSON.stringify(options.details, null, 2)
|
|
176
|
+
: String(options.details);
|
|
177
|
+
console.log(chalk.red(' Details:'), chalk.gray(detailsStr));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Display hint if provided - critical instruction on what to do
|
|
181
|
+
if (options.hint) {
|
|
182
|
+
console.log(chalk.red(' 👉 Action:'), chalk.red(options.hint));
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Collect message with all context for healthcheck/JSON output
|
|
186
|
+
messageCollector.addMessage('action', message, [...regularArgs, options]);
|
|
187
|
+
|
|
188
|
+
console.log(); // Extra newline for readability
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Information messages - blue
|
|
193
|
+
*/
|
|
134
194
|
static info(message, ...args) {
|
|
135
195
|
console.log(chalk.blue('📋'), chalk.blue(message), ...args);
|
|
136
196
|
messageCollector.addMessage('info', message, args);
|