forked from edrlab/thorium-reader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.json
440 lines (440 loc) · 17.8 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
{
"name": "EDRLab.ThoriumReader",
"version": "3.1.0-alpha.1",
"description": "Desktop application to read ebooks",
"keywords": [
"readium",
"epub",
"audiobook"
],
"engines": {
"node": ">=18.0.0",
"npm": ">=9.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 ",
"postinstall": "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=30.1.2 --disturl=https://electronjs.org/headers --build-from-source",
"_NOT_NEEDED_electron-build": "electron-rebuild --version=30.1.2 --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",
"prepackage:linux": "npm run package:build",
"package:linux": "cross-env DEBUG=* CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --linux --x64 --publish never",
"prepackage:mac": "npm run package:build",
"package:mac": "cross-env DEBUG=* electron-builder --mac --publish never",
"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:* 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 && 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",
"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.1",
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-popover": "^1.1.1",
"@radix-ui/react-radio-group": "^1.2.0",
"@radix-ui/react-tabs": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.1",
"@react-hook/resize-observer": "^2.0.1",
"@xmldom/xmldom": "^0.8.10",
"classnames": "^2.5.1",
"commonmark": "^0.31.0",
"debounce": "^2.1.0",
"debug": "^4.3.5",
"divina-player-js": "git+https://github.com/readium/divina-player-js.git#4e1f859afb14b916923ec136af0284a72e22a990",
"dompurify": "^3.1.5",
"fetch-cookie": "^3.0.1",
"glob": "^10.4.2",
"history": "^5.3.0",
"i18next": "^23.11.5",
"inversify": "^6.0.2",
"inversify-inject-decorators": "^3.1.0",
"jsdom": "^24.1.0",
"lunr": "^2.3.9",
"lunr-languages": "^1.14.0",
"match-sorter": "^6.3.4",
"mathjax": "^3.2.2",
"mime-types": "^2.1.35",
"nanoid": "^5.0.7",
"node-fetch": "^3.3.2",
"proxy-agent": "^6.4.0",
"r2-lcp-js": "^1.0.40",
"r2-navigator-js": "^1.15.10",
"r2-opds-js": "^1.0.43",
"r2-shared-js": "^1.0.74",
"r2-streamer-js": "^1.0.47",
"r2-utils-js": "^1.0.38",
"ramda": "^0.30.0react",
"react": "^18.3.1",
"react-aria-components": "^1.2.1",
"react-dom": "^18.3.1",
"react-dropzone": "^14.2.3",
"react-focus-lock": "^2.12.1",
"react-redux": "^9.1.2",
"react-router": "^6.24.0",
"react-router-dom": "^6.24.0",
"react-table": "^7.8.0",
"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.1",
"semver": "^7.6.2",
"ta-json-x": "^2.5.3",
"terser-loader": "^2.0.3",
"timeout-signal": "^2.0.0",
"tmp": "^0.2.3",
"typed-redux-saga": "^1.5.0",
"use-sync-external-store": "^1.2.2",
"uuid": "^10.0.0",
"validator": "^13.12.0",
"xml-js": "^1.6.11",
"yargs": "^17.7.2",
"yauzl": "^3.1.3",
"yazl": "^2.5.1"
},
"devDependencies": {
"@axe-core/react": "^4.9.1",
"@babel/generator": "^7.24.7",
"@electron/notarize": "^2.3.2",
"@electron/rebuild": "^3.6.0",
"@kogai/typed_i18n": "^0.6.0",
"@octokit/rest": "^21.0.0",
"@redux-devtools/extension": "^3.3.0",
"@rollup/plugin-terser": "^0.4.4",
"@types/classnames": "^2.3.1",
"@types/commonmark": "^0.27.9",
"@types/dompurify": "^3.0.5",
"@types/glob": "^8.1.0",
"@types/jest": "^29.5.12",
"@types/jsdom": "^21.1.7",
"@types/lunr": "^2.3.7",
"@types/mime-types": "^2.1.4",
"@types/node": "^20.14.9",
"@types/ramda": "^0.30.0",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@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/uuid": "^10.0.0",
"@types/validator": "^13.12.0",
"@types/xmldom": "^0.1.34",
"@types/yargs": "^17.0.32",
"@types/yauzl": "^2.10.3",
"@types/yazl": "^2.4.5",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.14.1",
"@vanilla-extract/babel-plugin": "^1.2.0",
"@vanilla-extract/css": "^1.15.3",
"@vanilla-extract/webpack-plugin": "^2.3.10",
"babel-loader": "^9.1.3",
"babel-plugin-macros": "^3.1.0",
"concurrently": "^8.2.2",
"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": "^30.1.2",
"electron-builder": "^24.13.3",
"electron-devtools-installer": "^3.2.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-local-rules": "^3.0.2",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.3",
"eslint-plugin-react-hooks": "^4.6.2",
"file-loader": "^6.2.0",
"fork-ts-checker-webpack-plugin": "^9.0.2",
"git-rev-sync": "^3.0.2",
"html-loader": "^5.0.0",
"html-webpack-plugin": "^5.6.0",
"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.0",
"ncp": "^2.0.0",
"node-loader": "^2.0.0",
"prettier": "^3.3.2",
"react-svg-loader": "^3.0.3",
"remote-redux-devtools": "^0.5.16",
"rimraf": "^5.0.7",
"sass": "^1.77.6",
"sass-loader": "^14.2.1",
"style-loader": "^4.0.0",
"stylelint": "^16.6.1",
"stylelint-config-standard": "^36.0.1",
"stylelint-config-standard-scss": "^13.1.0",
"svg-sprite-loader": "^6.0.11",
"terser-webpack-plugin": "^5.3.10",
"ts-jest": "^29.1.5",
"ts-loader": "^9.5.1",
"ts-prune": "^0.10.3",
"ts-unused-exports": "^10.1.0",
"tsconfig-paths": "^4.2.0",
"typed-css-modules": "^0.9.1",
"typed-scss-modules": "^8.0.1",
"typescript": "^5.5.2",
"webpack": "^5.92.1",
"webpack-bundle-analyzer": "^4.10.2",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.4",
"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"
}
}
}