Skip to content

Commit 085e6f2

Browse files
committed
[1/4] Add ppl protos and setup dependencies
1 parent beda76e commit 085e6f2

File tree

8 files changed

+73
-4
lines changed

8 files changed

+73
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ dist
44
.awcache
55
.cache
66
/config/project.json
7+
/config/prod.project.json
78
scripts/docgen-compat/html
89

910
# OS Specific Files

packages/firestore/externs.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,15 @@
55
"node_modules/typescript/lib/lib.dom.d.ts",
66
"node_modules/typescript/lib/lib.es2015.promise.d.ts",
77
"node_modules/typescript/lib/lib.es2015.symbol.d.ts",
8+
"node_modules/typescript/lib/lib.es2020.bigint.d.ts",
89
"node_modules/typescript/lib/lib.es2015.iterable.d.ts",
910
"node_modules/typescript/lib/lib.es2015.collection.d.ts",
1011
"node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts",
1112
"node_modules/typescript/lib/lib.es2015.core.d.ts",
1213
"node_modules/typescript/lib/lib.es2017.object.d.ts",
1314
"node_modules/typescript/lib/lib.es2017.string.d.ts",
15+
"node_modules/typescript/lib/lib.es2019.array.d.ts",
16+
"node_modules/re2js/build/index.esm.d.ts",
1417
"packages/app-types/index.d.ts",
1518
"packages/app-types/private.d.ts",
1619
"packages/app/dist/app.d.ts",

packages/firestore/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,9 @@
139139
"@firebase/webchannel-wrapper": "1.0.5",
140140
"@grpc/grpc-js": "~1.9.0",
141141
"@grpc/proto-loader": "^0.7.8",
142-
"tslib": "^2.1.0"
142+
"re2js": "^0.4.2",
143+
"tslib": "^2.1.0",
144+
"undici": "6.19.7"
143145
},
144146
"peerDependencies": {
145147
"@firebase/app": "0.x"
@@ -157,6 +159,7 @@
157159
"rollup": "2.79.2",
158160
"rollup-plugin-copy": "3.5.0",
159161
"rollup-plugin-copy-assets": "2.0.3",
162+
"rollup-plugin-dts": "5.3.1",
160163
"rollup-plugin-replace": "2.2.0",
161164
"rollup-plugin-sourcemaps": "0.6.3",
162165
"@rollup/plugin-terser": "0.4.4",

packages/firestore/src/protos/firestore_proto_api.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,9 @@ export declare namespace firestoreV1ApiClientInterfaces {
356356
parent?: string;
357357
structuredQuery?: StructuredQuery;
358358
}
359+
interface PipelineQueryTarget {
360+
structuredPipeline?: StructuredPipeline;
361+
}
359362
interface ReadOnly {
360363
readTime?: string;
361364
}
@@ -424,6 +427,7 @@ export declare namespace firestoreV1ApiClientInterfaces {
424427
interface Target {
425428
query?: QueryTarget;
426429
documents?: DocumentsTarget;
430+
pipelineQuery?: PipelineQueryTarget;
427431
resumeToken?: string | Uint8Array;
428432
readTime?: Timestamp;
429433
targetId?: number;
@@ -555,6 +559,8 @@ export declare type Pipeline = firestoreV1ApiClientInterfaces.Pipeline;
555559
export declare type Precondition = firestoreV1ApiClientInterfaces.Precondition;
556560
export declare type Projection = firestoreV1ApiClientInterfaces.Projection;
557561
export declare type QueryTarget = firestoreV1ApiClientInterfaces.QueryTarget;
562+
export declare type PipelineQueryTarget =
563+
firestoreV1ApiClientInterfaces.PipelineQueryTarget;
558564
export declare type ReadOnly = firestoreV1ApiClientInterfaces.ReadOnly;
559565
export declare type ReadWrite = firestoreV1ApiClientInterfaces.ReadWrite;
560566
export declare type RollbackRequest =

packages/firestore/src/protos/google/firestore/v1/firestore.proto

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,13 +913,25 @@ message Target {
913913
}
914914
}
915915

916+
// A target specified by a pipeline query.
917+
message PipelineQueryTarget {
918+
// The pipeline to run.
919+
oneof pipeline_type {
920+
// A pipelined operation in structured format.
921+
StructuredPipeline structured_pipeline = 1;
922+
}
923+
}
924+
916925
// The type of target to listen to.
917926
oneof target_type {
918927
// A target specified by a query.
919928
QueryTarget query = 2;
920929

921930
// A target specified by a set of document names.
922931
DocumentsTarget documents = 3;
932+
933+
// A target specified by a pipeline query.
934+
PipelineQueryTarget pipeline_query = 13;
923935
}
924936

925937
// When to start listening.

packages/firestore/src/protos/google/firestore/v1/write.proto

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,12 @@ message WriteResult {
198198
//
199199
// Multiple [DocumentChange][google.firestore.v1.DocumentChange] messages may be returned for the same logical
200200
// change, if multiple targets are affected.
201+
//
202+
// For PipelineQueryTargets, `document` will be in the new pipeline format,
203+
// (-- TODO(b/330735468): Insert link to spec. --)
204+
// For a Listen stream with both QueryTargets and PipelineQueryTargets present,
205+
// if a document matches both types of queries, then a separate DocumentChange
206+
// messages will be sent out one for each set.
201207
message DocumentChange {
202208
// The new state of the [Document][google.firestore.v1.Document].
203209
//

packages/firestore/src/protos/protos.json

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2343,7 +2343,8 @@
23432343
"targetType": {
23442344
"oneof": [
23452345
"query",
2346-
"documents"
2346+
"documents",
2347+
"pipeline_query"
23472348
]
23482349
},
23492350
"resumeType": {
@@ -2362,6 +2363,10 @@
23622363
"type": "DocumentsTarget",
23632364
"id": 3
23642365
},
2366+
"pipelineQuery": {
2367+
"type": "PipelineQueryTarget",
2368+
"id": 13
2369+
},
23652370
"resumeToken": {
23662371
"type": "bytes",
23672372
"id": 4
@@ -2411,6 +2416,21 @@
24112416
"id": 2
24122417
}
24132418
}
2419+
},
2420+
"PipelineQueryTarget": {
2421+
"oneofs": {
2422+
"pipelineType": {
2423+
"oneof": [
2424+
"structuredPipeline"
2425+
]
2426+
}
2427+
},
2428+
"fields": {
2429+
"structuredPipeline": {
2430+
"type": "StructuredPipeline",
2431+
"id": 1
2432+
}
2433+
}
24142434
}
24152435
}
24162436
},
@@ -3266,4 +3286,4 @@
32663286
}
32673287
}
32683288
}
3269-
}
3289+
}

