diff --git a/packages/google-cloud-serverless/jest.config.js b/packages/google-cloud-serverless/jest.config.js deleted file mode 100644 index 24f49ab59a4c..000000000000 --- a/packages/google-cloud-serverless/jest.config.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../../jest/jest.config.js'); diff --git a/packages/google-cloud-serverless/package.json b/packages/google-cloud-serverless/package.json index d5c4baddad56..3500292d0ef3 100644 --- a/packages/google-cloud-serverless/package.json +++ b/packages/google-cloud-serverless/package.json @@ -55,10 +55,7 @@ "devDependencies": { "@google-cloud/bigquery": "^5.3.0", "@google-cloud/common": "^3.4.1", - "@google-cloud/functions-framework": "^1.7.1", - "@google-cloud/pubsub": "^2.5.0", "@types/node": "^18.19.1", - "google-gax": "^2.9.0", "nock": "^13.5.5" }, "scripts": { @@ -77,8 +74,8 @@ "clean": "rimraf build coverage sentry-google-cloud-*.tgz", "fix": "eslint . --format stylish --fix", "lint": "eslint . --format stylish", - "test": "jest", - "test:watch": "jest --watch", + "test": "vitest run", + "test:watch": "vitest --watch", "yalc:publish": "yalc publish --push --sig" }, "volta": { diff --git a/packages/google-cloud-serverless/src/integrations/google-cloud-grpc.ts b/packages/google-cloud-serverless/src/integrations/google-cloud-grpc.ts index 7d4c49990af6..6261660b5f98 100644 --- a/packages/google-cloud-serverless/src/integrations/google-cloud-grpc.ts +++ b/packages/google-cloud-serverless/src/integrations/google-cloud-grpc.ts @@ -3,11 +3,11 @@ import type { Client, IntegrationFn } from '@sentry/core'; import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, defineIntegration, fill, getClient } from '@sentry/core'; import { startInactiveSpan } from '@sentry/node'; -interface GrpcFunction extends CallableFunction { +export interface GrpcFunction extends CallableFunction { (...args: unknown[]): EventEmitter; } -interface GrpcFunctionObject extends GrpcFunction { +export interface GrpcFunctionObject extends GrpcFunction { requestStream: boolean; responseStream: boolean; originalName: string; @@ -21,7 +21,7 @@ interface CreateStubFunc extends CallableFunction { (createStub: unknown, options: StubOptions): PromiseLike; } -interface Stub { +export interface Stub { [key: string]: GrpcFunctionObject; } @@ -78,7 +78,7 @@ function wrapCreateStub(origCreate: CreateStubFunc): CreateStubFunc { } /** Patches the function in grpc stub to enable tracing */ -function fillGrpcFunction(stub: Stub, serviceIdentifier: string, methodName: string): void { +export function fillGrpcFunction(stub: Stub, serviceIdentifier: string, methodName: string): void { const funcObj = stub[methodName]; if (typeof funcObj !== 'function') { return; diff --git a/packages/google-cloud-serverless/test/__mocks__/dns.ts b/packages/google-cloud-serverless/test/__mocks__/dns.ts deleted file mode 100644 index d03aa8d3f84b..000000000000 --- a/packages/google-cloud-serverless/test/__mocks__/dns.ts +++ /dev/null @@ -1,2 +0,0 @@ -export const lookup = jest.fn(); -export const resolveTxt = jest.fn(); diff --git a/packages/google-cloud-serverless/test/gcpfunction/cloud_event.test.ts b/packages/google-cloud-serverless/test/gcpfunction/cloud_event.test.ts index 8bbc926643f7..34aad6f13adb 100644 --- a/packages/google-cloud-serverless/test/gcpfunction/cloud_event.test.ts +++ b/packages/google-cloud-serverless/test/gcpfunction/cloud_event.test.ts @@ -1,22 +1,24 @@ import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core'; +import { describe, vi, beforeEach, test, expect } from 'vitest'; import { wrapCloudEventFunction } from '../../src/gcpfunction/cloud_events'; import type { CloudEventFunction, CloudEventFunctionWithCallback } from '../../src/gcpfunction/general'; -const mockStartSpanManual = jest.fn((...spanArgs) => ({ ...spanArgs })); -const mockFlush = jest.fn((...args) => Promise.resolve(args)); -const mockCaptureException = jest.fn(); +const mockStartSpanManual = vi.fn((...spanArgs) => ({ ...spanArgs })); +const mockFlush = vi.fn((...args) => Promise.resolve(args)); +const mockCaptureException = vi.fn(); const mockScope = { - setContext: jest.fn(), + setContext: vi.fn(), }; const mockSpan = { - end: jest.fn(), + end: vi.fn(), }; -jest.mock('@sentry/node', () => { - const original = jest.requireActual('@sentry/node'); +vi.mock('@sentry/node', async () => { + // eslint-disable-next-line @typescript-eslint/consistent-type-imports + const original = (await vi.importActual('@sentry/node')) as typeof import('@sentry/node'); return { ...original, startSpanManual: (...args: unknown[]) => { @@ -38,7 +40,7 @@ jest.mock('@sentry/node', () => { describe('wrapCloudEventFunction', () => { beforeEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); function handleCloudEvent(fn: CloudEventFunctionWithCallback): Promise { diff --git a/packages/google-cloud-serverless/test/gcpfunction/events.test.ts b/packages/google-cloud-serverless/test/gcpfunction/events.test.ts index aad3d5ec1645..99274c714637 100644 --- a/packages/google-cloud-serverless/test/gcpfunction/events.test.ts +++ b/packages/google-cloud-serverless/test/gcpfunction/events.test.ts @@ -1,23 +1,25 @@ import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core'; +import { describe, vi, beforeEach, test, expect } from 'vitest'; import type { Event } from '@sentry/core'; import { wrapEventFunction } from '../../src/gcpfunction/events'; import type { EventFunction, EventFunctionWithCallback } from '../../src/gcpfunction/general'; -const mockStartSpanManual = jest.fn((...spanArgs) => ({ ...spanArgs })); -const mockFlush = jest.fn((...args) => Promise.resolve(args)); -const mockCaptureException = jest.fn(); +const mockStartSpanManual = vi.fn((...spanArgs) => ({ ...spanArgs })); +const mockFlush = vi.fn((...args) => Promise.resolve(args)); +const mockCaptureException = vi.fn(); const mockScope = { - setContext: jest.fn(), + setContext: vi.fn(), }; const mockSpan = { - end: jest.fn(), + end: vi.fn(), }; -jest.mock('@sentry/node', () => { - const original = jest.requireActual('@sentry/node'); +vi.mock('@sentry/node', async () => { + // eslint-disable-next-line @typescript-eslint/consistent-type-imports + const original = (await vi.importActual('@sentry/node')) as typeof import('@sentry/node'); return { ...original, startSpanManual: (...args: unknown[]) => { @@ -39,7 +41,7 @@ jest.mock('@sentry/node', () => { describe('wrapEventFunction', () => { beforeEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); function handleEvent(fn: EventFunctionWithCallback): Promise { @@ -238,7 +240,7 @@ describe('wrapEventFunction', () => { const scopeFunction = mockCaptureException.mock.calls[0][1]; const event: Event = { exception: { values: [{}] } }; let evtProcessor: ((e: Event) => Event) | undefined = undefined; - scopeFunction({ addEventProcessor: jest.fn().mockImplementation(proc => (evtProcessor = proc)) }); + scopeFunction({ addEventProcessor: vi.fn().mockImplementation(proc => (evtProcessor = proc)) }); expect(evtProcessor).toBeInstanceOf(Function); // @ts-expect-error just mocking around... diff --git a/packages/google-cloud-serverless/test/gcpfunction/http.test.ts b/packages/google-cloud-serverless/test/gcpfunction/http.test.ts index 7f456237ad9c..914c1baffed0 100644 --- a/packages/google-cloud-serverless/test/gcpfunction/http.test.ts +++ b/packages/google-cloud-serverless/test/gcpfunction/http.test.ts @@ -1,28 +1,27 @@ import type { Integration } from '@sentry/core'; - import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core'; +import { describe, vi, beforeEach, test, expect, type MockInstance } from 'vitest'; import { wrapHttpFunction } from '../../src/gcpfunction/http'; - import type { HttpFunction, Request, Response } from '../../src/gcpfunction/general'; - import { init } from '../../src/sdk'; -const mockStartSpanManual = jest.fn((...spanArgs) => ({ ...spanArgs })); -const mockFlush = jest.fn((...args) => Promise.resolve(args)); -const mockCaptureException = jest.fn(); -const mockInit = jest.fn(); +const mockStartSpanManual = vi.fn((...spanArgs) => ({ ...spanArgs })); +const mockFlush = vi.fn((...args) => Promise.resolve(args)); +const mockCaptureException = vi.fn(); +const mockInit = vi.fn(); const mockScope = { - setSDKProcessingMetadata: jest.fn(), + setSDKProcessingMetadata: vi.fn(), }; const mockSpan = { - end: jest.fn(), + end: vi.fn(), }; -jest.mock('@sentry/node', () => { - const original = jest.requireActual('@sentry/node'); +vi.mock('@sentry/node', async () => { + // eslint-disable-next-line @typescript-eslint/consistent-type-imports + const original = (await vi.importActual('@sentry/node')) as typeof import('@sentry/node'); return { ...original, init: (options: unknown) => { @@ -47,7 +46,7 @@ jest.mock('@sentry/node', () => { describe('GCPFunction', () => { beforeEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); async function handleHttp(fn: HttpFunction, trace_headers: { [key: string]: string } | null = null): Promise { @@ -146,7 +145,7 @@ describe('GCPFunction', () => { body: { foo: 'bar' }, } as Request; - const mockEnd = jest.fn(); + const mockEnd = vi.fn(); const response = { end: mockEnd } as unknown as Response; mockFlush.mockImplementationOnce(async () => { @@ -171,8 +170,8 @@ describe('GCPFunction', () => { await handleHttp(wrappedHandler); - const initOptions = (mockInit as unknown as jest.SpyInstance).mock.calls[0]; - const defaultIntegrations = initOptions[0]?.defaultIntegrations.map((i: Integration) => i.name); + const initOptions = (mockInit as unknown as MockInstance).mock.calls[0]; + const defaultIntegrations = initOptions?.[0]?.defaultIntegrations.map((i: Integration) => i.name); expect(defaultIntegrations).toContain('RequestData'); diff --git a/packages/google-cloud-serverless/test/integrations/google-cloud-grpc.test.ts b/packages/google-cloud-serverless/test/integrations/google-cloud-grpc.test.ts index 2e6c9039e075..af37bc71a7c5 100644 --- a/packages/google-cloud-serverless/test/integrations/google-cloud-grpc.test.ts +++ b/packages/google-cloud-serverless/test/integrations/google-cloud-grpc.test.ts @@ -1,25 +1,32 @@ -jest.mock('dns'); +import { vi, describe, beforeEach, test, expect } from 'vitest'; +import { NodeClient } from '@sentry/node'; +import { createTransport } from '@sentry/core'; +import { setCurrentClient, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core'; +import { googleCloudGrpcIntegration, fillGrpcFunction } from '../../src/integrations/google-cloud-grpc'; +import type { GrpcFunctionObject, Stub, GrpcFunction } from '../../src/integrations/google-cloud-grpc'; -import * as dns from 'dns'; -import { EventEmitter } from 'events'; -import * as fs from 'fs'; -import * as path from 'path'; -import { PubSub } from '@google-cloud/pubsub'; -import * as http2 from 'http2'; -import * as nock from 'nock'; +const mockSpanEnd = vi.fn(); +const mockStartInactiveSpan = vi.fn(); +const mockFill = vi.fn(); -import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core'; -import { NodeClient, createTransport, setCurrentClient } from '@sentry/node'; -import { googleCloudGrpcIntegration } from '../../src/integrations/google-cloud-grpc'; +let mockClient: NodeClient; -const spyConnect = jest.spyOn(http2, 'connect'); - -const mockSpanEnd = jest.fn(); -const mockStartInactiveSpan = jest.fn(spanArgs => ({ ...spanArgs })); +vi.mock('@sentry/core', async () => { + const original = await vi.importActual('@sentry/core'); + return { + ...original, + fill: (obj: any, name: string, replacement: any) => { + mockFill(obj, name, replacement); + obj[name] = replacement(obj[name]); + }, + getClient: () => mockClient, + }; +}); -jest.mock('@sentry/node', () => { +vi.mock('@sentry/node', async () => { + const original = await vi.importActual('@sentry/node'); return { - ...jest.requireActual('@sentry/node'), + ...original, startInactiveSpan: (ctx: unknown) => { mockStartInactiveSpan(ctx); return { end: mockSpanEnd }; @@ -27,130 +34,177 @@ jest.mock('@sentry/node', () => { }; }); -/** Fake HTTP2 stream */ -class FakeStream extends EventEmitter { - public rstCode: number = 0; - close() { - this.emit('end'); - this.emit('close'); - } - end() {} - pause() {} - resume() {} - write(_data: Buffer, cb: CallableFunction) { - process.nextTick(cb, null); - } -} - -/** Fake HTTP2 session for GRPC */ -class FakeSession extends EventEmitter { - public socket: EventEmitter = new EventEmitter(); - public request: jest.Mock = jest.fn(); - ping() {} - mockRequest(fn: (stream: FakeStream) => void): FakeStream { - const stream = new FakeStream(); - this.request.mockImplementationOnce(() => { - process.nextTick(fn, stream); - return stream; - }); - return stream; - } - mockUnaryRequest(responseData: Buffer) { - this.mockRequest(stream => { - stream.emit( - 'response', - { ':status': 200, 'content-type': 'application/grpc', 'content-disposition': 'attachment' }, - 4, - ); - stream.emit('data', responseData); - stream.emit('trailers', { 'grpc-status': '0', 'content-disposition': 'attachment' }); - }); - } - close() { - this.emit('close'); - this.socket.emit('close'); - } - ref() {} - unref() {} +// Need to override mock because the integration loads google-gax as a CJS file +async function mock(mockedUri: string, stub: any) { + // @ts-expect-error we are using import on purpose + const { Module } = await import('module'); + + // @ts-expect-error test + Module._load_original = Module._load; + // @ts-expect-error test + Module._load = (uri, parent) => { + if (uri === mockedUri) return stub; + // @ts-expect-error test + return Module._load_original(uri, parent); + }; } -function mockHttp2Session(): FakeSession { - const session = new FakeSession(); - spyConnect.mockImplementationOnce(() => { - process.nextTick(() => session.emit('connect')); - return session as unknown as http2.ClientHttp2Session; - }); - return session; -} +vi.hoisted( + () => + void mock('google-gax', { + GrpcClient: { + prototype: { + createStub: vi.fn(), + }, + }, + }), +); describe('GoogleCloudGrpc tracing', () => { - const mockClient = new NodeClient({ - tracesSampleRate: 1.0, - integrations: [], - dsn: 'https://withAWSServices@domain/123', - transport: () => createTransport({ recordDroppedEvent: () => undefined }, _ => Promise.resolve({})), - stackParser: () => [], - }); + beforeEach(() => { + mockClient = new NodeClient({ + tracesSampleRate: 1.0, + integrations: [], + dsn: 'https://withAWSServices@domain/123', + transport: () => createTransport({ recordDroppedEvent: () => undefined }, _ => Promise.resolve({})), + stackParser: () => [], + }); - const integration = googleCloudGrpcIntegration(); - mockClient.addIntegration(integration); + const integration = googleCloudGrpcIntegration(); + mockClient.addIntegration(integration); + integration.setup?.(mockClient); - beforeEach(() => { - nock('https://www.googleapis.com').post('/oauth2/v4/token').reply(200, []); setCurrentClient(mockClient); mockSpanEnd.mockClear(); mockStartInactiveSpan.mockClear(); + mockFill.mockClear(); }); - afterAll(() => { - nock.restore(); - spyConnect.mockRestore(); - }); - - // We use google cloud pubsub as an example of grpc service for which we can trace requests. - describe('pubsub', () => { - // @ts-expect-error see "Why @ts-expect-error" note - const dnsLookup = dns.lookup as jest.Mock; - // @ts-expect-error see "Why @ts-expect-error" note - const resolveTxt = dns.resolveTxt as jest.Mock; - dnsLookup.mockImplementation((hostname, ...args) => { - expect(hostname).toEqual('pubsub.googleapis.com'); - process.nextTick(args[args.length - 1], null, [{ address: '0.0.0.0', family: 4 }]); - }); - resolveTxt.mockImplementation((hostname, cb) => { - expect(hostname).toEqual('pubsub.googleapis.com'); - process.nextTick(cb, null, []); + describe('setup', () => { + test('integration name is correct', () => { + const integration = googleCloudGrpcIntegration(); + expect(integration.name).toBe('GoogleCloudGrpc'); }); - const pubsub = new PubSub({ - credentials: { - client_email: 'client@email', - private_key: fs.readFileSync(path.resolve(__dirname, 'private.pem')).toString(), - }, - projectId: 'project-id', + test('setupOnce patches GrpcClient.createStub', () => { + const mockCreateStub = vi.fn(); + const mockGrpcClient = { + prototype: { + createStub: mockCreateStub, + }, + }; + + // eslint-disable-next-line @typescript-eslint/no-var-requires + require('google-gax').GrpcClient = mockGrpcClient; + + const integration = googleCloudGrpcIntegration(); + integration.setupOnce?.(); + expect(mockCreateStub).toBeDefined(); }); - afterEach(() => { - dnsLookup.mockReset(); - resolveTxt.mockReset(); + test('setupOnce throws when google-gax is not available and not optional', () => { + // eslint-disable-next-line @typescript-eslint/no-var-requires + require('google-gax').GrpcClient = undefined; + + const integration = googleCloudGrpcIntegration(); + expect(() => integration.setupOnce?.()).toThrow(); }); - afterAll(async () => { - await pubsub.close(); + test('setupOnce does not throw when google-gax is not available and optional', () => { + // eslint-disable-next-line @typescript-eslint/no-var-requires + require('google-gax').GrpcClient = undefined; + + const optionalIntegration = googleCloudGrpcIntegration({ optional: true }); + expect(() => optionalIntegration.setupOnce?.()).not.toThrow(); }); + }); - test('publish', async () => { - mockHttp2Session().mockUnaryRequest(Buffer.from('00000000120a1031363337303834313536363233383630', 'hex')); - const resp = await pubsub.topic('nicetopic').publish(Buffer.from('data')); - expect(resp).toEqual('1637084156623860'); - expect(mockStartInactiveSpan).toBeCalledWith({ - op: 'grpc.pubsub', + describe('fillGrpcFunction', () => { + test('patches unary call methods with tracing', () => { + const mockStub: Stub = { + unaryMethod: Object.assign(vi.fn(), { + requestStream: false, + responseStream: false, + originalName: 'unaryMethod', + } as GrpcFunctionObject), + }; + + const mockEventEmitter = { + on: vi.fn(), + }; + + (mockStub.unaryMethod as any).apply = vi.fn().mockReturnValue(mockEventEmitter); + + fillGrpcFunction(mockStub, 'test-service', 'unaryMethod'); + + const result = (mockStub.unaryMethod as GrpcFunction)(); + expect(result).toBe(mockEventEmitter); + expect(mockEventEmitter.on).toHaveBeenCalledWith('status', expect.any(Function)); + expect(mockStartInactiveSpan).toHaveBeenCalledWith({ + name: 'unary call unaryMethod', + onlyIfParent: true, + op: 'grpc.test-service', attributes: { [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.grpc.serverless', }, - name: 'unary call publish', - onlyIfParent: true, }); }); + + test('does not patch non-unary call methods', () => { + const mockStub: Stub = { + clientStreamMethod: Object.assign(vi.fn(), { + requestStream: true, + responseStream: false, + originalName: 'clientStreamMethod', + } as GrpcFunctionObject), + serverStreamMethod: Object.assign(vi.fn(), { + requestStream: false, + responseStream: true, + originalName: 'serverStreamMethod', + } as GrpcFunctionObject), + bidiStreamMethod: Object.assign(vi.fn(), { + requestStream: true, + responseStream: true, + originalName: 'bidiStreamMethod', + } as GrpcFunctionObject), + }; + + fillGrpcFunction(mockStub, 'test-service', 'clientStreamMethod'); + fillGrpcFunction(mockStub, 'test-service', 'serverStreamMethod'); + fillGrpcFunction(mockStub, 'test-service', 'bidiStreamMethod'); + + expect(mockStartInactiveSpan).not.toHaveBeenCalled(); + }); + + test('does not patch non-function properties', () => { + const mockStub: Stub = { + nonFunction: Object.assign(vi.fn(), { + requestStream: false, + responseStream: false, + originalName: 'nonFunction', + } as GrpcFunctionObject), + }; + + fillGrpcFunction(mockStub, 'test-service', 'nonFunction'); + expect(mockStartInactiveSpan).not.toHaveBeenCalled(); + }); + + test('does not patch methods when return value is not an EventEmitter', () => { + const mockStub: Stub = { + unaryMethod: Object.assign(vi.fn(), { + requestStream: false, + responseStream: false, + originalName: 'unaryMethod', + } as GrpcFunctionObject), + }; + + (mockStub.unaryMethod as any).apply = vi.fn().mockReturnValue({ notAnEventEmitter: true }); + + fillGrpcFunction(mockStub, 'test-service', 'unaryMethod'); + + const result = (mockStub.unaryMethod as GrpcFunction)(); + expect(result).toEqual({ notAnEventEmitter: true }); + expect(mockStartInactiveSpan).not.toHaveBeenCalled(); + }); }); }); diff --git a/packages/google-cloud-serverless/test/integrations/google-cloud-http.test.ts b/packages/google-cloud-serverless/test/integrations/google-cloud-http.test.ts index ca26d1069379..164d1c10dfc2 100644 --- a/packages/google-cloud-serverless/test/integrations/google-cloud-http.test.ts +++ b/packages/google-cloud-serverless/test/integrations/google-cloud-http.test.ts @@ -1,18 +1,23 @@ import * as fs from 'fs'; import * as path from 'path'; import { BigQuery } from '@google-cloud/bigquery'; -import * as nock from 'nock'; +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore ESM/CJS interop issue +import nock from 'nock'; +import { describe, vi, beforeEach, test, expect, afterAll } from 'vitest'; import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core'; import { NodeClient, createTransport, setCurrentClient } from '@sentry/node'; import { googleCloudHttpIntegration } from '../../src/integrations/google-cloud-http'; -const mockSpanEnd = jest.fn(); -const mockStartInactiveSpan = jest.fn(spanArgs => ({ ...spanArgs })); +const mockSpanEnd = vi.fn(); +const mockStartInactiveSpan = vi.fn(spanArgs => ({ ...spanArgs })); -jest.mock('@sentry/node', () => { +vi.mock('@sentry/node', async () => { + // eslint-disable-next-line @typescript-eslint/consistent-type-imports + const original = (await vi.importActual('@sentry/node')) as typeof import('@sentry/node'); return { - ...jest.requireActual('@sentry/node'), + ...original, startInactiveSpan: (ctx: unknown) => { mockStartInactiveSpan(ctx); return { end: mockSpanEnd }; diff --git a/packages/google-cloud-serverless/test/sdk.test.ts b/packages/google-cloud-serverless/test/sdk.test.ts index ee4a1fc6fa17..522915116e24 100644 --- a/packages/google-cloud-serverless/test/sdk.test.ts +++ b/packages/google-cloud-serverless/test/sdk.test.ts @@ -1,9 +1,12 @@ +import { vi, describe, beforeEach, test, expect } from 'vitest'; + import { init } from '../src/sdk'; -const mockInit = jest.fn(); +const mockInit = vi.fn(); -jest.mock('@sentry/node', () => { - const original = jest.requireActual('@sentry/node'); +vi.mock('@sentry/node', async () => { + // eslint-disable-next-line @typescript-eslint/consistent-type-imports + const original = (await vi.importActual('@sentry/node')) as typeof import('@sentry/node'); return { ...original, init: (options: unknown) => { @@ -14,7 +17,7 @@ jest.mock('@sentry/node', () => { describe('init()', () => { beforeEach(() => { - jest.clearAllMocks(); + vi.clearAllMocks(); }); test('calls Sentry.init with correct sdk info metadata', () => { diff --git a/packages/google-cloud-serverless/tsconfig.test.json b/packages/google-cloud-serverless/tsconfig.test.json index 87f6afa06b86..ca7dbeb3be94 100644 --- a/packages/google-cloud-serverless/tsconfig.test.json +++ b/packages/google-cloud-serverless/tsconfig.test.json @@ -1,11 +1,11 @@ { "extends": "./tsconfig.json", - "include": ["test/**/*"], + "include": ["test/**/*", "vite.config.ts"], "compilerOptions": { // should include all types from `./tsconfig.json` plus types for all test frameworks used - "types": ["node", "jest"] + "types": ["node"] // other package-specific, test-specific options } diff --git a/packages/google-cloud-serverless/vite.config.ts b/packages/google-cloud-serverless/vite.config.ts new file mode 100644 index 000000000000..f18ec92095bc --- /dev/null +++ b/packages/google-cloud-serverless/vite.config.ts @@ -0,0 +1,8 @@ +import baseConfig from '../../vite/vite.config'; + +export default { + ...baseConfig, + test: { + ...baseConfig.test, + }, +}; diff --git a/yarn.lock b/yarn.lock index 7f755028b1da..9e8d7830af5d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4065,16 +4065,6 @@ retry-request "^4.1.1" teeny-request "^7.0.0" -"@google-cloud/functions-framework@^1.7.1": - version "1.7.1" - resolved "https://registry.yarnpkg.com/@google-cloud/functions-framework/-/functions-framework-1.7.1.tgz#d29a27744a6eb2f95d840b86135b97b0d804a49e" - integrity sha512-jjG7nH94Thij97EPW2oQN28pVPRN3UEGcsCRi6RdaaiSyK32X40LN4WHntKVmQPBhqH+I0magHMk1pSb0McH2g== - dependencies: - body-parser "^1.18.3" - express "^4.16.4" - minimist "^1.2.0" - on-finished "^2.3.0" - "@google-cloud/paginator@^3.0.0": version "3.0.5" resolved "https://registry.yarnpkg.com/@google-cloud/paginator/-/paginator-3.0.5.tgz#9d6b96c421a89bd560c1bc2c197c7611ef21db6c" @@ -4083,11 +4073,6 @@ arrify "^2.0.0" extend "^3.0.2" -"@google-cloud/precise-date@^2.0.0": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@google-cloud/precise-date/-/precise-date-2.0.3.tgz#14f6f28ce35dabf3882e7aeab1c9d51bd473faed" - integrity sha512-+SDJ3ZvGkF7hzo6BGa8ZqeK3F6Z4+S+KviC9oOK+XCs3tfMyJCh/4j93XIWINgMMDIh9BgEvlw4306VxlXIlYA== - "@google-cloud/projectify@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@google-cloud/projectify/-/projectify-2.0.1.tgz#13350ee609346435c795bbfe133a08dfeab78d65" @@ -4098,27 +4083,6 @@ resolved "https://registry.yarnpkg.com/@google-cloud/promisify/-/promisify-2.0.3.tgz#f934b5cdc939e3c7039ff62b9caaf59a9d89e3a8" integrity sha512-d4VSA86eL/AFTe5xtyZX+ePUjE8dIFu2T8zmdeNBSa5/kNgXPCx/o/wbFNHAGLJdGnk1vddRuMESD9HbOC8irw== -"@google-cloud/pubsub@^2.5.0": - version "2.10.0" - resolved "https://registry.yarnpkg.com/@google-cloud/pubsub/-/pubsub-2.10.0.tgz#5fbfa59c91b15e880bd0258b907d8f52e0509074" - integrity sha512-XM/Fc6/W/LYzGH2pnhGLDR5E6JNZFMfzyUFP5bWgC4FK1KqIZ4g6hrnCCO38G4JfH2i1IuSQuefPF7FrZZo9tw== - dependencies: - "@google-cloud/paginator" "^3.0.0" - "@google-cloud/precise-date" "^2.0.0" - "@google-cloud/projectify" "^2.0.0" - "@google-cloud/promisify" "^2.0.0" - "@opentelemetry/api" "^0.12.0" - "@opentelemetry/tracing" "^0.12.0" - "@types/duplexify" "^3.6.0" - "@types/long" "^4.0.0" - arrify "^2.0.0" - extend "^3.0.2" - google-auth-library "^7.0.0" - google-gax "^2.9.2" - is-stream-ended "^0.1.4" - lodash.snakecase "^4.1.1" - p-defer "^3.0.0" - "@graphql-tools/merge@8.3.1": version "8.3.1" resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-8.3.1.tgz#06121942ad28982a14635dbc87b5d488a041d722" @@ -4179,23 +4143,6 @@ dependencies: tslib "^2.4.0" -"@grpc/grpc-js@~1.2.0": - version "1.2.12" - resolved "https://registry.yarnpkg.com/@grpc/grpc-js/-/grpc-js-1.2.12.tgz#0153f27512acf69184bb52c0a1035ca91d6c14b0" - integrity sha512-+gPCklP1eqIgrNPyzddYQdt9+GvZqPlLpIjIo+TveE+gbtp74VV1A2ju8ExeO8ma8f7MbpaGZx/KJPYVWL9eDw== - dependencies: - "@types/node" ">=12.12.47" - google-auth-library "^6.1.1" - semver "^6.2.0" - -"@grpc/proto-loader@^0.5.1": - version "0.5.6" - resolved "https://registry.yarnpkg.com/@grpc/proto-loader/-/proto-loader-0.5.6.tgz#1dea4b8a6412b05e2d58514d507137b63a52a98d" - integrity sha512-DT14xgw3PSzPxwS13auTEwxhMMOoz33DPUKNtmYK/QYbBSpLXJy78FGGs5yVoxVobEqPm4iW9MOIoz0A3bLTRQ== - dependencies: - lodash.camelcase "^4.3.0" - protobufjs "^6.8.6" - "@handlebars/parser@~2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@handlebars/parser/-/parser-2.0.0.tgz#5e8b7298f31ff8f7b260e6b7363c7e9ceed7d9c5" @@ -5661,23 +5608,11 @@ resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-1.9.0.tgz#d03eba68273dc0f7509e2a3d5cba21eae10379fe" integrity sha512-3giAOQvZiH5F9bMlMiv8+GSPMeqg0dbaeo58/0SlA9sxSqZhnUtxzX9/2FzyhS9sWQf5S0GJE0AKBrFqjpeYcg== -"@opentelemetry/api@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/api/-/api-0.12.0.tgz#0359c3926e8f16fdcd8c78f196bd1e9fc4e66777" - integrity sha512-Dn4vU5GlaBrIWzLpsM6xbJwKHdlpwBQ4Bd+cL9ofJP3hKT8jBXpBpribmyaqAzrajzzl2Yt8uTa9rFVLfjDAvw== - dependencies: - "@opentelemetry/context-base" "^0.12.0" - "@opentelemetry/context-async-hooks@^1.30.1": version "1.30.1" resolved "https://registry.yarnpkg.com/@opentelemetry/context-async-hooks/-/context-async-hooks-1.30.1.tgz#4f76280691a742597fd0bf682982126857622948" integrity sha512-s5vvxXPVdjqS3kTLKMeBMvop9hbWkwzBpu+mUO2M7sZtlkyDJGwFe33wRKnbaYDo8ExRVBIIdwIGrqpxHuKttA== -"@opentelemetry/context-base@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/context-base/-/context-base-0.12.0.tgz#4906ae27359d3311e3dea1b63770a16f60848550" - integrity sha512-UXwSsXo3F3yZ1dIBOG9ID8v2r9e+bqLWoizCtTb8rXtwF+N5TM7hzzvQz72o3nBU+zrI/D5e+OqAYK8ZgDd3DA== - "@opentelemetry/core@1.30.1", "@opentelemetry/core@^1.1.0", "@opentelemetry/core@^1.26.0", "@opentelemetry/core@^1.30.1", "@opentelemetry/core@^1.8.0": version "1.30.1" resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-1.30.1.tgz#a0b468bb396358df801881709ea38299fc30ab27" @@ -5685,15 +5620,6 @@ dependencies: "@opentelemetry/semantic-conventions" "1.28.0" -"@opentelemetry/core@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/core/-/core-0.12.0.tgz#a888badc9a408fa1f13976a574e69d14be32488e" - integrity sha512-oLZIkmTNWTJXzo1eA4dGu/S7wOVtylsgnEsCmhSJGhrJVDXm1eW/aGuNs3DVBeuxp0ZvQLAul3/PThsC3YrnzA== - dependencies: - "@opentelemetry/api" "^0.12.0" - "@opentelemetry/context-base" "^0.12.0" - semver "^7.1.3" - "@opentelemetry/instrumentation-amqplib@^0.46.1": version "0.46.1" resolved "https://registry.yarnpkg.com/@opentelemetry/instrumentation-amqplib/-/instrumentation-amqplib-0.46.1.tgz#7101678488d0e942162ca85c9ac6e93e1f3e0008" @@ -5963,14 +5889,6 @@ "@opentelemetry/core" "1.30.1" "@opentelemetry/semantic-conventions" "1.28.0" -"@opentelemetry/resources@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/resources/-/resources-0.12.0.tgz#5eb287c3032a2bebb2bb9f69b44bd160d2a7d591" - integrity sha512-8cYvIKB68cyupc7D6SWzkLtt13mbjgxMahL4JKCM6hWPyiGSJlPFEAey4XFXI5LLpPZRYTPHLVoLqI/xwCFZZA== - dependencies: - "@opentelemetry/api" "^0.12.0" - "@opentelemetry/core" "^0.12.0" - "@opentelemetry/sdk-trace-base@^1.30.1": version "1.30.1" resolved "https://registry.yarnpkg.com/@opentelemetry/sdk-trace-base/-/sdk-trace-base-1.30.1.tgz#41a42234096dc98e8f454d24551fc80b816feb34" @@ -5985,11 +5903,6 @@ resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.28.0.tgz#337fb2bca0453d0726696e745f50064411f646d6" integrity sha512-lp4qAiMTD4sNWW4DbKLBkfiMZ4jbAboJIGOQr5DvciMRI494OapieI9qiODpOt0XBr1LjIDy1xAGAnVs5supTA== -"@opentelemetry/semantic-conventions@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-0.12.0.tgz#7e392aecdbdbd5d737d3995998b120dc17589ab0" - integrity sha512-BuCcDW0uLNYYTns0/LwXkJ8lp8aDm7kpS+WunEmPAPRSCe6ciOYRvzn5reqJfX93rf+6A3U2SgrBnCTH+0qoQQ== - "@opentelemetry/semantic-conventions@^1.25.1", "@opentelemetry/semantic-conventions@^1.27.0", "@opentelemetry/semantic-conventions@^1.28.0", "@opentelemetry/semantic-conventions@^1.30.0": version "1.30.0" resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.30.0.tgz#3a42c4c475482f2ec87c12aad98832dc0087dc9a" @@ -6002,17 +5915,6 @@ dependencies: "@opentelemetry/core" "^1.1.0" -"@opentelemetry/tracing@^0.12.0": - version "0.12.0" - resolved "https://registry.yarnpkg.com/@opentelemetry/tracing/-/tracing-0.12.0.tgz#769927721d417bfac85eef50c2af068bedce8873" - integrity sha512-2TUGhTGkhgnxTciHCNAILPSeyXageJewRqfP9wOrx65sKd/jgvNYoY8nYf4EVWVMirDOxKDsmYgUkjdQrwb2dg== - dependencies: - "@opentelemetry/api" "^0.12.0" - "@opentelemetry/context-base" "^0.12.0" - "@opentelemetry/core" "^0.12.0" - "@opentelemetry/resources" "^0.12.0" - "@opentelemetry/semantic-conventions" "^0.12.0" - "@parcel/watcher-android-arm64@2.5.0": version "2.5.0" resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.0.tgz#e32d3dda6647791ee930556aee206fcd5ea0fb7a" @@ -6541,96 +6443,191 @@ estree-walker "^2.0.2" picomatch "^2.3.1" +"@rollup/rollup-android-arm-eabi@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.34.8.tgz#731df27dfdb77189547bcef96ada7bf166bbb2fb" + integrity sha512-q217OSE8DTp8AFHuNHXo0Y86e1wtlfVrXiAlwkIvGRQv9zbc6mE3sjIVfwI8sYUyNxwOg0j/Vm1RKM04JcWLJw== + "@rollup/rollup-android-arm-eabi@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.35.0.tgz#e1d7700735f7e8de561ef7d1fa0362082a180c43" integrity sha512-uYQ2WfPaqz5QtVgMxfN6NpLD+no0MYHDBywl7itPYd3K5TjjSghNKmX8ic9S8NU8w81NVhJv/XojcHptRly7qQ== +"@rollup/rollup-android-arm64@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.34.8.tgz#4bea6db78e1f6927405df7fe0faf2f5095e01343" + integrity sha512-Gigjz7mNWaOL9wCggvoK3jEIUUbGul656opstjaUSGC3eT0BM7PofdAJaBfPFWWkXNVAXbaQtC99OCg4sJv70Q== + "@rollup/rollup-android-arm64@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.35.0.tgz#fa6cdfb1fc9e2c8e227a7f35d524d8f7f90cf4db" integrity sha512-FtKddj9XZudurLhdJnBl9fl6BwCJ3ky8riCXjEw3/UIbjmIY58ppWwPEvU3fNu+W7FUsAsB1CdH+7EQE6CXAPA== +"@rollup/rollup-darwin-arm64@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.34.8.tgz#a7aab77d44be3c44a20f946e10160f84e5450e7f" + integrity sha512-02rVdZ5tgdUNRxIUrFdcMBZQoaPMrxtwSb+/hOfBdqkatYHR3lZ2A2EGyHq2sGOd0Owk80oV3snlDASC24He3Q== + "@rollup/rollup-darwin-arm64@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.35.0.tgz#6da5a1ddc4f11d4a7ae85ab443824cb6bf614e30" integrity sha512-Uk+GjOJR6CY844/q6r5DR/6lkPFOw0hjfOIzVx22THJXMxktXG6CbejseJFznU8vHcEBLpiXKY3/6xc+cBm65Q== +"@rollup/rollup-darwin-x64@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.34.8.tgz#c572c024b57ee8ddd1b0851703ace9eb6cc0dd82" + integrity sha512-qIP/elwR/tq/dYRx3lgwK31jkZvMiD6qUtOycLhTzCvrjbZ3LjQnEM9rNhSGpbLXVJYQ3rq39A6Re0h9tU2ynw== + "@rollup/rollup-darwin-x64@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.35.0.tgz#25b74ce2d8d3f9ea8e119b01384d44a1c0a0d3ae" integrity sha512-3IrHjfAS6Vkp+5bISNQnPogRAW5GAV1n+bNCrDwXmfMHbPl5EhTmWtfmwlJxFRUCBZ+tZ/OxDyU08aF6NI/N5Q== +"@rollup/rollup-freebsd-arm64@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.34.8.tgz#cf74f8113b5a83098a5c026c165742277cbfb88b" + integrity sha512-IQNVXL9iY6NniYbTaOKdrlVP3XIqazBgJOVkddzJlqnCpRi/yAeSOa8PLcECFSQochzqApIOE1GHNu3pCz+BDA== + "@rollup/rollup-freebsd-arm64@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.35.0.tgz#be3d39e3441df5d6e187c83d158c60656c82e203" integrity sha512-sxjoD/6F9cDLSELuLNnY0fOrM9WA0KrM0vWm57XhrIMf5FGiN8D0l7fn+bpUeBSU7dCgPV2oX4zHAsAXyHFGcQ== +"@rollup/rollup-freebsd-x64@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.34.8.tgz#39561f3a2f201a4ad6a01425b1ff5928154ecd7c" + integrity sha512-TYXcHghgnCqYFiE3FT5QwXtOZqDj5GmaFNTNt3jNC+vh22dc/ukG2cG+pi75QO4kACohZzidsq7yKTKwq/Jq7Q== + "@rollup/rollup-freebsd-x64@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.35.0.tgz#cd932d3ec679711efd65ca25821fb318e25b7ce4" integrity sha512-2mpHCeRuD1u/2kruUiHSsnjWtHjqVbzhBkNVQ1aVD63CcexKVcQGwJ2g5VphOd84GvxfSvnnlEyBtQCE5hxVVw== +"@rollup/rollup-linux-arm-gnueabihf@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.34.8.tgz#980d6061e373bfdaeb67925c46d2f8f9b3de537f" + integrity sha512-A4iphFGNkWRd+5m3VIGuqHnG3MVnqKe7Al57u9mwgbyZ2/xF9Jio72MaY7xxh+Y87VAHmGQr73qoKL9HPbXj1g== + "@rollup/rollup-linux-arm-gnueabihf@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.35.0.tgz#d300b74c6f805474225632f185daaeae760ac2bb" integrity sha512-mrA0v3QMy6ZSvEuLs0dMxcO2LnaCONs1Z73GUDBHWbY8tFFocM6yl7YyMu7rz4zS81NDSqhrUuolyZXGi8TEqg== +"@rollup/rollup-linux-arm-musleabihf@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.34.8.tgz#f91a90f30dc00d5a64ac2d9bbedc829cd3cfaa78" + integrity sha512-S0lqKLfTm5u+QTxlFiAnb2J/2dgQqRy/XvziPtDd1rKZFXHTyYLoVL58M/XFwDI01AQCDIevGLbQrMAtdyanpA== + "@rollup/rollup-linux-arm-musleabihf@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.35.0.tgz#2caac622380f314c41934ed1e68ceaf6cc380cc3" integrity sha512-DnYhhzcvTAKNexIql8pFajr0PiDGrIsBYPRvCKlA5ixSS3uwo/CWNZxB09jhIapEIg945KOzcYEAGGSmTSpk7A== +"@rollup/rollup-linux-arm64-gnu@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.34.8.tgz#fac700fa5c38bc13a0d5d34463133093da4c92a0" + integrity sha512-jpz9YOuPiSkL4G4pqKrus0pn9aYwpImGkosRKwNi+sJSkz+WU3anZe6hi73StLOQdfXYXC7hUfsQlTnjMd3s1A== + "@rollup/rollup-linux-arm64-gnu@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.35.0.tgz#1ec841650b038cc15c194c26326483fd7ebff3e3" integrity sha512-uagpnH2M2g2b5iLsCTZ35CL1FgyuzzJQ8L9VtlJ+FckBXroTwNOaD0z0/UF+k5K3aNQjbm8LIVpxykUOQt1m/A== +"@rollup/rollup-linux-arm64-musl@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.34.8.tgz#f50ecccf8c78841ff6df1706bc4782d7f62bf9c3" + integrity sha512-KdSfaROOUJXgTVxJNAZ3KwkRc5nggDk+06P6lgi1HLv1hskgvxHUKZ4xtwHkVYJ1Rep4GNo+uEfycCRRxht7+Q== + "@rollup/rollup-linux-arm64-musl@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.35.0.tgz#2fc70a446d986e27f6101ea74e81746987f69150" integrity sha512-XQxVOCd6VJeHQA/7YcqyV0/88N6ysSVzRjJ9I9UA/xXpEsjvAgDTgH3wQYz5bmr7SPtVK2TsP2fQ2N9L4ukoUg== +"@rollup/rollup-linux-loongarch64-gnu@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.34.8.tgz#5869dc0b28242da6553e2b52af41374f4038cd6e" + integrity sha512-NyF4gcxwkMFRjgXBM6g2lkT58OWztZvw5KkV2K0qqSnUEqCVcqdh2jN4gQrTn/YUpAcNKyFHfoOZEer9nwo6uQ== + "@rollup/rollup-linux-loongarch64-gnu@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-loongarch64-gnu/-/rollup-linux-loongarch64-gnu-4.35.0.tgz#561bd045cd9ce9e08c95f42e7a8688af8c93d764" integrity sha512-5pMT5PzfgwcXEwOaSrqVsz/LvjDZt+vQ8RT/70yhPU06PTuq8WaHhfT1LW+cdD7mW6i/J5/XIkX/1tCAkh1W6g== +"@rollup/rollup-linux-powerpc64le-gnu@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.34.8.tgz#5cdd9f851ce1bea33d6844a69f9574de335f20b1" + integrity sha512-LMJc999GkhGvktHU85zNTDImZVUCJ1z/MbAJTnviiWmmjyckP5aQsHtcujMjpNdMZPT2rQEDBlJfubhs3jsMfw== + "@rollup/rollup-linux-powerpc64le-gnu@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.35.0.tgz#45d849a0b33813f33fe5eba9f99e0ff15ab5caad" integrity sha512-c+zkcvbhbXF98f4CtEIP1EBA/lCic5xB0lToneZYvMeKu5Kamq3O8gqrxiYYLzlZH6E3Aq+TSW86E4ay8iD8EA== +"@rollup/rollup-linux-riscv64-gnu@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.34.8.tgz#ef5dc37f4388f5253f0def43e1440ec012af204d" + integrity sha512-xAQCAHPj8nJq1PI3z8CIZzXuXCstquz7cIOL73HHdXiRcKk8Ywwqtx2wrIy23EcTn4aZ2fLJNBB8d0tQENPCmw== + "@rollup/rollup-linux-riscv64-gnu@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.35.0.tgz#78dde3e6fcf5b5733a97d0a67482d768aa1e83a5" integrity sha512-s91fuAHdOwH/Tad2tzTtPX7UZyytHIRR6V4+2IGlV0Cej5rkG0R61SX4l4y9sh0JBibMiploZx3oHKPnQBKe4g== +"@rollup/rollup-linux-s390x-gnu@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.34.8.tgz#7dbc3ccbcbcfb3e65be74538dfb6e8dd16178fde" + integrity sha512-DdePVk1NDEuc3fOe3dPPTb+rjMtuFw89gw6gVWxQFAuEqqSdDKnrwzZHrUYdac7A7dXl9Q2Vflxpme15gUWQFA== + "@rollup/rollup-linux-s390x-gnu@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.35.0.tgz#2e34835020f9e03dfb411473a5c2a0e8a9c5037b" integrity sha512-hQRkPQPLYJZYGP+Hj4fR9dDBMIM7zrzJDWFEMPdTnTy95Ljnv0/4w/ixFw3pTBMEuuEuoqtBINYND4M7ujcuQw== +"@rollup/rollup-linux-x64-gnu@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.34.8.tgz#5783fc0adcab7dc069692056e8ca8d83709855ce" + integrity sha512-8y7ED8gjxITUltTUEJLQdgpbPh1sUQ0kMTmufRF/Ns5tI9TNMNlhWtmPKKHCU0SilX+3MJkZ0zERYYGIVBYHIA== + "@rollup/rollup-linux-x64-gnu@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.35.0.tgz#4f9774beddc6f4274df57ac99862eb23040de461" integrity sha512-Pim1T8rXOri+0HmV4CdKSGrqcBWX0d1HoPnQ0uw0bdp1aP5SdQVNBy8LjYncvnLgu3fnnCt17xjWGd4cqh8/hA== +"@rollup/rollup-linux-x64-musl@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.34.8.tgz#00b6c29b298197a384e3c659910b47943003a678" + integrity sha512-SCXcP0ZpGFIe7Ge+McxY5zKxiEI5ra+GT3QRxL0pMMtxPfpyLAKleZODi1zdRHkz5/BhueUrYtYVgubqe9JBNQ== + "@rollup/rollup-linux-x64-musl@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.35.0.tgz#dfcff2c1aed518b3d23ccffb49afb349d74fb608" integrity sha512-QysqXzYiDvQWfUiTm8XmJNO2zm9yC9P/2Gkrwg2dH9cxotQzunBHYr6jk4SujCTqnfGxduOmQcI7c2ryuW8XVg== +"@rollup/rollup-win32-arm64-msvc@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.34.8.tgz#cbfee01f1fe73791c35191a05397838520ca3cdd" + integrity sha512-YHYsgzZgFJzTRbth4h7Or0m5O74Yda+hLin0irAIobkLQFRQd1qWmnoVfwmKm9TXIZVAD0nZ+GEb2ICicLyCnQ== + "@rollup/rollup-win32-arm64-msvc@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.35.0.tgz#b0b37e2d77041e3aa772f519291309abf4c03a84" integrity sha512-OUOlGqPkVJCdJETKOCEf1mw848ZyJ5w50/rZ/3IBQVdLfR5jk/6Sr5m3iO2tdPgwo0x7VcncYuOvMhBWZq8ayg== +"@rollup/rollup-win32-ia32-msvc@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.34.8.tgz#95cdbdff48fe6c948abcf6a1d500b2bd5ce33f62" + integrity sha512-r3NRQrXkHr4uWy5TOjTpTYojR9XmF0j/RYgKCef+Ag46FWUTltm5ziticv8LdNsDMehjJ543x/+TJAek/xBA2w== + "@rollup/rollup-win32-ia32-msvc@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.35.0.tgz#5b5a40e44a743ddc0e06b8e1b3982f856dc9ce0a" integrity sha512-2/lsgejMrtwQe44glq7AFFHLfJBPafpsTa6JvP2NGef/ifOa4KBoglVf7AKN7EV9o32evBPRqfg96fEHzWo5kw== +"@rollup/rollup-win32-x64-msvc@4.34.8": + version "4.34.8" + resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.34.8.tgz#4cdb2cfae69cdb7b1a3cc58778e820408075e928" + integrity sha512-U0FaE5O1BCpZSeE6gBl3c5ObhePQSfk9vDRToMmTkbhCOgW4jqvtS5LGyQ76L1fH8sM0keRp4uDTsbjiUyjk0g== + "@rollup/rollup-win32-x64-msvc@4.35.0": version "4.35.0" resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.35.0.tgz#05f25dbc9981bee1ae6e713daab10397044a46ca" @@ -7898,13 +7895,6 @@ resolved "https://registry.yarnpkg.com/@types/diff-match-patch/-/diff-match-patch-1.0.36.tgz#dcef10a69d357fe9d43ac4ff2eca6b85dbf466af" integrity sha512-xFdR6tkm0MWvBfO8xXCSsinYxHcqkQUlcHeSpMC2ukzOb6lwQAfDmW+Qt0AvlGd8HpsS28qKsB+oPeJn9I39jg== -"@types/duplexify@^3.6.0": - version "3.6.0" - resolved "https://registry.yarnpkg.com/@types/duplexify/-/duplexify-3.6.0.tgz#dfc82b64bd3a2168f5bd26444af165bf0237dcd8" - integrity sha512-5zOA53RUlzN74bvrSGwjudssD9F3a797sDZQkiYpUOxW+WHaXTCPz4/d5Dgi6FKnOqZ2CpaTo0DhgIfsXAOE/A== - dependencies: - "@types/node" "*" - "@types/ember-resolver@5.0.13": version "5.0.13" resolved "https://registry.yarnpkg.com/@types/ember-resolver/-/ember-resolver-5.0.13.tgz#db66678076ca625ed80b629c09619ae85c1c1f7a" @@ -8294,7 +8284,7 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= -"@types/long@^4.0.0", "@types/long@^4.0.1": +"@types/long@^4.0.0": version "4.0.2" resolved "https://registry.yarnpkg.com/@types/long/-/long-4.0.2.tgz#b74129719fc8d11c01868010082d483b7545591a" integrity sha512-MqTGEo5bj5t157U6fA/BiDynNkn0YknVdh48CMPkTSpFTVmvao5UQmm7uEF6xBEo7qIMAlY/JSleYaE6VOdpaA== @@ -8392,7 +8382,7 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@>=10.0.0", "@types/node@>=12.12.47", "@types/node@>=13.7.0", "@types/node@>=18": +"@types/node@*", "@types/node@>=10.0.0", "@types/node@>=18": version "22.10.2" resolved "https://registry.yarnpkg.com/@types/node/-/node-22.10.2.tgz#a485426e6d1fdafc7b0d4c7b24e2c78182ddabb9" integrity sha512-Xxr6BBRCAOQixvonOye19wnzyDiUtTeqldOOmj3CkeblonbccA12PFwlufvRdrpjXxqnmUaeiU5EOA+7s5diUQ== @@ -11052,7 +11042,7 @@ bluebird@^3.4.6, bluebird@^3.7.2: resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== -body-parser@1.20.3, body-parser@^1.18.3, body-parser@^1.19.0, body-parser@^1.20.3: +body-parser@1.20.3, body-parser@^1.19.0, body-parser@^1.20.3: version "1.20.3" resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.20.3.tgz#1953431221c6fb5cd63c4b36d53fab0928e548c6" integrity sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g== @@ -15955,7 +15945,7 @@ exponential-backoff@^3.1.1: resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== -express@4.21.1, express@^4.10.7, express@^4.16.4, express@^4.17.1, express@^4.17.3, express@^4.18.1, express@^4.21.1: +express@4.21.1, express@^4.10.7, express@^4.17.1, express@^4.17.3, express@^4.18.1, express@^4.21.1: version "4.21.1" resolved "https://registry.yarnpkg.com/express/-/express-4.21.1.tgz#9dae5dda832f16b4eec941a4e44aa89ec481b281" integrity sha512-YSFlK1Ee0/GC8QaO91tHcDxJiE/X4FbpAyQWkxAvG6AXCuR65YzK8ua6D9hvi/TzUfZMpc+BwuM1IPw8fmQBiQ== @@ -16147,7 +16137,7 @@ fast-sourcemap-concat@^2.1.0: source-map-url "^0.3.0" sourcemap-validator "^1.1.0" -fast-text-encoding@^1.0.0, fast-text-encoding@^1.0.3: +fast-text-encoding@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/fast-text-encoding/-/fast-text-encoding-1.0.3.tgz#ec02ac8e01ab8a319af182dae2681213cfe9ce53" integrity sha512-dtm4QZH9nZtcDt8qJiOH9fcQd1NAgi+K1O2DbE6GG1PPCK/BWfOH3idCTRQ4ImXRUOyopDEgDEnVEE7Y/2Wrig== @@ -17266,22 +17256,7 @@ gonzales-pe@^4.3.0: dependencies: minimist "^1.2.5" -google-auth-library@^6.1.1: - version "6.1.6" - resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-6.1.6.tgz#deacdcdb883d9ed6bac78bb5d79a078877fdf572" - integrity sha512-Q+ZjUEvLQj/lrVHF/IQwRo6p3s8Nc44Zk/DALsN+ac3T4HY/g/3rrufkgtl+nZ1TW7DNAw5cTChdVp4apUXVgQ== - dependencies: - arrify "^2.0.0" - base64-js "^1.3.0" - ecdsa-sig-formatter "^1.0.11" - fast-text-encoding "^1.0.0" - gaxios "^4.0.0" - gcp-metadata "^4.2.0" - gtoken "^5.0.4" - jws "^4.0.0" - lru-cache "^6.0.0" - -google-auth-library@^7.0.0, google-auth-library@^7.0.2: +google-auth-library@^7.0.2: version "7.0.3" resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-7.0.3.tgz#a38e853722ac1a4f14a7ff4d170fd0b0bf37766b" integrity sha512-6wJNYqY1QUr5I2lWaUkkzOT2b9OCNhNQrdFOt/bsBbGb7T7NCdEvrBsXraUm+KTUGk2xGlQ7m9RgUd4Llcw8NQ== @@ -17296,23 +17271,6 @@ google-auth-library@^7.0.0, google-auth-library@^7.0.2: jws "^4.0.0" lru-cache "^6.0.0" -google-gax@^2.9.0, google-gax@^2.9.2: - version "2.11.2" - resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-2.11.2.tgz#9ef7773b94aaa61c4588fb2408d62e8444995026" - integrity sha512-PNqXv7Oi5XBMgoMWVxLZHUidfMv7cPHrDSDXqLyEd6kY6pqFnVKC8jt2T1df4JPSc2+VLPdeo6L7X9mbdQG8Xw== - dependencies: - "@grpc/grpc-js" "~1.2.0" - "@grpc/proto-loader" "^0.5.1" - "@types/long" "^4.0.0" - abort-controller "^3.0.0" - duplexify "^4.0.0" - fast-text-encoding "^1.0.3" - google-auth-library "^7.0.2" - is-stream-ended "^0.1.4" - node-fetch "^2.6.1" - protobufjs "^6.10.2" - retry-request "^4.0.0" - google-p12-pem@^3.0.3: version "3.1.4" resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-3.1.4.tgz#123f7b40da204de4ed1fbf2fd5be12c047fc8b3b" @@ -18925,11 +18883,6 @@ is-ssh@^1.4.0: dependencies: protocols "^2.0.1" -is-stream-ended@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-stream-ended/-/is-stream-ended-0.1.4.tgz#f50224e95e06bce0e356d440a4827cd35b267eda" - integrity sha512-xj0XPvmr7bQFTvirqnFr50o0hQIh6ZItDqloxt5aJrR4NQsYeSsyFQERYGCAzfindAcnKjINnwEEgLx4IqVzQw== - is-stream@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" @@ -20581,7 +20534,7 @@ lodash.assign@^3.2.0: lodash._createassigner "^3.0.0" lodash.keys "^3.0.0" -lodash.camelcase@^4.1.1, lodash.camelcase@^4.3.0: +lodash.camelcase@^4.1.1: version "4.3.0" resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6" integrity sha1-soqmKIorn8ZRA1x3EfZathkDMaY= @@ -20715,11 +20668,6 @@ lodash.restparam@^3.0.0: resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805" integrity sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU= -lodash.snakecase@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz#39d714a35357147837aefd64b5dcbb16becd8f8d" - integrity sha1-OdcUo1NXFHg3rv1ktdy7Fr7Nj40= - lodash.sortby@^4.7.0: version "4.7.0" resolved "https://registry.yarnpkg.com/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" @@ -23386,7 +23334,7 @@ ohash@^1.1.3, ohash@^1.1.4: resolved "https://registry.yarnpkg.com/ohash/-/ohash-1.1.4.tgz#ae8d83014ab81157d2c285abf7792e2995fadd72" integrity sha512-FlDryZAahJmEF3VR3w1KogSEdWX3WhA5GPakFx4J81kEAiHyLMpdLLElS8n8dfNadMgAne/MywcvmogzscVt4g== -on-finished@2.4.1, on-finished@^2.3.0: +on-finished@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f" integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== @@ -25321,25 +25269,6 @@ property-information@^6.0.0: resolved "https://registry.yarnpkg.com/property-information/-/property-information-6.3.0.tgz#ba4a06ec6b4e1e90577df9931286953cdf4282c3" integrity sha512-gVNZ74nqhRMiIUYWGQdosYetaKc83x8oT41a0LlV3AAFCAZwCpg4vmGkq8t34+cUhp3cnM4XDiU/7xlgK7HGrg== -protobufjs@^6.10.2, protobufjs@^6.8.6: - version "6.11.4" - resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-6.11.4.tgz#29a412c38bf70d89e537b6d02d904a6f448173aa" - integrity sha512-5kQWPaJHi1WoCpjTGszzQ32PG2F4+wRY6BmAT4Vfw56Q2FZ4YZzK20xUYQH4YkfehY1e6QSICrJquM6xXZNcrw== - dependencies: - "@protobufjs/aspromise" "^1.1.2" - "@protobufjs/base64" "^1.1.2" - "@protobufjs/codegen" "^2.0.4" - "@protobufjs/eventemitter" "^1.1.0" - "@protobufjs/fetch" "^1.1.0" - "@protobufjs/float" "^1.0.2" - "@protobufjs/inquire" "^1.1.0" - "@protobufjs/path" "^1.1.2" - "@protobufjs/pool" "^1.1.0" - "@protobufjs/utf8" "^1.1.0" - "@types/long" "^4.0.1" - "@types/node" ">=13.7.0" - long "^4.0.0" - protocols@^2.0.0, protocols@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/protocols/-/protocols-2.0.1.tgz#8f155da3fc0f32644e83c5782c8e8212ccf70a86" @@ -26457,7 +26386,7 @@ retext@^8.1.0: retext-stringify "^3.0.0" unified "^10.0.0" -retry-request@^4.0.0, retry-request@^4.1.1: +retry-request@^4.1.1: version "4.1.3" resolved "https://registry.yarnpkg.com/retry-request/-/retry-request-4.1.3.tgz#d5f74daf261372cff58d08b0a1979b4d7cab0fde" integrity sha512-QnRZUpuPNgX0+D1xVxul6DbJ9slvo4Rm6iV/dn63e048MvGbUZiKySVt6Tenp04JqmchxjiLltGerOJys7kJYQ== @@ -26931,7 +26860,7 @@ semver@7.5.3: dependencies: lru-cache "^6.0.0" -semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.1.3, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.0, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4, semver@^7.6.2, semver@^7.6.3: +semver@7.x, semver@^7.0.0, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7, semver@^7.3.8, semver@^7.5.0, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4, semver@^7.6.2, semver@^7.6.3: version "7.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-7.7.1.tgz#abd5098d82b18c6c81f6074ff2647fd3e7220c9f" integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==