@nx-extend/vercel 4.1.0 → 4.2.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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
# [4.2.0](https://github.com/TriPSs/nx-extend/compare/vercel@4.1.0...vercel@4.2.0) (2023-07-22)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **vercel:** Fixed deployment url not being written to summary ([c7814c6](https://github.com/TriPSs/nx-extend/commit/c7814c687b856264c77b4fdd64be0ebe61ec038a))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* **vercel:** When running in Github set url as output ([138fa4e](https://github.com/TriPSs/nx-extend/commit/138fa4e7fd442ca12e7801310e1d6cb07a082685))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
5
19
|
# [4.1.0](https://github.com/TriPSs/nx-extend/compare/vercel@4.0.0...vercel@4.1.0) (2023-06-22)
|
|
6
20
|
|
|
7
21
|
|
package/README.md
CHANGED
|
@@ -34,3 +34,17 @@ npm install -D @nx-extend/vercel
|
|
|
34
34
|
|---------------|-----------|---------|--------------------------|
|
|
35
35
|
| **`--debug`** | `boolean` | `false` | Run Vercel in debug mode |
|
|
36
36
|
|
|
37
|
+
## How to create a Vercel project through the CLI
|
|
38
|
+
|
|
39
|
+
To create a new Vercel project run the following commands:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Make sure you are in the right org
|
|
43
|
+
npx vercel teams list
|
|
44
|
+
# If needed, switch to correct team
|
|
45
|
+
npx vercel teams switch <team-id>
|
|
46
|
+
# Create the project
|
|
47
|
+
npx vercel project add <my-project>
|
|
48
|
+
# Go to the Vercel dashboard, <my-project> > settings > Project ID
|
|
49
|
+
```
|
|
50
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx-extend/vercel",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"nx",
|
|
6
6
|
"vercel"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"@actions/core": "^1.10.0",
|
|
22
22
|
"@nx/devkit": "16.3.2",
|
|
23
23
|
"shelljs": "^0.8.5",
|
|
24
|
-
"@nx-extend/core": "4.
|
|
24
|
+
"@nx-extend/core": "4.3.0",
|
|
25
25
|
"tslib": "2.5.3"
|
|
26
26
|
},
|
|
27
27
|
"types": "./src/index.d.ts"
|
|
@@ -36,7 +36,10 @@ function deployExecutor(options, context) {
|
|
|
36
36
|
const url = parts.find((part) => part.trim().startsWith('https://') &&
|
|
37
37
|
part.trim().endsWith('.vercel.app'));
|
|
38
38
|
if (url) {
|
|
39
|
-
githubCore.summary
|
|
39
|
+
yield githubCore.summary
|
|
40
|
+
.addLink('Vercel URL', url.trim())
|
|
41
|
+
.write();
|
|
42
|
+
yield githubCore.setOutput('url', url);
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
return { success };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.impl.js","sourceRoot":"","sources":["../../../../../../packages/vercel/src/executors/deploy/deploy.impl.ts"],"names":[],"mappings":";;;;AAAA,4CAA2C;
|
|
1
|
+
{"version":3,"file":"deploy.impl.js","sourceRoot":"","sources":["../../../../../../packages/vercel/src/executors/deploy/deploy.impl.ts"],"names":[],"mappings":";;;;AAAA,4CAA2C;AAE3C,0CAA2D;AAC3D,2BAA+B;AAC/B,+BAA2B;AAI3B,2DAAqD;AACrD,2DAAsD;AAOtD,SAAsB,cAAc,CAClC,OAAsB,EACtB,OAAwB;;;QAExB,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC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AAG,KAAK,CAAC,IAAI,CACpB,CAAC,IAAI,EAAE,EAAE,CACP,IAAI,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC;gBAClC,IAAI,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,aAAa,CAAC,CACtC,CAAA;YAED,IAAI,GAAG,EAAE;gBACP,MAAM,UAAU,CAAC,OAAO;qBACrB,OAAO,CAAC,YAAY,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC;qBACjC,KAAK,EAAE,CAAA;gBAEV,MAAM,UAAU,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;aACvC;SACF;QAED,OAAO,EAAE,OAAO,EAAE,CAAA;;CACnB;AAtDD,wCAsDC;AAED,kBAAe,cAAc,CAAA"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as githubCore from '@actions/core'
|
|
2
|
+
import { setOutput } from '@actions/core'
|
|
2
3
|
import { buildCommand, execCommand } from '@nx-extend/core'
|
|
3
4
|
import { existsSync } from 'fs'
|
|
4
5
|
import { join } from 'path'
|
|
@@ -22,18 +23,13 @@ export async function deployExecutor(
|
|
|
22
23
|
const vercelBuildTarget = Object.keys(targets).find(
|
|
23
24
|
(target) => targets[target].executor === '@nx-extend/vercel:build'
|
|
24
25
|
)
|
|
25
|
-
const buildTarget =
|
|
26
|
-
targets[vercelBuildTarget]?.options?.buildTarget || 'build-next'
|
|
26
|
+
const buildTarget = targets[vercelBuildTarget]?.options?.buildTarget || 'build-next'
|
|
27
27
|
|
|
28
28
|
if (!targets[buildTarget]?.options?.outputPath) {
|
|
29
29
|
throw new Error(`"${buildTarget}" target has no "outputPath" configured!`)
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
if (
|
|
33
|
-
!existsSync(
|
|
34
|
-
join(targets[buildTarget].options.outputPath, '.vercel/project.json')
|
|
35
|
-
)
|
|
36
|
-
) {
|
|
32
|
+
if (!existsSync(join(targets[buildTarget].options.outputPath, '.vercel/project.json'))) {
|
|
37
33
|
throw new Error('No ".vercel/project.json" found in dist folder! ')
|
|
38
34
|
}
|
|
39
35
|
|
|
@@ -63,7 +59,11 @@ export async function deployExecutor(
|
|
|
63
59
|
)
|
|
64
60
|
|
|
65
61
|
if (url) {
|
|
66
|
-
githubCore.summary
|
|
62
|
+
await githubCore.summary
|
|
63
|
+
.addLink('Vercel URL', url.trim())
|
|
64
|
+
.write()
|
|
65
|
+
|
|
66
|
+
await githubCore.setOutput('url', url)
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
|