@teleporthq/teleport-plugin-next-workflows 0.43.49 → 0.43.50
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/__tests__/auth-session-cost.test.ts +101 -0
- package/__tests__/resolve-user-segment-skip.test.ts +226 -0
- package/dist/cjs/nodes/account/account-get-current.d.ts.map +1 -1
- package/dist/cjs/nodes/account/account-get-current.js +24 -0
- package/dist/cjs/nodes/account/account-get-current.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/nodes/account/account-get-current.d.ts.map +1 -1
- package/dist/esm/nodes/account/account-get-current.js +24 -0
- package/dist/esm/nodes/account/account-get-current.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/src/nodes/account/account-get-current.ts +25 -0
|
@@ -591,6 +591,107 @@ describe('account-get-current reads the in-memory session before the network', (
|
|
|
591
591
|
)
|
|
592
592
|
})
|
|
593
593
|
|
|
594
|
+
it('confirms a sign-out ONCE per page load, then stops re-fetching', async () => {
|
|
595
|
+
// next-auth reports 'unauthenticated' both for "signed out" and "my fetch
|
|
596
|
+
// failed", so the FIRST guest resolution verifies against the endpoint.
|
|
597
|
+
// Once that verification succeeds with no user, repeating it on every
|
|
598
|
+
// click only burns a round trip — the memo short-circuits it.
|
|
599
|
+
let fetched = 0
|
|
600
|
+
await withWindow(
|
|
601
|
+
{ getSession: () => ({ status: 'unauthenticated', session: null as unknown }) },
|
|
602
|
+
async () => {
|
|
603
|
+
fetched += 1
|
|
604
|
+
return { ok: true, json: async () => ({}) }
|
|
605
|
+
},
|
|
606
|
+
async (handler) => {
|
|
607
|
+
const first = await handler({}, {})
|
|
608
|
+
expect(fetched).toBe(1)
|
|
609
|
+
expect(first.user).toBeNull()
|
|
610
|
+
|
|
611
|
+
const second = await handler({}, {})
|
|
612
|
+
expect(fetched).toBe(1)
|
|
613
|
+
expect(second.user).toBeNull()
|
|
614
|
+
}
|
|
615
|
+
)
|
|
616
|
+
})
|
|
617
|
+
|
|
618
|
+
it('never memoizes sign-out from a FAILED confirmation fetch', async () => {
|
|
619
|
+
let fetched = 0
|
|
620
|
+
const user = { id: 'u-7', email: 'joan@example.com' }
|
|
621
|
+
await withWindow(
|
|
622
|
+
{ getSession: () => ({ status: 'unauthenticated', session: null as unknown }) },
|
|
623
|
+
async () => {
|
|
624
|
+
fetched += 1
|
|
625
|
+
if (fetched === 1) {
|
|
626
|
+
throw new Error('network blip')
|
|
627
|
+
}
|
|
628
|
+
return { ok: true, json: async () => ({ user }) }
|
|
629
|
+
},
|
|
630
|
+
async (handler) => {
|
|
631
|
+
await handler({}, {})
|
|
632
|
+
// The blip must not count as confirmation — the next call re-verifies
|
|
633
|
+
// and finds the real signed-in session.
|
|
634
|
+
const second = await handler({}, {})
|
|
635
|
+
expect(fetched).toBe(2)
|
|
636
|
+
expect(second.id).toBe('u-7')
|
|
637
|
+
}
|
|
638
|
+
)
|
|
639
|
+
})
|
|
640
|
+
|
|
641
|
+
it('a confirmation fetch that finds a user does NOT memoize sign-out', async () => {
|
|
642
|
+
let fetched = 0
|
|
643
|
+
const user = { id: 'u-8', email: 'lin@example.com' }
|
|
644
|
+
await withWindow(
|
|
645
|
+
{ getSession: () => ({ status: 'unauthenticated', session: null as unknown }) },
|
|
646
|
+
async () => {
|
|
647
|
+
fetched += 1
|
|
648
|
+
return { ok: true, json: async () => ({ user }) }
|
|
649
|
+
},
|
|
650
|
+
async (handler) => {
|
|
651
|
+
const first = await handler({}, {})
|
|
652
|
+
expect(first.id).toBe('u-8')
|
|
653
|
+
const second = await handler({}, {})
|
|
654
|
+
// Still verifying every time — the memo only forms on a confirmed
|
|
655
|
+
// empty session, never while a user is being returned.
|
|
656
|
+
expect(fetched).toBe(2)
|
|
657
|
+
expect(second.id).toBe('u-8')
|
|
658
|
+
}
|
|
659
|
+
)
|
|
660
|
+
})
|
|
661
|
+
|
|
662
|
+
it('an authenticated bridge clears a previously memoized sign-out', async () => {
|
|
663
|
+
// Sequence: guest confirms sign-out (memo forms) → user signs in (bridge
|
|
664
|
+
// flips to authenticated) → signs out again (bridge back to
|
|
665
|
+
// unauthenticated). The sign-in must clear the memo... and it does, but
|
|
666
|
+
// even if it did not, correctness holds: the memo is only consulted while
|
|
667
|
+
// next-auth itself reports 'unauthenticated'.
|
|
668
|
+
let status = 'unauthenticated'
|
|
669
|
+
let fetched = 0
|
|
670
|
+
const user = { id: 'u-9', email: 'kay@example.com' }
|
|
671
|
+
await withWindow(
|
|
672
|
+
{ getSession: () => ({ status, session: status === 'authenticated' ? { user } : null }) },
|
|
673
|
+
async () => {
|
|
674
|
+
fetched += 1
|
|
675
|
+
return { ok: true, json: async () => ({}) }
|
|
676
|
+
},
|
|
677
|
+
async (handler) => {
|
|
678
|
+
await handler({}, {})
|
|
679
|
+
expect(fetched).toBe(1)
|
|
680
|
+
expect((global as any).window.__tqSessionConfirmedSignedOut).toBe(true)
|
|
681
|
+
|
|
682
|
+
status = 'authenticated'
|
|
683
|
+
const signedIn = await handler({}, {})
|
|
684
|
+
expect(signedIn.id).toBe('u-9')
|
|
685
|
+
expect((global as any).window.__tqSessionConfirmedSignedOut).toBe(false)
|
|
686
|
+
|
|
687
|
+
status = 'unauthenticated'
|
|
688
|
+
await handler({}, {})
|
|
689
|
+
// Memo was cleared by the sign-in, so sign-out is re-confirmed once.
|
|
690
|
+
expect(fetched).toBe(2)
|
|
691
|
+
}
|
|
692
|
+
)
|
|
693
|
+
})
|
|
694
|
+
|
|
594
695
|
it('ignores a malformed bridge rather than throwing', async () => {
|
|
595
696
|
const user = { id: 'u-6', email: 'ken@example.com' }
|
|
596
697
|
let fetched = 0
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { NextWorkflowProjectPlugin } from '../src/workflow-project-plugin'
|
|
2
|
+
import { generateSharedRuntimeUtilsCode } from '../src'
|
|
3
|
+
|
|
4
|
+
// End-to-end boot of the generated custom-nodes runtime against the
|
|
5
|
+
// resolve-user GRAPH SHAPE (guest half): an outer "returning guest?" gate and,
|
|
6
|
+
// on its true branch, the once-per-session "needs row ensure?" gate in front of
|
|
7
|
+
// the fire-and-forget users-row re-ensure. The two data-create-item nodes (the
|
|
8
|
+
// ensure and the new-guest create) share ONE server segment, so the runtime
|
|
9
|
+
// must:
|
|
10
|
+
// 1. dispatch that segment WITHOUT awaiting when only the ff ensure is live
|
|
11
|
+
// (first resolution of a returning guest);
|
|
12
|
+
// 2. issue NO request at all when BOTH branches' data nodes are skipped
|
|
13
|
+
// (second resolution — the once-per-session gate turned the ensure off);
|
|
14
|
+
// 3. still block on the segment when the awaited new-guest create is live.
|
|
15
|
+
describe('generated custom node — resolve-user shape, once-per-session ensure skip', () => {
|
|
16
|
+
const script = (ret: string) => `function customHandler(p, q) { return ${ret} }`
|
|
17
|
+
|
|
18
|
+
const customNodes = {
|
|
19
|
+
'cn-resolve': {
|
|
20
|
+
id: 'cn-resolve',
|
|
21
|
+
name: 'Resolve-user shape',
|
|
22
|
+
parameters: [],
|
|
23
|
+
nodes: [
|
|
24
|
+
{
|
|
25
|
+
id: 'parse',
|
|
26
|
+
type: 'general-custom-js',
|
|
27
|
+
label: 'Parse Stored Anonymous User',
|
|
28
|
+
config: { code: script('{ marker: "parse" }'), context: 'client' },
|
|
29
|
+
executionEnv: 'client',
|
|
30
|
+
stepNumber: 0,
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
id: 'gate-returning',
|
|
34
|
+
type: 'general-if-statement',
|
|
35
|
+
label: 'Returning Guest?',
|
|
36
|
+
config: {
|
|
37
|
+
conditionType: 'simple-comparison',
|
|
38
|
+
leftValue: {
|
|
39
|
+
type: 'workflowContext',
|
|
40
|
+
nodeId: 'parse',
|
|
41
|
+
path: ['parse', 'returning'],
|
|
42
|
+
},
|
|
43
|
+
operator: '===',
|
|
44
|
+
rightValue: true,
|
|
45
|
+
},
|
|
46
|
+
executionEnv: 'client',
|
|
47
|
+
stepNumber: 1,
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
id: 'gate-needs-ensure',
|
|
51
|
+
type: 'general-if-statement',
|
|
52
|
+
label: 'Needs Anonymous Row Ensure?',
|
|
53
|
+
config: {
|
|
54
|
+
conditionType: 'simple-comparison',
|
|
55
|
+
leftValue: {
|
|
56
|
+
type: 'workflowContext',
|
|
57
|
+
nodeId: 'parse',
|
|
58
|
+
path: ['parse', 'needsDbEnsure'],
|
|
59
|
+
},
|
|
60
|
+
operator: '===',
|
|
61
|
+
rightValue: true,
|
|
62
|
+
},
|
|
63
|
+
executionEnv: 'client',
|
|
64
|
+
stepNumber: 2,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: 'ensure',
|
|
68
|
+
type: 'data-create-item',
|
|
69
|
+
label: 'Ensure Anonymous User Record',
|
|
70
|
+
config: { awaitResult: false },
|
|
71
|
+
executionEnv: 'server',
|
|
72
|
+
stepNumber: 3,
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 'create',
|
|
76
|
+
type: 'data-create-item',
|
|
77
|
+
label: 'Create Anonymous User Record',
|
|
78
|
+
config: {},
|
|
79
|
+
executionEnv: 'server',
|
|
80
|
+
stepNumber: 3,
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 'return-ensured',
|
|
84
|
+
type: 'general-custom-js',
|
|
85
|
+
label: 'Return Stored (Ensured)',
|
|
86
|
+
config: { code: script('{ branch: "ensured" }'), context: 'client' },
|
|
87
|
+
executionEnv: 'client',
|
|
88
|
+
stepNumber: 4,
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: 'return-skip',
|
|
92
|
+
type: 'general-custom-js',
|
|
93
|
+
label: 'Return Stored (Row Already Ensured)',
|
|
94
|
+
config: { code: script('{ branch: "skip" }'), context: 'client' },
|
|
95
|
+
executionEnv: 'client',
|
|
96
|
+
stepNumber: 4,
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: 'return-new',
|
|
100
|
+
type: 'general-custom-js',
|
|
101
|
+
label: 'Return New',
|
|
102
|
+
config: { code: script('{ branch: "new" }'), context: 'client' },
|
|
103
|
+
executionEnv: 'client',
|
|
104
|
+
stepNumber: 4,
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
edges: [
|
|
108
|
+
{ id: 'e1', source: 'parse', target: 'gate-returning' },
|
|
109
|
+
{ id: 'e2', source: 'gate-returning', target: 'gate-needs-ensure', sourceHandle: 'true' },
|
|
110
|
+
{ id: 'e3', source: 'gate-returning', target: 'create', sourceHandle: 'false' },
|
|
111
|
+
{ id: 'e4', source: 'gate-needs-ensure', target: 'ensure', sourceHandle: 'true' },
|
|
112
|
+
{ id: 'e5', source: 'gate-needs-ensure', target: 'return-skip', sourceHandle: 'false' },
|
|
113
|
+
{ id: 'e6', source: 'ensure', target: 'return-ensured' },
|
|
114
|
+
{ id: 'e7', source: 'create', target: 'return-new' },
|
|
115
|
+
],
|
|
116
|
+
},
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
interface Booted {
|
|
120
|
+
run: (
|
|
121
|
+
outerContext: Record<string, unknown>,
|
|
122
|
+
parameters: Record<string, unknown>,
|
|
123
|
+
handlers: Record<string, unknown>
|
|
124
|
+
) => Promise<unknown>
|
|
125
|
+
segmentCalls: string[]
|
|
126
|
+
resolveSegment: () => void
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const bootCustomNode = (): Booted => {
|
|
130
|
+
const plugin = new NextWorkflowProjectPlugin() as unknown as {
|
|
131
|
+
generateCustomNodesFile: (
|
|
132
|
+
nodes: Record<string, unknown>,
|
|
133
|
+
urls: Record<string, Record<string, string>>
|
|
134
|
+
) => string
|
|
135
|
+
}
|
|
136
|
+
const source = plugin.generateCustomNodesFile(customNodes, {
|
|
137
|
+
'cn-resolve': { 'server-1': '/api/workflows/resolve-seg-1' },
|
|
138
|
+
})
|
|
139
|
+
|
|
140
|
+
const utilsModule: { exports: Record<string, unknown> } = { exports: {} }
|
|
141
|
+
// eslint-disable-next-line @typescript-eslint/no-implied-eval
|
|
142
|
+
new Function('module', 'exports', generateSharedRuntimeUtilsCode())(
|
|
143
|
+
utilsModule,
|
|
144
|
+
utilsModule.exports
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
const segmentCalls: string[] = []
|
|
148
|
+
let releaseSegment: () => void = () => undefined
|
|
149
|
+
const segmentGate = new Promise<void>((resolve) => {
|
|
150
|
+
releaseSegment = resolve
|
|
151
|
+
})
|
|
152
|
+
const runtimeStub = {
|
|
153
|
+
findStreamingAINodes: () => ({}),
|
|
154
|
+
mergeServerResults: () => undefined,
|
|
155
|
+
callStreamingServerSegment: async () => ({}),
|
|
156
|
+
callServerSegment: async (url: string) => {
|
|
157
|
+
segmentCalls.push(url)
|
|
158
|
+
await segmentGate
|
|
159
|
+
return {}
|
|
160
|
+
},
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const requireStub = (id: string) =>
|
|
164
|
+
id === './runtime-utils' ? utilsModule.exports : id === './runtime' ? runtimeStub : {}
|
|
165
|
+
|
|
166
|
+
const moduleStub: { exports: Record<string, unknown> } = { exports: {} }
|
|
167
|
+
// eslint-disable-next-line @typescript-eslint/no-implied-eval
|
|
168
|
+
new Function('module', 'exports', 'require', source)(
|
|
169
|
+
moduleStub,
|
|
170
|
+
moduleStub.exports,
|
|
171
|
+
requireStub
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
return {
|
|
175
|
+
run: (moduleStub.exports as Record<string, Booted['run']>)['cn-resolve'],
|
|
176
|
+
segmentCalls,
|
|
177
|
+
resolveSegment: releaseSegment,
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
const parseHandler = (returning: boolean, needsDbEnsure: boolean) => ({
|
|
182
|
+
'general-custom-js': async (config: { code?: string }) => {
|
|
183
|
+
const code = (config && config.code) || ''
|
|
184
|
+
if (code.includes('parse')) {
|
|
185
|
+
return { returning, needsDbEnsure }
|
|
186
|
+
}
|
|
187
|
+
if (code.includes('ensured')) {
|
|
188
|
+
return { branch: 'ensured' }
|
|
189
|
+
}
|
|
190
|
+
if (code.includes('skip')) {
|
|
191
|
+
return { branch: 'skip' }
|
|
192
|
+
}
|
|
193
|
+
return { branch: 'new' }
|
|
194
|
+
},
|
|
195
|
+
})
|
|
196
|
+
|
|
197
|
+
it('first resolution of a returning guest: ONE dispatch, not awaited', async () => {
|
|
198
|
+
const booted = bootCustomNode()
|
|
199
|
+
// Gate never released — awaiting the segment would hang the test.
|
|
200
|
+
const result = (await booted.run({}, {}, parseHandler(true, true))) as Record<string, unknown>
|
|
201
|
+
expect(booted.segmentCalls).toEqual(['/api/workflows/resolve-seg-1'])
|
|
202
|
+
expect(result).toEqual({ branch: 'ensured' })
|
|
203
|
+
booted.resolveSegment()
|
|
204
|
+
})
|
|
205
|
+
|
|
206
|
+
it('second resolution in the same session: ZERO server requests', async () => {
|
|
207
|
+
const booted = bootCustomNode()
|
|
208
|
+
const result = (await booted.run({}, {}, parseHandler(true, false))) as Record<string, unknown>
|
|
209
|
+
expect(booted.segmentCalls).toEqual([])
|
|
210
|
+
expect(result).toEqual({ branch: 'skip' })
|
|
211
|
+
})
|
|
212
|
+
|
|
213
|
+
it('a brand-new guest still blocks on the awaited create', async () => {
|
|
214
|
+
const booted = bootCustomNode()
|
|
215
|
+
let settled = false
|
|
216
|
+
const running = booted.run({}, {}, parseHandler(false, true)).then((result) => {
|
|
217
|
+
settled = true
|
|
218
|
+
return result
|
|
219
|
+
})
|
|
220
|
+
await new Promise((resolve) => setTimeout(resolve, 50))
|
|
221
|
+
expect(booted.segmentCalls).toEqual(['/api/workflows/resolve-seg-1'])
|
|
222
|
+
expect(settled).toBe(false)
|
|
223
|
+
booted.resolveSegment()
|
|
224
|
+
expect(await running).toEqual({ branch: 'new' })
|
|
225
|
+
})
|
|
226
|
+
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-get-current.d.ts","sourceRoot":"","sources":["../../../../src/nodes/account/account-get-current.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAmB,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"account-get-current.d.ts","sourceRoot":"","sources":["../../../../src/nodes/account/account-get-current.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAmB,MAAM,UAAU,CAAA;AAgJhE,eAAO,MAAM,iBAAiB,EAAE,oBAS/B,CAAA"}
|
|
@@ -80,9 +80,26 @@ async function account_get_current(_config, context) {
|
|
|
80
80
|
const liveUser = snapshot.session && snapshot.session.user ? snapshot.session.user : null;
|
|
81
81
|
if (liveUser) {
|
|
82
82
|
__cache(liveUser);
|
|
83
|
+
window.__tqSessionConfirmedSignedOut = false;
|
|
83
84
|
return __out(liveUser);
|
|
84
85
|
}
|
|
85
86
|
}
|
|
87
|
+
// The fetch below exists to guard against 'unauthenticated' meaning "the
|
|
88
|
+
// provider's fetch FAILED" rather than "signed out". Once ONE fetch this
|
|
89
|
+
// page load has come back ok with no user, that ambiguity is resolved —
|
|
90
|
+
// repeating the confirmation on every subsequent click only burns a round
|
|
91
|
+
// trip. The memo is a window flag (never storage): a reload starts a
|
|
92
|
+
// fresh page and re-verifies, and it is cleared the moment any live user
|
|
93
|
+
// is observed. It is consulted ONLY when next-auth itself reports
|
|
94
|
+
// 'unauthenticated' — it can never mask a signed-in session, and it is
|
|
95
|
+
// display-plumbing only: every server-side write re-derives identity
|
|
96
|
+
// from the httpOnly session cookie, not from anything cached here.
|
|
97
|
+
if (snapshot &&
|
|
98
|
+
snapshot.status === 'unauthenticated' &&
|
|
99
|
+
window.__tqSessionConfirmedSignedOut === true) {
|
|
100
|
+
__cache(null);
|
|
101
|
+
return __out(null);
|
|
102
|
+
}
|
|
86
103
|
}
|
|
87
104
|
catch (_e) { }
|
|
88
105
|
}
|
|
@@ -92,6 +109,13 @@ async function account_get_current(_config, context) {
|
|
|
92
109
|
const session = await response.json();
|
|
93
110
|
const user = session && session.user ? session.user : null;
|
|
94
111
|
__cache(user);
|
|
112
|
+
if (typeof window !== 'undefined') {
|
|
113
|
+
try {
|
|
114
|
+
;
|
|
115
|
+
window.__tqSessionConfirmedSignedOut = !user;
|
|
116
|
+
}
|
|
117
|
+
catch (_e) { }
|
|
118
|
+
}
|
|
95
119
|
return __out(user);
|
|
96
120
|
}
|
|
97
121
|
if (typeof window !== 'undefined') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-get-current.js","sourceRoot":"","sources":["../../../../src/nodes/account/account-get-current.ts"],"names":[],"mappings":";;;AAAA,oCAAgE;AAEhE,KAAK,UAAU,mBAAmB,CAAC,OAAgB,EAAE,OAAgC;IACnF,MAAM,OAAO,GAAG,CAAC,OAAO,IAAK,OAAe,CAAC,SAAS,CAAC,IAAI,EAAE,CAAA;IAC7D,yEAAyE;IACzE,2EAA2E;IAC3E,4EAA4E;IAC5E,4EAA4E;IAC5E,+BAA+B;IAC/B,6EAA6E;IAC7E,yEAAyE;IACzE,2DAA2D;IAC3D,MAAM,KAAK,GAAG,CAAC,IAAS,EAAE,EAAE;QAC1B,MAAM,CAAC,GAAQ,EAAE,CAAA;QACjB,IAAI,IAAI,EAAE;YACR,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YAC5B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAClC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;aACvB;SACF;QACD,CAAC,CAAC,IAAI,GAAG,IAAI,IAAI,IAAI,CAAA;QACrB,OAAO,CAAC,CAAA;IACV,CAAC,CAAA;IACD,mEAAmE;IACnE,gEAAgE;IAChE,MAAM,OAAO,GAAG,CAAC,IAAS,EAAE,EAAE;QAC5B,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;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