Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,4 @@ FROM base
USER app:app
WORKDIR /app
COPY --from=builder --chown=app:app /app /app
CMD ["bash", "-lc", "yarn workspace @app/condo start"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Preserve signal delivery for the default server command

When this image is stopped by Docker/Kubernetes, SIGTERM is sent only to PID 1. With this bash -lc wrapper, bash exits without forwarding the signal to the yarn/Node child, so the SIGTERM handler installed by setupGracefulShutdown in bin/run-keystone-app.js does not run; production deploys can skip draining and close in-flight requests abruptly. Use a command that replaces the shell, or start the server process as PID 1.

Useful? React with 👍 / 👎.

Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,10 @@ export const convertFile = async (file: File, onProgress?: UploadRequestOption['

let filename = file.name
if (file.type === 'video/quicktime') filename = file.name.replace(/\.mov$/i, '.mp4')
const arrayBuffer = data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength) as ArrayBuffer

return new File(
[data],
[arrayBuffer],
filename,
{ type: 'video/mp4' }
)
Expand Down
4 changes: 2 additions & 2 deletions apps/condo/pages/tour/guide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ const getTextWithAccent = (text: string) => {

return parts.map((part, index) => {
if (index % 2 === 0) {
return <Typography.Text type='secondary'>{part}</Typography.Text>
return <Typography.Text key={index} type='secondary'>{part}</Typography.Text>
} else {
return <Typography.Text type='primary'>{part}</Typography.Text>
return <Typography.Text key={index} type='primary'>{part}</Typography.Text>
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"stylelint-config-rational-order": "^0.1.2",
"stylelint-config-standard": "^28.0.0",
"turbo": "^2.4.4",
"typescript": "^5.8.3"
"typescript": "5.8.3"
},
"engines": {
"node": ">=24",
Expand Down
4 changes: 2 additions & 2 deletions packages/codegen/generate.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ export function generateReactHooks<

const count = (data && data.meta) ? data.meta.count : null
const typedRefetch: IRefetchType<GQLObject, QueryVariables> = refetch
const typedFetchMore: IFetchMoreType<GQLObject, QueryVariables> = fetchMore
const typedFetchMore = fetchMore as unknown as IFetchMoreType<GQLObject, QueryVariables>
const typedStopPolling: IStopPollingType = stopPolling

let readableError
Expand Down Expand Up @@ -362,7 +362,7 @@ export function generateReactHooks<
const objs: GQLObject[] = useMemo(() => (data && data.objs) ? data.objs.filter(nonNull) : [], [data])
const count = (data && data.meta) ? data.meta.count : null
const typedRefetch: IRefetchType<GQLObject, QueryVariables> = refetch
const typedFetchMore: IFetchMoreType<GQLObject, QueryVariables> = fetchMore
const typedFetchMore = fetchMore as unknown as IFetchMoreType<GQLObject, QueryVariables>
const typedStopPolling: IStopPollingType = stopPolling

let readableError
Expand Down
8 changes: 5 additions & 3 deletions packages/files/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,15 @@ export async function upload ({ serverUrl, files, meta, attach }: UploadOptions)
if (typeof Blob !== 'undefined' && f instanceof Blob) {
form.append('file', f, filename)
} else if (typeof Buffer !== 'undefined' && Buffer.isBuffer(f)) {
const blob = new Blob([f], { type: 'application/octet-stream' })
const arrayBuffer = f.buffer.slice(f.byteOffset, f.byteOffset + f.byteLength) as ArrayBuffer
const blob = new Blob([arrayBuffer], { type: 'application/octet-stream' })
form.append('file', blob, filename)
} else if (f && typeof f === 'object' && 'buffer' in f) {
const { buffer, filename: fn } = f as { buffer: Buffer, filename?: string }
const arrayBuffer = buffer.buffer.slice(buffer.byteOffset, buffer.byteOffset + buffer.byteLength) as ArrayBuffer
const file = typeof File !== 'undefined'
? new File([buffer], fn ?? filename, { type: 'application/octet-stream' })
: new Blob([buffer], { type: 'application/octet-stream' })
? new File([arrayBuffer], fn ?? filename, { type: 'application/octet-stream' })
: new Blob([arrayBuffer], { type: 'application/octet-stream' })
form.append('file', file as any, fn ?? filename)
} else {
throw new TypeError('Unsupported file type for append')
Expand Down