@crombolo/schema 0.59.0 → 0.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/user-groups.ts +4 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crombolo/schema",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.61.0",
|
|
4
4
|
"description": "Internal to crombolo, with no compatibility promise: use @crombolo/crombolo. Schema-as-code for crombolo: TOML document, media and member type definitions.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Crombolo",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@crombolo/core": "0.
|
|
32
|
-
"@crombolo/data": "0.
|
|
31
|
+
"@crombolo/core": "0.61.0",
|
|
32
|
+
"@crombolo/data": "0.61.0"
|
|
33
33
|
}
|
|
34
34
|
}
|
package/src/user-groups.ts
CHANGED
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
ADMIN_GROUP_ALIAS,
|
|
10
10
|
isExtensionSectionAlias,
|
|
11
11
|
KNOWN_PERMISSIONS,
|
|
12
|
+
RETIRED_SECTIONS,
|
|
12
13
|
SECTION_ALIASES,
|
|
13
14
|
} from '@crombolo/core'
|
|
14
15
|
import { type ParseResult, Reader, toml } from './reader.ts'
|
|
@@ -25,8 +26,6 @@ export interface SchemaUserGroup {
|
|
|
25
26
|
languages: string[] | 'all'
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
/** The section Bundles had, now part of Settings. */
|
|
29
|
-
const RETIRED_SECTION = 'packages'
|
|
30
29
|
const KEYS = ['alias', 'name', 'description', 'icon', 'sections', 'permissions', 'languages']
|
|
31
30
|
|
|
32
31
|
export function parseUserGroup(file: string, source: string): ParseResult<SchemaUserGroup> {
|
|
@@ -47,9 +46,9 @@ export function parseUserGroup(file: string, source: string): ParseResult<Schema
|
|
|
47
46
|
`${path}.alias`,
|
|
48
47
|
'the administrators group is built in, and a file cannot redefine it',
|
|
49
48
|
)
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
const sections = r.strs(t, 'sections', path).filter((section) => section
|
|
49
|
+
// A section that no longer exists is read and dropped, so a file written before
|
|
50
|
+
// still loads.
|
|
51
|
+
const sections = r.strs(t, 'sections', path).filter((section) => !RETIRED_SECTIONS.has(section))
|
|
53
52
|
for (const section of sections)
|
|
54
53
|
if (!(section in SECTION_ALIASES) && !isExtensionSectionAlias(section))
|
|
55
54
|
r.problem(
|