Improve development tooling (#1516)
- Running `yarn build` in a `packages/*/` directory will trigger build of all dependencies too, and cache them if possible. - Fix for `yarn dev` breaking for `rrweb` package whenever changing files in `rrweb` package - Update typescript, turbo, vite and vite-plugin-dts - Require `workspaces-to-typescript-project-references` from `prepublish`
This commit is contained in:
@@ -10,11 +10,11 @@
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "vite build --watch",
|
||||
"build": "tsc -noEmit && vite build",
|
||||
"build": "yarn turbo run prepublish",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest watch",
|
||||
"check-types": "tsc -noEmit",
|
||||
"prepublish": "npm run build",
|
||||
"prepublish": "tsc -noEmit && vite build",
|
||||
"lint": "yarn eslint src/**/*.ts"
|
||||
},
|
||||
"homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/@rrweb/all#readme",
|
||||
@@ -50,10 +50,10 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"puppeteer": "^20.9.0",
|
||||
"vite": "^5.2.8",
|
||||
"vite-plugin-dts": "^3.8.1",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-dts": "^3.9.1",
|
||||
"vitest": "^1.4.0",
|
||||
"typescript": "^4.7.3"
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@rrweb/types": "^2.0.0-alpha.15",
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "vite build --watch",
|
||||
"build": "tsc -noEmit && vite build",
|
||||
"build": "yarn turbo run prepublish",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest watch",
|
||||
"check-types": "tsc -noEmit",
|
||||
"prepublish": "npm run build",
|
||||
"prepublish": "tsc -noEmit && vite build",
|
||||
"lint": "yarn eslint src/**/*.ts"
|
||||
},
|
||||
"homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/@rrweb/packer#readme",
|
||||
@@ -71,10 +71,10 @@
|
||||
"package.json"
|
||||
],
|
||||
"devDependencies": {
|
||||
"vite": "^5.2.8",
|
||||
"vite-plugin-dts": "^3.8.1",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-dts": "^3.9.1",
|
||||
"vitest": "^1.4.0",
|
||||
"typescript": "^4.7.3"
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"fflate": "^0.4.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { strFromU8, strToU8, zlibSync } from 'fflate';
|
||||
import type { PackFn } from '@rrweb/types';
|
||||
import { eventWithTimeAndPacker, MARK } from './base';
|
||||
import { type eventWithTimeAndPacker, MARK } from './base';
|
||||
|
||||
export const pack: PackFn = (event) => {
|
||||
const _e: eventWithTimeAndPacker = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { strFromU8, strToU8, unzlibSync } from 'fflate';
|
||||
import { eventWithTimeAndPacker, MARK } from './base';
|
||||
import { type eventWithTimeAndPacker, MARK } from './base';
|
||||
import type { UnpackFn, eventWithTime } from '@rrweb/types';
|
||||
|
||||
export const unpack: UnpackFn = (raw: string) => {
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "vite build --watch",
|
||||
"build": "tsc -noEmit && vite build",
|
||||
"build": "yarn turbo run prepublish",
|
||||
"check-types": "tsc -noEmit",
|
||||
"prepublish": "npm run build"
|
||||
"prepublish": "tsc -noEmit && vite build"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -44,9 +44,9 @@
|
||||
"homepage": "https://github.com/rrweb-io/rrweb#readme",
|
||||
"devDependencies": {
|
||||
"rrweb": "^2.0.0-alpha.15",
|
||||
"typescript": "^4.7.3",
|
||||
"vite": "^5.2.8",
|
||||
"vite-plugin-dts": "^3.8.1"
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-dts": "^3.9.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"rrweb": "^2.0.0-alpha.15"
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "vite build --watch",
|
||||
"build": "tsc -noEmit && vite build",
|
||||
"build": "yarn turbo run prepublish",
|
||||
"check-types": "tsc -noEmit",
|
||||
"prepublish": "npm run build"
|
||||
"prepublish": "tsc -noEmit && vite build"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -44,9 +44,9 @@
|
||||
"homepage": "https://github.com/rrweb-io/rrweb#readme",
|
||||
"devDependencies": {
|
||||
"rrweb": "^2.0.0-alpha.15",
|
||||
"typescript": "^4.7.3",
|
||||
"vite": "^5.2.8",
|
||||
"vite-plugin-dts": "^3.8.1"
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-dts": "^3.9.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"rrweb": "^2.0.0-alpha.15"
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
"dev": "vite build --watch",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest watch",
|
||||
"build": "tsc -noEmit && vite build",
|
||||
"build": "yarn turbo run prepublish",
|
||||
"check-types": "tsc -noEmit",
|
||||
"prepublish": "npm run build"
|
||||
"prepublish": "tsc -noEmit && vite build"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -46,9 +46,9 @@
|
||||
"homepage": "https://github.com/rrweb-io/rrweb#readme",
|
||||
"devDependencies": {
|
||||
"rrweb": "^2.0.0-alpha.15",
|
||||
"typescript": "^4.7.3",
|
||||
"vite": "^5.2.8",
|
||||
"vite-plugin-dts": "^3.8.1",
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-dts": "^3.9.1",
|
||||
"vitest": "^1.4.0",
|
||||
"puppeteer": "^20.9.0"
|
||||
},
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "vite build --watch",
|
||||
"build": "tsc -noEmit && vite build",
|
||||
"build": "yarn turbo run prepublish",
|
||||
"check-types": "tsc -noEmit",
|
||||
"prepublish": "npm run build"
|
||||
"prepublish": "tsc -noEmit && vite build"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -45,9 +45,9 @@
|
||||
"devDependencies": {
|
||||
"@rrweb/rrweb-plugin-console-record": "^2.0.0-alpha.15",
|
||||
"rrweb": "^2.0.0-alpha.15",
|
||||
"typescript": "^4.7.3",
|
||||
"vite": "^5.2.8",
|
||||
"vite-plugin-dts": "^3.8.1"
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-dts": "^3.9.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"rrweb": "^2.0.0-alpha.15"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {
|
||||
LogLevel,
|
||||
LogData,
|
||||
type LogLevel,
|
||||
type LogData,
|
||||
PLUGIN_NAME,
|
||||
} from '@rrweb/rrweb-plugin-console-record';
|
||||
import type { eventWithTime } from '@rrweb/types';
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "vite build --watch",
|
||||
"build": "tsc -noEmit && vite build",
|
||||
"build": "yarn turbo run prepublish",
|
||||
"check-types": "tsc -noEmit",
|
||||
"prepublish": "npm run build"
|
||||
"prepublish": "tsc -noEmit && vite build"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -44,9 +44,9 @@
|
||||
"homepage": "https://github.com/rrweb-io/rrweb#readme",
|
||||
"devDependencies": {
|
||||
"rrweb": "^2.0.0-alpha.15",
|
||||
"typescript": "^4.7.3",
|
||||
"vite": "^5.2.8",
|
||||
"vite-plugin-dts": "^3.8.1"
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-dts": "^3.9.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"rrweb": "^2.0.0-alpha.15"
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "vite build --watch",
|
||||
"build": "tsc -noEmit && vite build",
|
||||
"build": "yarn turbo run prepublish",
|
||||
"check-types": "tsc -noEmit",
|
||||
"prepublish": "npm run build"
|
||||
"prepublish": "tsc -noEmit && vite build"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -45,9 +45,9 @@
|
||||
"devDependencies": {
|
||||
"@rrweb/rrweb-plugin-sequential-id-record": "^2.0.0-alpha.15",
|
||||
"rrweb": "^2.0.0-alpha.15",
|
||||
"typescript": "^4.7.3",
|
||||
"vite": "^5.2.8",
|
||||
"vite-plugin-dts": "^3.8.1"
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-dts": "^3.9.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"rrweb": "^2.0.0-alpha.15"
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "vite build --watch",
|
||||
"build": "tsc -noEmit && vite build",
|
||||
"build": "yarn turbo run prepublish",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest watch",
|
||||
"check-types": "tsc -noEmit",
|
||||
"prepublish": "npm run build",
|
||||
"prepublish": "tsc -noEmit && vite build",
|
||||
"lint": "yarn eslint src/**/*.ts"
|
||||
},
|
||||
"homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/@rrweb/record#readme",
|
||||
@@ -49,10 +49,10 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"puppeteer": "^20.9.0",
|
||||
"vite": "^5.2.8",
|
||||
"vite-plugin-dts": "^3.8.1",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-dts": "^3.9.1",
|
||||
"vitest": "^1.4.0",
|
||||
"typescript": "^4.7.3"
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@rrweb/types": "^2.0.0-alpha.15",
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "vite build --watch",
|
||||
"build": "tsc -noEmit && vite build",
|
||||
"build": "yarn turbo run prepublish",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest watch",
|
||||
"check-types": "tsc -noEmit",
|
||||
"prepublish": "npm run build",
|
||||
"prepublish": "tsc -noEmit && vite build",
|
||||
"lint": "yarn eslint src/**/*.ts"
|
||||
},
|
||||
"homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/@rrweb/replay#readme",
|
||||
@@ -50,10 +50,10 @@
|
||||
],
|
||||
"devDependencies": {
|
||||
"puppeteer": "^20.9.0",
|
||||
"vite": "^5.2.8",
|
||||
"vite-plugin-dts": "^3.8.1",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-dts": "^3.9.1",
|
||||
"vitest": "^1.4.0",
|
||||
"typescript": "^4.7.3"
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@rrweb/types": "^2.0.0-alpha.15",
|
||||
|
||||
@@ -6,4 +6,9 @@ import {
|
||||
} from 'rrweb';
|
||||
import 'rrweb/dist/style.css';
|
||||
|
||||
export { Replayer, playerConfig, PlayerMachineState, SpeedMachineState };
|
||||
export {
|
||||
Replayer,
|
||||
type playerConfig,
|
||||
type PlayerMachineState,
|
||||
type SpeedMachineState,
|
||||
};
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
"version": "2.0.0-alpha.15",
|
||||
"scripts": {
|
||||
"dev": "vite build --watch",
|
||||
"build": "tsc -noEmit && vite build",
|
||||
"build": "yarn turbo run prepublish",
|
||||
"check-types": "tsc -noEmit",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest watch",
|
||||
"prepublish": "npm run build",
|
||||
"prepublish": "tsc -noEmit && vite build",
|
||||
"lint": "yarn eslint src/**/*.ts"
|
||||
},
|
||||
"keywords": [
|
||||
@@ -46,10 +46,10 @@
|
||||
"compare-versions": "^4.1.3",
|
||||
"eslint": "^8.15.0",
|
||||
"puppeteer": "^9.1.1",
|
||||
"vite": "^5.2.8",
|
||||
"vite-plugin-dts": "^3.8.1",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-dts": "^3.9.1",
|
||||
"vitest": "^1.4.0",
|
||||
"typescript": "^4.7.3"
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"cssom": "^0.5.0",
|
||||
@@ -57,8 +57,5 @@
|
||||
"nwsapi": "^2.2.0",
|
||||
"rrdom": "^2.0.0-alpha.15",
|
||||
"rrweb-snapshot": "^2.0.0-alpha.15"
|
||||
},
|
||||
"browserslist": [
|
||||
"supports es6-class"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ import {
|
||||
BaseRRNode,
|
||||
BaseRRText,
|
||||
ClassList,
|
||||
IRRDocument,
|
||||
CSSStyleDeclaration,
|
||||
type IRRDocument,
|
||||
type CSSStyleDeclaration,
|
||||
} from 'rrdom';
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
|
||||
const nwsapi = require('nwsapi');
|
||||
|
||||
@@ -30,11 +30,11 @@
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "vite build --watch",
|
||||
"build": "tsc -noEmit && vite build",
|
||||
"build": "yarn turbo run prepublish",
|
||||
"check-types": "tsc -noEmit",
|
||||
"test": "vitest run",
|
||||
"test:watch": "vitest",
|
||||
"prepublish": "npm run build",
|
||||
"prepublish": "tsc -noEmit && vite build",
|
||||
"lint": "yarn eslint src/**/*.ts"
|
||||
},
|
||||
"bugs": {
|
||||
@@ -47,9 +47,9 @@
|
||||
"@typescript-eslint/parser": "^5.23.0",
|
||||
"eslint": "^8.15.0",
|
||||
"puppeteer": "^17.1.3",
|
||||
"typescript": "^4.9.0",
|
||||
"vite": "^5.2.8",
|
||||
"vite-plugin-dts": "^3.8.1"
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-dts": "^3.9.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"rrweb-snapshot": "^2.0.0-alpha.15"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
NodeType as RRNodeType,
|
||||
Mirror as NodeMirror,
|
||||
elementNode,
|
||||
type elementNode,
|
||||
} from 'rrweb-snapshot';
|
||||
import type {
|
||||
canvasMutationData,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"svelte-preprocess": "^5.0.3",
|
||||
"svelte2tsx": "^0.7.6",
|
||||
"tslib": "^2.0.0",
|
||||
"vite": "^5.2.8"
|
||||
"vite": "^5.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tsconfig/svelte": "^1.0.0",
|
||||
|
||||
@@ -11,9 +11,9 @@
|
||||
"retest:update": "vitest run --update",
|
||||
"test:update": "yarn build && vitest run --update",
|
||||
"dev": "vite build --watch",
|
||||
"build": "yarn check-types && vite build",
|
||||
"build": "yarn turbo prepublish -F rrweb-snapshot",
|
||||
"check-types": "tsc --noEmit",
|
||||
"prepublish": "npm run build",
|
||||
"prepublish": "yarn check-types && vite build",
|
||||
"lint": "yarn eslint src"
|
||||
},
|
||||
"type": "module",
|
||||
@@ -59,9 +59,9 @@
|
||||
"puppeteer": "^17.1.3",
|
||||
"ts-node": "^7.0.1",
|
||||
"tslib": "^1.9.3",
|
||||
"typescript": "^4.7.3",
|
||||
"vite": "^5.2.8",
|
||||
"vite-plugin-dts": "^3.8.1",
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-dts": "^3.9.1",
|
||||
"vitest": "^1.4.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Rule, Media, NodeWithRules, parse } from './css';
|
||||
import { type Rule, type Media, type NodeWithRules, parse } from './css';
|
||||
import {
|
||||
serializedNodeWithId,
|
||||
type serializedNodeWithId,
|
||||
NodeType,
|
||||
tagMap,
|
||||
elementNode,
|
||||
BuildCache,
|
||||
legacyAttributes,
|
||||
type tagMap,
|
||||
type elementNode,
|
||||
type BuildCache,
|
||||
type legacyAttributes,
|
||||
} from './types';
|
||||
import { isElement, Mirror, isNodeMetaEqual } from './utils';
|
||||
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
import {
|
||||
serializedNode,
|
||||
serializedNodeWithId,
|
||||
type serializedNode,
|
||||
type serializedNodeWithId,
|
||||
NodeType,
|
||||
attributes,
|
||||
MaskInputOptions,
|
||||
SlimDOMOptions,
|
||||
DataURLOptions,
|
||||
MaskTextFn,
|
||||
MaskInputFn,
|
||||
KeepIframeSrcFn,
|
||||
ICanvas,
|
||||
elementNode,
|
||||
serializedElementNodeWithId,
|
||||
type attributes,
|
||||
type MaskInputOptions,
|
||||
type SlimDOMOptions,
|
||||
type DataURLOptions,
|
||||
type MaskTextFn,
|
||||
type MaskInputFn,
|
||||
type KeepIframeSrcFn,
|
||||
type ICanvas,
|
||||
type elementNode,
|
||||
type serializedElementNodeWithId,
|
||||
type mediaAttributes,
|
||||
} from './types';
|
||||
import {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {
|
||||
import type {
|
||||
idNodeMap,
|
||||
MaskInputFn,
|
||||
MaskInputOptions,
|
||||
@@ -6,12 +6,12 @@ import {
|
||||
IMirror,
|
||||
serializedNodeWithId,
|
||||
serializedNode,
|
||||
NodeType,
|
||||
documentNode,
|
||||
documentTypeNode,
|
||||
textNode,
|
||||
elementNode,
|
||||
} from './types';
|
||||
import { NodeType } from './types';
|
||||
|
||||
export function isElement(n: Node): n is Element {
|
||||
return n.nodeType === n.ELEMENT_NODE;
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
"repl": "yarn build && node scripts/repl.js",
|
||||
"live-stream": "yarn build && node scripts/stream.js",
|
||||
"dev": "vite build --watch",
|
||||
"build": "tsc -noEmit && vite build",
|
||||
"build": "yarn turbo run prepublish",
|
||||
"check-types": "tsc -noEmit",
|
||||
"prepublish": "npm run build",
|
||||
"prepublish": "tsc -noEmit && vite build",
|
||||
"lint": "yarn eslint src",
|
||||
"benchmark": "vitest run --maxConcurrency 1 --no-file-parallelism test/benchmark"
|
||||
},
|
||||
@@ -74,9 +74,9 @@
|
||||
"simple-peer-light": "^9.10.0",
|
||||
"ts-node": "^10.9.1",
|
||||
"tslib": "^2.3.1",
|
||||
"typescript": "^4.7.3",
|
||||
"vite": "^5.2.8",
|
||||
"vite-plugin-dts": "^3.8.1"
|
||||
"typescript": "^5.4.5",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-dts": "^3.9.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@rrweb/types": "^2.0.0-alpha.15",
|
||||
|
||||
@@ -17,6 +17,9 @@ export {
|
||||
type eventWithTime,
|
||||
} from '@rrweb/types';
|
||||
|
||||
// exports style.css from replay
|
||||
import './replay/styles/style.css';
|
||||
|
||||
export type { recordOptions, ReplayPlugin } from './types';
|
||||
|
||||
const { addCustomEvent } = record;
|
||||
@@ -27,9 +30,9 @@ export {
|
||||
addCustomEvent,
|
||||
freezePage,
|
||||
Replayer,
|
||||
playerConfig,
|
||||
PlayerMachineState,
|
||||
SpeedMachineState,
|
||||
type playerConfig,
|
||||
type PlayerMachineState,
|
||||
type SpeedMachineState,
|
||||
canvasMutation,
|
||||
_mirror as mirror,
|
||||
utils,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
snapshot,
|
||||
MaskInputOptions,
|
||||
SlimDOMOptions,
|
||||
type MaskInputOptions,
|
||||
type SlimDOMOptions,
|
||||
createMirror,
|
||||
} from 'rrweb-snapshot';
|
||||
import { initObservers, mutationBuffers } from './observer';
|
||||
@@ -19,14 +19,14 @@ import {
|
||||
import type { recordOptions } from '../types';
|
||||
import {
|
||||
EventType,
|
||||
eventWithoutTime,
|
||||
eventWithTime,
|
||||
type eventWithoutTime,
|
||||
type eventWithTime,
|
||||
IncrementalSource,
|
||||
listenerHandler,
|
||||
mutationCallbackParam,
|
||||
scrollCallback,
|
||||
canvasMutationParam,
|
||||
adoptedStyleSheetParam,
|
||||
type listenerHandler,
|
||||
type mutationCallbackParam,
|
||||
type scrollCallback,
|
||||
type canvasMutationParam,
|
||||
type adoptedStyleSheetParam,
|
||||
} from '@rrweb/types';
|
||||
import type { CrossOriginIframeMessageEventContent } from '../types';
|
||||
import { IframeManager } from './iframe-manager';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {
|
||||
MaskInputOptions,
|
||||
type MaskInputOptions,
|
||||
maskInputValue,
|
||||
Mirror,
|
||||
getInputType,
|
||||
@@ -21,12 +21,16 @@ import {
|
||||
} from '../utils';
|
||||
import type { observerParam, MutationBufferParam } from '../types';
|
||||
import {
|
||||
IncrementalSource,
|
||||
MouseInteractions,
|
||||
PointerTypes,
|
||||
MediaInteractions,
|
||||
} from '@rrweb/types';
|
||||
import type {
|
||||
mutationCallBack,
|
||||
mousemoveCallBack,
|
||||
mousePosition,
|
||||
mouseInteractionCallBack,
|
||||
MouseInteractions,
|
||||
PointerTypes,
|
||||
listenerHandler,
|
||||
scrollCallback,
|
||||
styleSheetRuleCallback,
|
||||
@@ -34,11 +38,9 @@ import {
|
||||
inputValue,
|
||||
inputCallback,
|
||||
hookResetter,
|
||||
IncrementalSource,
|
||||
hooksParam,
|
||||
Arguments,
|
||||
mediaInteractionCallback,
|
||||
MediaInteractions,
|
||||
canvasMutationCallback,
|
||||
fontCallback,
|
||||
fontParam,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import {
|
||||
blockClass,
|
||||
type blockClass,
|
||||
CanvasContext,
|
||||
canvasManagerMutationCallback,
|
||||
IWindow,
|
||||
listenerHandler,
|
||||
type canvasManagerMutationCallback,
|
||||
type IWindow,
|
||||
type listenerHandler,
|
||||
} from '@rrweb/types';
|
||||
import { hookSetter, isBlocked, patch } from '../../../utils';
|
||||
import { serializeArgs } from './serialize-args';
|
||||
|
||||
@@ -262,7 +262,6 @@ export class CanvasManager {
|
||||
win,
|
||||
blockClass,
|
||||
blockSelector,
|
||||
this.mirror,
|
||||
);
|
||||
|
||||
this.resetObservers = () => {
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import type { Mirror } from 'rrweb-snapshot';
|
||||
import {
|
||||
blockClass,
|
||||
type blockClass,
|
||||
CanvasContext,
|
||||
canvasManagerMutationCallback,
|
||||
canvasMutationWithType,
|
||||
IWindow,
|
||||
listenerHandler,
|
||||
type canvasManagerMutationCallback,
|
||||
type canvasMutationWithType,
|
||||
type IWindow,
|
||||
type listenerHandler,
|
||||
} from '@rrweb/types';
|
||||
import { hookSetter, isBlocked, patch } from '../../../utils';
|
||||
import { saveWebGLVar, serializeArgs } from './serialize-args';
|
||||
@@ -16,7 +15,6 @@ function patchGLPrototype(
|
||||
cb: canvasManagerMutationCallback,
|
||||
blockClass: blockClass,
|
||||
blockSelector: string | null,
|
||||
_mirror: Mirror,
|
||||
win: IWindow,
|
||||
): listenerHandler[] {
|
||||
const handlers: listenerHandler[] = [];
|
||||
@@ -93,7 +91,6 @@ export default function initCanvasWebGLMutationObserver(
|
||||
win: IWindow,
|
||||
blockClass: blockClass,
|
||||
blockSelector: string | null,
|
||||
mirror: Mirror,
|
||||
): listenerHandler {
|
||||
const handlers: listenerHandler[] = [];
|
||||
|
||||
@@ -104,7 +101,6 @@ export default function initCanvasWebGLMutationObserver(
|
||||
cb,
|
||||
blockClass,
|
||||
blockSelector,
|
||||
mirror,
|
||||
win,
|
||||
),
|
||||
);
|
||||
@@ -117,7 +113,6 @@ export default function initCanvasWebGLMutationObserver(
|
||||
cb,
|
||||
blockClass,
|
||||
blockSelector,
|
||||
mirror,
|
||||
win,
|
||||
),
|
||||
);
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import type { Replayer } from '..';
|
||||
import {
|
||||
CanvasContext,
|
||||
canvasMutationCommand,
|
||||
canvasMutationData,
|
||||
canvasMutationParam,
|
||||
type canvasMutationCommand,
|
||||
type canvasMutationData,
|
||||
type canvasMutationParam,
|
||||
} from '@rrweb/types';
|
||||
import webglMutation from './webgl';
|
||||
import canvas2DMutation from './2d';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Replayer } from '../';
|
||||
import { CanvasContext, canvasMutationCommand } from '@rrweb/types';
|
||||
import { CanvasContext, type canvasMutationCommand } from '@rrweb/types';
|
||||
import { deserializeArg, variableListFor } from './deserialize-args';
|
||||
|
||||
function getContext(
|
||||
|
||||
@@ -2,12 +2,12 @@ import {
|
||||
rebuild,
|
||||
buildNodeWithSN,
|
||||
NodeType,
|
||||
BuildCache,
|
||||
type BuildCache,
|
||||
createCache,
|
||||
Mirror,
|
||||
createMirror,
|
||||
attributes,
|
||||
serializedElementNodeWithId,
|
||||
type attributes,
|
||||
type serializedElementNodeWithId,
|
||||
toLowerCase,
|
||||
} from 'rrweb-snapshot';
|
||||
import {
|
||||
@@ -41,15 +41,17 @@ import type { playerConfig, missingNodeMap } from '../types';
|
||||
import {
|
||||
EventType,
|
||||
IncrementalSource,
|
||||
MouseInteractions,
|
||||
ReplayerEvents,
|
||||
} from '@rrweb/types';
|
||||
import type {
|
||||
fullSnapshotEvent,
|
||||
eventWithTime,
|
||||
MouseInteractions,
|
||||
playerMetaData,
|
||||
viewportResizeDimension,
|
||||
addedNodeMutation,
|
||||
incrementalSnapshotEvent,
|
||||
incrementalData,
|
||||
ReplayerEvents,
|
||||
Handler,
|
||||
Emitter,
|
||||
metaEvent,
|
||||
@@ -72,7 +74,7 @@ import {
|
||||
polyfill,
|
||||
queueToResolveTrees,
|
||||
iterateResolveTree,
|
||||
AppendedIframe,
|
||||
type AppendedIframe,
|
||||
getBaseDimension,
|
||||
hasShadowRoot,
|
||||
isSerializedIframe,
|
||||
@@ -2228,4 +2230,4 @@ export class Replayer {
|
||||
}
|
||||
}
|
||||
|
||||
export { PlayerMachineState, SpeedMachineState, playerConfig };
|
||||
export { type PlayerMachineState, type SpeedMachineState, type playerConfig };
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
import { createMachine, interpret, assign, StateMachine } from '@xstate/fsm';
|
||||
import {
|
||||
createMachine,
|
||||
interpret,
|
||||
assign,
|
||||
type StateMachine,
|
||||
} from '@xstate/fsm';
|
||||
import type { playerConfig } from '../types';
|
||||
import {
|
||||
eventWithTime,
|
||||
type eventWithTime,
|
||||
ReplayerEvents,
|
||||
EventType,
|
||||
Emitter,
|
||||
type Emitter,
|
||||
IncrementalSource,
|
||||
} from '@rrweb/types';
|
||||
import { Timer, addDelay } from './timer';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Emitter, MediaInteractions, ReplayerEvents } from '@rrweb/types';
|
||||
import { type Emitter, MediaInteractions, ReplayerEvents } from '@rrweb/types';
|
||||
import type { RRMediaElement } from 'rrdom';
|
||||
import type { createPlayerService, createSpeedService } from '../machine';
|
||||
import type { Mirror, mediaAttributes } from 'rrweb-snapshot';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import {
|
||||
actionWithDelay,
|
||||
eventWithTime,
|
||||
type actionWithDelay,
|
||||
type eventWithTime,
|
||||
EventType,
|
||||
IncrementalSource,
|
||||
} from '@rrweb/types';
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "vite build --watch",
|
||||
"build": "tsc -noEmit && vite build",
|
||||
"build": "yarn turbo run prepublish",
|
||||
"check-types": "tsc -noEmit",
|
||||
"prepublish": "npm run build",
|
||||
"prepublish": "tsc -noEmit && vite build",
|
||||
"lint": "yarn eslint src/**/*.ts"
|
||||
},
|
||||
"homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/@rrweb/types#readme",
|
||||
@@ -46,8 +46,8 @@
|
||||
"package.json"
|
||||
],
|
||||
"devDependencies": {
|
||||
"vite": "^5.2.8",
|
||||
"vite-plugin-dts": "^3.8.1"
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-dts": "^3.9.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"rrweb-snapshot": "^2.0.0-alpha.15"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
"@types/webextension-polyfill": "^0.9.1",
|
||||
"@vitejs/plugin-react": "^4.2.1",
|
||||
"type-fest": "^2.19.0",
|
||||
"vite": "^5.2.8",
|
||||
"vite": "^5.3.1",
|
||||
"vite-plugin-web-extension": "^4.1.3",
|
||||
"vite-plugin-zip-pack": "^1.2.2",
|
||||
"webextension-polyfill": "^0.10.0"
|
||||
|
||||
@@ -2,11 +2,11 @@ import Browser from 'webextension-polyfill';
|
||||
import type { eventWithTime } from '@rrweb/types';
|
||||
import Channel from '~/utils/channel';
|
||||
import {
|
||||
LocalData,
|
||||
type LocalData,
|
||||
LocalDataKey,
|
||||
RecorderStatus,
|
||||
Settings,
|
||||
SyncData,
|
||||
type Settings,
|
||||
type SyncData,
|
||||
SyncDataKey,
|
||||
} from '~/types';
|
||||
import { pauseRecording, resumeRecording } from '~/utils/recording';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button, ButtonProps } from '@chakra-ui/react';
|
||||
import { Button, type ButtonProps } from '@chakra-ui/react';
|
||||
|
||||
interface CircleButtonProps extends ButtonProps {
|
||||
diameter: number;
|
||||
|
||||
@@ -12,8 +12,8 @@ import {
|
||||
Drawer,
|
||||
DrawerContent,
|
||||
useDisclosure,
|
||||
BoxProps,
|
||||
FlexProps,
|
||||
type BoxProps,
|
||||
type FlexProps,
|
||||
Heading,
|
||||
Stack,
|
||||
Text,
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import Browser, { Storage } from 'webextension-polyfill';
|
||||
import Browser, { type Storage } from 'webextension-polyfill';
|
||||
import { nanoid } from 'nanoid';
|
||||
import type { eventWithTime } from '@rrweb/types';
|
||||
import {
|
||||
LocalData,
|
||||
type LocalData,
|
||||
LocalDataKey,
|
||||
RecorderStatus,
|
||||
ServiceName,
|
||||
Session,
|
||||
RecordStartedMessage,
|
||||
RecordStoppedMessage,
|
||||
type Session,
|
||||
type RecordStartedMessage,
|
||||
type RecordStoppedMessage,
|
||||
MessageName,
|
||||
EmitEventMessage,
|
||||
type EmitEventMessage,
|
||||
} from '~/types';
|
||||
import Channel from '~/utils/channel';
|
||||
import { isInCrossOriginIFrame } from '~/utils';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { record } from 'rrweb';
|
||||
import type { recordOptions } from 'rrweb';
|
||||
import type { eventWithTime } from '@rrweb/types';
|
||||
import { MessageName, RecordStartedMessage } from '~/types';
|
||||
import { MessageName, type RecordStartedMessage } from '~/types';
|
||||
import { isInCrossOriginIFrame } from '~/utils';
|
||||
|
||||
/**
|
||||
|
||||
@@ -23,13 +23,13 @@ import {
|
||||
useReactTable,
|
||||
flexRender,
|
||||
getCoreRowModel,
|
||||
SortingState,
|
||||
type SortingState,
|
||||
getSortedRowModel,
|
||||
PaginationState,
|
||||
type PaginationState,
|
||||
} from '@tanstack/react-table';
|
||||
import { VscTriangleDown, VscTriangleUp } from 'react-icons/vsc';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { Session, EventName } from '~/types';
|
||||
import { type Session, EventName } from '~/types';
|
||||
import Channel from '~/utils/channel';
|
||||
import { deleteSessions, getAllSessions } from '~/utils/storage';
|
||||
import {
|
||||
|
||||
@@ -10,16 +10,13 @@ import {
|
||||
} from '@chakra-ui/react';
|
||||
import { FiSettings, FiList, FiPause, FiPlay } from 'react-icons/fi';
|
||||
import Channel from '~/utils/channel';
|
||||
import {
|
||||
import type {
|
||||
LocalData,
|
||||
LocalDataKey,
|
||||
RecorderStatus,
|
||||
ServiceName,
|
||||
RecordStartedMessage,
|
||||
RecordStoppedMessage,
|
||||
Session,
|
||||
EventName,
|
||||
} from '~/types';
|
||||
import { LocalDataKey, RecorderStatus, ServiceName, EventName } from '~/types';
|
||||
import Browser from 'webextension-polyfill';
|
||||
import { CircleButton } from '~/components/CircleButton';
|
||||
import { Timer } from './Timer';
|
||||
@@ -39,9 +36,8 @@ export function App() {
|
||||
void Browser.storage.local.get(LocalDataKey.recorderStatus).then((data) => {
|
||||
const localData = data as LocalData;
|
||||
if (!localData || !localData[LocalDataKey.recorderStatus]) return;
|
||||
const { status, startTimestamp, pausedTimestamp } = localData[
|
||||
LocalDataKey.recorderStatus
|
||||
];
|
||||
const { status, startTimestamp, pausedTimestamp } =
|
||||
localData[LocalDataKey.recorderStatus];
|
||||
setStatus(status);
|
||||
if (startTimestamp && pausedTimestamp)
|
||||
setStartTime(Date.now() - pausedTimestamp + startTimestamp || 0);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import mitt from 'mitt';
|
||||
import Browser, { Runtime } from 'webextension-polyfill';
|
||||
import Browser, { type Runtime } from 'webextension-polyfill';
|
||||
|
||||
export type Message = EventType | ServiceType;
|
||||
export type EventType = {
|
||||
|
||||
@@ -2,11 +2,11 @@ import Browser from 'webextension-polyfill';
|
||||
import type { eventWithTime } from '@rrweb/types';
|
||||
|
||||
import {
|
||||
LocalData,
|
||||
type LocalData,
|
||||
LocalDataKey,
|
||||
RecorderStatus,
|
||||
RecordStartedMessage,
|
||||
RecordStoppedMessage,
|
||||
type RecordStartedMessage,
|
||||
type RecordStoppedMessage,
|
||||
ServiceName,
|
||||
} from '~/types';
|
||||
import type Channel from './channel';
|
||||
|
||||
Reference in New Issue
Block a user