Giter Site home page Giter Site logo

0x80 / firebase-tools-with-isolate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from firebase/firebase-tools

20.0 20.0 0.0 24.53 MB

The Firebase CLI with isolate-package integrated to support monorepos

License: MIT License

Shell 0.29% JavaScript 2.11% Python 0.01% TypeScript 97.20% CSS 0.04% HTML 0.21% Dockerfile 0.03% SCSS 0.12%

firebase-tools-with-isolate's People

Contributors

0x80 avatar aalej avatar abeisgoat avatar berlioz avatar bkendall avatar blidd-google avatar christhompsongoogle avatar colerogers avatar firebase-ops avatar fredzqm avatar google-oss-bot avatar hlshen avatar hsubox76 avatar inlined avatar jamesdaniels avatar jmwski avatar joehan avatar laurenzlong avatar leoortizz avatar lisajian avatar mathu97 avatar mbleigh avatar ryanpbrewster avatar samtstern avatar taeold avatar tamalsaha avatar tinaliang avatar tohhsinpei avatar tonyjhuang avatar yuchenshi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

firebase-tools-with-isolate's Issues

Execute isolate before firebase file checks happen

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.

Doesn't seem to work due to isolate being invoked from the workspace root

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?

Support deploying 1st and 2nd gen functions together

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;
    }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.