Skip to content

Commit 2218f5f

Browse files
committed
Merge branch 'master' into mb-rushstack
2 parents a3f67a7 + b9de399 commit 2218f5f

File tree

88 files changed

+14221
-1379
lines changed

Some content is hidden

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

88 files changed

+14221
-1379
lines changed

.github/workflows/test.yaml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- 10.x
1717
- 12.x
1818
- 14.x
19+
- 16.x
1920
steps:
2021
- uses: actions/checkout@v1
2122
- uses: actions/setup-node@v1
@@ -28,7 +29,29 @@ jobs:
2829
path: ~/.npm
2930
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
3031

31-
- run: npm install
32+
- run: npm ci
3233
- run: npm run lint
3334
- run: npm run format
3435
- run: npm run test
36+
integration:
37+
runs-on: ubuntu-latest
38+
strategy:
39+
matrix:
40+
node-version:
41+
- 12.x
42+
- 14.x
43+
- 16.x
44+
steps:
45+
- uses: actions/checkout@v1
46+
- uses: actions/setup-node@v1
47+
with:
48+
node-version: ${{ matrix.node-version }}
49+
50+
- name: Cache npm
51+
uses: actions/cache@v1
52+
with:
53+
path: ~/.npm
54+
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
55+
56+
- run: npm install
57+
- run: npm run test:bin

