@weaveprotocol/core 0.2.1 → 0.2.2
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/README.md +66 -45
- package/dist/doors/doors.d.ts +1 -1
- package/dist/elements/auth-styles.d.ts +1 -1
- package/dist/elements/auth-styles.d.ts.map +1 -1
- package/dist/elements/auth-styles.js +13 -0
- package/dist/elements/auth-styles.js.map +1 -1
- package/dist/elements/weave-auth.d.ts +2 -2
- package/dist/elements/weave-auth.d.ts.map +1 -1
- package/dist/elements/weave-auth.js +251 -119
- package/dist/elements/weave-auth.js.map +1 -1
- package/dist/identity/account-vault.d.ts +10 -3
- package/dist/identity/account-vault.d.ts.map +1 -1
- package/dist/identity/account-vault.js +10 -3
- package/dist/identity/account-vault.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/network/mailbox.d.ts +1 -1
- package/dist/network/mailbox.js +1 -1
- package/dist/node/host.d.ts +2 -2
- package/dist/node/host.d.ts.map +1 -1
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/node.js +1 -1
- package/dist/node/node.js.map +1 -1
- package/dist/node/types.d.ts +2 -2
- package/dist/session/auth.d.ts +39 -9
- package/dist/session/auth.d.ts.map +1 -1
- package/dist/session/auth.js +175 -69
- package/dist/session/auth.js.map +1 -1
- package/dist/session/connect.js +2 -2
- package/dist/session/credentials.d.ts +22 -6
- package/dist/session/credentials.d.ts.map +1 -1
- package/dist/session/credentials.js +35 -6
- package/dist/session/credentials.js.map +1 -1
- package/dist/session/hosting.d.ts +1 -1
- package/dist/session/index.d.ts +3 -3
- package/dist/session/index.d.ts.map +1 -1
- package/dist/session/index.js +2 -2
- package/dist/session/index.js.map +1 -1
- package/dist/space/notify.d.ts +1 -1
- package/dist/storage/blob/s3.js +1 -1
- package/package.json +52 -42
|
@@ -26,19 +26,35 @@
|
|
|
26
26
|
*/
|
|
27
27
|
export declare function offerToSave(id: string, password: string, name?: string): Promise<boolean>;
|
|
28
28
|
/**
|
|
29
|
-
* What a password manager should file the account password under.
|
|
29
|
+
* What a password manager should file the account's password under.
|
|
30
30
|
*
|
|
31
31
|
* The account's own name, so the vault entry says which account it opens —
|
|
32
32
|
* useful the moment there is more than one.
|
|
33
33
|
*/
|
|
34
34
|
export declare function accountCredentialName(name: string): string;
|
|
35
35
|
/**
|
|
36
|
-
* What a password manager
|
|
36
|
+
* What a password manager filed a device password under, before an account
|
|
37
|
+
* had one password rather than one per device. Kept different from what the
|
|
38
|
+
* recovery code was filed under, so a manager would not fill one for the other.
|
|
37
39
|
*
|
|
38
|
-
*
|
|
39
|
-
* different secrets on the same origin: one opens the account anywhere, the
|
|
40
|
-
* other only here. Filed under the same name, a manager would offer whichever
|
|
41
|
-
* it saw last and quietly fill the wrong one.
|
|
40
|
+
* @deprecated New passwords are filed under {@link accountCredentialName}.
|
|
42
41
|
*/
|
|
43
42
|
export declare function deviceCredentialName(name: string): string;
|
|
43
|
+
/**
|
|
44
|
+
* The recovery code as a file to keep.
|
|
45
|
+
*
|
|
46
|
+
* Plain text, so it opens anywhere and prints as it is. It names the account
|
|
47
|
+
* and its DID, so a drawer with two of these says which is which.
|
|
48
|
+
*
|
|
49
|
+
* @param account The code, and the account it opens
|
|
50
|
+
* @returns A file name and its contents
|
|
51
|
+
*/
|
|
52
|
+
export declare function recoveryKit({ code, name, did }: {
|
|
53
|
+
code: string;
|
|
54
|
+
name: string;
|
|
55
|
+
did: string;
|
|
56
|
+
}): {
|
|
57
|
+
filename: string;
|
|
58
|
+
text: string;
|
|
59
|
+
};
|
|
44
60
|
//# sourceMappingURL=credentials.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../src/session/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH;;;;;;;;;;;GAWG;AACH,wBAAsB,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAW/F;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED
|
|
1
|
+
{"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../../src/session/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH;;;;;;;;;;;GAWG;AACH,wBAAsB,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAW/F;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAoBhI"}
|
|
@@ -38,7 +38,7 @@ export async function offerToSave(id, password, name) {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
|
-
* What a password manager should file the account password under.
|
|
41
|
+
* What a password manager should file the account's password under.
|
|
42
42
|
*
|
|
43
43
|
* The account's own name, so the vault entry says which account it opens —
|
|
44
44
|
* useful the moment there is more than one.
|
|
@@ -47,14 +47,43 @@ export function accountCredentialName(name) {
|
|
|
47
47
|
return name;
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
-
* What a password manager
|
|
50
|
+
* What a password manager filed a device password under, before an account
|
|
51
|
+
* had one password rather than one per device. Kept different from what the
|
|
52
|
+
* recovery code was filed under, so a manager would not fill one for the other.
|
|
51
53
|
*
|
|
52
|
-
*
|
|
53
|
-
* different secrets on the same origin: one opens the account anywhere, the
|
|
54
|
-
* other only here. Filed under the same name, a manager would offer whichever
|
|
55
|
-
* it saw last and quietly fill the wrong one.
|
|
54
|
+
* @deprecated New passwords are filed under {@link accountCredentialName}.
|
|
56
55
|
*/
|
|
57
56
|
export function deviceCredentialName(name) {
|
|
58
57
|
return `${name} (this device)`;
|
|
59
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* The recovery code as a file to keep.
|
|
61
|
+
*
|
|
62
|
+
* Plain text, so it opens anywhere and prints as it is. It names the account
|
|
63
|
+
* and its DID, so a drawer with two of these says which is which.
|
|
64
|
+
*
|
|
65
|
+
* @param account The code, and the account it opens
|
|
66
|
+
* @returns A file name and its contents
|
|
67
|
+
*/
|
|
68
|
+
export function recoveryKit({ code, name, did }) {
|
|
69
|
+
const slug = name.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '') || 'account';
|
|
70
|
+
const text = [
|
|
71
|
+
'Weave recovery code',
|
|
72
|
+
'',
|
|
73
|
+
`Account: ${name}`,
|
|
74
|
+
...(did ? [`Account ID: ${did}`] : []),
|
|
75
|
+
`Recovery code: ${code}`,
|
|
76
|
+
'',
|
|
77
|
+
'This code is your Weave account. It restores the account on any device or',
|
|
78
|
+
'Weave home, even one that has never seen it. Nobody can reissue it, and',
|
|
79
|
+
'anyone who has it can open your account.',
|
|
80
|
+
'',
|
|
81
|
+
'Keep it somewhere safe: a secure note in your password manager, or printed',
|
|
82
|
+
'and put away. Not as a saved login, where a new password could replace it.',
|
|
83
|
+
'',
|
|
84
|
+
`Made ${new Date().toISOString().slice(0, 10)}.`,
|
|
85
|
+
'',
|
|
86
|
+
].join('\n');
|
|
87
|
+
return { filename: `weave-recovery-${slug}.txt`, text };
|
|
88
|
+
}
|
|
60
89
|
//# sourceMappingURL=credentials.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../src/session/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,EAAU,EAAE,QAAgB,EAAE,IAAa;IAC3E,MAAM,IAAI,GAAI,UAAqE,CAAC,kBAAkB,CAAC;IACvG,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IAExB,IAAI,CAAC;QACH,MAAM,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACpG,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,uDAAuD;QACvD,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAY;IAChD,OAAO,IAAI,CAAC;AACd,CAAC;AAED
|
|
1
|
+
{"version":3,"file":"credentials.js","sourceRoot":"","sources":["../../src/session/credentials.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAOH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,EAAU,EAAE,QAAgB,EAAE,IAAa;IAC3E,MAAM,IAAI,GAAI,UAAqE,CAAC,kBAAkB,CAAC;IACvG,IAAI,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IAExB,IAAI,CAAC;QACH,MAAM,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;QACpG,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,uDAAuD;QACvD,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,qBAAqB,CAAC,IAAY;IAChD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,IAAY;IAC/C,OAAO,GAAG,IAAI,gBAAgB,CAAC;AACjC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAA+C;IAC1F,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,SAAS,CAAC;IAC/F,MAAM,IAAI,GAAG;QACX,qBAAqB;QACrB,EAAE;QACF,kBAAkB,IAAI,EAAE;QACxB,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,kBAAkB,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACzC,kBAAkB,IAAI,EAAE;QACxB,EAAE;QACF,2EAA2E;QAC3E,yEAAyE;QACzE,0CAA0C;QAC1C,EAAE;QACF,4EAA4E;QAC5E,4EAA4E;QAC5E,EAAE;QACF,QAAQ,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG;QAChD,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACb,OAAO,EAAE,QAAQ,EAAE,kBAAkB,IAAI,MAAM,EAAE,IAAI,EAAE,CAAC;AAC1D,CAAC"}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* way a signed HTTP request is (AWS SigV4, RFC 9421), and a host refuses one
|
|
15
15
|
* more than five minutes off.
|
|
16
16
|
*
|
|
17
|
-
* What a device knows about paying is nothing (
|
|
17
|
+
* What a device knows about paying is nothing (spec/06-nodes-and-sessions.md, Hosts). A host describes
|
|
18
18
|
* itself at a well-known address (like a Nostr relay's NIP-11 document), signs
|
|
19
19
|
* every status it gives, and takes payments on its own page, which the device
|
|
20
20
|
* opens with a link signed by the subscription key — the way an S3 link is
|
package/dist/session/index.d.ts
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* API when used — so it lives on its own entry point, away from the
|
|
8
8
|
* isomorphic core.
|
|
9
9
|
*/
|
|
10
|
-
export { createWeaveAuth } from './auth.js';
|
|
11
|
-
export type { WeaveAuth, WeaveAuthConfig, AuthState, AuthStage, AuthError, AccountEntry, WeaveSession, MovedToPod, Connection, GrantChoice, } from './auth.js';
|
|
10
|
+
export { createWeaveAuth, MIN_PASSWORD_LENGTH } from './auth.js';
|
|
11
|
+
export type { WeaveAuth, WeaveAuthConfig, AuthState, AuthStage, AuthSetup, AuthError, AccountEntry, WeaveSession, MovedToPod, Connection, GrantChoice, } from './auth.js';
|
|
12
12
|
export { createWeaveConnection } from './connection.js';
|
|
13
13
|
export type { WeaveConnection, WeaveConnectionConfig, ConnectionState, ConnectionStatus } from './connection.js';
|
|
14
14
|
export { connectToHome, connectCarrier, homeAddress, receiveConnectRequest, startConnectedNode, grantSigner, grantStore, grantCapabilities, appKey, forgetAppKey, MAX_GRANT_DAYS, } from './connect.js';
|
|
@@ -21,5 +21,5 @@ export { offerToPhone, collectFromDesktop, readPairingTicket, clearPairingTicket
|
|
|
21
21
|
export type { PairingStage, PairingOffer } from './pairing.js';
|
|
22
22
|
export { offerAgentLink, acceptAgentLink, checkAgentGrant, newAgentCode, readAgentCode } from './agent-link.js';
|
|
23
23
|
export type { AgentLinkStage, AgentLinkOffer, AgentAsking } from './agent-link.js';
|
|
24
|
-
export { offerToSave, accountCredentialName, deviceCredentialName } from './credentials.js';
|
|
24
|
+
export { offerToSave, accountCredentialName, deviceCredentialName, recoveryKit } from './credentials.js';
|
|
25
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACjE,YAAY,EACV,SAAS,EACT,eAAe,EACf,SAAS,EACT,SAAS,EACT,SAAS,EACT,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,UAAU,EACV,WAAW,GACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,YAAY,EAAE,eAAe,EAAE,qBAAqB,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACjH,OAAO,EACL,aAAa,EACb,cAAc,EACd,WAAW,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,MAAM,EACN,YAAY,EACZ,cAAc,GACf,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC7H,OAAO,EACL,YAAY,EACZ,WAAW,EACX,OAAO,EACP,WAAW,EACX,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,SAAS,GACV,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AACzG,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC1F,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AACvG,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChH,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/session/index.js
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
* API when used — so it lives on its own entry point, away from the
|
|
8
8
|
* isomorphic core.
|
|
9
9
|
*/
|
|
10
|
-
export { createWeaveAuth } from './auth.js';
|
|
10
|
+
export { createWeaveAuth, MIN_PASSWORD_LENGTH } from './auth.js';
|
|
11
11
|
export { createWeaveConnection } from './connection.js';
|
|
12
12
|
export { connectToHome, connectCarrier, homeAddress, receiveConnectRequest, startConnectedNode, grantSigner, grantStore, grantCapabilities, appKey, forgetAppKey, MAX_GRANT_DAYS, } from './connect.js';
|
|
13
13
|
export { browserPlace, folderPlace, pickPod, rememberPod, recallPod, forgetPod, listAccounts, inspectPod, storesFor, } from './places.js';
|
|
14
14
|
export { createStaySignedIn, STAY_SIGNED_IN_CHOICES, DEFAULT_STAY_SIGNED_IN } from './stay-signed-in.js';
|
|
15
15
|
export { offerToPhone, collectFromDesktop, readPairingTicket, clearPairingTicket } from './pairing.js';
|
|
16
16
|
export { offerAgentLink, acceptAgentLink, checkAgentGrant, newAgentCode, readAgentCode } from './agent-link.js';
|
|
17
|
-
export { offerToSave, accountCredentialName, deviceCredentialName } from './credentials.js';
|
|
17
|
+
export { offerToSave, accountCredentialName, deviceCredentialName, recoveryKit } from './credentials.js';
|
|
18
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/session/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAcjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,OAAO,EACL,aAAa,EACb,cAAc,EACd,WAAW,EACX,qBAAqB,EACrB,kBAAkB,EAClB,WAAW,EACX,UAAU,EACV,iBAAiB,EACjB,MAAM,EACN,YAAY,EACZ,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,YAAY,EACZ,WAAW,EACX,OAAO,EACP,WAAW,EACX,SAAS,EACT,SAAS,EACT,YAAY,EACZ,UAAU,EACV,SAAS,GACV,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAEzG,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvG,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,eAAe,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhH,OAAO,EAAE,WAAW,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/space/notify.d.ts
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* author and tag, all on the outside of a record, and says so; the extension
|
|
16
16
|
* shows a notification. The label is the person's own words, shown as is.
|
|
17
17
|
*
|
|
18
|
-
* The same split as a query in a space held in part (
|
|
18
|
+
* The same split as a query in a space held in part (spec/05-sync-and-storage.md, What a node holds): the part a
|
|
19
19
|
* blind node can check runs there, the rest where the keys are.
|
|
20
20
|
*/
|
|
21
21
|
import type { Expression } from '../types.js';
|
package/dist/storage/blob/s3.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* MinIO, Wasabi, AWS itself.
|
|
5
5
|
*
|
|
6
6
|
* Requests are signed with `aws4fetch` rather than the AWS SDK or hand-written
|
|
7
|
-
* SigV4 (see
|
|
7
|
+
* SigV4 (see CLAUDE.md, Dependencies): tiny, no dependencies, `fetch` and
|
|
8
8
|
* `crypto.subtle` only, so it runs in browsers, Node and Bun alike.
|
|
9
9
|
*/
|
|
10
10
|
import { AwsClient } from 'aws4fetch';
|
package/package.json
CHANGED
|
@@ -1,97 +1,107 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weaveprotocol/core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Self-sovereign P2P protocol for the browser — identity, schemas, storage, networking, and gossip sync",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git+https://github.com/leifriksheim/weave.git"
|
|
8
|
+
"url": "git+https://github.com/leifriksheim/weave.git",
|
|
9
|
+
"directory": "packages/core"
|
|
9
10
|
},
|
|
10
11
|
"files": [
|
|
11
12
|
"dist",
|
|
12
13
|
"README.md"
|
|
13
14
|
],
|
|
14
|
-
"workspaces": [
|
|
15
|
-
"cli"
|
|
16
|
-
],
|
|
17
15
|
"main": "dist/index.js",
|
|
18
16
|
"types": "dist/index.d.ts",
|
|
19
17
|
"exports": {
|
|
20
18
|
".": {
|
|
21
|
-
"
|
|
22
|
-
"types": "./dist/index.d.ts"
|
|
19
|
+
"@weaveprotocol/source": "./src/index.ts",
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.js"
|
|
23
22
|
},
|
|
24
23
|
"./identity": {
|
|
25
|
-
"
|
|
26
|
-
"types": "./dist/identity/index.d.ts"
|
|
24
|
+
"@weaveprotocol/source": "./src/identity/index.ts",
|
|
25
|
+
"types": "./dist/identity/index.d.ts",
|
|
26
|
+
"import": "./dist/identity/index.js"
|
|
27
27
|
},
|
|
28
28
|
"./schema": {
|
|
29
|
-
"
|
|
30
|
-
"types": "./dist/schema/index.d.ts"
|
|
29
|
+
"@weaveprotocol/source": "./src/schema/index.ts",
|
|
30
|
+
"types": "./dist/schema/index.d.ts",
|
|
31
|
+
"import": "./dist/schema/index.js"
|
|
31
32
|
},
|
|
32
33
|
"./storage": {
|
|
33
|
-
"
|
|
34
|
-
"types": "./dist/storage/index.d.ts"
|
|
34
|
+
"@weaveprotocol/source": "./src/storage/index.ts",
|
|
35
|
+
"types": "./dist/storage/index.d.ts",
|
|
36
|
+
"import": "./dist/storage/index.js"
|
|
35
37
|
},
|
|
36
38
|
"./network": {
|
|
37
|
-
"
|
|
38
|
-
"types": "./dist/network/index.d.ts"
|
|
39
|
+
"@weaveprotocol/source": "./src/network/index.ts",
|
|
40
|
+
"types": "./dist/network/index.d.ts",
|
|
41
|
+
"import": "./dist/network/index.js"
|
|
39
42
|
},
|
|
40
43
|
"./sync": {
|
|
41
|
-
"
|
|
42
|
-
"types": "./dist/sync/index.d.ts"
|
|
44
|
+
"@weaveprotocol/source": "./src/sync/index.ts",
|
|
45
|
+
"types": "./dist/sync/index.d.ts",
|
|
46
|
+
"import": "./dist/sync/index.js"
|
|
43
47
|
},
|
|
44
48
|
"./validation": {
|
|
45
|
-
"
|
|
46
|
-
"types": "./dist/validation/index.d.ts"
|
|
49
|
+
"@weaveprotocol/source": "./src/validation/index.ts",
|
|
50
|
+
"types": "./dist/validation/index.d.ts",
|
|
51
|
+
"import": "./dist/validation/index.js"
|
|
47
52
|
},
|
|
48
53
|
"./privacy": {
|
|
49
|
-
"
|
|
50
|
-
"types": "./dist/privacy/index.d.ts"
|
|
54
|
+
"@weaveprotocol/source": "./src/privacy/index.ts",
|
|
55
|
+
"types": "./dist/privacy/index.d.ts",
|
|
56
|
+
"import": "./dist/privacy/index.js"
|
|
51
57
|
},
|
|
52
58
|
"./node": {
|
|
53
|
-
"
|
|
54
|
-
"types": "./dist/node/index.d.ts"
|
|
59
|
+
"@weaveprotocol/source": "./src/node/index.ts",
|
|
60
|
+
"types": "./dist/node/index.d.ts",
|
|
61
|
+
"import": "./dist/node/index.js"
|
|
55
62
|
},
|
|
56
63
|
"./schemas": {
|
|
57
|
-
"
|
|
58
|
-
"types": "./dist/schemas/index.d.ts"
|
|
64
|
+
"@weaveprotocol/source": "./src/schemas/index.ts",
|
|
65
|
+
"types": "./dist/schemas/index.d.ts",
|
|
66
|
+
"import": "./dist/schemas/index.js"
|
|
59
67
|
},
|
|
60
68
|
"./session": {
|
|
61
|
-
"
|
|
62
|
-
"types": "./dist/session/index.d.ts"
|
|
69
|
+
"@weaveprotocol/source": "./src/session/index.ts",
|
|
70
|
+
"types": "./dist/session/index.d.ts",
|
|
71
|
+
"import": "./dist/session/index.js"
|
|
63
72
|
},
|
|
64
73
|
"./elements": {
|
|
65
|
-
"
|
|
66
|
-
"types": "./dist/elements/index.d.ts"
|
|
74
|
+
"@weaveprotocol/source": "./src/elements/index.ts",
|
|
75
|
+
"types": "./dist/elements/index.d.ts",
|
|
76
|
+
"import": "./dist/elements/index.js"
|
|
67
77
|
},
|
|
68
78
|
"./react": {
|
|
69
|
-
"
|
|
70
|
-
"types": "./dist/react/index.d.ts"
|
|
79
|
+
"@weaveprotocol/source": "./src/react/index.ts",
|
|
80
|
+
"types": "./dist/react/index.d.ts",
|
|
81
|
+
"import": "./dist/react/index.js"
|
|
71
82
|
},
|
|
72
83
|
"./calls": {
|
|
73
|
-
"
|
|
74
|
-
"types": "./dist/calls/index.d.ts"
|
|
84
|
+
"@weaveprotocol/source": "./src/calls/index.ts",
|
|
85
|
+
"types": "./dist/calls/index.d.ts",
|
|
86
|
+
"import": "./dist/calls/index.js"
|
|
75
87
|
},
|
|
76
88
|
"./doors": {
|
|
77
|
-
"
|
|
78
|
-
"types": "./dist/doors/index.d.ts"
|
|
89
|
+
"@weaveprotocol/source": "./src/doors/index.ts",
|
|
90
|
+
"types": "./dist/doors/index.d.ts",
|
|
91
|
+
"import": "./dist/doors/index.js"
|
|
79
92
|
}
|
|
80
93
|
},
|
|
81
94
|
"scripts": {
|
|
82
|
-
"dev": "node scripts/dev.mjs",
|
|
83
|
-
"weave": "node --env-file=cli/.env.dev --import tsx cli/src/main.ts",
|
|
84
95
|
"build": "rm -rf dist && tsc",
|
|
85
96
|
"typecheck": "tsc --noEmit",
|
|
86
|
-
"test": "node --experimental-vm-modules --import tsx --test tests
|
|
87
|
-
"
|
|
88
|
-
"
|
|
89
|
-
"
|
|
97
|
+
"test": "node --experimental-vm-modules --import tsx --test tests/*.test.ts",
|
|
98
|
+
"prepack": "cp ../../README.md README.md",
|
|
99
|
+
"postpack": "rm -f README.md",
|
|
100
|
+
"prepublishOnly": "npm run build"
|
|
90
101
|
},
|
|
91
102
|
"devDependencies": {
|
|
92
103
|
"@types/react": "^19.3.0",
|
|
93
104
|
"@types/ws": "^8.18.1",
|
|
94
|
-
"bumpp": "^12.3.0",
|
|
95
105
|
"tsx": "^4.19.0",
|
|
96
106
|
"typescript": "^5.6.0",
|
|
97
107
|
"ws": "^8.21.3",
|