Skip to content

Commit

Permalink
plain imports
Browse files Browse the repository at this point in the history
  • Loading branch information
Berlioz committed Dec 17, 2024
1 parent b78cbc4 commit 87bd7e1
Show file tree
Hide file tree
Showing 38 changed files with 38 additions and 38 deletions.
2 changes: 1 addition & 1 deletion spec/main.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import { mockConfig, makeChange, wrap } from '../src/main';
import { _makeResourceName, _extractParams } from '../src/v1';
import { features } from '../src/features';
import { FirebaseFunctionsTest } from '../src/lifecycle';
import { alerts } from 'firebase-functions';
import { alerts } from 'firebase-functions/v2';
import { wrapV2 } from '../src/v2';

describe('main', () => {
Expand Down
2 changes: 1 addition & 1 deletion spec/v2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import {
eventarc,
https,
firestore,
} from 'firebase-functions';
} from 'firebase-functions/v2';
import { defineString } from 'firebase-functions/params';
import { makeDataSnapshot } from '../src/providers/database';
import { makeDocumentSnapshot } from '../src/providers/firestore';
Expand Down
2 changes: 1 addition & 1 deletion src/cloudevent/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
CloudFunction,
database,
pubsub,
} from 'firebase-functions';
} from 'firebase-functions/v2';
import {
DocumentSnapshot,
QueryDocumentSnapshot,
Expand Down
2 changes: 1 addition & 1 deletion src/cloudevent/mocks/alerts/alerts-on-alert-published.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeepPartial, MockCloudEventAbstractFactory } from '../../types';
import { CloudFunction } from 'firebase-functions';
import { CloudFunction } from 'firebase-functions/v2';
import {
APP_ID,
getBaseCloudEvent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeepPartial, MockCloudEventAbstractFactory } from '../../types';
import { CloudFunction } from 'firebase-functions';
import { CloudFunction } from 'firebase-functions/v2';
import {
getBaseCloudEvent,
getEventFilters,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeepPartial, MockCloudEventAbstractFactory } from '../../types';
import { CloudFunction } from 'firebase-functions';
import { CloudFunction } from 'firebase-functions/v2';
import { FirebaseAlertData } from 'firebase-functions/alerts';
import {
BillingEvent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeepPartial, MockCloudEventAbstractFactory } from '../../types';
import { CloudFunction } from 'firebase-functions';
import { CloudFunction } from 'firebase-functions/v2';
import { FirebaseAlertData } from 'firebase-functions/alerts';
import {
BillingEvent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeepPartial, MockCloudEventAbstractFactory } from '../../types';
import { CloudFunction } from 'firebase-functions';
import { CloudFunction } from 'firebase-functions/v2';
import {
getBaseCloudEvent,
getEventFilters,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeepPartial, MockCloudEventAbstractFactory } from '../../types';
import { CloudFunction } from 'firebase-functions';
import { CloudFunction } from 'firebase-functions/v2';
import {
getBaseCloudEvent,
getEventFilters,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeepPartial, MockCloudEventAbstractFactory } from '../../types';
import { CloudFunction } from 'firebase-functions';
import { CloudFunction } from 'firebase-functions/v2';
import {
getBaseCloudEvent,
getEventFilters,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeepPartial, MockCloudEventAbstractFactory } from '../../types';
import { CloudFunction } from 'firebase-functions';
import { CloudFunction } from 'firebase-functions/v2';
import {
getBaseCloudEvent,
getEventFilters,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeepPartial, MockCloudEventAbstractFactory } from '../../types';
import { CloudFunction } from 'firebase-functions';
import { CloudFunction } from 'firebase-functions/v2';
import {
getBaseCloudEvent,
getEventFilters,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeepPartial, MockCloudEventAbstractFactory } from '../../types';
import { CloudFunction } from 'firebase-functions';
import { CloudFunction } from 'firebase-functions/v2';
import {
getBaseCloudEvent,
getEventFilters,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeepPartial, MockCloudEventAbstractFactory } from '../../types';
import { CloudFunction } from 'firebase-functions';
import { CloudFunction } from 'firebase-functions/v2';
import {
PerformanceEvent,
ThresholdAlertPayload,
Expand Down
2 changes: 1 addition & 1 deletion src/cloudevent/mocks/database/database-on-value-created.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MockCloudEventAbstractFactory } from '../../types';
import { CloudEvent, CloudFunction, database } from 'firebase-functions';
import { CloudEvent, CloudFunction, database } from 'firebase-functions/v2';
import { getEventType } from '../helpers';
import { getDatabaseSnapshotCloudEvent } from './helpers';

