spec-up-t 1.5.0 → 1.6.0-beta.2
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/assets/compiled/body.js +1 -0
- package/assets/compiled/head.css +3 -3
- package/assets/css/index.css +5 -4
- package/assets/css/refs.css +33 -0
- package/assets/css/terms-and-definitions.css +88 -0
- package/assets/js/insert-irefs.js +214 -0
- package/config/asset-map.json +2 -1
- package/package.json +1 -1
- package/src/create-docx.js +13 -6
- package/src/create-pdf.js +22 -18
- package/src/init.js +7 -3
- package/src/install-from-boilerplate/boilerplate/spec/terms-and-definitions-intro.md +1 -1
- package/src/parsers/template-tag-parser.js +32 -4
- package/src/pipeline/references/collect-external-references.js +41 -14
- package/src/pipeline/references/external-references-service.js +60 -24
- package/src/pipeline/references/process-xtrefs-data.js +43 -19
- package/src/utils/logger.js +116 -9
- package/src/utils/regex-patterns.js +25 -1
- package/test/logger.test.js +290 -0
- package/assets/css/insert-trefs.css +0 -1
- package/src/utils/LOGGER.md +0 -81
package/src/utils/LOGGER.md
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
# Logger Utility
|
|
2
|
-
|
|
3
|
-
A centralized logging utility for the spec-up-t project that provides consistent, color-coded console output using chalk.
|
|
4
|
-
|
|
5
|
-
## Features
|
|
6
|
-
|
|
7
|
-
- **Color-coded messages** for different log levels
|
|
8
|
-
- **Consistent icons** and formatting
|
|
9
|
-
- **Progress indicators** with visual progress bars
|
|
10
|
-
- **Section separators** for organized output
|
|
11
|
-
- **Terminal-friendly** symbols that work across platforms
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```javascript
|
|
16
|
-
const Logger = require('./src/utils/logger');
|
|
17
|
-
|
|
18
|
-
// Success messages (green with checkmark)
|
|
19
|
-
Logger.success('Operation completed successfully');
|
|
20
|
-
|
|
21
|
-
// Error messages (red with X mark)
|
|
22
|
-
Logger.error('Failed to process request');
|
|
23
|
-
|
|
24
|
-
// Warning messages (yellow with warning symbol)
|
|
25
|
-
Logger.warn('Configuration file not found, using defaults');
|
|
26
|
-
|
|
27
|
-
// Info messages (blue with info symbol)
|
|
28
|
-
Logger.info('Processing 42 external references');
|
|
29
|
-
|
|
30
|
-
// Processing status (cyan with arrow)
|
|
31
|
-
Logger.process('Processing repository: owner/repo (15 terms)');
|
|
32
|
-
|
|
33
|
-
// Highlighted information (magenta with star)
|
|
34
|
-
Logger.highlight('Grouped 42 terms into 6 repositories');
|
|
35
|
-
|
|
36
|
-
// Progress indicators
|
|
37
|
-
Logger.progress(3, 5, 'Processing terms'); // Shows: [████████████░░░░░░░░] 60% Processing terms
|
|
38
|
-
|
|
39
|
-
// Section separators
|
|
40
|
-
Logger.separator(); // Shows: ════════════════════════════════════════════════════════════
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Log Levels
|
|
44
|
-
|
|
45
|
-
| Method | Color | Icon | Purpose |
|
|
46
|
-
|--------|-------|------|---------|
|
|
47
|
-
| `success()` | Green | ✓ | Successful operations |
|
|
48
|
-
| `error()` | Red | ✗ | Errors and failures |
|
|
49
|
-
| `warn()` | Yellow | ⚠ | Warnings and non-critical issues |
|
|
50
|
-
| `info()` | Blue | ℹ | General information |
|
|
51
|
-
| `process()` | Cyan | → | Processing status updates |
|
|
52
|
-
| `highlight()` | Magenta | ★ | Important data/summaries |
|
|
53
|
-
| `debug()` | Gray | ◦ | Debug information |
|
|
54
|
-
|
|
55
|
-
## Migration from console.log
|
|
56
|
-
|
|
57
|
-
**Before:**
|
|
58
|
-
```javascript
|
|
59
|
-
console.log(`✅ Successfully processed ${count} items`);
|
|
60
|
-
console.log(`❌ Failed to fetch data from ${url}`);
|
|
61
|
-
console.log(`⚠️ Missing configuration file`);
|
|
62
|
-
```
|
|
63
|
-
|
|
64
|
-
**After:**
|
|
65
|
-
```javascript
|
|
66
|
-
Logger.success(`Successfully processed ${count} items`);
|
|
67
|
-
Logger.error(`Failed to fetch data from ${url}`);
|
|
68
|
-
Logger.warn('Missing configuration file');
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
## Dependencies
|
|
72
|
-
|
|
73
|
-
- `chalk@4` - For terminal colors (CommonJS compatible version)
|
|
74
|
-
|
|
75
|
-
## Installation
|
|
76
|
-
|
|
77
|
-
The logger is automatically available when chalk v4 is installed:
|
|
78
|
-
|
|
79
|
-
```bash
|
|
80
|
-
npm install chalk@4
|
|
81
|
-
```
|