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 glob = require("glob") | |
| const fs = require("fs-extra") | |
| const path = require("path") | |
| const globPaths = [ | |
| "src/**/*.js", | |
| "test/**/*.js" | |
| ] | |
| globPaths.forEach(globPath => { |
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
| 0 info it worked if it ends with ok | |
| 1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'cache', 'verify' ] | |
| 2 info using [email protected] | |
| 3 info using [email protected] | |
| 4 verbose npm-session 32567c39d9616e2f | |
| 5 verbose stack Error: stream.push() after EOF | |
| 5 verbose stack at readableAddChunk (/usr/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_readable.js:264:30) | |
| 5 verbose stack at Class.Readable.push (/usr/lib/node_modules/npm/node_modules/readable-stream/lib/_stream_readable.js:238:10) | |
| 5 verbose stack at Array.from.map.entry (/usr/lib/node_modules/npm/node_modules/cacache/lib/entry-index.js:120:29) | |
| 5 verbose stack at Array.map (<anonymous>) |
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 * as React from 'react' | |
| export class VideoComponent extends React.Component<React.HTMLProps<HTMLVideoElement>> { | |
| videoElem: HTMLVideoElement | null | |
| srcElem: HTMLSourceElement | null | |
| componentWillUnmount() { | |
| this.unmountVideo() | |
| } |
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 * as React from "react" | |
| export class ImageComponent extends React.Component<React.HTMLProps<HTMLImageElement>> { | |
| imgElem: HTMLImageElement | null | |
| componentWillUnmount() { | |
| this.unmountImage() | |
| } | |
| componentWillReceiveProps(nextProps: React.HTMLProps<HTMLImageElement>) { |
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
| gracefulClusterShutdown = (signal: NodeJS.Signals) => async () => { | |
| if (this.shutdownInProgress) | |
| return | |
| this.shutdownInProgress = true | |
| this.hasCleanWorkerExit = true | |
| log.info(`Got ${signal} on ${this.processStr}. Graceful shutdown start at ${new Date().toISOString()}`) | |
| try { |
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 * as cluster from 'cluster' | |
| class Master { | |
| private shutdownInProgress: boolean = false | |
| private hasCleanWorkerExit: boolean = true | |
| private processStr = `${cluster.isMaster ? "master" : "worker"} process ${process.pid}` | |
| gracefulClusterShutdown = (signal: NodeJS.Signals) => async () => { | |
| //defined in worker-shutdown.ts (https://gist.github.com/Dante-101/de2fbd5071bec0c0647f5c9fa1cfa179) |