emailengine-app 2.80.0 → 2.80.1

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.
Files changed (101) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +24 -0
  3. package/README.md +6 -0
  4. package/data/google-crawlers.json +1 -1
  5. package/lib/api-routes/account-routes.js +81 -1
  6. package/lib/api-routes/blocklist-routes.js +24 -0
  7. package/lib/api-routes/delivery-test-routes.js +6 -0
  8. package/lib/api-routes/gateway-routes.js +30 -0
  9. package/lib/api-routes/license-routes.js +10 -0
  10. package/lib/api-routes/mcp-oauth-routes.js +3 -3
  11. package/lib/api-routes/mcp-routes.js +39 -21
  12. package/lib/api-routes/oauth2-app-routes.js +38 -1
  13. package/lib/api-routes/outbox-routes.js +6 -0
  14. package/lib/api-routes/permission-map.js +208 -43
  15. package/lib/api-routes/pubsub-routes.js +8 -0
  16. package/lib/api-routes/route-helpers.js +58 -11
  17. package/lib/api-routes/settings-routes.js +50 -4
  18. package/lib/api-routes/stats-routes.js +6 -0
  19. package/lib/api-routes/template-routes.js +21 -0
  20. package/lib/api-routes/token-routes.js +34 -2
  21. package/lib/api-routes/webhook-route-routes.js +13 -0
  22. package/lib/email-client/base-client.js +6 -3
  23. package/lib/email-client/credential-errors.js +4 -0
  24. package/lib/email-client/imap/login-failure.js +52 -0
  25. package/lib/email-client/imap/subconnection.js +2 -1
  26. package/lib/email-client/imap-client.js +3 -6
  27. package/lib/enum-descriptions.js +12 -2
  28. package/lib/imapproxy/imap-server.js +1 -1
  29. package/lib/mcp/oauth.js +46 -8
  30. package/lib/mcp/protocol.js +78 -35
  31. package/lib/mcp/tools.js +53 -17
  32. package/lib/privileged-settings.js +147 -0
  33. package/lib/schemas.js +60 -16
  34. package/lib/settings.js +13 -0
  35. package/lib/tls/catalog.js +428 -0
  36. package/lib/tls/context.js +87 -161
  37. package/lib/tls/listeners.js +62 -0
  38. package/lib/tls/status.js +128 -79
  39. package/lib/tls/store.js +3 -2
  40. package/lib/token-permission-view.js +252 -102
  41. package/lib/token-permissions.js +176 -26
  42. package/lib/tokens.js +7 -6
  43. package/lib/tools.js +4 -3
  44. package/lib/ui-routes/admin-config-routes.js +41 -21
  45. package/lib/ui-routes/admin-entities-routes.js +23 -13
  46. package/lib/ui-routes/mcp-consent-routes.js +72 -31
  47. package/lib/ui-routes/tls-config-routes.js +121 -74
  48. package/package.json +12 -12
  49. package/sbom.json +1 -1
  50. package/server.js +7 -1
  51. package/static/css/flyonui.css +1 -1
  52. package/static/js/ui.js +89 -36
  53. package/static/licenses.html +46 -28
  54. package/translations/messages.pot +74 -68
  55. package/views/account/login-redirect.hbs +1 -1
  56. package/views/account/passkeys.hbs +2 -2
  57. package/views/accounts/account.hbs +2 -2
  58. package/views/accounts/browse.hbs +1 -1
  59. package/views/accounts/edit.hbs +1 -1
  60. package/views/accounts/register/imap-server.hbs +1 -1
  61. package/views/config/ai.hbs +1 -1
  62. package/views/config/branding.hbs +2 -2
  63. package/views/config/document-store/chat.hbs +1 -1
  64. package/views/config/document-store/index.hbs +1 -1
  65. package/views/config/imap-proxy.hbs +1 -1
  66. package/views/config/license.hbs +1 -1
  67. package/views/config/mcp.hbs +88 -52
  68. package/views/config/network.hbs +1 -1
  69. package/views/config/oauth/app.hbs +2 -2
  70. package/views/config/service.hbs +1 -1
  71. package/views/config/smtp.hbs +1 -1
  72. package/views/config/tls.hbs +266 -165
  73. package/views/config/webhooks.hbs +2 -2
  74. package/views/internals/index.hbs +1 -1
  75. package/views/layout/app.hbs +6 -6
  76. package/views/layout/login.hbs +5 -5
  77. package/views/layout/main.hbs +2 -2
  78. package/views/layout/prompt.hbs +3 -3
  79. package/views/layout/public.hbs +1 -1
  80. package/views/mcp/authorize.hbs +47 -45
  81. package/views/partials/ace_assets.hbs +1 -1
  82. package/views/partials/add_account_modal.hbs +1 -1
  83. package/views/partials/filter_editor_js.hbs +2 -2
  84. package/views/partials/gateway_js.hbs +1 -1
  85. package/views/partials/mcp_access_levels.hbs +16 -9
  86. package/views/partials/mcp_tool_count.hbs +15 -14
  87. package/views/partials/oauth_form.hbs +1 -1
  88. package/views/partials/public_theme_init.hbs +1 -1
  89. package/views/partials/template_form.hbs +1 -1
  90. package/views/partials/theme_init.hbs +1 -1
  91. package/views/partials/webhooks_editor_functions.hbs +1 -1
  92. package/views/reference/index.hbs +1 -1
  93. package/views/reference/redirect.hbs +1 -1
  94. package/views/reference/tag.hbs +1 -1
  95. package/views/reference/token.hbs +1 -1
  96. package/views/templates/template.hbs +1 -1
  97. package/views/tokens/new.hbs +175 -74
  98. package/views/unsubscribe.hbs +1 -1
  99. package/views/webhooks/webhook.hbs +1 -1
  100. package/workers/api.js +9 -8
  101. package/workers/smtp.js +1 -1
