20 January 2021
At the time of writing, there are no pre-compiled NodeJS binaries for versions prior to 15.x for Apple's new M1 chip (arm64 architecture).
Additional issues encountered:
FROM node:10-alpine as build | |
WORKDIR /usr/src/app | |
COPY package.json . | |
COPY yarn.lock . | |
COPY packages/shared ./packages/shared | |
COPY packages/api ./packages/api | |
RUN yarn install --pure-lockfile --non-interactive |
/* eslint-disable */ | |
// For more infos, see: https://github.com/jquense/yup/blob/master/src/locale.js | |
import { setLocale } from 'yup' | |
const translation = { | |
mixed: { | |
default: '${path} é inválido', | |
required: '${path} é um campo obrigatório', | |
oneOf: '${path} deve ser um dos seguintes valores: ${values}', | |
notOneOf: '${path} não pode ser um dos seguintes valores: ${values}', |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import App from './App/App'; | |
import './index.css'; | |
const render = () => { | |
ReactDOM.render(<App />, document.getElementById('root')); | |
} | |
if ( |
const http2 = require('http2'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const zlib = require('zlib'); | |
const brotli = require('brotli'); // npm package | |
const PORT = 3032; | |
const BROTLI_QUALITY = 11; // slow, but we're caching so who cares | |
const STATIC_DIRECTORY = path.resolve(__dirname, '../dist/'); | |
const cache = {}; |
const createLogger = (backgroundColor, color) => { | |
const logger = (message, ...args) => { | |
if (logger.enabled === false) { | |
return; | |
} | |
console.groupCollapsed( | |
`%c${message}`, | |
`background-color: ${backgroundColor}; color: ${color}; padding: 2px 4px;`, | |
...args |
const storage = require('@google-cloud/storage') | |
const createUuid = require("uuid-v4") | |
const credentials = require('./test-firebase-credentials.json') | |
const firebaseProjectName = 'test' | |
const bucketName = `${firebaseProjectName}.appspot.com` | |
const bucket = storage({ credentials }).bucket(bucketName) | |
module.exports = firebaseSaveFile |
Your Service Worker script will need to import in Workbox and initialize it before calling any of the routes documented in this write-up, similar to the below:
importScripts('workbox-sw.prod.v1.3.0.js');
const workbox = new WorkboxSW();
// Placeholder array populated automatically by workboxBuild.injectManifest()