Skip to content

Commit 608c71e

Browse files
committed
add internal build setup to compat
1 parent 9900312 commit 608c71e

File tree

4 files changed

+87
-2
lines changed

4 files changed

+87
-2
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Project: /docs/reference/js/_project.yaml
2+
Book: /docs/reference/_book.yaml
3+
page_type: reference
4+
5+
{% comment %}
6+
DO NOT EDIT THIS FILE!
7+
This is generated by the JS SDK team, and any local changes will be
8+
overwritten. Changes should be made in the source code at
9+
https://github.com/firebase/firebase-js-sdk
10+
{% endcomment %}
11+
12+
# ObjectSchemaRequest interface
13+
Interface for JSON parameters in [SchemaType.OBJECT](./ai.md#schematypeobject_enummember) format when not using the [ObjectSchema](./ai.objectschema.md#objectschema_class) helper.
14+
15+
<b>Signature:</b>
16+
17+
```typescript
18+
export interface ObjectSchemaRequest extends SchemaRequest
19+
```
20+
<b>Extends:</b> [SchemaRequest](./ai.schemarequest.md#schemarequest_interface)
21+
22+
## Properties
23+
24+
| Property | Type | Description |
25+
| --- | --- | --- |
26+
| [optionalProperties](./ai.objectschemarequest.md#objectschemarequestoptionalproperties) | never | This is not a property accepted in the final request to the backend, but is a client-side convenience property that is only usable by constructing a schema through the <code>Schema.object()</code> helper method. Populating this property will cause response errors if the object is not wrapped with <code>Schema.object()</code>. |
27+
| [type](./ai.objectschemarequest.md#objectschemarequesttype) | [SchemaType.OBJECT](./ai.md#schematypeobject_enummember) | |
28+
29+
## ObjectSchemaRequest.optionalProperties
30+
31+
This is not a property accepted in the final request to the backend, but is a client-side convenience property that is only usable by constructing a schema through the `Schema.object()` helper method. Populating this property will cause response errors if the object is not wrapped with `Schema.object()`<!-- -->.
32+
33+
<b>Signature:</b>
34+
35+
```typescript
36+
optionalProperties?: never;
37+
```
38+
39+
## ObjectSchemaRequest.type
40+
41+
<b>Signature:</b>
42+
43+
```typescript
44+
type: SchemaType.OBJECT;
45+
```
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/**
2+
* @license
3+
* Copyright 2022 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+
18+
/**
19+
* Specialized config only for internal deployment to google3 repo, adds required license header to
20+
* generated code.
21+
*/
22+
23+
// When run in google3, original rollup.config.js will have been renamed to rollup-main.config.js.
24+
import * as baseBuilds from './rollup.config.js';
25+
import license from 'rollup-plugin-license';
26+
27+
const firebaseLicense = license({
28+
banner: `@license
29+
Copyright ${new Date().getFullYear()} Google LLC.
30+
SPDX-License-Identifier: Apache-2.0`
31+
});
32+
33+
const buildsWithLicense = baseBuilds.map(build => {
34+
return Object.assign({}, build, {
35+
plugins: build.plugins.concat(firebaseLicense)
36+
});
37+
});
38+
39+
export default buildsWithLicense;

packages/firebase/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,9 @@
403403
},
404404
"scripts": {
405405
"build": "rollup -c && gulp cdn-type-module-path && yarn build:compat",
406-
"build:internal": "rollup -c rollup-internal.config.js && gulp cdn-type-module-path-internal && yarn build:compat",
406+
"build:internal": "rollup -c rollup-internal.config.js && gulp cdn-type-module-path-internal && yarn build:compat:internal",
407407
"build:compat": "rollup -c compat/rollup.config.js",
408+
"build:compat:internal": "rollup -c compat/rollup-internal.config.js",
408409
"dev": "rollup -c -w",
409410
"test": "echo 'No test suite for firebase wrapper'",
410411
"test:ci": "echo 'No test suite for firebase wrapper'",

packages/firebase/rollup-internal.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ const customBuilds = [
9393

9494
console.log(customBuilds.length);
9595

96-
export default [/*...buildsWithLicense,*/ ...customBuilds];
96+
export default [...buildsWithLicense, ...customBuilds];

0 commit comments

Comments
 (0)