blogwright-analytics 0.4.0-beta.2 → 0.4.0-beta.4

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 (113) hide show
  1. package/README.md +103 -10
  2. package/dist/adapters/transform-diagnostics.d.ts +4 -0
  3. package/dist/adapters/transform-diagnostics.js +4 -0
  4. package/dist/app/_app/immutable/assets/0.BfwUqNJ-.css +1 -0
  5. package/dist/app/_app/immutable/assets/2.lkfjnM1s.css +1 -0
  6. package/dist/app/_app/immutable/assets/DefaultTooltip.CXdtNw-m.css +1 -0
  7. package/dist/app/_app/immutable/assets/Tooltip.BsTJVNOF.css +1 -0
  8. package/dist/app/_app/immutable/chunks/4DYKm5b2.js +1 -0
  9. package/dist/app/_app/immutable/chunks/B6Dt35mA.js +1 -0
  10. package/dist/app/_app/immutable/chunks/BAneOF1f.js +1 -0
  11. package/dist/app/_app/immutable/chunks/BQHoVMm0.js +1 -0
  12. package/dist/app/_app/immutable/chunks/{Doz7YX1W.js → BUku_rSO.js} +1 -1
  13. package/dist/app/_app/immutable/chunks/BoX17NrM.js +1 -0
  14. package/dist/app/_app/immutable/chunks/{vDgBJUjM.js → BpoiI2_d.js} +1 -1
  15. package/dist/app/_app/immutable/chunks/Bsj_2e-_.js +1 -0
  16. package/dist/app/_app/immutable/chunks/{-aNGNaBT.js → BumHYZmq.js} +1 -1
  17. package/dist/app/_app/immutable/chunks/{BJngAqxk.js → C0tbX_qQ.js} +1 -1
  18. package/dist/app/_app/immutable/chunks/C7qhOD3U.js +1 -0
  19. package/dist/app/_app/immutable/chunks/C8TrOru6.js +1 -0
  20. package/dist/app/_app/immutable/chunks/{DJc8C0NK.js → CAgm0Ruv.js} +1 -1
  21. package/dist/app/_app/immutable/chunks/CSrT-PUe.js +1 -0
  22. package/dist/app/_app/immutable/chunks/CU11V7_a.js +1 -0
  23. package/dist/app/_app/immutable/chunks/CdRe9NtS.js +1 -0
  24. package/dist/app/_app/immutable/chunks/Ch6MextH.js +1 -0
  25. package/dist/app/_app/immutable/chunks/{DCkHk5n_.js → Cr8mHXFf.js} +1 -1
  26. package/dist/app/_app/immutable/chunks/CuOP1eLc.js +2 -0
  27. package/dist/app/_app/immutable/chunks/{Bc-53cml.js → CwPKxnpy.js} +1 -1
  28. package/dist/app/_app/immutable/chunks/{FH_3TS2H.js → Cz3xtWLM.js} +1 -1
  29. package/dist/app/_app/immutable/chunks/D26njVw7.js +5 -0
  30. package/dist/app/_app/immutable/chunks/D6rPBWFd.js +1 -0
  31. package/dist/app/_app/immutable/chunks/D8dq3MNd.js +1 -0
  32. package/dist/app/_app/immutable/chunks/DOqi3Wfa.js +1 -0
  33. package/dist/app/_app/immutable/chunks/DRQZHPoe.js +1 -0
  34. package/dist/app/_app/immutable/chunks/DUJFqVVs.js +1 -0
  35. package/dist/app/_app/immutable/chunks/DVCZGvXq.js +3 -0
  36. package/dist/app/_app/immutable/chunks/Dco3y1p7.js +1 -0
  37. package/dist/app/_app/immutable/chunks/DmKBckYv.js +1 -0
  38. package/dist/app/_app/immutable/chunks/DnQEoGed.js +1 -0
  39. package/dist/app/_app/immutable/chunks/DoNmKjPy.js +1 -0
  40. package/dist/app/_app/immutable/chunks/DodcabfQ.js +1 -0
  41. package/dist/app/_app/immutable/chunks/DugTr35P.js +1 -0
  42. package/dist/app/_app/immutable/chunks/{xIq_fFFM.js → RBkNRIpl.js} +1 -1
  43. package/dist/app/_app/immutable/chunks/{DKMlMI4a.js → Sb-KFJGv.js} +1 -1
  44. package/dist/app/_app/immutable/chunks/XoU76ysy.js +1 -0
  45. package/dist/app/_app/immutable/chunks/imr7FUlI.js +15 -0
  46. package/dist/app/_app/immutable/chunks/{Dh958be7.js → xefVn_UF.js} +1 -1
  47. package/dist/app/_app/immutable/entry/app.w1HyN1Pe.js +2 -0
  48. package/dist/app/_app/immutable/entry/start.Iz8smxW0.js +1 -0
  49. package/dist/app/_app/immutable/nodes/0.BjQeslHk.js +1 -0
  50. package/dist/app/_app/immutable/nodes/1.DfqY5csg.js +1 -0
  51. package/dist/app/_app/immutable/nodes/2.CByBWAMF.js +10 -0
  52. package/dist/app/_app/version.json +1 -1
  53. package/dist/app/index.html +40 -36
  54. package/dist/aws/firehose.d.ts +32 -1
  55. package/dist/aws/firehose.js +11 -0
  56. package/dist/commands.js +1 -1
  57. package/dist/nodes.d.ts +65 -18
  58. package/dist/nodes.js +378 -58
  59. package/dist/path-filter.d.ts +4 -0
  60. package/dist/path-filter.js +34 -0
  61. package/dist/plugin.d.ts +2 -2
  62. package/dist/plugin.js +2 -2
  63. package/dist/queries.d.ts +16 -7
  64. package/dist/queries.js +82 -12
  65. package/dist/reporting-range.d.ts +53 -0
  66. package/dist/reporting-range.js +57 -0
  67. package/dist/server.js +47 -5
  68. package/dist/traffic-breakdown.d.ts +2 -0
  69. package/dist/traffic-breakdown.js +15 -0
  70. package/dist/transform/diagnostics.d.ts +17 -0
  71. package/dist/transform/diagnostics.js +1 -0
  72. package/dist/transform/handler.d.ts +6 -5
  73. package/dist/transform/handler.js +34 -11
  74. package/dist/transform-bundle/index.mjs +53 -13
  75. package/dist/transform-bundle/transform-manifest.json +2 -2
  76. package/dist/view-granularity.d.ts +27 -0
  77. package/dist/view-granularity.js +18 -0
  78. package/package.json +12 -3
  79. package/dist/app/_app/immutable/assets/0.BTQrrh5B.css +0 -1
  80. package/dist/app/_app/immutable/assets/2.DoCaRy3T.css +0 -1
  81. package/dist/app/_app/immutable/assets/DefaultTooltip.BXd66MzC.css +0 -1
  82. package/dist/app/_app/immutable/chunks/1aEdY044.js +0 -15
  83. package/dist/app/_app/immutable/chunks/B3vZDoek.js +0 -1
  84. package/dist/app/_app/immutable/chunks/B5KRA4hC.js +0 -1
  85. package/dist/app/_app/immutable/chunks/BC0iYSWx.js +0 -2
  86. package/dist/app/_app/immutable/chunks/BZrG8lR6.js +0 -5
  87. package/dist/app/_app/immutable/chunks/Bd1gDe3Y.js +0 -1
  88. package/dist/app/_app/immutable/chunks/Bkszif4s.js +0 -1
  89. package/dist/app/_app/immutable/chunks/BnKf2MvA.js +0 -1
  90. package/dist/app/_app/immutable/chunks/CKcppAud.js +0 -1
  91. package/dist/app/_app/immutable/chunks/CRTcXoMo.js +0 -1
  92. package/dist/app/_app/immutable/chunks/CvyVA_jC.js +0 -1
  93. package/dist/app/_app/immutable/chunks/CxBzrV8P.js +0 -1
  94. package/dist/app/_app/immutable/chunks/CyCGwyzf.js +0 -1
  95. package/dist/app/_app/immutable/chunks/D-mRKj3n.js +0 -1
  96. package/dist/app/_app/immutable/chunks/D0Ty6LN0.js +0 -1
  97. package/dist/app/_app/immutable/chunks/D2BnX0Uk.js +0 -3
  98. package/dist/app/_app/immutable/chunks/DBwYG1VY.js +0 -1
  99. package/dist/app/_app/immutable/chunks/DMoYijy0.js +0 -1
  100. package/dist/app/_app/immutable/chunks/DRmJpyQa.js +0 -1
  101. package/dist/app/_app/immutable/chunks/DVXZkpbf.js +0 -1
  102. package/dist/app/_app/immutable/chunks/DorUkkYD.js +0 -1
  103. package/dist/app/_app/immutable/chunks/DtuTIrAM.js +0 -1
  104. package/dist/app/_app/immutable/chunks/V9ZjaxiY.js +0 -1
  105. package/dist/app/_app/immutable/chunks/ZvRY-WVy.js +0 -1
  106. package/dist/app/_app/immutable/chunks/caXkbKD3.js +0 -1
  107. package/dist/app/_app/immutable/chunks/oNmA_rTI.js +0 -1
  108. package/dist/app/_app/immutable/chunks/yT96EWBw.js +0 -1
  109. package/dist/app/_app/immutable/entry/app.cy9eKSTf.js +0 -2
  110. package/dist/app/_app/immutable/entry/start.B2ycr8Ji.js +0 -1
  111. package/dist/app/_app/immutable/nodes/0.UTMEigHJ.js +0 -1
  112. package/dist/app/_app/immutable/nodes/1.CMX4YrAG.js +0 -1
  113. package/dist/app/_app/immutable/nodes/2.CQMIFodk.js +0 -6
