@emailens/cli 0.13.1 → 0.13.3
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 +188 -186
- package/dist/chunk-2AP7CT6R.js +65 -0
- package/dist/chunk-ABDTBRVK.js +278 -0
- package/dist/chunk-FRXG2KHP.js +72790 -0
- package/dist/chunk-K6T7YHQE.js +50 -0
- package/dist/chunk-NXBRJX3V.js +127 -0
- package/dist/chunk-TQGPCAMW.js +52 -0
- package/dist/index.js +44368 -250
- package/dist/maizzle-2EWV25PZ-MFDX4VFS.js +12 -0
- package/dist/mjml-C46UWTTK-K5PRQEV4.js +10 -0
- package/dist/prompt-2EJPRDMQ.js +756 -0
- package/dist/react-email-4EWH2SB4-CUKHMPBB.js +10 -0
- package/dist/{screenshots-UOLRXFAJ.js → screenshots-TICHS3Q4.js} +4 -4
- package/dist/{sdk-IYJIYBYM.js → sdk-SK3KXIBO.js} +3 -3
- package/dist/test.d.ts +16 -6
- package/dist/test.js +9 -5
- package/package.json +16 -11
- package/dist/chunk-55EWHWWT.js +0 -648
- package/dist/chunk-55EWHWWT.js.map +0 -1
- package/dist/chunk-7OCVIDC7.js +0 -12
- package/dist/chunk-7OCVIDC7.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/screenshots-UOLRXFAJ.js.map +0 -1
- package/dist/sdk-IYJIYBYM.js.map +0 -1
- package/dist/test.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import { createRequire as __cr } from "node:module";
|
|
2
|
+
const require = __cr(import.meta.url);
|
|
3
|
+
import "./chunk-K6T7YHQE.js";
|
|
3
4
|
|
|
4
5
|
// src/screenshots.ts
|
|
5
6
|
import { mkdirSync, writeFileSync } from "fs";
|
|
@@ -19,7 +20,7 @@ async function captureScreenshots(transforms, outputDir, onProgress) {
|
|
|
19
20
|
chromium = pw.chromium;
|
|
20
21
|
} catch {
|
|
21
22
|
throw new Error(
|
|
22
|
-
'Screenshots require "playwright-core".
|
|
23
|
+
'Screenshots require "playwright-core", which is not bundled. Either:\n npx -p @emailens/cli -p playwright-core emailens export <file> --screenshots\n npm install -g @emailens/cli playwright-core'
|
|
23
24
|
);
|
|
24
25
|
}
|
|
25
26
|
mkdirSync(outputDir, { recursive: true });
|
|
@@ -60,4 +61,3 @@ async function captureScreenshots(transforms, outputDir, onProgress) {
|
|
|
60
61
|
export {
|
|
61
62
|
captureScreenshots
|
|
62
63
|
};
|
|
63
|
-
//# sourceMappingURL=screenshots-UOLRXFAJ.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import { createRequire as __cr } from "node:module";
|
|
2
|
+
const require = __cr(import.meta.url);
|
|
3
|
+
import "./chunk-K6T7YHQE.js";
|
|
3
4
|
|
|
4
5
|
// node_modules/@anthropic-ai/sdk/internal/tslib.mjs
|
|
5
6
|
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
@@ -3839,4 +3840,3 @@ export {
|
|
|
3839
3840
|
Anthropic as default,
|
|
3840
3841
|
toFile
|
|
3841
3842
|
};
|
|
3842
|
-
//# sourceMappingURL=sdk-IYJIYBYM.js.map
|
package/dist/test.d.ts
CHANGED
|
@@ -1,25 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/** Where a finding sits in the source. */
|
|
2
|
+
interface SourceLocation {
|
|
3
|
+
/** 1-based. */
|
|
4
|
+
line: number;
|
|
5
|
+
/** 1-based. */
|
|
6
|
+
column: number;
|
|
7
|
+
endLine: number;
|
|
8
|
+
endColumn: number;
|
|
9
|
+
/** 0-based character offset. */
|
|
10
|
+
offset: number;
|
|
11
|
+
length: number;
|
|
12
|
+
}
|
|
3
13
|
interface LintIssue {
|
|
4
14
|
severity: "error" | "warning" | "info";
|
|
5
15
|
category: string;
|
|
6
16
|
rule: string;
|
|
7
17
|
message: string;
|
|
8
18
|
detail?: string;
|
|
9
|
-
/**
|
|
19
|
+
/** HTML sources only. */
|
|
10
20
|
loc?: SourceLocation;
|
|
11
21
|
/** Every place a CSS property breaks, in document order. */
|
|
12
22
|
locs?: SourceLocation[];
|
|
13
23
|
/** `locs` is capped and does not list every occurrence. */
|
|
14
24
|
locsTruncated?: boolean;
|
|
15
25
|
}
|
|
16
|
-
|
|
17
26
|
interface ExpectEmailOptions {
|
|
18
27
|
/** Fail on warnings too, like `lint --fail-on-warning`. */
|
|
19
28
|
failOnWarning?: boolean;
|
|
20
29
|
/** Checks to skip, the same names as `lint --skip`. */
|
|
21
30
|
skip?: string[];
|
|
22
|
-
framework
|
|
31
|
+
/** The source the HTML was compiled from, for framework-aware notes. */
|
|
32
|
+
framework?: "jsx" | "mjml" | "maizzle";
|
|
23
33
|
}
|
|
24
34
|
/**
|
|
25
35
|
* The `lint` check as a test assertion: throws, listing every finding that
|
|
@@ -31,4 +41,4 @@ interface ExpectEmailOptions {
|
|
|
31
41
|
*/
|
|
32
42
|
declare function expectEmailToPass(html: string, options?: ExpectEmailOptions): LintIssue[];
|
|
33
43
|
|
|
34
|
-
export { type ExpectEmailOptions, type LintIssue, expectEmailToPass };
|
|
44
|
+
export { type ExpectEmailOptions, type LintIssue, type SourceLocation, expectEmailToPass };
|
package/dist/test.js
CHANGED
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import { createRequire as __cr } from "node:module";
|
|
2
|
+
const require = __cr(import.meta.url);
|
|
2
3
|
import {
|
|
3
4
|
applySeverities,
|
|
5
|
+
auditEmail,
|
|
4
6
|
flattenToLintIssues,
|
|
5
7
|
loadProjectConfig
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-FRXG2KHP.js";
|
|
9
|
+
import "./chunk-ABDTBRVK.js";
|
|
10
|
+
import "./chunk-2AP7CT6R.js";
|
|
11
|
+
import "./chunk-NXBRJX3V.js";
|
|
12
|
+
import "./chunk-TQGPCAMW.js";
|
|
13
|
+
import "./chunk-K6T7YHQE.js";
|
|
8
14
|
|
|
9
15
|
// src/test.ts
|
|
10
|
-
import { auditEmail } from "@emailens/engine";
|
|
11
16
|
function expectEmailToPass(html, options = {}) {
|
|
12
17
|
const project = loadProjectConfig();
|
|
13
18
|
const skip = options.skip ?? project?.skip ?? [];
|
|
@@ -32,4 +37,3 @@ ${lines.join("\n")}`);
|
|
|
32
37
|
export {
|
|
33
38
|
expectEmailToPass
|
|
34
39
|
};
|
|
35
|
-
//# sourceMappingURL=test.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emailens/cli",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.3",
|
|
4
4
|
"description": "CLI tool for email compatibility analysis: lint, preview and export HTML, MJML, Maizzle and React Email rendering across 21 email clients.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -30,22 +30,27 @@
|
|
|
30
30
|
"test": "bun test",
|
|
31
31
|
"prepublishOnly": "bun run build"
|
|
32
32
|
},
|
|
33
|
-
"dependencies": {
|
|
34
|
-
|
|
35
|
-
"citty": "^0.1.6",
|
|
36
|
-
"cli-table3": "^0.6.5",
|
|
37
|
-
"ora": "^8.2.0",
|
|
38
|
-
"picocolors": "^1.1.1"
|
|
39
|
-
},
|
|
40
|
-
"optionalDependencies": {
|
|
41
|
-
"@anthropic-ai/sdk": "^0.52.0",
|
|
33
|
+
"dependencies": {},
|
|
34
|
+
"peerDependencies": {
|
|
42
35
|
"playwright-core": "^1.62.1"
|
|
43
36
|
},
|
|
37
|
+
"peerDependenciesMeta": {
|
|
38
|
+
"playwright-core": {
|
|
39
|
+
"optional": true
|
|
40
|
+
}
|
|
41
|
+
},
|
|
44
42
|
"devDependencies": {
|
|
43
|
+
"@anthropic-ai/sdk": "^0.52.0",
|
|
44
|
+
"@emailens/engine": "^0.18.4",
|
|
45
45
|
"@types/bun": "^1.4.0",
|
|
46
46
|
"@types/mjml": "^4.7.4",
|
|
47
47
|
"@types/node": "^25.9.5",
|
|
48
48
|
"bun-types": "^1.4.0",
|
|
49
|
+
"citty": "^0.1.6",
|
|
50
|
+
"cli-table3": "^0.6.5",
|
|
51
|
+
"ora": "^8.2.0",
|
|
52
|
+
"picocolors": "^1.1.1",
|
|
53
|
+
"playwright-core": "^1.62.1",
|
|
49
54
|
"tsup": "^8.5.1",
|
|
50
55
|
"typescript": "^5.9.3"
|
|
51
56
|
},
|
|
@@ -76,4 +81,4 @@
|
|
|
76
81
|
"bugs": {
|
|
77
82
|
"url": "https://github.com/emailens/cli/issues"
|
|
78
83
|
}
|
|
79
|
-
}
|
|
84
|
+
}
|