@shipfox/api-logs 8.0.0 → 9.0.2
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/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +60 -0
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +25 -18
- package/src/index.ts +1 -1
- package/tsconfig.build.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
$ shipfox-swc && shipfox-temporal-bundle dist/temporal/workflows/index.js
|
|
2
|
-
Successfully compiled: 59 files with swc (
|
|
3
|
-
2026-07-
|
|
2
|
+
Successfully compiled: 59 files with swc (467.91ms)
|
|
3
|
+
2026-07-24T15:39:09.700Z [INFO] asset workflow-bundle-17839eee3b21fbae5b8c.js 3.18 MiB [emitted] [immutable] (name: main)
|
|
4
4
|
orphan modules 33.5 KiB [orphan] 21 modules
|
|
5
5
|
runtime modules 1.13 KiB 5 modules
|
|
6
6
|
modules by path ../../../node_modules/.pnpm/ 970 KiB 196 modules
|
|
@@ -16,6 +16,6 @@ optional modules 30 bytes [optional]
|
|
|
16
16
|
__temporal_custom_payload_converter (ignored) 15 bytes [optional] [built] [code generated]
|
|
17
17
|
__temporal_custom_failure_converter (ignored) 15 bytes [optional] [built] [code generated]
|
|
18
18
|
../../shared/node/temporal/dist/workflow-error-interceptor.js 1.21 KiB [built] [code generated]
|
|
19
|
-
webpack 5.107.2 compiled successfully in
|
|
20
|
-
2026-07-
|
|
19
|
+
webpack 5.107.2 compiled successfully in 7001 ms
|
|
20
|
+
2026-07-24T15:39:09.711Z [INFO] Workflow bundle created { size: '3.18MB' }
|
|
21
21
|
/home/runner/work/shipfox/shipfox/libs/api/logs/dist/temporal/workflows/index.js: 3335222 bytes
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,65 @@
|
|
|
1
1
|
# @shipfox/api-logs
|
|
2
2
|
|
|
3
|
+
## 9.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 4b85404: Adds versioned architecture identity to participating package artifacts during publication.
|
|
8
|
+
- Updated dependencies [4b85404]
|
|
9
|
+
- @shipfox/api-auth-context@9.0.2
|
|
10
|
+
- @shipfox/api-logs-dto@9.0.2
|
|
11
|
+
- @shipfox/api-workflows-dto@9.0.2
|
|
12
|
+
- @shipfox/config@1.2.4
|
|
13
|
+
- @shipfox/node-drizzle@0.3.4
|
|
14
|
+
- @shipfox/node-error-monitoring@0.2.2
|
|
15
|
+
- @shipfox/node-fastify@0.3.2
|
|
16
|
+
- @shipfox/node-module@1.0.1
|
|
17
|
+
- @shipfox/node-opentelemetry@0.6.2
|
|
18
|
+
- @shipfox/node-outbox@0.2.6
|
|
19
|
+
- @shipfox/node-postgres@0.4.4
|
|
20
|
+
- @shipfox/node-temporal@0.4.2
|
|
21
|
+
- @shipfox/workflow-document@2.1.3
|
|
22
|
+
|
|
23
|
+
## 9.0.1
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- 475ce59: Republishes all public packages after restoring release authorization.
|
|
28
|
+
- Updated dependencies [8436596]
|
|
29
|
+
- Updated dependencies [475ce59]
|
|
30
|
+
- Updated dependencies [154e03f]
|
|
31
|
+
- @shipfox/workflow-document@2.1.2
|
|
32
|
+
- @shipfox/api-auth-context@9.0.1
|
|
33
|
+
- @shipfox/api-logs-dto@9.0.1
|
|
34
|
+
- @shipfox/api-workflows-dto@9.0.1
|
|
35
|
+
- @shipfox/config@1.2.3
|
|
36
|
+
- @shipfox/node-drizzle@0.3.3
|
|
37
|
+
- @shipfox/node-error-monitoring@0.2.1
|
|
38
|
+
- @shipfox/node-fastify@0.3.1
|
|
39
|
+
- @shipfox/node-module@1.0.0
|
|
40
|
+
- @shipfox/node-opentelemetry@0.6.1
|
|
41
|
+
- @shipfox/node-outbox@0.2.5
|
|
42
|
+
- @shipfox/node-postgres@0.4.3
|
|
43
|
+
- @shipfox/node-temporal@0.4.1
|
|
44
|
+
|
|
45
|
+
## 9.0.0
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- @shipfox/api-auth-context@9.0.0
|
|
50
|
+
- @shipfox/api-logs-dto@5.0.0
|
|
51
|
+
- @shipfox/api-workflows-dto@9.0.0
|
|
52
|
+
- @shipfox/config@1.2.2
|
|
53
|
+
- @shipfox/node-drizzle@0.3.2
|
|
54
|
+
- @shipfox/node-error-monitoring@0.2.0
|
|
55
|
+
- @shipfox/node-fastify@0.3.0
|
|
56
|
+
- @shipfox/node-module@0.5.0
|
|
57
|
+
- @shipfox/node-opentelemetry@0.6.0
|
|
58
|
+
- @shipfox/node-outbox@0.2.4
|
|
59
|
+
- @shipfox/node-postgres@0.4.2
|
|
60
|
+
- @shipfox/node-temporal@0.4.0
|
|
61
|
+
- @shipfox/workflow-document@2.1.1
|
|
62
|
+
|
|
3
63
|
## 8.0.0
|
|
4
64
|
|
|
5
65
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -24,7 +24,8 @@ export function createLogsModule({ workflows, jobLeaseTokenTtlSeconds }) {
|
|
|
24
24
|
name: 'logs',
|
|
25
25
|
database: {
|
|
26
26
|
db,
|
|
27
|
-
migrationsPath
|
|
27
|
+
migrationsPath,
|
|
28
|
+
databaseNamespace: 'logs'
|
|
28
29
|
},
|
|
29
30
|
routes: createLogsRoutes(workflows),
|
|
30
31
|
metrics: registerLogsServiceMetrics,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import {dirname, resolve} from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport {LOG_STREAM_CLOSED, type LogsEventMap, logsEventSchemas} from '@shipfox/api-logs-dto';\nimport {\n WORKFLOWS_JOB_TERMINATED,\n WORKFLOWS_STEP_ATTEMPT_TERMINATED,\n type WorkflowsEventMapDto,\n} from '@shipfox/api-workflows-dto';\nimport type {WorkflowsModuleClient} from '@shipfox/api-workflows-dto/inter-module';\nimport {type ShipfoxModule, subscriberFactory} from '@shipfox/node-module';\nimport {validateLogStreamReapAfterSeconds} from '#config.js';\nimport {db} from '#db/db.js';\nimport {migrationsPath} from '#db/index.js';\nimport {logsOutbox} from '#db/schema/outbox.js';\nimport {registerLogsServiceMetrics} from '#metrics/service.js';\nimport {createLogsRoutes} from '#presentation/routes/index.js';\nimport {onJobTerminated} from '#presentation/subscribers/on-job-terminated.js';\nimport {onLogStreamClosed} from '#presentation/subscribers/on-log-stream-closed.js';\nimport {onStepAttemptTerminated} from '#presentation/subscribers/on-step-attempt-terminated.js';\nimport {createLogsActivities} from '#temporal/activities/index.js';\nimport {LOGS_COMPACTION_TASK_QUEUE, LOGS_LIFECYCLE_TASK_QUEUE} from '#temporal/constants.js';\n\nexport {checkBucketReachable} from '#api/object-storage.js';\n\nconst packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');\nconst workflowsPath = resolve(packageRoot, 'dist/temporal/workflows/index.js');\n\nconst subscriber = subscriberFactory<WorkflowsEventMapDto & LogsEventMap>();\n\nexport function createLogsModule({\n workflows,\n jobLeaseTokenTtlSeconds,\n}: {\n workflows: WorkflowsModuleClient;\n jobLeaseTokenTtlSeconds: number;\n}): ShipfoxModule {\n validateLogStreamReapAfterSeconds(jobLeaseTokenTtlSeconds);\n\n return {\n name: 'logs',\n database: {db, migrationsPath},\n routes: createLogsRoutes(workflows),\n metrics: registerLogsServiceMetrics,\n // `logs.stream.closed` is written by the close paths: the job-terminated subscriber\n // force-closes streams the runner never ended, and the closed event drives compaction.\n publishers: [{name: 'logs', table: logsOutbox, db, eventSchemas: logsEventSchemas}],\n subscribers: [\n subscriber(WORKFLOWS_STEP_ATTEMPT_TERMINATED, onStepAttemptTerminated),\n subscriber(WORKFLOWS_JOB_TERMINATED, onJobTerminated),\n subscriber(LOG_STREAM_CLOSED, onLogStreamClosed),\n ],\n workers: [\n {\n taskQueue: LOGS_LIFECYCLE_TASK_QUEUE,\n workflowsPath,\n activities: createLogsActivities,\n // Temporal cron schedules are fixed after creation, so making cadence configurable would\n // look adjustable while keeping the old schedule. Tune LOG_RETENTION_DAYS for the horizon.\n workflows: [\n {\n name: 'retentionSweepCron',\n id: 'logs-retention-sweep',\n cronSchedule: '0 * * * *',\n },\n // Offset from retention's top-of-hour sweep; stale-stream age is governed by\n // LOG_STREAM_REAP_AFTER_SECONDS.\n {\n name: 'reapStaleOpenStreamsCron',\n id: 'logs-reap-stale-open-streams',\n cronSchedule: '5,15,25,35,45,55 * * * *',\n },\n ],\n },\n // Compaction runs on its own queue so long uploads cannot starve the lifecycle sweep.\n {\n taskQueue: LOGS_COMPACTION_TASK_QUEUE,\n workflowsPath,\n activities: createLogsActivities,\n workflows: [\n {\n name: 'compactionReconcileCron',\n id: 'logs-compaction-reconcile',\n cronSchedule: '*/10 * * * *',\n },\n ],\n },\n ],\n };\n}\n"],"names":["dirname","resolve","fileURLToPath","LOG_STREAM_CLOSED","logsEventSchemas","WORKFLOWS_JOB_TERMINATED","WORKFLOWS_STEP_ATTEMPT_TERMINATED","subscriberFactory","validateLogStreamReapAfterSeconds","db","migrationsPath","logsOutbox","registerLogsServiceMetrics","createLogsRoutes","onJobTerminated","onLogStreamClosed","onStepAttemptTerminated","createLogsActivities","LOGS_COMPACTION_TASK_QUEUE","LOGS_LIFECYCLE_TASK_QUEUE","checkBucketReachable","packageRoot","url","workflowsPath","subscriber","createLogsModule","workflows","jobLeaseTokenTtlSeconds","name","database","routes","metrics","publishers","table","eventSchemas","subscribers","workers","taskQueue","activities","id","cronSchedule"],"mappings":"AAAA,SAAQA,OAAO,EAAEC,OAAO,QAAO,YAAY;AAC3C,SAAQC,aAAa,QAAO,WAAW;AACvC,SAAQC,iBAAiB,EAAqBC,gBAAgB,QAAO,wBAAwB;AAC7F,SACEC,wBAAwB,EACxBC,iCAAiC,QAE5B,6BAA6B;AAEpC,SAA4BC,iBAAiB,QAAO,uBAAuB;AAC3E,SAAQC,iCAAiC,QAAO,aAAa;AAC7D,SAAQC,EAAE,QAAO,YAAY;AAC7B,SAAQC,cAAc,QAAO,eAAe;AAC5C,SAAQC,UAAU,QAAO,uBAAuB;AAChD,SAAQC,0BAA0B,QAAO,sBAAsB;AAC/D,SAAQC,gBAAgB,QAAO,gCAAgC;AAC/D,SAAQC,eAAe,QAAO,iDAAiD;AAC/E,SAAQC,iBAAiB,QAAO,oDAAoD;AACpF,SAAQC,uBAAuB,QAAO,0DAA0D;AAChG,SAAQC,oBAAoB,QAAO,gCAAgC;AACnE,SAAQC,0BAA0B,EAAEC,yBAAyB,QAAO,yBAAyB;AAE7F,SAAQC,oBAAoB,QAAO,yBAAyB;AAE5D,MAAMC,cAAcpB,QAAQD,QAAQE,cAAc,YAAYoB,GAAG,IAAI;AACrE,MAAMC,gBAAgBtB,QAAQoB,aAAa;AAE3C,MAAMG,aAAajB;AAEnB,OAAO,SAASkB,iBAAiB,EAC/BC,SAAS,EACTC,uBAAuB,EAIxB;IACCnB,kCAAkCmB;IAElC,OAAO;QACLC,MAAM;QACNC,UAAU;YAACpB;YAAIC;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import {dirname, resolve} from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport {LOG_STREAM_CLOSED, type LogsEventMap, logsEventSchemas} from '@shipfox/api-logs-dto';\nimport {\n WORKFLOWS_JOB_TERMINATED,\n WORKFLOWS_STEP_ATTEMPT_TERMINATED,\n type WorkflowsEventMapDto,\n} from '@shipfox/api-workflows-dto';\nimport type {WorkflowsModuleClient} from '@shipfox/api-workflows-dto/inter-module';\nimport {type ShipfoxModule, subscriberFactory} from '@shipfox/node-module';\nimport {validateLogStreamReapAfterSeconds} from '#config.js';\nimport {db} from '#db/db.js';\nimport {migrationsPath} from '#db/index.js';\nimport {logsOutbox} from '#db/schema/outbox.js';\nimport {registerLogsServiceMetrics} from '#metrics/service.js';\nimport {createLogsRoutes} from '#presentation/routes/index.js';\nimport {onJobTerminated} from '#presentation/subscribers/on-job-terminated.js';\nimport {onLogStreamClosed} from '#presentation/subscribers/on-log-stream-closed.js';\nimport {onStepAttemptTerminated} from '#presentation/subscribers/on-step-attempt-terminated.js';\nimport {createLogsActivities} from '#temporal/activities/index.js';\nimport {LOGS_COMPACTION_TASK_QUEUE, LOGS_LIFECYCLE_TASK_QUEUE} from '#temporal/constants.js';\n\nexport {checkBucketReachable} from '#api/object-storage.js';\n\nconst packageRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..');\nconst workflowsPath = resolve(packageRoot, 'dist/temporal/workflows/index.js');\n\nconst subscriber = subscriberFactory<WorkflowsEventMapDto & LogsEventMap>();\n\nexport function createLogsModule({\n workflows,\n jobLeaseTokenTtlSeconds,\n}: {\n workflows: WorkflowsModuleClient;\n jobLeaseTokenTtlSeconds: number;\n}): ShipfoxModule {\n validateLogStreamReapAfterSeconds(jobLeaseTokenTtlSeconds);\n\n return {\n name: 'logs',\n database: {db, migrationsPath, databaseNamespace: 'logs'},\n routes: createLogsRoutes(workflows),\n metrics: registerLogsServiceMetrics,\n // `logs.stream.closed` is written by the close paths: the job-terminated subscriber\n // force-closes streams the runner never ended, and the closed event drives compaction.\n publishers: [{name: 'logs', table: logsOutbox, db, eventSchemas: logsEventSchemas}],\n subscribers: [\n subscriber(WORKFLOWS_STEP_ATTEMPT_TERMINATED, onStepAttemptTerminated),\n subscriber(WORKFLOWS_JOB_TERMINATED, onJobTerminated),\n subscriber(LOG_STREAM_CLOSED, onLogStreamClosed),\n ],\n workers: [\n {\n taskQueue: LOGS_LIFECYCLE_TASK_QUEUE,\n workflowsPath,\n activities: createLogsActivities,\n // Temporal cron schedules are fixed after creation, so making cadence configurable would\n // look adjustable while keeping the old schedule. Tune LOG_RETENTION_DAYS for the horizon.\n workflows: [\n {\n name: 'retentionSweepCron',\n id: 'logs-retention-sweep',\n cronSchedule: '0 * * * *',\n },\n // Offset from retention's top-of-hour sweep; stale-stream age is governed by\n // LOG_STREAM_REAP_AFTER_SECONDS.\n {\n name: 'reapStaleOpenStreamsCron',\n id: 'logs-reap-stale-open-streams',\n cronSchedule: '5,15,25,35,45,55 * * * *',\n },\n ],\n },\n // Compaction runs on its own queue so long uploads cannot starve the lifecycle sweep.\n {\n taskQueue: LOGS_COMPACTION_TASK_QUEUE,\n workflowsPath,\n activities: createLogsActivities,\n workflows: [\n {\n name: 'compactionReconcileCron',\n id: 'logs-compaction-reconcile',\n cronSchedule: '*/10 * * * *',\n },\n ],\n },\n ],\n };\n}\n"],"names":["dirname","resolve","fileURLToPath","LOG_STREAM_CLOSED","logsEventSchemas","WORKFLOWS_JOB_TERMINATED","WORKFLOWS_STEP_ATTEMPT_TERMINATED","subscriberFactory","validateLogStreamReapAfterSeconds","db","migrationsPath","logsOutbox","registerLogsServiceMetrics","createLogsRoutes","onJobTerminated","onLogStreamClosed","onStepAttemptTerminated","createLogsActivities","LOGS_COMPACTION_TASK_QUEUE","LOGS_LIFECYCLE_TASK_QUEUE","checkBucketReachable","packageRoot","url","workflowsPath","subscriber","createLogsModule","workflows","jobLeaseTokenTtlSeconds","name","database","databaseNamespace","routes","metrics","publishers","table","eventSchemas","subscribers","workers","taskQueue","activities","id","cronSchedule"],"mappings":"AAAA,SAAQA,OAAO,EAAEC,OAAO,QAAO,YAAY;AAC3C,SAAQC,aAAa,QAAO,WAAW;AACvC,SAAQC,iBAAiB,EAAqBC,gBAAgB,QAAO,wBAAwB;AAC7F,SACEC,wBAAwB,EACxBC,iCAAiC,QAE5B,6BAA6B;AAEpC,SAA4BC,iBAAiB,QAAO,uBAAuB;AAC3E,SAAQC,iCAAiC,QAAO,aAAa;AAC7D,SAAQC,EAAE,QAAO,YAAY;AAC7B,SAAQC,cAAc,QAAO,eAAe;AAC5C,SAAQC,UAAU,QAAO,uBAAuB;AAChD,SAAQC,0BAA0B,QAAO,sBAAsB;AAC/D,SAAQC,gBAAgB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