yarn.lock

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,14 @@
10221022
"@babel/helper-string-parser" "^7.25.9"
10231023
"@babel/helper-validator-identifier" "^7.25.9"
10241024

1025+
"@babel/types@^7.26.10":
1026+
version "7.26.10"
1027+
resolved "https://registry.npmjs.org/@babel/types/-/types-7.26.10.tgz#396382f6335bd4feb65741eacfc808218f859259"
1028+
integrity sha512-emqcG3vHrpxUKTrxcblR36dcrcoRDvKmnL/dCL6ZsHaShW80qxCAcNhzQZrpeM765VzEos+xOi4s+r4IXzTwdQ==
1029+
dependencies:
1030+
"@babel/helper-string-parser" "^7.25.9"
1031+
"@babel/helper-validator-identifier" "^7.25.9"
1032+
10251033
"@babel/types@^7.26.8":
10261034
version "7.26.8"
10271035
resolved "https://registry.npmjs.org/@babel/types/-/types-7.26.8.tgz#97dcdc190fab45be7f3dc073e3c11160d677c127"
@@ -13692,6 +13700,11 @@ re2@^1.17.7:
1369213700
nan "^2.20.0"
1369313701
node-gyp "^10.2.0"
1369413702

13703+
re2js@^0.4.2:
13704+
version "0.4.3"
13705+
resolved "https://registry.npmjs.org/re2js/-/re2js-0.4.3.tgz#1318cd0c12aa6ed3ba56d5e012311ffbfb2aef35"
13706+
integrity sha512-EuNmh7jurhHEE8Ge/lBo9JuMLb3qf866Xjjfyovw3wPc7+hlqDkZq4LwhrCQMEI+ARWfrKrHozEndzlpNT0WDg==
13707+
1369513708
react-is@^18.0.0:
1369613709
version "18.3.1"
1369713710
resolved "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz#e83557dc12eae63a99e003a46388b1dcbb44db7e"
@@ -14566,7 +14579,7 @@ semver-greatest-satisfied-range@^1.1.0:
1456614579
resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8"
1456714580
integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==
1456814581

14569-
14582+
[email protected], semver@^7.1.2:
1457014583
version "7.7.1"
1457114584
resolved "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz#abd5098d82b18c6c81f6074ff2647fd3e7220c9f"
1457214585
integrity sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==
@@ -16401,6 +16414,11 @@ undici-types@~6.20.0:
1640116414
resolved "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz#8171bf22c1f588d1554d55bf204bc624af388433"
1640216415
integrity sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==
1640316416

16417+
16418+
version "6.19.7"
16419+
resolved "https://registry.npmjs.org/undici/-/undici-6.19.7.tgz#7d4cf26dc689838aa8b6753a3c5c4288fc1e0216"
16420+
integrity sha512-HR3W/bMGPSr90i8AAp2C4DM3wChFdJPLrWYpIS++LxS8K+W535qftjt+4MyjNYHeWabMj1nvtmLIi7l++iq91A==
16421+
1640416422
unicode-canonical-property-names-ecmascript@^2.0.0:
1640516423
version "2.0.1"
1640616424
resolved "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.1.tgz#cb3173fe47ca743e228216e4a3ddc4c84d628cc2"

0 commit comments

Comments
 (0)