firebase-tools 13.7.5 → 13.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api.js +9 -1
- package/lib/apiv2.js +19 -13
- package/lib/apphosting/app.js +4 -3
- package/lib/apphosting/githubConnections.js +1 -1
- package/lib/apphosting/index.js +42 -18
- package/lib/checkValidTargetFilters.js +8 -1
- package/lib/commands/apphosting-backends-create.js +3 -3
- package/lib/commands/apphosting-backends-delete.js +24 -17
- package/lib/commands/apphosting-backends-list.js +3 -3
- package/lib/commands/apphosting-secrets-grantaccess.js +9 -5
- package/lib/commands/dataconnect-list.js +64 -0
- package/lib/commands/dataconnect-sdk-generate.js +36 -0
- package/lib/commands/dataconnect-sql-diff.js +25 -0
- package/lib/commands/dataconnect-sql-migrate.js +41 -0
- package/lib/commands/deploy.js +27 -1
- package/lib/commands/index.js +10 -0
- package/lib/commands/init.js +7 -0
- package/lib/commands/setup-emulators-dataconnect.js +12 -0
- package/lib/config.js +1 -0
- package/lib/dataconnect/build.js +23 -0
- package/lib/dataconnect/checkIam.js +30 -0
- package/lib/dataconnect/client.js +115 -0
- package/lib/dataconnect/dataplaneClient.js +16 -0
- package/lib/dataconnect/ensureApis.js +12 -0
- package/lib/dataconnect/fileUtils.js +89 -0
- package/lib/dataconnect/filters.js +45 -0
- package/lib/dataconnect/freeTrial.js +23 -0
- package/lib/dataconnect/graphqlError.js +13 -0
- package/lib/dataconnect/load.js +40 -0
- package/lib/dataconnect/names.js +48 -0
- package/lib/dataconnect/prompts.js +20 -0
- package/lib/dataconnect/provisionCloudSql.js +91 -0
- package/lib/dataconnect/schemaMigration.js +137 -0
- package/lib/dataconnect/types.js +23 -0
- package/lib/deploy/dataconnect/deploy.js +84 -0
- package/lib/deploy/dataconnect/index.js +9 -0
- package/lib/deploy/dataconnect/prepare.js +30 -0
- package/lib/deploy/dataconnect/release.js +67 -0
- package/lib/deploy/functions/checkIam.js +4 -34
- package/lib/deploy/index.js +2 -0
- package/lib/downloadUtils.js +2 -2
- package/lib/emulator/constants.js +3 -0
- package/lib/emulator/controller.js +38 -12
- package/lib/emulator/dataconnectEmulator.js +86 -0
- package/lib/emulator/download.js +1 -1
- package/lib/emulator/downloadableEmulators.js +42 -3
- package/lib/emulator/portUtils.js +3 -2
- package/lib/emulator/registry.js +5 -0
- package/lib/emulator/types.js +3 -0
- package/lib/experiments.js +5 -0
- package/lib/extensions/emulator/specHelper.js +5 -39
- package/lib/gcp/apphosting.js +6 -1
- package/lib/gcp/cloudsql/cloudsqladmin.js +155 -0
- package/lib/gcp/cloudsql/connect.js +127 -0
- package/lib/gcp/cloudsql/fbToolsAuthClient.js +42 -0
- package/lib/gcp/cloudsql/types.js +2 -0
- package/lib/gcp/iam.js +33 -1
- package/lib/gcp/secretManager.js +1 -1
- package/lib/init/features/dataconnect/index.js +124 -0
- package/lib/init/features/emulators.js +13 -0
- package/lib/init/features/functions/index.js +15 -3
- package/lib/init/features/index.js +3 -1
- package/lib/init/index.js +1 -0
- package/lib/logger.js +22 -2
- package/lib/operation-poller.js +7 -1
- package/lib/rc.js +10 -1
- package/lib/requireAuth.js +1 -0
- package/lib/utils.js +51 -4
- package/package.json +6 -2
- package/schema/connector-yaml.json +54 -0
- package/schema/dataconnect-yaml.json +72 -0
- package/schema/firebase-config.json +103 -0
- package/templates/extensions/javascript/package.lint.json +2 -2
- package/templates/extensions/javascript/package.nolint.json +2 -2
- package/templates/extensions/typescript/package.lint.json +2 -2
- package/templates/extensions/typescript/package.nolint.json +2 -2
- package/templates/init/dataconnect/connector.yaml +2 -0
- package/templates/init/dataconnect/dataconnect.yaml +10 -0
- package/templates/init/dataconnect/mutations.gql +5 -0
- package/templates/init/dataconnect/queries.gql +7 -0
- package/templates/init/dataconnect/schema.gql +16 -0
- package/templates/init/functions/javascript/_gitignore +2 -1
- package/templates/init/functions/javascript/package.lint.json +2 -2
- package/templates/init/functions/javascript/package.nolint.json +2 -2
- package/templates/init/functions/python/_gitignore +1 -0
- package/templates/init/functions/typescript/_gitignore +1 -0
- package/templates/init/functions/typescript/package.lint.json +2 -2
- package/templates/init/functions/typescript/package.nolint.json +2 -2
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"additionalProperties": false,
|
|
4
|
+
"definitions": {
|
|
5
|
+
"generatable": {
|
|
6
|
+
"additionalProperties": true,
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"outputDir": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "Path to the directory where generated files should be written to."
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"properties": {
|
|
17
|
+
"connectorId": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "The ID of the Firebase Data Connect connector."
|
|
20
|
+
},
|
|
21
|
+
"authMode": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"description": "The authentication strategy to use for this connector"
|
|
24
|
+
|
|
25
|
+
},
|
|
26
|
+
"generate": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"properties": {
|
|
30
|
+
"javascriptSdk": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"items": {
|
|
33
|
+
"$ref": "#/definitions/generatable"
|
|
34
|
+
},
|
|
35
|
+
"description": "Configuration for a generated Javascript SDK"
|
|
36
|
+
},
|
|
37
|
+
"kotlinSdk": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"items": {
|
|
40
|
+
"$ref": "#/definitions/generatable"
|
|
41
|
+
},
|
|
42
|
+
"description": "Configuration for a generated Kotlin SDK"
|
|
43
|
+
},
|
|
44
|
+
"swiftSdk": {
|
|
45
|
+
"type": "array",
|
|
46
|
+
"items": {
|
|
47
|
+
"$ref": "#/definitions/generatable"
|
|
48
|
+
},
|
|
49
|
+
"description": "Configuration for a generated Swift SDK"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"additionalProperties": false,
|
|
4
|
+
"definitions": {
|
|
5
|
+
"postgresql": {
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"database": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "The name of the PostgreSQL database."
|
|
12
|
+
},
|
|
13
|
+
"cloudSql": {
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"instanceId": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "The ID of the CloudSQL instance for this database"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"dataSource": {
|
|
26
|
+
"oneOf": [
|
|
27
|
+
{
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"type": "object",
|
|
30
|
+
"properties": {
|
|
31
|
+
"postgresql": {
|
|
32
|
+
"$ref": "#/definitions/postgresql"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"schema": {
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"type": "object",
|
|
41
|
+
"properties": {
|
|
42
|
+
"source": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "Relative path to directory containing GQL files defining the schema. If omitted, defaults to ./schema."
|
|
45
|
+
},
|
|
46
|
+
"datasource": {
|
|
47
|
+
"$ref": "#/definitions/dataSource"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"properties": {
|
|
53
|
+
"specVersion": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "The Firebase Data Connect API version to target. If omitted, defaults to the latest version"
|
|
56
|
+
},
|
|
57
|
+
"serviceId": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"description": "The ID of the Firebase Data Connect service."
|
|
60
|
+
},
|
|
61
|
+
"connectorDirs": {
|
|
62
|
+
"type": "array",
|
|
63
|
+
"items": {
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"description": "A list of directories containing conector.yaml files describing a connector to deploy."
|
|
67
|
+
},
|
|
68
|
+
"schema": {
|
|
69
|
+
"$ref": "#/definitions/schema"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -271,6 +271,97 @@
|
|
|
271
271
|
}
|
|
272
272
|
]
|
|
273
273
|
},
|
|
274
|
+
"dataconnect": {
|
|
275
|
+
"anyOf": [
|
|
276
|
+
{
|
|
277
|
+
"additionalProperties": false,
|
|
278
|
+
"properties": {
|
|
279
|
+
"location": {
|
|
280
|
+
"type": "string"
|
|
281
|
+
},
|
|
282
|
+
"postdeploy": {
|
|
283
|
+
"anyOf": [
|
|
284
|
+
{
|
|
285
|
+
"items": {
|
|
286
|
+
"type": "string"
|
|
287
|
+
},
|
|
288
|
+
"type": "array"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"type": "string"
|
|
292
|
+
}
|
|
293
|
+
]
|
|
294
|
+
},
|
|
295
|
+
"predeploy": {
|
|
296
|
+
"anyOf": [
|
|
297
|
+
{
|
|
298
|
+
"items": {
|
|
299
|
+
"type": "string"
|
|
300
|
+
},
|
|
301
|
+
"type": "array"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"type": "string"
|
|
305
|
+
}
|
|
306
|
+
]
|
|
307
|
+
},
|
|
308
|
+
"source": {
|
|
309
|
+
"type": "string"
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
"required": [
|
|
313
|
+
"location",
|
|
314
|
+
"source"
|
|
315
|
+
],
|
|
316
|
+
"type": "object"
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
"items": {
|
|
320
|
+
"additionalProperties": false,
|
|
321
|
+
"properties": {
|
|
322
|
+
"location": {
|
|
323
|
+
"type": "string"
|
|
324
|
+
},
|
|
325
|
+
"postdeploy": {
|
|
326
|
+
"anyOf": [
|
|
327
|
+
{
|
|
328
|
+
"items": {
|
|
329
|
+
"type": "string"
|
|
330
|
+
},
|
|
331
|
+
"type": "array"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"type": "string"
|
|
335
|
+
}
|
|
336
|
+
]
|
|
337
|
+
},
|
|
338
|
+
"predeploy": {
|
|
339
|
+
"anyOf": [
|
|
340
|
+
{
|
|
341
|
+
"items": {
|
|
342
|
+
"type": "string"
|
|
343
|
+
},
|
|
344
|
+
"type": "array"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"type": "string"
|
|
348
|
+
}
|
|
349
|
+
]
|
|
350
|
+
},
|
|
351
|
+
"source": {
|
|
352
|
+
"type": "string"
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
"required": [
|
|
356
|
+
"location",
|
|
357
|
+
"source"
|
|
358
|
+
],
|
|
359
|
+
"type": "object"
|
|
360
|
+
},
|
|
361
|
+
"type": "array"
|
|
362
|
+
}
|
|
363
|
+
]
|
|
364
|
+
},
|
|
274
365
|
"emulators": {
|
|
275
366
|
"additionalProperties": false,
|
|
276
367
|
"properties": {
|
|
@@ -298,6 +389,18 @@
|
|
|
298
389
|
},
|
|
299
390
|
"type": "object"
|
|
300
391
|
},
|
|
392
|
+
"dataconnect": {
|
|
393
|
+
"additionalProperties": false,
|
|
394
|
+
"properties": {
|
|
395
|
+
"host": {
|
|
396
|
+
"type": "string"
|
|
397
|
+
},
|
|
398
|
+
"port": {
|
|
399
|
+
"type": "number"
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
"type": "object"
|
|
403
|
+
},
|
|
301
404
|
"eventarc": {
|
|
302
405
|
"additionalProperties": false,
|
|
303
406
|
"properties": {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# # Example schema
|
|
2
|
+
# # TODO: Replace with a really good illustrative example from devrel!
|
|
3
|
+
# type Product @table {
|
|
4
|
+
# name: String!
|
|
5
|
+
# price: Int!
|
|
6
|
+
# }
|
|
7
|
+
|
|
8
|
+
# type Order @table {
|
|
9
|
+
# name: String!
|
|
10
|
+
# }
|
|
11
|
+
|
|
12
|
+
# type OrderItem @table(key: ["order", "product"]) {
|
|
13
|
+
# order: Order!
|
|
14
|
+
# product: Product!
|
|
15
|
+
# quantity: Int!
|
|
16
|
+
# }
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
node_modules/
|
|
1
|
+
node_modules/
|
|
2
|
+
*.local
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*.local
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"main": "lib/index.js",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"firebase-admin": "^
|
|
19
|
-
"firebase-functions": "^
|
|
18
|
+
"firebase-admin": "^12.1.0",
|
|
19
|
+
"firebase-functions": "^5.0.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@typescript-eslint/eslint-plugin": "^5.12.0",
|