.mocharc.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
exit: true
22
extension:
33
- ts
4-
file:
5-
- mocha/setup.ts
64
package: ./package.json
75
reporter: spec
86
require:
97
- 'ts-node/register'
10-
spec: spec/**/*.spec.ts
8+
- 'source-map-support/register'

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
- GCS Enhancement
1+
- Changes internal structure to be more flexible (#1070).

docgen/content-sources/v1/toc.yaml

Lines changed: 66 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,148 +1,154 @@
11
toc:
22
- title: 'functions'
3-
path: /docs/reference/functions/v1_cloud_functions_.html
3+
path: /docs/reference/functions/cloud_functions.html
44
section:
55
- title: 'CloudFunction'
6-
path: /docs/reference/functions/v1_cloud_functions_.html#cloudfunction
6+
path: /docs/reference/functions/cloud_functions.html#cloudfunction
77
- title: 'HttpsFunction'
8-
path: /docs/reference/functions/v1_cloud_functions_.html#httpsfunction
8+
path: /docs/reference/functions/cloud_functions.html#httpsfunction
99
- title: 'EventContext'
10-
path: /docs/reference/functions/v1_cloud_functions_.eventcontext.html
10+
path: /docs/reference/functions/cloud_functions.eventcontext.html
1111
- title: 'FunctionBuilder'
12-
path: /docs/reference/functions/v1_function_builder_.functionbuilder.html
12+
path: /docs/reference/functions/function_builder.functionbuilder.html
1313
- title: 'Change'
14-
path: /docs/reference/functions/v1_cloud_functions_.change.html
14+
path: /docs/reference/functions/cloud_functions.change.html
1515
- title: 'ChangeJson'
16-
path: /docs/reference/functions/v1_cloud_functions_.changejson.html
16+
path: /docs/reference/functions/cloud_functions.changejson.html
1717

1818
- title: 'functions.config'
19-
path: /docs/reference/functions/v1_config_.html
19+
path: /docs/reference/functions/config.html
2020
section:
2121
- title: 'Config'
22-
path: /docs/reference/functions/v1_config_.config.html
22+
path: /docs/reference/functions/config.config-1.html
2323
- title: 'config.Config'
24-
path: /docs/reference/functions/v1_config_.config.config.html
24+
path: /docs/reference/functions/config.config-1.config.html
2525

2626
- title: 'functions.function-configuration'
27-
path: /docs/reference/functions/v1_function_configuration_.html
27+
path: /docs/reference/functions/function_configuration.html
2828
section:
2929
- title: 'config.DeploymentOptions'
30-
path: /docs/reference/functions/v1_function_configuration_.deploymentoptions.html
30+
path: /docs/reference/functions/function_configuration.deploymentoptions.html
3131
- title: 'config.FailurePolicy'
32-
path: /docs/reference/functions/v1_function_configuration_.failurepolicy.html
32+
path: /docs/reference/functions/function_configuration.failurepolicy.html
3333
- title: 'config.RuntimeOptions'
34-
path: /docs/reference/functions/v1_function_configuration_.runtimeoptions.html
34+
path: /docs/reference/functions/function_configuration.runtimeoptions.html
3535
- title: 'config.Schedule'
36-
path: /docs/reference/functions/v1_function_configuration_.schedule.html
36+
path: /docs/reference/functions/function_configuration.schedule.html
3737
- title: 'config.ScheduleRetryConfig'
38-
path: /docs/reference/functions/v1_function_configuration_.scheduleretryconfig.html
38+
path: /docs/reference/functions/function_configuration.scheduleretryconfig.html
3939

4040
- title: 'functions.analytics'
41-
path: /docs/reference/functions/v1_providers_analytics_.html
41+
path: /docs/reference/functions/providers_analytics.html
4242
section:
4343
- title: 'AnalyticsEvent'
44-
path: /docs/reference/functions/v1_providers_analytics_.analyticsevent.html
44+
path: /docs/reference/functions/providers_analytics.analyticsevent.html
4545
- title: 'AnalyticsEventBuilder'
46-
path: /docs/reference/functions/v1_providers_analytics_.analyticseventbuilder.html
46+
path: /docs/reference/functions/providers_analytics.analyticseventbuilder.html
4747
- title: 'AppInfo'
48-
path: /docs/reference/functions/v1_providers_analytics_.appinfo.html
48+
path: /docs/reference/functions/providers_analytics.appinfo.html
4949
- title: 'DeviceInfo'
50-
path: /docs/reference/functions/v1_providers_analytics_.deviceinfo.html
50+
path: /docs/reference/functions/providers_analytics.deviceinfo.html
5151
- title: 'ExportBundleInfo'
52-
path: /docs/reference/functions/v1_providers_analytics_.exportbundleinfo.html
52+
path: /docs/reference/functions/providers_analytics.exportbundleinfo.html
5353
- title: 'GeoInfo'
54-
path: /docs/reference/functions/v1_providers_analytics_.geoinfo.html
54+
path: /docs/reference/functions/providers_analytics.geoinfo.html
5555
- title: 'UserDimensions'
56-
path: /docs/reference/functions/v1_providers_analytics_.userdimensions.html
56+
path: /docs/reference/functions/providers_analytics.userdimensions.html
5757
- title: 'UserPropertyValue'
58-
path: /docs/reference/functions/v1_providers_analytics_.userpropertyvalue.html
58+
path: /docs/reference/functions/providers_analytics.userpropertyvalue.html
5959

6060
- title: 'functions.auth'
61-
path: /docs/reference/functions/v1_providers_auth_.html
61+
path: /docs/reference/functions/providers_auth.html
6262
section:
6363
- title: 'UserBuilder'
64-
path: /docs/reference/functions/v1_providers_auth_.userbuilder.html
64+
path: /docs/reference/functions/providers_auth.userbuilder.html
6565
- title: 'UserInfo'
66-
path: /docs/reference/functions/v1_providers_auth_.html#userinfo
66+
path: /docs/reference/functions/providers_auth.html#userinfo
6767
- title: 'UserRecordMetadata'
68-
path: /docs/reference/functions/v1_providers_auth_.userrecordmetadata.html
68+
path: /docs/reference/functions/providers_auth.userrecordmetadata.html
6969
- title: 'UserRecord'
70-
path: /docs/reference/functions/v1_providers_auth_.html#userrecord
70+
path: /docs/reference/functions/providers_auth.html#userrecord
7171

7272
- title: 'functions.firestore'
73-
path: /docs/reference/functions/v1_providers_firestore_.html
73+
path: /docs/reference/functions/providers_firestore.html
7474
section:
7575
- title: 'DocumentBuilder'
76-
path: /docs/reference/functions/v1_providers_firestore_.documentbuilder.html
76+
path: /docs/reference/functions/providers_firestore.documentbuilder.html
7777
- title: 'DocumentSnapshot'
78-
path: /docs/reference/functions/v1_providers_firestore_.html#documentsnapshot
78+
path: /docs/reference/functions/providers_firestore.html#documentsnapshot
7979

8080
- title: 'functions.database'
81-
path: /docs/reference/functions/v1_providers_database_.html
81+
path: /docs/reference/functions/providers_database.html
8282
section:
8383
- title: 'DataSnapshot'
84-
path: /docs/reference/functions/v1_providers_database_.datasnapshot.html
84+
path: /docs/reference/functions/providers_database.datasnapshot.html
8585
- title: 'RefBuilder'
86-
path: /docs/reference/functions/v1_providers_database_.refbuilder.html
86+
path: /docs/reference/functions/providers_database.refbuilder.html
8787
- title: 'InstanceBuilder'
88-
path: /docs/reference/functions/v1_providers_database_.instancebuilder.html
88+
path: /docs/reference/functions/providers_database.instancebuilder.html
8989

9090
- title: 'functions.https'
91-
path: /docs/reference/functions/v1_providers_https_.html
91+
path: /docs/reference/functions/providers_https.html
9292
section:
9393
- title: 'HttpsError'
94-
path: /docs/reference/functions/v1_providers_https_.httpserror.html
94+
path: /docs/reference/functions/common_providers_https.httpserror.html
95+
- title: 'CallableRequest'
96+
path: /docs/reference/functions/common_providers_https.callablerequest.html
9597
- title: 'CallableContext'
96-
path: /docs/reference/functions/v1_providers_https_.callablecontext.html
98+
path: /docs/reference/functions/common_providers_https.callablecontext.html
99+
- title: 'AuthData'
100+
path: /docs/reference/functions/common_providers_https.authdata.html
101+
- title: 'AppCheckData'
102+
path: /docs/reference/functions/common_providers_https.appcheckdata.html
97103

98104
- title: 'functions.logger'
99-
path: /docs/reference/functions/logger_index_.html
105+
path: /docs/reference/functions/logger.html
100106
section:
101107
- title: 'LogEntry'
102-
path: /docs/reference/functions/logger_index_.logentry.html
108+
path: /docs/reference/functions/logger.logentry.html
103109

104110
- title: 'functions.pubsub'
105-
path: /docs/reference/functions/v1_providers_pubsub_.html
111+
path: /docs/reference/functions/providers_pubsub.html
106112
section:
107113
- title: 'Message'
108-
path: /docs/reference/functions/v1_providers_pubsub_.message.html
114+
path: /docs/reference/functions/providers_pubsub.message.html
109115
- title: 'TopicBuilder'
110-
path: /docs/reference/functions/v1_providers_pubsub_.topicbuilder.html
116+
path: /docs/reference/functions/providers_pubsub.topicbuilder.html
111117
- title: 'ScheduleBuilder'
112-
path: /docs/reference/functions/v1_providers_pubsub_.schedulebuilder.html
118+
path: /docs/reference/functions/providers_pubsub.schedulebuilder.html
113119

114120
- title: 'functions.remoteconfig'
115-
path: /docs/reference/functions/v1_providers_remoteconfig_.html
121+
path: /docs/reference/functions/providers_remoteconfig.html
116122
section:
117123
- title: 'RemoteConfigUser'
118-
path: /docs/reference/functions/v1_providers_remoteconfig_.remoteconfiguser.html
124+
path: /docs/reference/functions/providers_remoteconfig.remoteconfiguser.html
119125
- title: 'TemplateVersion'
120-
path: /docs/reference/functions/v1_providers_remoteconfig_.templateversion.html
126+
path: /docs/reference/functions/providers_remoteconfig.templateversion.html
121127

122128
- title: 'functions.storage'
123-
path: /docs/reference/functions/v1_providers_storage_.html
129+
path: /docs/reference/functions/providers_storage.html
124130
section:
125131
- title: 'BucketBuilder'
126-
path: /docs/reference/functions/v1_providers_storage_.bucketbuilder.html
132+
path: /docs/reference/functions/providers_storage.bucketbuilder.html
127133
- title: 'ObjectBuilder'
128-
path: /docs/reference/functions/v1_providers_storage_.objectbuilder.html
134+
path: /docs/reference/functions/providers_storage.objectbuilder.html
129135
- title: 'ObjectMetadata'
130-
path: /docs/reference/functions/v1_providers_storage_.objectmetadata.html
136+
path: /docs/reference/functions/providers_storage.objectmetadata.html
131137

132138
- title: 'functions.testLab'
133-
path: /docs/reference/functions/v1_providers_testlab_.html
139+
path: /docs/reference/functions/providers_testlab.html
134140
section:
135141
- title: 'testLab.clientInfo'
136-
path: /docs/reference/functions/v1_providers_testlab_.clientinfo.html
142+
path: /docs/reference/functions/providers_testlab.clientinfo.html
137143
- title: 'testLab.resultStorage'
138-
path: /docs/reference/functions/v1_providers_testlab_.resultstorage.html
144+
path: /docs/reference/functions/providers_testlab.resultstorage.html
139145
- title: 'testLab.testMatrix'
140-
path: /docs/reference/functions/v1_providers_testlab_.testmatrix.html
146+
path: /docs/reference/functions/providers_testlab.testmatrix.html
141147
- title: 'testLab.testMatrixBuilder'
142-
path: /docs/reference/functions/v1_providers_testlab_.testmatrixbuilder.html
148+
path: /docs/reference/functions/providers_testlab.testmatrixbuilder.html
143149

144150
- title: 'functions.handler'
145-
path: /docs/reference/functions/v1_handler_builder_.html
151+
path: /docs/reference/functions/handler_builder.html
146152
section:
147153
- title: 'HandlerBuilder'
148-
path: /docs/reference/functions/v1_handler_builder_.handlerbuilder.html
154+
path: /docs/reference/functions/handler_builder.handlerbuilder.html

docgen/generate-docs.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,17 @@ const { api: apiVersion } = yargs
3333
.version(false)
3434
.help().argv;
3535

36-
let sourceFile, devsitePath;
36+
let sourceFile, devsitePath, exclude;
3737
switch (apiVersion) {
3838
case 'v1':
39-
sourceFile = `${repoPath}/src/{v1,logger}`;
39+
sourceFile = `${repoPath}/src`;
4040
devsitePath = '/docs/reference/functions/';
41+
exclude = ['"**/v2/**/*.ts"', '"src/index.ts"'];
4142
break;
4243
case 'v2':
4344
sourceFile = `${repoPath}/src/{v2,logger}`;
4445
devsitePath = '/docs/functions/alpha/';
46+
exclude = [];
4547
break;
4648
default:
4749
throw new Error(
@@ -75,6 +77,7 @@ function stripPath(path) {
7577
function runTypedoc() {
7678
const command = `${repoPath}/node_modules/.bin/typedoc ${sourceFile} \
7779
--out ${docPath} \
80+
${exclude.map(ex => "--exclude " + ex).join(" ")} \
7881
--readme ${tempHomePath} \
7982
--options ${__dirname}/typedoc.js \
8083
--theme ${__dirname}/theme`;

docgen/theme/layouts/default.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
<meta http-equiv="X-UA-Compatible" content="IE=edge">
66
<meta name="hide_page_heading" value="true" />
77
<meta name="project_path" value="/_project.yaml" />
8-
<meta name="book_path" value="/docs/_book.yaml" />
9-
<meta name="gtm_var" data-key="docType" data-value="how-to">
8+
<meta name="book_path" value="/docs/reference/_book.yaml" />
9+
<meta name="gtm_var" data-key="docType" data-value="reference">
1010
<meta name="page_type" value="reference" />
1111
<meta name="translation" value="disabled" />
1212
<title>{{#ifCond model.name '==' project.name}}{{project.name}}{{else}}{{model.name}} | {{project.name}}{{/ifCond}}</title>

integration_test/package.json.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"dependencies": {
88
"@google-cloud/pubsub": "^2.10.0",
9-
"firebase-admin": "^9.1.0",
9+
"firebase-admin": "__FIREBASE_ADMIN__",
1010
"firebase-functions": "__SDK_TARBALL__",
1111
"lodash": "~4.17.2"
1212
},

integration_test/run_tests.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ function create_package_json {
6868
# backup file called package.json-e that we should clean up afterwards.
6969
sed -i -e "s/__SDK_TARBALL__/firebase-functions-$1.tgz/g" functions/package.json
7070
sed -i -e "s/__NODE_VERSION__/$2/g" functions/package.json
71+
sed -i -e "s/__FIREBASE_ADMIN__/$3/g" functions/package.json
7172
rm -f functions/package.json-e
7273
}
7374

@@ -138,8 +139,13 @@ build_sdk
138139
delete_all_functions
139140
set_region
140141

141-
for version in 10 12 14; do
142-
create_package_json $TIMESTAMP $version
142+
for version in 10 12 14 16; do
143+
if [[ "$version" -eq 10 ]]; then
144+
admin_sdk="^9.12.0"
145+
else
146+
admin_sdk="^10.0.0"
147+
fi
148+
create_package_json $TIMESTAMP $version $admin_sdk
143149
install_deps
144150
announce "Re-deploying the same functions to Node $version runtime ..."
145151
deploy

0 commit comments

Comments
 (0)