Skip to content

Commit f41dbfd

Browse files
committed
fixes
1 parent d404f7a commit f41dbfd

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103

104104
- name: Export TypeScript types from LogStruct
105105
run: |
106-
ruby scripts/export_typescript_types.rb
106+
scripts/export_typescript_types.rb
107107
108108
- name: TypeScript type checking
109109
run: |

bin/all

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,28 @@
22

33
set -e
44

5-
echo "===> Running typecheck"
5+
echo "===> Running Sorbet Typecheck"
66
bin/typecheck
77

8-
echo "===> Running rubocop (lint)"
8+
echo "===> Running TypeScript export"
9+
scripts/export_typescript_types.rb
10+
11+
echo "===> Running TypeScript Typecheck"
12+
(cd site && npx tsc --noEmit)
13+
14+
echo "===> Running RuboCop (lint)"
915
bin/rubocop
1016

11-
echo "===> Running prettier"
17+
echo "===> Running Prettier (lint)"
1218
bin/prettier --check
1319

1420
echo "===> Running spellcheck"
1521
bin/spellcheck
1622

17-
echo "===> Running tests"
23+
echo "===> Running Ruby tests"
1824
bin/test
1925

26+
echo "===> Running TypeScript tests"
27+
(cd site && npm test)
28+
2029
echo "All checks passed! ✅"

site/lib/log-generation/log-generator.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export class LogGenerator extends RandomDataGenerator {
9090
}
9191

9292
private generateActiveJobLog(
93-
log: Partial<ActiveJobLog>,
93+
log: Partial<ActiveJobLog>
9494
): Partial<ActiveJobLog> {
9595
log.job_id = this.randomHex(8);
9696
log.job_class = this.sample(SampleData.JOB_CLASSES);
@@ -122,7 +122,7 @@ export class LogGenerator extends RandomDataGenerator {
122122
// Generate 2-4 random backtrace lines
123123
const numLines = this.randomInt(2, 4);
124124
log.backtrace = Array.from({ length: numLines }, () =>
125-
this.sample(SampleData.BACKTRACE_LINES),
125+
this.sample(SampleData.BACKTRACE_LINES)
126126
);
127127

128128
log.data = {
@@ -152,7 +152,6 @@ export class LogGenerator extends RandomDataGenerator {
152152
}
153153

154154
private generateShrineLog(log: Partial<ShrineLog>): Partial<ShrineLog> {
155-
log.msg = "File uploaded";
156155
log.storage = this.sample(SampleData.STORAGE_SERVICES);
157156
log.location = `uploads/${this.randomHex(12)}`;
158157
log.upload_options = { public: true };
@@ -181,7 +180,7 @@ export class LogGenerator extends RandomDataGenerator {
181180
}
182181

183182
private generateActiveStorageLog(
184-
log: Partial<ActiveStorageLog>,
183+
log: Partial<ActiveStorageLog>
185184
): Partial<ActiveStorageLog> {
186185
log.operation = "upload";
187186
log.storage = this.sample(SampleData.STORAGE_SERVICES);
@@ -201,7 +200,7 @@ export class LogGenerator extends RandomDataGenerator {
201200
}
202201

203202
private generateActionMailerLog(
204-
log: Partial<ActionMailerLog>,
203+
log: Partial<ActionMailerLog>
205204
): Partial<ActionMailerLog> {
206205
log.to = [this.randomEmail()];
207206
log.from = "notifications@example.com";
@@ -215,7 +214,7 @@ export class LogGenerator extends RandomDataGenerator {
215214
}
216215

217216
private generateCarrierWaveLog(
218-
log: Partial<CarrierWaveLog>,
217+
log: Partial<CarrierWaveLog>
219218
): Partial<CarrierWaveLog> {
220219
log.operation = "upload";
221220
log.storage = this.sample(SampleData.STORAGE_SERVICES);
@@ -265,7 +264,7 @@ export class LogGenerator extends RandomDataGenerator {
265264
// Start event (happens a little later)
266265
const startTime = new Date(
267266
new Date(enqueueLog.timestamp as string).getTime() +
268-
this.randomInt(100, 5000),
267+
this.randomInt(100, 5000)
269268
);
270269
const startLog: Partial<ActiveJobLog> = {
271270
timestamp: startTime.toISOString(),

0 commit comments

Comments
 (0)