@teleporthq/teleport-plugin-next-workflows 0.43.48 → 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__/data-node-not-awaited.test.ts +12 -1
- package/__tests__/ecommerce-get-settings-client.test.ts +383 -0
- package/__tests__/resolve-user-segment-skip.test.ts +226 -0
- package/dist/cjs/executor-generator.d.ts.map +1 -1
- package/dist/cjs/executor-generator.js +12 -1
- package/dist/cjs/executor-generator.js.map +1 -1
- package/dist/cjs/nodes/account/account-get-current.d.ts.map +1 -1
- package/dist/cjs/nodes/account/account-get-current.js +51 -7
- package/dist/cjs/nodes/account/account-get-current.js.map +1 -1
- package/dist/cjs/nodes/ecommerce/ecommerce-get-settings.d.ts.map +1 -1
- package/dist/cjs/nodes/ecommerce/ecommerce-get-settings.js +59 -1
- package/dist/cjs/nodes/ecommerce/ecommerce-get-settings.js.map +1 -1
- package/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/cjs/workflow-project-plugin.d.ts.map +1 -1
- package/dist/cjs/workflow-project-plugin.js +11 -1
- package/dist/cjs/workflow-project-plugin.js.map +1 -1
- package/dist/esm/executor-generator.d.ts.map +1 -1
- package/dist/esm/executor-generator.js +12 -1
- package/dist/esm/executor-generator.js.map +1 -1
- package/dist/esm/nodes/account/account-get-current.d.ts.map +1 -1
- package/dist/esm/nodes/account/account-get-current.js +51 -7
- package/dist/esm/nodes/account/account-get-current.js.map +1 -1
- package/dist/esm/nodes/ecommerce/ecommerce-get-settings.d.ts.map +1 -1
- package/dist/esm/nodes/ecommerce/ecommerce-get-settings.js +59 -1
- package/dist/esm/nodes/ecommerce/ecommerce-get-settings.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/workflow-project-plugin.d.ts.map +1 -1
- package/dist/esm/workflow-project-plugin.js +11 -1
- package/dist/esm/workflow-project-plugin.js.map +1 -1
- package/package.json +2 -2
- package/src/executor-generator.ts +12 -1
- package/src/nodes/account/account-get-current.ts +52 -8
- package/src/nodes/ecommerce/ecommerce-get-settings.ts +62 -3
- package/src/workflow-project-plugin.ts +11 -1
|
@@ -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":"executor-generator.d.ts","sourceRoot":"","sources":["../../src/executor-generator.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B,QAAO,MAiuCjD,CAAA;AAED,eAAO,MAAM,yBAAyB,QAAO,
|
|
1
|
+
{"version":3,"file":"executor-generator.d.ts","sourceRoot":"","sources":["../../src/executor-generator.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,8BAA8B,QAAO,MAiuCjD,CAAA;AAED,eAAO,MAAM,yBAAyB,QAAO,MAqgB5C,CAAA;AAED,eAAO,MAAM,yBAAyB,QAAO,MAK5C,CAAA"}
|
|
@@ -1616,7 +1616,18 @@ async function executeWorkflowWithSegments(workflowConfig, triggerContext, clien
|
|
|
1616
1616
|
// still awaits each query before it responds; we simply ignore the
|
|
1617
1617
|
// response. Errors are logged, never routed to the error handler:
|
|
1618
1618
|
// the workflow already moved past this point.
|
|
1619
|
-
|
|
1619
|
+
//
|
|
1620
|
+
// seg.fireAndForget is computed STATICALLY (every node in the segment
|
|
1621
|
+
// is a fire-and-forget data node). A segment that MIXES fire-and-forget
|
|
1622
|
+
// and awaited nodes stays blocking statically — but when branch
|
|
1623
|
+
// skipping has already eliminated the awaited nodes at runtime, only
|
|
1624
|
+
// fire-and-forget work remains, so the same "nothing downstream can
|
|
1625
|
+
// read it" guarantee holds for the nodes that will actually run. The
|
|
1626
|
+
// dynamic check below upgrades exactly that case.
|
|
1627
|
+
var segLiveNodes = seg.nodes.filter(function(n) { return !(context.__skippedNodes && context.__skippedNodes[n.id]); });
|
|
1628
|
+
var segIsFireAndForget = seg.fireAndForget ||
|
|
1629
|
+
(segLiveNodes.length > 0 && segLiveNodes.every(utils.isFireAndForgetNode));
|
|
1630
|
+
if (segIsFireAndForget) {
|
|
1620
1631
|
const ffUrl = serverSegmentUrls[seg.id];
|
|
1621
1632
|
if (!ffUrl) throw new Error('No server URL for segment: ' + seg.id);
|
|
1622
1633
|
utils.registerPendingNodePromise(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor-generator.js","sourceRoot":"","sources":["../../src/executor-generator.ts"],"names":[],"mappings":";;;AAAO,MAAM,8BAA8B,GAAG,GAAW,EAAE;IACzD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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CAiuC1C;AAEM,MAAM,yBAAyB,GAAG,GAAW,EAAE;IACpD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmgBR,CAAA;AACD,CAAC,CAAA;AArgBY,QAAA,yBAAyB,6BAqgBrC;AAEM,MAAM,yBAAyB,GAAG,GAAW,EAAE;IACpD,OAAO;;;CAGR,CAAA;AACD,CAAC,CAAA;AALY,QAAA,yBAAyB,6BAKrC"}
|
|
@@ -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"}
|
|
@@ -46,23 +46,60 @@ async function account_get_current(_config, context) {
|
|
|
46
46
|
// callback re-reads the `users` row) BEFORE the workflow's own request could
|
|
47
47
|
// start — for data the page had since it mounted.
|
|
48
48
|
//
|
|
49
|
-
// Only 'authenticated' short-circuits. '
|
|
50
|
-
//
|
|
51
|
-
//
|
|
52
|
-
//
|
|
53
|
-
//
|
|
54
|
-
//
|
|
49
|
+
// Only 'authenticated' short-circuits. 'unauthenticated' is also what
|
|
50
|
+
// next-auth reports when the provider's fetch FAILED, and treating a
|
|
51
|
+
// transient error as "signed out" would send a signed-in visitor down the
|
|
52
|
+
// guest branch. It falls through to the fetch — which for a guest is the
|
|
53
|
+
// cheap case anyway, since the jwt callback returns before touching the
|
|
54
|
+
// database when there is no token.
|
|
55
|
+
//
|
|
56
|
+
// 'loading' means the provider's FIRST /api/auth/session fetch is still in
|
|
57
|
+
// flight (a click that lands within ~a second of page load). Issuing our own
|
|
58
|
+
// fetch at that moment duplicates the exact request already on the wire —
|
|
59
|
+
// including its jwt-callback user-row read. Instead, briefly poll the bridge
|
|
60
|
+
// snapshot until the in-flight fetch settles; the bounded deadline means a
|
|
61
|
+
// hung provider fetch degrades to today's behaviour (our own fetch) instead
|
|
62
|
+
// of stalling the workflow.
|
|
55
63
|
if (typeof window !== 'undefined') {
|
|
56
64
|
try {
|
|
57
65
|
const bridge = window.__teleportNextAuth;
|
|
58
|
-
|
|
66
|
+
let snapshot = bridge && typeof bridge.getSession === 'function' ? bridge.getSession() : null;
|
|
67
|
+
if (snapshot && snapshot.status === 'loading') {
|
|
68
|
+
const deadline = Date.now() + 3000;
|
|
69
|
+
while (Date.now() < deadline) {
|
|
70
|
+
await new Promise(function (resolve) {
|
|
71
|
+
setTimeout(resolve, 50);
|
|
72
|
+
});
|
|
73
|
+
snapshot = bridge.getSession();
|
|
74
|
+
if (!snapshot || snapshot.status !== 'loading') {
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
59
79
|
if (snapshot && snapshot.status === 'authenticated') {
|
|
60
80
|
const liveUser = snapshot.session && snapshot.session.user ? snapshot.session.user : null;
|
|
61
81
|
if (liveUser) {
|
|
62
82
|
__cache(liveUser);
|
|
83
|
+
window.__tqSessionConfirmedSignedOut = false;
|
|
63
84
|
return __out(liveUser);
|
|
64
85
|
}
|
|
65
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
|
+
}
|
|
66
103
|
}
|
|
67
104
|
catch (_e) { }
|
|
68
105
|
}
|
|
@@ -72,6 +109,13 @@ async function account_get_current(_config, context) {
|
|
|
72
109
|
const session = await response.json();
|
|
73
110
|
const user = session && session.user ? session.user : null;
|
|
74
111
|
__cache(user);
|
|
112
|
+
if (typeof window !== 'undefined') {
|
|
113
|
+
try {
|
|
114
|
+
;
|
|
115
|
+
window.__tqSessionConfirmedSignedOut = !user;
|
|
116
|
+
}
|
|
117
|
+
catch (_e) { }
|
|
118
|
+
}
|
|
75
119
|
return __out(user);
|
|
76
120
|
}
|
|
77
121
|
if (typeof window !== 'undefined') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account-get-current.js","sourceRo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IAC9E,4EAA4E;IAC5E,+EAA+E;IAC/E,uEAAuE;IACvE,6EAA6E;IAC7E,kDAAkD;IAClD,EAAE;IACF,
|
|
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;YACjC,OAAM;SACP;QACD,IAAI;YACF,IAAI,IAAI,EAAE;gBACR,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,oBAAoB,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAA;aACxE;iBAAM;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AI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,IAAI;gBACF,MAAM,MAAM,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAA;gBAChE,IAAI,MAAM,EAAE;oBACV,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAA;iBACjC;aACF;YAAC,OAAO,EAAE,EAAE,GAAE;SAChB;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,CAAA;KACnB;IAAC,OAAO,GAAY,EAAE;QACrB,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;YACjC,IAAI;gBACF,MAAM,QAAQ,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAA;gBAClE,IAAI,QAAQ,EAAE;oBACZ,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAA;iBACnC;aACF;YAAC,OAAO,EAAE,EAAE,GAAE;SAChB;QACD,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAG,GAAa,CAAC,OAAO,EAAE,CAAA;KACrD;AACH,CAAC;AAEY,QAAA,iBAAiB,GAAyB;IACrD,QAAQ,EAAE,qBAAqB;IAC/B,YAAY,EAAE,QAAQ;IACtB,YAAY,EAAE;QACZ,WAAW,EAAE,SAAS;KACvB;IACD,eAAe;QACb,OAAO,IAAA,uBAAe,EAAC,mBAAmB,CAAC,CAAA;IAC7C,CAAC;CACF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecommerce-get-settings.d.ts","sourceRoot":"","sources":["../../../../src/nodes/ecommerce/ecommerce-get-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAmB,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"ecommerce-get-settings.d.ts","sourceRoot":"","sources":["../../../../src/nodes/ecommerce/ecommerce-get-settings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAmB,MAAM,UAAU,CAAA;AAyEhE,eAAO,MAAM,oBAAoB,EAAE,oBAYlC,CAAA"}
|
|
@@ -2,7 +2,59 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ecommerceGetSettings = void 0;
|
|
4
4
|
const types_1 = require("../types");
|
|
5
|
+
// CLIENT handler. The /api/ecommerce/settings route returns a literal baked at
|
|
6
|
+
// generation time (see teleport-project-generator-next's
|
|
7
|
+
// generateEcommerceSettingsApiRoute) — within a deployment it can never return
|
|
8
|
+
// anything else. Paying a server round trip for it on every add-to-cart /
|
|
9
|
+
// cart-increment click was pure latency, and because this node was classified
|
|
10
|
+
// `server` it also SPLIT the surrounding workflow into extra server segments
|
|
11
|
+
// (one HTTP round trip each). The generated ecommerce-context module publishes
|
|
12
|
+
// the SAME payload on `window.__teleportEcommerceSettings` at module-eval time
|
|
13
|
+
// (before any click can run a workflow), so the common path is a synchronous
|
|
14
|
+
// read. The fetch fallback covers projects whose context file predates the
|
|
15
|
+
// baked global; a successful response is memoized for the page's lifetime —
|
|
16
|
+
// the endpoint is immutable within a deployment, so this can never go stale.
|
|
5
17
|
async function ecommerce_get_settings(_config, context) {
|
|
18
|
+
const baseUrl = (context && context.__baseUrl) || '';
|
|
19
|
+
if (typeof window !== 'undefined') {
|
|
20
|
+
try {
|
|
21
|
+
const baked = window.__teleportEcommerceSettings;
|
|
22
|
+
if (baked && typeof baked === 'object') {
|
|
23
|
+
return baked;
|
|
24
|
+
}
|
|
25
|
+
const memoized = window.__teleportEcommerceSettingsFetched;
|
|
26
|
+
if (memoized && typeof memoized === 'object') {
|
|
27
|
+
return memoized;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch (_e) { }
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
const response = await fetch(baseUrl + '/api/ecommerce/settings', {
|
|
34
|
+
method: 'GET',
|
|
35
|
+
headers: { 'Content-Type': 'application/json' },
|
|
36
|
+
});
|
|
37
|
+
if (!response.ok) {
|
|
38
|
+
return { error: 'Failed to load e-commerce settings' };
|
|
39
|
+
}
|
|
40
|
+
const settings = await response.json();
|
|
41
|
+
if (typeof window !== 'undefined' && settings && typeof settings === 'object') {
|
|
42
|
+
try {
|
|
43
|
+
;
|
|
44
|
+
window.__teleportEcommerceSettingsFetched = settings;
|
|
45
|
+
}
|
|
46
|
+
catch (_e) { }
|
|
47
|
+
}
|
|
48
|
+
return settings;
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
return { error: err.message };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
// SERVER handler — used by contexts that execute every node server-side
|
|
55
|
+
// (cron and webhook API routes, where no window exists). Same fetch the old
|
|
56
|
+
// server-classified handler performed.
|
|
57
|
+
async function ecommerce_settings_server_fetch(_config, context) {
|
|
6
58
|
const baseUrl = (context && context.__baseUrl) || '';
|
|
7
59
|
try {
|
|
8
60
|
const response = await fetch(baseUrl + '/api/ecommerce/settings', {
|
|
@@ -20,9 +72,15 @@ async function ecommerce_get_settings(_config, context) {
|
|
|
20
72
|
}
|
|
21
73
|
exports.ecommerceGetSettings = {
|
|
22
74
|
nodeType: 'ecommerce-get-settings',
|
|
23
|
-
|
|
75
|
+
// Client: the settings payload is public, baked into the deployment, and
|
|
76
|
+
// already shipped to the browser — keeping this node server-side only
|
|
77
|
+
// fragmented workflows into extra blocking round trips.
|
|
78
|
+
executionEnv: 'client',
|
|
24
79
|
generateHandler() {
|
|
25
80
|
return (0, types_1.handlerToString)(ecommerce_get_settings);
|
|
26
81
|
},
|
|
82
|
+
generateServerHandler() {
|
|
83
|
+
return (0, types_1.handlerToString)(ecommerce_settings_server_fetch);
|
|
84
|
+
},
|
|
27
85
|
};
|
|
28
86
|
//# sourceMappingURL=ecommerce-get-settings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ecommerce-get-settings.js","sourceRoot":"","sources":["../../../../src/nodes/ecommerce/ecommerce-get-settings.ts"],"names":[],"mappings":";;;AAAA,oCAAgE;AAEhE,KAAK,UAAU,sBAAsB,CAAC,
|
|
1
|
+
{"version":3,"file":"ecommerce-get-settings.js","sourceRoot":"","sources":["../../../../src/nodes/ecommerce/ecommerce-get-settings.ts"],"names":[],"mappings":";;;AAAA,oCAAgE;AAEhE,+EAA+E;AAC/E,yDAAyD;AACzD,+EAA+E;AAC/E,0EAA0E;AAC1E,8EAA8E;AAC9E,6EAA6E;AAC7E,+EAA+E;AAC/E,+EAA+E;AAC/E,6EAA6E;AAC7E,2EAA2E;AAC3E,4EAA4E;AAC5E,6EAA6E;AAC7E,KAAK,UAAU,sBAAsB,CAAC,OAAgB,EAAE,OAAgC;IACtF,MAAM,OAAO,GAAG,CAAC,OAAO,IAAK,OAAe,CAAC,SAAS,CAAC,IAAI,EAAE,CAAA;IAE7D,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;QACjC,IAAI;YACF,MAAM,KAAK,GAAI,MAAc,CAAC,2BAA2B,CAAA;YACzD,IAAI,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;gBACtC,OAAO,KAAK,CAAA;aACb;YACD,MAAM,QAAQ,GAAI,MAAc,CAAC,kCAAkC,CAAA;YACnE,IAAI,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;gBAC5C,OAAO,QAAQ,CAAA;aAChB;SACF;QAAC,OAAO,EAAE,EAAE,GAAE;KAChB;IAED,IAAI;QACF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,GAAG,yBAAyB,EAAE;YAChE,MAAM,EAAE,KAAK;YACb,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;SAChD,CAAC,CAAA;QAEF,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;YAChB,OAAO,EAAE,KAAK,EAAE,oCAAoC,EAAE,CAAA;SACvD;QAED,MAAM,QAAQ,GAAG,MAAM,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