-
Notifications
You must be signed in to change notification settings - Fork 133
/
package.json
310 lines (310 loc) · 14.9 KB
/
package.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
{
"name": "rx-player",
"author": "Canal+",
"version": "4.2.0",
"description": "Canal+ HTML5 Video Player",
"main": "./dist/commonjs/index.js",
"module": "./dist/es2017/index.js",
"browser": "./dist/es2017/index.js",
"exports": {
".": {
"import": "./dist/es2017/index.js",
"require": "./dist/commonjs/index.js",
"default": "./dist/es2017/index.js"
},
"./experimental": {
"import": "./dist/es2017/experimental/index.js",
"require": "./dist/commonjs/experimental/index.js",
"default": "./dist/es2017/experimental/index.js"
},
"./experimental/config": {
"import": "./dist/es2017/config.js",
"require": "./dist/commonjs/config.js",
"default": "./dist/es2017/config.js"
},
"./experimental/features": {
"import": "./dist/es2017/experimental/features/index.js",
"require": "./dist/commonjs/experimental/features/index.js",
"default": "./dist/es2017/experimental/features/index.js"
},
"./experimental/features/embeds": {
"import": "./dist/es2017/__GENERATED_CODE/index.js",
"require": "./dist/commonjs/__GENERATED_CODE/index.js",
"default": "./dist/es2017/__GENERATED_CODE/index.js"
},
"./experimental/features/*": {
"import": "./dist/es2017/experimental/features/*.js",
"require": "./dist/commonjs/experimental/features/*.js",
"default": "./dist/es2017/experimental/features/*.js"
},
"./experimental/tools": {
"import": "./dist/es2017/experimental/tools/index.js",
"require": "./dist/commonjs/experimental/tools/index.js",
"default": "./dist/es2017/experimental/tools/index.js"
},
"./experimental/tools/*": {
"import": "./dist/es2017/experimental/tools/*/index.js",
"require": "./dist/commonjs/experimental/tools/*/index.js",
"default": "./dist/es2017/experimental/tools/*/index.js"
},
"./features": {
"import": "./dist/es2017/features/list/index.js",
"require": "./dist/commonjs/features/list/index.js",
"default": "./dist/es2017/features/list/index.js"
},
"./features/*": {
"import": "./dist/es2017/features/list/*.js",
"require": "./dist/commonjs/features/list/*.js",
"default": "./dist/es2017/features/list/*.js"
},
"./logger": {
"import": "./dist/es2017/log.js",
"require": "./dist/commonjs/log.js",
"default": "./dist/es2017/log.js"
},
"./minimal": {
"import": "./dist/es2017/minimal.js",
"require": "./dist/commonjs/minimal.js",
"default": "./dist/es2017/minimal.js"
},
"./tools": {
"import": "./dist/es2017/tools/index.js",
"require": "./dist/commonjs/tools/index.js",
"default": "./dist/es2017/tools/index.js"
},
"./tools/*": {
"import": "./dist/es2017/tools/*/index.js",
"require": "./dist/commonjs/tools/*/index.js",
"default": "./dist/es2017/tools/*/index.js"
},
"./types": {
"import": "./dist/es2017/public_types.js",
"require": "./dist/commonjs/public_types.js",
"default": "./dist/es2017/public_types.js"
},
"./package.json": "./package.json"
},
"typesVersions": {
"*": {
"experimental": [
"./dist/es2017/experimental/index.d.ts"
],
"experimental/features": [
"./dist/es2017/experimental/features/index.d.ts"
],
"experimental/features/embeds": [
"./dist/es2017/__GENERATED_CODE/index.d.ts"
],
"experimental/features/*": [
"./dist/es2017/experimental/features/*.d.ts"
],
"experimental/tools": [
"./dist/es2017/experimental/tools/index.d.ts"
],
"experimental/tools/*": [
"./dist/es2017/experimental/tools/*/index.d.ts"
],
"features": [
"./dist/es2017/features/list/index.d.ts"
],
"features/*": [
"./dist/es2017/features/list/*.d.ts"
],
"logger": [
"./dist/es2017/log.d.ts"
],
"minimal": [
"./dist/es2017/minimal.d.ts"
],
"tools": [
"./dist/es2017/tools/index.d.ts"
],
"tools/*": [
"./dist/es2017/tools/*/index.d.ts"
],
"types": [
"./dist/es2017/public_types.d.ts"
]
}
},
"keywords": [
"dash",
"eme",
"hss",
"html5",
"mediasource",
"mse",
"reactive",
"smooth",
"streaming",
"typescript",
"video"
],
"homepage": "https://github.com/canalplus/rx-player",
"bugs": "https://github.com/canalplus/rx-player/issues",
"license": "Apache-2.0",
"sideEffects": false,
"scripts": {
"build": "./scripts/generate_build.mjs",
"build:noCheck": "./scripts/generate_build.mjs --no-check",
"build:all": "npm run clean:build && npm run build:wasm:release && npm run bundle && npm run bundle:min && npm run build",
"build:dev": "./scripts/generate_build.mjs --dev-mode",
"build:dev:noCheck": "./scripts/generate_build.mjs --dev-mode --no-check",
"build:wasm:debug": "mkdir -p dist && cd ./src/parsers/manifest/dash/wasm-parser && cargo build --target wasm32-unknown-unknown && cp target/wasm32-unknown-unknown/debug/mpd_node_parser.wasm ../../../../../dist/mpd-parser.wasm",
"build:wasm:release": "./scripts/build_wasm_release.sh",
"bundle": "./scripts/run_bundler.mjs src/index.ts --production-mode --globals -o dist/rx-player.js",
"bundle:min": "./scripts/run_bundler.mjs src/index.ts --production-mode --globals -o dist/rx-player.min.js --minify",
"bundle:min:watch": "./scripts/run_bundler.mjs src/index.ts --production-mode --globals -o dist/rx-player.min.js --minify --watch",
"bundle:watch": "./scripts/run_bundler.mjs src/index.ts --production-mode --globals -o dist/rx-player.js --watch",
"certificate": "./scripts/generate_certificate",
"check": "npm run check:types && npm run lint && npm run check:types:unit_tests",
"check:all": "npm run check:types && npm run lint && npm run lint:demo && npm run lint:tests && npm run lint:scripts && npm run test:unit && npm run test:integration && npm run test:memory && node -r esm ./scripts/check_nodejs_import_compatibility.js",
"check:demo": "npm run check:demo:types && npm run lint:demo",
"check:demo:types": "tsc --noEmit --project demo/",
"clean:build": "scripts/utils/remove_dir.mjs dist",
"check:types": "tsc --noEmit --project .",
"check:types:unit_tests": "tsc --noEmit --project ./tsconfig.unit-tests.json",
"check:types:watch": "tsc --noEmit --watch --project .",
"clean:wasm": "scripts/utils/remove_dir.mjs dist/mpd-parser.wasm && scripts/utis/remove_dir.mjs ./src/parsers/manifest/dash/wasm-parser/target",
"demo": "node ./scripts/build_demo.mjs --production-mode",
"demo:min": "node ./scripts/build_demo.mjs --production-mode --minify",
"demo:watch": "node ./scripts/build_demo.mjs --watch --production-mode",
"doc": "readme.doc --clean --input doc/ --output doc/generated -p \"$(cat VERSION)\"",
"fmt:prettier": "prettier --write .",
"fmt:prettier:check": "prettier . --check",
"fmt:rust": "cd ./src/parsers/manifest/dash/wasm-parser && cargo fmt",
"fmt:rust:check": "cd ./src/parsers/manifest/dash/wasm-parser && cargo fmt --check",
"lint": "eslint src -c .eslintrc.js",
"lint:demo": "eslint -c demo/.eslintrc.js demo/scripts",
"lint:scripts": "eslint -c scripts/.eslintrc.js --ext .js --ext .mjs --ext .cjs scripts",
"lint:tests": "eslint tests/**/*.js --ignore-pattern '/tests/performance/bundle*'",
"list": "node scripts/list-npm-scripts.mjs",
"prepublishOnly": "npm run build:all",
"releases:changelog": "./scripts/update_changelog.mjs",
"releases:demo": "./scripts/update_gh-pages_demo",
"releases:dev": "./scripts/make-dev-releases",
"releases:doc": "./scripts/update_gh-pages_doc",
"releases:official": "./scripts/make-official-release.sh",
"start": "node ./scripts/start_demo_web_server.mjs",
"start:wasm": "node ./scripts/start_demo_web_server.mjs --include-wasm",
"test:integration": "npm run test:integration:chrome && npm run test:integration:firefox",
"test:integration:chrome": "cross-env BROWSER_CONFIG=chrome vitest run tests/integration/scenarios",
"test:integration:chrome:watch": "cross-env BROWSER_CONFIG=chrome vitest watch tests/integration/scenarios",
"test:integration:firefox": "cross-env BROWSER_CONFIG=firefox vitest run tests/integration/scenarios",
"test:integration:firefox:watch": "cross-env BROWSER_CONFIG=firefox vitest watch tests/integration/scenarios",
"test:memory": "cross-env BROWSER_CONFIG=chrome vitest run tests/memory",
"test:memory:chrome:watch": "cross-env BROWSER_CONFIG=chrome vitest watch tests/memory",
"test:unit": "vitest --config vitest.config.unit.mjs",
"test:unit:watch": "cross-env WATCH=true vitest --config vitest.config.unit.mjs",
"update-version": "npm run version --git-tag-version=false",
"version": "./scripts/update-version",
"wasm-strip": "node scripts/wasm-strip.mjs dist/mpd-parser.wasm"
},
"repository": {
"type": "git",
"url": "git://github.com/canalplus/rx-player.git"
},
"devDependencies": {
"@canalplus/readme.doc": "0.5.0",
"@types/react": "19.0.2",
"@types/react-dom": "19.0.2",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.1",
"@vitest/browser": "^2.1.8",
"core-js": "3.39.0",
"cross-env": "^7.0.3",
"esbuild": "0.24.0",
"eslint": "8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-ban": "2.0.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsdoc": "50.6.1",
"eslint-plugin-react": "7.37.2",
"esm": "3.2.25",
"github-buttons": "2.29.1",
"html-entities": "2.5.2",
"jsdom": "^25.0.1",
"prettier": "^3.4.2",
"react": "19.0.0",
"react-dom": "19.0.0",
"regenerator-runtime": "0.14.1",
"semver": "7.6.3",
"typescript": "5.7.2",
"vitest": "2.1.8",
"webdriverio": "9.4.5"
},
"scripts-list": {
"Build a demo page (e.g. to test a code change)": {
"start": "Build the demo with the non-minified RxPlayer and serve it on a local server. Re-build on file updates.",
"start:wasm": "Build the demo with the non-minified RxPlayer including the DASH WebAssembly MPD parser and serve it on a local server. Re-build on file updates.",
"demo": "Build the demo in demo/bundle.js",
"demo:min": "Build the demo and minify it in demo/bundle.js",
"demo:watch": "Build the demo in demo/bundle.js each times the files update.",
"check:demo": "Check the validity of the demo directory by running the type checker and linter on it",
"check:demo:types": "Check TypeScript types in demo files",
"lint:demo": "Run linter on demo files",
"certificate": "Generate a certificate to be able to use HTTPS locally for the demo pages (`npm run start` will then listen to HTTPS requests through a communicated port)",
"releases:demo": "Publish current demo as the GitHub's pages new demo page (\"stable\" branch only)"
},
"Type-check, format, or lint the current code": {
"check": "Check the validity of the src directory by running the type checker and linter on it",
"check:all": "Check the validity of the whole project by running linters, type checkers and every tests",
"check:types": "Check TypeScript typings in src",
"check:types:watch": "Check TypeScript typings in src each time files change",
"lint": "Lint rx-player source files",
"lint:demo": "Lint demo source files",
"lint:tests": "Lint integration tests source files",
"fmt:prettier": "Automatically format JavaScript, TypeScript, JSON, XML, HTML, YML and Markdown files",
"fmt:prettier:check": "Check that JavaScript, TypeScript, JSON, XML, HTML, YML and Markdown files are well-formatted",
"fmt:rust": "Automatically format Rust files",
"fmt:rust:check": "Check that Rust files are well-formatted"
},
"Run tests": {
"Integration tests (test the whole API, ensure the RxPlayer build is made BEFORE running them)": {
"test:integration": "Launch integration tests in multiple browser environments",
"test:integration:chrome": "Launch integration tests in a Chrome browser.",
"test:integration:chrome:watch": "Launch integration tests in Chrome each times the files update",
"test:integration:firefox": "Launch integration tests in a Firefox browser.",
"test:integration:firefox:watch": "Launch integration tests in Firefox each times the files update"
},
"Unit tests (test particular functions)": {
"test:unit": "Launch unit tests",
"test:unit:watch": "Launch unit tests and restart them each one of its file changes"
},
"Memory tests (test memory usage to avoid memory leaks)": {
"test:memory": "Launch memory tests",
"test:memory:chrome:watch": "Launch memory tests in Chrome each times the files update"
}
},
"Build the player or one of its sub-parts": {
"Regular builds (used by JS bundlers)": {
"build": "Build the rx-player code in release mode",
"build:dev": "Build the rx-player code in development mode (more runtime checks, non-minified worker)",
"build:noCheck": "Build the rx-player code in release mode without performing compile-time type checks",
"build:dev:noCheck": "Build the rx-player code in development mode (more runtime checks, non-minified worker) without performing compile-time type checks"
},
"Legacy bundle builds (single-file bundles exporting to window.RxPlayer)": {
"bundle": "Build the player in dist/rx-player.js",
"bundle:min": "Build the player and minify it in dist/rx-player.min.js",
"bundle:min:watch": "Build the player in dist/rx-player.js each times the files update",
"bundle:watch": "Build the player as a minified version in dist/rx-player.min.js each times the files update"
},
"WebAssembly MPD parser builds (needs Rust, Cargo and binaryen)": {
"build:wasm:debug": "Build the DASH MPD parser written in rust as WebAssembly into debug mode, and output the result as dist/mpd-parser.wasm",
"build:wasm:release": "Build the DASH MPD parser written in rust as WebAssembly into release mode, and output the result as dist/mpd-parser.wasm"
},
"Combinations of multiple builds": {
"build:all": "Perform all possible builds of the player (regular RxPlayer builds, legacy bundles and the WebAssembly DASH MPD parser release build)."
}
},
"Build the documentation pages": {
"doc": "Generate the HTML documentation in doc/generated/pages",
"releases:doc": "Publish current documentation as the GitHub's pages new documentation pages (\"stable\" branch only)"
},
"Make a release": {
"releases:dev": "Produce dev npm releases (which are tagged pre-releases on npm) from the current branch.",
"releases:official": "Produce a new official release of the RxPlayer from the current branch.",
"update-version": "Update the version of the RxPlayer. Will update the codebase and perform every builds."
}
}
}