@hasna/uptime 0.1.15 → 0.1.17
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/CHANGELOG.md +18 -0
- package/Dockerfile.package +11 -4
- package/dist/api.js +11 -0
- package/dist/cli/index.js +12 -1
- package/dist/cloud-plan.js +1 -1
- package/dist/index.js +12 -1
- package/dist/mcp/index.js +11 -0
- package/dist/report.js +11 -0
- package/dist/service.js +11 -0
- package/infra/aws/terraform.tfvars.example +1 -1
- package/infra/aws/variables.tf +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,24 @@ project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.1.17] - 2026-06-28
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- Added Alpine `libgcc` and `libstdc++` runtime packages to the packaged
|
|
14
|
+
production Dockerfile so the copied Bun binary can run in the final image.
|
|
15
|
+
- Read Open Logs structured ingest IDs from nested `events[]` responses when
|
|
16
|
+
recording report delivery receipts.
|
|
17
|
+
|
|
18
|
+
## [0.1.16] - 2026-06-28
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
|
|
22
|
+
- Changed the packaged production Dockerfile to install Bun in an ECR Public
|
|
23
|
+
Node Alpine build stage, then copy only Bun, app files, and production
|
|
24
|
+
dependencies into an ECR Public Alpine runtime with CA certificates. This
|
|
25
|
+
reduces inherited OS vulnerability findings before live AWS scale-up.
|
|
26
|
+
|
|
9
27
|
## [0.1.15] - 2026-06-28
|
|
10
28
|
|
|
11
29
|
### Changed
|
package/Dockerfile.package
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
# syntax=docker/dockerfile:1
|
|
2
2
|
|
|
3
|
-
FROM public.ecr.aws/docker/library/node:22-
|
|
3
|
+
FROM public.ecr.aws/docker/library/node:22-alpine AS bun
|
|
4
|
+
|
|
5
|
+
RUN npm install -g bun@1.3.13
|
|
6
|
+
|
|
7
|
+
FROM public.ecr.aws/docker/library/alpine:3.22 AS runtime
|
|
4
8
|
ENV NODE_ENV=production \
|
|
5
9
|
HASNA_UPTIME_MODE=hosted
|
|
6
10
|
WORKDIR /app
|
|
7
11
|
|
|
8
|
-
RUN
|
|
9
|
-
&&
|
|
10
|
-
&&
|
|
12
|
+
RUN apk add --no-cache ca-certificates libgcc libstdc++ \
|
|
13
|
+
&& addgroup -g 10001 -S uptime \
|
|
14
|
+
&& adduser -S -D -H -u 10001 -G uptime uptime
|
|
15
|
+
|
|
16
|
+
COPY --from=bun /usr/local/bin/bun /usr/local/bin/bun
|
|
17
|
+
COPY --from=bun /usr/local/lib/node_modules/bun /usr/local/lib/node_modules/bun
|
|
11
18
|
|
|
12
19
|
COPY package.json ./package.json
|
|
13
20
|
COPY dist ./dist
|
package/dist/api.js
CHANGED
|
@@ -2988,6 +2988,17 @@ function idFromResponse(data) {
|
|
|
2988
2988
|
if (typeof record[key] === "string")
|
|
2989
2989
|
return record[key];
|
|
2990
2990
|
}
|
|
2991
|
+
if (Array.isArray(record.events)) {
|
|
2992
|
+
for (const event of record.events) {
|
|
2993
|
+
if (!event || typeof event !== "object")
|
|
2994
|
+
continue;
|
|
2995
|
+
const eventRecord = event;
|
|
2996
|
+
for (const key of ["id", "event_id"]) {
|
|
2997
|
+
if (typeof eventRecord[key] === "string")
|
|
2998
|
+
return eventRecord[key];
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
3001
|
+
}
|
|
2991
3002
|
return;
|
|
2992
3003
|
}
|
|
2993
3004
|
function errorFromResponse(data, fallback, secrets = []) {
|
package/dist/cli/index.js
CHANGED
|
@@ -5567,6 +5567,17 @@ function idFromResponse(data) {
|
|
|
5567
5567
|
if (typeof record[key] === "string")
|
|
5568
5568
|
return record[key];
|
|
5569
5569
|
}
|
|
5570
|
+
if (Array.isArray(record.events)) {
|
|
5571
|
+
for (const event of record.events) {
|
|
5572
|
+
if (!event || typeof event !== "object")
|
|
5573
|
+
continue;
|
|
5574
|
+
const eventRecord = event;
|
|
5575
|
+
for (const key of ["id", "event_id"]) {
|
|
5576
|
+
if (typeof eventRecord[key] === "string")
|
|
5577
|
+
return eventRecord[key];
|
|
5578
|
+
}
|
|
5579
|
+
}
|
|
5580
|
+
}
|
|
5570
5581
|
return;
|
|
5571
5582
|
}
|
|
5572
5583
|
function errorFromResponse(data, fallback, secrets = []) {
|
|
@@ -6932,7 +6943,7 @@ function buildAwsDeploymentPlan(options = {}) {
|
|
|
6932
6943
|
const image = clean(options.image, `${imageRepositoryUri}@sha256:<image-digest>`);
|
|
6933
6944
|
const evidenceBucket = clean(options.evidenceBucket, `hasna-${stage}-${prefix}-evidence`);
|
|
6934
6945
|
const hostedSqliteDbPath = clean(options.hostedSqliteDbPath, DEFAULT_HOSTED_SQLITE_DB);
|
|
6935
|
-
const runtimePackageVersion = clean(options.runtimePackageVersion, "0.1.
|
|
6946
|
+
const runtimePackageVersion = clean(options.runtimePackageVersion, "0.1.17");
|
|
6936
6947
|
const protectedAccessMode = options.protectedAccessMode ?? DEFAULT_PROTECTED_ACCESS_MODE;
|
|
6937
6948
|
const protectedAccessUrl = protectedAccessMode === "cloudfront_default_domain" ? "https://<cloudfront-domain>" : `https://${hostname}`;
|
|
6938
6949
|
const cluster = `${prefix}-${stage}`;
|
package/dist/cloud-plan.js
CHANGED
|
@@ -21,7 +21,7 @@ function buildAwsDeploymentPlan(options = {}) {
|
|
|
21
21
|
const image = clean(options.image, `${imageRepositoryUri}@sha256:<image-digest>`);
|
|
22
22
|
const evidenceBucket = clean(options.evidenceBucket, `hasna-${stage}-${prefix}-evidence`);
|
|
23
23
|
const hostedSqliteDbPath = clean(options.hostedSqliteDbPath, DEFAULT_HOSTED_SQLITE_DB);
|
|
24
|
-
const runtimePackageVersion = clean(options.runtimePackageVersion, "0.1.
|
|
24
|
+
const runtimePackageVersion = clean(options.runtimePackageVersion, "0.1.17");
|
|
25
25
|
const protectedAccessMode = options.protectedAccessMode ?? DEFAULT_PROTECTED_ACCESS_MODE;
|
|
26
26
|
const protectedAccessUrl = protectedAccessMode === "cloudfront_default_domain" ? "https://<cloudfront-domain>" : `https://${hostname}`;
|
|
27
27
|
const cluster = `${prefix}-${stage}`;
|
package/dist/index.js
CHANGED
|
@@ -2988,6 +2988,17 @@ function idFromResponse(data) {
|
|
|
2988
2988
|
if (typeof record[key] === "string")
|
|
2989
2989
|
return record[key];
|
|
2990
2990
|
}
|
|
2991
|
+
if (Array.isArray(record.events)) {
|
|
2992
|
+
for (const event of record.events) {
|
|
2993
|
+
if (!event || typeof event !== "object")
|
|
2994
|
+
continue;
|
|
2995
|
+
const eventRecord = event;
|
|
2996
|
+
for (const key of ["id", "event_id"]) {
|
|
2997
|
+
if (typeof eventRecord[key] === "string")
|
|
2998
|
+
return eventRecord[key];
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
3001
|
+
}
|
|
2991
3002
|
return;
|
|
2992
3003
|
}
|
|
2993
3004
|
function errorFromResponse(data, fallback, secrets = []) {
|
|
@@ -4338,7 +4349,7 @@ function buildAwsDeploymentPlan(options = {}) {
|
|
|
4338
4349
|
const image = clean(options.image, `${imageRepositoryUri}@sha256:<image-digest>`);
|
|
4339
4350
|
const evidenceBucket = clean(options.evidenceBucket, `hasna-${stage}-${prefix}-evidence`);
|
|
4340
4351
|
const hostedSqliteDbPath = clean(options.hostedSqliteDbPath, DEFAULT_HOSTED_SQLITE_DB);
|
|
4341
|
-
const runtimePackageVersion = clean(options.runtimePackageVersion, "0.1.
|
|
4352
|
+
const runtimePackageVersion = clean(options.runtimePackageVersion, "0.1.17");
|
|
4342
4353
|
const protectedAccessMode = options.protectedAccessMode ?? DEFAULT_PROTECTED_ACCESS_MODE;
|
|
4343
4354
|
const protectedAccessUrl = protectedAccessMode === "cloudfront_default_domain" ? "https://<cloudfront-domain>" : `https://${hostname}`;
|
|
4344
4355
|
const cluster = `${prefix}-${stage}`;
|
package/dist/mcp/index.js
CHANGED
|
@@ -17277,6 +17277,17 @@ function idFromResponse(data) {
|
|
|
17277
17277
|
if (typeof record2[key] === "string")
|
|
17278
17278
|
return record2[key];
|
|
17279
17279
|
}
|
|
17280
|
+
if (Array.isArray(record2.events)) {
|
|
17281
|
+
for (const event of record2.events) {
|
|
17282
|
+
if (!event || typeof event !== "object")
|
|
17283
|
+
continue;
|
|
17284
|
+
const eventRecord = event;
|
|
17285
|
+
for (const key of ["id", "event_id"]) {
|
|
17286
|
+
if (typeof eventRecord[key] === "string")
|
|
17287
|
+
return eventRecord[key];
|
|
17288
|
+
}
|
|
17289
|
+
}
|
|
17290
|
+
}
|
|
17280
17291
|
return;
|
|
17281
17292
|
}
|
|
17282
17293
|
function errorFromResponse(data, fallback, secrets = []) {
|
package/dist/report.js
CHANGED
|
@@ -215,6 +215,17 @@ function idFromResponse(data) {
|
|
|
215
215
|
if (typeof record[key] === "string")
|
|
216
216
|
return record[key];
|
|
217
217
|
}
|
|
218
|
+
if (Array.isArray(record.events)) {
|
|
219
|
+
for (const event of record.events) {
|
|
220
|
+
if (!event || typeof event !== "object")
|
|
221
|
+
continue;
|
|
222
|
+
const eventRecord = event;
|
|
223
|
+
for (const key of ["id", "event_id"]) {
|
|
224
|
+
if (typeof eventRecord[key] === "string")
|
|
225
|
+
return eventRecord[key];
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
218
229
|
return;
|
|
219
230
|
}
|
|
220
231
|
function errorFromResponse(data, fallback, secrets = []) {
|
package/dist/service.js
CHANGED
|
@@ -2988,6 +2988,17 @@ function idFromResponse(data) {
|
|
|
2988
2988
|
if (typeof record[key] === "string")
|
|
2989
2989
|
return record[key];
|
|
2990
2990
|
}
|
|
2991
|
+
if (Array.isArray(record.events)) {
|
|
2992
|
+
for (const event of record.events) {
|
|
2993
|
+
if (!event || typeof event !== "object")
|
|
2994
|
+
continue;
|
|
2995
|
+
const eventRecord = event;
|
|
2996
|
+
for (const key of ["id", "event_id"]) {
|
|
2997
|
+
if (typeof eventRecord[key] === "string")
|
|
2998
|
+
return eventRecord[key];
|
|
2999
|
+
}
|
|
3000
|
+
}
|
|
3001
|
+
}
|
|
2991
3002
|
return;
|
|
2992
3003
|
}
|
|
2993
3004
|
function errorFromResponse(data, fallback, secrets = []) {
|
|
@@ -16,7 +16,7 @@ alb_ingress_cidr_blocks = []
|
|
|
16
16
|
private_subnet_ids = ["subnet-replace-private-a", "subnet-replace-private-b"]
|
|
17
17
|
private_route_table_ids = ["rtb-replace-private"]
|
|
18
18
|
container_image = "123456789012.dkr.ecr.us-east-1.amazonaws.com/open-uptime@sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
|
19
|
-
runtime_package_version = "0.1.
|
|
19
|
+
runtime_package_version = "0.1.17"
|
|
20
20
|
certificate_arn = null
|
|
21
21
|
hosted_zone_id = null
|
|
22
22
|
app_env_secret_arn = "arn:aws:secretsmanager:us-east-1:123456789012:secret:open-uptime/prod/app/env"
|
package/infra/aws/variables.tf
CHANGED
|
@@ -116,7 +116,7 @@ variable "container_image" {
|
|
|
116
116
|
variable "runtime_package_version" {
|
|
117
117
|
description = "Published @hasna/uptime package version that CodeBuild should build into the ECR image."
|
|
118
118
|
type = string
|
|
119
|
-
default = "0.1.
|
|
119
|
+
default = "0.1.17"
|
|
120
120
|
|
|
121
121
|
validation {
|
|
122
122
|
condition = can(regex("^[0-9]+\\.[0-9]+\\.[0-9]+(-[0-9A-Za-z.-]+)?$", var.runtime_package_version))
|
package/package.json
CHANGED