@nx-extend/vercel 1.1.0 → 1.1.1
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/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
|
|
2
|
+
## [1.1.1](https://github.com/TriPSs/nx-extend/compare/vercel@1.1.0...vercel@1.1.1) (2022-09-05)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* **vercel:** Fixed pull command overwriting the project settings ([4bdfa01](https://github.com/TriPSs/nx-extend/commit/4bdfa0147a8c95afdb2f1c89bc89445ef616c73b))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
2
11
|
# [1.1.0](https://github.com/TriPSs/nx-extend/compare/vercel@1.0.0...vercel@1.1.0) (2022-09-05)
|
|
3
12
|
|
|
4
13
|
|
package/package.json
CHANGED
|
@@ -14,19 +14,9 @@ function buildExecutor(options, context) {
|
|
|
14
14
|
}
|
|
15
15
|
// First make sure the .vercel/project.json exists
|
|
16
16
|
(0, devkit_1.writeJsonFile)('./.vercel/project.json', {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
'createdAt': new Date().getTime(),
|
|
21
|
-
'framework': 'nextjs',
|
|
22
|
-
'devCommand': null,
|
|
23
|
-
'installCommand': 'echo \'\'',
|
|
24
|
-
'buildCommand': `nx build-next ${context.projectName} --prod`,
|
|
25
|
-
'outputDirectory': `${(_d = (_c = targets['build-next']) === null || _c === void 0 ? void 0 : _c.options) === null || _d === void 0 ? void 0 : _d.outputPath}/.next`,
|
|
26
|
-
'rootDirectory': null,
|
|
27
|
-
'directoryListing': false,
|
|
28
|
-
'nodeVersion': '16.x'
|
|
29
|
-
}
|
|
17
|
+
projectId: options.projectId,
|
|
18
|
+
orgId: options.orgId,
|
|
19
|
+
settings: {}
|
|
30
20
|
});
|
|
31
21
|
// Pull latest
|
|
32
22
|
(0, core_1.execCommand)((0, core_1.buildCommand)([
|
|
@@ -34,6 +24,22 @@ function buildExecutor(options, context) {
|
|
|
34
24
|
context.configurationName === 'production' && '--environment=production',
|
|
35
25
|
options.debug && '--debug'
|
|
36
26
|
]));
|
|
27
|
+
// Update the project json with the correct settings
|
|
28
|
+
(0, devkit_1.writeJsonFile)('./.vercel/project.json', {
|
|
29
|
+
projectId: options.projectId,
|
|
30
|
+
orgId: options.orgId,
|
|
31
|
+
settings: {
|
|
32
|
+
createdAt: new Date().getTime(),
|
|
33
|
+
framework: 'nextjs',
|
|
34
|
+
devCommand: null,
|
|
35
|
+
installCommand: 'echo \'\'',
|
|
36
|
+
buildCommand: `nx build-next ${context.projectName} --prod`,
|
|
37
|
+
outputDirectory: `${(_d = (_c = targets['build-next']) === null || _c === void 0 ? void 0 : _c.options) === null || _d === void 0 ? void 0 : _d.outputPath}/.next`,
|
|
38
|
+
rootDirectory: null,
|
|
39
|
+
directoryListing: false,
|
|
40
|
+
nodeVersion: '16.x'
|
|
41
|
+
}
|
|
42
|
+
});
|
|
37
43
|
const { success } = (0, core_1.execCommand)((0, core_1.buildCommand)([
|
|
38
44
|
'npx vercel build',
|
|
39
45
|
`--output ${(_f = (_e = targets['build-next']) === null || _e === void 0 ? void 0 : _e.options) === null || _f === void 0 ? void 0 : _f.outputPath}/.vercel/output`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.impl.js","sourceRoot":"","sources":["../../../../../../packages/vercel/src/executors/build/build.impl.ts"],"names":[],"mappings":";;;AAAA,yCAA0D;AAC1D,0CAA2D;AAU3D,SAAgB,aAAa,CAC3B,OAAuB,EACvB,OAAwB;;IAExB,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;IAEnE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;QAC1B,MAAM,IAAI,KAAK,CAAC,IAAI,OAAO,CAAC,WAAW,gDAAgD,CAAC,CAAA;KACzF;IAED,IAAI,CAAC,CAAA,MAAA,MAAA,OAAO,CAAC,YAAY,CAAC,0CAAE,OAAO,0CAAE,UAAU,CAAA,EAAE;QAC/C,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAA;KACvE;IAED,kDAAkD;IAClD,IAAA,sBAAa,EAAC,wBAAwB,EAAE;QACtC,
|
|
1
|
+
{"version":3,"file":"build.impl.js","sourceRoot":"","sources":["../../../../../../packages/vercel/src/executors/build/build.impl.ts"],"names":[],"mappings":";;;AAAA,yCAA0D;AAC1D,0CAA2D;AAU3D,SAAgB,aAAa,CAC3B,OAAuB,EACvB,OAAwB;;IAExB,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAA;IAEnE,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;QAC1B,MAAM,IAAI,KAAK,CAAC,IAAI,OAAO,CAAC,WAAW,gDAAgD,CAAC,CAAA;KACzF;IAED,IAAI,CAAC,CAAA,MAAA,MAAA,OAAO,CAAC,YAAY,CAAC,0CAAE,OAAO,0CAAE,UAAU,CAAA,EAAE;QAC/C,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAA;KACvE;IAED,kDAAkD;IAClD,IAAA,sBAAa,EAAC,wBAAwB,EAAE;QACtC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,QAAQ,EAAE,EAAE;KACb,CAAC,CAAA;IAEF,cAAc;IACd,IAAA,kBAAW,EAAC,IAAA,mBAAY,EAAC;QACvB,uBAAuB;QACvB,OAAO,CAAC,iBAAiB,KAAK,YAAY,IAAI,0BAA0B;QAExE,OAAO,CAAC,KAAK,IAAI,SAAS;KAC3B,CAAC,CAAC,CAAA;IAEH,oDAAoD;IACpD,IAAA,sBAAa,EAAC,wBAAwB,EAAE;QACtC,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,QAAQ,EAAE;YACR,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE;YAC/B,SAAS,EAAE,QAAQ;YACnB,UAAU,EAAE,IAAI;YAChB,cAAc,EAAE,WAAW;YAC3B,YAAY,EAAE,iBAAiB,OAAO,CAAC,WAAW,SAAS;YAC3D,eAAe,EAAE,GAAG,MAAA,MAAA,OAAO,CAAC,YAAY,CAAC,0CAAE,OAAO,0CAAE,UAAU,QAAQ;YACtE,aAAa,EAAE,IAAI;YACnB,gBAAgB,EAAE,KAAK;YACvB,WAAW,EAAE,MAAM;SACpB;KACF,CAAC,CAAA;IAEF,MAAM,EAAE,OAAO,EAAE,GAAG,IAAA,kBAAW,EAAC,IAAA,mBAAY,EAAC;QAC3C,kBAAkB;QAClB,YAAY,MAAA,MAAA,OAAO,CAAC,YAAY,CAAC,0CAAE,OAAO,0CAAE,UAAU,iBAAiB;QAEvE,OAAO,CAAC,KAAK,IAAI,SAAS;KAC3B,CAAC,CAAC,CAAA;IAEH,IAAI,OAAO,EAAE;QACX,IAAA,sBAAa,EAAC,GAAG,MAAA,MAAA,OAAO,CAAC,YAAY,CAAC,0CAAE,OAAO,0CAAE,UAAU,uBAAuB,EAAE,IAAA,qBAAY,EAAC,wBAAwB,CAAC,CAAC,CAAA;KAC5H;IAED,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;AACrC,CAAC;AA1DD,sCA0DC;AAED,kBAAe,aAAa,CAAA"}
|
|
@@ -25,19 +25,9 @@ export function buildExecutor(
|
|
|
25
25
|
|
|
26
26
|
// First make sure the .vercel/project.json exists
|
|
27
27
|
writeJsonFile('./.vercel/project.json', {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
'createdAt': new Date().getTime(),
|
|
32
|
-
'framework': 'nextjs',
|
|
33
|
-
'devCommand': null,
|
|
34
|
-
'installCommand': 'echo \'\'',
|
|
35
|
-
'buildCommand': `nx build-next ${context.projectName} --prod`,
|
|
36
|
-
'outputDirectory': `${targets['build-next']?.options?.outputPath}/.next`,
|
|
37
|
-
'rootDirectory': null,
|
|
38
|
-
'directoryListing': false,
|
|
39
|
-
'nodeVersion': '16.x'
|
|
40
|
-
}
|
|
28
|
+
projectId: options.projectId,
|
|
29
|
+
orgId: options.orgId,
|
|
30
|
+
settings: {}
|
|
41
31
|
})
|
|
42
32
|
|
|
43
33
|
// Pull latest
|
|
@@ -48,6 +38,23 @@ export function buildExecutor(
|
|
|
48
38
|
options.debug && '--debug'
|
|
49
39
|
]))
|
|
50
40
|
|
|
41
|
+
// Update the project json with the correct settings
|
|
42
|
+
writeJsonFile('./.vercel/project.json', {
|
|
43
|
+
projectId: options.projectId,
|
|
44
|
+
orgId: options.orgId,
|
|
45
|
+
settings: {
|
|
46
|
+
createdAt: new Date().getTime(),
|
|
47
|
+
framework: 'nextjs',
|
|
48
|
+
devCommand: null,
|
|
49
|
+
installCommand: 'echo \'\'',
|
|
50
|
+
buildCommand: `nx build-next ${context.projectName} --prod`,
|
|
51
|
+
outputDirectory: `${targets['build-next']?.options?.outputPath}/.next`,
|
|
52
|
+
rootDirectory: null,
|
|
53
|
+
directoryListing: false,
|
|
54
|
+
nodeVersion: '16.x'
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
|
|
51
58
|
const { success } = execCommand(buildCommand([
|
|
52
59
|
'npx vercel build',
|
|
53
60
|
`--output ${targets['build-next']?.options?.outputPath}/.vercel/output`,
|