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
| const magicMachine = Machine({ | |
| id: "magic", | |
| initial: "ready", | |
| context: { | |
| didToken: null, | |
| apiToken: null, | |
| }, | |
| states: { | |
| ready: { | |
| initial: "noError", |
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
| /* | |
| Makes your remote containers low level API accessible via: | |
| import accessFederatedContainer from "access-federated-containers"; | |
| accessFederatedContainer("app2") | |
| */ | |
| /** @typedef {import("webpack").Compiler} Compiler */ | |
| /** @typedef {import("webpack").Compilation} Compilation */ |
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
| const fs = require("fs"); | |
| const path = require("path"); | |
| const Template = require("webpack/lib/Template"); | |
| const SingleEntryPlugin = require("webpack/lib/SingleEntryPlugin"); | |
| const VirtualModulesPlugin = require("webpack-virtual-modules"); | |
| const PLUGIN_NAME = "FederatedStartupCodePlugin"; | |
| /** |
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
| const path = require("path"); | |
| const { camelCase } = require("camel-case"); | |
| const webpack = require("webpack"); | |
| const { merge } = require("webpack-merge"); | |
| const HtmlWebpackPlugin = require("html-webpack-plugin"); | |
| const CopyPlugin = require("copy-webpack-plugin"); | |
| const pkg = require("./package.json"); |
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
| new StatsWriterPlugin({ | |
| stats: { | |
| all: true, | |
| }, | |
| transform(stats) { | |
| const federatedChunks = stats.chunks.filter((chunk) => | |
| chunk.origins.some((origin) => origin.moduleName === "container entry") | |
| ); | |
| const assetsByChunkName = Object.entries( |
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
| const { PassThrough } = require('stream'); | |
| const { pipeToNodeWritable } = require('react-dom/server'); | |
| function renderToStringWithWritable(element, timeout = 10000) { | |
| return new Promise((resolve, reject) => { | |
| const writable = new PassThrough(); | |
| let res = ''; | |
| writable.on('data', d => { | |
| res += String(d); |
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 type { LinksFunction, LoaderFunction, MetaFunction } from "remix"; | |
| export let composeMeta = | |
| ( | |
| ...metas: (MetaFunction | { data: string; meta: MetaFunction })[] | |
| ): MetaFunction => | |
| (args) => | |
| metas.reduce<ReturnType<MetaFunction>>((res, meta) => { | |
| if (typeof meta === "function") { | |
| return { ...res, ...meta(args) }; |
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 { createHash } from "crypto"; | |
| import { get, set, setex } from "@upstash/redis"; | |
| type CachedResponse = { | |
| status: number; | |
| statusText: string; | |
| body: string; | |
| headers: [string, string][]; | |
| }; |
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 { createHash } from "crypto"; | |
| import fs from "fs"; | |
| import fsp from "fs/promises"; | |
| import path from "path"; | |
| import https from "https"; | |
| import { PassThrough } from "stream"; | |
| import type { Readable } from "stream"; | |
| import type { LoaderFunction } from "remix"; | |
| import sharp from "sharp"; | |
| import type { Request as NodeRequest } from "@remix-run/node"; |
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
| {"requestedUrl":"https://remix-ecommerce.fly.dev/","finalUrl":"https://remix-ecommerce.fly.dev/","lighthouseVersion":"9.0.0","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/95.0.4638.69 Safari/537.36","fetchTime":"2022-01-02T09:53:12.290Z","environment":{"networkUserAgent":"Mozilla/5.0 (Linux; Android 7.0; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4695.0 Mobile Safari/537.36 Chrome-Lighthouse","hostUserAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/95.0.4638.69 Safari/537.36","benchmarkIndex":1302.5},"runWarnings":[],"configSettings":{"emulatedFormFactor":"mobile","formFactor":"mobile","locale":"en-US","onlyCategories":["performance","accessibility","best-practices","seo"],"channel":"lr"},"audits":{"th-has-data-cells":{"id":"th-has-data-cells","title":"`<th>` elements and elements with `[role=\"columnheader\"/\"rowheader\"]` have data cells they describe.","description":"Screen readers have f |
OlderNewer