new namespace @hfs
Massimo Melina committed
Mar 7, 2022 at 15:58 UTC
8d8b4deb4f6cca4fb1b5c46c347bc042e33e5451
10 files changed
+132
-135
admin/package.json
+1
-1
@@ -1,5 +1,5 @@
1
{
2
- "name": "admin",
2
+ "name": "@hfs/admin",
3
"private": true,
4
"proxy": "http://localhost:63636",
5
"scripts": {
admin/src/dialog.ts
+2
-3
@@ -9,9 +9,8 @@ import {
9
useRef
10
} from 'react'
11
import { Check, Error as ErrorIcon, Info, Warning } from '@mui/icons-material'
12
-import { newDialog, closeDialog, dialogsDefaults, DialogOptions, Dialogs } from 'shared/lib/dialogs'
13
-export { Dialogs }
14
-export * from 'shared/lib/dialogs'
12
+import { newDialog, closeDialog, dialogsDefaults, DialogOptions, Dialogs } from '@hfs/shared/lib/dialogs'
13
+export * from '@hfs/shared/lib/dialogs'
14
15
dialogsDefaults.Container = Container
16
function Container(d:DialogOptions) {
admin/src/misc.ts
+1
-1
@@ -5,7 +5,7 @@ import { Box, CircularProgress, IconButton, Link, Tooltip } from '@mui/material'
5
import { Link as RouterLink } from 'react-router-dom'
6
import { SxProps } from '@mui/system'
7
import { SvgIconComponent } from '@mui/icons-material'
8
-export * from 'shared'
8
+export * from '@hfs/shared'
9
10
export function spinner() {
11
return h(CircularProgress)
frontend/package.json
+1
-1
@@ -1,5 +1,5 @@
1
{
2
- "name": "frontend",
2
+ "name": "@hfs/frontend",
3
"private": true,
4
"proxy": "http://localhost",
5
"scripts": {
frontend/src/dialog.ts
+2
-2
@@ -2,8 +2,8 @@
2
3
import { createElement as h, ReactElement, useEffect, useRef } from 'react'
4
import './dialog.css'
5
-import { newDialog, closeDialog } from 'shared/lib/dialogs'
6
-export * from 'shared/lib/dialogs'
5
+import { newDialog, closeDialog } from '@hfs/shared/lib/dialogs'
6
+export * from '@hfs/shared/lib/dialogs'
7
8
interface PromptOptions { def?:string, type?:string }
9
export async function promptDialog(msg: string, { def, type }:PromptOptions={}) : Promise<string | null> {
frontend/src/misc.ts
+2
-2
@@ -4,8 +4,8 @@ import { createElement as h } from 'react'
4
import { Spinner } from './components'
5
import { newDialog } from './dialog'
6
import { Icon } from './icons'
7
-import { Dict } from 'shared'
8
-export * from 'shared'
7
+import { Dict } from '@hfs/shared'
8
+export * from '@hfs/shared'
9
10
export function hIcon(name: string, props?:any) {
11
return h(Icon, { name, ...props })
package-lock.json
+121
-117
@@ -22,6 +22,7 @@
22
}
23
},
24
"admin": {
25
+ "name": "@hfs/admin",
26
"dependencies": {
27
"@emotion/react": "^11.7.1",
28
"@emotion/styled": "^11.6.0",
@@ -50,6 +51,7 @@
51
}
52
},
53
"frontend": {
54
+ "name": "@hfs/frontend",
55
"dependencies": {
56
"js-sha512": "^0.8.0",
57
"lodash": "^4.17.21",
@@ -2498,6 +2500,22 @@
2500
"url": "https://github.com/sponsors/sindresorhus"
2501
}
2502
},
2503
+ "node_modules/@hfs/admin": {
2504
+ "resolved": "admin",
2505
+ "link": true
2506
+ },
2507
+ "node_modules/@hfs/frontend": {
2508
+ "resolved": "frontend",
2509
+ "link": true
2510
+ },
2511
+ "node_modules/@hfs/server": {
2512
+ "resolved": "server",
2513
+ "link": true
2514
+ },
2515
+ "node_modules/@hfs/shared": {
2516
+ "resolved": "shared",
2517
+ "link": true
2518
+ },
2519
"node_modules/@humanwhocodes/config-array": {
2520
"version": "0.9.5",
2521
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz",
@@ -5514,10 +5532,6 @@
5532
"node": ">=8.9"
5533
}
5534
},
5517
- "node_modules/admin": {
5518
- "resolved": "admin",
5519
- "link": true
5520
- },
5535
"node_modules/agent-base": {
5536
"version": "6.0.2",
5537
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
@@ -9835,10 +9849,6 @@
9849
"node": ">= 0.6"
9850
}
9851
},
9838
- "node_modules/frontend": {
9839
- "resolved": "frontend",
9840
- "link": true
9841
- },
9852
"node_modules/fs-extra": {
9853
"version": "4.0.3",
9854
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz",
@@ -17577,19 +17587,11 @@
17587
"node": ">= 0.8.0"
17588
}
17589
},
17580
- "node_modules/server": {
17581
- "resolved": "server",
17582
- "link": true
17583
- },
17590
"node_modules/setprototypeof": {
17591
"version": "1.2.0",
17592
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
17593
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
17594
},
17589
- "node_modules/shared": {
17590
- "resolved": "shared",
17591
- "link": true
17592
- },
17595
"node_modules/shebang-command": {
17596
"version": "2.0.0",
17597
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
@@ -20332,6 +20334,7 @@
20334
}
20335
},
20336
"server": {
20337
+ "name": "@hfs/server",
20338
"dependencies": {
20339
"@koa/router": "^10.1.1",
20340
"@node-rs/crc32": "^1.3.1",
@@ -20378,6 +20381,7 @@
20381
}
20382
},
20383
"shared": {
20384
+ "name": "@hfs/shared",
20385
"devDependencies": {
20386
"react": "*",
20387
"react-dom": "*",
@@ -22071,6 +22075,107 @@
22075
}
22076
}
22077
},
22078
+ "@hfs/admin": {
22079
+ "version": "file:admin",
22080
+ "requires": {
22081
+ "@emotion/react": "^11.7.1",
22082
+ "@emotion/styled": "^11.6.0",
22083
+ "@mui/icons-material": "^5.3.0",
22084
+ "@mui/lab": "^5.0.0-alpha.66",
22085
+ "@mui/material": "^5.3.0",
22086
+ "@mui/styles": "^5.3.0",
22087
+ "@mui/x-data-grid": "^5.3.0",
22088
+ "@testing-library/jest-dom": "^5.16.1",
22089
+ "@testing-library/react": "^12.1.2",
22090
+ "@testing-library/user-event": "^13.5.0",
22091
+ "@types/jest": "^27.4.0",
22092
+ "@types/node": "^16.11.21",
22093
+ "@types/react": "^17.0.38",
22094
+ "@types/react-dom": "^17.0.11",
22095
+ "js-sha512": "^0.8.0",
22096
+ "react": "^17.0.2",
22097
+ "react-dom": "^17.0.2",
22098
+ "react-router-dom": "^6.2.1",
22099
+ "react-scripts": "5.0.0",
22100
+ "tssrp6a": "^3.0.0",
22101
+ "valtio": "^1.2.9",
22102
+ "web-vitals": "^2.1.4"
22103
+ }
22104
+ },
22105
+ "@hfs/frontend": {
22106
+ "version": "file:frontend",
22107
+ "requires": {
22108
+ "@testing-library/jest-dom": "^5.16.1",
22109
+ "@testing-library/react": "^12.1.2",
22110
+ "@testing-library/user-event": "^13.5.0",
22111
+ "@types/jest": "^27.4.0",
22112
+ "@types/lodash": "^4.14.178",
22113
+ "@types/node": "^16.11.21",
22114
+ "@types/react": "^17.0.0",
22115
+ "@types/react-dom": "^17.0.0",
22116
+ "cross-env": "^7.0.3",
22117
+ "js-sha512": "^0.8.0",
22118
+ "lodash": "^4.17.21",
22119
+ "react": "^17.0.2",
22120
+ "react-dom": "^17.0.2",
22121
+ "react-router-dom": "^6.1.1",
22122
+ "react-scripts": "^5.0.0",
22123
+ "sass": "^1.45.0",
22124
+ "tssrp6a": "^3.0.0",
22125
+ "use-debounce": "^7.0.1",
22126
+ "valtio": "^1.2.7",
22127
+ "web-vitals": "^2.1.4"
22128
+ }
22129
+ },
22130
+ "@hfs/server": {
22131
+ "version": "file:server",
22132
+ "requires": {
22133
+ "@koa/router": "^10.1.1",
22134
+ "@node-rs/crc32": "^1.3.1",
22135
+ "@types/archiver": "^5.1.1",
22136
+ "@types/axios": "^0.14.0",
22137
+ "@types/koa": "^2.13.4",
22138
+ "@types/koa__router": "^8.0.11",
22139
+ "@types/koa-compress": "^4.0.3",
22140
+ "@types/koa-mount": "^4.0.1",
22141
+ "@types/koa-session": "^5.10.4",
22142
+ "@types/lodash": "^4.14.178",
22143
+ "@types/micromatch": "^4.0.2",
22144
+ "@types/mime-types": "^2.1.1",
22145
+ "@types/minimist": "^1.2.2",
22146
+ "@types/mocha": "^9.0.0",
22147
+ "@types/node": "^16.11.12",
22148
+ "axios": "^0.24.0",
22149
+ "buffer-crc32": "https://github.com/rejetto/buffer-crc32.git",
22150
+ "fast-glob": "^3.2.7",
22151
+ "find-process": "^1.4.7",
22152
+ "koa": "^2.13.4",
22153
+ "koa-better-http-proxy": "^0.2.9",
22154
+ "koa-compress": "^5.1.0",
22155
+ "koa-mount": "^4.0.0",
22156
+ "koa-session": "^6.2.0",
22157
+ "limiter": "^2.1.0",
22158
+ "lodash": "^4.17.21",
22159
+ "minimist": "^1.2.5",
22160
+ "mocha": "^9.1.3",
22161
+ "nm-prune": "^5.0.0",
22162
+ "nodemon": "^2.0.15",
22163
+ "open": "^8.4.0",
22164
+ "ts-node": "^10.4.0",
22165
+ "tssrp6a": "^3.0.0",
22166
+ "yaml": "^2.0.0-10"
22167
+ }
22168
+ },
22169
+ "@hfs/shared": {
22170
+ "version": "file:shared",
22171
+ "requires": {
22172
+ "react": "*",
22173
+ "react-dom": "*",
22174
+ "react-scripts": "*",
22175
+ "sass": "*",
22176
+ "typescript": "*"
22177
+ }
22178
+ },
22179
"@humanwhocodes/config-array": {
22180
"version": "0.9.5",
22181
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.5.tgz",
@@ -24273,33 +24378,6 @@
24378
"regex-parser": "^2.2.11"
24379
}
24380
},
24276
- "admin": {
24277
- "version": "file:admin",
24278
- "requires": {
24279
- "@emotion/react": "^11.7.1",
24280
- "@emotion/styled": "^11.6.0",
24281
- "@mui/icons-material": "^5.3.0",
24282
- "@mui/lab": "^5.0.0-alpha.66",
24283
- "@mui/material": "^5.3.0",
24284
- "@mui/styles": "^5.3.0",
24285
- "@mui/x-data-grid": "^5.3.0",
24286
- "@testing-library/jest-dom": "^5.16.1",
24287
- "@testing-library/react": "^12.1.2",
24288
- "@testing-library/user-event": "^13.5.0",
24289
- "@types/jest": "^27.4.0",
24290
- "@types/node": "^16.11.21",
24291
- "@types/react": "^17.0.38",
24292
- "@types/react-dom": "^17.0.11",
24293
- "js-sha512": "^0.8.0",
24294
- "react": "^17.0.2",
24295
- "react-dom": "^17.0.2",
24296
- "react-router-dom": "^6.2.1",
24297
- "react-scripts": "5.0.0",
24298
- "tssrp6a": "^3.0.0",
24299
- "valtio": "^1.2.9",
24300
- "web-vitals": "^2.1.4"
24301
- }
24302
- },
24381
"agent-base": {
24382
"version": "6.0.2",
24383
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
@@ -27558,31 +27636,6 @@
27636
"resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz",
27637
"integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac="
27638
},
27561
- "frontend": {
27562
- "version": "file:frontend",
27563
- "requires": {
27564
- "@testing-library/jest-dom": "^5.16.1",
27565
- "@testing-library/react": "^12.1.2",
27566
- "@testing-library/user-event": "^13.5.0",
27567
- "@types/jest": "^27.4.0",
27568
- "@types/lodash": "^4.14.178",
27569
- "@types/node": "^16.11.21",
27570
- "@types/react": "^17.0.0",
27571
- "@types/react-dom": "^17.0.0",
27572
- "cross-env": "^7.0.3",
27573
- "js-sha512": "^0.8.0",
27574
- "lodash": "^4.17.21",
27575
- "react": "^17.0.2",
27576
- "react-dom": "^17.0.2",
27577
- "react-router-dom": "^6.1.1",
27578
- "react-scripts": "^5.0.0",
27579
- "sass": "^1.45.0",
27580
- "tssrp6a": "^3.0.0",
27581
- "use-debounce": "^7.0.1",
27582
- "valtio": "^1.2.7",
27583
- "web-vitals": "^2.1.4"
27584
- }
27585
- },
27639
"fs-extra": {
27640
"version": "4.0.3",
27641
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz",
@@ -33374,60 +33427,11 @@
33427
"send": "0.17.2"
33428
}
33429
},
33377
- "server": {
33378
- "version": "file:server",
33379
- "requires": {
33380
- "@koa/router": "^10.1.1",
33381
- "@node-rs/crc32": "^1.3.1",
33382
- "@types/archiver": "^5.1.1",
33383
- "@types/axios": "^0.14.0",
33384
- "@types/koa": "^2.13.4",
33385
- "@types/koa__router": "^8.0.11",
33386
- "@types/koa-compress": "^4.0.3",
33387
- "@types/koa-mount": "^4.0.1",
33388
- "@types/koa-session": "^5.10.4",
33389
- "@types/lodash": "^4.14.178",
33390
- "@types/micromatch": "^4.0.2",
33391
- "@types/mime-types": "^2.1.1",
33392
- "@types/minimist": "^1.2.2",
33393
- "@types/mocha": "^9.0.0",
33394
- "@types/node": "^16.11.12",
33395
- "axios": "^0.24.0",
33396
- "buffer-crc32": "https://github.com/rejetto/buffer-crc32.git",
33397
- "fast-glob": "^3.2.7",
33398
- "find-process": "^1.4.7",
33399
- "koa": "^2.13.4",
33400
- "koa-better-http-proxy": "^0.2.9",
33401
- "koa-compress": "^5.1.0",
33402
- "koa-mount": "^4.0.0",
33403
- "koa-session": "^6.2.0",
33404
- "limiter": "^2.1.0",
33405
- "lodash": "^4.17.21",
33406
- "minimist": "^1.2.5",
33407
- "mocha": "^9.1.3",
33408
- "nm-prune": "^5.0.0",
33409
- "nodemon": "^2.0.15",
33410
- "open": "^8.4.0",
33411
- "ts-node": "^10.4.0",
33412
- "tssrp6a": "^3.0.0",
33413
- "yaml": "^2.0.0-10"
33414
- }
33415
- },
33430
"setprototypeof": {
33431
"version": "1.2.0",
33432
"resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
33433
"integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw=="
33434
},
33421
- "shared": {
33422
- "version": "file:shared",
33423
- "requires": {
33424
- "react": "*",
33425
- "react-dom": "*",
33426
- "react-scripts": "*",
33427
- "sass": "*",
33428
- "typescript": "*"
33429
- }
33430
- },
33435
"shebang-command": {
33436
"version": "2.0.0",
33437
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
server/package.json
+1
-1
@@ -1,5 +1,5 @@
1
{
2
- "name": "server",
2
+ "name": "@hfs/server",
3
"engines": {
4
"node": ">=16.13.0"
5
},
shared/package.json
+1
-1
@@ -1,5 +1,5 @@
1
{
2
- "name": "shared",
2
+ "name": "@hfs/shared",
3
"main": "./lib/index.js",
4
"types": "./lib/index.d.ts",
5
"scripts": {
todo.md
-6
@@ -1,9 +1,3 @@
1
-NO: provare ad usare il name invece del rename: è complesso invertire, e bisogna comunque impedire di usarlo con le mask. Non vale la pena
2
-OK verificare che walknode/file_list non produca entries con search
3
-OK migliorare codice
4
-aggiornare admin gui
5
-counters: non contare richieste fallite
6
-consider having mime as ext,ext instead of *.ext|*.ext
1
# To do
2
- admin/accounts: show icon for accounts with (possibly inherited) admin access
3
- expose admin at same port of frontend