Skip to content

Commit 72f6e91

Browse files
authored
1st gen imports and codebases (firebase#1091)
1 parent 77166a3 commit 72f6e91

File tree

111 files changed

+753
-1341
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+753
-1341
lines changed
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
{}
1+
{
2+
"functions": {
3+
"codebase": "assistant-say-number"
4+
}
5+
}

Node-1st-gen/assistant-say-number/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919
const { actionssdk } = require('actions-on-google');
2020

2121
const app = actionssdk();

Node-1st-gen/authenticated-json-api/firebase.json

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"functions": {
3+
"codebase": "authenticated-json-api"
4+
},
25
"hosting": {
36
"public": "public",
47
"rewrites": [

Node-1st-gen/authenticated-json-api/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
'use strict';
1818

19-
const functions = require('firebase-functions');
19+
const functions = require('firebase-functions/v1');
2020
const admin = require('firebase-admin');
2121

2222
// Follow instructions to set up admin credentials:

Node-1st-gen/authorized-https-endpoint/firebase.json

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"functions": {
3+
"codebase": "authorized-https-endpoint"
4+
},
25
"hosting": {
36
"public": "public",
47
"rewrites": [

Node-1st-gen/authorized-https-endpoint/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919
const admin = require('firebase-admin');
2020
admin.initializeApp();
2121
const express = require('express');
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"functions": {
3+
"codebase": "bigquery-import"
4+
}
5+
}

Node-1st-gen/bigquery-import/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919
const { BigQuery } = require('@google-cloud/bigquery');
2020

2121
const bigquery = new BigQuery();
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"functions": {
3+
"codebase": "child-count"
4+
}
5+
}

Node-1st-gen/child-count/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919
const admin = require('firebase-admin');
2020
admin.initializeApp();
2121

+5-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
{}
1+
{
2+
"functions": {
3+
"codebase": "convert-images"
4+
}
5+
}

Node-1st-gen/convert-images/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919
const admin = require('firebase-admin');
2020
const mkdirp = require('mkdirp');
2121
const spawn = require('child-process-promise').spawn;
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
{}
1+
{
2+
"functions": {
3+
"codebase": "coupon-on-purchase"
4+
}
5+
}

Node-1st-gen/coupon-on-purchase/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919
const admin = require('firebase-admin');
2020
admin.initializeApp();
2121

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"functions": {
3+
"codebase": "delete-old-child-nodes"
4+
}
5+
}

Node-1st-gen/delete-old-child-nodes/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919
const admin = require('firebase-admin');
2020
admin.initializeApp();
2121

Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
{}
1+
{
2+
"functions": {
3+
"codebase": "delete-unused-accounts"
4+
}
5+
}

Node-1st-gen/delete-unused-accounts-cron/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919
const admin = require('firebase-admin');
2020
admin.initializeApp();
2121
const PromisePool = require('es6-promise-pool').default;
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
{}
1+
{
2+
"functions": {
3+
"codebase": "developer-motivator"
4+
}
5+
}

Node-1st-gen/developer-motivator/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
'use strict';
1717

1818
const admin = require('firebase-admin');
19-
const functions = require('firebase-functions');
19+
const functions = require('firebase-functions/v1');
2020
admin.initializeApp();
2121

2222
// TODO: Make sure you configure the 'dev_motivator.device_token' Google Cloud environment variables.

Node-1st-gen/email-confirmation/firebase.json

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"functions": {
3+
"codebase": "email-confirmation"
4+
},
25
"database": {
36
"rules": "database.rules.json"
47
},

Node-1st-gen/email-confirmation/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919
const nodemailer = require('nodemailer');
2020
// Configure the email transport using the default SMTP transport and a GMail account.
2121
// For other types of transports such as Sendgrid see https://nodemailer.com/transports/

Node-1st-gen/exif-images/firebase.json

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"functions": {
3+
"codebase": "exif-images"
4+
},
25
"database": {
36
"rules": "database.rules.json"
47
},

Node-1st-gen/exif-images/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919
const fs = require('fs');
2020
const crypto = require('crypto');
2121
const path = require('path');

Node-1st-gen/fcm-notifications/firebase.json

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"functions": {
3+
"codebase": "fcm-notifications"
4+
},
25
"database": {
36
"rules": "database.rules.json"
47
},

Node-1st-gen/fcm-notifications/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919
const admin = require('firebase-admin');
2020
admin.initializeApp();
2121

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"functions": {
3+
"codebase": "ffmpeg-convert-audio"
4+
}
5+
}

Node-1st-gen/ffmpeg-convert-audio/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919
const { Storage } = require('@google-cloud/storage');
2020
const path = require('path');
2121
const os = require('os');

Node-1st-gen/fulltext-search-firestore/firebase.json

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"functions": {
3+
"codebase": "fulltext-search-firestore"
4+
},
25
"hosting": {
36
"public": "public"
47
}

Node-1st-gen/fulltext-search-firestore/functions/elastic.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
const functions = require("firebase-functions");
16+
const functions = require('firebase-functions/v1');
1717

1818
// [START init_elastic]
1919
const { Client } = require("@elastic/elasticsearch");

Node-1st-gen/fulltext-search-firestore/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
const functions = require('firebase-functions');
16+
const functions = require('firebase-functions/v1');
1717
const algoliasearch = require('algoliasearch').default;
1818

1919
// [START init_algolia]

Node-1st-gen/fulltext-search-firestore/functions/typesense.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
const functions = require("firebase-functions");
16+
const functions = require('firebase-functions/v1');
1717

1818
// [START init_typesense]
1919
// Initialize Typesense, requires installing Typesense dependencies:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"functions": {
3+
"codebase": "fulltext-search"
4+
}
5+
}

