Comparing version 3.0.7 to 3.0.8
@@ -1,1 +0,1 @@ | ||
export {}; | ||
import './devtools-window-polyfill'; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// Ignoring missing types error to avoid adding another dependency for this hack to work | ||
// eslint-disable-next-line import/no-unassigned-import | ||
require("./devtools-window-polyfill"); | ||
// @ts-ignore | ||
const ws_1 = __importDefault(require("ws")); | ||
// @ts-ignore | ||
const react_devtools_core_1 = require("react-devtools-core"); | ||
const customGlobal = global; | ||
// These things must exist before importing `react-devtools-core` | ||
if (!customGlobal.WebSocket) { | ||
customGlobal.WebSocket = ws_1.default; | ||
} | ||
if (!customGlobal.window) { | ||
customGlobal.window = global; | ||
} | ||
// Filter out Ink's internal components from devtools for a cleaner view. | ||
// Also, ince `react-devtools-shared` package isn't published on npm, we can't | ||
// use its types, that's why there are hard-coded values in `type` fields below. | ||
// See https://github.com/facebook/react/blob/edf6eac8a181860fd8a2d076a43806f1237495a1/packages/react-devtools-shared/src/types.js#L24 | ||
customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [ | ||
{ | ||
// ComponentFilterElementType | ||
type: 1, | ||
// ElementTypeHostComponent | ||
value: 7, | ||
isEnabled: true | ||
}, | ||
{ | ||
// ComponentFilterDisplayName | ||
type: 2, | ||
value: 'InternalApp', | ||
isEnabled: true, | ||
isValid: true | ||
}, | ||
{ | ||
// ComponentFilterDisplayName | ||
type: 2, | ||
value: 'InternalAppContext', | ||
isEnabled: true, | ||
isValid: true | ||
}, | ||
{ | ||
// ComponentFilterDisplayName | ||
type: 2, | ||
value: 'InternalStdoutContext', | ||
isEnabled: true, | ||
isValid: true | ||
}, | ||
{ | ||
// ComponentFilterDisplayName | ||
type: 2, | ||
value: 'InternalStderrContext', | ||
isEnabled: true, | ||
isValid: true | ||
}, | ||
{ | ||
// ComponentFilterDisplayName | ||
type: 2, | ||
value: 'InternalStdinContext', | ||
isEnabled: true, | ||
isValid: true | ||
}, | ||
{ | ||
// ComponentFilterDisplayName | ||
type: 2, | ||
value: 'InternalFocusContext', | ||
isEnabled: true, | ||
isValid: true | ||
} | ||
]; | ||
react_devtools_core_1.connectToDevTools(); | ||
//# sourceMappingURL=devtools.js.map |
{ | ||
"name": "ink", | ||
"version": "3.0.7", | ||
"version": "3.0.8", | ||
"description": "React for CLI", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -128,2 +128,8 @@ <h1 align="center"> | ||
Alternatively, create a TypeScript project: | ||
``` | ||
$ npx create-ink-app --typescript | ||
``` | ||
<details><summary>Manual setup</summary> | ||
@@ -130,0 +136,0 @@ <p> |
Sorry, the diff of this file is not supported yet
286719
150
3931
1773