@simondotm/nx-firebase 0.3.3 → 0.13.0-beta.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/README.md +22 -65
- package/executors.json +2 -7
- package/generators.json +2 -2
- package/package.json +4 -9
- package/src/executors/build/build.d.ts +8 -15
- package/src/executors/build/build.js +56 -181
- package/src/executors/build/build.js.map +1 -1
- package/src/executors/build/lib/copy-dependencies.d.ts +3 -0
- package/src/executors/build/lib/copy-dependencies.js +53 -0
- package/src/executors/build/lib/copy-dependencies.js.map +1 -0
- package/src/executors/build/lib/firebase-build.d.ts +2 -0
- package/src/executors/build/lib/firebase-build.js +16 -0
- package/src/executors/build/lib/firebase-build.js.map +1 -0
- package/src/executors/build/lib/get-dependencies.d.ts +8 -0
- package/src/executors/build/lib/get-dependencies.js +89 -0
- package/src/executors/build/lib/get-dependencies.js.map +1 -0
- package/src/executors/build/lib/index.d.ts +1 -0
- package/src/executors/build/lib/index.js +5 -0
- package/src/executors/build/lib/index.js.map +1 -0
- package/src/executors/build/lib/rewrite-package.d.ts +8 -0
- package/src/executors/build/lib/rewrite-package.js +44 -0
- package/src/executors/build/lib/rewrite-package.js.map +1 -0
- package/src/executors/build/schema.d.ts +1 -27
- package/src/executors/build/schema.json +83 -36
- package/src/generators/application/application.d.ts +9 -24
- package/src/generators/application/application.js +25 -263
- package/src/generators/application/application.js.map +1 -1
- package/src/generators/application/files/database.rules.json +1 -1
- package/src/generators/application/files/{package.json__template__ → package.json__tmpl__} +6 -6
- package/src/generators/application/files/public/index.html +11 -11
- package/src/generators/application/files/{readme.md__template__ → readme.md__tmpl__} +1 -1
- package/src/generators/application/files/src/{index.ts__template__ → index.ts__tmpl__} +2 -1
- package/src/generators/application/files_firebase/firebase.json__tmpl__ +64 -0
- package/src/generators/application/files_firebaserc/{.firebaserc__template__ → .firebaserc__tmpl__} +0 -0
- package/src/generators/application/files_workspace/firebase.__name__.json__tmpl__ +64 -0
- package/src/generators/application/lib/add-project.d.ts +39 -0
- package/src/generators/application/lib/add-project.js +88 -0
- package/src/generators/application/lib/add-project.js.map +1 -0
- package/src/generators/application/lib/create-files.d.ts +9 -0
- package/src/generators/application/lib/create-files.js +62 -0
- package/src/generators/application/lib/create-files.js.map +1 -0
- package/src/generators/application/lib/delete-files.d.ts +8 -0
- package/src/generators/application/lib/delete-files.js +23 -0
- package/src/generators/application/lib/delete-files.js.map +1 -0
- package/src/generators/application/lib/index.d.ts +4 -0
- package/src/generators/application/lib/index.js +8 -0
- package/src/generators/application/lib/index.js.map +1 -0
- package/src/generators/application/lib/normalize-options.d.ts +5 -0
- package/src/generators/application/lib/normalize-options.js +44 -0
- package/src/generators/application/lib/normalize-options.js.map +1 -0
- package/src/generators/application/lib/update-tsconfig.d.ts +9 -0
- package/src/generators/application/lib/update-tsconfig.js +20 -0
- package/src/generators/application/lib/update-tsconfig.js.map +1 -0
- package/src/generators/application/schema.d.ts +23 -15
- package/src/generators/application/schema.json +38 -45
- package/src/generators/init/init.d.ts +15 -4
- package/src/generators/init/init.js +23 -39
- package/src/generators/init/init.js.map +1 -1
- package/src/generators/init/lib/add-dependencies.d.ts +2 -0
- package/src/generators/init/lib/add-dependencies.js +53 -0
- package/src/generators/init/lib/add-dependencies.js.map +1 -0
- package/src/generators/init/lib/add-git-ignore-entry.d.ts +3 -0
- package/src/generators/init/lib/add-git-ignore-entry.js +26 -0
- package/src/generators/init/lib/add-git-ignore-entry.js.map +1 -0
- package/src/generators/init/lib/index.d.ts +3 -0
- package/src/generators/init/lib/index.js +7 -0
- package/src/generators/init/lib/index.js.map +1 -0
- package/src/generators/init/lib/normalize-options.d.ts +2 -0
- package/src/generators/init/lib/normalize-options.js +9 -0
- package/src/generators/init/lib/normalize-options.js.map +1 -0
- package/src/generators/init/schema.d.ts +6 -4
- package/src/generators/init/schema.json +10 -8
- package/src/utils/e2ePatch.d.ts +1 -0
- package/src/utils/e2ePatch.js +120 -21
- package/src/utils/e2ePatch.js.map +1 -1
- package/src/utils/index.d.ts +3 -0
- package/src/utils/index.js +7 -0
- package/src/utils/index.js.map +1 -0
- package/src/utils/types.d.ts +1 -0
- package/src/{executors/build/node/package/utils/models.js → utils/types.js} +1 -1
- package/src/utils/types.js.map +1 -0
- package/src/utils/versions.d.ts +12 -0
- package/src/utils/versions.js +32 -0
- package/src/utils/versions.js.map +1 -0
- package/src/utils/workspace.d.ts +2 -0
- package/src/utils/workspace.js +32 -0
- package/src/utils/workspace.js.map +1 -0
- package/src/executors/build/build.spec.ts +0 -11
- package/src/executors/build/node/package/package.d.ts +0 -4
- package/src/executors/build/node/package/package.js +0 -37
- package/src/executors/build/node/package/package.js.map +0 -1
- package/src/executors/build/node/package/utils/cli.d.ts +0 -3
- package/src/executors/build/node/package/utils/cli.js +0 -19
- package/src/executors/build/node/package/utils/cli.js.map +0 -1
- package/src/executors/build/node/package/utils/compile-typescript-files.d.ts +0 -6
- package/src/executors/build/node/package/utils/compile-typescript-files.js +0 -22
- package/src/executors/build/node/package/utils/compile-typescript-files.js.map +0 -1
- package/src/executors/build/node/package/utils/models.d.ts +0 -20
- package/src/executors/build/node/package/utils/models.js.map +0 -1
- package/src/executors/build/node/package/utils/normalize-options.d.ts +0 -3
- package/src/executors/build/node/package/utils/normalize-options.js +0 -25
- package/src/executors/build/node/package/utils/normalize-options.js.map +0 -1
- package/src/executors/build/node/package/utils/update-package-json.d.ts +0 -3
- package/src/executors/build/node/package/utils/update-package-json.js +0 -19
- package/src/executors/build/node/package/utils/update-package-json.js.map +0 -1
- package/src/executors/firebase/firebase.d.ts +0 -12
- package/src/executors/firebase/firebase.js +0 -133
- package/src/executors/firebase/firebase.js.map +0 -1
- package/src/executors/firebase/firebase.spec.ts +0 -11
- package/src/executors/firebase/schema.d.ts +0 -4
- package/src/executors/firebase/schema.json +0 -24
- package/src/generators/application/application.spec.ts +0 -20
- package/src/generators/application/files/tsconfig.app.json__template__ +0 -11
- package/src/generators/application/files/tsconfig.json__template__ +0 -10
- package/src/generators/application/files_firebase/firebase.json__template__ +0 -2
- package/src/generators/application/files_workspace/firebase.__name__.json__template__ +0 -50
- package/src/generators/init/init.spec.ts +0 -40
package/README.md
CHANGED
|
@@ -1,84 +1,41 @@
|
|
|
1
1
|
# @simondotm/nx-firebase
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+

