nervur 0.6.0 → 0.7.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.
Files changed (2) hide show
  1. package/ground.mjs +20 -8
  2. package/package.json +1 -1
package/ground.mjs CHANGED
@@ -81,15 +81,27 @@ const Ground = (modules = {}) => {
81
81
  ),
82
82
  ]),
83
83
  );
84
+ const introduced = (unscoped, address) =>
85
+ Object.fromEntries(
86
+ Object.entries(unscoped).map(([name, one]) => [
87
+ name,
88
+ typeof one?.scope === 'function' ? one.scope(address) : one,
89
+ ]),
90
+ );
84
91
  const modulesFor = (voice) =>
85
- Object.freeze({
86
- ...extra,
87
- ...boundFor(voice),
88
- deliver: (envelope) => deliver(envelope),
89
- memory,
90
- paths,
91
- wire,
92
- });
92
+ Object.freeze(
93
+ introduced(
94
+ {
95
+ ...extra,
96
+ ...boundFor(voice),
97
+ deliver: (envelope) => deliver(envelope),
98
+ memory,
99
+ paths,
100
+ wire,
101
+ },
102
+ Tools.address(voice.pk),
103
+ ),
104
+ );
93
105
  const adminModules = modulesFor(adminVoice);
94
106
 
95
107
  const adminMine = Compartment({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nervur",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "A distributed system of sovereign beings — one door, one question: by whose authority.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Razvan Gherghina",