@medicine-wheel/community-identity 0.27.1 → 0.27.3
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 +3 -1
- package/dist/invitations.d.ts +11 -0
- package/dist/invitations.d.ts.map +1 -1
- package/dist/invitations.js +3 -0
- package/dist/invitations.js.map +1 -1
- package/dist/people.d.ts +37 -0
- package/dist/people.d.ts.map +1 -1
- package/dist/people.js +48 -0
- package/dist/people.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -24,7 +24,9 @@ personNode(NewPersonSchema.parse({ name: 'Mia', role: 'ceremony_facilitator', gi
|
|
|
24
24
|
await wheel.nodes.patch(id, { metadata: githubHandlePatch('miadisabelle', node.metadata) });
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
A person may record the accounts on a host that act for them in `local_accounts` (0.27.3, jgwill/medicine-wheel#172): a list of `{ host, user }`, a host name and a POSIX user name. `normalizeLocalAccount` returns the stored form or `null`, `sameLocalAccount` compares two, and `localAccountsPatch(list, metadata)` sets the whole list, or removes it with `null` or `[]`. Which person holds an account is the consumer's check, as it is for `email` and `github_handle`.
|
|
28
|
+
|
|
29
|
+
An invitation code opens one circle, `circle_id`, or several: `circle_ids` holds the circles after the first (0.17.5), and `invitationCircles(record)` lists them all in order. A code minted without `expires_at` lives `DEFAULT_INVITATION_TTL_HOURS` (96). `intended_email` records where it was sent. `publicInvitation()` is what a code holder may see before registering: no address, no acceptances. An invitation minted from an approved proposal also carries `intended_github_handle`, `intended_local_account` and `person_role` (0.27.3), for the consumer to give the newcomer at registration. None of the three is in the public view.
|
|
28
30
|
|
|
29
31
|
```ts
|
|
30
32
|
const invites = new JsonlInvitationStore('/srv/miadi/identity/invitations.jsonl');
|
package/dist/invitations.d.ts
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* `member_of` edge, which is the relational fact.
|
|
10
10
|
*/
|
|
11
11
|
import type { CircleRole } from './circles.js';
|
|
12
|
+
import type { Role } from './roles.js';
|
|
13
|
+
import type { LocalAccount } from './people.js';
|
|
12
14
|
export interface InvitationRecord {
|
|
13
15
|
code: string;
|
|
14
16
|
/** The first circle the code opens. */
|
|
@@ -21,6 +23,12 @@ export interface InvitationRecord {
|
|
|
21
23
|
intended_for?: string;
|
|
22
24
|
/** The address the code was sent to. Never part of the public view. */
|
|
23
25
|
intended_email?: string;
|
|
26
|
+
/** The GitHub handle the newcomer was proposed with (0.27.3). Never part of the public view. */
|
|
27
|
+
intended_github_handle?: string;
|
|
28
|
+
/** The local account that will act for the newcomer (0.27.3). Never part of the public view. */
|
|
29
|
+
intended_local_account?: LocalAccount;
|
|
30
|
+
/** The platform role the newcomer receives at registration, when it is not the community default (0.27.3). */
|
|
31
|
+
person_role?: Role;
|
|
24
32
|
created_at: string;
|
|
25
33
|
expires_at?: string;
|
|
26
34
|
max_uses: number;
|
|
@@ -35,6 +43,9 @@ export interface InvitationInput {
|
|
|
35
43
|
role?: CircleRole;
|
|
36
44
|
intended_for?: string;
|
|
37
45
|
intended_email?: string;
|
|
46
|
+
intended_github_handle?: string;
|
|
47
|
+
intended_local_account?: LocalAccount;
|
|
48
|
+
person_role?: Role;
|
|
38
49
|
/** ISO date. Without it the code lives DEFAULT_INVITATION_TTL_HOURS. */
|
|
39
50
|
expires_at?: string;
|
|
40
51
|
max_uses?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations.d.ts","sourceRoot":"","sources":["../src/invitations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"invitations.d.ts","sourceRoot":"","sources":["../src/invitations.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM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B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2EAA2E;IAC3E,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,SAAa,GAAG,gBAAgB,CAYhL;AAED,qBAAa,oBAAqB,YAAW,eAAe;IAC9C,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,MAAM;IAEzC,OAAO,CAAC,OAAO;IAQf,OAAO,CAAC,QAAQ;IAKV,MAAM,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAwBzD,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAInD,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAI7D,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;IAatC,MAAM,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAU7C"}
|
package/dist/invitations.js
CHANGED
|
@@ -82,6 +82,9 @@ class JsonlInvitationStore {
|
|
|
82
82
|
role: input.role ?? 'member',
|
|
83
83
|
...(input.intended_for ? { intended_for: input.intended_for } : {}),
|
|
84
84
|
...(input.intended_email ? { intended_email: input.intended_email.trim().toLowerCase() } : {}),
|
|
85
|
+
...(input.intended_github_handle ? { intended_github_handle: input.intended_github_handle } : {}),
|
|
86
|
+
...(input.intended_local_account ? { intended_local_account: input.intended_local_account } : {}),
|
|
87
|
+
...(input.person_role ? { person_role: input.person_role } : {}),
|
|
85
88
|
created_at: new Date(now).toISOString(),
|
|
86
89
|
expires_at: input.expires_at ?? new Date(now + exports.DEFAULT_INVITATION_TTL_HOURS * 3600_000).toISOString(),
|
|
87
90
|
max_uses: input.max_uses && input.max_uses > 0 ? input.max_uses : 1,
|
package/dist/invitations.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invitations.js","sourceRoot":"","sources":["../src/invitations.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;
|
|
1
|
+
{"version":3,"file":"invitations.js","sourceRoot":"","sources":["../src/invitations.ts"],"names":[],"mappings":";AAAA;;;;;;;;;GASG;;;AAgEH,gDAKC;AAGD,8CAEC;AAED,0CAKC;AAiBD,4CAYC;AA5GD,6CAA0C;AAC1C,qCAA6F;AAC7F,yCAAoC;AA8CpC,kEAAkE;AACrD,QAAA,4BAA4B,GAAG,EAAE,CAAC;AAW/C,MAAM,QAAQ,GAAG,iCAAiC,CAAC;AAEnD,SAAgB,kBAAkB,CAAC,MAAM,GAAG,CAAC;IAC3C,MAAM,KAAK,GAAG,IAAA,yBAAW,EAAC,MAAM,CAAC,CAAC;IAClC,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE;QAAE,GAAG,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC7E,OAAO,GAAG,CAAC;AACb,CAAC;AAED,wFAAwF;AACxF,SAAgB,iBAAiB,CAAC,MAA0D;IAC1F,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AACxE,CAAC;AAED,SAAgB,eAAe,CAAC,MAAwB,EAAE,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE;IACxE,IAAI,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G,MAAM,KAAK,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC;QACtC,IAAI,KAAK,KAAK,MAAM;YAAE,OAAO,EAAE,EAAE,EAAE,KAAc,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;QACnE,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,MAAM,EAAE,WAAW,EAAE,CAAC,GAAG,MAAM,CAAC,WAAW,EAAE,SAAS,CAAC,EAAE,CAAC;QAChF,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACvB,OAAO,EAAE,EAAE,EAAE,IAAa,EAAE,MAAM,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;IACvD,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAY;QACvB,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC/B,MAAM,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAC;QAC7E,IAAI,KAAK,GAAG,CAAC;YAAE,OAAO,KAAK,CAAC;QAC5B,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,UAAU,EAAE,CAAC;YAC/B,OAAO,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,KAAK,CAAC,EAAE,UAAU,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC;YAC7E,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAvED,oDAuEC"}
|
package/dist/people.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export interface Person {
|
|
|
35
35
|
email?: string;
|
|
36
36
|
/** The GitHub login this seat answers to, without the `@`. */
|
|
37
37
|
github_handle?: string;
|
|
38
|
+
/** The accounts on a host that act for this seat (0.27.3, #172). */
|
|
39
|
+
local_accounts?: LocalAccount[];
|
|
38
40
|
direction?: DirectionName;
|
|
39
41
|
created_at: string;
|
|
40
42
|
updated_at: string;
|
|
@@ -45,6 +47,19 @@ export declare const NewPersonSchema: z.ZodObject<{
|
|
|
45
47
|
role: z.ZodEffects<z.ZodString, "participant" | "emerging_guide" | "ceremony_facilitator" | "firekeeper" | "story_keeper" | "admin" | "companion_ai" | "integration_ai", string>;
|
|
46
48
|
email: z.ZodOptional<z.ZodString>;
|
|
47
49
|
github_handle: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
50
|
+
local_accounts: z.ZodOptional<z.ZodEffects<z.ZodArray<z.ZodObject<{
|
|
51
|
+
host: z.ZodString;
|
|
52
|
+
user: z.ZodString;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
host: string;
|
|
55
|
+
user: string;
|
|
56
|
+
}, {
|
|
57
|
+
host: string;
|
|
58
|
+
user: string;
|
|
59
|
+
}>, "many">, LocalAccount[], {
|
|
60
|
+
host: string;
|
|
61
|
+
user: string;
|
|
62
|
+
}[]>>;
|
|
48
63
|
direction: z.ZodOptional<z.ZodEnum<["east", "south", "west", "north"]>>;
|
|
49
64
|
api_access: z.ZodOptional<z.ZodBoolean>;
|
|
50
65
|
/** Software holds this seat: the node is created as an `agent`. */
|
|
@@ -57,6 +72,7 @@ export declare const NewPersonSchema: z.ZodObject<{
|
|
|
57
72
|
agent?: boolean | undefined;
|
|
58
73
|
email?: string | undefined;
|
|
59
74
|
github_handle?: string | undefined;
|
|
75
|
+
local_accounts?: LocalAccount[] | undefined;
|
|
60
76
|
api_access?: boolean | undefined;
|
|
61
77
|
}, {
|
|
62
78
|
name: string;
|
|
@@ -66,11 +82,27 @@ export declare const NewPersonSchema: z.ZodObject<{
|
|
|
66
82
|
agent?: boolean | undefined;
|
|
67
83
|
email?: string | undefined;
|
|
68
84
|
github_handle?: string | undefined;
|
|
85
|
+
local_accounts?: {
|
|
86
|
+
host: string;
|
|
87
|
+
user: string;
|
|
88
|
+
}[] | undefined;
|
|
69
89
|
api_access?: boolean | undefined;
|
|
70
90
|
}>;
|
|
71
91
|
export type NewPerson = z.infer<typeof NewPersonSchema>;
|
|
72
92
|
/** The handle as stored, without a leading `@`, or null when GitHub would not accept it as a login. */
|
|
73
93
|
export declare function normalizeGithubHandle(input: string): string | null;
|
|
94
|
+
/** An account on a host that acts for a person: the Unix user `user` on `host`. */
|
|
95
|
+
export interface LocalAccount {
|
|
96
|
+
host: string;
|
|
97
|
+
user: string;
|
|
98
|
+
}
|
|
99
|
+
/** The account in its stored form (lower-case host, trimmed user), or null when either part is not a name. */
|
|
100
|
+
export declare function normalizeLocalAccount(input: {
|
|
101
|
+
host?: unknown;
|
|
102
|
+
user?: unknown;
|
|
103
|
+
}): LocalAccount | null;
|
|
104
|
+
/** Same host and same user. */
|
|
105
|
+
export declare function sameLocalAccount(a: LocalAccount, b: LocalAccount): boolean;
|
|
74
106
|
export declare function personNodeId(being?: Being): string;
|
|
75
107
|
/** The node to create on the wheel for a new person. */
|
|
76
108
|
export declare function personNode(input: NewPerson, now?: string): RelationalNode;
|
|
@@ -84,6 +116,11 @@ export declare function deactivatePatch(current?: Record<string, unknown>): Reco
|
|
|
84
116
|
export declare function reactivatePatch(current?: Record<string, unknown>): Record<string, unknown>;
|
|
85
117
|
/** The metadata patch that grants or withdraws API access (the right to issue one's own tokens). */
|
|
86
118
|
export declare function apiAccessPatch(enabled: boolean, current?: Record<string, unknown>): Record<string, unknown>;
|
|
119
|
+
/** The metadata patch that sets a person's local accounts (the whole list), or removes them with null or an empty list. */
|
|
120
|
+
export declare function localAccountsPatch(accounts: Array<{
|
|
121
|
+
host: string;
|
|
122
|
+
user: string;
|
|
123
|
+
}> | null, current?: Record<string, unknown>): Record<string, unknown>;
|
|
87
124
|
/** The metadata patch that sets a person's GitHub handle, or removes it with null. The handle is normalised first. */
|
|
88
125
|
export declare function githubHandlePatch(handle: string | null, current?: Record<string, unknown>): Record<string, unknown>;
|
|
89
126
|
/**
|
package/dist/people.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"people.d.ts","sourceRoot":"","sources":["../src/people.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAU,KAAK,IAAI,EAAE,MAAM,YAAY,CAAC;AAE/C,eAAO,MAAM,WAAW,EAAG,QAAiB,CAAC;AAE7C,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEpD,qFAAqF;AACrF,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtC,mHAAmH;AACnH,eAAO,MAAM,QAAQ,EAAE,SAAS,IAAI,EAAuC,CAAC;AAE5E,MAAM,WAAW,MAAM;IACrB,gCAAgC;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,oDAAoD;IACpD,KAAK,EAAE,KAAK,CAAC;IACb,8FAA8F;IAC9F,MAAM,EAAE,YAAY,CAAC;IACrB,+GAA+G;IAC/G,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"people.d.ts","sourceRoot":"","sources":["../src/people.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,+BAA+B,C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AAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,IAAI,EAAE,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAOzJ;AAED,sHAAsH;AACtH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAMvH;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,cAAc,GAAG,IAAI,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,SAAS,CAMrG"}
|
package/dist/people.js
CHANGED
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
exports.NewPersonSchema = exports.AI_ROLES = exports.PERSON_KIND = void 0;
|
|
18
18
|
exports.normalizeGithubHandle = normalizeGithubHandle;
|
|
19
|
+
exports.normalizeLocalAccount = normalizeLocalAccount;
|
|
20
|
+
exports.sameLocalAccount = sameLocalAccount;
|
|
19
21
|
exports.personNodeId = personNodeId;
|
|
20
22
|
exports.personNode = personNode;
|
|
21
23
|
exports.personFromNode = personFromNode;
|
|
@@ -23,6 +25,7 @@ exports.roleGrant = roleGrant;
|
|
|
23
25
|
exports.deactivatePatch = deactivatePatch;
|
|
24
26
|
exports.reactivatePatch = reactivatePatch;
|
|
25
27
|
exports.apiAccessPatch = apiAccessPatch;
|
|
28
|
+
exports.localAccountsPatch = localAccountsPatch;
|
|
26
29
|
exports.githubHandlePatch = githubHandlePatch;
|
|
27
30
|
exports.speakerKindOf = speakerKindOf;
|
|
28
31
|
const zod_1 = require("zod");
|
|
@@ -44,6 +47,15 @@ exports.NewPersonSchema = zod_1.z.object({
|
|
|
44
47
|
return handle ?? '';
|
|
45
48
|
})
|
|
46
49
|
.optional(),
|
|
50
|
+
local_accounts: zod_1.z
|
|
51
|
+
.array(zod_1.z.object({ host: zod_1.z.string(), user: zod_1.z.string() }))
|
|
52
|
+
.transform((list, ctx) => {
|
|
53
|
+
const accounts = list.map(normalizeLocalAccount);
|
|
54
|
+
if (accounts.some((a) => a === null))
|
|
55
|
+
ctx.addIssue({ code: zod_1.z.ZodIssueCode.custom, message: 'not a local account (host name and POSIX user name)' });
|
|
56
|
+
return uniqueAccounts(accounts.filter((a) => a !== null));
|
|
57
|
+
})
|
|
58
|
+
.optional(),
|
|
47
59
|
direction: zod_1.z.enum(['east', 'south', 'west', 'north']).optional(),
|
|
48
60
|
api_access: zod_1.z.boolean().optional(),
|
|
49
61
|
/** Software holds this seat: the node is created as an `agent`. */
|
|
@@ -56,6 +68,23 @@ function normalizeGithubHandle(input) {
|
|
|
56
68
|
const handle = input.trim().replace(/^@/, '');
|
|
57
69
|
return GITHUB_HANDLE.test(handle) ? handle : null;
|
|
58
70
|
}
|
|
71
|
+
/** A POSIX user name as useradd takes it. */
|
|
72
|
+
const POSIX_USER = /^[a-z_][a-z0-9_-]{0,31}$/;
|
|
73
|
+
/** A host name: labels of letters, digits and inner hyphens, joined by dots. */
|
|
74
|
+
const HOST_NAME = /^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/;
|
|
75
|
+
/** The account in its stored form (lower-case host, trimmed user), or null when either part is not a name. */
|
|
76
|
+
function normalizeLocalAccount(input) {
|
|
77
|
+
const host = typeof input.host === 'string' ? input.host.trim().toLowerCase() : '';
|
|
78
|
+
const user = typeof input.user === 'string' ? input.user.trim() : '';
|
|
79
|
+
return HOST_NAME.test(host) && POSIX_USER.test(user) ? { host, user } : null;
|
|
80
|
+
}
|
|
81
|
+
/** Same host and same user. */
|
|
82
|
+
function sameLocalAccount(a, b) {
|
|
83
|
+
return a.host === b.host && a.user === b.user;
|
|
84
|
+
}
|
|
85
|
+
function uniqueAccounts(list) {
|
|
86
|
+
return list.filter((a, i) => list.findIndex((b) => sameLocalAccount(a, b)) === i);
|
|
87
|
+
}
|
|
59
88
|
function personNodeId(being = 'human') {
|
|
60
89
|
return `node:${being}:${Date.now()}:${Math.random().toString(36).slice(2, 8)}`;
|
|
61
90
|
}
|
|
@@ -72,6 +101,7 @@ function personNode(input, now = new Date().toISOString()) {
|
|
|
72
101
|
api_access: input.api_access === true,
|
|
73
102
|
...(input.email ? { email: input.email } : {}),
|
|
74
103
|
...(input.github_handle ? { github_handle: input.github_handle } : {}),
|
|
104
|
+
...(input.local_accounts?.length ? { local_accounts: input.local_accounts } : {}),
|
|
75
105
|
},
|
|
76
106
|
created_at: now,
|
|
77
107
|
updated_at: now,
|
|
@@ -93,6 +123,7 @@ function personFromNode(node) {
|
|
|
93
123
|
api_access: meta.api_access === true,
|
|
94
124
|
...(typeof meta.email === 'string' ? { email: meta.email } : {}),
|
|
95
125
|
...(typeof meta.github_handle === 'string' ? { github_handle: meta.github_handle } : {}),
|
|
126
|
+
...localAccountsOf(meta),
|
|
96
127
|
...(node.direction ? { direction: node.direction } : {}),
|
|
97
128
|
created_at: node.created_at,
|
|
98
129
|
updated_at: node.updated_at,
|
|
@@ -115,6 +146,23 @@ function reactivatePatch(current = {}) {
|
|
|
115
146
|
function apiAccessPatch(enabled, current = {}) {
|
|
116
147
|
return { ...current, api_access: enabled };
|
|
117
148
|
}
|
|
149
|
+
function localAccountsOf(meta) {
|
|
150
|
+
if (!Array.isArray(meta.local_accounts))
|
|
151
|
+
return {};
|
|
152
|
+
const accounts = uniqueAccounts(meta.local_accounts.map((a) => normalizeLocalAccount(a ?? {})).filter((a) => a !== null));
|
|
153
|
+
return accounts.length ? { local_accounts: accounts } : {};
|
|
154
|
+
}
|
|
155
|
+
/** The metadata patch that sets a person's local accounts (the whole list), or removes them with null or an empty list. */
|
|
156
|
+
function localAccountsPatch(accounts, current = {}) {
|
|
157
|
+
const { local_accounts: _gone, ...rest } = current;
|
|
158
|
+
if (accounts === null || accounts.length === 0)
|
|
159
|
+
return rest;
|
|
160
|
+
const normalized = accounts.map(normalizeLocalAccount);
|
|
161
|
+
const bad = accounts.find((_, i) => normalized[i] === null);
|
|
162
|
+
if (bad)
|
|
163
|
+
throw new Error(`not a local account: ${JSON.stringify(bad)}`);
|
|
164
|
+
return { ...rest, local_accounts: uniqueAccounts(normalized) };
|
|
165
|
+
}
|
|
118
166
|
/** The metadata patch that sets a person's GitHub handle, or removes it with null. The handle is normalised first. */
|
|
119
167
|
function githubHandlePatch(handle, current = {}) {
|
|
120
168
|
const { github_handle: _gone, ...rest } = current;
|
package/dist/people.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"people.js","sourceRoot":"","sources":["../src/people.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;
|
|
1
|
+
{"version":3,"file":"people.js","sourceRoot":"","sources":["../src/people.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;GAaG;;;AAsEH,sDAGC;AAcD,sDAIC;AAGD,4CAEC;AAMD,oCAEC;AAGD,gCAiBC;AAGD,wCAkBC;AAGD,8BAEC;AAGD,0CAEC;AAGD,0CAGC;AAGD,wCAEC;AASD,gDAOC;AAGD,8CAMC;AAOD,sCAMC;AAzMD,6BAAwB;AACxB,yCAA+C;AAElC,QAAA,WAAW,GAAG,QAAiB,CAAC;AAO7C,mHAAmH;AACtG,QAAA,QAAQ,GAAoB,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AAuB/D,QAAA,eAAe,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACvC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,IAAI,EAAE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GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAClD,IAAI,MAAM,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IACjC,MAAM,UAAU,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;IACjD,IAAI,UAAU,KAAK,IAAI;QAAE,MAAM,IAAI,KAAK,CAAC,wBAAwB,MAAM,EAAE,CAAC,CAAC;IAC3E,OAAO,EAAE,GAAG,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,CAAC;AAChD,CAAC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,IAAuC;IACnE,IAAI,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IAC5B,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO;QAAE,OAAO,OAAO,CAAC;IAC1C,IAAI,IAAI,CAAC,IAAI,KAAK,OAAO;QAAE,OAAO,SAAS,CAAC;IAC5C,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC;IACjC,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAK,gBAA8B,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC;AACzG,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@medicine-wheel/community-identity",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.3",
|
|
4
4
|
"description": "Who is in the circle: people as wheel nodes, roles with a permission map, circles and memberships as relations, invitations and self-issued credentials kept by the consumer — so a Medicine Wheel can tell two people apart.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"directory": "src/community-identity"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@medicine-wheel/ontology-core": "^0.27.
|
|
44
|
+
"@medicine-wheel/ontology-core": "^0.27.3",
|
|
45
45
|
"zod": "^3.23.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|