Node-1st-gen/fulltext-search/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919
const admin = require('firebase-admin');
2020
admin.initializeApp();
2121

+5-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
{}
1+
{
2+
"functions": {
3+
"codebase": "github-to-slack"
4+
}
5+
}

Node-1st-gen/github-to-slack/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919
const fetch = require('node-fetch');
2020
const crypto = require('node:crypto');
2121
const secureCompare = require('secure-compare');

Node-1st-gen/google-sheet-sync/firebase.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"functions": {
3-
"source": "functions"
3+
"source": "functions",
4+
"codebase": "google-sheet-sync"
45
},
56
"hosting": {
67
"rewrites": [

Node-1st-gen/google-sheet-sync/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
// Sample trigger function that copies new Firebase data to a Google Sheet
1919

20-
const functions = require('firebase-functions');
20+
const functions = require('firebase-functions/v1');
2121
const admin = require('firebase-admin');
2222
admin.initializeApp();
2323
const {OAuth2Client} = require('google-auth-library');

Node-1st-gen/image-maker/firebase.json

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"functions": {
3+
"codebase": "image-maker"
4+
},
25
"hosting": {
36
"public": "public",
47
"rewrites": [

Node-1st-gen/image-maker/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
const functions = require('firebase-functions');
17+
const functions = require('firebase-functions/v1');
1818
const app = require('express')();
1919
const { Canvas } = require('canvas');
2020
const _ = require('lodash');

Node-1st-gen/instagram-auth/firebase.json

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"functions": {
3+
"codebase": "instagram-auth"
4+
},
25
"database": {
36
"rules": "database.rules.json"
47
},

Node-1st-gen/instagram-auth/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919
const cookieParser = require('cookie-parser');
2020
const crypto = require('node:crypto');
2121

Node-1st-gen/lastmodified-tracking/firebase.json

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"functions": {
3+
"codebase": "lastmodified-tracking"
4+
},
25
"database": {
36
"rules": "database.rules.json"
47
}

Node-1st-gen/lastmodified-tracking/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919
const admin = require('firebase-admin');
2020
admin.initializeApp();
2121

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"functions": {
3+
"codebase": "limit-children"
4+
}
5+
}

Node-1st-gen/limit-children/functions/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

18-
const functions = require('firebase-functions');
18+
const functions = require('firebase-functions/v1');
1919

2020
// Max number of lines of the chat history.
2121
const MAX_LOG_COUNT = 5;

Node-1st-gen/linkedin-auth/firebase.json

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"functions": {
3+
"codebase": "linkedin-auth"
4+
},
25
"database": {
36
"rules": "database.rules.json"
47
},

0 commit comments

Comments
 (0)