File tree Expand file tree Collapse file tree 5 files changed +63
-10
lines changed Expand file tree Collapse file tree 5 files changed +63
-10
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * @license
3+ * Copyright 2024 Google LLC
4+ *
5+ * Licensed under the Apache License, Version 2.0 (the "License");
6+ * you may not use this file except in compliance with the License.
7+ * You may obtain a copy of the License at
8+ *
9+ * http://www.apache.org/licenses/LICENSE-2.0
10+ *
11+ * Unless required by applicable law or agreed to in writing, software
12+ * distributed under the License is distributed on an "AS IS" BASIS,
13+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ * See the License for the specific language governing permissions and
15+ * limitations under the License.
16+ */
17+ import { PipelineSource , Pipeline } from "../../dist/lite/pipelines" ;
18+
19+ // Augument the Firestore class with the pipeline() method.
20+ // This is stripped from dist/lite/pipelines.d.ts during the build
21+ // so it needs to be re-added here.
22+ declare module '@firebase/firestore' {
23+ interface Firestore {
24+ pipeline ( ) : PipelineSource < Pipeline > ;
25+ }
26+ }
27+
28+ export * from "../../dist/lite/pipelines" ;
Original file line number Diff line number Diff line change 9898 "default" : " ./dist/lite/pipelines.browser.esm2017.js"
9999 },
100100 "./pipelines" : {
101- "types" : " ./dist /pipelines.d.ts" ,
101+ "types" : " ./pipelines /pipelines.d.ts" ,
102102 "node" : {
103103 "require" : " ./dist/pipelines.node.cjs.js" ,
104104 "import" : " ./dist/pipelines.node.mjs"
Original file line number Diff line number Diff line change 66 "module" : " ../dist/pipelines.browser.esm2017.js" ,
77 "browser" : " ../dist/pipelines.browser.esm2017.js" ,
88 "react-native" : " ../dist/pipelines.rn.esm2017.js" ,
9- "typings" : " ../dist /pipelines.d.ts" ,
9+ "typings" : " ./pipelines.d.ts" ,
1010 "private" : true ,
1111 "engines" : {
1212 "node" : " >=18.0.0"
Original file line number Diff line number Diff line change 1+ /**
2+ * @license
3+ * Copyright 2024 Google LLC
4+ *
5+ * Licensed under the Apache License, Version 2.0 (the "License");
6+ * you may not use this file except in compliance with the License.
7+ * You may obtain a copy of the License at
8+ *
9+ * http://www.apache.org/licenses/LICENSE-2.0
10+ *
11+ * Unless required by applicable law or agreed to in writing, software
12+ * distributed under the License is distributed on an "AS IS" BASIS,
13+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ * See the License for the specific language governing permissions and
15+ * limitations under the License.
16+ */
17+ import { PipelineSource , Pipeline } from "../dist/pipelines" ;
18+
19+ // Augument the Firestore and Query classes with the pipeline() method.
20+ // This is stripped from dist/lite/pipelines.d.ts during the build
21+ // so it needs to be re-added here.
22+ declare module '@firebase/firestore' {
23+ interface Firestore {
24+ pipeline ( ) : PipelineSource < Pipeline > ;
25+ }
26+ interface Query {
27+ pipeline ( ) : Pipeline ;
28+ }
29+ }
30+
31+ export * from "../dist/pipelines" ;
Original file line number Diff line number Diff line change @@ -27,12 +27,6 @@ import { Firestore } from './database';
2727import { Query } from './reference' ;
2828import { ExpUserDataWriter } from './user_data_writer' ;
2929
30- declare module './database' {
31- interface Firestore {
32- pipeline ( ) : PipelineSource < Pipeline > ;
33- }
34- }
35-
3630/**
3731 * Experimental Modular API for console testing.
3832 * @param firestore
@@ -79,12 +73,12 @@ export function execute(pipeline: LitePipeline): Promise<PipelineResult[]> {
7973 return pipeline . execute ( ) ;
8074}
8175
82- // Augument the Firestore class with the pipeline() factory method
76+ // Augment the Firestore class with the pipeline() factory method
8377Firestore . prototype . pipeline = function ( ) : PipelineSource < Pipeline > {
8478 return pipeline ( this ) ;
8579} ;
8680
87- // Augument the Query class with the pipeline() factory method
81+ // Augment the Query class with the pipeline() factory method
8882Query . prototype . pipeline = function ( ) : Pipeline {
8983 return pipeline ( this ) ;
9084} ;
You can’t perform that action at this time.
0 commit comments