@cenk1cenk2/md-printer 3.2.5 → 3.2.6
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/dist/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/decorate.mjs +1 -2
- package/dist/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/decorateMetadata.mjs +1 -2
- package/dist/_virtual/{_@oxc-project_runtime@0.154.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/decorateParam.mjs +1 -2
- package/dist/commands/index.mjs +2 -3
- package/dist/constants/file.constants.mjs +1 -2
- package/dist/constants/preview.constants.mjs +1 -2
- package/dist/constants/signature.constants.mjs +1 -2
- package/dist/constants/template.constants.mjs +1 -2
- package/dist/modules/md-printer/md-printer.handler.mjs +3 -4
- package/dist/modules/md-printer/md-printer.module.mjs +2 -3
- package/dist/modules/md-printer/md-printer.schema.mjs +1 -2
- package/dist/services/i18n.service.mjs +3 -4
- package/dist/services/loopback.mjs +1 -2
- package/dist/services/markdown.service.mjs +2 -3
- package/dist/services/printer.module.mjs +2 -3
- package/dist/services/printer.service.mjs +3 -4
- package/dist/services/renderer/browser.mjs +1 -2
- package/dist/services/renderer/browser.service.mjs +4 -5
- package/dist/services/renderer/renderer.service.mjs +3 -4
- package/dist/services/session/preview.service.mjs +3 -4
- package/dist/services/session/session.service.mjs +3 -4
- package/dist/services/signature/adapters/a-trust.adapter.mjs +3 -4
- package/dist/services/signature/cms.mjs +1 -2
- package/dist/services/signature/signature.adapter.mjs +1 -2
- package/dist/services/signature/signature.service.mjs +3 -4
- package/dist/services/template/assets.mjs +1 -2
- package/dist/services/template/svelte.plugin.mjs +1 -2
- package/dist/services/template/template.service.mjs +3 -4
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
// \0@oxc-project+runtime@0.155.0/helpers/esm/decorate.js
|
|
2
2
|
function __decorate(decorators, target, key, desc) {
|
|
3
3
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
4
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
}
|
|
8
|
-
//#endregion
|
|
9
8
|
export { __decorate as default };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
// \0@oxc-project+runtime@0.155.0/helpers/esm/decorateMetadata.js
|
|
2
2
|
function __decorateMetadata(k, v) {
|
|
3
3
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
4
4
|
}
|
|
5
|
-
//#endregion
|
|
6
5
|
export { __decorateMetadata as default };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
// \0@oxc-project+runtime@0.155.0/helpers/esm/decorateParam.js
|
|
2
2
|
function __decorateParam(paramIndex, decorator) {
|
|
3
3
|
return function(target, key) {
|
|
4
4
|
decorator(target, key, paramIndex);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
//#endregion
|
|
8
7
|
export { __decorateParam as default };
|
package/dist/commands/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import __decorate from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import __decorate from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.mjs";
|
|
2
2
|
import { MdPrinterHandler } from "../modules/md-printer/md-printer.handler.mjs";
|
|
3
3
|
import { MdPrinterModule } from "../modules/md-printer/md-printer.module.mjs";
|
|
4
4
|
import { MdPrinterSchema } from "../modules/md-printer/md-printer.schema.mjs";
|
|
5
5
|
import { Args, Command, Flags, UseHandler } from "@cenk1cenk2/oclif-common";
|
|
6
|
-
|
|
6
|
+
// src/commands/index.ts
|
|
7
7
|
let MDPrinter = class MDPrinter extends Command {
|
|
8
8
|
static description = "Renders a markdown or yaml file through a Svelte template into a PDF or HTML document.";
|
|
9
9
|
static flags = {
|
|
@@ -35,5 +35,4 @@ MDPrinter = __decorate([UseHandler({
|
|
|
35
35
|
schema: MdPrinterSchema
|
|
36
36
|
})], MDPrinter);
|
|
37
37
|
var commands_default = MDPrinter;
|
|
38
|
-
//#endregion
|
|
39
38
|
export { commands_default as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/constants/file.constants.ts
|
|
2
2
|
let OutputFileType = /* @__PURE__ */ function(OutputFileType) {
|
|
3
3
|
OutputFileType["PDF"] = "pdf";
|
|
4
4
|
OutputFileType["HTML"] = "html";
|
|
@@ -10,5 +10,4 @@ let InputFileType = /* @__PURE__ */ function(InputFileType) {
|
|
|
10
10
|
InputFileType["YAML_SHORT"] = "yml";
|
|
11
11
|
return InputFileType;
|
|
12
12
|
}({});
|
|
13
|
-
//#endregion
|
|
14
13
|
export { InputFileType, OutputFileType };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
// src/constants/preview.constants.ts
|
|
2
2
|
let PreviewHost = /* @__PURE__ */ function(PreviewHost) {
|
|
3
3
|
PreviewHost["IPV4"] = "127.0.0.1";
|
|
4
4
|
PreviewHost["LOCALHOST"] = "localhost";
|
|
5
5
|
PreviewHost["IPV6"] = "::1";
|
|
6
6
|
return PreviewHost;
|
|
7
7
|
}({});
|
|
8
|
-
//#endregion
|
|
9
8
|
export { PreviewHost };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// src/constants/signature.constants.ts
|
|
2
2
|
let SignatureProvider = /* @__PURE__ */ function(SignatureProvider) {
|
|
3
3
|
SignatureProvider["A_TRUST"] = "a-trust";
|
|
4
4
|
return SignatureProvider;
|
|
5
5
|
}({});
|
|
6
|
-
//#endregion
|
|
7
6
|
export { SignatureProvider };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/constants/template.constants.ts
|
|
2
2
|
let TemplateFiles = /* @__PURE__ */ function(TemplateFiles) {
|
|
3
3
|
TemplateFiles["TEMPLATE"] = "Template.svelte";
|
|
4
4
|
TemplateFiles["SETTINGS"] = "settings.json";
|
|
@@ -56,5 +56,4 @@ const DEFAULT_PDF_OPTIONS = {
|
|
|
56
56
|
left: "20mm"
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
|
-
//#endregion
|
|
60
59
|
export { ContextKey, DEFAULT_HIGHLIGHT_STYLE, DEFAULT_LANGUAGE, DEFAULT_PDF_OPTIONS, DEFAULT_TEMPLATE, DIRECTIVE_TAG, Directory, I18N_ACCEPTED_TYPES, MediaType, ModuleSpecifier, PAGE_BREAK_CLASS, PRINTER_MODULE_OPTIONS, RenderMode, TAILWIND_STYLE_LANG, TemplateFiles };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorateMetadata.mjs";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.mjs";
|
|
3
3
|
import { BrowserService } from "../../services/renderer/browser.service.mjs";
|
|
4
4
|
import { PrinterService } from "../../services/printer.service.mjs";
|
|
5
5
|
import { PreviewService } from "../../services/session/preview.service.mjs";
|
|
@@ -11,7 +11,7 @@ import { dirname } from "path";
|
|
|
11
11
|
import { text } from "stream/consumers";
|
|
12
12
|
import writeFileAtomic from "write-file-atomic";
|
|
13
13
|
import { LoggerService } from "@cenk1cenk2/oclif-common";
|
|
14
|
-
|
|
14
|
+
// src/modules/md-printer/md-printer.handler.ts
|
|
15
15
|
let MdPrinterHandler = class MdPrinterHandler {
|
|
16
16
|
logger;
|
|
17
17
|
printer;
|
|
@@ -109,5 +109,4 @@ MdPrinterHandler = __decorate([Injectable(), __decorateMetadata("design:paramtyp
|
|
|
109
109
|
typeof SessionService === "undefined" ? Object : SessionService,
|
|
110
110
|
typeof PreviewService === "undefined" ? Object : PreviewService
|
|
111
111
|
])], MdPrinterHandler);
|
|
112
|
-
//#endregion
|
|
113
112
|
export { MdPrinterHandler };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.mjs";
|
|
2
2
|
import { PrinterModule } from "../../services/printer.module.mjs";
|
|
3
3
|
import "../../services/index.mjs";
|
|
4
4
|
import { MdPrinterHandler } from "./md-printer.handler.mjs";
|
|
5
5
|
import { Module } from "@nestjs/common";
|
|
6
6
|
import { CommandContext, LogLevels, LoggerModule, LogoModule } from "@cenk1cenk2/oclif-common";
|
|
7
|
-
|
|
7
|
+
// src/modules/md-printer/md-printer.module.ts
|
|
8
8
|
let MdPrinterModule = class MdPrinterModule {};
|
|
9
9
|
MdPrinterModule = __decorate([Module({
|
|
10
10
|
imports: [
|
|
@@ -17,5 +17,4 @@ MdPrinterModule = __decorate([Module({
|
|
|
17
17
|
],
|
|
18
18
|
providers: [MdPrinterHandler]
|
|
19
19
|
})], MdPrinterModule);
|
|
20
|
-
//#endregion
|
|
21
20
|
export { MdPrinterModule };
|
|
@@ -2,7 +2,7 @@ import { InputFileType, OutputFileType } from "../../constants/file.constants.mj
|
|
|
2
2
|
import { PreviewHost } from "../../constants/preview.constants.mjs";
|
|
3
3
|
import { SignatureProvider } from "../../constants/signature.constants.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
|
|
5
|
+
// src/modules/md-printer/md-printer.schema.ts
|
|
6
6
|
const MdPrinterSchema = z.object({
|
|
7
7
|
flags: z.object({
|
|
8
8
|
stdin: z.boolean().default(false).describe("Read the input from stdin."),
|
|
@@ -46,5 +46,4 @@ const MdPrinterSchema = z.object({
|
|
|
46
46
|
output: args.file
|
|
47
47
|
} : args
|
|
48
48
|
}));
|
|
49
|
-
//#endregion
|
|
50
49
|
export { MdPrinterSchema };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { I18N_ACCEPTED_TYPES } from "../constants/template.constants.mjs";
|
|
2
|
-
import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorateMetadata.mjs";
|
|
3
|
+
import __decorate from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.mjs";
|
|
4
4
|
import { Injectable } from "@nestjs/common";
|
|
5
5
|
import { readdir } from "fs/promises";
|
|
6
6
|
import { basename, extname, join } from "path";
|
|
7
7
|
import { FileSystemService, ParserService } from "@cenk1cenk2/oclif-common";
|
|
8
8
|
import i18next from "i18next";
|
|
9
|
-
|
|
9
|
+
// src/services/i18n.service.ts
|
|
10
10
|
let I18nService = class I18nService {
|
|
11
11
|
fs;
|
|
12
12
|
parser;
|
|
@@ -33,5 +33,4 @@ let I18nService = class I18nService {
|
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
I18nService = __decorate([Injectable(), __decorateMetadata("design:paramtypes", [typeof FileSystemService === "undefined" ? Object : FileSystemService, typeof ParserService === "undefined" ? Object : ParserService])], I18nService);
|
|
36
|
-
//#endregion
|
|
37
36
|
export { I18nService };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/services/loopback.ts
|
|
2
2
|
const LOOPBACK = [
|
|
3
3
|
"localhost",
|
|
4
4
|
"127.0.0.1",
|
|
@@ -14,5 +14,4 @@ function isLoopbackRequest({ headers }, origin) {
|
|
|
14
14
|
if (origin) return headers.origin === origin;
|
|
15
15
|
return !headers.origin || LOOPBACK.includes(URL.parse(headers.origin)?.hostname);
|
|
16
16
|
}
|
|
17
|
-
//#endregion
|
|
18
17
|
export { isLoopbackRequest };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DIRECTIVE_TAG, PAGE_BREAK_CLASS } from "../constants/template.constants.mjs";
|
|
2
|
-
import __decorate from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorate from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.mjs";
|
|
3
3
|
import { Injectable } from "@nestjs/common";
|
|
4
4
|
import { toHtml } from "hast-util-to-html";
|
|
5
5
|
import { all } from "lowlight";
|
|
@@ -16,7 +16,7 @@ import { unified } from "unified";
|
|
|
16
16
|
import { EXIT, SKIP, visit } from "unist-util-visit";
|
|
17
17
|
import { VFile } from "vfile";
|
|
18
18
|
import { matter } from "vfile-matter";
|
|
19
|
-
|
|
19
|
+
// src/services/markdown.service.ts
|
|
20
20
|
let MarkdownService = class MarkdownService {
|
|
21
21
|
processor = unified().use(remarkParse).use(remarkFrontmatter).use(remarkGfm).use(remarkDirective).use(() => (tree, file) => {
|
|
22
22
|
visit(tree, [
|
|
@@ -119,5 +119,4 @@ let MarkdownService = class MarkdownService {
|
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
121
|
MarkdownService = __decorate([Injectable()], MarkdownService);
|
|
122
|
-
//#endregion
|
|
123
122
|
export { MarkdownService };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PRINTER_MODULE_OPTIONS } from "../constants/template.constants.mjs";
|
|
2
|
-
import __decorate from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorate from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.mjs";
|
|
3
3
|
import { I18nService } from "./i18n.service.mjs";
|
|
4
4
|
import { MarkdownService } from "./markdown.service.mjs";
|
|
5
5
|
import { BrowserService } from "./renderer/browser.service.mjs";
|
|
@@ -12,7 +12,7 @@ import { PreviewService } from "./session/preview.service.mjs";
|
|
|
12
12
|
import { SessionService } from "./session/session.service.mjs";
|
|
13
13
|
import { ConfigurableModuleBuilder, Module } from "@nestjs/common";
|
|
14
14
|
import { FilesystemModule, JsonParser, ParserModule, YamlParser } from "@cenk1cenk2/oclif-common";
|
|
15
|
-
|
|
15
|
+
// src/services/printer.module.ts
|
|
16
16
|
let PrinterModule = class PrinterModule extends new ConfigurableModuleBuilder({ optionsInjectionToken: PRINTER_MODULE_OPTIONS }).setClassMethodName("forRoot").build().ConfigurableModuleClass {};
|
|
17
17
|
PrinterModule = __decorate([Module({
|
|
18
18
|
imports: [FilesystemModule.forRoot(), ParserModule.forRoot({ parsers: [JsonParser, YamlParser] })],
|
|
@@ -35,5 +35,4 @@ PrinterModule = __decorate([Module({
|
|
|
35
35
|
PreviewService
|
|
36
36
|
]
|
|
37
37
|
})], PrinterModule);
|
|
38
|
-
//#endregion
|
|
39
38
|
export { PrinterModule };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DEFAULT_PDF_OPTIONS } from "../constants/template.constants.mjs";
|
|
2
2
|
import { OutputFileType } from "../constants/file.constants.mjs";
|
|
3
|
-
import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.
|
|
4
|
-
import __decorate from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorateMetadata.mjs";
|
|
4
|
+
import __decorate from "../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.mjs";
|
|
5
5
|
import { I18nService } from "./i18n.service.mjs";
|
|
6
6
|
import { MarkdownService } from "./markdown.service.mjs";
|
|
7
7
|
import { inlineHtml } from "./template/assets.mjs";
|
|
@@ -14,7 +14,7 @@ import { basename, dirname, extname, join, resolve } from "path";
|
|
|
14
14
|
import { ConfigService, FileSystemService, LoggerService } from "@cenk1cenk2/oclif-common";
|
|
15
15
|
import { cloneDeep, mergeWith, uniq } from "es-toolkit";
|
|
16
16
|
import { parse } from "yaml";
|
|
17
|
-
|
|
17
|
+
// src/services/printer.service.ts
|
|
18
18
|
let PrinterService = class PrinterService {
|
|
19
19
|
fs;
|
|
20
20
|
logger;
|
|
@@ -178,5 +178,4 @@ PrinterService = __decorate([Injectable(), __decorateMetadata("design:paramtypes
|
|
|
178
178
|
typeof RendererService === "undefined" ? Object : RendererService,
|
|
179
179
|
typeof SignatureService === "undefined" ? Object : SignatureService
|
|
180
180
|
])], PrinterService);
|
|
181
|
-
//#endregion
|
|
182
181
|
export { PrinterService };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import which from "which";
|
|
2
|
-
|
|
2
|
+
// src/services/renderer/browser.ts
|
|
3
3
|
var BrowserNotFoundError = class extends Error {
|
|
4
4
|
tried;
|
|
5
5
|
constructor(tried) {
|
|
@@ -37,5 +37,4 @@ function discoverBrowser(explicit, env) {
|
|
|
37
37
|
}
|
|
38
38
|
throw new BrowserNotFoundError(candidates);
|
|
39
39
|
}
|
|
40
|
-
//#endregion
|
|
41
40
|
export { BrowserNotFoundError, discoverBrowser };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { PRINTER_MODULE_OPTIONS } from "../../constants/template.constants.mjs";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorateMetadata.mjs";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.mjs";
|
|
4
4
|
import { discoverBrowser } from "./browser.mjs";
|
|
5
|
-
import __decorateParam from "../../_virtual/_@oxc-project_runtime@0.
|
|
5
|
+
import __decorateParam from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorateParam.mjs";
|
|
6
6
|
import { Inject, Injectable } from "@nestjs/common";
|
|
7
7
|
import { LoggerService } from "@cenk1cenk2/oclif-common";
|
|
8
8
|
import puppeteer from "puppeteer-core";
|
|
9
|
-
|
|
9
|
+
// src/services/renderer/browser.service.ts
|
|
10
10
|
let BrowserService = class BrowserService {
|
|
11
11
|
logger;
|
|
12
12
|
options;
|
|
@@ -52,5 +52,4 @@ BrowserService = __decorate([
|
|
|
52
52
|
__decorateParam(1, Inject(PRINTER_MODULE_OPTIONS)),
|
|
53
53
|
__decorateMetadata("design:paramtypes", [typeof LoggerService === "undefined" ? Object : LoggerService, Object])
|
|
54
54
|
], BrowserService);
|
|
55
|
-
//#endregion
|
|
56
55
|
export { BrowserService };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PAGE_BREAK_CLASS } from "../../constants/template.constants.mjs";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorateMetadata.mjs";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.mjs";
|
|
4
4
|
import { BrowserService } from "./browser.service.mjs";
|
|
5
5
|
import { mimeType, resolveConfined } from "../template/assets.mjs";
|
|
6
6
|
import { Injectable } from "@nestjs/common";
|
|
@@ -8,7 +8,7 @@ import { readFile } from "fs/promises";
|
|
|
8
8
|
import { resolve } from "path";
|
|
9
9
|
import { LoggerService } from "@cenk1cenk2/oclif-common";
|
|
10
10
|
import { fileURLToPath, pathToFileURL } from "url";
|
|
11
|
-
|
|
11
|
+
// src/services/renderer/renderer.service.ts
|
|
12
12
|
var _RendererService;
|
|
13
13
|
let RendererService = class RendererService {
|
|
14
14
|
static {
|
|
@@ -194,5 +194,4 @@ let RendererService = class RendererService {
|
|
|
194
194
|
}
|
|
195
195
|
};
|
|
196
196
|
RendererService = _RendererService = __decorate([Injectable(), __decorateMetadata("design:paramtypes", [typeof LoggerService === "undefined" ? Object : LoggerService, typeof BrowserService === "undefined" ? Object : BrowserService])], RendererService);
|
|
197
|
-
//#endregion
|
|
198
197
|
export { RendererService };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../constants/file.constants.mjs";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorateMetadata.mjs";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.mjs";
|
|
4
4
|
import { resolveConfined } from "../template/assets.mjs";
|
|
5
5
|
import { isLoopbackRequest } from "../loopback.mjs";
|
|
6
6
|
import { TemplateService } from "../template/template.service.mjs";
|
|
@@ -14,7 +14,7 @@ import { spawn } from "child_process";
|
|
|
14
14
|
import { once } from "events";
|
|
15
15
|
import { createServer } from "http";
|
|
16
16
|
import serveStatic from "serve-static";
|
|
17
|
-
|
|
17
|
+
// src/services/session/preview.service.ts
|
|
18
18
|
let PreviewService = class PreviewService {
|
|
19
19
|
logger;
|
|
20
20
|
template;
|
|
@@ -183,5 +183,4 @@ let PreviewService = class PreviewService {
|
|
|
183
183
|
}
|
|
184
184
|
};
|
|
185
185
|
PreviewService = __decorate([Injectable(), __decorateMetadata("design:paramtypes", [typeof LoggerService === "undefined" ? Object : LoggerService, typeof TemplateService === "undefined" ? Object : TemplateService])], PreviewService);
|
|
186
|
-
//#endregion
|
|
187
186
|
export { PreviewService };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../constants/template.constants.mjs";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorateMetadata.mjs";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.mjs";
|
|
4
4
|
import { PrinterService } from "../printer.service.mjs";
|
|
5
5
|
import { Injectable } from "@nestjs/common";
|
|
6
6
|
import { dirname, join, resolve } from "path";
|
|
@@ -8,7 +8,7 @@ import { LoggerService } from "@cenk1cenk2/oclif-common";
|
|
|
8
8
|
import { EventEmitter } from "events";
|
|
9
9
|
import { watch } from "chokidar";
|
|
10
10
|
import { debounce } from "perfect-debounce";
|
|
11
|
-
|
|
11
|
+
// src/services/session/session.service.ts
|
|
12
12
|
let SessionService = class SessionService extends EventEmitter {
|
|
13
13
|
logger;
|
|
14
14
|
printer;
|
|
@@ -111,5 +111,4 @@ let SessionService = class SessionService extends EventEmitter {
|
|
|
111
111
|
}
|
|
112
112
|
};
|
|
113
113
|
SessionService = __decorate([Injectable(), __decorateMetadata("design:paramtypes", [typeof LoggerService === "undefined" ? Object : LoggerService, typeof PrinterService === "undefined" ? Object : PrinterService])], SessionService);
|
|
114
|
-
//#endregion
|
|
115
114
|
export { SessionService };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../../constants/signature.constants.mjs";
|
|
2
|
-
import __decorateMetadata from "../../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorateMetadata.mjs";
|
|
3
|
+
import __decorate from "../../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.mjs";
|
|
4
4
|
import { BrowserNotFoundError } from "../../renderer/browser.mjs";
|
|
5
5
|
import { BrowserService } from "../../renderer/browser.service.mjs";
|
|
6
6
|
import { IncompleteSignatureError, parseSignedData } from "../cms.mjs";
|
|
@@ -13,7 +13,7 @@ import { spawn } from "child_process";
|
|
|
13
13
|
import { once } from "events";
|
|
14
14
|
import { createServer } from "http";
|
|
15
15
|
import getRawBody from "raw-body";
|
|
16
|
-
|
|
16
|
+
// src/services/signature/adapters/a-trust.adapter.ts
|
|
17
17
|
let ATrustAdapter = class ATrustAdapter extends SignatureAdapter {
|
|
18
18
|
logger;
|
|
19
19
|
context;
|
|
@@ -133,5 +133,4 @@ ATrustAdapter = __decorate([Injectable(), __decorateMetadata("design:paramtypes"
|
|
|
133
133
|
typeof CommandContext === "undefined" ? Object : CommandContext,
|
|
134
134
|
typeof BrowserService === "undefined" ? Object : BrowserService
|
|
135
135
|
])], ATrustAdapter);
|
|
136
|
-
//#endregion
|
|
137
136
|
export { ATrustAdapter };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fromBER } from "asn1js";
|
|
2
2
|
import { ContentInfo, SignedData } from "pkijs";
|
|
3
|
-
|
|
3
|
+
// src/services/signature/cms.ts
|
|
4
4
|
var IncompleteSignatureError = class extends Error {
|
|
5
5
|
received;
|
|
6
6
|
declared;
|
|
@@ -31,5 +31,4 @@ function parseSignedData(cms) {
|
|
|
31
31
|
if (info.contentType !== ContentInfo.SIGNED_DATA) throw new Error(`Expected CMS SignedData but got content type ${info.contentType}.`);
|
|
32
32
|
return new SignedData({ schema: info.content });
|
|
33
33
|
}
|
|
34
|
-
//#endregion
|
|
35
34
|
export { IncompleteSignatureError, SignatureVerificationError, parseSignedData };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorateMetadata.mjs";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.mjs";
|
|
3
3
|
import { IncompleteSignatureError, SignatureVerificationError, parseSignedData } from "./cms.mjs";
|
|
4
4
|
import { ATrustAdapter } from "./adapters/a-trust.adapter.mjs";
|
|
5
5
|
import { Injectable } from "@nestjs/common";
|
|
@@ -11,7 +11,7 @@ import { plainAddPlaceholder } from "@signpdf/placeholder-plain";
|
|
|
11
11
|
import { SUBFILTER_ETSI_CADES_DETACHED, findByteRange, removeTrailingNewLine } from "@signpdf/utils";
|
|
12
12
|
import { X509Certificate, webcrypto } from "crypto";
|
|
13
13
|
import { homedir } from "os";
|
|
14
|
-
|
|
14
|
+
// src/services/signature/signature.service.ts
|
|
15
15
|
var _SignatureService;
|
|
16
16
|
let SignatureService = class SignatureService {
|
|
17
17
|
static {
|
|
@@ -128,5 +128,4 @@ let SignatureService = class SignatureService {
|
|
|
128
128
|
}
|
|
129
129
|
};
|
|
130
130
|
SignatureService = _SignatureService = __decorate([Injectable(), __decorateMetadata("design:paramtypes", [typeof LoggerService === "undefined" ? Object : LoggerService, typeof ATrustAdapter === "undefined" ? Object : ATrustAdapter])], SignatureService);
|
|
131
|
-
//#endregion
|
|
132
131
|
export { SignatureService };
|
|
@@ -7,7 +7,7 @@ import { fromHtml } from "hast-util-from-html";
|
|
|
7
7
|
import { transform, transformStyleAttribute } from "lightningcss";
|
|
8
8
|
import mime from "mime";
|
|
9
9
|
import { parseSrcset, stringifySrcset } from "srcset";
|
|
10
|
-
|
|
10
|
+
// src/services/template/assets.ts
|
|
11
11
|
const REFERENCES = {
|
|
12
12
|
img: ["src", "srcSet"],
|
|
13
13
|
source: ["src", "srcSet"],
|
|
@@ -123,5 +123,4 @@ async function load(reference, base, remote, confined) {
|
|
|
123
123
|
path: file
|
|
124
124
|
}), () => void 0);
|
|
125
125
|
}
|
|
126
|
-
//#endregion
|
|
127
126
|
export { dataUri, inlineCss, inlineHtml, isInlinableAsset, mimeType, resolveConfined };
|
|
@@ -6,7 +6,7 @@ import { pathToFileURL } from "url";
|
|
|
6
6
|
import { existsSync } from "fs";
|
|
7
7
|
import { createRequire } from "module";
|
|
8
8
|
import { compile, preprocess } from "svelte/compiler";
|
|
9
|
-
|
|
9
|
+
// src/services/template/svelte.plugin.ts
|
|
10
10
|
/**
|
|
11
11
|
* `svelte` resolves to md-printer's copy, since templates can live outside any `node_modules`. `<style lang="postcss">` blocks are collected
|
|
12
12
|
* instead of compiled per component, so the template's stylesheet goes through Tailwind once. `md-printer:template-components` maps the shared
|
|
@@ -62,5 +62,4 @@ function sveltePlugin({ template, components, root, stylesheets }) {
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
//#endregion
|
|
66
65
|
export { sveltePlugin };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "../../constants/template.constants.mjs";
|
|
2
|
-
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.
|
|
3
|
-
import __decorate from "../../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorateMetadata.mjs";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.mjs";
|
|
4
4
|
import { inlineCss, inlineHtml } from "./assets.mjs";
|
|
5
5
|
import { sveltePlugin } from "./svelte.plugin.mjs";
|
|
6
6
|
import { Injectable } from "@nestjs/common";
|
|
@@ -17,7 +17,7 @@ import { readFileSync } from "fs";
|
|
|
17
17
|
import { createRequire } from "module";
|
|
18
18
|
import { rolldown } from "rolldown";
|
|
19
19
|
import { render } from "svelte/server";
|
|
20
|
-
|
|
20
|
+
// src/services/template/template.service.ts
|
|
21
21
|
var _TemplateService;
|
|
22
22
|
let TemplateService = class TemplateService {
|
|
23
23
|
static {
|
|
@@ -207,5 +207,4 @@ let TemplateService = class TemplateService {
|
|
|
207
207
|
}
|
|
208
208
|
};
|
|
209
209
|
TemplateService = _TemplateService = __decorate([Injectable(), __decorateMetadata("design:paramtypes", [typeof FileSystemService === "undefined" ? Object : FileSystemService])], TemplateService);
|
|
210
|
-
//#endregion
|
|
211
210
|
export { TemplateService };
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cenk1cenk2/md-printer",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.6",
|
|
4
4
|
"description": "Render markdown or yaml through Svelte templates into PDF or HTML with Puppeteer.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
"hast-util-from-html": "^2.0.3",
|
|
71
71
|
"hast-util-to-html": "^9.0.5",
|
|
72
72
|
"highlight.js": "^11.12.0",
|
|
73
|
-
"i18next": "^26.4.
|
|
73
|
+
"i18next": "^26.4.6",
|
|
74
74
|
"lightningcss": "^1.33.0",
|
|
75
75
|
"listr2": "^11.4.0",
|
|
76
76
|
"lowlight": "^3.3.0",
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
"tsdown": "^0.23.1",
|
|
127
127
|
"typescript": "^6.0.3",
|
|
128
128
|
"vite": "^8.3.4",
|
|
129
|
-
"vitest": "^5.0.
|
|
129
|
+
"vitest": "^5.0.5"
|
|
130
130
|
},
|
|
131
131
|
"config": {
|
|
132
132
|
"commitizen": {
|