@mosetta/build 0.0.32 → 0.0.33
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/CHANGELOG.md +12 -0
- package/package.json +6 -6
- package/src/build.mjs +10 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @mosetta/build
|
|
2
2
|
|
|
3
|
+
## 0.0.33
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- A service may be granted a site's own code: each call then comes with a key to the site's palette alone, taken back once it is answered (the site a call works for names it: `SITE_TOKEN.code`). A token may have a scope; one with a scope opens its palette's code at the API and nothing else. A service may also be granted the site's icon and the person's own repositories, and play one more part in a workbench — dictation. A host may name services every site of its takes; it connects them, and moves them to the newest version offered, as an editor opens the workbench.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @mosetta/server-action@0.0.33
|
|
10
|
+
- @mosetta/server@0.0.33
|
|
11
|
+
- @mosetta/router@0.0.33
|
|
12
|
+
- @mosetta/runtime@0.0.33
|
|
13
|
+
- @mosetta/tar@0.0.33
|
|
14
|
+
|
|
3
15
|
## 0.0.32
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mosetta/build",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.33",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The core of the tile forge: builds a tile palette — its tile side artifacts, their dependency closure, the tile host descriptor. Environment-agnostic — the file system and the bundling engine are supplied from outside.",
|
|
6
6
|
"type": "module",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"scheduler": "*",
|
|
29
29
|
"systemjs": "^6.15.1",
|
|
30
30
|
"yaml": "^2.9.0",
|
|
31
|
-
"@mosetta/router": "0.0.
|
|
32
|
-
"@mosetta/runtime": "0.0.
|
|
33
|
-
"@mosetta/server": "0.0.
|
|
34
|
-
"@mosetta/server-action": "0.0.
|
|
35
|
-
"@mosetta/tar": "0.0.
|
|
31
|
+
"@mosetta/router": "0.0.33",
|
|
32
|
+
"@mosetta/runtime": "0.0.33",
|
|
33
|
+
"@mosetta/server": "0.0.33",
|
|
34
|
+
"@mosetta/server-action": "0.0.33",
|
|
35
|
+
"@mosetta/tar": "0.0.33"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
|
38
38
|
"access": "public"
|
package/src/build.mjs
CHANGED
|
@@ -557,7 +557,7 @@ export function sourceLinkOf(repository) {
|
|
|
557
557
|
}
|
|
558
558
|
|
|
559
559
|
/** what a service may be granted on a site that takes it: palettes, a palette's tile, or the host's doors */
|
|
560
|
-
const SERVICE_GRANT_RE = /^(?:@(?:previews|media)|[a-z][a-z0-9-]{0,62}(?:\/[a-z][A-Za-z0-9]{0,63})?)$/;
|
|
560
|
+
const SERVICE_GRANT_RE = /^(?:@(?:previews|media|code|icon|repositories)|[a-z][a-z0-9-]{0,62}(?:\/[a-z][A-Za-z0-9]{0,63})?)$/;
|
|
561
561
|
/** a service's action named for a workbench: `<tile>.<action>` */
|
|
562
562
|
const SERVICE_ACTION_RE = /^[a-z][A-Za-z0-9]{0,63}\.[A-Za-z][A-Za-z0-9_]{0,63}$/;
|
|
563
563
|
|
|
@@ -570,14 +570,17 @@ export function serviceOf(raw) {
|
|
|
570
570
|
if (raw === undefined) return null;
|
|
571
571
|
const grant = raw?.grant ?? [];
|
|
572
572
|
if (!Array.isArray(grant) || grant.length > 32 || !grant.every((g) => typeof g === 'string' && SERVICE_GRANT_RE.test(g))) {
|
|
573
|
-
throw new Error('mosetta.json: service.grant is up to 32 palettes (`brand`), tiles (`brand/tile`) or host doors (`@previews`, `@media`) the service asks to call');
|
|
573
|
+
throw new Error('mosetta.json: service.grant is up to 32 palettes (`brand`), tiles (`brand/tile`) or host doors (`@previews`, `@media`, `@code`, `@icon`, `@repositories`) the service asks to call');
|
|
574
574
|
}
|
|
575
|
-
// the
|
|
576
|
-
const
|
|
577
|
-
|
|
578
|
-
|
|
575
|
+
// the parts it plays in a workbench that takes it — the assistant's turn, dictation — each `<tile>.<action>`
|
|
576
|
+
const workbench = {};
|
|
577
|
+
for (const role of ['assistant', 'transcribe']) {
|
|
578
|
+
const named = raw?.workbench?.[role];
|
|
579
|
+
if (named === undefined) continue;
|
|
580
|
+
if (typeof named !== 'string' || !SERVICE_ACTION_RE.test(named)) throw new Error(`mosetta.json: service.workbench.${role} names an action of the palette, \`<tile>.<action>\``);
|
|
581
|
+
workbench[role] = named;
|
|
579
582
|
}
|
|
580
|
-
return { grant: [...new Set(grant)], ...(
|
|
583
|
+
return { grant: [...new Set(grant)], ...(Object.keys(workbench).length ? { workbench } : {}) };
|
|
581
584
|
}
|
|
582
585
|
|
|
583
586
|
/**
|