This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import commonjs from '@rollup/plugin-commonjs'; | |
import html from '@rollup/plugin-html'; | |
import { nodeResolve } from '@rollup/plugin-node-resolve'; | |
import replace from '@rollup/plugin-replace'; | |
import typescript from '@rollup/plugin-typescript'; | |
import license from 'rollup-plugin-license'; | |
import livereload from 'rollup-plugin-livereload'; | |
import serve from 'rollup-plugin-serve'; | |
import styles from 'rollup-plugin-styles'; | |
import { terser } from 'rollup-plugin-terser'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface Property { | |
hasValue?: boolean; | |
lastInputPropertyValue?: any; | |
currentValue?: any; | |
} | |
export function ProjectProperty<T, K extends keyof T>(inputPropertyName: K, projectFn: (input: T[K]) => any) { | |
const propertySymbol = Symbol(); | |
return (target: T, propertyKey: PropertyKey) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/node_modules/jest-screenshot/dist/jest-screenshot.js b/node_modules/jest-screenshot/dist/jest-screenshot.js | |
index 4c43c6c..18daa4a 100644 | |
--- a/node_modules/jest-screenshot/dist/jest-screenshot.js | |
+++ b/node_modules/jest-screenshot/dist/jest-screenshot.js | |
@@ -2,6 +2,8 @@ | |
Object.defineProperty(exports, "__esModule", { value: true }); | |
exports.setupJestScreenshot = void 0; | |
const to_match_image_snapshot_1 = require("./to-match-image-snapshot"); | |
+const fs = require("fs"); | |
+const path = require("path"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Jest Snapshot v1, https://goo.gl/fbAQLP | |
exports[`SendEmailsWhenBuyerMessagedSellerAboutOrderEventHandler should generate the correct emails: email event 1`] = ` | |
Id: 0000000-0000-0000-0000-000000000000 | |
From: Bob Smith <feedback+0000000-0000-0000-0000-000000000000@transactional.example.com> | |
ReplyTo: Bob Smith <[email protected]> | |
To: [email protected] | |
UtcDateToSend: null | |
Archived: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function fileExists(filePath: string) { | |
return fs.existsSync(filePath); | |
} | |
export function readFile(filePath: string) { | |
return fs.readFileSync(filePath).toString(); | |
} | |
export function writeFile(filePath: string, contents: string, silent = false) { | |
filePath = path.normalize(filePath); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { parse, serialize, AST } from 'parse5'; | |
export function transformHtml(html: string, visitors: NodeVisitor[]) { | |
const document = parse(html) as AST.Default.Document; | |
visitNode(document, visitors); | |
return serialize(document); | |
} | |
export function removeInnerHtmlAttributes(node: any) { | |
if (node.attrs) { |