@emailens/cli 0.13.2 → 0.13.4

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.
@@ -0,0 +1,10 @@
1
+ import { createRequire as __cr } from "node:module";
2
+ const require = __cr(import.meta.url);
3
+ import {
4
+ compileReactEmail
5
+ } from "./chunk-ABDTBRVK.js";
6
+ import "./chunk-TQGPCAMW.js";
7
+ import "./chunk-K6T7YHQE.js";
8
+ export {
9
+ compileReactEmail
10
+ };
@@ -1,5 +1,6 @@
1
- #!/usr/bin/env node
2
- import "./chunk-7OCVIDC7.js";
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". Install it:\n npm install 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
- #!/usr/bin/env node
2
- import "./chunk-7OCVIDC7.js";
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
- import { SourceLocation, AuditOptions } from '@emailens/engine';
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
- /** Where in the file the issue is. HTML sources only, see `positionsApply`. */
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?: AuditOptions["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
- #!/usr/bin/env node
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-IM52U7ZV.js";
7
- import "./chunk-7OCVIDC7.js";
8
+ } from "./chunk-2W2K4VNB.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.2",
3
+ "version": "0.13.4",
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
- "@emailens/engine": "^0.18.4",
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.6",
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
+ }
@@ -1,12 +0,0 @@
1
- #!/usr/bin/env node
2
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
3
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
4
- }) : x)(function(x) {
5
- if (typeof require !== "undefined") return require.apply(this, arguments);
6
- throw Error('Dynamic require of "' + x + '" is not supported');
7
- });
8
-
9
- export {
10
- __require
11
- };
12
- //# sourceMappingURL=chunk-7OCVIDC7.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}