@shipfox/annotations 10.2.0 → 12.0.0
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 +1 -1
- package/CHANGELOG.md +27 -0
- package/dist/presentation/routes/read-annotations.d.ts.map +1 -1
- package/dist/presentation/routes/read-annotations.js +1 -1
- package/dist/presentation/routes/read-annotations.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/presentation/routes/read-annotations.test.ts +25 -1
- package/src/presentation/routes/read-annotations.ts +3 -1
- package/tsconfig.build.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$ shipfox-swc
|
|
2
|
-
Successfully compiled: 17 files with swc (
|
|
2
|
+
Successfully compiled: 17 files with swc (226.52ms)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @shipfox/annotations
|
|
2
2
|
|
|
3
|
+
## 12.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [f78740d]
|
|
8
|
+
- Updated dependencies [f13e8bb]
|
|
9
|
+
- @shipfox/inter-module@0.2.3
|
|
10
|
+
- @shipfox/node-fastify@0.4.1
|
|
11
|
+
- @shipfox/node-module@1.0.5
|
|
12
|
+
- @shipfox/node-postgres@0.5.0
|
|
13
|
+
- @shipfox/api-auth-context@12.0.0
|
|
14
|
+
- @shipfox/annotations-dto@12.0.0
|
|
15
|
+
- @shipfox/node-drizzle@0.3.5
|
|
16
|
+
|
|
17
|
+
## 11.0.0
|
|
18
|
+
|
|
19
|
+
### Major Changes
|
|
20
|
+
|
|
21
|
+
- 25158c8: Carry workspace lifecycle status in JWT membership claims and enforce suspended or inactive access at the stateless workspace gate while keeping access-token verification stateless.
|
|
22
|
+
|
|
23
|
+
`getAuthenticatedSessionContext()` now reads refresh-session metadata from verified access-token claims without checking active refresh-session state; revoking a refresh session does not invalidate an already-issued access token.
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [25158c8]
|
|
28
|
+
- @shipfox/api-auth-context@11.0.0
|
|
29
|
+
|
|
3
30
|
## 10.2.0
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read-annotations.d.ts","sourceRoot":"","sources":["../../../src/presentation/routes/read-annotations.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB,
|
|
1
|
+
{"version":3,"file":"read-annotations.d.ts","sourceRoot":"","sources":["../../../src/presentation/routes/read-annotations.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB,iDA4C/B,CAAC"}
|
|
@@ -23,7 +23,7 @@ export const readAnnotationsRoute = defineRoute({
|
|
|
23
23
|
status: 400
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
const workspaceIds = user.memberships.map((membership)=>membership.workspaceId);
|
|
26
|
+
const workspaceIds = user.memberships.filter((membership)=>membership.workspaceStatus === 'active').map((membership)=>membership.workspaceId);
|
|
27
27
|
const result = await listAnnotationsForRunAttempt({
|
|
28
28
|
workflowRunId,
|
|
29
29
|
workflowRunAttempt: attempt,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/presentation/routes/read-annotations.ts"],"sourcesContent":["import {readAnnotationsQuerySchema, readAnnotationsResponseSchema} from '@shipfox/annotations-dto';\nimport {requireUserContext} from '@shipfox/api-auth-context';\nimport {decodeNumberIdCursor, encodeNumberIdCursor} from '@shipfox/node-drizzle';\nimport {ClientError, defineRoute} from '@shipfox/node-fastify';\nimport {listAnnotationsForRunAttempt} from '#db/index.js';\nimport {toAnnotationDto} from '#presentation/dto/index.js';\n\nexport const readAnnotationsRoute = defineRoute({\n method: 'GET',\n path: '/',\n description: 'Read annotations for a workflow run attempt.',\n schema: {\n querystring: readAnnotationsQuerySchema,\n response: {\n 200: readAnnotationsResponseSchema,\n },\n },\n handler: async (request) => {\n const user = requireUserContext(request);\n const {\n workflow_run_id: workflowRunId,\n attempt,\n job_execution_id: jobExecutionId,\n cursor,\n limit,\n } = request.query;\n const decodedCursor = decodeNumberIdCursor(cursor);\n if (cursor !== undefined && !decodedCursor) {\n throw new ClientError('Invalid cursor', 'invalid-cursor', {status: 400});\n }\n\n const workspaceIds = user.memberships.map((membership) => membership.workspaceId);\n const result = await listAnnotationsForRunAttempt({\n workflowRunId,\n workflowRunAttempt: attempt,\n workspaceIds,\n jobExecutionId,\n after: decodedCursor ? {sequence: decodedCursor.value, id: decodedCursor.id} : undefined,\n limit,\n });\n\n return {\n annotations: result.annotations.map(toAnnotationDto),\n has_more: result.hasMore,\n next_cursor: result.nextCursor\n ? encodeNumberIdCursor({value: result.nextCursor.sequence, id: result.nextCursor.id})\n : null,\n };\n },\n});\n"],"names":["readAnnotationsQuerySchema","readAnnotationsResponseSchema","requireUserContext","decodeNumberIdCursor","encodeNumberIdCursor","ClientError","defineRoute","listAnnotationsForRunAttempt","toAnnotationDto","readAnnotationsRoute","method","path","description","schema","querystring","response","handler","request","user","workflow_run_id","workflowRunId","attempt","job_execution_id","jobExecutionId","cursor","limit","query","decodedCursor","undefined","status","workspaceIds","memberships","
|
|
1
|
+
{"version":3,"sources":["../../../src/presentation/routes/read-annotations.ts"],"sourcesContent":["import {readAnnotationsQuerySchema, readAnnotationsResponseSchema} from '@shipfox/annotations-dto';\nimport {requireUserContext} from '@shipfox/api-auth-context';\nimport {decodeNumberIdCursor, encodeNumberIdCursor} from '@shipfox/node-drizzle';\nimport {ClientError, defineRoute} from '@shipfox/node-fastify';\nimport {listAnnotationsForRunAttempt} from '#db/index.js';\nimport {toAnnotationDto} from '#presentation/dto/index.js';\n\nexport const readAnnotationsRoute = defineRoute({\n method: 'GET',\n path: '/',\n description: 'Read annotations for a workflow run attempt.',\n schema: {\n querystring: readAnnotationsQuerySchema,\n response: {\n 200: readAnnotationsResponseSchema,\n },\n },\n handler: async (request) => {\n const user = requireUserContext(request);\n const {\n workflow_run_id: workflowRunId,\n attempt,\n job_execution_id: jobExecutionId,\n cursor,\n limit,\n } = request.query;\n const decodedCursor = decodeNumberIdCursor(cursor);\n if (cursor !== undefined && !decodedCursor) {\n throw new ClientError('Invalid cursor', 'invalid-cursor', {status: 400});\n }\n\n const workspaceIds = user.memberships\n .filter((membership) => membership.workspaceStatus === 'active')\n .map((membership) => membership.workspaceId);\n const result = await listAnnotationsForRunAttempt({\n workflowRunId,\n workflowRunAttempt: attempt,\n workspaceIds,\n jobExecutionId,\n after: decodedCursor ? {sequence: decodedCursor.value, id: decodedCursor.id} : undefined,\n limit,\n });\n\n return {\n annotations: result.annotations.map(toAnnotationDto),\n has_more: result.hasMore,\n next_cursor: result.nextCursor\n ? encodeNumberIdCursor({value: result.nextCursor.sequence, id: result.nextCursor.id})\n : null,\n };\n },\n});\n"],"names":["readAnnotationsQuerySchema","readAnnotationsResponseSchema","requireUserContext","decodeNumberIdCursor","encodeNumberIdCursor","ClientError","defineRoute","listAnnotationsForRunAttempt","toAnnotationDto","readAnnotationsRoute","method","path","description","schema","querystring","response","handler","request","user","workflow_run_id","workflowRunId","attempt","job_execution_id","jobExecutionId","cursor","limit","query","decodedCursor","undefined","status","workspaceIds","memberships","filter","membership","workspaceStatus","map","workspaceId","result","workflowRunAttempt","after","sequence","value","id","annotations","has_more","hasMore","next_cursor","nextCursor"],"mappings":"AAAA,SAAQA,0BAA0B,EAAEC,6BAA6B,QAAO,2BAA2B;AACnG,SAAQC,kBAAkB,QAAO,4BAA4B;AAC7D,SAAQC,oBAAoB,EAAEC,oBAAoB,QAAO,wBAAwB;AACjF,SAAQC,WAAW,EAAEC,WAAW,QAAO,wBAAwB;AAC/D,SAAQC,4BAA4B,QAAO,eAAe;AAC1D,SAAQC,eAAe,QAAO,6BAA6B;AAE3D,OAAO,MAAMC,uBAAuBH,YAAY;IAC9CI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