@@ -1 +1 @@
1
- {"version":"1788197150274"}
1
+ {"version":"1788644015180"}
@@ -6,72 +6,76 @@
6
6
  <!-- A dashboard bound to loopback has no icon to serve; an empty data URL
7
7
  answers the browser's request without a round trip that would 404. -->
8
8
  <link rel="icon" href="data:," />
9
- <link href="./_app/immutable/entry/start.B2ycr8Ji.js" rel="modulepreload">
10
- <link href="./_app/immutable/chunks/FH_3TS2H.js" rel="modulepreload">
11
- <link href="./_app/immutable/chunks/D2BnX0Uk.js" rel="modulepreload">
12
- <link href="./_app/immutable/chunks/B3vZDoek.js" rel="modulepreload">
13
- <link href="./_app/immutable/entry/app.cy9eKSTf.js" rel="modulepreload">
9
+ <link href="./_app/immutable/entry/start.Iz8smxW0.js" rel="modulepreload">
10
+ <link href="./_app/immutable/chunks/Cz3xtWLM.js" rel="modulepreload">
11
+ <link href="./_app/immutable/chunks/DVCZGvXq.js" rel="modulepreload">
12
+ <link href="./_app/immutable/chunks/DUJFqVVs.js" rel="modulepreload">
13
+ <link href="./_app/immutable/entry/app.w1HyN1Pe.js" rel="modulepreload">
14
14
  <link href="./_app/immutable/chunks/HclGiUj8.js" rel="modulepreload">
