chore: bump oxlint & enable more supported rules (#14769)
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
"nest-commander": "^3.15.0",
|
||||
"nest-winston": "^1.9.7",
|
||||
"nestjs-cls": "^6.0.0",
|
||||
"nodemailer": "^7.0.11",
|
||||
"nodemailer": "^8.0.4",
|
||||
"on-headers": "^1.1.0",
|
||||
"piscina": "^5.1.4",
|
||||
"prisma": "^6.6.0",
|
||||
@@ -100,7 +100,6 @@
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"rxjs": "^7.8.2",
|
||||
"semver": "^7.7.3",
|
||||
"ses": "^1.14.0",
|
||||
"socket.io": "^4.8.1",
|
||||
"stripe": "^17.7.0",
|
||||
"tldts": "^7.0.19",
|
||||
@@ -127,7 +126,6 @@
|
||||
"@types/nodemailer": "^7.0.0",
|
||||
"@types/on-headers": "^1.0.3",
|
||||
"@types/react": "^19.0.1",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"@types/semver": "^7.5.8",
|
||||
"@types/sinon": "^21.0.0",
|
||||
"@types/supertest": "^7.0.0",
|
||||
|
||||
@@ -247,7 +247,7 @@ class TestGeminiVertexProvider extends GeminiVertexProvider {
|
||||
};
|
||||
}
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||
// oxlint-disable-next-line sonarjs/no-identical-functions
|
||||
protected override async fetchRemoteAttach(
|
||||
url: string,
|
||||
signal?: AbortSignal
|
||||
|
||||
@@ -8,7 +8,14 @@ import type { Request, Response } from 'express';
|
||||
import { ClsServiceManager } from 'nestjs-cls';
|
||||
import type { Socket } from 'socket.io';
|
||||
|
||||
export function getRequestResponseFromHost(host: ArgumentsHost) {
|
||||
type RequestResponse = {
|
||||
req: Request;
|
||||
res?: Response;
|
||||
};
|
||||
|
||||
export function getRequestResponseFromHost(
|
||||
host: ArgumentsHost
|
||||
): RequestResponse {
|
||||
switch (host.getType<GqlContextType>()) {
|
||||
case 'graphql': {
|
||||
const gqlContext = GqlArgumentsHost.create(host).getContext<{
|
||||
@@ -44,11 +51,13 @@ export function getRequestResponseFromHost(host: ArgumentsHost) {
|
||||
}
|
||||
}
|
||||
|
||||
export function getRequestFromHost(host: ArgumentsHost) {
|
||||
export function getRequestFromHost(host: ArgumentsHost): Request {
|
||||
return getRequestResponseFromHost(host).req;
|
||||
}
|
||||
|
||||
export function getRequestResponseFromContext(ctx: ExecutionContext) {
|
||||
export function getRequestResponseFromContext(
|
||||
ctx: ExecutionContext
|
||||
): RequestResponse {
|
||||
return getRequestResponseFromHost(ctx);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ export class Lock {
|
||||
private release: () => void = () => {};
|
||||
|
||||
async acquire() {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
// oxlint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
let release: () => void = null!;
|
||||
const nextLock = new Promise<void>(resolve => {
|
||||
release = resolve;
|
||||
|
||||
@@ -820,7 +820,7 @@ export class CalDAVProvider extends CalendarProvider {
|
||||
});
|
||||
}
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||
// oxlint-disable-next-line sonarjs/no-identical-functions
|
||||
override async exchangeCode(): Promise<any> {
|
||||
throw new GraphqlBadRequest({
|
||||
code: 'caldav_oauth_unsupported',
|
||||
@@ -828,7 +828,7 @@ export class CalDAVProvider extends CalendarProvider {
|
||||
});
|
||||
}
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||
// oxlint-disable-next-line sonarjs/no-identical-functions
|
||||
override async refreshTokens(): Promise<any> {
|
||||
throw new GraphqlBadRequest({
|
||||
code: 'caldav_oauth_unsupported',
|
||||
@@ -836,7 +836,7 @@ export class CalDAVProvider extends CalendarProvider {
|
||||
});
|
||||
}
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||
// oxlint-disable-next-line sonarjs/no-identical-functions
|
||||
override async getAccountProfile(): Promise<any> {
|
||||
throw new GraphqlBadRequest({
|
||||
code: 'caldav_oauth_unsupported',
|
||||
|
||||
@@ -344,7 +344,7 @@ export class CopilotTranscriptionResolver {
|
||||
user.id,
|
||||
workspaceId,
|
||||
blobId,
|
||||
// eslint-disable-next-line @typescript-eslint/await-thenable
|
||||
// oxlint-disable-next-line @typescript-eslint/await-thenable
|
||||
await Promise.all(allBlobs),
|
||||
input ?? undefined
|
||||
);
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"devDependencies": {
|
||||
"@graphql-codegen/add": "^5.0.3",
|
||||
"@graphql-codegen/cli": "^5.0.7",
|
||||
"@graphql-codegen/typescript": "^4.1.6",
|
||||
"@graphql-codegen/typescript-operations": "^4.6.1",
|
||||
@@ -25,7 +24,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@affine/debug": "workspace:*",
|
||||
"@affine/env": "workspace:*",
|
||||
"@affine/error": "workspace:*",
|
||||
"graphql": "^16.9.0",
|
||||
"lodash": "^4.17.23",
|
||||
|
||||
@@ -6,4 +6,4 @@ mutation generateUserAccessToken($input: GenerateAccessTokenInput!) {
|
||||
createdAt
|
||||
expiresAt
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
mutation revokeUserAccessToken($id: String!) {
|
||||
revokeUserAccessToken(id: $id)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
query appConfig {
|
||||
appConfig
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,4 +11,4 @@ mutation ImportUsers($input: ImportUsersInput!) {
|
||||
error
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
mutation sendTestEmail($host: String!, $port: Int!, $sender: String!, $username: String!, $password: String!, $ignoreTLS: Boolean!) {
|
||||
sendTestEmail(config: {
|
||||
host: $host,
|
||||
port: $port,
|
||||
sender: $sender,
|
||||
username: $username,
|
||||
password: $password,
|
||||
ignoreTLS: $ignoreTLS,
|
||||
})
|
||||
}
|
||||
mutation sendTestEmail(
|
||||
$host: String!
|
||||
$port: Int!
|
||||
$sender: String!
|
||||
$username: String!
|
||||
$password: String!
|
||||
$ignoreTLS: Boolean!
|
||||
) {
|
||||
sendTestEmail(
|
||||
config: {
|
||||
host: $host
|
||||
port: $port
|
||||
sender: $sender
|
||||
username: $username
|
||||
password: $password
|
||||
ignoreTLS: $ignoreTLS
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
mutation updateAppConfig($updates: [UpdateAppConfigInput!]!) {
|
||||
updateAppConfig(updates: $updates)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
mutation abortBlobUpload($workspaceId: String!, $key: String!, $uploadId: String!) {
|
||||
mutation abortBlobUpload(
|
||||
$workspaceId: String!
|
||||
$key: String!
|
||||
$uploadId: String!
|
||||
) {
|
||||
abortBlobUpload(workspaceId: $workspaceId, key: $key, uploadId: $uploadId)
|
||||
}
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
mutation completeBlobUpload($workspaceId: String!, $key: String!, $uploadId: String, $parts: [BlobUploadPartInput!]) {
|
||||
completeBlobUpload(workspaceId: $workspaceId, key: $key, uploadId: $uploadId, parts: $parts)
|
||||
mutation completeBlobUpload(
|
||||
$workspaceId: String!
|
||||
$key: String!
|
||||
$uploadId: String
|
||||
$parts: [BlobUploadPartInput!]
|
||||
) {
|
||||
completeBlobUpload(
|
||||
workspaceId: $workspaceId
|
||||
key: $key
|
||||
uploadId: $uploadId
|
||||
parts: $parts
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,5 +1,15 @@
|
||||
mutation createBlobUpload($workspaceId: String!, $key: String!, $size: Int!, $mime: String!) {
|
||||
createBlobUpload(workspaceId: $workspaceId, key: $key, size: $size, mime: $mime) {
|
||||
mutation createBlobUpload(
|
||||
$workspaceId: String!
|
||||
$key: String!
|
||||
$size: Int!
|
||||
$mime: String!
|
||||
) {
|
||||
createBlobUpload(
|
||||
workspaceId: $workspaceId
|
||||
key: $key
|
||||
size: $size
|
||||
mime: $mime
|
||||
) {
|
||||
method
|
||||
blobKey
|
||||
alreadyUploaded
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
query getBlobUploadPartUrl($workspaceId: String!, $key: String!, $uploadId: String!, $partNumber: Int!) {
|
||||
query getBlobUploadPartUrl(
|
||||
$workspaceId: String!
|
||||
$key: String!
|
||||
$uploadId: String!
|
||||
$partNumber: Int!
|
||||
) {
|
||||
workspace(id: $workspaceId) {
|
||||
blobUploadPartUrl(key: $key, uploadId: $uploadId, partNumber: $partNumber) {
|
||||
uploadUrl
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
mutation updateCalendarAccount($accountId: String!, $refreshIntervalMinutes: Int!) {
|
||||
updateCalendarAccount(accountId: $accountId, refreshIntervalMinutes: $refreshIntervalMinutes) {
|
||||
mutation updateCalendarAccount(
|
||||
$accountId: String!
|
||||
$refreshIntervalMinutes: Int!
|
||||
) {
|
||||
updateCalendarAccount(
|
||||
accountId: $accountId
|
||||
refreshIntervalMinutes: $refreshIntervalMinutes
|
||||
) {
|
||||
id
|
||||
provider
|
||||
providerAccountId
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
query listCommentChanges($workspaceId: String!, $docId: String!, $pagination: PaginationInput!) {
|
||||
query listCommentChanges(
|
||||
$workspaceId: String!
|
||||
$docId: String!
|
||||
$pagination: PaginationInput!
|
||||
) {
|
||||
workspace(id: $workspaceId) {
|
||||
commentChanges(docId: $docId, pagination: $pagination) {
|
||||
totalCount
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
query listComments($workspaceId: String!, $docId: String!, $pagination: PaginationInput) {
|
||||
query listComments(
|
||||
$workspaceId: String!
|
||||
$docId: String!
|
||||
$pagination: PaginationInput
|
||||
) {
|
||||
workspace(id: $workspaceId) {
|
||||
comments(docId: $docId, pagination: $pagination) {
|
||||
totalCount
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
mutation uploadCommentAttachment($workspaceId: String!, $docId: String!, $attachment: Upload!) {
|
||||
uploadCommentAttachment(workspaceId: $workspaceId, docId: $docId, attachment: $attachment)
|
||||
mutation uploadCommentAttachment(
|
||||
$workspaceId: String!
|
||||
$docId: String!
|
||||
$attachment: Upload!
|
||||
) {
|
||||
uploadCommentAttachment(
|
||||
workspaceId: $workspaceId
|
||||
docId: $docId
|
||||
attachment: $attachment
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
mutation applyDocUpdates($workspaceId: String!, $docId: String!, $op: String!, $updates: String!) {
|
||||
applyDocUpdates(workspaceId: $workspaceId, docId: $docId, op: $op, updates: $updates)
|
||||
}
|
||||
mutation applyDocUpdates(
|
||||
$workspaceId: String!
|
||||
$docId: String!
|
||||
$op: String!
|
||||
$updates: String!
|
||||
) {
|
||||
applyDocUpdates(
|
||||
workspaceId: $workspaceId
|
||||
docId: $docId
|
||||
op: $op
|
||||
updates: $updates
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,8 +1,20 @@
|
||||
query matchContext($contextId: String, $workspaceId: String, $content: String!, $limit: SafeInt, $scopedThreshold: Float, $threshold: Float) {
|
||||
query matchContext(
|
||||
$contextId: String
|
||||
$workspaceId: String
|
||||
$content: String!
|
||||
$limit: SafeInt
|
||||
$scopedThreshold: Float
|
||||
$threshold: Float
|
||||
) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
contexts(contextId: $contextId) {
|
||||
matchFiles(content: $content, limit: $limit, scopedThreshold: $scopedThreshold, threshold: $threshold) {
|
||||
matchFiles(
|
||||
content: $content
|
||||
limit: $limit
|
||||
scopedThreshold: $scopedThreshold
|
||||
threshold: $threshold
|
||||
) {
|
||||
fileId
|
||||
blobId
|
||||
name
|
||||
@@ -11,7 +23,12 @@ query matchContext($contextId: String, $workspaceId: String, $content: String!,
|
||||
content
|
||||
distance
|
||||
}
|
||||
matchWorkspaceDocs(content: $content, limit: $limit, scopedThreshold: $scopedThreshold, threshold: $threshold) {
|
||||
matchWorkspaceDocs(
|
||||
content: $content
|
||||
limit: $limit
|
||||
scopedThreshold: $scopedThreshold
|
||||
threshold: $threshold
|
||||
) {
|
||||
docId
|
||||
chunk
|
||||
content
|
||||
|
||||
@@ -1,8 +1,20 @@
|
||||
query matchWorkspaceDocs($contextId: String, $workspaceId: String, $content: String!, $limit: SafeInt, $scopedThreshold: Float, $threshold: Float) {
|
||||
query matchWorkspaceDocs(
|
||||
$contextId: String
|
||||
$workspaceId: String
|
||||
$content: String!
|
||||
$limit: SafeInt
|
||||
$scopedThreshold: Float
|
||||
$threshold: Float
|
||||
) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
contexts(contextId: $contextId) {
|
||||
matchWorkspaceDocs(content: $content, limit: $limit, scopedThreshold: $scopedThreshold, threshold: $threshold) {
|
||||
matchWorkspaceDocs(
|
||||
content: $content
|
||||
limit: $limit
|
||||
scopedThreshold: $scopedThreshold
|
||||
threshold: $threshold
|
||||
) {
|
||||
docId
|
||||
chunk
|
||||
content
|
||||
@@ -11,4 +23,4 @@ query matchWorkspaceDocs($contextId: String, $workspaceId: String, $content: Str
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,20 @@
|
||||
query matchFiles($contextId: String, $workspaceId: String, $content: String!, $limit: SafeInt, $scopedThreshold: Float, $threshold: Float) {
|
||||
query matchFiles(
|
||||
$contextId: String
|
||||
$workspaceId: String
|
||||
$content: String!
|
||||
$limit: SafeInt
|
||||
$scopedThreshold: Float
|
||||
$threshold: Float
|
||||
) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
contexts(contextId: $contextId) {
|
||||
matchFiles(content: $content, limit: $limit, scopedThreshold: $scopedThreshold, threshold: $threshold) {
|
||||
matchFiles(
|
||||
content: $content
|
||||
limit: $limit
|
||||
scopedThreshold: $scopedThreshold
|
||||
threshold: $threshold
|
||||
) {
|
||||
fileId
|
||||
blobId
|
||||
chunk
|
||||
|
||||
@@ -8,11 +8,15 @@ query getCopilotPinnedSessions(
|
||||
) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
chats(pagination: { first: 1 }, docId: $docId, options: {
|
||||
pinned: true,
|
||||
messageOrder: $messageOrder,
|
||||
withPrompt: $withPrompt
|
||||
}) {
|
||||
chats(
|
||||
pagination: { first: 1 }
|
||||
docId: $docId
|
||||
options: {
|
||||
pinned: true
|
||||
messageOrder: $messageOrder
|
||||
withPrompt: $withPrompt
|
||||
}
|
||||
) {
|
||||
...PaginatedCopilotChats
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,17 @@
|
||||
mutation submitAudioTranscription($workspaceId: String!, $blobId: String!, $blob: Upload, $blobs: [Upload!], $input: SubmitAudioTranscriptionInput) {
|
||||
submitAudioTranscription(blob: $blob, blobs: $blobs, blobId: $blobId, workspaceId: $workspaceId, input: $input) {
|
||||
mutation submitAudioTranscription(
|
||||
$workspaceId: String!
|
||||
$blobId: String!
|
||||
$blob: Upload
|
||||
$blobs: [Upload!]
|
||||
$input: SubmitAudioTranscriptionInput
|
||||
) {
|
||||
submitAudioTranscription(
|
||||
blob: $blob
|
||||
blobs: $blobs
|
||||
blobId: $blobId
|
||||
workspaceId: $workspaceId
|
||||
input: $input
|
||||
) {
|
||||
id
|
||||
status
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
#import "./fragments/paginated-copilot-chats.gql"
|
||||
|
||||
query getCopilotLatestDocSession(
|
||||
$workspaceId: String!
|
||||
$docId: String!
|
||||
) {
|
||||
query getCopilotLatestDocSession($workspaceId: String!, $docId: String!) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
chats(
|
||||
|
||||
@@ -1,15 +1,9 @@
|
||||
#import "./fragments/paginated-copilot-chats.gql"
|
||||
|
||||
query getCopilotSession(
|
||||
$workspaceId: String!
|
||||
$sessionId: String!
|
||||
) {
|
||||
query getCopilotSession($workspaceId: String!, $sessionId: String!) {
|
||||
currentUser {
|
||||
copilot(workspaceId: $workspaceId) {
|
||||
chats(
|
||||
pagination: { first: 1 }
|
||||
options: { sessionId: $sessionId }
|
||||
) {
|
||||
chats(pagination: { first: 1 }, options: { sessionId: $sessionId }) {
|
||||
...PaginatedCopilotChats
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
query getWorkspaceEmbeddingFiles($workspaceId: String!, $pagination: PaginationInput!) {
|
||||
query getWorkspaceEmbeddingFiles(
|
||||
$workspaceId: String!
|
||||
$pagination: PaginationInput!
|
||||
) {
|
||||
workspace(id: $workspaceId) {
|
||||
embedding {
|
||||
files(pagination: $pagination) {
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
mutation removeWorkspaceEmbeddingFiles($workspaceId: String!, $fileId: String!) {
|
||||
mutation removeWorkspaceEmbeddingFiles(
|
||||
$workspaceId: String!
|
||||
$fileId: String!
|
||||
) {
|
||||
removeWorkspaceEmbeddingFiles(workspaceId: $workspaceId, fileId: $fileId)
|
||||
}
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
mutation addWorkspaceEmbeddingIgnoredDocs($workspaceId: String!, $add: [String!]!) {
|
||||
mutation addWorkspaceEmbeddingIgnoredDocs(
|
||||
$workspaceId: String!
|
||||
$add: [String!]!
|
||||
) {
|
||||
updateWorkspaceEmbeddingIgnoredDocs(workspaceId: $workspaceId, add: $add)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
query getWorkspaceEmbeddingIgnoredDocs($workspaceId: String!, $pagination: PaginationInput!) {
|
||||
query getWorkspaceEmbeddingIgnoredDocs(
|
||||
$workspaceId: String!
|
||||
$pagination: PaginationInput!
|
||||
) {
|
||||
workspace(id: $workspaceId) {
|
||||
embedding {
|
||||
ignoredDocs(pagination: $pagination) {
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
mutation removeWorkspaceEmbeddingIgnoredDocs($workspaceId: String!, $remove: [String!]!) {
|
||||
updateWorkspaceEmbeddingIgnoredDocs(workspaceId: $workspaceId, remove: $remove)
|
||||
mutation removeWorkspaceEmbeddingIgnoredDocs(
|
||||
$workspaceId: String!
|
||||
$remove: [String!]!
|
||||
) {
|
||||
updateWorkspaceEmbeddingIgnoredDocs(
|
||||
workspaceId: $workspaceId
|
||||
remove: $remove
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
mutation createSelfhostCustomerPortal ($workspaceId: String!) {
|
||||
mutation createSelfhostCustomerPortal($workspaceId: String!) {
|
||||
createSelfhostWorkspaceCustomerPortal(workspaceId: $workspaceId)
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
query getDocCreatedByUpdatedByList($workspaceId: String!, $pagination: PaginationInput!) {
|
||||
query getDocCreatedByUpdatedByList(
|
||||
$workspaceId: String!
|
||||
$pagination: PaginationInput!
|
||||
) {
|
||||
workspace(id: $workspaceId) {
|
||||
docs(pagination: $pagination) {
|
||||
totalCount
|
||||
pageInfo {
|
||||
endCursor
|
||||
endCursor
|
||||
hasNextPage
|
||||
}
|
||||
edges {
|
||||
@@ -15,4 +18,4 @@ query getDocCreatedByUpdatedByList($workspaceId: String!, $pagination: Paginatio
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,4 +4,4 @@ query getDocDefaultRole($workspaceId: String!, $docId: String!) {
|
||||
defaultRole
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,4 +4,4 @@ query getDocSummary($workspaceId: String!, $docId: String!) {
|
||||
summary
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
query getMembersByWorkspaceId($workspaceId: String!, $skip: Int, $take: Int, $query: String) {
|
||||
query getMembersByWorkspaceId(
|
||||
$workspaceId: String!
|
||||
$skip: Int
|
||||
$take: Int
|
||||
$query: String
|
||||
) {
|
||||
workspace(id: $workspaceId) {
|
||||
memberCount
|
||||
members(skip: $skip, take: $take, query: $query) {
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
query getPageGrantedUsersList($pagination: PaginationInput!, $docId: String!, $workspaceId: String!) {
|
||||
query getPageGrantedUsersList(
|
||||
$pagination: PaginationInput!
|
||||
$docId: String!
|
||||
$workspaceId: String!
|
||||
) {
|
||||
workspace(id: $workspaceId) {
|
||||
doc(docId: $docId) {
|
||||
grantedUsersList(pagination: $pagination) {
|
||||
@@ -21,4 +25,4 @@ query getPageGrantedUsersList($pagination: PaginationInput!, $docId: String!, $w
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
query getPublicUserById($id: String!) {
|
||||
publicUserById(id: $id) {
|
||||
id
|
||||
avatarUrl
|
||||
name
|
||||
}
|
||||
}
|
||||
publicUserById(id: $id) {
|
||||
id
|
||||
avatarUrl
|
||||
name
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
query getRecentlyUpdatedDocs($workspaceId: String!, $pagination: PaginationInput!) {
|
||||
query getRecentlyUpdatedDocs(
|
||||
$workspaceId: String!
|
||||
$pagination: PaginationInput!
|
||||
) {
|
||||
workspace(id: $workspaceId) {
|
||||
recentlyUpdatedDocs(pagination: $pagination) {
|
||||
totalCount
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
mutation grantDocUserRoles($input: GrantDocUserRolesInput!) {
|
||||
grantDocUserRoles(input: $input)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,4 +4,4 @@ mutation activateLicense($workspaceId: String!, $license: String!) {
|
||||
activateLicense(workspaceId: $workspaceId, license: $license) {
|
||||
...licenseBody
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
mutation deactivateLicense($workspaceId: String!) {
|
||||
deactivateLicense(workspaceId: $workspaceId)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,4 +4,4 @@ mutation installLicense($workspaceId: String!, $license: Upload!) {
|
||||
installLicense(workspaceId: $workspaceId, license: $license) {
|
||||
...licenseBody
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,4 +5,4 @@ fragment licenseBody on License {
|
||||
recurring
|
||||
validatedAt
|
||||
variant
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,4 +22,4 @@ query listNotifications($pagination: PaginationInput!) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
mutation mentionUser($input: MentionInput!) {
|
||||
mentionUser(input: $input)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
mutation readNotification($id: String!) {
|
||||
readNotification(id: $id)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
mutation revokeDocUserRoles($input: RevokeDocUserRoleInput!) {
|
||||
revokeDocUserRoles(input: $input)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
mutation updateDocDefaultRole($input: UpdateDocDefaultRoleInput!) {
|
||||
updateDocDefaultRole(input: $input)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
mutation updateDocUserRole($input: UpdateDocUserRoleInput!) {
|
||||
updateDocUserRole(input: $input)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
mutation inviteByEmails(
|
||||
$workspaceId: String!
|
||||
$emails: [String!]!
|
||||
) {
|
||||
inviteMembers(
|
||||
workspaceId: $workspaceId
|
||||
emails: $emails
|
||||
) {
|
||||
mutation inviteByEmails($workspaceId: String!, $emails: [String!]!) {
|
||||
inviteMembers(workspaceId: $workspaceId, emails: $emails) {
|
||||
email
|
||||
inviteId
|
||||
sentSuccess
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
mutation acceptInviteByInviteId(
|
||||
$workspaceId: String!
|
||||
$inviteId: String!
|
||||
) {
|
||||
acceptInviteById(
|
||||
workspaceId: $workspaceId
|
||||
inviteId: $inviteId
|
||||
)
|
||||
mutation acceptInviteByInviteId($workspaceId: String!, $inviteId: String!) {
|
||||
acceptInviteById(workspaceId: $workspaceId, inviteId: $inviteId)
|
||||
}
|
||||
|
||||
@@ -6,9 +6,5 @@
|
||||
"outDir": "./dist",
|
||||
"tsBuildInfoFile": "./dist/tsconfig.tsbuildinfo"
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../debug" },
|
||||
{ "path": "../env" },
|
||||
{ "path": "../error" }
|
||||
]
|
||||
"references": [{ "path": "../debug" }, { "path": "../error" }]
|
||||
}
|
||||
|
||||
@@ -18,11 +18,7 @@
|
||||
"@affine/templates": "workspace:*",
|
||||
"@preact/signals-core": "^1.8.0",
|
||||
"eventemitter2": "^6.4.9",
|
||||
"foxact": "^0.2.49",
|
||||
"fractional-indexing": "^3.2.0",
|
||||
"fuse.js": "^7.0.0",
|
||||
"graphemer": "^1.4.0",
|
||||
"idb": "^8.0.0",
|
||||
"jotai": "^2.10.3",
|
||||
"jotai-effect": "^2.0.0",
|
||||
"lodash-es": "^4.17.23",
|
||||
@@ -32,12 +28,9 @@
|
||||
"zod": "^3.25.76"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@affine/templates": "workspace:*",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@testing-library/dom": "^10.4.0",
|
||||
"@testing-library/react": "^16.1.0",
|
||||
"@types/react": "^19.0.1",
|
||||
"fake-indexeddb": "^6.0.0",
|
||||
"rxjs": "^7.8.2",
|
||||
"vitest": "^4.0.18"
|
||||
},
|
||||
|
||||
@@ -226,7 +226,7 @@ class Resolver extends FrameworkProvider {
|
||||
const result = new Map<ComponentVariant, any>();
|
||||
|
||||
for (const [variant, factory] of vars) {
|
||||
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||
// oxlint-disable-next-line sonarjs/no-identical-functions
|
||||
const runFactory = () => {
|
||||
const nextResolver = this.track(identifier);
|
||||
try {
|
||||
|
||||
@@ -516,7 +516,7 @@ export class LiveData<T = unknown>
|
||||
const subscription = this.subscribe(v => {
|
||||
if (predicate(v)) {
|
||||
resolve(v as any);
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
// oxlint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
Promise.resolve().then(() => {
|
||||
subscription.unsubscribe();
|
||||
});
|
||||
@@ -554,7 +554,7 @@ export class LiveData<T = unknown>
|
||||
throw this.poisonedError;
|
||||
}
|
||||
this.ops$.next('watch');
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises -- never throw
|
||||
// oxlint-disable-next-line @typescript-eslint/no-floating-promises -- never throw
|
||||
Promise.resolve().then(() => {
|
||||
this.ops$.next('unwatch');
|
||||
});
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
"@toeverything/infra": "workspace:*",
|
||||
"eventemitter2": "^6.4.9",
|
||||
"graphemer": "^1.4.0",
|
||||
"lib0": "^0.2.114",
|
||||
"lodash-es": "^4.17.23",
|
||||
"nanoid": "^5.1.6",
|
||||
"rxjs": "^7.8.2",
|
||||
|
||||
@@ -102,7 +102,7 @@ export class IntegerInvertedIndex implements InvertedIndex {
|
||||
return match;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||
// oxlint-disable-next-line sonarjs/no-identical-functions
|
||||
async all(trx: DataStructROTransaction): Promise<Match> {
|
||||
const objs = await trx
|
||||
.objectStore('invertedIndex')
|
||||
@@ -149,7 +149,7 @@ export class BooleanInvertedIndex implements InvertedIndex {
|
||||
readonly fieldKey: string
|
||||
) {}
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||
// oxlint-disable-next-line sonarjs/no-identical-functions
|
||||
async all(trx: DataStructROTransaction): Promise<Match> {
|
||||
const objs = await trx
|
||||
.objectStore('invertedIndex')
|
||||
@@ -350,7 +350,7 @@ export class FullTextInvertedIndex implements InvertedIndex {
|
||||
return match;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||
// oxlint-disable-next-line sonarjs/no-identical-functions
|
||||
async all(trx: DataStructROTransaction): Promise<Match> {
|
||||
const objs = await trx
|
||||
.objectStore('invertedIndex')
|
||||
|
||||
@@ -26,7 +26,7 @@ export class Lock {
|
||||
private release: () => void = () => {};
|
||||
|
||||
async acquire() {
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
// oxlint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
let release: () => void = null!;
|
||||
const nextLock = new Promise<void>(resolve => {
|
||||
release = resolve;
|
||||
|
||||
@@ -190,7 +190,7 @@ export class BlobSyncImpl implements BlobSync {
|
||||
): Promise<void> {
|
||||
return Promise.race([
|
||||
Promise.all(
|
||||
// eslint-disable-next-line @typescript-eslint/await-thenable
|
||||
// oxlint-disable-next-line @typescript-eslint/await-thenable
|
||||
peerId
|
||||
? [this.fullDownloadPeer(peerId)]
|
||||
: this.peers.map(p => this.fullDownloadPeer(p.peerId))
|
||||
|
||||
@@ -94,7 +94,7 @@ export class BlobSyncPeer {
|
||||
Math.pow(2, attempts - 1) * backoffRetry.delay,
|
||||
backoffRetry.maxDelay
|
||||
);
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
// oxlint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
setTimeout(attempt, waitTime);
|
||||
} else {
|
||||
// reach the max retry times, resolve the promise with false
|
||||
@@ -107,7 +107,7 @@ export class BlobSyncPeer {
|
||||
}
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
// oxlint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
attempt();
|
||||
})
|
||||
.catch(error => {
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
"s3mini": "^0.9.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/aws4": "^1.11.6",
|
||||
"vitest": "^4.0.18"
|
||||
"@types/aws4": "^1.11.6"
|
||||
},
|
||||
"version": "0.26.3"
|
||||
}
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
"@radix-ui/react-tooltip": "^1.1.5",
|
||||
"@sentry/react": "^10.40.0",
|
||||
"@tanstack/react-table": "^8.20.5",
|
||||
"@toeverything/infra": "workspace:*",
|
||||
"@toeverything/theme": "^1.1.23",
|
||||
"cmdk": "^1.0.4",
|
||||
"embla-carousel-react": "^8.5.1",
|
||||
@@ -56,16 +55,13 @@
|
||||
"recharts": "^2.15.4",
|
||||
"sonner": "^2.0.7",
|
||||
"swr": "^2.3.7",
|
||||
"vaul": "^1.1.2",
|
||||
"zod": "^3.25.76"
|
||||
"vaul": "^1.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@testing-library/react": "^16.3.2",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"class-variance-authority": "^0.7.1",
|
||||
"clsx": "^2.1.1",
|
||||
"cross-env": "^10.1.0",
|
||||
"shadcn-ui": "^0.9.5",
|
||||
"tailwind-merge": "^3.4.0",
|
||||
"tailwindcss": "^4.1.17",
|
||||
"tailwindcss-animate": "^1.0.7",
|
||||
|
||||
@@ -5,5 +5,5 @@ import { createRoot } from 'react-dom/client';
|
||||
|
||||
import { App } from './app';
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
// oxlint-disable-next-line @typescript-eslint/no-non-null-assertion
|
||||
createRoot(document.getElementById('app')!).render(<App />);
|
||||
|
||||
@@ -323,7 +323,7 @@ export const useExportUsers = () => {
|
||||
});
|
||||
dataToCopy.push(row);
|
||||
});
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
// oxlint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
navigator.clipboard.writeText(JSON.stringify(dataToCopy, null, 2));
|
||||
callback?.();
|
||||
},
|
||||
|
||||
@@ -13,7 +13,6 @@
|
||||
{ "path": "../core" },
|
||||
{ "path": "../../common/error" },
|
||||
{ "path": "../../common/graphql" },
|
||||
{ "path": "../routes" },
|
||||
{ "path": "../../common/infra" }
|
||||
{ "path": "../routes" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -19,14 +19,12 @@
|
||||
"@affine/nbstore": "workspace:*",
|
||||
"@affine/track": "workspace:*",
|
||||
"@blocksuite/affine": "workspace:*",
|
||||
"@blocksuite/icons": "^2.2.17",
|
||||
"@capacitor/android": "^7.0.0",
|
||||
"@capacitor/app": "^7.0.0",
|
||||
"@capacitor/core": "^7.0.0",
|
||||
"@capacitor/keyboard": "^7.0.0",
|
||||
"@capacitor/status-bar": "^7.0.0",
|
||||
"@capgo/inappbrowser": "^8.0.0",
|
||||
"@sentry/react": "^10.40.0",
|
||||
"@toeverything/infra": "workspace:*",
|
||||
"async-call-rpc": "^6.4.2",
|
||||
"idb": "^8.0.0",
|
||||
@@ -39,7 +37,6 @@
|
||||
"@capacitor/cli": "^7.0.0",
|
||||
"@types/react": "^19.0.1",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"cross-env": "^10.1.0",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,23 +17,18 @@
|
||||
"@affine/track": "workspace:*",
|
||||
"@blocksuite/affine": "workspace:*",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@sentry/react": "^10.40.0",
|
||||
"@toeverything/infra": "workspace:*",
|
||||
"@toeverything/theme": "^1.1.23",
|
||||
"@vanilla-extract/css": "^1.17.0",
|
||||
"async-call-rpc": "^6.4.2",
|
||||
"next-themes": "^0.4.4",
|
||||
"react": "^19.2.1",
|
||||
"react-dom": "^19.2.1",
|
||||
"react-router-dom": "^6.30.3",
|
||||
"uuid": "^13.0.0",
|
||||
"webm-muxer": "^5.0.3"
|
||||
"uuid": "^13.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@affine-tools/utils": "workspace:*",
|
||||
"@types/react": "^19.0.1",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"cross-env": "^10.1.0",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
{ "path": "../../../common/nbstore" },
|
||||
{ "path": "../../track" },
|
||||
{ "path": "../../../../blocksuite/affine/all" },
|
||||
{ "path": "../../../common/infra" },
|
||||
{ "path": "../../../../tools/utils" }
|
||||
{ "path": "../../../common/infra" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -49,10 +49,8 @@
|
||||
"@reforged/maker-appimage": "^5.2.0",
|
||||
"@sentry/electron": "^7.9.0",
|
||||
"@sentry/esbuild-plugin": "^5.1.1",
|
||||
"@sentry/react": "^10.40.0",
|
||||
"@toeverything/infra": "workspace:*",
|
||||
"@types/set-cookie-parser": "^2.4.10",
|
||||
"@types/uuid": "^11.0.0",
|
||||
"@vitejs/plugin-react-swc": "^4.0.0",
|
||||
"app-builder-lib": "^26.8.1",
|
||||
"builder-util-runtime": "^9.5.1",
|
||||
@@ -80,7 +78,6 @@
|
||||
"async-call-rpc": "^6.4.2",
|
||||
"electron-updater": "^6.8.3",
|
||||
"link-preview-js": "^4.0.0",
|
||||
"next-themes": "^0.4.4",
|
||||
"set-cookie-parser": "^2.7.1",
|
||||
"yjs": "^13.6.27"
|
||||
},
|
||||
|
||||
@@ -23,14 +23,12 @@
|
||||
"@affine/nbstore": "workspace:*",
|
||||
"@affine/track": "workspace:*",
|
||||
"@blocksuite/affine": "workspace:*",
|
||||
"@blocksuite/icons": "^2.2.17",
|
||||
"@capacitor/app": "^7.0.0",
|
||||
"@capacitor/browser": "^7.0.0",
|
||||
"@capacitor/core": "^7.0.0",
|
||||
"@capacitor/haptics": "^7.0.0",
|
||||
"@capacitor/ios": "^7.0.0",
|
||||
"@capacitor/keyboard": "^7.0.0",
|
||||
"@sentry/react": "^10.40.0",
|
||||
"@toeverything/infra": "workspace:^",
|
||||
"async-call-rpc": "^6.4.2",
|
||||
"capacitor-plugin-app-tracking-transparency": "^2.0.5",
|
||||
@@ -38,17 +36,14 @@
|
||||
"next-themes": "^0.4.4",
|
||||
"react": "^19.2.1",
|
||||
"react-dom": "^19.2.1",
|
||||
"react-router-dom": "^6.30.3",
|
||||
"yjs": "^13.6.27"
|
||||
"react-router-dom": "^6.30.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@affine-tools/cli": "workspace:*",
|
||||
"@affine-tools/utils": "workspace:*",
|
||||
"@affine/native": "workspace:*",
|
||||
"@capacitor/cli": "^7.0.0",
|
||||
"@types/react": "^19.0.1",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"cross-env": "^10.1.0",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
{ "path": "../../../../blocksuite/affine/all" },
|
||||
{ "path": "../../../common/infra" },
|
||||
{ "path": "../../../../tools/cli" },
|
||||
{ "path": "../../../../tools/utils" },
|
||||
{ "path": "../../native" }
|
||||
{ "path": "../../../../tools/utils" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -12,12 +12,9 @@
|
||||
"@affine/component": "workspace:*",
|
||||
"@affine/core": "workspace:*",
|
||||
"@affine/env": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@affine/nbstore": "workspace:*",
|
||||
"@affine/track": "workspace:*",
|
||||
"@blocksuite/affine": "workspace:*",
|
||||
"@blocksuite/icons": "^2.2.17",
|
||||
"@sentry/react": "^10.40.0",
|
||||
"@toeverything/infra": "workspace:*",
|
||||
"react": "^19.2.1",
|
||||
"react-dom": "^19.2.1",
|
||||
@@ -26,7 +23,6 @@
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.0.1",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"cross-env": "^10.1.0",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
{ "path": "../../component" },
|
||||
{ "path": "../../core" },
|
||||
{ "path": "../../../common/env" },
|
||||
{ "path": "../../i18n" },
|
||||
{ "path": "../../../common/nbstore" },
|
||||
{ "path": "../../track" },
|
||||
{ "path": "../../../../blocksuite/affine/all" },
|
||||
|
||||
@@ -12,11 +12,9 @@
|
||||
"@affine/component": "workspace:*",
|
||||
"@affine/core": "workspace:*",
|
||||
"@affine/env": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
"@affine/nbstore": "workspace:*",
|
||||
"@affine/track": "workspace:*",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@sentry/react": "^10.40.0",
|
||||
"@toeverything/infra": "workspace:*",
|
||||
"react": "^19.2.1",
|
||||
"react-dom": "^19.2.1",
|
||||
@@ -25,7 +23,6 @@
|
||||
"devDependencies": {
|
||||
"@types/react": "^19.0.1",
|
||||
"@types/react-dom": "^19.0.2",
|
||||
"cross-env": "^10.1.0",
|
||||
"typescript": "^5.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
{ "path": "../../component" },
|
||||
{ "path": "../../core" },
|
||||
{ "path": "../../../common/env" },
|
||||
{ "path": "../../i18n" },
|
||||
{ "path": "../../../common/nbstore" },
|
||||
{ "path": "../../track" },
|
||||
{ "path": "../../../common/infra" }
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@affine/debug": "workspace:*",
|
||||
"@affine/electron-api": "workspace:*",
|
||||
"@affine/error": "workspace:*",
|
||||
"@affine/graphql": "workspace:*",
|
||||
"@affine/i18n": "workspace:*",
|
||||
@@ -51,7 +50,6 @@
|
||||
"check-password-strength": "^3.0.0",
|
||||
"clsx": "^2.1.1",
|
||||
"dayjs": "^1.11.13",
|
||||
"emoji-mart": "^5.6.0",
|
||||
"emojibase-data": "^16.0.3",
|
||||
"foxact": "^0.2.49",
|
||||
"jotai": "^2.10.3",
|
||||
@@ -72,7 +70,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@affine-tools/utils": "workspace:*",
|
||||
"@blocksuite/affine": "workspace:*",
|
||||
"@storybook/react": "^10.2.14",
|
||||
"@storybook/react-vite": "^10.2.14",
|
||||
"@testing-library/dom": "^10.4.0",
|
||||
|
||||
@@ -216,7 +216,7 @@ export const OnboardingPage = ({
|
||||
],
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
// oxlint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
fetch('/api/worker/questionnaire', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(answer),
|
||||
|
||||
@@ -13,11 +13,9 @@
|
||||
},
|
||||
"references": [
|
||||
{ "path": "../../common/debug" },
|
||||
{ "path": "../electron-api" },
|
||||
{ "path": "../../common/error" },
|
||||
{ "path": "../../common/graphql" },
|
||||
{ "path": "../i18n" },
|
||||
{ "path": "../../../tools/utils" },
|
||||
{ "path": "../../../blocksuite/affine/all" }
|
||||
{ "path": "../../../tools/utils" }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -28,10 +28,8 @@
|
||||
"@blocksuite/std": "workspace:*",
|
||||
"@emotion/cache": "^11.14.0",
|
||||
"@emotion/css": "^11.13.5",
|
||||
"@emotion/react": "^11.14.0",
|
||||
"@floating-ui/dom": "^1.6.13",
|
||||
"@juggle/resize-observer": "^3.4.0",
|
||||
"@lit/context": "^1.1.4",
|
||||
"@lottiefiles/dotlottie-wc": "^0.9.4",
|
||||
"@marsidev/react-turnstile": "^1.1.0",
|
||||
"@myriaddreamin/typst-ts-renderer": "^0.7.0-rc2",
|
||||
@@ -39,7 +37,6 @@
|
||||
"@myriaddreamin/typst.ts": "^0.7.0-rc2",
|
||||
"@preact/signals-core": "^1.8.0",
|
||||
"@radix-ui/react-collapsible": "^1.1.2",
|
||||
"@radix-ui/react-context-menu": "^2.1.15",
|
||||
"@radix-ui/react-dialog": "^1.1.3",
|
||||
"@radix-ui/react-popover": "^1.1.3",
|
||||
"@radix-ui/react-scroll-area": "^1.2.2",
|
||||
@@ -51,7 +48,6 @@
|
||||
"@toeverything/pdf-viewer": "^0.1.1",
|
||||
"@toeverything/theme": "^1.1.23",
|
||||
"@vanilla-extract/dynamic": "^2.1.2",
|
||||
"@webcontainer/api": "^1.6.1",
|
||||
"animejs": "^4.0.0",
|
||||
"bytes": "^3.1.2",
|
||||
"clsx": "^2.1.1",
|
||||
@@ -68,13 +64,11 @@
|
||||
"graphql": "^16.9.0",
|
||||
"history": "^5.3.0",
|
||||
"idb": "^8.0.0",
|
||||
"idb-keyval": "^6.2.2",
|
||||
"image-blob-reduce": "^4.1.0",
|
||||
"is-svg": "^6.1.0",
|
||||
"jotai": "^2.10.3",
|
||||
"jotai-scope": "^0.7.2",
|
||||
"katex": "^0.16.27",
|
||||
"lib0": "^0.2.114",
|
||||
"lit": "^3.2.1",
|
||||
"lodash-es": "^4.17.23",
|
||||
"lottie-react": "^2.4.0",
|
||||
@@ -92,7 +86,6 @@
|
||||
"recharts": "^2.15.4",
|
||||
"rxjs": "^7.8.2",
|
||||
"semver": "^7.7.3",
|
||||
"ses": "^1.14.0",
|
||||
"shiki": "^3.19.0",
|
||||
"socket.io-client": "^4.8.3",
|
||||
"swr": "^2.3.7",
|
||||
@@ -105,7 +98,6 @@
|
||||
"@blocksuite/affine-ext-loader": "workspace:*",
|
||||
"@testing-library/dom": "^10.4.0",
|
||||
"@testing-library/react": "^16.1.0",
|
||||
"@types/animejs": "^3.1.12",
|
||||
"@types/bytes": "^3.1.5",
|
||||
"@types/image-blob-reduce": "^4.1.4",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
@@ -113,7 +105,6 @@
|
||||
"@vanilla-extract/css": "^1.17.0",
|
||||
"fake-indexeddb": "^6.0.0",
|
||||
"happy-dom": "^20.3.0",
|
||||
"lodash-es": "^4.17.23",
|
||||
"vitest": "^4.0.18"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -376,7 +376,7 @@ export class CodeArtifactTool extends ArtifactTool<
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.code-artifact-preview > html-preview {
|
||||
.code-artifact-preview > affine-html-preview {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@@ -487,7 +487,7 @@ export class CodeArtifactTool extends ArtifactTool<
|
||||
|
||||
return html`<div class="code-artifact-preview">
|
||||
${this.mode === 'preview'
|
||||
? html`<html-preview .html=${htmlContent}></html-preview>`
|
||||
? html`<affine-html-preview .html=${htmlContent}></affine-html-preview>`
|
||||
: html`<code-highlighter
|
||||
.std=${this.std}
|
||||
.code=${htmlContent}
|
||||
|
||||
@@ -304,11 +304,11 @@ export class PlaygroundContent extends SignalWatcher(
|
||||
}
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
// oxlint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
button.addEventListener('click', handleSendClick);
|
||||
|
||||
this._disposables.add(() => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
// oxlint-disable-next-line @typescript-eslint/no-misused-promises
|
||||
button.removeEventListener('click', handleSendClick);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
||||
// oxlint-disable-next-line no-restricted-imports
|
||||
import 'katex/dist/katex.min.css';
|
||||
|
||||
import { useConfirmModal, useLitPortalFactory } from '@affine/component';
|
||||
|
||||
@@ -50,10 +50,7 @@ export const usePageHelper = (docCollection: Workspace) => {
|
||||
|
||||
const createEdgelessAndOpen = useCallback(
|
||||
(
|
||||
options: {
|
||||
at?: 'new-tab' | 'tail' | 'active';
|
||||
show?: boolean;
|
||||
} = {
|
||||
options: { at?: 'new-tab' | 'tail' | 'active'; show?: boolean } = {
|
||||
at: 'active',
|
||||
show: true,
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ import { linkIframe } from './iframe-container';
|
||||
|
||||
export const CodeBlockHtmlPreview = CodeBlockPreviewExtension(
|
||||
'html',
|
||||
model => html`<html-preview .model=${model}></html-preview>`
|
||||
model => html`<affine-html-preview .model=${model}></affine-html-preview>`
|
||||
);
|
||||
|
||||
export class HTMLPreview extends SignalWatcher(
|
||||
@@ -153,11 +153,11 @@ export class HTMLPreview extends SignalWatcher(
|
||||
}
|
||||
|
||||
export function effects() {
|
||||
customElements.define('html-preview', HTMLPreview);
|
||||
customElements.define('affine-html-preview', HTMLPreview);
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'html-preview': HTMLPreview;
|
||||
'affine-html-preview': HTMLPreview;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -734,7 +734,7 @@ function renderOpenDocMenu(
|
||||
<affine-open-doc-dropdown-menu
|
||||
.actions=${actions}
|
||||
.context=${ctx}
|
||||
.openDocMode$=${openDocMode}
|
||||
.openDocModeSignal=${openDocMode}
|
||||
.updateOpenDocMode=${updateOpenDocMode}
|
||||
>
|
||||
</affine-open-doc-dropdown-menu>
|
||||
|
||||
@@ -7,6 +7,7 @@ import type {
|
||||
LinkedMenuItem,
|
||||
LinkedWidgetConfig,
|
||||
} from '@blocksuite/affine/widgets/linked-doc';
|
||||
import { unsafeHTML } from '@blocksuite/affine-shared/utils';
|
||||
import { UserIcon } from '@blocksuite/icons/lit';
|
||||
import { BLOCK_ID_ATTR, type BlockComponent } from '@blocksuite/std';
|
||||
import { computed } from '@preact/signals-core';
|
||||
@@ -15,7 +16,6 @@ import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import Fuse, { type FuseResultMatch } from 'fuse.js';
|
||||
import { html } from 'lit';
|
||||
import { styleMap } from 'lit/directives/style-map.js';
|
||||
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
||||
|
||||
export const createCommentLinkedWidgetConfig = (
|
||||
framework: FrameworkProvider
|
||||
|
||||
@@ -130,7 +130,7 @@ export const EdgelessSnapshot = (props: Props) => {
|
||||
}, [docName, extensions, firstUpdate, updateElements]);
|
||||
|
||||
useEffect(() => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
// oxlint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
renderEditor();
|
||||
return () => editorHostRef.current?.remove();
|
||||
}, [renderEditor]);
|
||||
|
||||
@@ -174,7 +174,7 @@ const McpServerSetting = () => {
|
||||
variant="primary"
|
||||
onClick={() => {
|
||||
if (!code) return;
|
||||
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
// oxlint-disable-next-line @typescript-eslint/no-floating-promises
|
||||
navigator.clipboard.writeText(code);
|
||||
notify.success({
|
||||
title: t['Copied to clipboard'](),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
||||
// oxlint-disable-next-line no-restricted-imports
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
|
||||
import { MobileSignInPanel } from '../components/sign-in';
|
||||
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
type LinkedWidgetConfig,
|
||||
LinkedWidgetUtils,
|
||||
} from '@blocksuite/affine/widgets/linked-doc';
|
||||
import { unsafeHTML } from '@blocksuite/affine-shared/utils';
|
||||
import {
|
||||
DateTimeIcon,
|
||||
NewXxxEdgelessIcon,
|
||||
@@ -35,7 +36,6 @@ import type { FuseResultMatch } from 'fuse.js';
|
||||
import Fuse from 'fuse.js';
|
||||
import { html } from 'lit';
|
||||
import { styleMap } from 'lit/directives/style-map.js';
|
||||
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
||||
import {
|
||||
createAbsolutePositionFromRelativePosition,
|
||||
createRelativePositionFromTypeIndex,
|
||||
|
||||
@@ -36,7 +36,7 @@ export { WorkspaceServerService } from './services/workspace-server';
|
||||
export { WorkspaceSubscriptionService } from './services/workspace-subscription';
|
||||
export type { ServerConfig } from './types';
|
||||
|
||||
// eslint-disable-next-line simple-import-sort/imports
|
||||
// oxlint-disable-next-line simple-import-sort/imports
|
||||
import { type Framework } from '@toeverything/infra';
|
||||
|
||||
import { GlobalCache, GlobalState } from '../storage/providers/global';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
/* oxlint-disable @typescript-eslint/no-non-null-assertion */
|
||||
import { apis, appInfo, events, sharedStorage } from '@affine/electron-api';
|
||||
import { Service } from '@toeverything/infra';
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@ import type {
|
||||
LinkedMenuGroup,
|
||||
LinkedMenuItem,
|
||||
} from '@blocksuite/affine/widgets/linked-doc';
|
||||
import { unsafeHTML } from '@blocksuite/affine-shared/utils';
|
||||
import { CollectionsIcon, WarningIcon } from '@blocksuite/icons/lit';
|
||||
import { computed, signal } from '@preact/signals-core';
|
||||
import { Service } from '@toeverything/infra';
|
||||
import { cssVarV2 } from '@toeverything/theme/v2';
|
||||
import Fuse, { type FuseResultMatch } from 'fuse.js';
|
||||
import { html } from 'lit';
|
||||
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
||||
import { catchError, map, of } from 'rxjs';
|
||||
|
||||
import { normalizeSearchText } from '../../../utils/normalize-search-text';
|
||||
|
||||
@@ -156,7 +156,7 @@ export class AsyncStorageMemento implements AsyncMemento {
|
||||
this.eventEmitter.on(key, eventEmitterCb);
|
||||
|
||||
// Listen for cross-tab events
|
||||
// eslint-disable-next-line sonarjs/no-identical-functions
|
||||
// oxlint-disable-next-line sonarjs/no-identical-functions
|
||||
const channelCb = (event: MessageEvent) => {
|
||||
if (event.data.key === key) {
|
||||
subscriber.next(event.data.value);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useLiveData } from '@toeverything/infra';
|
||||
import type { Location } from 'history';
|
||||
import { useEffect } from 'react';
|
||||
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
||||
// oxlint-disable-next-line no-restricted-imports
|
||||
import { useLocation, useNavigate } from 'react-router-dom';
|
||||
|
||||
import type { Workbench } from '../entities/workbench';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { Location } from 'history';
|
||||
import { useEffect } from 'react';
|
||||
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
||||
// oxlint-disable-next-line no-restricted-imports
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
import type { Workbench } from '../entities/workbench';
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user