@stream44.studio/encapsulate 0.4.0-rc.12 → 0.4.0-rc.13

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.
@@ -1,25 +1,21 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "envelope": "ur:envelope/lrtpsotanshdhdcxcekbcemtvagtfgutvltlwerngomnltenfglgzscsbkeodwwneybzmsfliycemtlboyaylftpsohdgltansgylftanshfhdcxftlbrpgabykpfzcsghsoecgazcpljldpntfefssksoaxykkkleenkknlcszektpttansgrhdcxlastfxdsdpaxplrdzcvwbbfessaopdksaeethhmubtgdluwdhhhhhsdycmbgvwbzoycsfncsfgoytpsojyfljljpieinhsjtgwjoihjtgajtjyihiojpinjykktpsokshnjkjkisdpihieeyececehescxfpfpfpfpfxeoglknhsfxehjzhtfygaehglghfeecfpfpfpfpgagdjtgoknhkfxgokpkkgmflgmgleogsdniofdemksksghgaidhdethfjnjegtecfxfphfeeflkphdkkjzkogwfecxjyeeeedpjkiniojtinjtiodpjeihkkoycsfztpsohdjktngdgmgwhflfaxhdimyawzaxjtlddndnlecyqzvdclkskotksafsskdmlgwpbgdszmrerncmuofpaxmkkeahluwnmoidbsiypedmaozsneykjpplurloolghesjedwjtbzstimswwladghiartdetynehekohebdptswmuzedtrelkhywpjnmdihbgaxchwzfmqzlugwtlioftimhkssfristkahtniecyttsgnbmsdwsb",
4
- "mark": "241a7fe3",
5
- "$defs": {
6
- "envelope": {
7
- "$ref": "https://datatracker.ietf.org/doc/draft-mcnally-envelope/"
8
- },
9
- "mark": {
10
- "$ref": "https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2025-001-provenance-mark.md"
11
- }
12
- }
13
- }
1
+ $schema: "https://json-schema.org/draft/2020-12/schema"
2
+ $defs:
3
+ envelope:
4
+ $ref: "https://datatracker.ietf.org/doc/draft-mcnally-envelope/"
5
+ mark:
6
+ $ref: "https://github.com/BlockchainCommons/Research/blob/master/papers/bcr-2025-001-provenance-mark.md"
7
+ envelope: "ur:envelope/lptpsotanshdhdcxwtmtbzpmhhetwdehsknyvdrejphdntiavopycecmmuwzrlhecaiyprhhbylbytrnoyaylftpsohdgltansgylftanshfhdcxfyonwttkhdtokngtjpbdiacwmejnintiwdpeadflmhpsdespynkbbkmsnydajsqdtansgrhdcxgubabwwzdsclswurecrhfmltsnhkhkamleptdywyamtydasgkivsqznsrnfpbdadoycsfncsfgoycsfztpsohdjktngdgmgwhflfaxhdimeejoothkcfmepmptmnzczojyfluybtkeyawzdasojyhtskwecaiywfgarhkgotcmhkvldpzctkhlsthyntsaaddijtmejeleetwnwmjohftyjknsoyimuowfahgmsabzvohlzmidsaheghemwlpycszcsntasoaerpwewffmimhntydttnsgcyfrswzsfhimvdrhtlwftdhnrdfpbnvooytpsoksdtfljljpieinhsjtgwjoihjtgajtjyihiojpinjykkdmgmihjojljkinjyjljpkkgaieihjtjyiniyinihjptpsoksehieinieftjpihjojlftideeeteeiddyehiaiheneceeiydyeheyeyiehseheeiyhseeeeetiaeniyihiyidhsehiaiaecihemenoytpsoksctfljljpieinhsjtgwjoihjtgajtjyihiojpinjykkdmguiniojtinjtiogrihkktpsokshnjkjkisdpihieeyececehescxfpfpfpfpfxeoglknhsfxehjzhtfygaehglghfeecfpfpfpfpgagdjtgoknhkfxgokpkkgmflgmgleogsdniofdemksksghgaidhdethfjnjegtecfxfphfeeflkphdkkjzkogwfecxjyeeeedpjkiniojtinjtiodpjeihkkhdidcwkg"
8
+ mark: "025fc634"
14
9
  ---
15
- # Repository DID: did:repo:412cd408c657737343a6089ed6d5f0668a8bfb05
16
- # Current Mark: 241a7fe3 (🅑 DARK CITY LAMB VIAL)
17
- # Inception Mark: 09c16324 (🅑 AXIS SAFE IDEA DARK)
18
- # XID(1c7e1c96) [
10
+ # Repository DID: did:repo:b484b01ce654f0122da14fa448c6fefba1cc5e76
11
+ # Current Mark: 025fc634 (🅑 ALSO HOPE SKEW EDGE)
12
+ # Inception Mark: 0a8b5c7b (🅑 BACK LUAU HIGH KING)
13
+ # XID(f09615ad) [
19
14
  # 'key': Bytes(78) [
