legal-markdown-js 2.8.1 → 2.10.0
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 +74 -4
- package/dist/cli/index.js +3 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/interactive/index.js +15 -6
- package/dist/cli/interactive/index.js.map +1 -1
- package/dist/cli/interactive/prompts/archive-options.d.ts +23 -0
- package/dist/cli/interactive/prompts/archive-options.d.ts.map +1 -0
- package/dist/cli/interactive/prompts/archive-options.js +67 -0
- package/dist/cli/interactive/prompts/archive-options.js.map +1 -0
- package/dist/cli/interactive/service.d.ts +10 -3
- package/dist/cli/interactive/service.d.ts.map +1 -1
- package/dist/cli/interactive/service.js +76 -8
- package/dist/cli/interactive/service.js.map +1 -1
- package/dist/cli/interactive/types.d.ts +38 -0
- package/dist/cli/interactive/types.d.ts.map +1 -1
- package/dist/cli/interactive/utils/format-helpers.d.ts +7 -5
- package/dist/cli/interactive/utils/format-helpers.d.ts.map +1 -1
- package/dist/cli/interactive/utils/format-helpers.js +50 -7
- package/dist/cli/interactive/utils/format-helpers.js.map +1 -1
- package/dist/cli/service.d.ts +12 -0
- package/dist/cli/service.d.ts.map +1 -1
- package/dist/cli/service.js +63 -2
- package/dist/cli/service.js.map +1 -1
- package/dist/constants/paths.d.ts +11 -0
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +18 -3
- package/dist/constants/paths.js.map +1 -1
- package/dist/utils/archive-manager.d.ts +105 -0
- package/dist/utils/archive-manager.d.ts.map +1 -0
- package/dist/utils/archive-manager.js +281 -0
- package/dist/utils/archive-manager.js.map +1 -0
- package/dist/utils/env-discovery.d.ts +35 -0
- package/dist/utils/env-discovery.d.ts.map +1 -0
- package/dist/utils/env-discovery.js +149 -0
- package/dist/utils/env-discovery.js.map +1 -0
- package/dist/utils/file-naming.d.ts +73 -0
- package/dist/utils/file-naming.d.ts.map +1 -0
- package/dist/utils/file-naming.js +132 -0
- package/dist/utils/file-naming.js.map +1 -0
- package/package.json +7 -4
- package/scripts/build-packages.js +373 -0
- package/scripts/build-paths.js +69 -0
- package/scripts/build-web.js +118 -0
- package/scripts/generate-readmes.js +632 -0
- package/scripts/generate-run-scripts.js +537 -0
- package/scripts/setup-config.js +118 -0
- package/scripts/visual-tests/README.md +76 -0
- package/scripts/visual-tests/generate-contract.js +72 -0
- package/scripts/visual-tests/generate-ticket.js +72 -0
- package/scripts/web-serve.js +189 -0
package/README.md
CHANGED
|
@@ -41,6 +41,9 @@ After installation, you'll have access to these commands:
|
|
|
41
41
|
|
|
42
42
|
- **`legal-md`** - Standard command-line interface with options and flags
|
|
43
43
|
- **`legal-md-ui`** - Interactive CLI with guided prompts and smart defaults
|
|
44
|
+
- **`legal-md-setup`** - Configuration setup script for easy environment setup
|
|
45
|
+
- **`legal-md-playground`** - Local playground server for testing and
|
|
46
|
+
exploration
|
|
44
47
|
- **`legal2md`** - Alias for `legal-md` (for compatibility)
|
|
45
48
|
|
|
46
49
|
## 🚀 Try it Online
|
|
@@ -49,8 +52,42 @@ After installation, you'll have access to these commands:
|
|
|
49
52
|
Markdown JS directly in your browser with live examples and real-time
|
|
50
53
|
processing.
|
|
51
54
|
|
|
55
|
+
### Local Playground
|
|
56
|
+
|
|
57
|
+
You can also run the playground locally for offline use or testing:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Start local playground server (when installed globally)
|
|
61
|
+
legal-md-playground
|
|
62
|
+
|
|
63
|
+
# Or with custom port
|
|
64
|
+
legal-md-playground --port=3000
|
|
65
|
+
|
|
66
|
+
# Or if installed locally in a project
|
|
67
|
+
npm run web:serve
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
The playground provides the same interactive experience as the online version,
|
|
71
|
+
including real-time processing, syntax highlighting, and example templates.
|
|
72
|
+
|
|
52
73
|
## Quick Start
|
|
53
74
|
|
|
75
|
+
### Initial Setup (Optional)
|
|
76
|
+
|
|
77
|
+
For the best experience, especially if you're new to Legal Markdown JS, run the
|
|
78
|
+
setup script to configure your environment:
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
# Configure paths and directories (when installed globally)
|
|
82
|
+
legal-md-setup
|
|
83
|
+
|
|
84
|
+
# Or if installed locally in a project
|
|
85
|
+
npm run setup-config
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
This creates a personalized configuration file that the tool will automatically
|
|
89
|
+
find and use.
|
|
90
|
+
|
|
54
91
|
### Command Line Usage
|
|
55
92
|
|
|
56
93
|
#### Standard CLI
|
|
@@ -62,8 +99,11 @@ legal-md input.md output.md
|
|
|
62
99
|
# Generate PDF with highlighting
|
|
63
100
|
legal-md document.md --pdf --highlight
|
|
64
101
|
|
|
65
|
-
# Process with custom CSS
|
|
66
|
-
legal-md document.md --html --css styles.css
|
|
102
|
+
# Process with custom CSS and archive source
|
|
103
|
+
legal-md document.md --html --css styles.css --archive-source
|
|
104
|
+
|
|
105
|
+
# Archive to custom directory
|
|
106
|
+
legal-md document.md --archive-source ./processed
|
|
67
107
|
```
|
|
68
108
|
|
|
69
109
|
#### Interactive CLI
|
|
@@ -85,6 +125,8 @@ The interactive CLI provides:
|
|
|
85
125
|
formats
|
|
86
126
|
- **🎨 CSS selection**: Choose from available stylesheets or proceed without
|
|
87
127
|
custom styling
|
|
128
|
+
- **📦 Source archiving**: Configure automatic archiving of source files after
|
|
129
|
+
successful processing
|
|
88
130
|
- **📋 Configuration summary**: Review all settings before processing
|
|
89
131
|
- **✅ Clear results**: See exactly which files were generated
|
|
90
132
|
|
|
@@ -153,6 +195,8 @@ Additional features available only in the Node.js version:
|
|
|
153
195
|
- **Batch Processing**: Multi-file processing with concurrency control
|
|
154
196
|
- **Field Tracking**: Enhanced field tracking with proper categorization for
|
|
155
197
|
document review
|
|
198
|
+
- **Source File Archiving**: Automatic archiving of source files after
|
|
199
|
+
successful processing with conflict resolution
|
|
156
200
|
|
|
157
201
|
## Architecture & Performance
|
|
158
202
|
|
|
@@ -250,9 +294,33 @@ npm run test:coverage
|
|
|
250
294
|
Legal Markdown JS supports environment-based configuration for customizing file
|
|
251
295
|
paths and directories.
|
|
252
296
|
|
|
253
|
-
###
|
|
297
|
+
### Quick Setup (Recommended)
|
|
298
|
+
|
|
299
|
+
For easy configuration setup, especially for non-technical users:
|
|
300
|
+
|
|
301
|
+
```bash
|
|
302
|
+
# Run the setup script (when installed globally)
|
|
303
|
+
legal-md-setup
|
|
304
|
+
|
|
305
|
+
# Or if installed locally in a project
|
|
306
|
+
npm run setup-config
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
This script will:
|
|
310
|
+
|
|
311
|
+
- Create a configuration directory at `~/.config/legal-markdown-js/`
|
|
312
|
+
- Copy the configuration template with helpful comments
|
|
313
|
+
- Provide clear instructions on how to customize your paths
|
|
314
|
+
- Show you exactly where to edit your settings
|
|
315
|
+
|
|
316
|
+
### Manual Configuration
|
|
317
|
+
|
|
318
|
+
If you prefer manual setup, create a `.env` file in one of these locations (in
|
|
319
|
+
order of precedence):
|
|
254
320
|
|
|
255
|
-
|
|
321
|
+
1. **Current working directory**: `./.env`
|
|
322
|
+
2. **Your home directory**: `~/.env`
|
|
323
|
+
3. **Config directory**: `~/.config/legal-markdown-js/.env`
|
|
256
324
|
|
|
257
325
|
```bash
|
|
258
326
|
# Copy the example configuration
|
|
@@ -272,10 +340,12 @@ STYLES_DIR=assets/css
|
|
|
272
340
|
# Separate project structure
|
|
273
341
|
DEFAULT_INPUT_DIR=documents/source
|
|
274
342
|
DEFAULT_OUTPUT_DIR=documents/generated
|
|
343
|
+
ARCHIVE_DIR=documents/archive
|
|
275
344
|
|
|
276
345
|
# Absolute paths (useful for CI/CD)
|
|
277
346
|
IMAGES_DIR=/var/lib/legal-markdown/images
|
|
278
347
|
DEFAULT_OUTPUT_DIR=/var/lib/legal-markdown/output
|
|
348
|
+
ARCHIVE_DIR=/var/lib/legal-markdown/archive
|
|
279
349
|
```
|
|
280
350
|
|
|
281
351
|
### Using Custom Paths in Code
|
package/dist/cli/index.js
CHANGED
|
@@ -96,6 +96,7 @@ program
|
|
|
96
96
|
.option('--enable-field-tracking', 'Add field tracking spans to markdown output')
|
|
97
97
|
.option('--css <path>', 'Path to custom CSS file for HTML/PDF')
|
|
98
98
|
.option('--title <title>', 'Document title for HTML/PDF')
|
|
99
|
+
.option('--archive-source [dir]', 'Archive source file after successful processing to directory')
|
|
99
100
|
.action(async (input, output, options) => {
|
|
100
101
|
try {
|
|
101
102
|
// Handle stdin input
|
|
@@ -124,6 +125,7 @@ program
|
|
|
124
125
|
enableFieldTrackingInMarkdown: options.enableFieldTracking,
|
|
125
126
|
css: options.css,
|
|
126
127
|
title: options.title,
|
|
128
|
+
archiveSource: options.archiveSource,
|
|
127
129
|
};
|
|
128
130
|
const cliService = new service_1.CliService(cliOptions);
|
|
129
131
|
const result = await cliService.processContent(stdinContent);
|
|
@@ -174,6 +176,7 @@ program
|
|
|
174
176
|
enableFieldTrackingInMarkdown: options.enableFieldTracking,
|
|
175
177
|
css: options.css,
|
|
176
178
|
title: options.title,
|
|
179
|
+
archiveSource: options.archiveSource,
|
|
177
180
|
};
|
|
178
181
|
const cliService = new service_1.CliService(cliOptions);
|
|
179
182
|
// Force stdout if --stdout flag is used
|
package/dist/cli/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;;;;;AAEH,yCAAoC;AACpC,kDAA0B;AAE1B,uCAAuC;AACvC,qCAA4C;AAC5C,2CAA4C;AAE5C;;;;;;GAMG;AACH,KAAK,UAAU,SAAS;IACtB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI,IAAI,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAElC,OAAO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CAAC;YACN,MAAM,UAAU,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAC9C,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,2BAAiB,EAAE,CAAC;YACvC,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC,CAAC;YACxD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,OAAO,CAAC,KAAK,CAAC,eAAK,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC,CAAC;QACvD,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACrB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC;AAEL,+BAA+B;AAC/B,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -32,6 +32,7 @@ const output_format_1 = require("./prompts/output-format");
|
|
|
32
32
|
const processing_options_1 = require("./prompts/processing-options");
|
|
33
33
|
const css_selector_1 = require("./prompts/css-selector");
|
|
34
34
|
const filename_1 = require("./prompts/filename");
|
|
35
|
+
const archive_options_1 = require("./prompts/archive-options");
|
|
35
36
|
const confirmation_1 = require("./prompts/confirmation");
|
|
36
37
|
const service_1 = require("./service");
|
|
37
38
|
const format_helpers_1 = require("./utils/format-helpers");
|
|
@@ -45,7 +46,8 @@ const format_helpers_1 = require("./utils/format-helpers");
|
|
|
45
46
|
* 4. Gathering processing options based on selected formats
|
|
46
47
|
* 5. Optional CSS file selection for styling
|
|
47
48
|
* 6. Output filename specification
|
|
48
|
-
* 7.
|
|
49
|
+
* 7. Archive options configuration
|
|
50
|
+
* 8. Configuration confirmation and processing execution
|
|
49
51
|
*
|
|
50
52
|
* @returns Promise that resolves when the interactive flow completes
|
|
51
53
|
* @throws Error when processing fails or user cancels operation
|
|
@@ -64,26 +66,33 @@ async function runInteractiveMode() {
|
|
|
64
66
|
const cssFile = await (0, css_selector_1.selectCssFile)(outputFormats);
|
|
65
67
|
// Step 5: Enter output filename
|
|
66
68
|
const outputFilename = await (0, filename_1.promptOutputFilename)(inputFile);
|
|
69
|
+
// Step 6: Configure archive options
|
|
70
|
+
const archiveResult = await (0, archive_options_1.promptArchiveOptions)();
|
|
71
|
+
const archiveOptions = {
|
|
72
|
+
enabled: archiveResult.enableArchiving,
|
|
73
|
+
directory: archiveResult.archiveDirectory,
|
|
74
|
+
};
|
|
67
75
|
// Build configuration
|
|
68
76
|
const config = {
|
|
69
77
|
inputFile,
|
|
70
78
|
outputFilename,
|
|
71
79
|
outputFormats,
|
|
72
80
|
processingOptions,
|
|
81
|
+
archiveOptions,
|
|
73
82
|
cssFile,
|
|
74
83
|
};
|
|
75
|
-
// Step
|
|
84
|
+
// Step 7: Confirm configuration
|
|
76
85
|
const confirmed = await (0, confirmation_1.confirmConfiguration)(config);
|
|
77
86
|
if (!confirmed) {
|
|
78
87
|
console.log(chalk_1.default.yellow('\n❌ Operation cancelled.\n'));
|
|
79
88
|
return;
|
|
80
89
|
}
|
|
81
|
-
// Step
|
|
90
|
+
// Step 8: Process files
|
|
82
91
|
console.log(chalk_1.default.cyan('\n⏳ Processing files...\n'));
|
|
83
92
|
const service = new service_1.InteractiveService(config);
|
|
84
|
-
const
|
|
85
|
-
// Step
|
|
86
|
-
console.log((0, format_helpers_1.formatSuccessMessage)(outputFiles));
|
|
93
|
+
const result = await service.processFile(inputFile);
|
|
94
|
+
// Step 9: Show results
|
|
95
|
+
console.log((0, format_helpers_1.formatSuccessMessage)(result.outputFiles, result.archiveResult));
|
|
87
96
|
}
|
|
88
97
|
catch (error) {
|
|
89
98
|
if (error instanceof Error && error.message.includes('User force closed')) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/interactive/index.ts"],"names":[],"mappings":";;AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;;;;;AA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ACjB,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,wBAAwB;AACxB,OAAO;KACJ,IAAI,CAAC,aAAa,CAAC;KACnB,WAAW,CAAC,wDAAwD,CAAC;KACrE,OAAO,CAAC,OAAO,CAAC;KAChB,MAAM,CAAC,kBAAkB,CAAC,CAAC;AAE9B,+BAA+B;AAC/B,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Archive Options Prompt
|
|
3
|
+
*
|
|
4
|
+
* This module handles user interaction for configuring source file archiving
|
|
5
|
+
* in the interactive CLI. It provides prompts for enabling archiving and
|
|
6
|
+
* customizing the archive directory.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Result of the archive options prompt
|
|
10
|
+
*/
|
|
11
|
+
export interface ArchivePromptResult {
|
|
12
|
+
/** Whether archiving is enabled */
|
|
13
|
+
enableArchiving: boolean;
|
|
14
|
+
/** Custom archive directory (if provided) */
|
|
15
|
+
archiveDirectory?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Prompt user for archive configuration options
|
|
19
|
+
*
|
|
20
|
+
* @returns Promise resolving to the archive configuration
|
|
21
|
+
*/
|
|
22
|
+
export declare function promptArchiveOptions(): Promise<ArchivePromptResult>;
|
|
23
|
+
//# sourceMappingURL=archive-options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"archive-options.d.ts","sourceRoot":"","sources":["../../../../src/cli/interactive/prompts/archive-options.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAOH;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,mCAAmC;IACnC,eAAe,EAAE,OAAO,CAAC;IACzB,6CAA6C;IAC7C,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAsDzE"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Archive Options Prompt
|
|
4
|
+
*
|
|
5
|
+
* This module handles user interaction for configuring source file archiving
|
|
6
|
+
* in the interactive CLI. It provides prompts for enabling archiving and
|
|
7
|
+
* customizing the archive directory.
|
|
8
|
+
*/
|
|
9
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
exports.promptArchiveOptions = promptArchiveOptions;
|
|
14
|
+
const prompts_1 = require("@inquirer/prompts");
|
|
15
|
+
const paths_1 = require("../../../constants/paths");
|
|
16
|
+
const archive_manager_1 = require("../../../utils/archive-manager");
|
|
17
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
18
|
+
/**
|
|
19
|
+
* Prompt user for archive configuration options
|
|
20
|
+
*
|
|
21
|
+
* @returns Promise resolving to the archive configuration
|
|
22
|
+
*/
|
|
23
|
+
async function promptArchiveOptions() {
|
|
24
|
+
console.log(chalk_1.default.bold.cyan('\n📁 Source File Management'));
|
|
25
|
+
console.log('Configure what happens to your source files after processing.\n');
|
|
26
|
+
// Ask if user wants to enable archiving
|
|
27
|
+
const enableArchiving = await (0, prompts_1.confirm)({
|
|
28
|
+
message: 'Archive source file after successful processing?',
|
|
29
|
+
default: false,
|
|
30
|
+
});
|
|
31
|
+
if (!enableArchiving) {
|
|
32
|
+
return { enableArchiving: false };
|
|
33
|
+
}
|
|
34
|
+
// Show default directory
|
|
35
|
+
console.log(chalk_1.default.gray(`Default archive directory: ${paths_1.RESOLVED_PATHS.ARCHIVE_DIR}`));
|
|
36
|
+
// Ask if user wants to customize the directory
|
|
37
|
+
const useCustomDirectory = await (0, prompts_1.confirm)({
|
|
38
|
+
message: 'Use a custom archive directory?',
|
|
39
|
+
default: false,
|
|
40
|
+
});
|
|
41
|
+
let archiveDirectory;
|
|
42
|
+
if (useCustomDirectory) {
|
|
43
|
+
let validDirectory = false;
|
|
44
|
+
while (!validDirectory) {
|
|
45
|
+
const customDir = await (0, prompts_1.input)({
|
|
46
|
+
message: 'Enter custom archive directory:',
|
|
47
|
+
default: 'processed',
|
|
48
|
+
validate: (input) => {
|
|
49
|
+
if (!input.trim()) {
|
|
50
|
+
return 'Archive directory cannot be empty';
|
|
51
|
+
}
|
|
52
|
+
if (!archive_manager_1.ArchiveManager.isValidArchiveDirectory(input.trim())) {
|
|
53
|
+
return 'Invalid directory path or cannot create directory';
|
|
54
|
+
}
|
|
55
|
+
return true;
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
archiveDirectory = customDir.trim();
|
|
59
|
+
validDirectory = true;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
enableArchiving,
|
|
64
|
+
archiveDirectory,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=archive-options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"archive-options.js","sourceRoot":"","sources":["../../../../src/cli/interactive/prompts/archive-options.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;AAsBH,oDAsDC;AA1ED,+CAAmD;AACnD,oDAA0D;AAC1D,oEAAgE;AAChE,kDAA0B;AAY1B;;;;GAIG;AACI,KAAK,UAAU,oBAAoB;IACxC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC,CAAC;IAC5D,OAAO,CAAC,GAAG,CAAC,iEAAiE,CAAC,CAAC;IAE/E,wCAAwC;IACxC,MAAM,eAAe,GAAG,MAAM,IAAA,iBAAO,EAAC;QACpC,OAAO,EAAE,kDAAkD;QAC3D,OAAO,EAAE,KAAK;KACf,CAAC,CAAC;IAEH,IAAI,CAAC,eAAe,EAAE,CAAC;QACrB,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,CAAC;IACpC,CAAC;IAED,yBAAyB;IACzB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,8BAA8B,sBAAc,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;IAEpF,+CAA+C;IAC/C,MAAM,kBAAkB,GAAG,MAAM,IAAA,iBAAO,EAAC;QACvC,OAAO,EAAE,iCAAiC;QAC1C,OAAO,EAAE,KAAK;KACf,CAAC,CAAC;IAEH,IAAI,gBAAoC,CAAC;IAEzC,IAAI,kBAAkB,EAAE,CAAC;QACvB,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,OAAO,CAAC,cAAc,EAAE,CAAC;YACvB,MAAM,SAAS,GAAG,MAAM,IAAA,eAAK,EAAC;gBAC5B,OAAO,EAAE,iCAAiC;gBAC1C,OAAO,EAAE,WAAW;gBACpB,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE;oBAC1B,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,CAAC;wBAClB,OAAO,mCAAmC,CAAC;oBAC7C,CAAC;oBAED,IAAI,CAAC,gCAAc,CAAC,uBAAuB,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;wBAC1D,OAAO,mDAAmD,CAAC;oBAC7D,CAAC;oBAED,OAAO,IAAI,CAAC;gBACd,CAAC;aACF,CAAC,CAAC;YAEH,gBAAgB,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;YACpC,cAAc,GAAG,IAAI,CAAC;QACxB,CAAC;IACH,CAAC;IAED,OAAO;QACL,eAAe;QACf,gBAAgB;KACjB,CAAC;AACJ,CAAC"}
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* and the existing CliService, translating user selections into appropriate
|
|
6
6
|
* CLI options and orchestrating the document processing workflow.
|
|
7
7
|
*/
|
|
8
|
-
import { InteractiveConfig } from './types';
|
|
8
|
+
import { InteractiveConfig, ProcessingResult } from './types';
|
|
9
9
|
/**
|
|
10
10
|
* Interactive service for processing documents with user-selected configuration
|
|
11
11
|
*
|
|
@@ -41,10 +41,17 @@ export declare class InteractiveService {
|
|
|
41
41
|
* and writing them to the configured output directory.
|
|
42
42
|
*
|
|
43
43
|
* @param inputFile Absolute path to the input document to process
|
|
44
|
-
* @returns Promise resolving to
|
|
44
|
+
* @returns Promise resolving to processing result with output files and archive info
|
|
45
45
|
* @throws Error when processing fails for any requested format
|
|
46
46
|
*/
|
|
47
|
-
processFile(inputFile: string): Promise<
|
|
47
|
+
processFile(inputFile: string): Promise<ProcessingResult>;
|
|
48
|
+
/**
|
|
49
|
+
* Handle archiving of source file and capture results
|
|
50
|
+
*
|
|
51
|
+
* @param inputFile Path to the source file to archive
|
|
52
|
+
* @returns Archive operation result information
|
|
53
|
+
*/
|
|
54
|
+
private handleArchiving;
|
|
48
55
|
/**
|
|
49
56
|
* Get the current configuration
|
|
50
57
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/cli/interactive/service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../src/cli/interactive/service.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAMH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAK9D;;;;;;GAMG;AACH,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,MAAM,CAAoB;IAElC;;;;OAIG;gBACS,MAAM,EAAE,iBAAiB;IAMrC;;;;;;;;;OASG;IACH,OAAO,CAAC,eAAe;IAqCvB;;;;;;;;;;OAUG;IACG,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAiE/D;;;;;OAKG;YACW,eAAe;IA+C7B;;;;OAIG;IACH,OAAO,CAAC,SAAS;CAGlB"}
|
|
@@ -44,6 +44,9 @@ exports.InteractiveService = void 0;
|
|
|
44
44
|
const path = __importStar(require("path"));
|
|
45
45
|
const service_1 = require("../service");
|
|
46
46
|
const _constants_1 = require("../../constants/index.js");
|
|
47
|
+
const archive_manager_1 = require("../../utils/archive-manager");
|
|
48
|
+
const _lib_1 = require("../../lib/index.js");
|
|
49
|
+
const index_1 = require("../../index");
|
|
47
50
|
/**
|
|
48
51
|
* Interactive service for processing documents with user-selected configuration
|
|
49
52
|
*
|
|
@@ -73,7 +76,7 @@ class InteractiveService {
|
|
|
73
76
|
* @returns CLI service options with all necessary flags and paths configured
|
|
74
77
|
*/
|
|
75
78
|
mapToCliOptions(config) {
|
|
76
|
-
const { outputFormats, processingOptions, cssFile } = config;
|
|
79
|
+
const { outputFormats, processingOptions, archiveOptions, cssFile } = config;
|
|
77
80
|
return {
|
|
78
81
|
debug: processingOptions.debug,
|
|
79
82
|
yamlOnly: false,
|
|
@@ -96,6 +99,7 @@ class InteractiveService {
|
|
|
96
99
|
enableFieldTrackingInMarkdown: processingOptions.fieldTracking,
|
|
97
100
|
css: cssFile ? path.join(_constants_1.RESOLVED_PATHS.STYLES_DIR, cssFile) : undefined,
|
|
98
101
|
title: config.outputFilename,
|
|
102
|
+
archiveSource: archiveOptions.enabled ? archiveOptions.directory || true : false,
|
|
99
103
|
};
|
|
100
104
|
}
|
|
101
105
|
/**
|
|
@@ -106,34 +110,41 @@ class InteractiveService {
|
|
|
106
110
|
* and writing them to the configured output directory.
|
|
107
111
|
*
|
|
108
112
|
* @param inputFile Absolute path to the input document to process
|
|
109
|
-
* @returns Promise resolving to
|
|
113
|
+
* @returns Promise resolving to processing result with output files and archive info
|
|
110
114
|
* @throws Error when processing fails for any requested format
|
|
111
115
|
*/
|
|
112
116
|
async processFile(inputFile) {
|
|
113
117
|
const outputFiles = [];
|
|
114
|
-
const { outputFilename, outputFormats } = this.getConfig();
|
|
118
|
+
const { outputFilename, outputFormats, archiveOptions } = this.getConfig();
|
|
115
119
|
try {
|
|
120
|
+
// Create a CliService without archiving for individual format processing
|
|
121
|
+
const processingOptions = this.mapToCliOptions(this.getConfig());
|
|
122
|
+
const nonArchivingService = new service_1.CliService({
|
|
123
|
+
...processingOptions,
|
|
124
|
+
archiveSource: false, // Disable archiving during format processing
|
|
125
|
+
});
|
|
116
126
|
// Process for each selected format
|
|
117
127
|
if (outputFormats.pdf) {
|
|
118
128
|
const pdfOutput = path.join(_constants_1.RESOLVED_PATHS.DEFAULT_OUTPUT_DIR, `${outputFilename}.pdf`);
|
|
119
|
-
await
|
|
129
|
+
await nonArchivingService.processFile(inputFile, pdfOutput);
|
|
120
130
|
outputFiles.push(pdfOutput);
|
|
121
131
|
}
|
|
122
132
|
if (outputFormats.html) {
|
|
123
133
|
const htmlOutput = path.join(_constants_1.RESOLVED_PATHS.DEFAULT_OUTPUT_DIR, `${outputFilename}.html`);
|
|
124
|
-
await
|
|
134
|
+
await nonArchivingService.processFile(inputFile, htmlOutput);
|
|
125
135
|
outputFiles.push(htmlOutput);
|
|
126
136
|
}
|
|
127
137
|
if (outputFormats.markdown) {
|
|
128
138
|
const mdOutput = path.join(_constants_1.RESOLVED_PATHS.DEFAULT_OUTPUT_DIR, `${outputFilename}.md`);
|
|
129
|
-
await
|
|
139
|
+
await nonArchivingService.processFile(inputFile, mdOutput);
|
|
130
140
|
outputFiles.push(mdOutput);
|
|
131
141
|
}
|
|
132
142
|
if (outputFormats.metadata) {
|
|
133
143
|
const yamlOutput = path.join(_constants_1.RESOLVED_PATHS.DEFAULT_OUTPUT_DIR, `${outputFilename}-metadata.yaml`);
|
|
134
144
|
// Create a separate service instance for metadata export
|
|
135
145
|
const metadataService = new service_1.CliService({
|
|
136
|
-
...
|
|
146
|
+
...processingOptions,
|
|
147
|
+
archiveSource: false, // Disable archiving for metadata export
|
|
137
148
|
exportMetadata: true,
|
|
138
149
|
exportFormat: 'yaml',
|
|
139
150
|
exportPath: yamlOutput,
|
|
@@ -141,12 +152,69 @@ class InteractiveService {
|
|
|
141
152
|
await metadataService.processFile(inputFile);
|
|
142
153
|
outputFiles.push(yamlOutput);
|
|
143
154
|
}
|
|
144
|
-
|
|
155
|
+
// Handle archiving separately after all processing is complete
|
|
156
|
+
let archiveResult;
|
|
157
|
+
if (archiveOptions.enabled) {
|
|
158
|
+
archiveResult = await this.handleArchiving(inputFile);
|
|
159
|
+
}
|
|
160
|
+
return {
|
|
161
|
+
outputFiles,
|
|
162
|
+
archiveResult,
|
|
163
|
+
};
|
|
145
164
|
}
|
|
146
165
|
catch (error) {
|
|
147
166
|
throw new Error(`Processing failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
148
167
|
}
|
|
149
168
|
}
|
|
169
|
+
/**
|
|
170
|
+
* Handle archiving of source file and capture results
|
|
171
|
+
*
|
|
172
|
+
* @param inputFile Path to the source file to archive
|
|
173
|
+
* @returns Archive operation result information
|
|
174
|
+
*/
|
|
175
|
+
async handleArchiving(inputFile) {
|
|
176
|
+
try {
|
|
177
|
+
const archiveManager = new archive_manager_1.ArchiveManager();
|
|
178
|
+
const { archiveOptions } = this.getConfig();
|
|
179
|
+
// Determine archive directory
|
|
180
|
+
let archiveDir;
|
|
181
|
+
if (archiveOptions.directory) {
|
|
182
|
+
archiveDir = archiveOptions.directory;
|
|
183
|
+
}
|
|
184
|
+
else {
|
|
185
|
+
archiveDir = _constants_1.RESOLVED_PATHS.ARCHIVE_DIR;
|
|
186
|
+
}
|
|
187
|
+
// Read original content
|
|
188
|
+
const originalContent = (0, _lib_1.readFileSync)(inputFile);
|
|
189
|
+
// Process the content to get processed version
|
|
190
|
+
const inputDir = path.dirname(inputFile);
|
|
191
|
+
const processedResult = (0, index_1.processLegalMarkdown)(originalContent, {
|
|
192
|
+
basePath: inputDir,
|
|
193
|
+
});
|
|
194
|
+
// Use smart archiving
|
|
195
|
+
const result = await archiveManager.smartArchiveFile(inputFile, {
|
|
196
|
+
archiveDir,
|
|
197
|
+
createDirectory: true,
|
|
198
|
+
conflictResolution: 'rename',
|
|
199
|
+
originalContent,
|
|
200
|
+
processedContent: processedResult.content,
|
|
201
|
+
});
|
|
202
|
+
return {
|
|
203
|
+
success: result.success,
|
|
204
|
+
contentsIdentical: result.contentsIdentical,
|
|
205
|
+
archivedPath: result.archivedPath,
|
|
206
|
+
archivedOriginalPath: result.archivedOriginalPath,
|
|
207
|
+
archivedProcessedPath: result.archivedProcessedPath,
|
|
208
|
+
error: result.error,
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
catch (error) {
|
|
212
|
+
return {
|
|
213
|
+
success: false,
|
|
214
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
}
|
|
150
218
|
/**
|
|
151
219
|
* Get the current configuration
|
|
152
220
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/cli/interactive/service.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2CAA6B;AAE7B,wCAAwC;AACxC,2CAA4C;
|
|
1
|
+
{"version":3,"file":"service.js","sourceRoot":"","sources":["../../../src/cli/interactive/service.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,2CAA6B;AAE7B,wCAAwC;AACxC,2CAA4C;AAE5C,iEAA6D;AAC7D,+BAAoC;AACpC,uCAAmD;AAEnD;;;;;;GAMG;AACH,MAAa,kBAAkB;IAI7B;;;;OAIG;IACH,YAAY,MAAyB;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAC7C,IAAI,CAAC,UAAU,GAAG,IAAI,oBAAU,CAAC,OAAO,CAAC,CAAC;IAC5C,CAAC;IAED;;;;;;;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C;YAEhD,+CAA+C;YAC/C,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;YACzC,MAAM,eAAe,GAAG,IAAA,4BAAoB,EAAC,eAAe,EAAE;gBAC5D,QAAQ,EAAE,QAAQ;aACnB,CAAC,CAAC;YAEH,sBAAsB;YACtB,MAAM,MAAM,GAAG,MAAM,cAAc,CAAC,gBAAgB,CAAC,SAAS,EAAE;gBAC9D,UAAU;gBACV,eAAe,EAAE,IAAI;gBACrB,kBAAkB,EAAE,QAAQ;gBAC5B,eAAe;gBACf,gBAAgB,EAAE,eAAe,CAAC,OAAO;aAC1C,CAAC,CAAC;YAEH,OAAO;gBACL,OAAO,EAAE,MAAM,CAAC,OAAO;gBACvB,iBAAiB,EAAE,MAAM,CAAC,iBAAiB;gBAC3C,YAAY,EAAE,MAAM,CAAC,YAAY;gBACjC,oBAAoB,EAAE,MAAM,CAAC,oBAAoB;gBACjD,qBAAqB,EAAE,MAAM,CAAC,qBAAqB;gBACnD,KAAK,EAAE,MAAM,CAAC,KAAK;aACpB,CAAC;QACJ,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;aAChE,CAAC;QACJ,CAAC;IACH,CAAC;IAED;;;;OAIG;IACK,SAAS;QACf,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF;AAvMD,gDAuMC"}
|
|
@@ -34,6 +34,17 @@ export interface ProcessingOptions {
|
|
|
34
34
|
/** Enable field highlighting in HTML/PDF output */
|
|
35
35
|
highlight: boolean;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Archive options configuration
|
|
39
|
+
*
|
|
40
|
+
* Defines settings for archiving source files after successful processing.
|
|
41
|
+
*/
|
|
42
|
+
export interface ArchiveOptions {
|
|
43
|
+
/** Whether to enable archiving of source files */
|
|
44
|
+
enabled: boolean;
|
|
45
|
+
/** Custom archive directory (if specified) */
|
|
46
|
+
directory?: string;
|
|
47
|
+
}
|
|
37
48
|
/**
|
|
38
49
|
* Complete interactive configuration
|
|
39
50
|
*
|
|
@@ -49,6 +60,8 @@ export interface InteractiveConfig {
|
|
|
49
60
|
outputFormats: OutputFormat;
|
|
50
61
|
/** Processing options configuration */
|
|
51
62
|
processingOptions: ProcessingOptions;
|
|
63
|
+
/** Archive options configuration */
|
|
64
|
+
archiveOptions: ArchiveOptions;
|
|
52
65
|
/** Optional path to CSS file for styling HTML/PDF output */
|
|
53
66
|
cssFile?: string;
|
|
54
67
|
}
|
|
@@ -66,4 +79,29 @@ export interface FileItem {
|
|
|
66
79
|
/** Type indicator for menu rendering and behavior */
|
|
67
80
|
type: 'file' | 'directory';
|
|
68
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Processing result information
|
|
84
|
+
*
|
|
85
|
+
* Contains details about the processing operation including generated files
|
|
86
|
+
* and archiving results for display in success messages.
|
|
87
|
+
*/
|
|
88
|
+
export interface ProcessingResult {
|
|
89
|
+
/** Array of generated output file paths */
|
|
90
|
+
outputFiles: string[];
|
|
91
|
+
/** Archive operation results (if archiving was enabled) */
|
|
92
|
+
archiveResult?: {
|
|
93
|
+
/** Whether archiving was successful */
|
|
94
|
+
success: boolean;
|
|
95
|
+
/** Whether content was identical (single file archived) */
|
|
96
|
+
contentsIdentical?: boolean;
|
|
97
|
+
/** Path to archived file (for identical content) */
|
|
98
|
+
archivedPath?: string;
|
|
99
|
+
/** Path to archived original file (for different content) */
|
|
100
|
+
archivedOriginalPath?: string;
|
|
101
|
+
/** Path to archived processed file (for different content) */
|
|
102
|
+
archivedProcessedPath?: string;
|
|
103
|
+
/** Error message if archiving failed */
|
|
104
|
+
error?: string;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
69
107
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/cli/interactive/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,oDAAoD;IACpD,IAAI,EAAE,OAAO,CAAC;IACd,uDAAuD;IACvD,GAAG,EAAE,OAAO,CAAC;IACb,yCAAyC;IACzC,QAAQ,EAAE,OAAO,CAAC;IAClB,4CAA4C;IAC5C,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,KAAK,EAAE,OAAO,CAAC;IACf,4DAA4D;IAC5D,aAAa,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,mDAAmD;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,+CAA+C;IAC/C,cAAc,EAAE,MAAM,CAAC;IACvB,4CAA4C;IAC5C,aAAa,EAAE,YAAY,CAAC;IAC5B,uCAAuC;IACvC,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;GAKG;AACH,MAAM,WAAW,QAAQ;IACvB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;CAC5B"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/cli/interactive/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B,oDAAoD;IACpD,IAAI,EAAE,OAAO,CAAC;IACd,uDAAuD;IACvD,GAAG,EAAE,OAAO,CAAC;IACb,yCAAyC;IACz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