firebase-tools 15.17.0 → 15.18.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/apphosting/localbuilds.js +116 -5
- package/lib/apphosting/universalMakerDownload.js +72 -0
- package/lib/apphosting/universalMakerInfo.json +16 -0
- package/lib/archiveDirectory.js +1 -1
- package/lib/deploy/apphosting/release.js +26 -12
- package/lib/deploy/apphosting/util.js +4 -19
- package/lib/deploy/functions/backend.js +2 -1
- package/lib/deploy/functions/prepare.js +45 -50
- package/lib/deploy/functions/prepareFunctionsUpload.js +1 -1
- package/lib/deploy/functions/services/ailogic.js +10 -0
- package/lib/deploy/functions/validate.js +1 -1
- package/lib/downloadUtils.js +24 -0
- package/lib/emulator/download.js +2 -24
- package/lib/emulator/downloadableEmulatorInfo.json +31 -31
- package/lib/fsAsync.js +53 -10
- package/lib/tsconfig.compile.tsbuildinfo +1 -1
- package/lib/tsconfig.publish.tsbuildinfo +1 -1
- package/package.json +3 -3
|
@@ -44,46 +44,46 @@
|
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
46
|
"pubsub": {
|
|
47
|
-
"version": "0.8.
|
|
48
|
-
"expectedSize":
|
|
49
|
-
"expectedChecksum": "
|
|
50
|
-
"expectedChecksumSHA256": "
|
|
51
|
-
"remoteUrl": "https://storage.googleapis.com/firebase-preview-drop/emulator/pubsub-emulator-0.8.
|
|
52
|
-
"downloadPathRelativeToCacheDir": "pubsub-emulator-0.8.
|
|
53
|
-
"binaryPathRelativeToCacheDir": "pubsub-emulator-0.8.
|
|
47
|
+
"version": "0.8.31",
|
|
48
|
+
"expectedSize": 52942385,
|
|
49
|
+
"expectedChecksum": "04a85aa9873222e9b7a430c6c49cfd9e",
|
|
50
|
+
"expectedChecksumSHA256": "b474e7d3200f5a8b5f7f467ee3b087c94b939e7d41527e935296a7bcabdbea9a",
|
|
51
|
+
"remoteUrl": "https://storage.googleapis.com/firebase-preview-drop/emulator/pubsub-emulator-0.8.31.zip",
|
|
52
|
+
"downloadPathRelativeToCacheDir": "pubsub-emulator-0.8.31.zip",
|
|
53
|
+
"binaryPathRelativeToCacheDir": "pubsub-emulator-0.8.31/pubsub-emulator/bin/cloud-pubsub-emulator"
|
|
54
54
|
},
|
|
55
55
|
"dataconnect": {
|
|
56
56
|
"darwin": {
|
|
57
|
-
"version": "3.4.
|
|
58
|
-
"expectedSize":
|
|
59
|
-
"expectedChecksum": "
|
|
60
|
-
"expectedChecksumSHA256": "
|
|
61
|
-
"remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-macos-amd64-v3.4.
|
|
62
|
-
"downloadPathRelativeToCacheDir": "dataconnect-emulator-3.4.
|
|
57
|
+
"version": "3.4.8",
|
|
58
|
+
"expectedSize": 32398304,
|
|
59
|
+
"expectedChecksum": "fee47f6867b5aa939ab667fb801b9807",
|
|
60
|
+
"expectedChecksumSHA256": "0586ffa3614f9231932ee50fb424ee4385100188aac40de91289c705d36ceb67",
|
|
61
|
+
"remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-macos-amd64-v3.4.8",
|
|
62
|
+
"downloadPathRelativeToCacheDir": "dataconnect-emulator-3.4.8"
|
|
63
63
|
},
|
|
64
64
|
"darwin_arm64": {
|
|
65
|
-
"version": "3.4.
|
|
66
|
-
"expectedSize":
|
|
67
|
-
"expectedChecksum": "
|
|
68
|
-
"expectedChecksumSHA256": "
|
|
69
|
-
"remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-macos-arm64-v3.4.
|
|
70
|
-
"downloadPathRelativeToCacheDir": "dataconnect-emulator-3.4.
|
|
65
|
+
"version": "3.4.8",
|
|
66
|
+
"expectedSize": 30537682,
|
|
67
|
+
"expectedChecksum": "f4ccfe080736fb0a35d60841cf439eab",
|
|
68
|
+
"expectedChecksumSHA256": "d3efdafa7c82f843b1cca7ae2b2404235fa9c918b892806ce4a9910e6907318f",
|
|
69
|
+
"remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-macos-arm64-v3.4.8",
|
|
70
|
+
"downloadPathRelativeToCacheDir": "dataconnect-emulator-3.4.8"
|
|
71
71
|
},
|
|
72
72
|
"win32": {
|
|
73
|
-
"version": "3.4.
|
|
74
|
-
"expectedSize":
|
|
75
|
-
"expectedChecksum": "
|
|
76
|
-
"expectedChecksumSHA256": "
|
|
77
|
-
"remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-windows-amd64-v3.4.
|
|
78
|
-
"downloadPathRelativeToCacheDir": "dataconnect-emulator-3.4.
|
|
73
|
+
"version": "3.4.8",
|
|
74
|
+
"expectedSize": 32438272,
|
|
75
|
+
"expectedChecksum": "5850b1887b23c351d83b32142bac6858",
|
|
76
|
+
"expectedChecksumSHA256": "d9c2ed151a5d0a9c0530f442f92b3434fe98469e5e6fee230628ba81e9a1540d",
|
|
77
|
+
"remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-windows-amd64-v3.4.8",
|
|
78
|
+
"downloadPathRelativeToCacheDir": "dataconnect-emulator-3.4.8.exe"
|
|
79
79
|
},
|
|
80
80
|
"linux": {
|
|
81
|
-
"version": "3.4.
|
|
82
|
-
"expectedSize":
|
|
83
|
-
"expectedChecksum": "
|
|
84
|
-
"expectedChecksumSHA256": "
|
|
85
|
-
"remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-linux-amd64-v3.4.
|
|
86
|
-
"downloadPathRelativeToCacheDir": "dataconnect-emulator-3.4.
|
|
81
|
+
"version": "3.4.8",
|
|
82
|
+
"expectedSize": 31555768,
|
|
83
|
+
"expectedChecksum": "c6b43a325a0e3559d7bc325591dda14f",
|
|
84
|
+
"expectedChecksumSHA256": "f1809b93e985e497da8ed0a23c049b28f9ff4482b021c9f86af6b8c1a6949fef",
|
|
85
|
+
"remoteUrl": "https://storage.googleapis.com/firemat-preview-drop/emulator/dataconnect-emulator-linux-amd64-v3.4.8",
|
|
86
|
+
"downloadPathRelativeToCacheDir": "dataconnect-emulator-3.4.8"
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}
|
package/lib/fsAsync.js
CHANGED
|
@@ -6,12 +6,37 @@ const ignore_1 = require("ignore");
|
|
|
6
6
|
const _ = require("lodash");
|
|
7
7
|
const minimatch = require("minimatch");
|
|
8
8
|
const path_1 = require("path");
|
|
9
|
+
const logger_1 = require("./logger");
|
|
9
10
|
async function readdirRecursiveHelper(options) {
|
|
10
11
|
const dirContents = (0, fs_extra_1.readdirSync)(options.path, { withFileTypes: true });
|
|
12
|
+
let currentGitIgnoreStack = options.gitIgnoreStack || [];
|
|
13
|
+
if (options.supportGitIgnore) {
|
|
14
|
+
if (dirContents.find((n) => n.name === ".gitignore")?.isFile()) {
|
|
15
|
+
const localGitIgnore = (0, path_1.join)(options.path, ".gitignore");
|
|
16
|
+
try {
|
|
17
|
+
const lines = (0, fs_extra_1.readFileSync)(localGitIgnore)
|
|
18
|
+
.toString()
|
|
19
|
+
.split("\n")
|
|
20
|
+
.map((line) => line.trim())
|
|
21
|
+
.filter((line) => !line.startsWith("#") && line !== "");
|
|
22
|
+
const subIgnore = (0, ignore_1.default)().add(lines);
|
|
23
|
+
currentGitIgnoreStack = [
|
|
24
|
+
...currentGitIgnoreStack,
|
|
25
|
+
{
|
|
26
|
+
dirPath: options.path,
|
|
27
|
+
ignore: subIgnore,
|
|
28
|
+
},
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
catch (e) {
|
|
32
|
+
logger_1.logger.debug(`Error reading .gitignore file at ${localGitIgnore}:`, e);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
11
36
|
const fullPaths = dirContents
|
|
12
37
|
.filter((n) => !options.ignoreSymlinks || !n.isSymbolicLink())
|
|
13
38
|
.map((n) => (0, path_1.join)(options.path, n.name));
|
|
14
|
-
const filteredPaths = fullPaths.filter((p) => !options.filter(p));
|
|
39
|
+
const filteredPaths = fullPaths.filter((p) => !options.filter(p, currentGitIgnoreStack));
|
|
15
40
|
const filePromises = [];
|
|
16
41
|
for (const p of filteredPaths) {
|
|
17
42
|
const fstat = (0, fs_extra_1.statSync)(p);
|
|
@@ -27,6 +52,8 @@ async function readdirRecursiveHelper(options) {
|
|
|
27
52
|
filter: options.filter,
|
|
28
53
|
maxDepth: options.maxDepth - 1,
|
|
29
54
|
ignoreSymlinks: options.ignoreSymlinks,
|
|
55
|
+
supportGitIgnore: options.supportGitIgnore,
|
|
56
|
+
gitIgnoreStack: currentGitIgnoreStack,
|
|
30
57
|
}));
|
|
31
58
|
}
|
|
32
59
|
}
|
|
@@ -37,25 +64,41 @@ async function readdirRecursiveHelper(options) {
|
|
|
37
64
|
}
|
|
38
65
|
async function readdirRecursive(options) {
|
|
39
66
|
const mmopts = { matchBase: true, dot: true };
|
|
40
|
-
const
|
|
67
|
+
const ignoreRules = (options.ignoreStrings || []).map((glob) => {
|
|
41
68
|
return (p) => minimatch(p, glob, mmopts);
|
|
42
69
|
});
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
70
|
+
const filter = (targetPath, gitIgnoreStack = []) => {
|
|
71
|
+
if (options.supportGitIgnore) {
|
|
72
|
+
let ignored = false;
|
|
73
|
+
for (let i = gitIgnoreStack.length - 1; i >= 0; i--) {
|
|
74
|
+
const state = gitIgnoreStack[i];
|
|
75
|
+
const relPath = (0, path_1.relative)(state.dirPath, targetPath);
|
|
76
|
+
const result = state.ignore.test(relPath);
|
|
77
|
+
if (result.ignored || result.unignored) {
|
|
78
|
+
ignored = result.ignored;
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return ignored;
|
|
49
83
|
}
|
|
50
|
-
return
|
|
51
|
-
return rule(
|
|
84
|
+
return ignoreRules.some((rule) => {
|
|
85
|
+
return rule(targetPath);
|
|
52
86
|
});
|
|
53
87
|
};
|
|
88
|
+
const initialGitIgnoreStack = [];
|
|
89
|
+
if (options.supportGitIgnore) {
|
|
90
|
+
initialGitIgnoreStack.push({
|
|
91
|
+
dirPath: options.path,
|
|
92
|
+
ignore: (0, ignore_1.default)().add(options.ignoreStrings || []),
|
|
93
|
+
});
|
|
94
|
+
}
|
|
54
95
|
const maxDepth = options.maxDepth && options.maxDepth > 0 ? options.maxDepth : Infinity;
|
|
55
96
|
return await readdirRecursiveHelper({
|
|
56
97
|
path: options.path,
|
|
57
98
|
filter: filter,
|
|
58
99
|
maxDepth,
|
|
59
100
|
ignoreSymlinks: !!options.ignoreSymlinks,
|
|
101
|
+
supportGitIgnore: options.supportGitIgnore,
|
|
102
|
+
gitIgnoreStack: initialGitIgnoreStack,
|
|
60
103
|
});
|
|
61
104
|
}
|