15
15
  <link href="./_app/immutable/chunks/xihTtKlq.js" rel="modulepreload">
16
- <link href="./_app/immutable/nodes/0.UTMEigHJ.js" rel="modulepreload">
17
- <link href="./_app/immutable/nodes/2.CQMIFodk.js" rel="modulepreload">
18
- <link href="./_app/immutable/chunks/Bd1gDe3Y.js" rel="modulepreload">
19
- <link href="./_app/immutable/chunks/Doz7YX1W.js" rel="modulepreload">
20
- <link href="./_app/immutable/chunks/CyCGwyzf.js" rel="modulepreload">
21
- <link href="./_app/immutable/chunks/ZvRY-WVy.js" rel="modulepreload">
22
- <link href="./_app/immutable/chunks/DKMlMI4a.js" rel="modulepreload">
23
- <link href="./_app/immutable/chunks/Dh958be7.js" rel="modulepreload">
24
- <link href="./_app/immutable/chunks/CvyVA_jC.js" rel="modulepreload">
25
- <link href="./_app/immutable/chunks/caXkbKD3.js" rel="modulepreload">
16
+ <link href="./_app/immutable/nodes/0.BjQeslHk.js" rel="modulepreload">
17
+ <link href="./_app/immutable/nodes/2.CByBWAMF.js" rel="modulepreload">
18
+ <link href="./_app/immutable/chunks/DmKBckYv.js" rel="modulepreload">
19
+ <link href="./_app/immutable/chunks/BUku_rSO.js" rel="modulepreload">
20
+ <link href="./_app/immutable/chunks/D6rPBWFd.js" rel="modulepreload">
21
+ <link href="./_app/immutable/chunks/Y5urAfNy.js" rel="modulepreload">
22
+ <link href="./_app/immutable/chunks/Sb-KFJGv.js" rel="modulepreload">
23
+ <link href="./_app/immutable/chunks/xefVn_UF.js" rel="modulepreload">
24
+ <link href="./_app/immutable/chunks/BQHoVMm0.js" rel="modulepreload">
25
+ <link href="./_app/immutable/chunks/BAneOF1f.js" rel="modulepreload">
26
+ <link href="./_app/immutable/chunks/DRQZHPoe.js" rel="modulepreload">
26
27
  <link href="./_app/immutable/chunks/C58PZtCD.js" rel="modulepreload">
