@firebase/firestore-compat 0.1.3-2021822203916 → 0.1.3
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/CHANGELOG.md +7 -6
- package/dist/index.esm2017.js +1 -1
- package/dist/index.esm5.js +1 -1
- package/dist/index.node.cjs.js +1 -1
- package/dist/index.rn.js +1 -1
- package/package.json +9 -6
- package/.eslintrc.js +0 -76
- package/karma.conf.js +0 -83
- package/rollup.config.js +0 -99
- package/src/api/blob.ts +0 -71
- package/src/api/database.ts +0 -1304
- package/src/api/field_path.ts +0 -64
- package/src/api/field_value.ts +0 -65
- package/src/api/geo_point.ts +0 -18
- package/src/api/observer.ts +0 -54
- package/src/api/timestamp.ts +0 -18
- package/src/config.ts +0 -90
- package/src/index.console.ts +0 -111
- package/src/index.node.ts +0 -40
- package/src/index.rn.ts +0 -39
- package/src/index.ts +0 -69
- package/src/register-module.ts +0 -44
- package/src/util/input_validation.ts +0 -40
- package/tools/console.build.js +0 -81
- package/tsconfig.json +0 -9
package/tools/console.build.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2021 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
|
-
* Firebase console uses firestore in its special way.
|
|
20
|
-
* This file creates a build target for it.
|
|
21
|
-
*/
|
|
22
|
-
const rollup = require('rollup');
|
|
23
|
-
const { uglify } = require('rollup-plugin-uglify');
|
|
24
|
-
const { nodeResolve } = require('@rollup/plugin-node-resolve');
|
|
25
|
-
const typescriptPlugin = require('rollup-plugin-typescript2');
|
|
26
|
-
const typescript = require('typescript');
|
|
27
|
-
const json = require('@rollup/plugin-json');
|
|
28
|
-
const fs = require('fs');
|
|
29
|
-
const util = require('util');
|
|
30
|
-
const fs_writeFile = util.promisify(fs.writeFile);
|
|
31
|
-
const rollupUtil = require('../../firestore/rollup.shared');
|
|
32
|
-
|
|
33
|
-
const EXPORTNAME = '__firestore_exports__';
|
|
34
|
-
const OUTPUT_FOLDER = 'dist';
|
|
35
|
-
const OUTPUT_FILE = 'standalone.js';
|
|
36
|
-
|
|
37
|
-
const es5InputOptions = {
|
|
38
|
-
input: 'src/index.console.ts',
|
|
39
|
-
plugins: [
|
|
40
|
-
nodeResolve(),
|
|
41
|
-
typescriptPlugin({
|
|
42
|
-
typescript,
|
|
43
|
-
transformers: [rollupUtil.removeAssertTransformer]
|
|
44
|
-
}),
|
|
45
|
-
json({ preferConst: true }),
|
|
46
|
-
uglify({
|
|
47
|
-
output: {
|
|
48
|
-
ascii_only: true // escape unicode chars
|
|
49
|
-
}
|
|
50
|
-
})
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const es5OutputOptions = {
|
|
55
|
-
file: `${OUTPUT_FOLDER}/${OUTPUT_FILE}`,
|
|
56
|
-
name: EXPORTNAME,
|
|
57
|
-
format: 'iife'
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
const PREFIX = `
|
|
61
|
-
goog.module('firestore');
|
|
62
|
-
exports = eval(`;
|
|
63
|
-
|
|
64
|
-
const POSTFIX = ` + '${EXPORTNAME};');`;
|
|
65
|
-
|
|
66
|
-
async function build() {
|
|
67
|
-
const es5Bundle = await rollup.rollup(es5InputOptions);
|
|
68
|
-
const {
|
|
69
|
-
output: [{ code }]
|
|
70
|
-
} = await es5Bundle.generate(es5OutputOptions);
|
|
71
|
-
|
|
72
|
-
const output = `${PREFIX}${JSON.stringify(String(code))}${POSTFIX}`;
|
|
73
|
-
|
|
74
|
-
if (!fs.existsSync(OUTPUT_FOLDER)) {
|
|
75
|
-
fs.mkdirSync(OUTPUT_FOLDER);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
await fs_writeFile(es5OutputOptions.file, output, 'utf-8');
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
build();
|