Skip to content

Commit df8af16

Browse files
authored
Merge branch 'main' into CDTOOL-1017
2 parents 142da1f + d8c01ef commit df8af16

12 files changed

Lines changed: 108 additions & 54 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
### Change summary
2+
3+
<!--
4+
Briefly describe the changes introduced in this pull request. Include context or
5+
reasoning behind the changes, even if they seem minor. If relevant, link to any
6+
related discussions (e.g. Slack threads, tickets, documents).
7+
-->
8+
19
All Submissions:
210

311
* [ ] Have you followed the guidelines in our Contributing document?
@@ -11,7 +19,6 @@
1119

1220
### Changes to Core Features:
1321

14-
* [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
1522
* [ ] Have you written new tests for your core changes, as applicable?
1623
* [ ] Have you successfully run tests with your changes locally?
1724

@@ -21,4 +28,4 @@
2128

2229
### Are there any considerations that need to be addressed for release?
2330

24-
<!-- Any breaking changes, etc -->
31+
<!-- Any breaking changes, etc -->

.github/workflows/merge_to_main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ jobs:
1616
- name: "Checkout code"
1717
uses: actions/checkout@v5
1818
- name: "Install Node"
19-
uses: actions/setup-node@v4
19+
uses: actions/setup-node@v5
2020
with:
2121
node-version: 18
2222
- name: "Install Rust"
2323
uses: dtolnay/rust-toolchain@1.83.0 # to install tq via `make config`
2424
- name: Install Go
25-
uses: actions/setup-go@v5
25+
uses: actions/setup-go@v6
2626
with:
2727
go-version: 1.24.x
2828
- name: "Install dependencies"

.github/workflows/pr_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
- name: "Install Rust"
4343
uses: dtolnay/rust-toolchain@stable
4444
- name: Install Go
45-
uses: actions/setup-go@v5
45+
uses: actions/setup-go@v6
4646
with:
4747
go-version: 1.24.x
4848
- name: "Install dependencies"
@@ -72,7 +72,7 @@ jobs:
7272
- name: "Checkout code"
7373
uses: actions/checkout@v5
7474
- name: "Install Go"
75-
uses: actions/setup-go@v5
75+
uses: actions/setup-go@v6
7676
with:
7777
go-version: ${{ matrix.go-version }}
7878
# IMPORTANT: Disable caching to prevent cache restore errors later.
@@ -88,7 +88,7 @@ jobs:
8888
run: rustup show && rustup target list --installed --toolchain stable
8989
shell: bash
9090
- name: "Install Node"
91-
uses: actions/setup-node@v4
91+
uses: actions/setup-node@v5
9292
with:
9393
node-version: ${{ matrix.node-version }}
9494
- name: "Config Artifact"

.github/workflows/publish_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: "Fetch unshallow repo"
1414
run: git fetch --prune --unshallow
1515
- name: Set up Node.js
16-
uses: actions/setup-node@v4
16+
uses: actions/setup-node@v5
1717
with:
1818
node-version: 'lts/*'
1919
registry-url: 'https://registry.npmjs.org'

.github/workflows/tag_to_draft_release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- name: "Fetch unshallow repo"
1414
run: git fetch --prune --unshallow
1515
- name: "Install Go"
16-
uses: actions/setup-go@v5
16+
uses: actions/setup-go@v6
1717
with:
1818
go-version: '1.24.x'
1919
- name: "Install Rust"

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,24 @@
1515

1616
### Bug fixes:
1717

18+
- fix(manifest): Ensure pushpin section is persisted during manifest file update ([#1535](https://github.com/fastly/cli/pull/1535))
19+
1820
### Dependencies:
1921
- build(deps): `github.com/ulikunitz/xz` from 0.5.12 to 0.5.13 ([#1524](https://github.com/fastly/cli/pull/1524))
2022
- build(deps): `github.com/stretchr/testify` from 1.10.0 to 1.11.0 ([#1527](https://github.com/fastly/cli/pull/1527))
2123
- build(deps): `github.com/ulikunitz/xz` from 0.5.13 to 0.5.14 ([#1528](https://github.com/fastly/cli/pull/1528))
2224
- build(deps): `github.com/stretchr/testify` from 1.11.0 to 1.11.1 ([#1530](https://github.com/fastly/cli/pull/1530))
2325
- build(deps): `github.com/ulikunitz/xz` from 0.5.14 to 0.5.15 ([#1530](https://github.com/fastly/cli/pull/1530))
26+
- build(deps): `actions/setup-node` from 4 to 5 ([#1534](https://github.com/fastly/cli/pull/1534))
27+
- build(deps): `actions/setup-go` from 5 to 6 ([#1534](https://github.com/fastly/cli/pull/1534))
28+
- build(deps): `golang.org/x/sys` from 0.35.0 to 0.36.0 ([#1533](https://github.com/fastly/cli/pull/1533))
29+
- build(deps): `golang.org/x/term` from 0.34.0 to 0.35.0 ([#1533](https://github.com/fastly/cli/pull/1533))
30+
- build(deps): `github.com/fastly/go-fastly/v11` from 11.3.0 to 11.3.1 ([#1533](https://github.com/fastly/cli/pull/1533))
31+
- build(deps): `golang.org/x/crypto` from 0.41.0 to 0.42.0 ([#1533](https://github.com/fastly/cli/pull/1533))
32+
- build(deps): `golang.org/x/mod` from 0.27.0 to 0.28.0 ([#1533](https://github.com/fastly/cli/pull/1533))
33+
- build(deps): `golang.org/x/oauth2` from 0.30.0 to 0.31.0 ([#1533](https://github.com/fastly/cli/pull/1533))
34+
- build(deps): `golang.org/x/sync` from 0.16.0 to 0.17.0 ([#1533](https://github.com/fastly/cli/pull/1533))
35+
- build(deps): `golang.org/x/text` from 0.28.0 to 0.29.0 ([#1533](https://github.com/fastly/cli/pull/1533))
2436

2537
## [v11.5.0](https://github.com/fastly/cli/releases/tag/v11.5.0) (2025-08-20)
2638

go.mod

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ require (
2222
github.com/pelletier/go-toml v1.9.5
2323
github.com/segmentio/textio v1.2.0
2424
github.com/tomnomnom/linkheader v0.0.0-20180905144013-02ca5825eb80
25-
golang.org/x/sys v0.35.0 // indirect
26-
golang.org/x/term v0.34.0
25+
golang.org/x/sys v0.36.0 // indirect
26+
golang.org/x/term v0.35.0
2727
)
2828

2929
require (
30-
github.com/fastly/go-fastly/v11 v11.3.0
30+
github.com/fastly/go-fastly/v11 v11.3.1
3131
github.com/hashicorp/cap v0.10.0
3232
github.com/kennygrant/sanitize v1.2.4
3333
github.com/otiai10/copy v1.14.1
3434
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
3535
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
3636
github.com/theckman/yacspin v0.13.12
37-
golang.org/x/crypto v0.41.0
37+
golang.org/x/crypto v0.42.0
3838
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0
39-
golang.org/x/mod v0.27.0
39+
golang.org/x/mod v0.28.0
4040
)
4141

4242
require (
@@ -73,9 +73,9 @@ require (
7373
github.com/ulikunitz/xz v0.5.15 // indirect
7474
github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect
7575
golang.org/x/net v0.43.0 // indirect
76-
golang.org/x/oauth2 v0.30.0 // indirect
77-
golang.org/x/sync v0.16.0 // indirect
78-
golang.org/x/text v0.28.0
76+
golang.org/x/oauth2 v0.31.0 // indirect
77+
golang.org/x/sync v0.17.0 // indirect
78+
golang.org/x/text v0.29.0
7979
gopkg.in/yaml.v2 v2.4.0 // indirect
8080
gopkg.in/yaml.v3 v3.0.1 // indirect
8181
)

go.sum

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5/go.mod h1:qssHWj6
2525
github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY=
2626
github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0 h1:aYo8nnk3ojoQkP5iErif5Xxv0Mo0Ga/FR5+ffl/7+Nk=
2727
github.com/dustinkirkland/golang-petname v0.0.0-20240428194347-eebcea082ee0/go.mod h1:8AuBTZBRSFqEYBPYULd+NN474/zZBLP+6WeT5S9xlAc=
28-
github.com/fastly/go-fastly/v11 v11.3.0 h1:S0Md/3Tkja+H1X+hBnlQUiCet0N9XB2YzSVtVcNjwPc=
29-
github.com/fastly/go-fastly/v11 v11.3.0/go.mod h1:yv1Tvz457kNCxyNaPi3J8Z3xUxeU8m1XN7O4a8OFLgc=
28+
github.com/fastly/go-fastly/v11 v11.3.1 h1:GiBDf9k1Xh5yT1hAD64EC8WDiBScDETNh1gfDP0gCaA=
29+
github.com/fastly/go-fastly/v11 v11.3.1/go.mod h1:sphV7DVAKUZT30O1h9m9Lw9DbB0kC3CnQUOhVI3gaeo=
3030
github.com/fastly/kingpin v2.1.12-0.20191105091915-95d230a53780+incompatible h1:FhrXlfhgGCS+uc6YwyiFUt04alnjpoX7vgDKJxS6Qbk=
3131
github.com/fastly/kingpin v2.1.12-0.20191105091915-95d230a53780+incompatible/go.mod h1:U8UynVoU1SQaqD2I4ZqgYd5lx3A1ipQYn4aSt2Y5h6c=
3232
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
@@ -156,28 +156,28 @@ github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5t
156156
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
157157
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
158158
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
159-
golang.org/x/crypto v0.41.0 h1:WKYxWedPGCTVVl5+WHSSrOBT0O8lx32+zxmHxijgXp4=
160-
golang.org/x/crypto v0.41.0/go.mod h1:pO5AFd7FA68rFak7rOAGVuygIISepHftHnr8dr6+sUc=
159+
golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
160+
golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
161161
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 h1:R84qjqJb5nVJMxqWYb3np9L5ZsaDtB+a39EqjV0JSUM=
162162
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0/go.mod h1:S9Xr4PYopiDyqSyp5NjCrhFrqg6A5zA2E/iPHPhqnS8=
163163
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
164164
golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
165-
golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ=
166-
golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc=
165+
golang.org/x/mod v0.28.0 h1:gQBtGhjxykdjY9YhZpSlZIsbnaE2+PgjfLWUQTnoZ1U=
166+
golang.org/x/mod v0.28.0/go.mod h1:yfB/L0NOf/kmEbXjzCPOx1iK1fRutOydrCMsqRhEBxI=
167167
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
168168
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
169169
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
170170
golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
171171
golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
172172
golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
173173
golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
174-
golang.org/x/oauth2 v0.30.0 h1:dnDm7JmhM45NNpd8FDDeLhK6FwqbOf4MLCM9zb1BOHI=
175-
golang.org/x/oauth2 v0.30.0/go.mod h1:B++QgG3ZKulg6sRPGD/mqlHQs5rB3Ml9erfeDY7xKlU=
174+
golang.org/x/oauth2 v0.31.0 h1:8Fq0yVZLh4j4YA47vHKFTa9Ew5XIrCP8LC6UeNZnLxo=
175+
golang.org/x/oauth2 v0.31.0/go.mod h1:lzm5WQJQwKZ3nwavOZ3IS5Aulzxi68dUSgRHujetwEA=
176176
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
177177
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
178178
golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
179-
golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw=
180-
golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA=
179+
golang.org/x/sync v0.17.0 h1:l60nONMj9l5drqw6jlhIELNv9I0A4OFgRsG9k2oT9Ug=
180+
golang.org/x/sync v0.17.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
181181
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
182182
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
183183
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -192,23 +192,23 @@ golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
192192
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
193193
golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
194194
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
195-
golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI=
196-
golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k=
195+
golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
196+
golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
197197
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
198198
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
199199
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
200200
golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
201201
golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
202-
golang.org/x/term v0.34.0 h1:O/2T7POpk0ZZ7MAzMeWFSg6S5IpWd/RXDlM9hgM3DR4=
203-
golang.org/x/term v0.34.0/go.mod h1:5jC53AEywhIVebHgPVeg0mj8OD3VO9OzclacVrqpaAw=
202+
golang.org/x/term v0.35.0 h1:bZBVKBudEyhRcajGcNc3jIfWPqV4y/Kt2XcoigOWtDQ=
203+
golang.org/x/term v0.35.0/go.mod h1:TPGtkTLesOwf2DE8CgVYiZinHAOuy5AYUYT1lENIZnA=
204204
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
205205
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
206206
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
207207
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
208208
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
209209
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
210-
golang.org/x/text v0.28.0 h1:rhazDwis8INMIwQ4tpjLDzUhx6RlXqZNPEM0huQojng=
211-
golang.org/x/text v0.28.0/go.mod h1:U8nCwOR8jO/marOQ0QbDiOngZVEBB7MAiitBuMjXiNU=
210+
golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
211+
golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
212212
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
213213
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
214214
golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=

pkg/commands/compute/serve.go

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,10 @@ func (c *ServeCommand) Exec(in io.Reader, out io.Writer) (err error) {
215215
return err
216216
}
217217

218-
enablePushpin := c.enablePushpin || c.Globals.Manifest.File.LocalServer.Pushpin.EnablePushpin
218+
enablePushpin := c.enablePushpin ||
219+
(c.Globals.Manifest.File.LocalServer.Pushpin != nil &&
220+
c.Globals.Manifest.File.LocalServer.Pushpin.EnablePushpin != nil &&
221+
*c.Globals.Manifest.File.LocalServer.Pushpin.EnablePushpin)
219222
var pushpinCtx pushpinContext
220223
if enablePushpin {
221224
// The function checks for nil, so the semgrep warning is falsely triggered
@@ -607,12 +610,15 @@ func (c *ServeCommand) GetPushpinProxyPort(out io.Writer) (uint16, error) {
607610
return pushpinProxyPort, nil
608611
}
609612

610-
pushpinProxyPort = c.Globals.Manifest.File.LocalServer.Pushpin.PushpinProxyPort
611-
if pushpinProxyPort != 0 {
612-
if c.Globals.Verbose() {
613-
text.Info(out, "Using Pushpin proxy port via `local_server.pushpin.proxy_port` setting: %d", pushpinProxyPort)
613+
if c.Globals.Manifest.File.LocalServer.Pushpin != nil &&
614+
c.Globals.Manifest.File.LocalServer.Pushpin.PushpinProxyPort != nil {
615+
pushpinProxyPort = *c.Globals.Manifest.File.LocalServer.Pushpin.PushpinProxyPort
616+
if pushpinProxyPort != 0 {
617+
if c.Globals.Verbose() {
618+
text.Info(out, "Using Pushpin proxy port via `local_server.pushpin.proxy_port` setting: %d", pushpinProxyPort)
619+
}
620+
return pushpinProxyPort, nil
614621
}
615-
return pushpinProxyPort, nil
616622
}
617623

618624
pushpinProxyPort = 7677
@@ -647,12 +653,15 @@ func (c *ServeCommand) GetPushpinPublishPort(out io.Writer) (uint16, error) {
647653
return pushpinPublishPort, nil
648654
}
649655

650-
pushpinPublishPort = c.Globals.Manifest.File.LocalServer.Pushpin.PushpinPublishPort
651-
if pushpinPublishPort != 0 {
652-
if c.Globals.Verbose() {
653-
text.Info(out, "Using Pushpin publish handler port via `local_server.pushpin.publish_port` setting: %d", pushpinPublishPort)
656+
if c.Globals.Manifest.File.LocalServer.Pushpin != nil &&
657+
c.Globals.Manifest.File.LocalServer.Pushpin.PushpinPublishPort != nil {
658+
pushpinPublishPort = *c.Globals.Manifest.File.LocalServer.Pushpin.PushpinPublishPort
659+
if pushpinPublishPort != 0 {
660+
if c.Globals.Verbose() {
661+
text.Info(out, "Using Pushpin publish handler port via `local_server.pushpin.publish_port` setting: %d", pushpinPublishPort)
662+
}
663+
return pushpinPublishPort, nil
654664
}
655-
return pushpinPublishPort, nil
656665
}
657666

658667
pushpinPublishPort = 5561
@@ -676,12 +685,15 @@ func (c *ServeCommand) GetPushpinRunner(out io.Writer) (bin string, err error) {
676685
return filepath.Abs(pushpinRunnerBinPath)
677686
}
678687

679-
pushpinRunnerBinPath = c.Globals.Manifest.File.LocalServer.Pushpin.PushpinPath
680-
if pushpinRunnerBinPath != "" {
681-
if c.Globals.Verbose() {
682-
text.Info(out, "Using user provided install of Pushpin runner via `local_server.pushpin.pushpin_path` setting: %s", pushpinRunnerBinPath)
688+
if c.Globals.Manifest.File.LocalServer.Pushpin != nil &&
689+
c.Globals.Manifest.File.LocalServer.Pushpin.PushpinPath != nil {
690+
pushpinRunnerBinPath = *c.Globals.Manifest.File.LocalServer.Pushpin.PushpinPath
691+
if pushpinRunnerBinPath != "" {
692+
if c.Globals.Verbose() {
693+
text.Info(out, "Using user provided install of Pushpin runner via `local_server.pushpin.pushpin_path` setting: %s", pushpinRunnerBinPath)
694+
}
695+
return filepath.Abs(pushpinRunnerBinPath)
683696
}
684-
return filepath.Abs(pushpinRunnerBinPath)
685697
}
686698

687699
if c.Globals.Verbose() {

pkg/manifest/file.go

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,23 @@ func (f *File) MarshalTOML() ([]byte, error) {
9292
localServer["kv_stores"] = kvStores
9393
}
9494

95+
if f.LocalServer.Pushpin != nil {
96+
pushpin := make(map[string]any)
97+
if f.LocalServer.Pushpin.EnablePushpin != nil {
98+
pushpin["enable"] = *f.LocalServer.Pushpin.EnablePushpin
99+
}
100+
if f.LocalServer.Pushpin.PushpinPath != nil {
101+
pushpin["pushpin_path"] = *f.LocalServer.Pushpin.PushpinPath
102+
}
103+
if f.LocalServer.Pushpin.PushpinProxyPort != nil {
104+
pushpin["proxy_port"] = *f.LocalServer.Pushpin.PushpinProxyPort
105+
}
106+
if f.LocalServer.Pushpin.PushpinPublishPort != nil {
107+
pushpin["publish_port"] = *f.LocalServer.Pushpin.PushpinPublishPort
108+
}
109+
localServer["pushpin"] = pushpin
110+
}
111+
95112
if f.LocalServer.SecretStores != nil {
96113
secretStores := make(map[string]any)
97114
for key, entry := range f.LocalServer.SecretStores {

0 commit comments

Comments
 (0)