Skip to content

Commit a56adbd

Browse files
author
Ingrid Fielker
committed
fixing nits
1 parent 1a45154 commit a56adbd

File tree

10 files changed

+13
-58
lines changed

10 files changed

+13
-58
lines changed

scripts/bin-test/sources/commonjs-grouped/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ const ttOnStart = extRef1.onStart((event) => {
3838
exports.ttOnStart = ttOnStart;
3939

4040
// A Firebase extension by localPath
41-
const extLocal2 = backfill("extLocal2", {
41+
exports.extLocal2 = backfill("extLocal2", {
4242
DO_BACKFILL: "False",
4343
LOCATION: "us-central1",
4444
});
45-
exports.extLocal2 = extLocal2;
4645

4746
exports.g1 = require("./g1");

scripts/bin-test/sources/commonjs-main/functions.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ const ttOnStart = extRef1.onStart((event) => {
3737
exports.ttOnStart = ttOnStart;
3838

3939
// A Firebase extension by localPath
40-
const extLocal2 = backfill("extLocal2", {
40+
exports.extLocal2 = backfill("extLocal2", {
4141
DO_BACKFILL: "False",
4242
LOCATION: "us-central1",
4343
});
44-
exports.extLocal2 = extLocal2;

scripts/bin-test/sources/commonjs-preserve/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ const ttOnStart = extRef1.onStart((event) => {
3737
exports.ttOnStart = ttOnStart;
3838

3939
// A Firebase extension by localPath
40-
const extLocal2 = backfill("extLocal2", {
40+
exports.extLocal2 = backfill("extLocal2", {
4141
DO_BACKFILL: "False",
4242
LOCATION: "us-central1",
43-
});
44-
exports.extLocal2 = extLocal2;
43+
});

scripts/bin-test/sources/commonjs/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ const ttOnStart = extRef1.onStart((event) => {
3737
exports.ttOnStart = ttOnStart;
3838

3939
// A Firebase extension by localPath
40-
const extLocal2 = backfill("extLocal2", {
40+
exports.extLocal2 = backfill("extLocal2", {
4141
DO_BACKFILL: "False",
4242
LOCATION: "us-central1",
4343
});
44-
exports.extLocal2 = extLocal2;

spec/fixtures/sources/commonjs-grouped/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ const ttOnStart = extRef1.onStart((event) => {
3838
exports.ttOnStart = ttOnStart;
3939

4040
// A Firebase extension by localPath
41-
const extLocal2 = backfill("extLocal2", {
41+
exports.extLocal2 = backfill("extLocal2", {
4242
DO_BACKFILL: "False",
4343
LOCATION: "us-central1",
4444
});
45-
exports.extLocal2 = extLocal2;
4645

4746
exports.g1 = require("./g1");

spec/fixtures/sources/commonjs-main/functions.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ const ttOnStart = extRef1.onStart((event) => {
3737
exports.ttOnStart = ttOnStart;
3838

3939
// A Firebase extension by localPath
40-
const extLocal2 = backfill("extLocal2", {
40+
exports.extLocal2 = backfill("extLocal2", {
4141
DO_BACKFILL: "False",
4242
LOCATION: "us-central1",
43-
});
44-
exports.extLocal2 = extLocal2;
43+
});
Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
const functions = require("../../../../src/v1/index");
22
const functionsv2 = require("../../../../src/v2/index");
3-
const firestoreTranslateText = require("../../extsdk/translate").firestoreTranslateText;
4-
const backfill = require("../../extsdk/local").backfill;
53
const params = require("../../../../src/params");
64
params.clearParams();
75

@@ -30,27 +28,3 @@ exports.v2http = functionsv2.https.onRequest({
3028
}, (req, resp) => {
3129
resp.status(200).send("Hello world!");
3230
});
33-
34-
// A Firebase extension by ref
35-
const extRef1 = firestoreTranslateText("extRef1", {
36-
"COLLECTION_PATH": "collection1",
37-
"INPUT_FIELD_NAME": "input1",
38-
"LANGUAGES": "de,es",
39-
"OUTPUT_FIELD_NAME": "translated",
40-
"_EVENT_ARC_REGION": "us-central1",
41-
"_FUNCTION_LOCATION": "us-central1",
42-
});
43-
exports.extRef1 = extRef1;
44-
45-
// A Firebase function defined by extension event
46-
const ttOnStart = extRef1.onStart((event) => {
47-
console.log("onStart got event: " + JSON.stringify(event, null, 2));
48-
});
49-
exports.ttOnStart = ttOnStart;
50-
51-
// A Firebase extension by localPath
52-
const extLocal2 = backfill("extLocal2", {
53-
DO_BACKFILL: "False",
54-
LOCATION: "us-central1",
55-
});
56-
exports.extLocal2 = extLocal2;

spec/fixtures/sources/commonjs-params/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,7 @@ const ttOnStart = extRef1.onStart((event) => {
6161
exports.ttOnStart = ttOnStart;
6262

6363
// A Firebase extension by localPath
64-
const extLocal2 = backfill("extLocal2", {
64+
exports.extLocal2 = backfill("extLocal2", {
6565
DO_BACKFILL: "False",
6666
LOCATION: "us-central1",
6767
});
68-
exports.extLocal2 = extLocal2;

spec/fixtures/sources/commonjs/index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ const ttOnStart = extRef1.onStart((event) => {
3737
exports.ttOnStart = ttOnStart;
3838

3939
// A Firebase extension by localPath
40-
const extLocal2 = backfill("extLocal2", {
40+
exports.extLocal2 = backfill("extLocal2", {
4141
DO_BACKFILL: "False",
4242
LOCATION: "us-central1",
43-
});
44-
exports.extLocal2 = extLocal2;
43+
});

spec/runtime/loader.spec.ts

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,8 @@ describe("loadStack", () => {
437437
{ name: "INT_PARAM", type: "int" },
438438
{ name: "BOOLEAN_PARAM", type: "boolean" },
439439
],
440+
requiredAPIs: [],
441+
extensions: {},
440442
endpoints: {
441443
v1http: {
442444
...MINIMAL_V1_ENDPOINT,
@@ -463,19 +465,6 @@ describe("loadStack", () => {
463465
labels: {},
464466
httpsTrigger: {},
465467
},
466-
ttOnStart: {
467-
...MINIMAL_V2_ENDPOINT,
468-
entryPoint: "ttOnStart",
469-
eventTrigger: {
470-
channel: "projects/locations/us-central1/channels/firebase",
471-
eventFilters: {},
472-
eventType: "firebase.extensions.firestore-translate-text.v1.onStart",
473-
retry: false,
474-
},
475-
labels: {},
476-
platform: "gcfv2",
477-
region: ["us-central1"],
478-
},
479468
},
480469
},
481470
},

0 commit comments

Comments
 (0)