27
- <link href="./_app/immutable/chunks/DJc8C0NK.js" rel="modulepreload">
28
+ <link href="./_app/immutable/chunks/CuOP1eLc.js" rel="modulepreload">
29
+ <link href="./_app/immutable/chunks/CAgm0Ruv.js" rel="modulepreload">
28
30
  <link href="./_app/immutable/chunks/Db0q5_zr.js" rel="modulepreload">
29
31
  <link href="./_app/immutable/chunks/CCch3uox.js" rel="modulepreload">
30
- <link href="./_app/immutable/chunks/V9ZjaxiY.js" rel="modulepreload">
32
+ <link href="./_app/immutable/chunks/C7qhOD3U.js" rel="modulepreload">
31
33
  <link href="./_app/immutable/chunks/BID1NNRh.js" rel="modulepreload">
32
- <link href="./_app/immutable/chunks/-aNGNaBT.js" rel="modulepreload">
34
+ <link href="./_app/immutable/chunks/BumHYZmq.js" rel="modulepreload">
33
35
  <link href="./_app/immutable/chunks/RobXhXPM.js" rel="modulepreload">
34
36
  <link href="./_app/immutable/chunks/Dfvzj6n2.js" rel="modulepreload">
35
- <link href="./_app/immutable/chunks/xIq_fFFM.js" rel="modulepreload">
36
- <link href="./_app/immutable/chunks/BZrG8lR6.js" rel="modulepreload">
37
- <link href="./_app/immutable/chunks/DCkHk5n_.js" rel="modulepreload">
38
- <link href="./_app/immutable/chunks/BC0iYSWx.js" rel="modulepreload">
39
- <link href="./_app/immutable/chunks/BJngAqxk.js" rel="modulepreload">
40
- <link href="./_app/immutable/chunks/B5KRA4hC.js" rel="modulepreload">
37
+ <link href="./_app/immutable/chunks/RBkNRIpl.js" rel="modulepreload">
38
+ <link href="./_app/immutable/chunks/D26njVw7.js" rel="modulepreload">
39
+ <link href="./_app/immutable/chunks/CSrT-PUe.js" rel="modulepreload">
40
+ <link href="./_app/immutable/chunks/Cr8mHXFf.js" rel="modulepreload">
41
+ <link href="./_app/immutable/chunks/C0tbX_qQ.js" rel="modulepreload">
42
+ <link href="./_app/immutable/chunks/DodcabfQ.js" rel="modulepreload">
41
43
  <link href="./_app/immutable/chunks/BR2LaRms.js" rel="modulepreload">
42
- <link href="./_app/immutable/chunks/CRTcXoMo.js" rel="modulepreload">
43
- <link href="./_app/immutable/chunks/vDgBJUjM.js" rel="modulepreload">
44
- <link href="./_app/immutable/chunks/DMoYijy0.js" rel="modulepreload">
45
- <link href="./_app/immutable/chunks/D0Ty6LN0.js" rel="modulepreload">
46
- <link href="./_app/immutable/chunks/BnKf2MvA.js" rel="modulepreload">
44
+ <link href="./_app/immutable/chunks/DnQEoGed.js" rel="modulepreload">
45
+ <link href="./_app/immutable/chunks/BpoiI2_d.js" rel="modulepreload">
46
+ <link href="./_app/immutable/chunks/CU11V7_a.js" rel="modulepreload">
47
+ <link href="./_app/immutable/chunks/B6Dt35mA.js" rel="modulepreload">
48
+ <link href="./_app/immutable/chunks/BoX17NrM.js" rel="modulepreload">
49
+ <link href="./_app/immutable/chunks/DoNmKjPy.js" rel="modulepreload">
47
50
 
48
- <link href="./_app/immutable/assets/0.BTQrrh5B.css" rel="stylesheet">
51
+ <link href="./_app/immutable/assets/0.BfwUqNJ-.css" rel="stylesheet">
49
52
  <link href="./_app/immutable/assets/Group.DaJMILJc.css" rel="stylesheet">
50
- <link href="./_app/immutable/assets/Text.j9l35qB0.css" rel="stylesheet">
51
53
  <link href="./_app/immutable/assets/Path.CvpwNZ6g.css" rel="stylesheet">
