@stacksjs/defaults 0.72.92 → 0.72.94

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.
@@ -2,7 +2,7 @@
2
2
  "publisher": "Stacks",
3
3
  "name": "vscode-stacks",
4
4
  "displayName": "Stacks",
5
- "version": "0.72.92",
5
+ "version": "0.72.94",
6
6
  "description": "A modern Stacks development environment.",
7
7
  "license": "MIT",
8
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@stacksjs/defaults",
3
3
  "type": "module",
4
4
  "sideEffects": false,
5
- "version": "0.72.92",
5
+ "version": "0.72.94",
6
6
  "repository": {
7
7
  "type": "git",
8
8
  "url": "git+https://github.com/stacksjs/stacks.git",
@@ -51,7 +51,7 @@
51
51
  "dependencies": {
52
52
  "@iconify-json/f7": "^1.2.2",
53
53
  "@iconify-json/hugeicons": "^1.2.27",
54
- "@stacksjs/mobile": "^0.72.92",
54
+ "@stacksjs/mobile": "^0.72.94",
55
55
  "@stacksjs/sanitizer": "^0.2.113"
56
56
  },
57
57
  "scripts": {
@@ -122,87 +122,3 @@ jobs:
122
122
 
123
123
  - name: Test Suite
124
124
  run: bun run test
125
-
126
- # Push to deploy: `buddy deploy` on every green push to main.
127
- #
128
- # A fresh app has nothing to deploy to, and red CI on day one is worse than
129
- # no deploy, so this checks for its secrets first and finishes green with a
130
- # notice when they are missing. Add them under
131
- # Settings > Secrets and variables > Actions to turn it on:
132
- #
133
- # DOTENV_PRIVATE_KEY_PRODUCTION decrypts .env.production for the deploy
134
- # DEPLOY_SSH_KEY private key for the target server
135
- #
136
- # Cloud tokens are optional. Without them the release still ships and DNS is
137
- # still published; only the provider-specific parts are skipped.
138
- deploy:
139
- if: >-
140
- github.event_name == 'workflow_dispatch' ||
141
- (github.event_name == 'push' && github.ref == 'refs/heads/main')
142
- needs: [lint, typecheck, test]
143
- runs-on: ubuntu-latest
144
- timeout-minutes: 30
145
- permissions:
146
- contents: read
147
- deployments: write
148
-
149
- steps:
150
- - name: Checkout Code
151
- uses: actions/checkout@v4
152
-
153
- - name: Is deployment configured?
154
- id: check
155
- env:
156
- DOTENV_PRIVATE_KEY_PRODUCTION: ${{ secrets.DOTENV_PRIVATE_KEY_PRODUCTION }}
157
- DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
158
- run: |
159
- if [ -n "$DOTENV_PRIVATE_KEY_PRODUCTION" ] && [ -n "$DEPLOY_SSH_KEY" ]; then
160
- echo 'configured=true' >> "$GITHUB_OUTPUT"
161
- else
162
- echo 'configured=false' >> "$GITHUB_OUTPUT"
163
- echo '::notice::Deployment is not configured, so this step did nothing. Add DOTENV_PRIVATE_KEY_PRODUCTION and DEPLOY_SSH_KEY to deploy on every push to main.'
164
- fi
165
-
166
- - name: Setup Pantry
167
- if: steps.check.outputs.configured == 'true'
168
- uses: pantry-pm/pantry/packages/action@c1417d98f5613290bc3b1f96d35086b834684659 # v0.10.47 + the socket-hang-up retry fix
169
- with:
170
- install: 'false'
171
-
172
- - name: Use cached node_modules
173
- if: steps.check.outputs.configured == 'true'
174
- uses: actions/cache@v4
175
- with:
176
- path: node_modules
177
- key: node-modules-${{ hashFiles('**/bun.lock') }}
178
- restore-keys: |
179
- node-modules-
180
-
181
- - name: Install Dependencies
182
- if: steps.check.outputs.configured == 'true'
183
- run: bun install
184
-
185
- - name: Prepare Deploy SSH Key
186
- if: steps.check.outputs.configured == 'true'
187
- env:
188
- DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
189
- run: |
190
- mkdir -p ~/.ssh
191
- chmod 700 ~/.ssh
192
- printf '%s\n' "$DEPLOY_SSH_KEY" > ~/.ssh/id_ed25519
193
- chmod 600 ~/.ssh/id_ed25519
194
- ssh-keygen -y -f ~/.ssh/id_ed25519 > ~/.ssh/id_ed25519.pub
195
- chmod 644 ~/.ssh/id_ed25519.pub
196
-
197
- - name: Deploy production
198
- if: steps.check.outputs.configured == 'true'
199
- run: bun buddy deploy --yes
200
- env:
201
- APP_ENV: production
202
- DOTENV_PRIVATE_KEY_PRODUCTION: ${{ secrets.DOTENV_PRIVATE_KEY_PRODUCTION }}
203
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
204
- CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
205
- CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
206
- # macOS resource forks in a tarball built on a developer machine make
207
- # the extraction on the server noisy and occasionally fatal.
208
- COPYFILE_DISABLE: '1'
@@ -38,30 +38,74 @@ jobs:
38
38
  environment: ${{ github.event.inputs.environment || 'production' }}
39
39
 
40
40
  steps:
41
+ # A fresh app has nowhere to deploy to, and a red X on day one is worse
42
+ # than no deploy, so every step below is gated on the two secrets that
43
+ # cannot be defaulted. Without them this finishes green with a notice
44
+ # saying exactly what to add.
45
+ #
46
+ # Checked here rather than in `if:` on the job, because a job-level
47
+ # condition cannot read `secrets`.
48
+ - name: Is deployment configured?
49
+ id: check
50
+ env:
51
+ DOTENV_PRIVATE_KEY_PRODUCTION: ${{ secrets.DOTENV_PRIVATE_KEY_PRODUCTION }}
52
+ DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
53
+ run: |
54
+ if [ -n "$DOTENV_PRIVATE_KEY_PRODUCTION" ] && [ -n "$DEPLOY_SSH_KEY" ]; then
55
+ echo 'configured=true' >> "$GITHUB_OUTPUT"
56
+ else
57
+ echo 'configured=false' >> "$GITHUB_OUTPUT"
58
+ echo '::notice::Deployment is not configured, so this run did nothing. Add DEPLOY_SSH_KEY (a private key the target server trusts) and DOTENV_PRIVATE_KEY_PRODUCTION (from .env.keys) to deploy on every green push to main.'
59
+ fi
60
+
41
61
  - name: Checkout
62
+ if: steps.check.outputs.configured == 'true'
42
63
  uses: actions/checkout@v6
43
64
  with:
44
65
  # The exact commit CI approved, not whatever main points at now.
45
66
  ref: ${{ github.event.workflow_run.head_sha || github.ref }}
46
67
 
47
68
  - name: Setup Bun
69
+ if: steps.check.outputs.configured == 'true'
48
70
  uses: oven-sh/setup-bun@v2
49
71
 
50
72
  - name: Setup Pantry
73
+ if: steps.check.outputs.configured == 'true'
51
74
  uses: home-lang/pantry/packages/action@main
52
75
 
53
76
  - name: Install dependencies
77
+ if: steps.check.outputs.configured == 'true'
54
78
  run: bun install --frozen-lockfile
55
79
 
56
80
  # The deploy talks to the server as root over SSH with BatchMode on, so
57
81
  # the key has to be in an agent before it runs — there is no prompt to
58
82
  # fall back to.
59
83
  - name: Load the deploy key
84
+ if: steps.check.outputs.configured == 'true'
60
85
  uses: webfactory/ssh-agent@v0.9.0
61
86
  with:
62
87
  ssh-private-key: ${{ secrets.DEPLOY_SSH_KEY }}
63
88
 
89
+ # An agent is not enough on its own. ts-cloud reads the PUBLIC key off
90
+ # disk to register it on the server, and an agent holds keys in memory
91
+ # and exposes no path, so the deploy died on "SSH public key not found
92
+ # at ~/.ssh/id_ed25519.pub" with the agent perfectly loaded. The public
93
+ # half is derived from the private one rather than carried as a second
94
+ # secret, so the two can never disagree.
95
+ - name: Write the deploy key to disk
96
+ if: steps.check.outputs.configured == 'true'
97
+ env:
98
+ DEPLOY_SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
99
+ run: |
100
+ mkdir -p ~/.ssh
101
+ chmod 700 ~/.ssh
102
+ printf '%s\n' "$DEPLOY_SSH_KEY" > ~/.ssh/id_ed25519
103
+ chmod 600 ~/.ssh/id_ed25519
104
+ ssh-keygen -y -f ~/.ssh/id_ed25519 > ~/.ssh/id_ed25519.pub
105
+ chmod 644 ~/.ssh/id_ed25519.pub
106
+
64
107
  - name: Deploy
108
+ if: steps.check.outputs.configured == 'true'
65
109
  run: ./buddy deploy --${{ github.event.inputs.environment == 'staging' && 'staging' || github.event.inputs.environment == 'development' && 'dev' || 'prod' }} --yes
66
110
  env:
67
111
  # Decrypts .env.production. Without it the encrypted values silently
@@ -75,3 +119,6 @@ jobs:
75
119
  PORKBUN_API_KEY: ${{ secrets.PORKBUN_API_KEY }}
76
120
  PORKBUN_SECRET_KEY: ${{ secrets.PORKBUN_SECRET_KEY }}
77
121
  CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
122
+ # macOS resource forks in a tarball built on a developer machine make
123
+ # the extraction on the server noisy and occasionally fatal.
124
+ COPYFILE_DISABLE: '1'