-
Notifications
You must be signed in to change notification settings - Fork 137
Expand file tree
/
Copy pathpackage.json
More file actions
320 lines (320 loc) · 15.5 KB
/
package.json
File metadata and controls
320 lines (320 loc) · 15.5 KB
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
311
312
313
314
315
316
317
318
319
320
{
"name": "rx-player",
"author": "Canal+",
"version": "4.4.1",
"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"
},
"./experimental/worker": {
"import": "./dist/es2017/importable_worker.js",
"require": "./dist/commonjs/importable_worker.js",
"default": "./dist/es2017/importable_worker.js"
},
"./experimental/worker/features": {
"import": "./dist/es2017/experimental/features/worker/index.js",
"require": "./dist/commonjs/experimental/features/worker/index.js",
"default": "./dist/es2017/experimental/features/worker/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"
],
"experimental/worker": [
"./dist/es2017/importable_worker.d.ts"
],
"experimental/worker/features": [
"./dist/es2017/experimental/features/worker/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": "node ./scripts/generate_build.mjs",
"build:all": "bash ./scripts/make_all_builds.sh",
"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": "bash ./scripts/build_wasm_release.sh",
"bundle": "node ./scripts/run_bundler.mjs src/index.ts --production-mode --globals --name \"RxPlayer default bundle\" -o dist/rx-player.js",
"bundle:min": "node ./scripts/run_bundler.mjs src/index.ts --production-mode --globals --name \"RxPlayer minified bundle\" -o dist/rx-player.min.js --minify",
"certificate": "bash ./scripts/generate_certificate.sh",
"check": "npm run types && npm run lint && npm run types:unit_tests",
"check:all": "npm run types:all && npm run lint:all",
"check:demo": "npm run types:demo && npm run lint:demo",
"clean": "node ./scripts/utils/remove_dir.mjs dist",
"demo": "node ./scripts/build_demo.mjs --production-mode",
"doc": "readme.doc --clean --input doc/ --output doc/generated -p \"$(cat VERSION)\"",
"fmt": "npm run fmt:prettier && npm run fmt:rust",
"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 -c eslint.config.mjs src",
"lint:all": "eslint -c eslint.config.mjs",
"lint:demo": "eslint -c eslint.config.mjs demo",
"lint:scripts": "eslint -c eslint.config.mjs scripts",
"lint:tests": "eslint -c eslint.config.mjs tests",
"list": "node scripts/list-npm-scripts.mjs",
"releases:changelog": "node ./scripts/update_changelog.mjs",
"releases:demo": "bash ./scripts/update_gh-pages_demo.sh",
"releases:dev": "bash ./scripts/make-dev-releases.sh",
"releases:doc": "bash ./scripts/update_gh-pages_doc.sh",
"releases:official": "bash ./scripts/make-official-release.sh",
"start": "node ./scripts/start_demo_web_server.mjs",
"test:integration": "npm run test:integration:chrome && npm run test:integration:firefox",
"test:integration:chrome": "npm run --silent test:integration:notice && cross-env BROWSER_CONFIG=chrome vitest run tests/integration/scenarios",
"test:integration:chrome:watch": "npm run --silent test:integration:notice && cross-env BROWSER_CONFIG=chrome vitest watch tests/integration/scenarios",
"test:integration:edge": "npm run --silent test:integration:notice && cross-env BROWSER_CONFIG=edge vitest run tests/integration/scenarios",
"test:integration:edge:watch": "npm run --silent test:integration:notice && cross-env BROWSER_CONFIG=edge vitest watch tests/integration/scenarios",
"test:integration:firefox": "npm run --silent test:integration:notice && cross-env BROWSER_CONFIG=firefox vitest run tests/integration/scenarios",
"test:integration:firefox:watch": "npm run --silent test:integration:notice && cross-env BROWSER_CONFIG=firefox vitest watch tests/integration/scenarios",
"test:integration:notice": "echo \"~~~ ⚠️ NOTICE ⚠️\n~~~ Tests have two dependencies: a local RxPlayer build and ffmpeg.\n~~~ Make sure you:\n~~~ 1. Have an ffmpeg executable in your path and,\n~~~ 2. You built an up-to-date RxPlayer through the \\`build\\` npm script.\n\"",
"test:memory": "npm run --silent test:integration:notice && cross-env BROWSER_CONFIG=chrome vitest run tests/memory",
"test:memory:chrome:watch": "npm run --silent test:integration:notice && cross-env BROWSER_CONFIG=chrome vitest watch tests/memory",
"test:performance": "node ./tests/performance/run.mjs",
"test:unit": "vitest --config vitest.config.unit.mjs",
"types": "tsc --noEmit --project .",
"types:all": "npm run types && npm run types:demo && npm run types:unit_tests && npm run types:scripts",
"types:demo": "tsc --noEmit --project demo/",
"types:scripts": "tsc --project ./scripts",
"types:unit_tests": "tsc --noEmit --project ./tsconfig.unit-tests.json",
"update-version": "bash ./scripts/update-version-number.sh"
},
"repository": {
"type": "git",
"url": "git://github.com/canalplus/rx-player.git"
},
"devDependencies": {
"@canalplus/readme.doc": "0.6.0",
"@eslint/js": "^9.33.0",
"@types/react": "19.1.10",
"@types/react-dom": "19.1.7",
"@typescript-eslint/eslint-plugin": "^8.40.0",
"@typescript-eslint/parser": "^8.40.0",
"@vitest/browser-webdriverio": "^4.0.18",
"core-js": "3.45.0",
"cross-env": "^10.0.0",
"esbuild": "0.25.9",
"eslint": "9.33.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-ban": "2.0.0",
"eslint-plugin-import": "2.32.0",
"eslint-plugin-jsdoc": "54.1.0",
"eslint-plugin-react": "7.37.5",
"github-buttons": "2.29.1",
"html-entities": "2.6.0",
"jsdom": "^26.1.0",
"prettier": "^3.6.2",
"react": "19.1.1",
"react-dom": "19.1.1",
"regenerator-runtime": "0.14.1",
"semver": "7.7.2",
"typescript": "5.9.2",
"typescript-eslint": "^8.40.0",
"vitest": "^4.0.18"
},
"scripts-list": {
" INFO ": "---- This field is read by the `list` npm script and allows to guide you through the RxPlayer's npm scripts ----",
"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.\nUse `--help` option (`-- --help` when using `npm run`) to list options.",
"demo": "Build the demo in demo/bundle.js.\nUse `--help` option (`-- --help` when using `npm run`) to list options.",
"check:demo": "Check the validity of the demo directory by running the type checker and linter on it",
"types:demo": "Check TypeScript types in demo files",
"types:scripts": "Check types in scripts/",
"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 and type checkers on all directories",
"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",
"types": "Check TypeScript typings in src",
"types:all": "Check TypeScript typings in all RxPlayer files: src and demo",
"types -- -w": "Check TypeScript typings in src and restart at each time file update",
"lint": "Lint RxPlayer files in src",
"lint:all": "Lint all RxPlayer files, including scripts, demo, integration tests etc."
},
"Run tests": {
"Integration tests (test the whole API, call the `build` script 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",
"test:integration:edge": "Launch integration tests in an Edge browser.",
"test:integration:edge:watch": "Launch integration tests in Edge 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, call the `build` script BEFORE running them)": {
"test:memory": "Launch memory tests",
"test:memory:chrome:watch": "Launch memory tests in Chrome each times the files update"
},
"Performance tests (test against performance regressions on some key scenarios)": {
"test:performance": "Launch performance tests on a Chrome browser",
"test:performance:firefox": "Launch performance tests on a Firefox browser"
}
},
"Build the player or one of its sub-parts": {
"Regular builds (used by JS bundlers)": {
"build": "Build the RxPlayer code in release mode. Use `--help` option (`-- --help` when using `npm run`) to list options.",
"build -- --dev-mode": "Build the RxPlayer code in development mode (more runtime checks, non-minified worker)"
},
"Legacy bundle builds (single-file bundles exporting to window.RxPlayer)": {
"bundle": "Build the player in dist/rx-player.js. Use `--help` option (`-- --help` when using `npm run`) to list options.",
"bundle:min": "Build the player and minify it in dist/rx-player.min.js."
},
"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": "Trigger our CI to produce dev npm releases (which are tagged pre-releases on npm) from the current branch.",
"releases:official": "Trigger our CI to produce a new official release of the RxPlayer from the current branch."
}
}
}