Expand Down
2 changes: 1 addition & 1 deletion src/cloudevent/mocks/database/database-on-value-deleted.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MockCloudEventAbstractFactory } from '../../types';
import { CloudEvent, CloudFunction, database } from 'firebase-functions';
import { CloudEvent, CloudFunction, database } from 'firebase-functions/v2';
import { getEventType } from '../helpers';
import { getDatabaseSnapshotCloudEvent } from './helpers';

Expand Down
2 changes: 1 addition & 1 deletion src/cloudevent/mocks/database/database-on-value-updated.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MockCloudEventAbstractFactory } from '../../types';
import { CloudEvent, CloudFunction, database } from 'firebase-functions';
import { CloudEvent, CloudFunction, database } from 'firebase-functions/v2';
import { getEventType } from '../helpers';
import { Change } from 'firebase-functions/v1';
import { getDatabaseChangeSnapshotCloudEvent } from './helpers';
Expand Down
2 changes: 1 addition & 1 deletion src/cloudevent/mocks/database/database-on-value-written.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MockCloudEventAbstractFactory } from '../../types';
import { CloudEvent, CloudFunction, database } from 'firebase-functions';
import { CloudEvent, CloudFunction, database } from 'firebase-functions/v2';
import { getEventType } from '../helpers';
import { Change } from 'firebase-functions/v1';
import { getDatabaseChangeSnapshotCloudEvent } from './helpers';
Expand Down
2 changes: 1 addition & 1 deletion src/cloudevent/mocks/database/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CloudFunction, database } from 'firebase-functions';
import { CloudFunction, database } from 'firebase-functions/v2';
import { DeepPartial } from '../../types';
import {
exampleDataSnapshot,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeepPartial, MockCloudEventAbstractFactory } from '../../types';
import { CloudEvent, CloudFunction } from 'firebase-functions';
import { CloudEvent, CloudFunction } from 'firebase-functions/v2';
import { getBaseCloudEvent } from '../helpers';