@@ -46,14 +46,14 @@
46
46
 
47
47
  </div>
48
48
 
49
- <script src="/static/js/flyonui.js"></script>
50
- <script src="/static/js/ui.js"></script>
49
+ <script data-cfasync="false" src="/static/js/flyonui.js"></script>
50
+ <script data-cfasync="false" src="/static/js/ui.js"></script>
51
51
 
52
- <script src="/static/js/app.js"></script>
52
+ <script data-cfasync="false" src="/static/js/app.js"></script>
53
53
 
54
54
  {{#if passkeysAvailable}}
55
- <script src="/static/vendor/simplewebauthn/browser.min.js"></script>
56
- <script src="/static/js/login-passkey.js"></script>
55
+ <script data-cfasync="false" src="/static/vendor/simplewebauthn/browser.min.js"></script>
56
+ <script data-cfasync="false" src="/static/js/login-passkey.js"></script>
57
57
  {{/if}}
58
58
 
59
59
  </body>
@@ -44,8 +44,8 @@
44
44
  </div>
45
45
  </footer>
46
46
 
47
- <script src="/static/js/flyonui.js"></script>
48
- <script src="/static/js/ui.js"></script>
47
+ <script data-cfasync="false" src="/static/js/flyonui.js"></script>
48
+ <script data-cfasync="false" src="/static/js/ui.js"></script>
49
49
  </body>
50
50
 
51
51
  </html>
@@ -52,10 +52,10 @@
52
52
 
53
53
  </div>
54
54
 
55
- <script src="/static/js/flyonui.js"></script>
56
- <script src="/static/js/ui.js"></script>
55
+ <script data-cfasync="false" src="/static/js/flyonui.js"></script>
56
+ <script data-cfasync="false" src="/static/js/ui.js"></script>
57
57
 
58
- <script src="/static/js/app.js"></script>
58
+ <script data-cfasync="false" src="/static/js/app.js"></script>
59
59
 
60
60
  </body>
61
61
 
@@ -56,7 +56,7 @@
56
56
 
57
57
  </main>
58
58
 
59
- <script src="/static/js/public.js"></script>
59
+ <script data-cfasync="false" src="/static/js/public.js"></script>
60
60
 
61
61
  </body>
62
62
 
@@ -25,8 +25,9 @@
25
25
  the one MCP surface a person can reach without passing one of those first, so it is
26
26
  also the one where the label would otherwise be missing. --}}