54
+ <link href="./_app/immutable/assets/Text.j9l35qB0.css" rel="stylesheet">
55
+ <link href="./_app/immutable/assets/Tooltip.BsTJVNOF.css" rel="stylesheet">
52
56
  <link href="./_app/immutable/assets/Rect.CtRaGMmQ.css" rel="stylesheet">
53
57
  <link href="./_app/immutable/assets/Line.fkmsECm9.css" rel="stylesheet">
54
58
  <link href="./_app/immutable/assets/Circle.C5MKzgk2.css" rel="stylesheet">
55
- <link href="./_app/immutable/assets/2.DoCaRy3T.css" rel="stylesheet">
59
+ <link href="./_app/immutable/assets/2.lkfjnM1s.css" rel="stylesheet">
56
60
  <link href="./_app/immutable/assets/Voronoi.ce7atosu.css" rel="stylesheet">
57
61
  <link href="./_app/immutable/assets/ChartAnnotations.CPxIG7Mw.css" rel="stylesheet">
58
62
  <link href="./_app/immutable/assets/Labels.BxZ4NUVz.css" rel="stylesheet">
59
63
  <link href="./_app/immutable/assets/Legend.DTV5rk9m.css" rel="stylesheet">
60
- <link href="./_app/immutable/assets/DefaultTooltip.BXd66MzC.css" rel="stylesheet">
64
+ <link href="./_app/immutable/assets/DefaultTooltip.CXdtNw-m.css" rel="stylesheet">
61
65
  </head>
62
66
  <body data-sveltekit-preload-data="tap">
63
67
 
64
68
  <script>
