Apply repository-wide ESLint auto-fix formatting pass

Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
2026-03-08 12:11:57 +08:00
parent 7c48faaa3d
commit 847904c49b
172 changed files with 13629 additions and 9154 deletions

View File

@@ -9,174 +9,174 @@
*/
export function setupApiIntercepts() {
// Auth
cy.intercept('POST', '/api/oauth/token', {
fixture: 'api/token.json',
}).as('postToken');
cy.intercept("POST", "/api/oauth/token", {
fixture: "api/token.json",
}).as("postToken");
// User account
cy.intercept('GET', '/api/my-account', {
fixture: 'api/my-account.json',
}).as('getMyAccount');
cy.intercept("GET", "/api/my-account", {
fixture: "api/my-account.json",
}).as("getMyAccount");
cy.intercept('PUT', '/api/my-account', {
cy.intercept("PUT", "/api/my-account", {
statusCode: 200,
body: { success: true },
}).as('putMyAccount');
}).as("putMyAccount");
// Files
cy.intercept('GET', '/api/files', {
fixture: 'api/files.json',
}).as('getFiles');
cy.intercept("GET", "/api/files", {
fixture: "api/files.json",
}).as("getFiles");
// Users (account management)
cy.intercept('GET', '/api/users', {
fixture: 'api/users.json',
}).as('getUsers');
cy.intercept("GET", "/api/users", {
fixture: "api/users.json",
}).as("getUsers");
cy.intercept('POST', '/api/users', {
cy.intercept("POST", "/api/users", {
statusCode: 200,
body: { success: true },
}).as('postUser');
}).as("postUser");
cy.intercept('DELETE', '/api/users/*', {
cy.intercept("DELETE", "/api/users/*", {
statusCode: 200,
body: { success: true },
}).as('deleteUser');
}).as("deleteUser");
cy.intercept('PUT', '/api/users/*', {
cy.intercept("PUT", "/api/users/*", {
statusCode: 200,
body: { success: true },
}).as('putUser');
}).as("putUser");
// User detail (GET /api/users/:username)
cy.intercept('GET', '/api/users/*', {
fixture: 'api/user-detail.json',
}).as('getUserDetail');
cy.intercept("GET", "/api/users/*", {
fixture: "api/user-detail.json",
}).as("getUserDetail");
// User roles
cy.intercept('PUT', '/api/users/*/roles/*', {
cy.intercept("PUT", "/api/users/*/roles/*", {
statusCode: 200,
body: { success: true },
}).as('putUserRole');
}).as("putUserRole");
cy.intercept('DELETE', '/api/users/*/roles/*', {
cy.intercept("DELETE", "/api/users/*/roles/*", {
statusCode: 200,
body: { success: true },
}).as('deleteUserRole');
}).as("deleteUserRole");
// Filter detail (for fetchFunnel when entering filter from Files)
cy.intercept('GET', /\/api\/filters\/\d+$/, {
cy.intercept("GET", /\/api\/filters\/\d+$/, {
statusCode: 200,
body: { rules: [], log: { id: 1 }, name: 'filtered-sample' },
}).as('getFilterDetail');
body: { rules: [], log: { id: 1 }, name: "filtered-sample" },
}).as("getFilterDetail");
// Discover (map data)
cy.intercept('GET', '/api/logs/*/discover', {
fixture: 'api/discover.json',
}).as('getDiscover');
cy.intercept("GET", "/api/logs/*/discover", {
fixture: "api/discover.json",
}).as("getDiscover");
cy.intercept('GET', '/api/filters/*/discover', {
fixture: 'api/discover.json',
}).as('getFilterDiscover');
cy.intercept("GET", "/api/filters/*/discover", {
fixture: "api/discover.json",
}).as("getFilterDiscover");
// Performance
cy.intercept('GET', '/api/logs/*/performance', {
fixture: 'api/performance.json',
}).as('getPerformance');
cy.intercept("GET", "/api/logs/*/performance", {
fixture: "api/performance.json",
}).as("getPerformance");
cy.intercept('GET', '/api/filters/*/performance', {
fixture: 'api/performance.json',
}).as('getFilterPerformance');
cy.intercept("GET", "/api/filters/*/performance", {
fixture: "api/performance.json",
}).as("getFilterPerformance");
// Traces
cy.intercept('GET', '/api/logs/*/traces', {
fixture: 'api/traces.json',
}).as('getTraces');
cy.intercept("GET", "/api/logs/*/traces", {
fixture: "api/traces.json",
}).as("getTraces");
cy.intercept('GET', '/api/filters/*/traces', {
fixture: 'api/traces.json',
}).as('getFilterTraces');
cy.intercept("GET", "/api/filters/*/traces", {
fixture: "api/traces.json",
}).as("getFilterTraces");
// Trace detail (must be after traces list intercepts)
cy.intercept('GET', /\/api\/logs\/.*\/traces\/\d+/, {
fixture: 'api/trace-detail.json',
}).as('getTraceDetail');
cy.intercept("GET", /\/api\/logs\/.*\/traces\/\d+/, {
fixture: "api/trace-detail.json",
}).as("getTraceDetail");
cy.intercept('GET', /\/api\/filters\/.*\/traces\/\d+/, {
fixture: 'api/trace-detail.json',
}).as('getFilterTraceDetail');
cy.intercept("GET", /\/api\/filters\/.*\/traces\/\d+/, {
fixture: "api/trace-detail.json",
}).as("getFilterTraceDetail");
// Temp filters
cy.intercept('GET', '/api/temp-filters/*/discover', {
fixture: 'api/discover.json',
}).as('getTempFilterDiscover');
cy.intercept("GET", "/api/temp-filters/*/discover", {
fixture: "api/discover.json",
}).as("getTempFilterDiscover");
cy.intercept('GET', '/api/temp-filters/*/traces', {
fixture: 'api/traces.json',
}).as('getTempFilterTraces');
cy.intercept("GET", "/api/temp-filters/*/traces", {
fixture: "api/traces.json",
}).as("getTempFilterTraces");
// Filter params
cy.intercept('GET', '/api/filters/params*', {
cy.intercept("GET", "/api/filters/params*", {
statusCode: 200,
body: {},
}).as('getFilterParams');
}).as("getFilterParams");
cy.intercept('GET', '/api/filters/has-result*', {
cy.intercept("GET", "/api/filters/has-result*", {
statusCode: 200,
body: false,
}).as('getFilterHasResult');
}).as("getFilterHasResult");
// Conformance check params
cy.intercept('GET', '/api/log-checks/params*', {
fixture: 'api/filter-params.json',
}).as('getLogCheckParams');
cy.intercept("GET", "/api/log-checks/params*", {
fixture: "api/filter-params.json",
}).as("getLogCheckParams");
cy.intercept('GET', '/api/filter-checks/params*', {
fixture: 'api/filter-params.json',
}).as('getFilterCheckParams');
cy.intercept("GET", "/api/filter-checks/params*", {
fixture: "api/filter-params.json",
}).as("getFilterCheckParams");
// Compare dashboard
cy.intercept('GET', /\/api\/compare\?datasets=/, {
fixture: 'api/compare.json',
}).as('getCompare');
cy.intercept("GET", /\/api\/compare\?datasets=/, {
fixture: "api/compare.json",
}).as("getCompare");
// Dependents (for delete confirmation)
cy.intercept('GET', '/api/logs/*/dependents', {
cy.intercept("GET", "/api/logs/*/dependents", {
statusCode: 200,
body: [],
}).as('getLogDependents');
}).as("getLogDependents");
cy.intercept('GET', '/api/filters/*/dependents', {
cy.intercept("GET", "/api/filters/*/dependents", {
statusCode: 200,
body: [],
}).as('getFilterDependents');
}).as("getFilterDependents");
cy.intercept('GET', '/api/log-checks/*/dependents', {
cy.intercept("GET", "/api/log-checks/*/dependents", {
statusCode: 200,
body: [],
}).as('getLogCheckDependents');
}).as("getLogCheckDependents");
cy.intercept('GET', '/api/filter-checks/*/dependents', {
cy.intercept("GET", "/api/filter-checks/*/dependents", {
statusCode: 200,
body: [],
}).as('getFilterCheckDependents');
}).as("getFilterCheckDependents");
// Rename
cy.intercept('PUT', '/api/logs/*/rename', {
cy.intercept("PUT", "/api/logs/*/rename", {
statusCode: 200,
body: { success: true },
}).as('renameLog');
}).as("renameLog");
cy.intercept('PUT', '/api/filters/*/rename', {
cy.intercept("PUT", "/api/filters/*/rename", {
statusCode: 200,
body: { success: true },
}).as('renameFilter');
}).as("renameFilter");
// Deletion
cy.intercept('DELETE', '/api/deletion/*', {
cy.intercept("DELETE", "/api/deletion/*", {
statusCode: 200,
body: { success: true },
}).as('deleteDeletion');
}).as("deleteDeletion");
}
/**
@@ -185,6 +185,6 @@ export function setupApiIntercepts() {
*/
export function loginWithFixtures() {
setupApiIntercepts();
cy.setCookie('luciaToken', 'fake-access-token-for-testing');
cy.setCookie('isLuciaLoggedIn', 'true');
cy.setCookie("luciaToken", "fake-access-token-for-testing");
cy.setCookie("isLuciaLoggedIn", "true");
}