27
27
  {{> ui/badge label="Beta" variant="info" soft=true class="badge-sm align-middle"}}</h1>
28
- <p class="text-base-content/60 mt-2 text-sm">An MCP client is asking for access to the email accounts on this
29
- EmailEngine instance. Once you decide, the browser returns to <code>{{redirectHost}}</code>.</p>
28
+ <p class="text-base-content/60 mt-2 text-sm">An MCP client is asking for access to this EmailEngine instance. Decide
29
+ what it may manage and whether it may read mail; once you decide, the browser returns to
30
+ <code>{{redirectHost}}</code>.</p>
30
31
  </div>
31
32
 
32
33
  {{#unless canProvision}}
@@ -46,40 +47,38 @@
46
47
  <input type="hidden" name="code_challenge" value="{{values.code_challenge}}" />
47
48
  <input type="hidden" name="resource" value="{{values.resource}}" />
48
49
 
49
- <div class="space-y-4">
50
-
50
+ <div class="space-y-5">
51
+
52
+ {{!-- One block per section, in table order: management first, because it is what the
53
+ endpoint is for by default, then mail, declined unless the person or the client's
54
+ scope request said otherwise. The radio group of a section is named after its key,
55
+ which is the field the route reads and what ui.js reads the selection back from.
56
+ Under each group, one grant sentence per level, generated from the table rather than
57
+ written per level: the grant word lists come from the surface tables the enforcement
58
+ reads (never written out here), so this screen cannot promise less than the token
59
+ grants after the tool set changes, and the caveat travels with the level it
60
+ describes. One is visible at a time - the one describing the selected level. --}}
61
+ {{#each mcpSections}}
51
62
  <fieldset class="space-y-2">
52
- <legend class="label-text mb-1">Access level</legend>
53
- {{> mcp_access_levels name="access" idPrefix="access" selected=accessLevel}}
63
+ <legend class="label-text mb-1">{{label}}</legend>
64
+ {{> mcp_access_levels section=this name=@key idPrefix=@key selected=(lookup ../selectedLevels @key) includeNone=true}}
54
65
  </fieldset>
55
66
 
56
- {{!-- The grant word lists come from MCP_GRANT_WORDING (derived from SURFACE_GRANTS.mcp,
57
- never written out here), so this screen cannot promise less than the token grants
58
- after the tool set changes. The framing prose around them is bespoke per level - a
59
- level added to MCP_ACCESS_LEVELS needs its own alert block here. One is visible at
60
- a time - the one describing the selected access level. --}}
61
- <div data-access="read" class="consent-grant alert alert-soft alert-info text-sm{{#equals accessLevel 'read'}}{{else}} hidden{{/equals}}">
62
- <span class="icon-[tabler--info-circle] size-5 shrink-0"></span>
63
- <span>Through the MCP tool set the client will be able to <strong>{{grantWording.read.actions}}</strong>
64
- {{grantWording.read.groups}} on the accounts its token can reach. It cannot send email, delete anything,
65
- change anything, read stored credentials, or change instance settings.</span>
66
- </div>
67
-
68
- <div data-access="mail" class="consent-grant alert alert-soft alert-warning text-sm{{#equals accessLevel 'mail'}}{{else}} hidden{{/equals}}">
69
- <span class="icon-[tabler--alert-triangle] size-5 shrink-0"></span>
70
- <span>Through the MCP tool set the client will be able to <strong>{{grantWording.mail.actions}}</strong>
71
- across {{grantWording.mail.groups}} on the accounts its token can reach - everything except the delete
72
- tool. Instructions inside received mail are a real prompt-injection risk once sending is granted. It
73
- cannot read stored credentials or change instance settings.</span>
67
+ {{#each levels}}
68
+ <div data-section="{{@../key}}" data-level="{{value}}"
69
+ class="consent-grant alert alert-soft alert-{{variant}} text-sm{{#equals (lookup ../../selectedLevels @../key) value}}{{else}} hidden{{/equals}}">
70
+ <span class="{{#equals variant 'info'}}icon-[tabler--info-circle]{{else}}icon-[tabler--alert-triangle]{{/equals}} size-5 shrink-0"></span>
71
+ <span>{{../lead}} <strong>{{actions}}</strong> across {{groups}}. {{caveat}}</span>
74
72
  </div>
73
+ {{/each}}
74
+ {{/each}}
75
75
 
76
- <div data-access="full" class="consent-grant alert alert-soft alert-warning text-sm{{#equals accessLevel 'full'}}{{else}} hidden{{/equals}}">
77
- <span class="icon-[tabler--alert-triangle] size-5 shrink-0"></span>
78
- <span>Through the MCP tool set the client will be able to <strong>{{grantWording.full.actions}}</strong>
79
- across {{grantWording.full.groups}} on the accounts its token can reach. Instructions inside received
80
- mail are a real prompt-injection risk once sending is granted. It cannot read stored credentials or
81
- change instance settings.</span>
76
+ {{#if errors.access}}
77
+ <div class="alert alert-soft alert-error text-sm">
78
+ <span class="icon-[tabler--alert-circle] size-5 shrink-0"></span>
79
+ <span>{{errors.access}}</span>
82
80
  </div>
81
+ {{/if}}
83
82
 
84
83
  <div>
85
84
  {{> mcp_account_limit id="account" value=values.account selected=selectedAccount error=errors.account}}
@@ -88,8 +87,9 @@
88
87
  {{!-- The grant sentences above say what a level allows in the permission vocabulary; this
89
88
  says which tools the client ends up holding, which is closer to the thing being
90
89
  approved. Follows the account field too, because limiting the client to one account
91
- takes the instance-wide tools away from it. --}}
92
- {{> mcp_tool_count id="consentToolCount" levelName="access" accountId="account"}}
90
+ takes the instance-wide tools away from it - what is left of a management grant is
91
+ then the tools that operate that one account. --}}
92
+ {{> mcp_tool_count id="consentToolCount" autoWire=true levelPrefix="" accountId="account"}}
93
93
 
94
94
  <div class="flex gap-3 pt-2">
95
95
  <button type="submit" name="decision" value="deny" class="btn btn-neutral btn-outline grow">
@@ -108,29 +108,31 @@
108
108
  TTL, so an approved client holds its token until someone takes it away. Said here
109
109
  because this is the screen where the decision is made, and the person making it has
110
110
  no other place to learn it. --}}
111
- <p class="text-base-content/60 text-center text-xs">Approving creates an access token with the <code>mcp</code>
112
- scope. It does not expire - it appears on the <a href="/admin/tokens?scope=mcp" class="link">Access
113
- Tokens</a> page and stays valid until you revoke it there.</p>
111
+ <p class="text-base-content/60 text-center text-xs">Approving creates an access token with the MCP scopes you
112
+ chose (<code>mcp-manage</code> for the instance, <code>mcp</code> for mail) and exactly the grants shown
113
+ above. It does not expire - it appears on the <a href="/admin/tokens?scope=mcp-manage&amp;scope=mcp"
114
+ class="link">Access Tokens</a> page and stays valid until you revoke it there.</p>
114
115
 
115
116
  </div>
116
117
  </form>
117
118
 
118
- <script nonce="{{cspNonce}}">
119
- (() => {
120
- // The grant sentences describe the same token under each setting of the radio, so
121
- // whichever is showing is the one the operator is about to approve
122
- let radios = Array.from(document.querySelectorAll('input[name="access"]'));
119
+ <script data-cfasync="false" nonce="{{cspNonce}}">
120
+ // The grant sentences describe the same token under each setting of the radios, so whichever
121
+ // are showing are the ones the operator is about to approve. The tool count is wired by ui.js
122
+ // off the count element's data attributes; this only follows the alerts. On DOMContentLoaded
123
+ // because the prompt layout loads ui.js after the page body, and the helper lives there.
124
+ document.addEventListener('DOMContentLoaded', () => {
125
+ let sections = JSON.parse(document.getElementById('consentToolCount').dataset.mcpSections || '{}');
123
126
  let grants = Array.from(document.querySelectorAll('.consent-grant'));
124
127
 
125
128
  let sync = () => {
126
- let selected = radios.find(radio => radio.checked);
127
- let access = (selected && selected.value) || 'read';
128
- grants.forEach(grant => grant.classList.toggle('hidden', grant.dataset.access !== access));
129
+ let choice = uiMcpLevelChoice(sections, '');
130
+ grants.forEach(grant => grant.classList.toggle('hidden', grant.dataset.level !== choice[grant.dataset.section]));
129
131
  };
130
132
 
131
- radios.forEach(radio => radio.addEventListener('change', sync));
133
+ document.querySelectorAll('input[type="radio"]').forEach(radio => radio.addEventListener('change', sync));
132
134
  sync();
133
- })();
135
+ });
134
136
  </script>
135
137
 
136
138
  {{/if}}
@@ -10,4 +10,4 @@
10
10
  <link rel="stylesheet" href="/static/js/ace/css/theme/kuroir.css">
11
11
  <link rel="stylesheet" href="/static/js/ace/css/theme/tomorrow_night.css">
12
12
  <link rel="stylesheet" href="/static/js/ace/css/theme/tomorrow_night_eighties.css">
13
- <script src="/static/js/ace/ace.js"></script>
13
+ <script data-cfasync="false" src="/static/js/ace/ace.js"></script>
@@ -17,7 +17,7 @@
17
17
  </form>
18
18
  {{/ui/modal}}
19
19
 
20
- <script nonce="{{cspNonce}}">
20
+ <script data-cfasync="false" nonce="{{cspNonce}}">
21
21
  document.addEventListener('DOMContentLoaded', () => {
22
22
  let modalElm = document.getElementById('addAccount');
23
23
 
@@ -22,7 +22,7 @@
22
22
  notificationTypesJson, which switches on the event-name autocompleter.
23
23
  --}}
24
24
  {{> ace_assets}}
25
- <script src="/static/js/ace/ext-language_tools.js"></script>
25
+ <script data-cfasync="false" src="/static/js/ace/ext-language_tools.js"></script>
26
26
 
27
27
  {{#if notificationTypesJson}}
28
28
  <input type="hidden" id="notificationTypesJson" value="{{notificationTypesJson}}">
@@ -50,7 +50,7 @@
50
50
  </div>
51
51
  {{/ui/modal}}
52
52
 
53
- <script nonce="{{cspNonce}}">
53
+ <script data-cfasync="false" nonce="{{cspNonce}}">
54
54
  document.addEventListener('DOMContentLoaded', () => {
55
55
 
56
56
  let scriptEnv = JSON.parse(document.getElementById('scriptEnvJson').value);
@@ -1,5 +1,5 @@
1
1
  <input type="hidden" id="wellKnownServices" value="{{wellKnownServices}}">
2
- <script nonce="{{cspNonce}}">
2
+ <script data-cfasync="false" nonce="{{cspNonce}}">
3
3
  document.addEventListener('DOMContentLoaded', () => {
4
4
  let wellKnownServices = JSON.parse(document.getElementById('wellKnownServices').value);
5
5
 
@@ -1,13 +1,20 @@
1
1
  {{!--
2
- The MCP access-level radio group, rendered identically by the OAuth consent prompt and the
3
- admin token generator so the two cannot drift on what each level promises. The options come
4
- from MCP_ACCESS_LEVEL_OPTIONS (lib/token-permission-view.js) through the accessOptions
5
- context value.
2
+ The radio group of one MCP access section (instance management or email access), rendered
3
+ identically by the OAuth consent prompt, the MCP config page's generator and the token form
4
+ so the three cannot drift on what each level promises. The options come from MCP_SECTIONS
5
+ (lib/token-permission-view.js), which also carries the pair list each level mints.
6
6
  Params:
7
- name - input name shared by the radio group (required)
8
- idPrefix - per-page prefix for the input ids (required)
9
- selected - the selected value (required; pass "read" for the static default)
7
+ section - the section object from MCP_SECTIONS (required)
8
+ name - input name shared by the radio group (required; the pages name it
9
+ <prefix><section key>, which is what static/js/ui.js reads back)
10
+ idPrefix - per-page prefix for the input ids; ids are <idPrefix>_<level> (required)
11
+ selected - the selected level (required)
12
+ includeNone - true to offer the section's decline option first (the consent prompt and the
13
+ generator; the token form declines a section by leaving its scope unticked)
10
14
  --}}
11
- {{#each accessOptions}}
12
- {{> ui/radio id=(concat ../idPrefix value) name=../name value=value label=label selected=../selected hint=hint}}
15
+ {{#if includeNone}}
16
+ {{> ui/radio id=(concat idPrefix "_none") name=name value="none" label=section.none.label selected=selected hint=section.none.hint}}
17
+ {{/if}}
18
+ {{#each section.levels}}
19
+ {{> ui/radio id=(concat ../idPrefix "_" value) name=../name value=value label=label selected=../selected hint=hint}}
13
20
  {{/each}}
@@ -1,19 +1,20 @@
1
1
  {{!--
2
- The "N of M MCP tools available" line, shown by every page that mints an mcp-scoped token so
3
- the three cannot disagree about what a credential will actually be offered. The counting rule
4
- is uiMcpToolCount() in static/js/ui.js - the browser's copy of toolVisibleTo(), pinned to it by
5
- test/mcp-tools-test.js. Reads mcpTools (and mcpAccessPresets, when auto-wired) from the
6
- page context.
2
+ The "N of M MCP tools available" line, shown by every page that mints an MCP token so the
3
+ three cannot disagree about what a credential will actually be offered. The counting rule is
4
+ uiMcpToolCount() in static/js/ui.js - the browser's copy of toolVisibleTo(), pinned to it by
5
+ test/mcp-tools-test.js. Reads mcpTools (and mcpSections, when auto-wired) from the page
6
+ context.
7
7
 
8
- Pass levelName to have ui.js drive the count from a named access level (the MCP config
9
- generator and the consent prompt); leave it out and the page repaints the element itself,
10
- which is what the access-token form does for its custom-permissions option.
8
+ Pass levelPrefix to have ui.js drive the count from the section radio groups named
9
+ <levelPrefix><section key> (the MCP config generator and the consent prompt); leave it out
10
+ and the page repaints the element itself, which is what the access-token form does.
11
11
  Params:
12
- id - element id (required; the page's own script needs it, and so does nothing else)
13
- levelName - the radio group name to follow, for the auto-wired pages (optional)
14
- accountId - id of the "limit to one account" field to follow (optional, with levelName)
15
- class - extra classes on the wrapper (optional)
12
+ id - element id (required; the page's own script needs it, and so does nothing else)
13
+ autoWire - true to let ui.js drive the count (optional)
14
+ levelPrefix - the radio group name prefix, with autoWire; may be empty (optional)
15
+ accountId - id of the "limit to one account" field to follow, with autoWire (optional)
16
+ class - extra classes on the wrapper (optional)
16
17
  --}}
17
18
  <div id="{{id}}" class="text-sm space-y-1{{#if class}} {{class}}{{/if}}" data-mcp-tools="{{json mcpTools}}"
18
- {{#if levelName}}data-mcp-level-name="{{levelName}}" data-mcp-account-id="{{accountId}}"
19
- data-mcp-presets="{{json mcpAccessPresets}}"{{/if}}></div>
19
+ {{#if autoWire}}data-mcp-auto-wire="1" data-mcp-level-prefix="{{levelPrefix}}" data-mcp-account-id="{{accountId}}"
20
+ data-mcp-sections="{{json mcpSections}}"{{/if}}></div>
@@ -983,7 +983,7 @@ open=values.skipScopes}}
983
983
 
984
984
  {{/ui/details}}
985
985
 
986
- <script nonce="{{cspNonce}}">
986
+ <script data-cfasync="false" nonce="{{cspNonce}}">
987
987
 
988
988
  document.addEventListener('DOMContentLoaded', () => {
989
989
 
@@ -1,4 +1,4 @@
1
- <script nonce="{{cspNonce}}">
1
+ <script data-cfasync="false" nonce="{{cspNonce}}">
2
2
  // Apply the theme before first paint to avoid a flash. Public-page twin of
3
3
  // theme_init.hbs with one extra source, a ?theme= query argument, so the
4
4
  // application that linked or redirected here can make these pages match its
@@ -61,7 +61,7 @@
61
61
  (ids included), so the ACE editor bootstrap lives here instead of per page. --}}
62
62
  {{> ace_assets}}
63
63
 
64
- <script nonce="{{cspNonce}}">
64
+ <script data-cfasync="false" nonce="{{cspNonce}}">
65
65
  document.addEventListener('DOMContentLoaded', () => {
66
66
 
67
67
  const editors = new Map();
@@ -1,4 +1,4 @@
1
- <script nonce="{{cspNonce}}">
1
+ <script data-cfasync="false" nonce="{{cspNonce}}">
2
2
  // Apply the stored theme before first paint to avoid a flash; when unset, the
3
3
  // stylesheet falls back to prefers-color-scheme. The "eeTheme" storage contract
4
4
  // is shared with the theme toggle in static/js/ui.js.
@@ -3,7 +3,7 @@
3
3
  configured target URL). --}}
4
4
  {{> filter_editor_js hasMap=true}}
5
5
 
6
- <script nonce="{{cspNonce}}">
6
+ <script data-cfasync="false" nonce="{{cspNonce}}">
7
7
  document.addEventListener('DOMContentLoaded', () => {
8
8
 
9
9
  const sendTestPayload = async () => {
@@ -73,4 +73,4 @@ subtitle="Every EmailEngine REST endpoint, generated from the same schemas the A
73
73
  </div>
74
74
 
75
75
  {{!-- deferred highlighting, sidebar filter and try-it runner; the page content itself is server-rendered --}}
76
- <script src="/static/js/reference.js" defer></script>
76
+ <script data-cfasync="false" src="/static/js/reference.js" defer></script>
@@ -13,7 +13,7 @@
13
13
  redirectMap is serialized by jsonForScript() in lib/api-reference/index.js, which escapes
14
14
  `<` so the literal cannot terminate this script element.
15
15
  --}}
16
- <script nonce="{{cspNonce}}">
16
+ <script data-cfasync="false" nonce="{{cspNonce}}">
17
17
  (() => {
18
18
  const map = {{{redirectMap}}};
19
19
  const fallback = '/admin/reference';
@@ -25,4 +25,4 @@
25
25
  {{/each}}
26
26
 
27
27
  {{!-- deferred highlighting, sidebar filter and try-it runner; the page content itself is server-rendered --}}
28
- <script src="/static/js/reference.js" defer></script>
28
+ <script data-cfasync="false" src="/static/js/reference.js" defer></script>
@@ -50,4 +50,4 @@ subtitle="Enables the Try it panels on the endpoint pages."}}
50
50
  {{/ui/card}}
51
51
 
52
52
  {{!-- deferred highlighting, sidebar filter and try-it runner; the page content itself is server-rendered --}}
53
- <script src="/static/js/reference.js" defer></script>
53
+ <script data-cfasync="false" src="/static/js/reference.js" defer></script>
@@ -131,7 +131,7 @@ fieldName="template" fieldValue=template.id submitLabel="Delete template"}}
131
131
  {{/ui/modal}}
132
132
 
133
133
  {{> ace_assets}}
134
- <script nonce="{{cspNonce}}">
134
+ <script data-cfasync="false" nonce="{{cspNonce}}">
135
135
  document.addEventListener('DOMContentLoaded', () => {
136
136
 
137
137
  function showAlert(title, content) {