export const eventarcOnCustomEventPublished: MockCloudEventAbstractFactory<any> = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MockCloudEventAbstractFactory } from '../../types';
import { CloudEvent, CloudFunction, firestore } from 'firebase-functions';
import { CloudEvent, CloudFunction, firestore } from 'firebase-functions/v2';
import { getEventType } from '../helpers';
import { QueryDocumentSnapshot } from 'firebase-admin/firestore';
import { getDocumentSnapshotCloudEventWithAuthContext } from './helpers';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MockCloudEventAbstractFactory } from '../../types';
import { CloudEvent, CloudFunction, firestore } from 'firebase-functions';
import { CloudEvent, CloudFunction, firestore } from 'firebase-functions/v2';
import { getEventType } from '../helpers';
import { QueryDocumentSnapshot } from 'firebase-admin/firestore';
import { getDocumentSnapshotCloudEvent } from './helpers';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MockCloudEventAbstractFactory } from '../../types';
import { CloudEvent, CloudFunction, firestore } from 'firebase-functions';
import { CloudEvent, CloudFunction, firestore } from 'firebase-functions/v2';
import { getEventType } from '../helpers';
import { QueryDocumentSnapshot } from 'firebase-admin/firestore';
import { getDocumentSnapshotCloudEventWithAuthContext } from './helpers';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MockCloudEventAbstractFactory } from '../../types';
import { CloudEvent, CloudFunction, firestore } from 'firebase-functions';
import { CloudEvent, CloudFunction, firestore } from 'firebase-functions/v2';
import { getEventType } from '../helpers';
import { QueryDocumentSnapshot } from 'firebase-admin/firestore';
import { getDocumentSnapshotCloudEvent } from './helpers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
CloudEvent,
CloudFunction,
firestore,
} from 'firebase-functions';
} from 'firebase-functions/v2';
import { getEventType } from '../helpers';
import { QueryDocumentSnapshot } from 'firebase-admin/firestore';
import { getDocumentSnapshotChangeCloudEventWithAuthContext } from './helpers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
CloudEvent,
CloudFunction,
firestore,
} from 'firebase-functions';
} from 'firebase-functions/v2';
import { getEventType } from '../helpers';
import { QueryDocumentSnapshot } from 'firebase-admin/firestore';
import { getDocumentSnapshotChangeCloudEvent } from './helpers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
CloudEvent,
CloudFunction,
firestore,
} from 'firebase-functions';
} from 'firebase-functions/v2';
import { getEventType } from '../helpers';
import { DocumentSnapshot } from 'firebase-admin/firestore';
import { getDocumentSnapshotChangeCloudEventWithAuthContext } from './helpers';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
CloudEvent,
CloudFunction,
firestore,
} from 'firebase-functions';
} from 'firebase-functions/v2';
import { getEventType } from '../helpers';
import { DocumentSnapshot } from 'firebase-admin/firestore';
import { getDocumentSnapshotChangeCloudEvent } from './helpers';
Expand Down
2 changes: 1 addition & 1 deletion src/cloudevent/mocks/firestore/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DocumentSnapshot } from 'firebase-admin/firestore';
import { Change, CloudFunction, firestore } from 'firebase-functions';
import { Change, CloudFunction, firestore } from 'firebase-functions/v2';
import {
exampleDocumentSnapshot,
exampleDocumentSnapshotChange,
Expand Down
2 changes: 1 addition & 1 deletion src/cloudevent/mocks/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as v1 from 'firebase-functions/v1';
import * as v2 from 'firebase-functions';
import * as v2 from 'firebase-functions/v2';
import { Expression } from 'firebase-functions/params';

export const APP_ID = '__APP_ID__';
Expand Down
2 changes: 1 addition & 1 deletion src/cloudevent/mocks/pubsub/pubsub-on-message-published.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeepPartial, MockCloudEventAbstractFactory } from '../../types';
import { CloudEvent, CloudFunction, pubsub } from 'firebase-functions';
import { CloudEvent, CloudFunction, pubsub } from 'firebase-functions/v2';
import {
getBaseCloudEvent,
getEventFilters,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeepPartial, MockCloudEventAbstractFactory } from '../../types';
import { CloudFunction, CloudEvent } from 'firebase-functions';
import { CloudFunction, CloudEvent } from 'firebase-functions/v2';
import { ConfigUpdateData } from 'firebase-functions/remoteConfig';
import { getBaseCloudEvent, getEventType, PROJECT_ID } from '../helpers';

Expand Down
2 changes: 1 addition & 1 deletion src/cloudevent/mocks/storage/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeepPartial, MockCloudEventAbstractFactory } from '../../types';
import { CloudFunction, CloudEvent } from 'firebase-functions';
import { CloudFunction, CloudEvent } from 'firebase-functions/v2';
import { StorageEvent } from 'firebase-functions/storage';
import {
FILENAME,
Expand Down
2 changes: 1 addition & 1 deletion src/cloudevent/mocks/storage/storage-data.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { storage } from 'firebase-functions';
import { storage } from 'firebase-functions/v2';
import { FILENAME } from '../helpers';

/** Storage Data */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DeepPartial, MockCloudEventAbstractFactory } from '../../types';
import { CloudFunction, CloudEvent } from 'firebase-functions';
import { CloudFunction, CloudEvent } from 'firebase-functions/v2';
import { TestMatrixCompletedData } from 'firebase-functions/testLab';
import { getBaseCloudEvent, getEventType, PROJECT_ID } from '../helpers';

Expand Down
2 changes: 1 addition & 1 deletion src/cloudevent/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CloudEvent, CloudFunction } from 'firebase-functions';
import { CloudEvent, CloudFunction } from 'firebase-functions/v2';

export type DeepPartial<T extends object> = {
[Key in keyof T]?: T[Key] extends object ? DeepPartial<T[Key]> : T[Key];
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {
import {
CloudFunction as CloudFunctionV2,
CloudEvent,
} from 'firebase-functions';
} from 'firebase-functions/v2';

import {
CallableFunction,
Expand Down
2 changes: 1 addition & 1 deletion src/v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

import { CloudFunction, CloudEvent } from 'firebase-functions';
import { CloudFunction, CloudEvent } from 'firebase-functions/v2';
import { CallableFunction, CallableRequest } from 'firebase-functions/https';

import { generateCombinedCloudEvent } from './cloudevent/generate';
Expand Down

0 comments on commit 87bd7e1

Please sign in to comment.