-
Notifications
You must be signed in to change notification settings - Fork 159
/
package.json
452 lines (452 loc) · 18.7 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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
{
"name": "EDRLab.ThoriumReader",
"version": "3.1.0-alpha.1",
"description": "Desktop application to read ebooks",
"keywords": [
"readium",
"epub",
"audiobook"
],
"engines": {
"node": ">=20.0.0",
"npm": ">=10.0.0"
},
"type": "commonjs",
"main": "dist/main.js",
"scripts": {
"clean": "rimraf dist && rimraf release",
"test": "cross-env JEST_TESTS=1 jest --config=jest.config.js --verbose --runInBand --bail=1 --no-cache \"test\"",
"testFile": "cross-env JEST_TESTS=1 jest --config=jest.config.js --verbose --runInBand --bail=1 --no-cache ",
"_NOT_NEEDED_postinstall_ReactARIAComponents": "node ./scripts/adobe-spectrum-react-aria-components-patch.js",
"_NOT_NEEDED_postinstall": "npm run pinCompromisedColorPackage && npm run electron-build",
"_NOT_NEEDED_pinCompromisedColorPackage": "(npm ls colors || echo \"NPM LS?\") && rimraf node_modules/electron-rebuild/node_modules/colors && rimraf node_modules/dir-compare/node_modules/colors",
"_NOT_NEEDED_pinCompromisedColorPackage_": "find node_modules -maxdepth 100 -type d -name \"colors\" && npm ls colors",
"_NOT_NEEDED_electron-build_": "npm rebuild --runtime=electron --target=33.2.1 --disturl=https://electronjs.org/headers --build-from-source",
"_NOT_NEEDED_electron-build": "electron-rebuild --version=33.2.1 --disturl=https://electronjs.org/headers",
"_NOT_NEEDED_rmDupeReactReduxTypes": "rimraf \"./node_modules/@types/react-redux/node_modules/@types/react\"",
"build": "cross-env NODE_ENV=production webpack --config webpack.config.js && ncp src/package.json dist/package.json",
"build:prod": "npm run lint && npm run build",
"build:dev:main": "webpack --config webpack.config.main.js",
"build:dev:renderer:library": "webpack --config webpack.config.renderer-library.js",
"build:dev:renderer:reader": "webpack --config webpack.config.renderer-reader.js",
"build:dev:renderer:pdf": "webpack --config webpack.config.renderer-pdf.js",
"start": "npm run build:prod && cross-env DEBUG=r2:*,readium-desktop:* electron .",
"start:quick": "cross-env DEBUG=r2:*,readium-desktop:*,-readium-desktop:main#streamerNoHttp,-readium-desktop:main:saga:persist,-r2:navigator#electron/common/readium-css-inject electron .",
"lint:ts": "cross-env ESLINT_USE_FLAT_CONFIG=false eslint \"src/**/*.{ts,tsx}\"",
"lint:ts:fix": "cross-env ESLINT_USE_FLAT_CONFIG=false eslint --fix \"src/**/*.{ts,tsx}\"",
"lint:css": "stylelint \"src/renderer/assets/styles/**/*.scss\"",
"lint:css:fix": "stylelint --fix \"src/renderer/assets/styles/**/*.scss\"",
"lint": "npm run lint:ts && npm run lint:css",
"lint:fix": "npm run lint:ts:fix && npm run lint:css:fix",
"start:dev:renderer:library-reader-pdf": "npm run start:dev:renderer:pdf && concurrently --kill-others \"npm run start:dev:renderer:library\" \"npm run start:dev:renderer:reader\"",
"start:dev:renderer:library": "webpack-dev-server --config webpack.config.renderer-library.js",
"start:dev:renderer:reader": "webpack-dev-server --config webpack.config.renderer-reader.js",
"start:dev:renderer:pdf": "webpack --config webpack.config.renderer-pdf.js",
"start:dev:main:electron": "cross-env DEBUG=r2:*,readium-desktop:*,proxy-agent,-readium-desktop:main#streamerNoHttp,-readium-desktop:main:saga:persist,-r2:navigator#electron/common/readium-css-inject NODE_ENV=development electron .",
"start:dev:main": "npm run build:dev:main && npm run start:dev:main:electron",
"start:devex": "cross-env WEBPACK=bundle-external npm run start:dev",
"start:dev": "cross-env DEBUG_COLORS=true npm run start:dev:renderer:pdf && cross-env DEBUG_COLORS=true concurrently --kill-others \"npm run start:dev:renderer:library\" \"npm run start:dev:renderer:reader\" \"npm run start:dev:main\"",
"start:dev:quick": "cross-env SKIP_CHECK_TYPESCRIPT=1 npm run start:dev",
"vscode:launch:attach:electron": "electron --enable-logging --remote-debugging-port=9223 --inspect=25575 --nolazy .",
"vscode:launch:attach": "cross-env DEBUG=r2:*,readium-desktop:* NODE_ENV=development VSCODE_LAUNCH=true npm run build:dev:main && npm run start:dev:renderer:pdf && concurrently --kill-others \"npm run start:dev:renderer:library\" \"npm run start:dev:renderer:reader\" \"npm run vscode:launch:attach:electron\"",
"vscode:launch:hot": "cross-env DEBUG=r2:*,readium-desktop:* NODE_ENV=development VSCODE_LAUNCH=true npm run build:dev:main",
"prepackage:build": "npm run clean",
"package:build": "cross-env PACKAGING=1 npm run build:prod",
"_NOT_NEEDED_prepackage:pack-only": "npm run package:build",
"_NOT_NEEDED_package:pack-only": "cross-env CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --x64 --dir --publish never",
"_NOT_NEEDED_prepackage": "npm run package:build",
"_NOT_NEEDED_package": "cross-env CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --x64 --publish never",
"prepackage:win": "npm run package:build",
"package:win": "cross-env DEBUG=* CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --win --x64 --publish never",
"postpackage:win": "npx @electron/fuses read --app ./release/win-unpacked/thorium.exe || echo ok",
"prepackage:linux": "npm run package:build",
"package:linux": "cross-env DEBUG=* CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --linux --x64 --publish never",
"postpackage:linux": "(ls -alsR ./release/linux-arm64-unpacked/ || ls -alsR ./release/linux-unpacked/) && (npx @electron/fuses read --app ./release/linux-arm64-unpacked/thorium || npx @electron/fuses read --app ./release/linux-unpacked/thorium) || echo ok",
"prepackage:mac": "npm run package:build",
"package:mac": "cross-env DEBUG=* electron-builder --mac --x64 --publish never",
"postpackage:mac": "(npx @electron/fuses read --app ./release/mac/Thorium.app || npx @electron/fuses read --app ./release/mac-arm64/Thorium.app) || echo ok",
"package:mac:skip-notarize": "cross-env SKIP_NOTARIZE=1 npm run package:mac",
"_NOT_NEEDED_prepackage:all": "npm run package:build",
"_NOT_NEEDED_package:all": "cross-env CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder -mwl --x64 --publish never",
"cli:help": "electron . --help",
"cli": "cross-env DEBUG=r2:*,readium-desktop:* NODE_ENV=development electron .",
"i18n-sort": "node ./scripts/locales-sort.js",
"i18n-scan": "node ./scripts/translate-scan.js \"src/resources/locales/temp.json\" && sync-i18n --files 'src/resources/locales/*.json' --primary temp --languages en sl bg ca da de el es eu fi fr gl hr it ja ka ko lt nl pt-br pt-pt ru sv zh-cn zh-tw --space \" \" --finalnewline --newkeysempty && rimraf \"src/resources/locales/temp.json\"",
"i18n-check": "sync-i18n --files 'src/resources/locales/*.json' --primary en --languages sl bg ca da de el es eu fi fr gl hr it ja ka ko lt nl pt-br pt-pt ru sv zh-cn zh-tw --space \" \" --finalnewline --newkeysempty",
"i18n-typed": "node ./scripts/locale-wrap.js \"src/resources/locales/en.json\" \"en.json\" && typed_i18n -i \"en.json\" -o src/typings -l typescript && node ./scripts/translator-key-type.js \"src/typings/en.translation.d.ts\" \"src/typings/en.translation-keys.d.ts\" && rimraf \"en.json\"",
"style-typed": "tcm \"src/renderer/assets/styles\" && typed-scss-modules \"src/renderer/assets/styles\" --nameFormat none || echo \"!!failed!!\"",
"ts-unused-exports_": "tcm --namedExports \"src/renderer/assets/styles\" && ts-unused-exports ./tsconfig.json $(find ./src/renderer/assets/styles -name '*.d.ts') || npm run style-typed",
"ts-unused-exports": "ts-unused-exports ./tsconfig.json --ignoreFiles=\"test/.*\"",
"ts-prune": "ts-prune --project ./tsconfig.json --ignore \"(/main|/common|/test|/typings|/utils|preprocessor-directives)/.*\"",
"redux-devtools": "redux-devtools --hostname=localhost --port=7770",
"execFile": "cross-env DEBUG=r2:*,readium-desktop:* ts-node -r tsconfig-paths/register",
"bundle-stats": "npm run bundle-stats_renderer-library && npm run bundle-stats_renderer-reader && npm run bundle-stats_renderer-pdf && npm run bundle-stats_renderer-preload && npm run bundle-stats_main",
"bundle-stats_renderer-library": "webpack-bundle-analyzer dist/stats_renderer-library.json dist --report dist/stats_renderer-library.html --mode static --default-sizes stat --log-level debug",
"bundle-stats_renderer-reader": "webpack-bundle-analyzer dist/stats_renderer-reader.json dist --report dist/stats_renderer-reader.html --mode static --default-sizes stat --log-level debug",
"bundle-stats_renderer-pdf": "webpack-bundle-analyzer dist/stats_renderer-pdf.json dist --report dist/stats_renderer-pdf.html --mode static --default-sizes stat --log-level debug",
"bundle-stats_renderer-preload": "webpack-bundle-analyzer dist/stats_renderer-preload.json dist --report dist/stats_renderer-preload.html --mode static --default-sizes stat --log-level debug",
"bundle-stats_main": "webpack-bundle-analyzer dist/stats_main.json dist --report dist/stats_main.html --mode static --default-sizes stat --log-level debug"
},
"repository": {
"type": "git",
"url": "[email protected]:edrlab/readium-desktop.git"
},
"author": {
"name": "EDRLab",
"organization": "EDRLab",
"email": "[email protected]",
"url": "http://github.com/edrlab/"
},
"license": "BSD-3-Clause",
"licenses": [
{
"type": "BSD-3-Clause",
"url": "http://opensource.org/licenses/BSD-3-Clause"
}
],
"bugs": {
"url": "https://github.com/edrlab/readium-desktop/issues"
},
"homepage": "https://github.com/edrlab/readium-desktop",
"build": {
"productName": "Thorium",
"appId": "io.github.edrlab.thorium",
"protocols": [
{
"name": "Thorium Reader - publication link",
"schemes": [
"thorium"
],
"role": "Viewer"
},
{
"name": "Thorium Reader - catalog link",
"schemes": [
"opds"
],
"role": "Viewer"
}
],
"afterSign": "scripts/notarize.js",
"afterPack": "scripts/afterPack.js",
"dmg": {
"sign": true,
"contents": [
{
"x": 410,
"y": 150,
"type": "link",
"path": "/Applications"
},
{
"x": 130,
"y": 150,
"type": "file"
}
]
},
"files": [
"node_modules/",
"external-assets/",
"assets/",
"ReadiumCSS/",
"MathJax/",
"index_pdf.js",
"index_library.html",
"index_library.js",
"index_reader.html",
"index_reader.js",
"styles_library.css",
"styles_reader.css",
"preload.js",
"main.js",
"package.json",
"fonts"
],
"asarUnpack": [
"**/*.node",
"**/lcp.node"
],
"directories": {
"buildResources": "resources",
"output": "release",
"app": "dist"
},
"fileAssociations": [
{
"ext": "epub",
"role": "Viewer",
"mimeType": "application/epub+zip"
},
{
"ext": "epub3",
"role": "Viewer",
"mimeType": "application/epub+zip"
},
{
"ext": "daisy",
"role": "Viewer",
"mimeType": "application/daisy+zip"
},
{
"ext": "lcpl",
"role": "Viewer",
"mimeType": "application/vnd.readium.lcp.license.v1.0+json"
},
{
"ext": "audiobook",
"role": "Viewer",
"mimeType": "application/audiobook+zip"
},
{
"ext": "webpub",
"role": "Viewer",
"mimeType": "application/webpub+zip"
},
{
"ext": "lcpa",
"role": "Viewer",
"mimeType": "application/audiobook+lcp"
},
{
"ext": "lcpaudiobook",
"role": "Viewer",
"mimeType": "application/audiobook+lcp"
},
{
"ext": "lcpdf",
"role": "Viewer",
"mimeType": "application/pdf+lcp"
}
],
"win": {
"target": [
"appx",
"nsis"
],
"icon": "dist/assets/icons/icon.ico"
},
"nsis": {
"oneClick": false,
"perMachine": false,
"selectPerMachineByDefault": false,
"allowElevation": true,
"allowToChangeInstallationDirectory": false,
"removeDefaultUninstallWelcomePage": false,
"runAfterFinish": true
},
"linux": {
"target": [
"deb",
"AppImage"
],
"desktop": {
"MimeType": "application/epub+zip",
"Keywords": "Audiobook;Book;Ebook;EPUB;Reader;Readium;Viewer;"
},
"executableName": "thorium",
"category": "Office",
"icon": "resources/icons"
},
"mac": {
"category": "public.app-category.developer-tools",
"target": "dmg",
"type": "distribution",
"hardenedRuntime": true,
"gatekeeperAssess": false,
"entitlements": "./scripts/entitlements.mac.plist",
"entitlementsInherit": "./scripts/entitlements.mac.plist"
},
"appx": {
"displayName": "Thorium Reader",
"publisher": "CN=C91F86A8-45E6-48E0-8015-8A5BF2B38BD4"
}
},
"dependencies": {
"@radix-ui/react-alert-dialog": "^1.1.3",
"@radix-ui/react-dialog": "^1.1.3",
"@radix-ui/react-popover": "^1.1.3",
"@radix-ui/react-radio-group": "^1.2.2",
"@radix-ui/react-tabs": "^1.1.2",
"@radix-ui/react-tooltip": "^1.1.5",
"@radix-ui/react-visually-hidden": "^1.1.1",
"@react-hook/resize-observer": "^2.0.2",
"@redux-saga/core": "^1.3.0",
"@xmldom/xmldom": "^0.9.6",
"ajv": "^8.17.1",
"ajv-formats": "^3.0.1",
"classnames": "^2.5.1",
"commonmark": "^0.31.2",
"debounce": "^2.2.0",
"debug": "^4.4.0",
"divina-player-js": "git+https://github.com/readium/divina-player-js.git#4e1f859afb14b916923ec136af0284a72e22a990",
"dompurify": "^3.2.3",
"fetch-cookie": "^3.0.1",
"glob": "^11.0.0",
"history": "^5.3.0",
"i18next": "^24.1.0",
"inversify": "^6.2.0",
"inversify-inject-decorators": "^3.1.0",
"jsdom": "^25.0.1",
"lunr": "^2.3.9",
"lunr-languages": "^1.14.0",
"match-sorter": "^8.0.0",
"mathjax": "^3.2.2",
"mime-types": "^2.1.35",
"moment": "^2.30.1",
"nanoid": "^5.0.9",
"node-fetch": "^3.3.2",
"pdf.js": "github:edrlab/pdf.js#build",
"proxy-agent": "^6.5.0",
"r2-lcp-js": "^1.0.41",
"r2-navigator-js": "^1.16.5",
"r2-opds-js": "^1.0.44",
"r2-shared-js": "^1.0.77",
"r2-streamer-js": "^1.0.48",
"r2-utils-js": "^1.0.39",
"ramda": "^0.30.0react",
"react": "^18.3.1",
"react-aria-components": "^1.5.0",
"react-dom": "^18.3.1",
"react-dropzone": "^14.3.5",
"react-focus-lock": "^2.13.2",
"react-redux": "^9.2.0",
"react-router": "^6.28.0",
"react-router-dom": "^6.28.0",
"react-table": "^7.8.0",
"readium-speech": "github:readium/speech#build",
"redux": "^5.0.1",
"redux-first-history": "^5.2.0",
"redux-saga": "^1.3.0",
"reflect-metadata": "^0.2.2",
"regenerator-runtime": "^0.14.1",
"rfc6902": "^5.1.2",
"semver": "^7.6.3",
"slugify": "^1.6.6",
"ta-json-x": "^2.5.3",
"terser-loader": "^2.0.3",
"timeout-signal": "^2.0.0",
"tmp": "^0.2.3",
"tough-cookie": "^4.1.4",
"typed-redux-saga": "^1.5.0",
"urijs": "^1.19.11",
"use-sync-external-store": "^1.4.0",
"uuid": "^11.0.3",
"validator": "^13.12.0",
"xml-js": "^1.6.11",
"yargs": "^17.7.2",
"yauzl": "^3.2.0",
"yazl": "^3.3.1"
},
"devDependencies": {
"@axe-core/react": "^4.10.1",
"@babel/generator": "^7.26.3",
"@electron/fuses": "^1.8.0",
"@electron/notarize": "^2.5.0",
"@electron/rebuild": "^3.7.1",
"@kogai/typed_i18n": "^0.6.0",
"@octokit/rest": "^21.0.2",
"@react-types/shared": "^3.26.0",
"@redux-devtools/extension": "^3.3.0",
"@rollup/plugin-terser": "^0.4.4",
"@types/classnames": "^2.3.4",
"@types/commonmark": "^0.27.9",
"@types/dompurify": "^3.2.0",
"@types/glob": "^8.1.0",
"@types/jest": "^29.5.14",
"@types/jsdom": "^21.1.7",
"@types/lunr": "^2.3.7",
"@types/mime-types": "^2.1.4",
"@types/node": "^20.17.10",
"@types/ramda": "^0.30.2",
"@types/react": "^18.3.16",
"@types/react-dom": "^18.3.5",
"@types/react-router": "^5.1.20",
"@types/react-router-dom": "^5.3.3",
"@types/react-table": "^7.7.20",
"@types/remote-redux-devtools": "^0.5.8",
"@types/semver": "^7.5.8",
"@types/tmp": "^0.2.6",
"@types/urijs": "^1.19.25",
"@types/use-sync-external-store": "^0.0.6",
"@types/validator": "^13.12.2",
"@types/xmldom": "^0.1.34",
"@types/yargs": "^17.0.33",
"@types/yauzl": "^2.10.3",
"@types/yazl": "^2.4.5",
"@typescript-eslint/eslint-plugin": "^8.18.0",
"@typescript-eslint/parser": "^8.18.0",
"babel-loader": "^9.2.1",
"babel-plugin-macros": "^3.1.0",
"concurrently": "^9.1.0",
"copy-webpack-plugin": "^12.0.2",
"cross-env": "^7.0.3",
"css-hot-loader": "^1.4.4",
"css-loader": "^7.1.2",
"devtron": "^1.4.0",
"electron": "^33.2.1",
"electron-builder": "^25.1.8",
"electron-devtools-installer": "^3.2.0",
"eslint": "^8.57.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-local-rules": "^3.0.2",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.1.0",
"file-loader": "^6.2.0",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"git-rev-sync": "^3.0.2",
"html-loader": "^5.1.0",
"html-webpack-plugin": "^5.6.3",
"i18next-json-sync": "^3.1.2",
"jest": "^29.7.0",
"json-diff": "^1.0.6",
"markdown-loader": "^8.0.0",
"mini-css-extract-plugin": "^2.9.2",
"ncp": "^2.0.0",
"npm-scripts-lifecycle": "^1.0.0",
"prettier": "^3.4.2",
"react-svg-loader": "^3.0.3",
"remote-redux-devtools": "^0.5.16",
"rimraf": "^6.0.1",
"sass": "^1.83.0",
"sass-loader": "^16.0.4",
"style-loader": "^4.0.0",
"stylelint": "^16.11.0",
"stylelint-config-standard": "^36.0.1",
"stylelint-config-standard-scss": "^14.0.0",
"svg-sprite-loader": "^6.0.11",
"terser-webpack-plugin": "^5.3.10",
"ts-jest": "^29.2.5",
"ts-loader": "^9.5.1",
"ts-prune": "^0.10.3",
"ts-unused-exports": "^11.0.1",
"tsconfig-paths": "^4.2.0",
"typed-css-modules": "^0.9.1",
"typed-scss-modules": "^8.0.1",
"typescript": "^5.7.2",
"webpack": "^5.97.1",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.2.0",
"webpack-node-externals": "^3.0.0",
"worker-loader": "^3.0.8"
},
"overrides____UNEEDED": {
"@parcel/watcher": "~2.1.0 ___ https://github.com/parcel-bundler/watcher/issues/156#issuecomment-1961552001",
"@typescript-eslint/eslint-plugin": {
"eslint": "^9.0.0"
},
"@typescript-eslint/parser": {
"eslint": "^9.0.0"
},
"eslint-plugin-react": {
"eslint": "^9.0.0"
}
},
"overrides": {
"typed-scss-modules": {
"node-sass": "^9.0.0"
}
}
}