|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
A plugin for [Nx](https://nx.dev) >= 12.1.1 that provides support for Firebase projects in an Nx monorepo workspace.
|
|
6
6
|
|
|
7
|
-
See [CHANGELOG](https://github.com/simondotm/nx-firebase/blob/main/CHANGELOG.md) for
|
|
7
|
+
See [CHANGELOG](https://github.com/simondotm/nx-firebase/blob/main/CHANGELOG.md) for release notes.
|
|
8
8
|
|
|
9
9
|
## Overview
|
|
10
10
|
|
|
11
|
-
Nx provides a great way to manage monorepo workflows
|
|
11
|
+
Nx provides a great way to manage monorepo workflows and this plugin helps to integrate Firebase projects with Nx, by:
|
|
12
12
|
|
|
13
|
-
This plugin aims to help with this by:
|
|
14
13
|
1. Enabling & promoting use of shared Typescript code libraries within Firebase functions
|
|
15
14
|
2. Retaining a familiar usage of all Firebase features in a way that feels integrated with Nx workflow
|
|
16
15
|
3. Requiring minimal friction/setup for configuration of an Nx workspace in order to be productive with development, building & deployment of Firebase projects
|
|
16
|
+
4. Supporting multiple firebase projects within an Nx workspace
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
## Installation
|
|
21
|
-
**`npm install @simondotm/nx-firebase`**
|
|
22
|
-
|
|
23
|
-
Installs this plugin into your Nx workspace.
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
**`nx g @simondotm/nx-firebase:init`**
|
|
27
|
-
|
|
28
|
-
Installs firebase dependencies (both for backend and frontend) to your root workspace `package.json` (or you can just `npm install` firebase dependencies manually)
|
|
29
|
-
|
|
30
|
-
## Create Firebase Application
|
|
31
|
-
|
|
32
|
-
**`nx g @simondotm/nx-firebase:app <appname> [--directory dir]`**
|
|
33
|
-
|
|
34
|
-
Generates a new Nx Firebase application in the workspace - `/apps/[dir]/appname`
|
|
35
|
-
|
|
36
|
-
The app generator will also create a Firebase configuration file called `firebase.appname.json` in the root of your workspace (along with a default `.firebaserc` and `firebase.json` if they don't already exist)
|
|
37
|
-
|
|
38
|
-
## Build Project
|
|
39
|
-
|
|
40
|
-
**`nx build appname [--with-deps]`**
|
|
41
|
-
|
|
42
|
-
Compiles & builds the target Nx Firebase (functions) application to `dist/apps/[dir]/appname`. It will also auto-generate a `package.json` that is compatible with the Firebase CLI for functions deployment.
|
|
18
|
+
## Nx-Firebase Features
|
|
43
19
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
For inital deployment:
|
|
47
|
-
|
|
48
|
-
**`firebase login`** if not already authenticated
|
|
49
|
-
|
|
50
|
-
**`firebase use --add`** to add your Firebase Project(s) to the `.firebaserc` file in your workspace. This step must be completed before you can deploy anything to Firebase.
|
|
51
|
-
|
|
52
|
-
Then:
|
|
53
|
-
|
|
54
|
-
**`firebase deploy --only functions --config firebase.appname.json`**
|
|
55
|
-
|
|
56
|
-
Or
|
|
20
|
+
Supports:
|
|
57
21
|
|
|
58
|
-
|
|
22
|
+
- Typescript Firebase functions
|
|
23
|
+
- Single or multiple Firebase projects in one Nx workspace
|
|
24
|
+
- Firebase applications in app subdirectories
|
|
25
|
+
- Use of shared Nx buildable libraries in Firebase functions
|
|
26
|
+
- Nx provides automatic dependency checking for builds
|
|
27
|
+
- Building functions with `tsc` `--watch` mode
|
|
28
|
+
- Firebase Emulators
|
|
29
|
+
- Convenience Nx `getconfig` target to fetch remote firebase functions configuration variables to local `.runtimeconfig.json` file
|
|
30
|
+
- Convenience Nx `deploy`, `emulate`, and `serve` targets for functions
|
|
59
31
|
|
|
32
|
+
Additionally:
|
|
60
33
|
|
|
61
|
-
|
|
34
|
+
- Auto generates Firebase functions `package.json` ready for no fuss deployment using the Firebase CLI
|
|
35
|
+
- Auto generates default `firebase.json` configurations, rules and indexes for each Firebase app
|
|
36
|
+
- Only very lightly opinionated about your Firebase configurations and workspace layouts; you can just use the Firebase CLI as usual
|
|
37
|
+
- Keeps all of your firebase rules and indexes within your app folder, to keep your workspace root free of clutter
|
|
62
38
|
|
|
63
|
-
|
|
39
|
+
## Further Information
|
|
64
40
|
|
|
65
41
|
See the full plugin [README](https://github.com/simondotm/nx-firebase/blob/main/README.md) for more details.
|
|
66
|
-
|
|
67
|
-
# Nx-Firebase Features
|
|
68
|
-
|
|
69
|
-
Supports:
|
|
70
|
-
* Typescript Firebase functions
|
|
71
|
-
* Single or multiple Firebase projects in one Nx workspace
|
|
72
|
-
* Firebase applications in app subdirectories
|
|
73
|
-
* Use of Nx buildable node libraries in Firebase functions
|
|
74
|
-
* Nx dependency checking for builds
|
|
75
|
-
* Building functions with `tsc` `--watch` mode
|
|
76
|
-
* Firebase Emulators
|
|
77
|
-
* Convenience Nx `getconfig` target to fetch remote firebase functions configuration variables to local `.runtimeconfig.json` file
|
|
78
|
-
* Convenience Nx `deploy`, `emulate`, and `serve` targets for functions
|
|
79
|
-
|
|
80
|
-
Additionally:
|
|
81
|
-
* Auto generates Firebase functions `package.json` ready for no fuss deployment using the Firebase CLI
|
|
82
|
-
* Auto generates default `firebase.json` configurations, rules and indexes for each Firebase app
|
|
83
|
-
* Only very lightly opinionated about your Firebase configurations and workspace layouts; you can just use the Firebase CLI as usual
|
|
84
|
-
* Keeps all of your firebase rules and indexes within your app folder, to keep your workspace root free of clutter
|
package/executors.json
CHANGED
|
@@ -4,12 +4,7 @@
|
|
|
4
4
|
"build": {
|
|
5
5
|
"implementation": "./src/executors/build/build",
|
|
6
6
|
"schema": "./src/executors/build/schema.json",
|
|
7
|
-
"description": "
|
|
8
|
-
}
|
|
9
|
-
"firebase": {
|
|
10
|
-
"implementation": "./src/executors/firebase/firebase",
|
|
11
|
-
"schema": "./src/executors/firebase/schema.json",
|
|
12
|
-
"description": "firebase cli executor"
|
|
13
|
-
}
|
|
7
|
+
"description": "build executor"
|
|
8
|
+
}
|
|
14
9
|
}
|
|
15
10
|
}
|
package/generators.json
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
"init": {
|
|
7
7
|
"factory": "./src/generators/init/init",
|
|
8
8
|
"schema": "./src/generators/init/schema.json",
|
|
9
|
-
"description": "
|
|
9
|
+
"description": "nx-firebase initializer",
|
|
10
10
|
"hidden": true
|
|
11
11
|
},
|
|
12
12
|
"application": {
|
|
13
13
|
"factory": "./src/generators/application/application",
|
|
14
14
|
"schema": "./src/generators/application/schema.json",
|
|
15
|
-
"description": "
|
|
15
|
+
"description": "nx-firebase application generator",
|
|
16
16
|
"aliases": ["app"]
|
|
17
17
|
}
|
|
18
18
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@simondotm/nx-firebase",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0-beta.0",
|
|
4
4
|
"description": "A Firebase plugin for Nx monorepo workspaces.",
|
|
5
5
|
"author": "Simon Morris",
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,13 +21,8 @@
|
|
|
21
21
|
"generators": "./generators.json",
|
|
22
22
|
"executors": "./executors.json",
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"
|
|
25
|
-
"@nrwl/workspace": ">=
|
|
26
|
-
"@nrwl/linter": ">= 12.1.1",
|
|
27
|
-
"@nrwl/jest": ">= 12.1.1"
|
|
24
|
+
"nx": ">= 13.10.6",
|
|
25
|
+
"@nrwl/workspace": ">= 13.10.6"
|
|
28
26
|
},
|
|
29
|
-
"typings": "./src/index.d.ts"
|
|
30
|
-
"dependencies": {
|
|
31
|
-
"fs-extra": "^10.0.0"
|
|
32
|
-
}
|
|
27
|
+
"typings": "./src/index.d.ts"
|
|
33
28
|
}
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import '../../utils/e2ePatch';
|
|
2
|
-
import { FirebaseBuildExecutorSchema } from './schema';
|
|
3
2
|
import { ExecutorContext } from '@nrwl/devkit';
|
|
3
|
+
import type { ExecutorOptions } from '@nrwl/js/src/utils/schema';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* - Builds the current application as a Typescript package library for Firebase functions
|
|
9
|
-
* - Copies any dependent libraries to the dist folder
|
|
10
|
-
* - Auto generates the firebase functions package.json
|
|
11
|
-
* - Updates the firebase functions package.json to convert library dependency references to local file references
|
|
12
|
-
*
|
|
13
|
-
* After building, the project can be deployed using the firebase CLI as usual
|
|
14
|
-
*
|
|
15
|
-
* @param options
|
|
16
|
-
* @param context
|
|
17
|
-
* @returns build success/failure outcome
|
|
5
|
+
* @simondotm/nx-firebase:build executor is a
|
|
6
|
+
* customized version of @nrwl/js:tsc executor
|
|
18
7
|
*/
|
|
19
|
-
export
|
|
8
|
+
export declare function runExecutor(options: ExecutorOptions, context: ExecutorContext): AsyncGenerator<{
|
|
9
|
+
success: boolean;
|
|
10
|
+
outfile: string;
|
|
11
|
+
}, void, unknown>;
|
|
12
|
+
export default runExecutor;
|
|
@@ -1,200 +1,75 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.runExecutor = void 0;
|
|
3
4
|
const tslib_1 = require("tslib");
|
|
4
|
-
//
|
|
5
|
-
// See: https://github.com/nrwl/nx/issues/5065
|
|
6
|
-
require("../../utils/e2ePatch");
|
|
5
|
+
require("../../utils/e2ePatch"); // intentional side effects
|
|
7
6
|
const devkit_1 = require("@nrwl/devkit");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
//SM: Much of our build executor is based on @nrwl/node:package executor
|
|
12
|
-
const compile_typescript_files_1 = require("./node/package/utils/compile-typescript-files");
|
|
13
|
-
const update_package_json_1 = require("./node/package/utils/update-package-json");
|
|
14
|
-
const normalize_options_1 = require("./node/package/utils/normalize-options");
|
|
15
|
-
const cli_1 = require("./node/package/utils/cli");
|
|
16
|
-
const workspace_1 = require("@nrwl/workspace");
|
|
17
|
-
const fs_extra_1 = require("fs-extra");
|
|
18
|
-
const fileutils_1 = require("@nrwl/workspace/src/utilities/fileutils");
|
|
19
|
-
const ENABLE_DEBUG = false;
|
|
20
|
-
function debugLog(...args) {
|
|
21
|
-
if (ENABLE_DEBUG) {
|
|
22
|
-
console.log(args);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
7
|
+
const tsc_impl_1 = require("@nrwl/js/src/executors/tsc/tsc.impl");
|
|
8
|
+
const lib_1 = require("./lib");
|
|
9
|
+
const utils_1 = require("../../utils");
|
|
25
10
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* - Builds the current application as a Typescript package library for Firebase functions
|
|
30
|
-
* - Copies any dependent libraries to the dist folder
|
|
31
|
-
* - Auto generates the firebase functions package.json
|
|
32
|
-
* - Updates the firebase functions package.json to convert library dependency references to local file references
|
|
33
|
-
*
|
|
34
|
-
* After building, the project can be deployed using the firebase CLI as usual
|
|
35
|
-
*
|
|
36
|
-
* @param options
|
|
37
|
-
* @param context
|
|
38
|
-
* @returns build success/failure outcome
|
|
11
|
+
* @simondotm/nx-firebase:build executor is a
|
|
12
|
+
* customized version of @nrwl/js:tsc executor
|
|
39
13
|
*/
|
|
40
14
|
function runExecutor(options, context) {
|
|
41
|
-
return tslib_1.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// nx firebase functions are essentially @nrwl/node:package libraries, but are added to the project
|
|
47
|
-
// as applications as they are fundamentally the deployable "application" output of a build pipeline.
|
|
48
|
-
// Due to this, we can import standard node libraries as dependencies from within the workspace
|
|
49
|
-
// however, they must be created as "buildable" node libraries, because we have to ensure the
|
|
50
|
-
// firebase CLI can reference these libraries locally from within the dist folder when they are deployed.
|
|
51
|
-
const appRoot = context.workspace.projects[context.projectName].root;
|
|
52
|
-
const normalizedOptions = normalize_options_1.default(options, context, appRoot);
|
|
53
|
-
//SM: note that the dependency search matches only buildable nodes in the tree
|
|
54
|
-
// also, it matches candidate deps by targetName, so if your executor is called something other than "build" it wont find
|
|
55
|
-
// any dependencies. Took me a few hours to figure that one out.
|
|
56
|
-
const { target, dependencies } = buildable_libs_utils_1.calculateProjectDependencies(projGraph, context.root, context.projectName, context.targetName, context.configurationName);
|
|
57
|
-
// ensure dependent libraries exist (ie. have been built at least once)
|
|
58
|
-
// note that this check does not check if they are out of date. Not quite sure yet how to do that, but --with-deps will always work.
|
|
59
|
-
const dependentsBuilt = buildable_libs_utils_1.checkDependentProjectsHaveBeenBuilt(context.root, context.projectName, context.targetName, dependencies);
|
|
60
|
-
if (!dependentsBuilt) {
|
|
61
|
-
throw new Error("Dependent libraries need to be built first. Try adding '--with-deps' CLI option");
|
|
62
|
-
}
|
|
63
|
-
// clean the output folder first
|
|
64
|
-
// this way, if there are any issues with the compilation or dependency checks
|
|
65
|
-
// we do not have inconsistent build output left lying around
|
|
66
|
-
if (normalizedOptions.deleteOutputPath) {
|
|
67
|
-
fs_extra_1.removeSync(normalizedOptions.outputPath);
|
|
15
|
+
return tslib_1.__asyncGenerator(this, arguments, function* runExecutor_1() {
|
|
16
|
+
var e_1, _a;
|
|
17
|
+
(0, utils_1.checkNxVersion)();
|
|
18
|
+
if (process.env.NX_WORKSPACE_ROOT_PATH) {
|
|
19
|
+
devkit_1.logger.warn(`WARNING: @simondotm/nx-firebase plugin is located outside this workspace, NX_WORKSPACE_ROOT_PATH has been set to ${process.env.NX_WORKSPACE_ROOT_PATH}`);
|
|
68
20
|
}
|
|
69
|
-
|
|
70
|
-
//
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
debugLog("dependencies=" + JSON.stringify(dependencies, null, 3));
|
|
78
|
-
// list npm deps first, sorted alphabetically
|
|
79
|
-
const npmDeps = dependencies.filter((dep) => dep.node.type !== 'lib').sort((a, b) => a.name.localeCompare(b.name));
|
|
80
|
-
for (const d of npmDeps) {
|
|
81
|
-
const type = d.node.type;
|
|
82
|
-
devkit_1.logger.log(" - Added '" + type + "' dependency '" + d.name + "'");
|
|
21
|
+
/*
|
|
22
|
+
// --updateBuildableProjectDepsInPackageJson is true by default for @nrwl/js:tsc
|
|
23
|
+
// https://nx.dev/packages/js/executors/tsc
|
|
24
|
+
// but we havent programmed our executor schema to match yet, so hack them in here.
|
|
25
|
+
const customOptions: ExecutorOptions = {
|
|
26
|
+
...options,
|
|
27
|
+
updateBuildableProjectDepsInPackageJson: true,
|
|
28
|
+
clean: true,
|
|
83
29
|
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
//
|
|
88
|
-
// Probably added as user error (done it myself) so better to warn here explicitly
|
|
89
|
-
// than ignore it and allow wierd side-effects to happen if we proceed.
|
|
90
|
-
const projectDeps = projGraph.dependencies[context.projectName].map((dep) => {
|
|
91
|
-
const depName = dep.target;
|
|
92
|
-
const node = projGraph.nodes[depName];
|
|
93
|
-
return node;
|
|
94
|
-
});
|
|
95
|
-
const nonBuildableDeps = projectDeps.filter((dep) => {
|
|
96
|
-
return ((dep.type === 'lib') && (dep.data.targets['build'] === undefined));
|
|
97
|
-
});
|
|
98
|
-
//console.log("nonBuildableDeps=", JSON.stringify(nonBuildableDeps, null, 3));
|
|
99
|
-
// automatically add any dependencies this application has to the output "package.json"
|
|
100
|
-
// this will include both npm imports and workspace library imports
|
|
101
|
-
// non-buildable deps will not show up here, but we've captured them already
|
|
102
|
-
if (dependencies.length > 0 &&
|
|
103
|
-
options.updateBuildableProjectDepsInPackageJson) {
|
|
104
|
-
buildable_libs_utils_1.updateBuildableProjectPackageJsonDependencies(context.root, context.projectName, context.targetName, context.configurationName, target, dependencies, normalizedOptions.buildableProjectDepsInPackageJsonType);
|
|
30
|
+
*/
|
|
31
|
+
if (process.env.NX_VERBOSE_LOGGING) {
|
|
32
|
+
devkit_1.logger.info(`options=${JSON.stringify(options, null, 3)}`);
|
|
105
33
|
}
|
|
106
|
-
//
|
|
107
|
-
//
|
|
108
|
-
//
|
|
109
|
-
//
|
|
110
|
-
//
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
return (dep.node.type === 'lib');
|
|
118
|
-
}).sort((a, b) => a.name.localeCompare(b.name));
|
|
119
|
-
// copy each of their build outputs in dist to a "libs" sub directory in our application dist output folder
|
|
120
|
-
const depLibsDir = 'libs';
|
|
121
|
-
const workspaceRoot = context.root;
|
|
122
|
-
const localLibraries = {};
|
|
123
|
-
for (const dep of workspaceDependencies) {
|
|
124
|
-
const localPackageName = dep.name; // the library dependency package name
|
|
125
|
-
const localLibraryName = dep.node.name; // the library dependency project name
|
|
126
|
-
localLibraries[localPackageName] = dep;
|
|
127
|
-
const srcDir = devkit_1.joinPathFragments(workspaceRoot, dep.outputs[0]);
|
|
128
|
-
const outDir = devkit_1.joinPathFragments(workspaceRoot, normalizedOptions.outputPath, depLibsDir, localLibraryName);
|
|
129
|
-
// we also copy libraries to node_modules in dist, because the Firebase CLI also runs the entry point script during a deploy to determine the exported functions
|
|
130
|
-
// however, firebase does NOT upload node_modules to GCP, so we have to make two copies of each dependent local library package
|
|
131
|
-
// see: https://firebase.google.com/docs/functions/handle-dependencies
|
|
132
|
-
const nodeModulesDir = devkit_1.joinPathFragments(workspaceRoot, normalizedOptions.outputPath, 'node_modules', localPackageName);
|
|
133
|
-
try {
|
|
134
|
-
debugLog("- Copying dependent workspace library '" + dep.node.name + "' from '" + srcDir + "' to '" + outDir + "'");
|
|
135
|
-
debugLog("- Copying dependent workspace library '" + dep.node.name + "' from '" + srcDir + "' to '" + nodeModulesDir + "'");
|
|
136
|
-
yield fs_extra_1.copy(srcDir, outDir);
|
|
137
|
-
yield fs_extra_1.copy(srcDir, nodeModulesDir);
|
|
138
|
-
devkit_1.logger.log(" - Copied 'lib' dependency '" + dep.name + "'");
|
|
139
|
-
}
|
|
140
|
-
catch (err) {
|
|
141
|
-
devkit_1.logger.error(err.message);
|
|
142
|
-
}
|
|
34
|
+
// console.log(`NX_WORKSPACE_ROOT_PATH=${process.env.NX_WORKSPACE_ROOT_PATH}`)
|
|
35
|
+
// logger.info(`process.env.CI=${process.env.CI}`)
|
|
36
|
+
// logger.info(`process.env.NX_DAEMON=${process.env.CI}`)
|
|
37
|
+
// // SM: recompute the project graph on every iteration so that --watch will work,
|
|
38
|
+
// // since the context.projectGraph is only a snapshot
|
|
39
|
+
if (options.watch) {
|
|
40
|
+
// const projectGraph = await createProjectGraphAsync()
|
|
41
|
+
yield tslib_1.__await((0, devkit_1.createProjectGraphAsync)()
|
|
42
|
+
// logger.info(JSON.stringify(graph, null, 3))
|
|
43
|
+
);
|
|
44
|
+
// logger.info(JSON.stringify(graph, null, 3))
|
|
143
45
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
if (localDep) {
|
|
157
|
-
const localRef = 'file:' + devkit_1.joinPathFragments('.', 'libs', localDep.node.name);
|
|
158
|
-
debugLog(" - Replacing '" + d + "' with '" + localRef + "'");
|
|
159
|
-
functionsPackageDeps[d] = localRef;
|
|
160
|
-
// detect any incompatible nested libraries
|
|
161
|
-
if (d.split('/').length > 2) {
|
|
162
|
-
incompatibleNestedDeps.push(d);
|
|
163
|
-
}
|
|
46
|
+
try {
|
|
47
|
+
// iterate the tscExecutor generator until it completes
|
|
48
|
+
// this approach allows us to add a custom post-compile process.
|
|
49
|
+
//
|
|
50
|
+
// with --watch enabled, this loop will run until the process terminates
|
|
51
|
+
// https://github.com/nrwl/nx/blob/8bfc0b5527e3ea3acd14e4a11254505f02046d98/packages/js/src/executors/tsc/tsc.impl.ts#L176
|
|
52
|
+
for (var _b = tslib_1.__asyncValues((0, tsc_impl_1.tscExecutor)(options, context)), _c; _c = yield tslib_1.__await(_b.next()), !_c.done;) {
|
|
53
|
+
const output = _c.value;
|
|
54
|
+
// logger.info(output)
|
|
55
|
+
if (output.success) {
|
|
56
|
+
// Post-process Firebase Functions dependencies if compilation succeeded
|
|
57
|
+
yield tslib_1.__await((0, lib_1.firebaseBuildExecutor)(context, options.outputPath));
|
|
164
58
|
}
|
|
59
|
+
yield yield tslib_1.__await(output);
|
|
165
60
|
}
|
|
166
61
|
}
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
// These are both show-stoppers for successful Firebase functions compilation
|
|
174
|
-
// If any bad dependencies were found, report and throw
|
|
175
|
-
// Non-buildable library dependencies are a show stopper
|
|
176
|
-
// If any bad dependencies were found, report and throw
|
|
177
|
-
for (const dep of nonBuildableDeps) {
|
|
178
|
-
devkit_1.logger.error("ERROR: Found non-buildable library dependency '" + dep.name + "' in Firebase Application. Imported libraries must be created with `--buildable`.");
|
|
179
|
-
}
|
|
180
|
-
for (const dep of incompatibleNestedDeps) {
|
|
181
|
-
devkit_1.logger.error("ERROR: Found incompatible nested library dependency '" + dep + "' in Firebase Application. Imported nested libraries must be created with `--importPath`.");
|
|
182
|
-
}
|
|
183
|
-
if (nonBuildableDeps.length || incompatibleNestedDeps.length) {
|
|
184
|
-
throw new Error("ERROR: Firebase Application contains references to non-buildable or incompatible nested libraries, please fix in order to proceed with build.");
|
|
185
|
-
}
|
|
186
|
-
if (options.cli) {
|
|
187
|
-
cli_1.default(normalizedOptions, context);
|
|
62
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
63
|
+
finally {
|
|
64
|
+
try {
|
|
65
|
+
if (_c && !_c.done && (_a = _b.return)) yield tslib_1.__await(_a.call(_b));
|
|
66
|
+
}
|
|
67
|
+
finally { if (e_1) throw e_1.error; }
|
|
188
68
|
}
|
|
189
|
-
// Finally, compile the firebase functions Typescript application
|
|
190
|
-
// uses the same builder logic as @nrwl/node:package
|
|
191
|
-
// since we do not want or need to use webpack for cloud functions
|
|
192
|
-
// So that we can support --watch (https://github.com/simondotm/nx-firebase/issues/11)
|
|
193
|
-
// We run tsc as the last step, but we disable `deleteOutputPath` so that our previous steps are not deleted.
|
|
194
|
-
normalizedOptions.deleteOutputPath = false;
|
|
195
|
-
const result = yield compile_typescript_files_1.default(normalizedOptions, context, appRoot, dependencies);
|
|
196
|
-
return Object.assign(Object.assign({}, result), { outputPath: normalizedOptions.outputPath });
|
|
197
69
|
});
|
|
198
70
|
}
|
|
71
|
+
exports.runExecutor = runExecutor;
|
|
72
|
+
//SM: no idea what this shenanigans is for
|
|
73
|
+
//export default convertNxExecutor(runExecutor);
|
|
199
74
|
exports.default = runExecutor;
|
|
200
75
|
//# sourceMappingURL=build.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../../../../packages/nx-firebase/src/executors/build/build.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../../../../../packages/nx-firebase/src/executors/build/build.ts"],"names":[],"mappings":";;;;AAAA,gCAA6B,CAAC,2BAA2B;AACzD,yCAA+E;AAE/E,kEAAiE;AACjE,+BAA6C;AAC7C,uCAA4C;AAE5C;;;GAGG;AACH,SAAuB,WAAW,CAChC,OAAwB,EACxB,OAAwB;;;QAExB,IAAA,sBAAc,GAAE,CAAA;QAEhB,IAAI,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE;YACtC,eAAM,CAAC,IAAI,CACT,oHAAoH,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,CACzJ,CAAA;SACF;QAED;;;;;;;;;UASE;QACF,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE;YAClC,eAAM,CAAC,IAAI,CAAC,WAAW,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAA;SAC3D;QAED,8EAA8E;QAE9E,kDAAkD;QAClD,yDAAyD;QAEzD,mFAAmF;QACnF,wDAAwD;QACxD,IAAI,OAAO,CAAC,KAAK,EAAE;YACjB,uDAAuD;YACvD,sBAAM,IAAA,gCAAuB,GAAE;YAC/B,8CAA8C;aADf,CAAA;YAC/B,8CAA8C;SAC/C;;YAED,uDAAuD;YACvD,gEAAgE;YAChE,EAAE;YACF,wEAAwE;YACxE,0HAA0H;YAC1H,KAA2B,IAAA,KAAA,sBAAA,IAAA,sBAAW,EAAC,OAAO,EAAE,OAAO,CAAC,CAAA,IAAA;gBAA7C,MAAM,MAAM,WAAA,CAAA;gBACrB,sBAAsB;gBACtB,IAAI,MAAM,CAAC,OAAO,EAAE;oBAClB,wEAAwE;oBACxE,sBAAM,IAAA,2BAAqB,EAAC,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,CAAA,CAAA;iBACzD;gBACD,4BAAM,MAAM,CAAA,CAAA;aACb;;;;;;;;;IACH,CAAC;CAAA;AApDD,kCAoDC;AAED,0CAA0C;AAC1C,gDAAgD;AAChD,kBAAe,WAAW,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DependentBuildableProjectNode } from '@nrwl/workspace/src/utilities/buildable-libs-utils';
|
|
2
|
+
export declare const FIREBASE_DEPS_DIR = "libs";
|
|
3
|
+
export declare function copyFirebaseDependencies(outputPath: string, workspaceRoot: string, projectDependencies: DependentBuildableProjectNode[]): Promise<Record<string, DependentBuildableProjectNode>>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.copyFirebaseDependencies = exports.FIREBASE_DEPS_DIR = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nrwl/devkit");
|
|
6
|
+
const fs_extra_1 = require("fs-extra");
|
|
7
|
+
exports.FIREBASE_DEPS_DIR = 'libs';
|
|
8
|
+
function copyFirebaseDependencies(outputPath, workspaceRoot, projectDependencies) {
|
|
9
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
10
|
+
// final custom step for building firebase functions applications is to:
|
|
11
|
+
// - identify any workspace library dependencies
|
|
12
|
+
// - copy them to the application dist folder
|
|
13
|
+
// - update the output "package.json" to use local file references to these libraries
|
|
14
|
+
//
|
|
15
|
+
// This ensures that:
|
|
16
|
+
// - the firebase CLI deploy command will work correctly
|
|
17
|
+
// - all code for the functions is self contained with the dist/app/<firebaseapp> folder
|
|
18
|
+
// - all local code for the functions will be uploaded to GCP without any need to faff with private npm packages
|
|
19
|
+
// copy each of their build outputs in dist to a "libs" sub directory in our application dist output folder
|
|
20
|
+
const localLibraries = {};
|
|
21
|
+
for (const dep of projectDependencies) {
|
|
22
|
+
const localPackageName = dep.name; // the library dependency package name
|
|
23
|
+
const localLibraryName = dep.node.name; // the library dependency project name
|
|
24
|
+
localLibraries[localPackageName] = dep;
|
|
25
|
+
const srcDir = (0, devkit_1.joinPathFragments)(workspaceRoot, dep.outputs[0]);
|
|
26
|
+
const outDir = (0, devkit_1.joinPathFragments)(workspaceRoot, outputPath, exports.FIREBASE_DEPS_DIR, localLibraryName);
|
|
27
|
+
// we also copy libraries to node_modules in dist, because the Firebase CLI also runs the entry point script during a deploy to determine the exported functions
|
|
28
|
+
// however, firebase does NOT upload node_modules to GCP, so we have to make two copies of each dependent local library package
|
|
29
|
+
// see: https://firebase.google.com/docs/functions/handle-dependencies
|
|
30
|
+
// SM: Nov'22, this policy has changed - local libs should NOT be in the `node_modules` folder.
|
|
31
|
+
// https://firebase.google.com/docs/functions/handle-dependencies#including_local_nodejs_modules
|
|
32
|
+
// SM: Dec'22, this is not correct, we DO need to copy to `node_modules` also, because the firebase CLI script
|
|
33
|
+
// uses `require(distDir)` to determine the entry point, and nodeJS require has to be able to resolve our libs to the local node_modules
|
|
34
|
+
// however, for external deps like `firebase-functions` nodeJS will not find it here, but will move up a folder until it hits our nx root node_modules
|
|
35
|
+
const nodeModulesDir = (0, devkit_1.joinPathFragments)(workspaceRoot, outputPath, 'node_modules', localPackageName);
|
|
36
|
+
try {
|
|
37
|
+
if (process.env.NX_VERBOSE_LOGGING) {
|
|
38
|
+
devkit_1.logger.info(`- Copying dependent workspace library '${dep.node.name}' from '${srcDir}' to '${outDir}'`);
|
|
39
|
+
devkit_1.logger.info(`- Copying dependent workspace library '${dep.node.name}' from '${srcDir}' to '${nodeModulesDir}'`);
|
|
40
|
+
}
|
|
41
|
+
yield (0, fs_extra_1.copy)(srcDir, outDir);
|
|
42
|
+
yield (0, fs_extra_1.copy)(srcDir, nodeModulesDir);
|
|
43
|
+
devkit_1.logger.log(` - Copied 'lib' dependency '${dep.name}'`);
|
|
44
|
+
}
|
|
45
|
+
catch (err) {
|
|
46
|
+
devkit_1.logger.error(err.message);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return localLibraries;
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
exports.copyFirebaseDependencies = copyFirebaseDependencies;
|
|
53
|
+
//# sourceMappingURL=copy-dependencies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copy-dependencies.js","sourceRoot":"","sources":["../../../../../../../packages/nx-firebase/src/executors/build/lib/copy-dependencies.ts"],"names":[],"mappings":";;;;AAAA,yCAAwD;AAExD,uCAA+B;AAElB,QAAA,iBAAiB,GAAG,MAAM,CAAA;AAEvC,SAAsB,wBAAwB,CAC5C,UAAkB,EAClB,aAAqB,EACrB,mBAAoD;;QAEpD,wEAAwE;QACxE,gDAAgD;QAChD,6CAA6C;QAC7C,qFAAqF;QACrF,EAAE;QACF,qBAAqB;QACrB,wDAAwD;QACxD,wFAAwF;QACxF,gHAAgH;QAEhH,2GAA2G;QAC3G,MAAM,cAAc,GAAkD,EAAE,CAAA;QACxE,KAAK,MAAM,GAAG,IAAI,mBAAmB,EAAE;YACrC,MAAM,gBAAgB,GAAG,GAAG,CAAC,IAAI,CAAA,CAAC,sCAAsC;YACxE,MAAM,gBAAgB,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,CAAA,CAAC,sCAAsC;YAC7E,cAAc,CAAC,gBAAgB,CAAC,GAAG,GAAG,CAAA;YACtC,MAAM,MAAM,GAAG,IAAA,0BAAiB,EAAC,aAAa,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAA;YAC/D,MAAM,MAAM,GAAG,IAAA,0BAAiB,EAC9B,aAAa,EACb,UAAU,EACV,yBAAiB,EACjB,gBAAgB,CACjB,CAAA;YACD,gKAAgK;YAChK,+HAA+H;YAC/H,sEAAsE;YACtE,+FAA+F;YAC/F,gGAAgG;YAChG,8GAA8G;YAC9G,wIAAwI;YACxI,sJAAsJ;YAEtJ,MAAM,cAAc,GAAG,IAAA,0BAAiB,EACtC,aAAa,EACb,UAAU,EACV,cAAc,EACd,gBAAgB,CACjB,CAAA;YACD,IAAI;gBACF,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,EAAE;oBAClC,eAAM,CAAC,IAAI,CACT,0CAA0C,GAAG,CAAC,IAAI,CAAC,IAAI,WAAW,MAAM,SAAS,MAAM,GAAG,CAC3F,CAAA;oBACD,eAAM,CAAC,IAAI,CACT,0CAA0C,GAAG,CAAC,IAAI,CAAC,IAAI,WAAW,MAAM,SAAS,cAAc,GAAG,CACnG,CAAA;iBACF;gBACD,MAAM,IAAA,eAAI,EAAC,MAAM,EAAE,MAAM,CAAC,CAAA;gBAC1B,MAAM,IAAA,eAAI,EAAC,MAAM,EAAE,cAAc,CAAC,CAAA;gBAClC,eAAM,CAAC,GAAG,CAAC,+BAA+B,GAAG,CAAC,IAAI,GAAG,CAAC,CAAA;aACvD;YAAC,OAAO,GAAG,EAAE;gBACZ,eAAM,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;aAC1B;SACF;QAED,OAAO,cAAc,CAAA;IACvB,CAAC;CAAA;AA7DD,4DA6DC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.firebaseBuildExecutor = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const copy_dependencies_1 = require("./copy-dependencies");
|
|
6
|
+
const get_dependencies_1 = require("./get-dependencies");
|
|
7
|
+
const rewrite_package_1 = require("./rewrite-package");
|
|
8
|
+
function firebaseBuildExecutor(context, outputPath) {
|
|
9
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
10
|
+
const firebaseDependencies = yield (0, get_dependencies_1.getFirebaseDependencies)(context);
|
|
11
|
+
const localLibraries = yield (0, copy_dependencies_1.copyFirebaseDependencies)(outputPath, context.root, firebaseDependencies.projectDependencies);
|
|
12
|
+
(0, rewrite_package_1.rewriteFirebasePackage)(outputPath, localLibraries);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
exports.firebaseBuildExecutor = firebaseBuildExecutor;
|
|
16
|
+
//# sourceMappingURL=firebase-build.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"firebase-build.js","sourceRoot":"","sources":["../../../../../../../packages/nx-firebase/src/executors/build/lib/firebase-build.ts"],"names":[],"mappings":";;;;AAEA,2DAA8D;AAC9D,yDAA4D;AAC5D,uDAA0D;AAE1D,SAAsB,qBAAqB,CACzC,OAAwB,EACxB,UAAkB;;QAElB,MAAM,oBAAoB,GAAG,MAAM,IAAA,0CAAuB,EAAC,OAAO,CAAC,CAAA;QACnE,MAAM,cAAc,GAAG,MAAM,IAAA,4CAAwB,EACnD,UAAU,EACV,OAAO,CAAC,IAAI,EACZ,oBAAoB,CAAC,mBAAmB,CACzC,CAAA;QACD,IAAA,wCAAsB,EAAC,UAAU,EAAE,cAAc,CAAC,CAAA;IACpD,CAAC;CAAA;AAXD,sDAWC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ExecutorContext, ProjectGraphProjectNode } from '@nrwl/devkit';
|
|
2
|
+
import { DependentBuildableProjectNode } from '@nrwl/workspace/src/utilities/buildable-libs-utils';
|
|
3
|
+
export declare type FirebaseDependencies = {
|
|
4
|
+
projectDependencies: DependentBuildableProjectNode[];
|
|
5
|
+
npmDependencies: DependentBuildableProjectNode[];
|
|
6
|
+
target: ProjectGraphProjectNode<unknown>;
|
|
7
|
+
};
|
|
8
|
+
export declare function getFirebaseDependencies(context: ExecutorContext): Promise<FirebaseDependencies>;
|