65
69
  {
66
- __sveltekit_ws17h5 = {
70
+ __sveltekit_uk2rko = {
67
71
  base: new URL(".", location).pathname.slice(0, -1)
68
72
  };
69
73
 
70
74
  const element = document.currentScript.parentElement;
71
75
 
72
76
  Promise.all([
73
- import("./_app/immutable/entry/start.B2ycr8Ji.js"),
74
- import("./_app/immutable/entry/app.cy9eKSTf.js")
77
+ import("./_app/immutable/entry/start.Iz8smxW0.js"),
78
+ import("./_app/immutable/entry/app.w1HyN1Pe.js")
75
79
  ]).then(([kit, app]) => {
76
80
  kit.start(app, element);
77
81
  });
@@ -72,6 +72,25 @@ export interface IcebergDestinationInput {
72
72
  * without this processor would fail every record with nothing surfacing as an error.
73
73
  */
74
74
  readonly transformLambdaArn: string;
75
+ /**
76
+ * The CloudWatch log group Firehose writes its delivery errors into, sent as
77
+ * `CloudWatchLoggingOptions.LogGroupName`. Firehose creates neither the group nor the
78
+ * stream inside it, so both have to exist before a record can fail into them.
79
+ *
80
+ * Required rather than optional, for {@link STREAM_APPEND_ONLY}'s reason: this client
81
+ * builds exactly one shape of destination and always enables logging, so an optional
82
+ * field would model a call site that does not exist. A destination that quietly
83
+ * omitted the options is the failure this field exists to remove - one where the only
84
+ * account of an undelivered record is the record's absence.
85
+ */
86
+ readonly logGroupName: string;
87
+ /**
88
+ * The log stream inside {@link IcebergDestinationInput.logGroupName}, sent as
89
+ * `CloudWatchLoggingOptions.LogStreamName`. Named explicitly because enabling logging
90
+ * through the API - rather than through the console - creates neither the group nor
91
+ * the stream, so the caller owns both names.
92
+ */
93
+ readonly logStreamName: string;
75
94
  }
76
95
  /**
77
96
  * A delivery stream's lifecycle state in this repo's vocabulary rather than the
@@ -85,7 +104,7 @@ export type DeliveryState = 'creating' | 'create-failed' | 'active' | 'deleting'
85
104
  * The narrow view of `DescribeDeliveryStream` that `analytics status` needs, plus the
86
105
  * three fields {@link FirehoseClient.updateDestination} cannot be called without.
87
106
  *
88
- * The last three are optional and are set only when the response actually carried them.
107
+ * The last four are optional and are set only when the response actually carried them.
89
108
  * `VersionId` and `Destinations` are documented as required members of
90
109
  * `DeliveryStreamDescription`, so on the service's own response model they are always
91
110
  * there - but an absent one must reach the caller as absent rather than as `''` or
@@ -124,6 +143,18 @@ export interface DeliveryStreamStatus {
124
143
  * that omits the flag.
125
144
  */
126
145
  readonly appendOnly?: boolean | undefined;
146
+ /**
147
+ * Whether the live destination has CloudWatch error logging switched on, off
148
+ * `Destinations[0].IcebergDestinationDescription.CloudWatchLoggingOptions.Enabled`.
149
+ *
150
+ * Read back rather than assumed, for {@link DeliveryStreamStatus.appendOnly}'s reason:
151
+ * it is the second flag the stream node compares to decide whether the destination
152
+ * needs reconciling, and assuming a stream this plugin created carries the
153
+ * configuration this plugin sends today is exactly wrong for every stream created
154
+ * before it sent this one. Absent for a destination that is not an Iceberg one, or for
155
+ * a response that reports no logging options at all.
156
+ */
157
+ readonly loggingEnabled?: boolean | undefined;
127
158
  }
128
159
  /**
129
160
  * The current version and destination id `UpdateDestination` conditions on - the two
@@ -139,6 +139,15 @@ function buildIcebergDestination(input) {
139
139
  ErrorOutputPrefix: input.errorOutputPrefix,
140
140
  },
141
141
  AppendOnly: STREAM_APPEND_ONLY,
142
+ // Firehose's only account of a record it could not deliver. Off by default, and
143
+ // `IcebergDestinationConfiguration` and `IcebergDestinationUpdate` both accept the
144
+ // member, so the one builder enables it on the create and on the reconcile alike -
145
+ // an existing stream is switched on in place rather than replaced.
146
+ CloudWatchLoggingOptions: {
147
+ Enabled: true,
148
+ LogGroupName: input.logGroupName,
149
+ LogStreamName: input.logStreamName,
150
+ },
142
151
  BufferingHints: {
143
152
  IntervalInSeconds: input.bufferIntervalSeconds,
144
153
  SizeInMBs: input.bufferSizeMb,
@@ -240,6 +249,7 @@ export class FirehoseClient {
240
249
  const versionId = description?.VersionId;
241
250
  const destinationId = destination?.DestinationId;
242
251
  const appendOnly = destination?.IcebergDestinationDescription?.AppendOnly;
252
+ const loggingEnabled = destination?.IcebergDestinationDescription?.CloudWatchLoggingOptions?.Enabled;
243
253
  return {
244
254
  name: description?.DeliveryStreamName ?? name,
245
255
  arn: description?.DeliveryStreamARN ?? '',
@@ -248,6 +258,7 @@ export class FirehoseClient {
248
258
  ...(versionId !== undefined ? { versionId } : {}),
249
259
  ...(destinationId !== undefined ? { destinationId } : {}),
250
260
  ...(appendOnly !== undefined ? { appendOnly } : {}),
261
+ ...(loggingEnabled !== undefined ? { loggingEnabled } : {}),
251
262
  };
252
263
  }
253
264
  catch (err) {
package/dist/commands.js CHANGED
@@ -172,7 +172,7 @@ function logStreamHealth(ctx, entries) {
172
172
  * A failed read degrades to a warning, which is the whole point of doing it
173
173
  * last: the table is the one part of this listing that needs credentials the
174
174
  * node reads do not (the vendor library attaches the catalog itself), so an
175
- * operator with no session still gets all twelve nodes and the stream's health.
175
+ * operator with no session still gets all fourteen nodes and the stream's health.
176
176
  */
177
177
  async function logRowCount(ctx, query) {
178
178
  const config = resolveAnalyticsConfig(ctx);
package/dist/nodes.d.ts CHANGED
@@ -3,24 +3,29 @@
3
3
  * CloudFront-logs-to-Iceberg pipeline is built from and nothing else: the
4
4
  * site's own bucket, distribution and log group stay in the CLI's graph
5
5
  * (`packages/cli/src/nodes.ts`) and are never touched from here. This module
6
- * carries all twelve of them, in four chains. The table chain - the S3 Tables bucket,
6
+ * carries all fourteen of them, in four chains. The table chain - the S3 Tables bucket,
7
7
  * the namespace inside it, the `page_views` table, and the Glue federation
8
8
  * Firehose reads that table through - runs `analytics-table-bucket` ->
9
9
  * `analytics-namespace` -> `analytics-table` ->
10
10
  * `analytics-catalog-integration`. The transform chain - the long-lived
11
- * `visitor_key` salt, the Lambda execution role whose policy names that
12
- * secret's ARN, and the record-transform function itself - runs
13
- * `analytics-salt-secret` -> `analytics-transform-role` ->
14
- * `analytics-transform-function`. The delivery chain - the bucket every record
15
- * Firehose cannot deliver lands in, the role it assumes, and the stream itself
16
- * - runs `analytics-error-bucket` -> `analytics-firehose-role` ->
17
- * `analytics-firehose-stream`, and joins the other two chains through the
18
- * role's four grants and the stream's destination. The vended-delivery chain -
11
+ * `visitor_key` salt, the log group the function's own output lands in, the
12
+ * Lambda execution role whose policy names that secret's ARN, and the
13
+ * record-transform function itself - runs `analytics-salt-secret` ->
14
+ * `analytics-transform-role` -> `analytics-transform-function`, with
15
+ * `analytics-transform-log-group` a second edge into that function. The
16
+ * delivery chain - the bucket every record Firehose cannot deliver lands in,
17
+ * the log group Firehose's delivery errors land in, the role it assumes, and
18
+ * the stream itself - runs `analytics-error-bucket` ->
19
+ * `analytics-firehose-role` -> `analytics-firehose-stream`, with
20
+ * `analytics-firehose-log-group` a second edge into that stream, and joins the
21
+ * other two chains through the role's five grants and the stream's
22
+ * destination. The vended-delivery chain -
19
23
  * the CloudWatch delivery destination pointing at that stream and the delivery
20
24
  * joining it to the site's log source - runs `analytics-log-destination` ->
21
25
  * `analytics-log-delivery` and hangs off the stream. All four are wired through
22
26
  * `dependsOn`, and a node depends on every node whose recorded ARN it
23
- * interpolates. {@link buildAnalyticsNodes} at the foot of this module returns
27
+ * interpolates - plus the two writers whose log group has to exist before the
28
+ * first line they write, which is an ordering with nothing read back. {@link buildAnalyticsNodes} at the foot of this module returns
24
29
  * the assembled set, and `plugin.ts` hands it to the SPI's `Plugin.nodes`;
25
30
  * assembling an array is all it does - nothing here reconciles anything.
26
31
  *
@@ -41,8 +46,8 @@
41
46
  * over the host's `signingUsEast1` signer; no node here picks a region for a
42
47
  * request. {@link ANALYTICS_REGION} below is the same region as *text*, needed
43
48
  * only because an ARN spells its region out and because every node `title`
44
- * states the pin, so the bootstrap output an operator reads carries it. Ten of
45
- * the twelve titles state it as the region they are created in; the two IAM
49
+ * states the pin, so the bootstrap output an operator reads carries it. Twelve
50
+ * of the fourteen titles state it as the region they are created in; the two IAM
46
51
  * role nodes state it as the pipeline they serve, because IAM is global and
47
52
  * "created in us-east-1" is not a property a role has (§Region pinning says so
48
53
  * in as many words) - a title claiming otherwise would be the pin stated
@@ -80,7 +85,7 @@ type AnalyticsContext = PluginContext<AnalyticsConfig>;
80
85
  /** One node of the analytics graph. */
81
86
  type AnalyticsNode = ResourceNode<AnalyticsContext>;
82
87
  /**
83
- * The `analytics-firehose-stream` node id. Exported, alone among the twelve,
88
+ * The `analytics-firehose-stream` node id. Exported, alone among the fourteen,
84
89
  * because `analytics status` reads this node's recorded outputs back out of
85
90
  * the scoped state its `read` hydrated - the stream's delivery health - and a
86
91
  * second copy of the string in `commands.ts` would be a state key with two
@@ -163,6 +168,22 @@ export declare function analyticsCatalogIntegrationNode(): AnalyticsNode;
163
168
  * anything had changed. The teardown says what it kept and how to remove it.
164
169
  */
165
170
  export declare function analyticsSaltSecretNode(): AnalyticsNode;
171
+ /**
172
+ * The transform Lambda's own log group: the mapping decisions, the drop path,
173
+ * and the cold-start read of the salt secret - the only place this pipeline
174
+ * says *why* a record went where it did.
175
+ *
176
+ * Lambda writes into it under the execution role's existing
177
+ * `logs:CreateLogStream` and `logs:PutLogEvents`, scoped to this group and no
178
+ * other ({@link transformLogGroupArn}). The role is deliberately not granted
179
+ * `logs:CreateLogGroup`, because this node is what creates the group.
180
+ *
181
+ * It is at the head of the chain that writes to it -
182
+ * `analytics-transform-function` declares the edge - and the role does not,
183
+ * because the role's policy *derives* this group's ARN from the function's name
184
+ * rather than reading a recorded one, so there is no output to wait for.
185
+ */
186
+ export declare function analyticsTransformLogGroupNode(): AnalyticsNode;
166
187
  /**
167
188
  * The transform Lambda's execution role: permission to write its own logs and
168
189
  * to read the one secret it needs, and nothing else.
@@ -226,7 +247,11 @@ export declare function transformUpdate(recorded: {
226
247
  * artifact's name, even though the zip travels inline rather than through a
227
248
  * bucket (see {@link MAX_INLINE_ZIP_BYTES} for why inline).
228
249
  *
229
- * It depends on `analytics-transform-role`, whose recorded ARN it runs as.
250
+ * It depends on `analytics-transform-role`, whose recorded ARN it runs as, and
251
+ * on `analytics-transform-log-group`, whose ARN it reads nothing of: a group
252
+ * that does not exist when the function first runs is a log line lost with
253
+ * nothing raised, and on teardown the reverse order the engine walks removes
254
+ * the function before the group holding the evidence of what it did.
230
255
  */
231
256
  export declare function analyticsTransformFunctionNode(): AnalyticsNode;
232
257
  /**
@@ -257,10 +282,32 @@ export declare function analyticsTransformFunctionNode(): AnalyticsNode;
257
282
  * transform did not run on them - inside a bucket the site serves from.
258
283
  */
259
284
  export declare function analyticsErrorBucketNode(): AnalyticsNode;
285
+ /**
286
+ * The log group Firehose writes its delivery errors to, and the log stream
287
+ * inside it that they are written to.
288
+ *
289
+ * **Firehose creates neither.** Enabling error logging through the API rather
290
+ * than the console requires the group *and* the stream to exist in advance, so
291
+ * this node creates both - and re-ensures the stream on every `update` beside
292
+ * the retention, which is why {@link analyticsLogGroupNode} takes a stream at
293
+ * all. Without that, a group left by a run that stopped between
294
+ * `CreateLogGroup` and `CreateLogStream` is permanently one call short, with
295
+ * `read()` reporting it present and `update()` doing nothing about it, and the
296
+ * symptom is a delivery failure with nowhere to be explained.
297
+ *
298
+ * {@link DESTINATION_DELIVERY_STREAM} is the only stream created:
299
+ * `BackupDelivery` belongs to a destination configured with S3 backup, and the
300
+ * Iceberg destination this pipeline builds configures none.
301
+ *
302
+ * It is at the head of the chain that writes to it -
303
+ * `analytics-firehose-stream` declares the edge - while the delivery role does
304
+ * not, for the reason `analytics-transform-log-group`'s counterpart does not.
305
+ */
306
+ export declare function analyticsFirehoseLogGroupNode(): AnalyticsNode;
260
307
  /**
261
308
  * The role Firehose assumes to read the catalog, write the table, invoke the
262
- * transform and store what it could not deliver - four grants, four concrete
263
- * resources, no `*`.
309
+ * transform, store what it could not deliver and say so in one log stream -
310
+ * five grants, five concrete resources, no `*`.
264
311
  *
265
312
  * It declares `dependsOn` on the three nodes whose recorded ARNs those grants
266
313
  * interpolate. `topoSort` drains zero-indegree nodes alphabetically
@@ -366,7 +413,7 @@ export declare function analyticsLogDestinationNode(): AnalyticsNode;
366
413
  */
367
414
  export declare function analyticsLogDeliveryNode(): AnalyticsNode;
368
415
  /**
369
- * The plugin's twelve resource nodes, assembled in the order the change spec's
416
+ * The plugin's fourteen resource nodes, assembled in the order the change spec's
370
417
  * §Analytics pipeline → Resource nodes table lists them. This is what
371
418
  * `Plugin.nodes` (`plugin.ts`) hands the CLI's generic `analytics bootstrap`
372
419
  * and `analytics destroy` verbs, and it is the whole of what this package
@@ -387,7 +434,7 @@ export declare function analyticsLogDeliveryNode(): AnalyticsNode;
387
434
  *
388
435
  * **No `ctx` parameter, deliberately.** The SPI declares `nodes?(ctx)` and the
389
436
  * CLI calls it with one, so this function is assignable to it as written - a
390
- * zero-argument function satisfies a one-argument signature. None of the twelve
437
+ * zero-argument function satisfies a one-argument signature. None of the fourteen
391
438
  * factories needs a context to be *built*: each reads `ctx` inside `read`,
392
439
  * `create`, `update` and `delete`, when the reconcile is actually running. A
393
440
  * parameter accepted and ignored here would be an unused binding and, worse, a