0x80 / firebase-tools-with-isolate Goto Github PK
View Code? Open in Web Editor NEWThis project forked from firebase/firebase-tools
The Firebase CLI with isolate-package integrated to support monorepos
License: MIT License
This project forked from firebase/firebase-tools
The Firebase CLI with isolate-package integrated to support monorepos
License: MIT License
When running npx firebase deploy
using firebase-tools-with-isolate
, firebase-tools will still perform some checks before calling isolate
. That way, if the package is not built yet (first run, fresh project, ./isolate folder empty, etc) then firebase-tools will throw errors like this:
Error: Could not detect runtime for functions at C:\Users\frani\IdeaProjects\cdljovemaju\functions\isolate
or
Error: could not deploy functions because the "functions\isolate" directory was not found. Please create it or specify a different source directory in firebase.json
If we run npx isolate
before deploying, or add isolate
to the predeploy
tasks, the files will be up to date and the deploy will succeed.
My suggestion is that isolate
, from firebase-tools-with-isolate, should be called before the initial checks that firebase-tools performs.
isolate
is currently being invoked without any arguments:
And this causes it to run from the workspace root by default, and fail with:
i functions: +++ Failed to isolate: Failed to find outDir in tsconfig. If you are executing isolate from the root of a monorepo you should specify the buildDirName in isolate.config.json.
You should pass it targetPackagePath
based on the actual sourceDir
in this case, no?
When 1st and 2nd functions are deployed at the same time, the tools call prepare for upload twice, triggering the isolation process twice. This seems to lead to issues.
if (backend.someEndpoint(wantBackend, (e) => e.platform === "gcfv2")) {
const packagedSource = await prepareFunctionsUpload(sourceDir, config);
source.functionsSourceV2 = packagedSource?.pathToSource;
source.functionsSourceV2Hash = packagedSource?.hash;
}
if (backend.someEndpoint(wantBackend, (e) => e.platform === "gcfv1")) {
const packagedSource = await prepareFunctionsUpload(sourceDir, config, runtimeConfig);
source.functionsSourceV1 = packagedSource?.pathToSource;
source.functionsSourceV1Hash = packagedSource?.hash;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.