@netlify/build-info 7.4.1 → 7.4.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/README.md +36 -93
- package/lib/build-systems/build-system.d.ts +2 -0
- package/lib/build-systems/build-system.js.map +1 -1
- package/lib/build-systems/nx.d.ts +28 -1
- package/lib/build-systems/nx.js +111 -58
- package/lib/build-systems/nx.js.map +1 -1
- package/lib/node/get-build-info.js +2 -15
- package/lib/node/get-build-info.js.map +1 -1
- package/lib/settings/get-build-settings.js +4 -0
- package/lib/settings/get-build-settings.js.map +1 -1
- package/package.json +8 -9
package/README.md
CHANGED
|
@@ -1,106 +1,49 @@
|
|
|
1
1
|
# Build Info
|
|
2
2
|
|
|
3
|
-
Build
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
// packages: [
|
|
24
|
-
// 'path/to/site',
|
|
25
|
-
// 'path/to/component/library'
|
|
26
|
-
// 'path/to/utility/library'
|
|
27
|
-
// ]
|
|
28
|
-
// },
|
|
29
|
-
// frameworks: [
|
|
30
|
-
// {
|
|
31
|
-
// name: 'gatsby',
|
|
32
|
-
// category: 'static_site_generator',
|
|
33
|
-
// dev: {
|
|
34
|
-
// commands: ['gatsby develop'],
|
|
35
|
-
// port: 8000
|
|
36
|
-
// },
|
|
37
|
-
// build: {
|
|
38
|
-
// commands: ['gatsby build'],
|
|
39
|
-
// directory: 'public'
|
|
40
|
-
// },
|
|
41
|
-
// env: { GATSBY_LOGGER: 'yurnalist' },
|
|
42
|
-
// plugins: []
|
|
43
|
-
// }
|
|
44
|
-
// ]
|
|
45
|
-
// }
|
|
46
|
-
|
|
47
|
-
console.log(await getBuildInfo({ projectDir: '/project/root/dir' }))
|
|
48
|
-
// {
|
|
49
|
-
// jsWorkspaces: {
|
|
50
|
-
// isRoot: true,
|
|
51
|
-
// packages: [
|
|
52
|
-
// 'path/to/site',
|
|
53
|
-
// 'path/to/component/library'
|
|
54
|
-
// 'path/to/utility/library'
|
|
55
|
-
// ]
|
|
56
|
-
// },
|
|
57
|
-
// frameworks: []
|
|
58
|
-
// }
|
|
3
|
+
Build info is the core part of detecting settings and heuristics about the users code. The library is platform agnostic
|
|
4
|
+
to be used in our React UI, Node.js CLI and build system.
|
|
5
|
+
|
|
6
|
+
It provides a layered approach to detecting the following information:
|
|
7
|
+
|
|
8
|
+
1. Package Manager
|
|
9
|
+
2. Workspaces (pnpm, yarn, npm)
|
|
10
|
+
3. Build Systems
|
|
11
|
+
4. Frameworks
|
|
12
|
+
5. Build Settings
|
|
13
|
+
|
|
14
|
+
How to use it: First of all, you need to create a `FileSystem` that works for your platform. For Node.js we ship already
|
|
15
|
+
one that can be used: For other platforms, a file system needs to implement the `FileSystem` interface:
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
import { FileSystem } from '@netlify/build-info'
|
|
19
|
+
|
|
20
|
+
export class WebFS extends FileSystem {
|
|
21
|
+
// ...
|
|
22
|
+
}
|
|
59
23
|
```
|
|
60
24
|
|
|
25
|
+
After that the core piece is the Project that needs to be initialized with a file system, the base directory and an
|
|
26
|
+
optional repository root.
|
|
27
|
+
|
|
28
|
+
It is important to note that setting a node version is important for some frameworks to load the correct plugins.
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
const project = new Project(fs, baseDir, root).setEnvironment(process.env).setNodeVersion(process.version)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
after that on the project, we can call multiple methods like `getBuildSettings` which is running all the other steps as
|
|
35
|
+
well.
|
|
36
|
+
|
|
61
37
|
# Example (CLI)
|
|
62
38
|
|
|
63
39
|
```bash
|
|
40
|
+
# will use the current working directory as base directory
|
|
41
|
+
$ build-info
|
|
42
|
+
|
|
64
43
|
$ build-info /project/root/dir
|
|
65
|
-
{
|
|
66
|
-
jsWorkspaces: {
|
|
67
|
-
isRoot: true,
|
|
68
|
-
packages: [
|
|
69
|
-
'path/to/site',
|
|
70
|
-
'path/to/component/library'
|
|
71
|
-
'path/to/utility/library'
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
|
-
frameworks: []
|
|
75
|
-
}
|
|
76
44
|
|
|
77
45
|
$ build-info path/to/site --rootDir /project/root/dir
|
|
78
|
-
|
|
79
|
-
jsWorkspaces: {
|
|
80
|
-
isRoot: false,
|
|
81
|
-
packages: [
|
|
82
|
-
'path/to/site',
|
|
83
|
-
'path/to/component/library'
|
|
84
|
-
'path/to/utility/library'
|
|
85
|
-
]
|
|
86
|
-
},
|
|
87
|
-
frameworks: [
|
|
88
|
-
{
|
|
89
|
-
name: 'gatsby',
|
|
90
|
-
category: 'static_site_generator',
|
|
91
|
-
dev: {
|
|
92
|
-
commands: ['gatsby develop'],
|
|
93
|
-
port: 8000
|
|
94
|
-
},
|
|
95
|
-
build: {
|
|
96
|
-
commands: ['gatsby build'],
|
|
97
|
-
directory: 'public'
|
|
98
|
-
},
|
|
99
|
-
env: { GATSBY_LOGGER: 'yurnalist' },
|
|
100
|
-
plugins: []
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
}
|
|
46
|
+
|
|
104
47
|
```
|
|
105
48
|
|
|
106
49
|
## Contributors
|
|
@@ -14,6 +14,8 @@ export interface BuildSystem {
|
|
|
14
14
|
getCommands?(path: string): Promise<Command[]>;
|
|
15
15
|
/** A function that can be implemented to override the dist location of a framework */
|
|
16
16
|
getDist?(path: string): Promise<string>;
|
|
17
|
+
/** A function that can be implemented to override the framework port */
|
|
18
|
+
getPort?(path: string): Promise<number | null>;
|
|
17
19
|
/** The detect function that is called to check if this build system is in use */
|
|
18
20
|
detect(): Promise<BuildSystem | undefined>;
|
|
19
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-system.js","sourceRoot":"","sources":["../../src/build-systems/build-system.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"build-system.js","sourceRoot":"","sources":["../../src/build-systems/build-system.ts"],"names":[],"mappings":"AAyBA,MAAM,OAAgB,aAAa;IAcd;IAbnB,EAAE,CAAQ;IACV,IAAI,CAAQ;IACZ,OAAO,CAAS;IAChB,WAAW,GAAa,EAAE,CAAA;IAC1B,iEAAiE;IACjE,WAAW,CAAU;IAErB,IAAI,CAIH;IAED,YAAmB,OAAgB;QAAhB,YAAO,GAAP,OAAO,CAAS;IAAG,CAAC;IAEvC,KAAK,CAAC,MAAM;QACV,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE;YAC5D,GAAG,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa;YAC/B,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,IAAI;SAC1B,CAAC,CAAA;QAEF,IAAI,MAAM,EAAE;YACV,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAA;YAClF,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;YACjD,OAAO,IAAI,CAAA;SACZ;IACH,CAAC;IAED,6CAA6C;IAC7C,MAAM;QACJ,OAAO;YACL,EAAE,EAAE,IAAI,CAAC,EAAE;YACX,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,IAAI,EAAE,IAAI,CAAC,IAAI;gBACb,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAC9B,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,qCAAqC,KAAK,EAAE,EAAE,CAAC,EAC1F,EAAE,CACH;gBACH,CAAC,CAAC,SAAS;SACd,CAAA;IACH,CAAC;CACF"}
|
|
@@ -1,4 +1,22 @@
|
|
|
1
|
+
import { WorkspacePackage } from '../workspaces/detect-workspace.js';
|
|
1
2
|
import { BaseBuildTool, type Command } from './build-system.js';
|
|
3
|
+
type Target = WorkspaceJsonTarget | ProjectJsonTarget;
|
|
4
|
+
type WorkspaceJsonTarget = {
|
|
5
|
+
/** will be manually set */
|
|
6
|
+
name: string;
|
|
7
|
+
builder: string;
|
|
8
|
+
options?: Record<string, any>;
|
|
9
|
+
configurations?: Record<string, any>;
|
|
10
|
+
};
|
|
11
|
+
type ProjectJsonTarget = {
|
|
12
|
+
/** will be manually set */
|
|
13
|
+
name: string;
|
|
14
|
+
executor: string;
|
|
15
|
+
outputs?: string[];
|
|
16
|
+
options?: Record<string, any>;
|
|
17
|
+
defaultConfiguration?: string;
|
|
18
|
+
configurations?: Record<string, any>;
|
|
19
|
+
};
|
|
2
20
|
export declare class Nx extends BaseBuildTool {
|
|
3
21
|
id: string;
|
|
4
22
|
name: string;
|
|
@@ -15,10 +33,19 @@ export declare class Nx extends BaseBuildTool {
|
|
|
15
33
|
* @see https://nx.dev/concepts/integrated-vs-package-based
|
|
16
34
|
*/
|
|
17
35
|
isIntegrated: boolean;
|
|
36
|
+
/** List of target patterns */
|
|
37
|
+
targets: Map<string, Target[]>;
|
|
18
38
|
/** Retrieves a list of possible commands for a package */
|
|
19
39
|
getCommands(packagePath: string): Promise<Command[]>;
|
|
20
40
|
/** Retrieve the dist directory of a package */
|
|
21
41
|
getDist(packagePath: string): Promise<string | null>;
|
|
22
|
-
|
|
42
|
+
/** Retrieve the overridden port of the nx executor for integrated setups */
|
|
43
|
+
getPort(packagePath: string): Promise<number | null>;
|
|
44
|
+
getOutputFromTarget(packagePath: string): Promise<string | null>;
|
|
45
|
+
/** detect workspace packages with the workspace.json file */
|
|
46
|
+
detectWorkspaceFile(): Promise<WorkspacePackage[]>;
|
|
47
|
+
/** detect workspace pacakges with the project.json files */
|
|
48
|
+
detectProjectJson(): Promise<WorkspacePackage[]>;
|
|
23
49
|
detect(): Promise<this | undefined>;
|
|
24
50
|
}
|
|
51
|
+
export {};
|
package/lib/build-systems/nx.js
CHANGED
|
@@ -18,31 +18,25 @@ export class Nx extends BaseBuildTool {
|
|
|
18
18
|
* @see https://nx.dev/concepts/integrated-vs-package-based
|
|
19
19
|
*/
|
|
20
20
|
isIntegrated = false;
|
|
21
|
+
/** List of target patterns */
|
|
22
|
+
targets = new Map();
|
|
21
23
|
/** Retrieves a list of possible commands for a package */
|
|
22
24
|
async getCommands(packagePath) {
|
|
23
|
-
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
let name = this.project.workspace?.getPackage(packagePath)?.name || '';
|
|
26
|
+
const targets = this.targets.get(packagePath) || [];
|
|
27
|
+
const targetNames = targets.map((t) => t.name);
|
|
28
|
+
// it can be a mix of integrated and package based
|
|
27
29
|
try {
|
|
28
|
-
const
|
|
29
|
-
this.
|
|
30
|
-
|
|
31
|
-
name =
|
|
30
|
+
const packageJSONPath = this.project.resolveFromPackage(packagePath, 'package.json');
|
|
31
|
+
const json = await this.project.fs.readJSON(packageJSONPath, { fail: true });
|
|
32
|
+
targetNames.push(...Object.keys(json?.scripts || {}));
|
|
33
|
+
name = json.name || '';
|
|
32
34
|
}
|
|
33
35
|
catch {
|
|
34
|
-
//
|
|
35
|
-
try {
|
|
36
|
-
const json = await this.project.fs.readJSON(packageJSONPath, { fail: true });
|
|
37
|
-
targets.push(...Object.keys(json?.scripts || {}));
|
|
38
|
-
name = json.name || '';
|
|
39
|
-
}
|
|
40
|
-
catch {
|
|
41
|
-
// noop
|
|
42
|
-
}
|
|
36
|
+
// noop
|
|
43
37
|
}
|
|
44
|
-
if (name.length !== 0 &&
|
|
45
|
-
return
|
|
38
|
+
if (name.length !== 0 && targetNames.length !== 0) {
|
|
39
|
+
return targetNames.map((target) => {
|
|
46
40
|
let type = 'unknown';
|
|
47
41
|
if (NPM_DEV_SCRIPTS.includes(target)) {
|
|
48
42
|
type = 'dev';
|
|
@@ -64,17 +58,40 @@ export class Nx extends BaseBuildTool {
|
|
|
64
58
|
if (!this.isIntegrated) {
|
|
65
59
|
return null;
|
|
66
60
|
}
|
|
67
|
-
return this.
|
|
61
|
+
return this.getOutputFromTarget(packagePath);
|
|
68
62
|
}
|
|
69
|
-
|
|
63
|
+
/** Retrieve the overridden port of the nx executor for integrated setups */
|
|
64
|
+
async getPort(packagePath) {
|
|
65
|
+
// only nx integrated has the `project.json`
|
|
66
|
+
if (!this.isIntegrated) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
const targets = this.targets.get(packagePath)?.filter((t) => NPM_DEV_SCRIPTS.includes(t.name)) || [];
|
|
70
|
+
const executor = targets[0] && ('executor' in targets[0] ? targets[0].executor : targets[0].builder);
|
|
71
|
+
switch (executor) {
|
|
72
|
+
case '@nxtensions/astro:dev':
|
|
73
|
+
return 3000;
|
|
74
|
+
case '@nrwl/next:server':
|
|
75
|
+
case '@nx/webpack:dev-server':
|
|
76
|
+
case '@angular-devkit/build-angular:dev-server':
|
|
77
|
+
return 4200;
|
|
78
|
+
case '@nx-plus/vue:dev-server':
|
|
79
|
+
return 8000;
|
|
80
|
+
default:
|
|
81
|
+
this.project.report({
|
|
82
|
+
name: 'UndetectedExecutor',
|
|
83
|
+
message: `Undetected executor for Nx integrated: ${executor}`,
|
|
84
|
+
});
|
|
85
|
+
return null;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
async getOutputFromTarget(packagePath) {
|
|
70
89
|
// dynamic import out of performance reasons on the react UI
|
|
71
90
|
const { getProperty } = await import('dot-prop');
|
|
72
91
|
try {
|
|
73
|
-
const
|
|
74
|
-
const project = await this.project.fs.readJSON(projectPath, { fail: true });
|
|
75
|
-
const target = project?.targets?.build;
|
|
92
|
+
const target = this.targets.get(packagePath)?.find((t) => t.name === 'build');
|
|
76
93
|
if (target) {
|
|
77
|
-
const pattern =
|
|
94
|
+
const pattern = 'outputs' in target ? target.outputs?.[0] : target.options?.outputPath;
|
|
78
95
|
if (pattern) {
|
|
79
96
|
return this.project.fs.join(pattern
|
|
80
97
|
.replace('{workspaceRoot}/', '')
|
|
@@ -88,43 +105,79 @@ export class Nx extends BaseBuildTool {
|
|
|
88
105
|
// As a fallback use the convention of the dist combined with the package path
|
|
89
106
|
return this.project.fs.join('dist', packagePath);
|
|
90
107
|
}
|
|
91
|
-
|
|
92
|
-
|
|
108
|
+
/** detect workspace packages with the workspace.json file */
|
|
109
|
+
async detectWorkspaceFile() {
|
|
93
110
|
const fs = this.project.fs;
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
try {
|
|
112
|
+
const { projects } = await fs.readJSON(fs.join(this.project.jsWorkspaceRoot, 'workspace.json'), {
|
|
113
|
+
fail: true,
|
|
114
|
+
});
|
|
115
|
+
return Object.entries(projects || {})
|
|
116
|
+
.map(([key, { root, projectType, architect }]) => {
|
|
117
|
+
if (!root || key.endsWith('-e2e') || projectType !== 'application') {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
this.targets.set(fs.join(root), Object.entries(architect || {}).map(([name, target]) => ({ ...target, name })));
|
|
121
|
+
return { name: key, path: fs.join(root) };
|
|
122
|
+
})
|
|
123
|
+
.filter(Boolean);
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
// noop
|
|
127
|
+
}
|
|
128
|
+
return [];
|
|
129
|
+
}
|
|
130
|
+
/** detect workspace pacakges with the project.json files */
|
|
131
|
+
async detectProjectJson() {
|
|
132
|
+
const fs = this.project.fs;
|
|
133
|
+
try {
|
|
134
|
+
const { workspaceLayout = { appsDir: 'apps' } } = await fs.readJSON(fs.join(this.project.jsWorkspaceRoot, 'nx.json'), {
|
|
135
|
+
fail: true,
|
|
136
|
+
});
|
|
137
|
+
// if an apps dir is specified get it.
|
|
138
|
+
if (workspaceLayout?.appsDir?.length) {
|
|
139
|
+
const identifyPkg = async ({ entry, directory, packagePath }) => {
|
|
140
|
+
// ignore e2e test applications as there is no need to deploy them
|
|
141
|
+
if (entry === 'project.json' && !packagePath.endsWith('-e2e')) {
|
|
142
|
+
try {
|
|
143
|
+
// we need to check the project json for application types (we don't care about libraries)
|
|
144
|
+
const { projectType, name, targets } = await fs.readJSON(fs.join(directory, entry));
|
|
145
|
+
if (projectType === 'application') {
|
|
146
|
+
this.targets.set(fs.join(packagePath), Object.entries(targets || {}).map(([name, target]) => ({ ...target, name })));
|
|
147
|
+
return { name, path: fs.join(packagePath) };
|
|
115
148
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
this.project.workspace.rootDir = this.project.jsWorkspaceRoot;
|
|
121
|
-
this.project.workspace.packages = await findPackages(this.project, workspaceLayout.appsDir, identifyPkg, '*');
|
|
122
|
-
this.project.events.emit('detectWorkspaces', this.project.workspace);
|
|
149
|
+
}
|
|
150
|
+
catch {
|
|
151
|
+
// noop
|
|
152
|
+
}
|
|
123
153
|
}
|
|
124
|
-
|
|
154
|
+
return null;
|
|
155
|
+
};
|
|
156
|
+
return findPackages(this.project, workspaceLayout.appsDir, identifyPkg, '*');
|
|
125
157
|
}
|
|
126
|
-
|
|
127
|
-
|
|
158
|
+
}
|
|
159
|
+
catch {
|
|
160
|
+
// noop
|
|
161
|
+
}
|
|
162
|
+
return [];
|
|
163
|
+
}
|
|
164
|
+
async detect() {
|
|
165
|
+
const detected = await super.detect();
|
|
166
|
+
if (detected) {
|
|
167
|
+
const pkgs = [...(await this.detectWorkspaceFile()), ...(await this.detectProjectJson())];
|
|
168
|
+
if (pkgs.length) {
|
|
169
|
+
// in this case it's an integrated setup
|
|
170
|
+
this.isIntegrated = true;
|
|
171
|
+
if (!this.project.workspace) {
|
|
172
|
+
this.project.workspace = new WorkspaceInfo();
|
|
173
|
+
this.project.workspace.isRoot = this.project.jsWorkspaceRoot === this.project.baseDirectory;
|
|
174
|
+
this.project.workspace.rootDir = this.project.jsWorkspaceRoot;
|
|
175
|
+
this.project.workspace.packages = pkgs;
|
|
176
|
+
}
|
|
177
|
+
else {
|
|
178
|
+
this.project.workspace.packages.push(...pkgs);
|
|
179
|
+
}
|
|
180
|
+
this.project.events.emit('detectWorkspaces', this.project.workspace);
|
|
128
181
|
}
|
|
129
182
|
return this;
|
|
130
183
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nx.js","sourceRoot":"","sources":["../../src/build-systems/nx.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACvE,OAAO,EAAE,aAAa,EAAoB,MAAM,mCAAmC,CAAA;AACnF,OAAO,EAAE,YAAY,EAAqB,MAAM,yCAAyC,CAAA;AAEzF,OAAO,EAAE,aAAa,EAAgB,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"nx.js","sourceRoot":"","sources":["../../src/build-systems/nx.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AACvE,OAAO,EAAE,aAAa,EAAoB,MAAM,mCAAmC,CAAA;AACnF,OAAO,EAAE,YAAY,EAAqB,MAAM,yCAAyC,CAAA;AAEzF,OAAO,EAAE,aAAa,EAAgB,MAAM,mBAAmB,CAAA;AAkC/D,MAAM,OAAO,EAAG,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@
|
|
|
1
|
-
import { listFrameworks } from '@netlify/framework-info';
|
|
2
|
-
import { report } from '../metrics.js';
|
|
3
1
|
import { Project } from '../project.js';
|
|
4
2
|
import { NodeFS } from './file-system.js';
|
|
5
3
|
/** A noop logger that is used to not log anything (we use the stdout for parsing the json output) */
|
|
@@ -30,19 +28,8 @@ export async function getBuildInfo(config = { featureFlags: {} }) {
|
|
|
30
28
|
.setEnvironment(process.env)
|
|
31
29
|
.setNodeVersion(process.version);
|
|
32
30
|
const info = {};
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
try {
|
|
38
|
-
// if the framework detection is crashing we should not crash the build info and package-manager detection
|
|
39
|
-
info.frameworks = (await listFrameworks({ projectDir: project.baseDirectory }));
|
|
40
|
-
}
|
|
41
|
-
catch (error) {
|
|
42
|
-
report(error, { client: config.bugsnagClient });
|
|
43
|
-
info.frameworks = [];
|
|
44
|
-
}
|
|
45
|
-
}
|
|
31
|
+
// we are only interested in the frameworks of the base directory here (as they are for this site)
|
|
32
|
+
info.frameworks = (await project.detectFrameworksInPath(project.baseDirectory)) || [];
|
|
46
33
|
info.settings = await project.getBuildSettings();
|
|
47
34
|
info.langRuntimes = await project.detectRuntime();
|
|
48
35
|
// some framework detection like NX can update the workspace in the project so assign it later on
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-build-info.js","sourceRoot":"","sources":["../../src/node/get-build-info.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-build-info.js","sourceRoot":"","sources":["../../src/node/get-build-info.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAIvC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AAczC,qGAAqG;AACrG,MAAM,OAAO,UAAU;IACrB,KAAK;QACH,WAAW;IACb,CAAC;IACD,GAAG;QACD,WAAW;IACb,CAAC;IACD,KAAK;QACH,WAAW;IACb,CAAC;IACD,IAAI;QACF,WAAW;IACb,CAAC;IACD,IAAI;QACF,WAAW;IACb,CAAC;CACF;AAED,6DAA6D;AAC7D,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,SAKI,EAAE,YAAY,EAAE,EAAE,EAAE;IAExB,MAAM,EAAE,GAAG,IAAI,MAAM,EAAE,CAAA;IACvB,qEAAqE;IACrE,EAAE,CAAC,MAAM,GAAG,IAAI,UAAU,EAAE,CAAA;IAC5B,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,EAAE,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,OAAO,CAAC;SAC/D,UAAU,CAAC,MAAM,CAAC,aAAa,CAAC;SAChC,cAAc,CAAC,OAAO,CAAC,GAAG,CAAC;SAC3B,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;IAElC,MAAM,IAAI,GAAG,EAAU,CAAA;IAEvB,kGAAkG;IAClG,IAAI,CAAC,UAAU,GAAG,CAAC,MAAM,OAAO,CAAC,sBAAsB,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE,CAAA;IACrF,IAAI,CAAC,QAAQ,GAAG,MAAM,OAAO,CAAC,gBAAgB,EAAE,CAAA;IAChD,IAAI,CAAC,YAAY,GAAG,MAAM,OAAO,CAAC,aAAa,EAAE,CAAA;IAEjD,iGAAiG;IACjG,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,SAAS,CAAA;IACrC,IAAI,CAAC,YAAY,GAAG,OAAO,CAAC,YAAY,CAAA;IACxC,IAAI,CAAC,cAAc,GAAG,OAAO,CAAC,cAAc,CAAA;IAE5C,OAAO,IAAI,CAAA;AACb,CAAC"}
|
|
@@ -6,6 +6,7 @@ async function applyBuildSystemOverrides(settings, project, baseDirectory) {
|
|
|
6
6
|
const build = cmds.find((cmd) => cmd.type === 'build');
|
|
7
7
|
const dev = cmds.find((cmd) => cmd.type === 'dev');
|
|
8
8
|
const dist = await buildSystem.getDist?.(baseDirectory);
|
|
9
|
+
const port = await buildSystem.getPort?.(baseDirectory);
|
|
9
10
|
updatedSettings.name = `${buildSystem.name} + ${settings.name} ${baseDirectory}`;
|
|
10
11
|
if (build) {
|
|
11
12
|
updatedSettings.buildCommand = build.command;
|
|
@@ -16,6 +17,9 @@ async function applyBuildSystemOverrides(settings, project, baseDirectory) {
|
|
|
16
17
|
if (dist) {
|
|
17
18
|
updatedSettings.dist = dist;
|
|
18
19
|
}
|
|
20
|
+
if (port !== undefined && port !== null) {
|
|
21
|
+
updatedSettings.frameworkPort = port;
|
|
22
|
+
}
|
|
19
23
|
// if the build system should be run from the root then set the base directory to an empty string
|
|
20
24
|
// only applicable if we have a build or dev command for it
|
|
21
25
|
if (buildSystem.runFromRoot && build && dev) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-build-settings.js","sourceRoot":"","sources":["../../src/settings/get-build-settings.ts"],"names":[],"mappings":"AAqCA,KAAK,UAAU,yBAAyB,CACtC,QAAkB,EAClB,OAAgB,EAChB,aAAsB;IAEtB,MAAM,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAA;IAC3C,MAAM,eAAe,GAAG,EAAE,GAAG,QAAQ,EAAE,CAAA;IAEvC,IAAI,aAAa,IAAI,WAAW,EAAE;QAChC,MAAM,IAAI,GAAG,CAAC,MAAM,WAAW,CAAC,WAAW,EAAE,CAAC,aAAa,CAAC,CAAC,IAAI,EAAE,CAAA;QACnE,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,OAAO,CAAC,CAAA;QACtD,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,KAAK,CAAC,CAAA;QAClD,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC,aAAa,CAAC,CAAA;QAEvD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C,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAA;aAC/D;SACF;KACF;SAAM;QACL,+GAA+G;QAC/G,KAAK,MAAM,SAAS,IAAI,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,EAAE,EAAE;YACnE,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC,CAAA;SACtE;KACF;IAED,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;IACpD,OAAO,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAe,CAAA;AAC/C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build-info",
|
|
3
|
-
"version": "7.4.
|
|
3
|
+
"version": "7.4.3",
|
|
4
4
|
"description": "Build info utility",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
|
+
"types": "./lib/index.d.ts",
|
|
8
9
|
"import": "./lib/index.js",
|
|
9
|
-
"
|
|
10
|
-
"
|
|
10
|
+
"browser": "./lib/index.js",
|
|
11
|
+
"default": "./lib/index.js"
|
|
11
12
|
},
|
|
12
13
|
"./node": {
|
|
14
|
+
"types": "./lib/node/index.d.ts",
|
|
13
15
|
"import": "./lib/node/index.js",
|
|
14
|
-
"default": "./lib/node/index.js"
|
|
15
|
-
"types": "./lib/node/index.d.ts"
|
|
16
|
+
"default": "./lib/node/index.js"
|
|
16
17
|
}
|
|
17
18
|
},
|
|
18
|
-
"browser": "./lib/index.js",
|
|
19
19
|
"main": "./lib/index.js",
|
|
20
20
|
"types": "./lib/index.d.ts",
|
|
21
21
|
"bin": {
|
|
@@ -46,7 +46,6 @@
|
|
|
46
46
|
"author": "Netlify Inc.",
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@bugsnag/js": "^7.20.0",
|
|
49
|
-
"@netlify/framework-info": "^9.8.10",
|
|
50
49
|
"dot-prop": "^7.2.0",
|
|
51
50
|
"find-up": "^6.3.0",
|
|
52
51
|
"minimatch": "^9.0.0",
|
|
@@ -59,7 +58,7 @@
|
|
|
59
58
|
"devDependencies": {
|
|
60
59
|
"@bugsnag/source-maps": "^2.3.1",
|
|
61
60
|
"@playwright/test": "^1.30.0",
|
|
62
|
-
"@types/node": "^18.
|
|
61
|
+
"@types/node": "^14.18.53",
|
|
63
62
|
"@types/semver": "^7.3.13",
|
|
64
63
|
"@vitest/coverage-c8": "^0.30.1",
|
|
65
64
|
"@vitest/ui": "^0.30.1",
|
|
@@ -74,5 +73,5 @@
|
|
|
74
73
|
"engines": {
|
|
75
74
|
"node": "^14.16.0 || >=16.0.0"
|
|
76
75
|
},
|
|
77
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "cb267888c86d49df78734852c6ce42f8b306ed66"
|
|
78
77
|
}
|