@anthusai/papyrus 2.0.0-next.11 → 2.0.0-next.110
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/amplify/auth/resource.js +16 -1
- package/amplify/auth/resource.ts +19 -1
- package/amplify/data/function-handler.js +20 -0
- package/amplify/data/function-handler.ts +40 -0
- package/amplify/data/resource.js +152 -62
- package/amplify/data/resource.ts +158 -62
- package/amplify/data/schema.js +2101 -1987
- package/amplify/data/schema.ts +197 -70
- package/amplify/functions/assignment-action/data-access.js +2 -0
- package/amplify/functions/assignment-action/data-access.ts +2 -0
- package/amplify/functions/assignment-action/handler.ts +1 -1
- package/amplify/functions/automation-view/handler.py +17 -0
- package/amplify/functions/automation-view/resource.js +24 -0
- package/amplify/functions/automation-view/resource.ts +34 -0
- package/amplify/functions/automation-view/schema.js +26 -0
- package/amplify/functions/automation-view/schema.ts +28 -0
- package/amplify/functions/automation-view/wire.js +56 -0
- package/amplify/functions/automation-view/wire.ts +76 -0
- package/amplify/functions/content-actions/handler.py +64 -3
- package/amplify/functions/content-actions/requirements.txt +1 -0
- package/amplify/functions/content-actions/resource.js +1 -1
- package/amplify/functions/content-actions/resource.ts +1 -1
- package/amplify/functions/editorial-checks/handler.py +2 -2
- package/amplify/functions/editorial-checks/requirements.txt +1 -1
- package/amplify/functions/editorial-checks/resource.js +3 -3
- package/amplify/functions/editorial-checks/resource.ts +3 -3
- package/amplify/functions/editorial-checks/schema.js +38 -8
- package/amplify/functions/editorial-checks/schema.ts +38 -8
- package/amplify/functions/editorial-checks/wire.js +4 -0
- package/amplify/functions/editorial-checks/wire.ts +4 -0
- package/amplify/functions/monitoring-view/handler.py +11 -0
- package/amplify/functions/monitoring-view/resource.js +24 -0
- package/amplify/functions/monitoring-view/resource.ts +34 -0
- package/amplify/functions/monitoring-view/schema.js +29 -0
- package/amplify/functions/monitoring-view/schema.ts +31 -0
- package/amplify/functions/monitoring-view/wire.js +64 -0
- package/amplify/functions/monitoring-view/wire.ts +81 -0
- package/amplify/functions/public-forms/core.js +247 -0
- package/amplify/functions/public-forms/core.ts +310 -0
- package/amplify/functions/public-forms/handler.ts +41 -0
- package/amplify/functions/public-forms/origins.js +35 -0
- package/amplify/functions/public-forms/origins.ts +43 -0
- package/amplify/functions/public-forms/resource.js +9 -0
- package/amplify/functions/public-forms/resource.ts +10 -0
- package/amplify/functions/public-forms/wire.js +25 -0
- package/amplify/functions/public-forms/wire.ts +32 -0
- package/amplify/functions/shared/editorial-context.ts +63 -4
- package/amplify/functions/shared/python-bundle.js +20 -14
- package/amplify/functions/shared/python-bundle.ts +25 -18
- package/amplify/plugins/newsletter/config.js +245 -0
- package/amplify/plugins/newsletter/config.ts +305 -0
- package/amplify/plugins/newsletter/function/handler.py +6 -0
- package/amplify/plugins/newsletter/function/requirements.txt +5 -0
- package/amplify/plugins/newsletter/ops/handler.py +12 -0
- package/amplify/plugins/newsletter/ops/resource.js +27 -0
- package/amplify/plugins/newsletter/ops/resource.ts +37 -0
- package/amplify/plugins/newsletter/papyrus.plugin.js +263 -0
- package/amplify/plugins/newsletter/papyrus.plugin.ts +311 -0
- package/amplify/plugins/newsletter/schema.js +57 -0
- package/amplify/plugins/newsletter/schema.ts +62 -0
- package/amplify/plugins/newsletter/secure-string-parameter.js +107 -0
- package/amplify/plugins/newsletter/secure-string-parameter.ts +120 -0
- package/amplify/plugins/newsletter/sending.js +140 -0
- package/amplify/plugins/newsletter/sending.ts +186 -0
- package/amplify/plugins/reader-steering/config.js +182 -0
- package/amplify/plugins/reader-steering/config.ts +290 -0
- package/amplify/plugins/reader-steering/function/ai_moderation.py +246 -0
- package/amplify/plugins/reader-steering/function/handler.py +1589 -0
- package/amplify/plugins/reader-steering/function/moderation-prompt.md +27 -0
- package/amplify/plugins/reader-steering/function/moderation.py +316 -0
- package/amplify/plugins/reader-steering/function/proposals.py +487 -0
- package/amplify/plugins/reader-steering/function/resource.js +27 -0
- package/amplify/plugins/reader-steering/function/resource.ts +35 -0
- package/amplify/plugins/reader-steering/papyrus.plugin.js +187 -0
- package/amplify/plugins/reader-steering/papyrus.plugin.ts +213 -0
- package/amplify/plugins/reader-steering/schema.js +252 -0
- package/amplify/plugins/reader-steering/schema.ts +254 -0
- package/amplify/plugins/registry.js +4 -0
- package/amplify/plugins/registry.ts +4 -0
- package/amplify/plugins/signup/schema.js +2 -1
- package/amplify/plugins/signup/schema.ts +2 -1
- package/amplify/plugins/types.ts +5 -0
- package/amplify/plugins/wire.js +1 -0
- package/amplify/plugins/wire.ts +1 -0
- package/amplify/publication/projection-lease.js +30 -0
- package/amplify/publication/projection-lease.ts +39 -0
- package/amplify/publication/redirect-and-index.js +105 -0
- package/amplify/publication/redirect-rules.js +73 -0
- package/amplify/publication/redirect-rules.ts +93 -0
- package/amplify/publication/s3-projection.js +7 -1
- package/amplify/publication/s3-projection.ts +9 -1
- package/amplify/site-backend-config.js +19 -0
- package/amplify/site-backend-config.ts +45 -1
- package/amplify/site-backend-names.js +4 -2
- package/amplify/site-backend-names.ts +4 -2
- package/amplify/site-backend.js +42 -4
- package/amplify/site-backend.ts +45 -4
- package/app/.well-known/papyrus-cli.json/route.ts +9 -0
- package/app/api/auth/prospectus/sign-in/route.ts +4 -0
- package/app/api/newsletter/confirm/route.ts +13 -0
- package/app/api/newsletter/preferences/route.ts +13 -0
- package/app/api/newsletter/state/route.ts +9 -0
- package/app/api/newsletter/subscribe/route.ts +9 -0
- package/app/api/newsletter/unsubscribe/route.ts +13 -0
- package/app/api/newsroom/chat/[...path]/route.ts +17 -0
- package/app/api/newsroom/curation/context/route.ts +9 -0
- package/app/api/newsroom/curation/priming/route.ts +9 -0
- package/app/api/newsroom/curation/publication/route.ts +9 -0
- package/app/api/reader/comment/delete/route.ts +9 -0
- package/app/api/reader/comment/edit/route.ts +9 -0
- package/app/api/reader/comment/route.ts +9 -0
- package/app/api/reader/flag/route.ts +9 -0
- package/app/api/reader/handle/route.ts +9 -0
- package/app/api/reader/me/route.ts +9 -0
- package/app/api/reader/rating/route.ts +9 -0
- package/app/api/reader/report/route.ts +9 -0
- package/app/api/reader/retired/route.ts +9 -0
- package/app/api/reader/submit/route.ts +9 -0
- package/app/api/reader/vote/route.ts +9 -0
- package/app/layout.tsx +5 -1
- package/bin/papyrus-infra.mjs +20 -1
- package/components/automation-panel.tsx +49 -0
- package/components/automation-run-now.tsx +97 -0
- package/components/automation-view.tsx +195 -0
- package/components/editorial-checks-admin-panel.tsx +32 -17
- package/components/moderation-panel.tsx +248 -0
- package/components/monitoring-overview-view.tsx +422 -0
- package/components/monitoring-panel.tsx +60 -0
- package/components/news-desk-client-provider.tsx +18 -18
- package/components/news-desk-taxonomy-client.ts +28 -8
- package/components/newsletter-panel.tsx +474 -0
- package/components/newsletter-sections.tsx +163 -0
- package/components/newsroom-access-gate.tsx +16 -2
- package/components/newsroom-article-editor.tsx +9 -7
- package/components/newsroom-articles-view.tsx +6 -6
- package/components/newsroom-assignment-detail.tsx +6 -6
- package/components/newsroom-board-view.tsx +8 -3
- package/components/newsroom-curation-bootstrap.tsx +45 -0
- package/components/newsroom-ops-overview.tsx +26 -96
- package/components/newsroom-ops-shell.tsx +2 -2
- package/components/newsroom-organizer.css +33 -0
- package/components/newsroom-overview-skeleton.tsx +25 -0
- package/components/newsroom-references-view.tsx +192 -49
- package/components/notification-center.tsx +281 -0
- package/components/papyrus-console-conversation.css +14 -0
- package/components/papyrus-console-conversation.tsx +55 -0
- package/components/papyrus-console-shell.tsx +62 -420
- package/components/papyrus-private-chat-panel.tsx +134 -0
- package/components/publication-cyclotron-panel.tsx +15 -10
- package/components/reader-auth-state.ts +1 -1
- package/components/reference-add-entry.tsx +75 -0
- package/components/reference-curation-controls.tsx +31 -22
- package/components/reference-cyclotron-priming.tsx +58 -19
- package/components/reference-cyclotron-suggestion.tsx +10 -6
- package/components/reference-priming.tsx +14 -10
- package/components/reference-relevance-review.tsx +3 -3
- package/components/reference-section-suggestion.tsx +1 -1
- package/components/topic-steering-workspace.tsx +230 -144
- package/infra/amplify-app-shell.js +96 -16
- package/infra/amplify-app-shell.ts +108 -18
- package/infra/cloud-email-config.js +32 -0
- package/infra/cloud-email-config.ts +39 -0
- package/infra/cloud-email.js +57 -0
- package/infra/cloud-email.test.js +69 -0
- package/infra/cloud-email.test.ts +66 -0
- package/infra/cloud-email.ts +60 -0
- package/infra/index.js +1 -0
- package/infra/secure-string-parameter-handler.js +41 -0
- package/infra/secure-string-parameter-handler.ts +41 -0
- package/infra/secure-string-parameter.js +79 -0
- package/infra/secure-string-parameter.ts +91 -0
- package/infra/site-config.js +92 -6
- package/infra/site-config.ts +138 -6
- package/lib/automation-client.ts +54 -0
- package/lib/automation-fixture.ts +93 -0
- package/lib/automation-overview.ts +252 -0
- package/lib/category-repository.ts +14 -12
- package/lib/cli-login-discovery.ts +78 -0
- package/lib/console-web-context.ts +1 -1
- package/lib/curation-routes.ts +345 -0
- package/lib/cyclotron-suggestions.ts +4 -4
- package/lib/editorial-checks-client.ts +18 -0
- package/lib/editorial-checks-demo.ts +1 -1
- package/lib/editorial-checks.ts +8 -4
- package/lib/editorial-preview.ts +5 -5
- package/lib/monitoring-client.ts +83 -0
- package/lib/monitoring-overview-fixture.ts +51 -0
- package/lib/monitoring-overview.ts +191 -0
- package/lib/news-desk-session.ts +12 -21
- package/lib/newsletter-api.ts +418 -0
- package/lib/newsletter-client.ts +46 -0
- package/lib/newsletter-fixture.ts +184 -0
- package/lib/newsletter-model.ts +202 -0
- package/lib/newsroom-demo-dashboard.ts +1 -1
- package/lib/newsroom-nav.ts +1 -1
- package/lib/newsroom-organizer-nav.ts +2 -1
- package/lib/papyrus-chat-admission.ts +65 -0
- package/lib/papyrus-hosted-chat.ts +217 -0
- package/lib/papyrus-private-chat-client.ts +81 -0
- package/lib/prospectus-session.ts +30 -14
- package/lib/prospectus-sign-in-routes.ts +106 -31
- package/lib/prospectus-site-identity.ts +46 -6
- package/lib/reader-api.ts +145 -0
- package/lib/reader-moderation.ts +220 -0
- package/lib/reader-retirement-route.ts +89 -0
- package/lib/reader-subject.md +29 -0
- package/lib/reader-subject.ts +53 -0
- package/lib/reference-review-details.ts +71 -0
- package/lib/reference-review-request.ts +14 -0
- package/lib/relevance-decisions.ts +42 -10
- package/lib/relevance-status.ts +2 -2
- package/lib/review-client.ts +120 -0
- package/lib/review-fixture.ts +45 -0
- package/lib/review-requests.ts +246 -0
- package/lib/semantic-graph.ts +2 -0
- package/lib/shared-chat-admission.ts +182 -0
- package/lib/site-brand-tenant.ts +11 -6
- package/lib/site-brand.ts +6 -3
- package/lib/site-origin-value.ts +50 -0
- package/lib/site-origin.ts +8 -0
- package/lib/use-reference-review-data.ts +44 -0
- package/middleware.ts +14 -3
- package/package.json +67 -3
- package/routes.manifest.json +238 -2
- package/src/sync.mjs +11 -2
- package/src/with-papyrus.d.mts +1 -0
- package/src/with-papyrus.mjs +17 -1
package/routes.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.0.0-next.
|
|
2
|
+
"version": "2.0.0-next.110",
|
|
3
3
|
"routes": [
|
|
4
4
|
{
|
|
5
5
|
"file": "app/%5F_preview/[[...path]]/route.ts",
|
|
@@ -11,6 +11,17 @@
|
|
|
11
11
|
"dynamic": "\"force-dynamic\""
|
|
12
12
|
}
|
|
13
13
|
},
|
|
14
|
+
{
|
|
15
|
+
"file": "app/.well-known/papyrus-cli.json/route.ts",
|
|
16
|
+
"hasDefault": false,
|
|
17
|
+
"exports": [
|
|
18
|
+
"GET"
|
|
19
|
+
],
|
|
20
|
+
"config": {
|
|
21
|
+
"dynamic": "\"force-dynamic\"",
|
|
22
|
+
"runtime": "\"nodejs\""
|
|
23
|
+
}
|
|
24
|
+
},
|
|
14
25
|
{
|
|
15
26
|
"file": "app/[year]/[month]/[day]/[articleSlug]/page.tsx",
|
|
16
27
|
"reader": true,
|
|
@@ -114,7 +125,8 @@
|
|
|
114
125
|
"file": "app/api/auth/prospectus/sign-in/route.ts",
|
|
115
126
|
"hasDefault": false,
|
|
116
127
|
"exports": [
|
|
117
|
-
"GET"
|
|
128
|
+
"GET",
|
|
129
|
+
"POST"
|
|
118
130
|
],
|
|
119
131
|
"config": {
|
|
120
132
|
"dynamic": "\"force-dynamic\"",
|
|
@@ -170,6 +182,230 @@
|
|
|
170
182
|
"dynamic": "\"force-dynamic\""
|
|
171
183
|
}
|
|
172
184
|
},
|
|
185
|
+
{
|
|
186
|
+
"file": "app/api/newsletter/confirm/route.ts",
|
|
187
|
+
"hasDefault": false,
|
|
188
|
+
"exports": [
|
|
189
|
+
"GET",
|
|
190
|
+
"POST"
|
|
191
|
+
],
|
|
192
|
+
"config": {
|
|
193
|
+
"dynamic": "\"force-dynamic\"",
|
|
194
|
+
"runtime": "\"nodejs\""
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"file": "app/api/newsletter/preferences/route.ts",
|
|
199
|
+
"hasDefault": false,
|
|
200
|
+
"exports": [
|
|
201
|
+
"GET",
|
|
202
|
+
"POST"
|
|
203
|
+
],
|
|
204
|
+
"config": {
|
|
205
|
+
"dynamic": "\"force-dynamic\"",
|
|
206
|
+
"runtime": "\"nodejs\""
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"file": "app/api/newsletter/state/route.ts",
|
|
211
|
+
"hasDefault": false,
|
|
212
|
+
"exports": [
|
|
213
|
+
"GET"
|
|
214
|
+
],
|
|
215
|
+
"config": {
|
|
216
|
+
"dynamic": "\"force-dynamic\"",
|
|
217
|
+
"runtime": "\"nodejs\""
|
|
218
|
+
}
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
"file": "app/api/newsletter/subscribe/route.ts",
|
|
222
|
+
"hasDefault": false,
|
|
223
|
+
"exports": [
|
|
224
|
+
"POST"
|
|
225
|
+
],
|
|
226
|
+
"config": {
|
|
227
|
+
"dynamic": "\"force-dynamic\"",
|
|
228
|
+
"runtime": "\"nodejs\""
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"file": "app/api/newsletter/unsubscribe/route.ts",
|
|
233
|
+
"hasDefault": false,
|
|
234
|
+
"exports": [
|
|
235
|
+
"GET",
|
|
236
|
+
"POST"
|
|
237
|
+
],
|
|
238
|
+
"config": {
|
|
239
|
+
"dynamic": "\"force-dynamic\"",
|
|
240
|
+
"runtime": "\"nodejs\""
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"file": "app/api/newsroom/chat/[...path]/route.ts",
|
|
245
|
+
"hasDefault": false,
|
|
246
|
+
"exports": [
|
|
247
|
+
"GET",
|
|
248
|
+
"POST"
|
|
249
|
+
],
|
|
250
|
+
"config": {
|
|
251
|
+
"dynamic": "\"force-dynamic\"",
|
|
252
|
+
"runtime": "\"nodejs\""
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"file": "app/api/newsroom/curation/context/route.ts",
|
|
257
|
+
"hasDefault": false,
|
|
258
|
+
"exports": [
|
|
259
|
+
"GET"
|
|
260
|
+
],
|
|
261
|
+
"config": {
|
|
262
|
+
"dynamic": "\"force-dynamic\"",
|
|
263
|
+
"runtime": "\"nodejs\""
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"file": "app/api/newsroom/curation/priming/route.ts",
|
|
268
|
+
"hasDefault": false,
|
|
269
|
+
"exports": [
|
|
270
|
+
"POST"
|
|
271
|
+
],
|
|
272
|
+
"config": {
|
|
273
|
+
"dynamic": "\"force-dynamic\"",
|
|
274
|
+
"runtime": "\"nodejs\""
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
"file": "app/api/newsroom/curation/publication/route.ts",
|
|
279
|
+
"hasDefault": false,
|
|
280
|
+
"exports": [
|
|
281
|
+
"POST"
|
|
282
|
+
],
|
|
283
|
+
"config": {
|
|
284
|
+
"dynamic": "\"force-dynamic\"",
|
|
285
|
+
"runtime": "\"nodejs\""
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"file": "app/api/reader/comment/delete/route.ts",
|
|
290
|
+
"hasDefault": false,
|
|
291
|
+
"exports": [
|
|
292
|
+
"POST"
|
|
293
|
+
],
|
|
294
|
+
"config": {
|
|
295
|
+
"dynamic": "\"force-dynamic\"",
|
|
296
|
+
"runtime": "\"nodejs\""
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"file": "app/api/reader/comment/edit/route.ts",
|
|
301
|
+
"hasDefault": false,
|
|
302
|
+
"exports": [
|
|
303
|
+
"POST"
|
|
304
|
+
],
|
|
305
|
+
"config": {
|
|
306
|
+
"dynamic": "\"force-dynamic\"",
|
|
307
|
+
"runtime": "\"nodejs\""
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"file": "app/api/reader/comment/route.ts",
|
|
312
|
+
"hasDefault": false,
|
|
313
|
+
"exports": [
|
|
314
|
+
"POST"
|
|
315
|
+
],
|
|
316
|
+
"config": {
|
|
317
|
+
"dynamic": "\"force-dynamic\"",
|
|
318
|
+
"runtime": "\"nodejs\""
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"file": "app/api/reader/flag/route.ts",
|
|
323
|
+
"hasDefault": false,
|
|
324
|
+
"exports": [
|
|
325
|
+
"POST"
|
|
326
|
+
],
|
|
327
|
+
"config": {
|
|
328
|
+
"dynamic": "\"force-dynamic\"",
|
|
329
|
+
"runtime": "\"nodejs\""
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
"file": "app/api/reader/handle/route.ts",
|
|
334
|
+
"hasDefault": false,
|
|
335
|
+
"exports": [
|
|
336
|
+
"POST"
|
|
337
|
+
],
|
|
338
|
+
"config": {
|
|
339
|
+
"dynamic": "\"force-dynamic\"",
|
|
340
|
+
"runtime": "\"nodejs\""
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
"file": "app/api/reader/me/route.ts",
|
|
345
|
+
"hasDefault": false,
|
|
346
|
+
"exports": [
|
|
347
|
+
"GET"
|
|
348
|
+
],
|
|
349
|
+
"config": {
|
|
350
|
+
"dynamic": "\"force-dynamic\"",
|
|
351
|
+
"runtime": "\"nodejs\""
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"file": "app/api/reader/rating/route.ts",
|
|
356
|
+
"hasDefault": false,
|
|
357
|
+
"exports": [
|
|
358
|
+
"POST"
|
|
359
|
+
],
|
|
360
|
+
"config": {
|
|
361
|
+
"dynamic": "\"force-dynamic\"",
|
|
362
|
+
"runtime": "\"nodejs\""
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"file": "app/api/reader/report/route.ts",
|
|
367
|
+
"hasDefault": false,
|
|
368
|
+
"exports": [
|
|
369
|
+
"POST"
|
|
370
|
+
],
|
|
371
|
+
"config": {
|
|
372
|
+
"dynamic": "\"force-dynamic\"",
|
|
373
|
+
"runtime": "\"nodejs\""
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
"file": "app/api/reader/retired/route.ts",
|
|
378
|
+
"hasDefault": false,
|
|
379
|
+
"exports": [
|
|
380
|
+
"GET"
|
|
381
|
+
],
|
|
382
|
+
"config": {
|
|
383
|
+
"dynamic": "\"force-dynamic\"",
|
|
384
|
+
"runtime": "\"nodejs\""
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"file": "app/api/reader/submit/route.ts",
|
|
389
|
+
"hasDefault": false,
|
|
390
|
+
"exports": [
|
|
391
|
+
"POST"
|
|
392
|
+
],
|
|
393
|
+
"config": {
|
|
394
|
+
"dynamic": "\"force-dynamic\"",
|
|
395
|
+
"runtime": "\"nodejs\""
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"file": "app/api/reader/vote/route.ts",
|
|
400
|
+
"hasDefault": false,
|
|
401
|
+
"exports": [
|
|
402
|
+
"POST"
|
|
403
|
+
],
|
|
404
|
+
"config": {
|
|
405
|
+
"dynamic": "\"force-dynamic\"",
|
|
406
|
+
"runtime": "\"nodejs\""
|
|
407
|
+
}
|
|
408
|
+
},
|
|
173
409
|
{
|
|
174
410
|
"file": "app/api/revalidate/route.ts",
|
|
175
411
|
"hasDefault": false,
|
package/src/sync.mjs
CHANGED
|
@@ -37,6 +37,15 @@ function shimFor(route) {
|
|
|
37
37
|
return lines.join("\n") + "\n";
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
/** Anchored .gitignore line for a literal path; escapes gitignore metacharacters (Next dynamic routes use [ ]). */
|
|
41
|
+
export function gitignoreEntry(rel) {
|
|
42
|
+
const escaped = rel
|
|
43
|
+
.replace(/[\\[\]*?]/g, "\\$&")
|
|
44
|
+
.replace(/^[#!]/, "\\$&")
|
|
45
|
+
.replace(/ +$/, (m) => m.replace(/ /g, "\\ "));
|
|
46
|
+
return "/" + escaped;
|
|
47
|
+
}
|
|
48
|
+
|
|
40
49
|
export function middlewareShim(manifest) {
|
|
41
50
|
const matcher = manifest.middleware.matcher ?? '["/((?!_next/static|_next/image|favicon.ico|icon).*)"]';
|
|
42
51
|
return [
|
|
@@ -101,9 +110,9 @@ export function sync({ root = process.cwd(), log = console.log, manifest: manife
|
|
|
101
110
|
// Keep generated shims out of git.
|
|
102
111
|
const giFile = path.join(root, ".gitignore");
|
|
103
112
|
const gi = fs.existsSync(giFile) ? fs.readFileSync(giFile, "utf8") : "";
|
|
104
|
-
const block = [GITIGNORE_BEGIN, ...generated.map(
|
|
113
|
+
const block = [GITIGNORE_BEGIN, ...generated.map(gitignoreEntry), "/.papyrus/", GITIGNORE_END].join("\n");
|
|
105
114
|
const re = new RegExp(`${GITIGNORE_BEGIN.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}[\\s\\S]*?${GITIGNORE_END}`);
|
|
106
|
-
fs.writeFileSync(giFile, re.test(gi) ? gi.replace(re, block) : `${gi}${gi.endsWith("\n") || !gi ? "" : "\n"}${block}\n`);
|
|
115
|
+
fs.writeFileSync(giFile, re.test(gi) ? gi.replace(re, () => block) : `${gi}${gi.endsWith("\n") || !gi ? "" : "\n"}${block}\n`);
|
|
107
116
|
|
|
108
117
|
log(`papyrus-app sync: ${generated.length} shim(s) written, ${skipped.length} site-owned file(s) kept (${PKG}@${manifest.version})${readerBasePath ? `, reader mounted at ${readerBasePath}` : ""}`);
|
|
109
118
|
for (const rel of skipped) log(` site-owned: ${rel}`);
|
package/src/with-papyrus.d.mts
CHANGED
package/src/with-papyrus.mjs
CHANGED
|
@@ -50,12 +50,24 @@ export function staticGenerationSettings() {
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
export const DEFAULT_TRANSPILE_PACKAGES = ["@anthusai/papyrus", "cyclotron"];
|
|
53
|
+
export const DEFAULT_TRANSPILE_PACKAGES = ["@anthusai/papyrus", "cyclotron", "chatticus", "lucide-react"];
|
|
54
54
|
|
|
55
55
|
export function mergeTranspilePackages(existing = []) {
|
|
56
56
|
return [...new Set([...existing, ...DEFAULT_TRANSPILE_PACKAGES])];
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
+
/**
|
|
60
|
+
* chatticus's prebuilt chat runtime is written against zod 4 (`z.looseObject`) and imports bare `zod`.
|
|
61
|
+
* Publication repos pin zod 3.25 through a root `overrides` entry (Amplify constructs need it), which
|
|
62
|
+
* also flattens chatticus's own zod 4 dependency, so the bundle then fails to build. zod 3.25 ships the
|
|
63
|
+
* zod 4 API at `zod/v4`; point only chatticus's `zod` imports there, leaving every other zod import alone.
|
|
64
|
+
*/
|
|
65
|
+
export const CHATTICUS_PACKAGE_PATH = /[\\/]node_modules[\\/]chatticus[\\/]/;
|
|
66
|
+
|
|
67
|
+
export function redirectChatticusZod(resource) {
|
|
68
|
+
if (resource.request === "zod" && CHATTICUS_PACKAGE_PATH.test(resource.context ?? "")) resource.request = "zod/v4";
|
|
69
|
+
}
|
|
70
|
+
|
|
59
71
|
export const RUNTIME_TRACED_FILES = ["./corpora/**/*", "./amplify_outputs.json"];
|
|
60
72
|
|
|
61
73
|
export function mergeOutputFileTracingIncludes(existing = {}) {
|
|
@@ -99,6 +111,10 @@ export function withPapyrus(nextConfig = {}, options = {}) {
|
|
|
99
111
|
},
|
|
100
112
|
webpack(config, context) {
|
|
101
113
|
config.resolve.alias = { ...config.resolve.alias, ...aliases };
|
|
114
|
+
config.plugins = [
|
|
115
|
+
...(config.plugins ?? []),
|
|
116
|
+
new context.webpack.NormalModuleReplacementPlugin(/^zod$/, redirectChatticusZod),
|
|
117
|
+
];
|
|
102
118
|
return typeof nextConfig.webpack === "function" ? nextConfig.webpack(config, context) : config;
|
|
103
119
|
},
|
|
104
120
|
};
|