20
15
  # 'allow': 'All'
21
16
  # ]
22
- # "GordianOpenIntegrity": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPnUzYCUuyRGRN3L+gH7xxTIbX8VmkM5CAV4GuXylvOE t44-signing-key"
23
17
  # 'provenance': Bytes(115)
18
+ # "GordianOpenIntegrity.RepositoryIdentifier": "did:repo:b484b01ce654f0122da14fa448c6fefba1cc5e76"
19
+ # "GordianOpenIntegrity.SigningKey": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPnUzYCUuyRGRN3L+gH7xxTIbX8VmkM5CAV4GuXylvOE t44-signing-key"
24
20
  # ]
25
21
  # Trust established using https://github.com/Stream44/t44-BlockchainCommons.com
package/README.md CHANGED
@@ -4,9 +4,7 @@
4
4
 
5
5
  ⚠️ **Disclaimer:** Under active development. Code has not been audited, APIs and interfaces are subject to change.
6
6
 
7
- [![Tests](https://github.com/Stream44/encapsulate/actions/workflows/tests.yaml/badge.svg)](https://github.com/Stream44/encapsulate/actions/workflows/tests.yaml?query=branch%3Amain)
8
-
9
- encapsulate
7
+ encapsulate [![Tests](https://github.com/Stream44/encapsulate/actions/workflows/test.yaml/badge.svg)](https://github.com/Stream44/encapsulate/actions/workflows/test.yaml?query=branch%3Amain)
10
8
  ===
11
9
 
12
10
  An *experimental* implementation of the [PrivateData.Space](https://privatedata.space) model in TypeScript.
@@ -41,7 +39,7 @@ Provenance
41
39
 
42
40
  [![Gordian Open Integrity](https://github.com/Stream44/encapsulate/actions/workflows/gordian-open-integrity.yaml/badge.svg)](https://github.com/Stream44/encapsulate/actions/workflows/gordian-open-integrity.yaml?query=branch%3Amain) [![DCO Signatures](https://github.com/Stream44/encapsulate/actions/workflows/dco.yaml/badge.svg)](https://github.com/Stream44/encapsulate/actions/workflows/dco.yaml?query=branch%3Amain)
43
41
 
44
- Repository DID: `did:repo:412cd408c657737343a6089ed6d5f0668a8bfb05`
42
+ Repository DID: `did:repo:b484b01ce654f0122da14fa448c6fefba1cc5e76`
45
43
 
46
44
  <table>
47
45
  <tr>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream44.studio/encapsulate",
3
- "version": "0.4.0-rc.12",
3
+ "version": "0.4.0-rc.13",
4
4
  "license": "BSD-2-Clause-Patent",
5
5
  "repository": {
6
6
  "type": "git",
@@ -212,9 +212,42 @@ async function resolve(uri: string, fromPath: string, spineRoot?: string): Promi
212
212
 
213
213
  // Non-scoped bare specifier — try node_modules resolution from fromPath
214
214
  if (!uri.startsWith('.') && !uri.startsWith('/')) {
215
- // Walk up from fromPath looking for node_modules
215
+ // Parse package name and subpath (e.g., "t44/caps/WorkspaceCli" -> pkg="t44", subpath="caps/WorkspaceCli")
216
+ const slashIdx = uri.indexOf('/')
217
+ const pkg = slashIdx === -1 ? uri : uri.slice(0, slashIdx)
218
+ const subpath = slashIdx === -1 ? undefined : uri.slice(slashIdx + 1)
219
+
220
+ // Walk up from fromPath looking for self-package or node_modules
216
221
  let dir = dirname(fromPath)
217
222
  while (true) {
223
+ // Check if this directory's package.json matches the requested package (self-package resolution)
224
+ try {
225
+ const pjPath = join(dir, 'package.json')
226
+ const pj = JSON.parse(await readFile(pjPath, 'utf-8'))
227
+ if (pj.name === pkg) {
228
+ if (subpath) {
229
+ if (pj.exports) {
230
+ const exportKey = './' + subpath
231
+ const exportValue = pj.exports[exportKey]
232
+ if (typeof exportValue === 'string') {
233
+ return pathResolve(dir, exportValue)
234
+ }
235
+ }
236
+ const fsPath = join(dir, subpath + '.ts')
237
+ try { await stat(fsPath); return fsPath } catch { }
238
+ try { await stat(join(dir, subpath)); return join(dir, subpath) } catch { }
239
+ } else if (pj.exports?.['.']) {
240
+ const mainExport = pj.exports['.']
241
+ if (typeof mainExport === 'string') {
242
+ return pathResolve(dir, mainExport)
243
+ }
244
+ } else if (pj.main) {
245
+ return pathResolve(dir, pj.main)
246
+ }
247
+ }
248
+ } catch { }
249
+
250
+ // Check node_modules
218
251
  const candidate = join(dir, 'node_modules', uri)
219
252
  try {
220
253
  const s = await stat(candidate)