@stacksjs/defaults 0.70.293 → 0.70.296
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/ai/skills/stacks-auth/SKILL.md +1 -1
- package/ai/skills/stacks-development/SKILL.md +3 -3
- package/ai/skills/stacks-stx/SKILL.md +3 -3
- package/ai/skills/stacks-ui/SKILL.md +3 -3
- package/app/Actions/Auth/LoginAction.ts +8 -2
- package/app/Actions/Auth/RegisterAction.ts +3 -2
- package/app/Actions/Auth/SocialCallbackAction.ts +75 -0
- package/app/Actions/Auth/SocialRedirectAction.ts +37 -0
- package/app/Actions/Dashboard/Analytics/request-analytics.ts +6 -1
- package/app/Actions/Dashboard/Commerce/CommercePosCheckoutAction.ts +7 -0
- package/app/Actions/Dashboard/Commerce/commerce-product-records.ts +3 -1
- package/app/Actions/Dashboard/Commerce/commerce-record.ts +13 -0
- package/app/Actions/Dashboard/Infrastructure/InsightsAction.ts +3 -3
- package/app/Actions/Dashboard/Jobs/job-records.ts +5 -1
- package/app/Actions/Dashboard/Kanban/BoardShowAction.ts +9 -7
- package/app/Actions/Dashboard/Kanban/BoardStoreAction.ts +1 -1
- package/app/Actions/Dashboard/Kanban/BoardsIndexAction.ts +6 -4
- package/app/Actions/Dashboard/Kanban/CardShowAction.ts +4 -2
- package/app/Actions/Dashboard/Library/GetAverageReleaseTime.ts +1 -1
- package/app/Actions/Dashboard/Marketing/CampaignIndexAction.ts +2 -2
- package/app/Actions/Dashboard/Marketing/ListIndexAction.ts +1 -1
- package/app/Actions/Dashboard/Queries/query-dashboard.ts +5 -3
- package/app/Actions/Password/PasswordResetAction.ts +29 -7
- package/app/Middleware/Auth.ts +4 -2
- package/app/Middleware/Can.ts +58 -5
- package/app/Models/Content/Author.ts +5 -0
- package/app/Models/Content/Page.ts +5 -0
- package/app/Models/Content/Post.ts +5 -0
- package/app/Models/Release.ts +5 -0
- package/app/Models/SocialAccount.ts +70 -0
- package/app/Models/Tag.ts +5 -0
- package/app/Models/User.ts +7 -4
- package/app/Models/commerce/Category.ts +5 -0
- package/app/Models/commerce/DeliveryRoute.ts +34 -0
- package/app/Models/commerce/DeliveryStop.ts +166 -0
- package/app/Models/commerce/Driver.ts +72 -2
- package/app/Models/commerce/DriverPing.ts +103 -0
- package/app/Models/commerce/LoyaltyReward.ts +5 -0
- package/app/Models/commerce/Manufacturer.ts +5 -0
- package/app/Models/commerce/Order.ts +44 -3
- package/app/Models/commerce/Product.ts +5 -0
- package/app/Models/commerce/ProductUnit.ts +5 -0
- package/app/Models/commerce/ProductVariant.ts +5 -0
- package/app/Models/commerce/ShippingMethod.ts +5 -0
- package/app/Models/commerce/ShippingRate.ts +5 -0
- package/app/Models/commerce/ShippingZone.ts +5 -0
- package/app/Models/commerce/TaxRate.ts +5 -0
- package/app/password-policy.ts +46 -0
- package/bootstrap.ts +67 -19
- package/ide/vscode/package.json +1 -1
- package/package.json +1 -1
- package/routes/auth.ts +83 -0
- package/routes/dashboard.ts +0 -61
- package/routes/socials.ts +32 -0
- package/vcs/github/CONTRIBUTING.md +1 -1
- package/vcs/github/workflows/README.md +8 -9
- package/vcs/github/workflows/release.yml +4 -181
- package/vcs/github/workflows/export-size.yml +0 -25
|
@@ -7,18 +7,17 @@ on:
|
|
|
7
7
|
|
|
8
8
|
permissions:
|
|
9
9
|
contents: write
|
|
10
|
-
packages: write
|
|
11
|
-
id-token: write
|
|
12
10
|
|
|
13
11
|
jobs:
|
|
14
|
-
|
|
12
|
+
release:
|
|
15
13
|
runs-on: ubuntu-latest
|
|
16
|
-
|
|
17
|
-
version: ${{ env.VERSION }}
|
|
14
|
+
|
|
18
15
|
steps:
|
|
19
16
|
- name: Checkout Code
|
|
20
17
|
uses: actions/checkout@v6
|
|
21
18
|
with:
|
|
19
|
+
# The changelog is generated from commits since the previous tag, so
|
|
20
|
+
# the full history has to be present.
|
|
22
21
|
fetch-depth: 0
|
|
23
22
|
|
|
24
23
|
- name: Setup Pantry
|
|
@@ -37,183 +36,7 @@ jobs:
|
|
|
37
36
|
- name: Install Dependencies
|
|
38
37
|
run: bun install
|
|
39
38
|
|
|
40
|
-
- name: Publish Framework
|
|
41
|
-
run: ./storage/framework/scripts/publish
|
|
42
|
-
env:
|
|
43
|
-
BUN_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
44
|
-
|
|
45
|
-
- name: Publish Dummy Libraries
|
|
46
|
-
run: ./storage/framework/scripts/publish-dummy-libs
|
|
47
|
-
env:
|
|
48
|
-
BUN_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
49
|
-
|
|
50
|
-
- name: Publish VS Code Extension
|
|
51
|
-
continue-on-error: true
|
|
52
|
-
run: |
|
|
53
|
-
cd storage/framework/defaults/ide/vscode
|
|
54
|
-
bun install
|
|
55
|
-
bunx --bun vsce publish --no-dependencies
|
|
56
|
-
cd ../../../../
|
|
57
|
-
env:
|
|
58
|
-
VSCE_PAT: ${{ secrets.VSCE_PAT }}
|
|
59
|
-
|
|
60
|
-
- name: Extract tag version
|
|
61
|
-
id: get_version
|
|
62
|
-
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
|
63
|
-
|
|
64
|
-
- name: Build Buddy Release Assets
|
|
65
|
-
run: |
|
|
66
|
-
cd storage/framework/core/buddy
|
|
67
|
-
bun run compile:all
|
|
68
|
-
bun run zip:all
|
|
69
|
-
|
|
70
39
|
- name: Create GitHub Release
|
|
71
40
|
uses: stacksjs/action-releaser@v1.2.9
|
|
72
|
-
with:
|
|
73
|
-
files: |
|
|
74
|
-
storage/framework/core/buddy/bin/buddy-linux-x64
|
|
75
|
-
storage/framework/core/buddy/bin/buddy-linux-arm64
|
|
76
|
-
storage/framework/core/buddy/bin/buddy-windows-x64.exe
|
|
77
|
-
storage/framework/core/buddy/bin/buddy-darwin-x64
|
|
78
|
-
storage/framework/core/buddy/bin/buddy-darwin-arm64
|
|
79
|
-
storage/framework/core/buddy/bin/buddy-linux-x64.zip
|
|
80
|
-
storage/framework/core/buddy/bin/buddy-linux-arm64.zip
|
|
81
|
-
storage/framework/core/buddy/bin/buddy-windows-x64.zip
|
|
82
|
-
storage/framework/core/buddy/bin/buddy-darwin-x64.zip
|
|
83
|
-
storage/framework/core/buddy/bin/buddy-darwin-arm64.zip
|
|
84
41
|
env:
|
|
85
42
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
86
|
-
|
|
87
|
-
homebrew:
|
|
88
|
-
needs: npm
|
|
89
|
-
runs-on: macos-latest
|
|
90
|
-
steps:
|
|
91
|
-
- name: Checkout Repository
|
|
92
|
-
uses: actions/checkout@v6
|
|
93
|
-
with:
|
|
94
|
-
fetch-depth: 0
|
|
95
|
-
|
|
96
|
-
- name: Debug Tag
|
|
97
|
-
run: |
|
|
98
|
-
echo "Tag: ${GITHUB_REF#refs/tags/}"
|
|
99
|
-
echo "Version from previous job: ${{ needs.release.outputs.version }}"
|
|
100
|
-
|
|
101
|
-
- name: Generate GitHub App Token
|
|
102
|
-
id: generate-token
|
|
103
|
-
uses: actions/create-github-app-token@v2
|
|
104
|
-
with:
|
|
105
|
-
app-id: ${{ secrets.GH_APP_ID }}
|
|
106
|
-
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
|
|
107
|
-
|
|
108
|
-
- name: Setup GitHub CLI with PAT
|
|
109
|
-
run: |
|
|
110
|
-
echo "${{ secrets.GH_PAT }}" | gh auth login --with-token
|
|
111
|
-
|
|
112
|
-
- name: Ensure Homebrew Tap Repository Exists
|
|
113
|
-
env:
|
|
114
|
-
GH_TOKEN: ${{ secrets.GH_PAT }}
|
|
115
|
-
run: |
|
|
116
|
-
if ! gh repo view stacksjs/homebrew-tap &>/dev/null; then
|
|
117
|
-
echo "Creating homebrew-tap repository..."
|
|
118
|
-
gh repo create stacksjs/homebrew-tap --public --description "Homebrew tap for Stacks packages"
|
|
119
|
-
else
|
|
120
|
-
echo "homebrew-tap repository already exists"
|
|
121
|
-
fi
|
|
122
|
-
|
|
123
|
-
- name: Authenticate GitHub CLI with App Token
|
|
124
|
-
run: echo "${{ steps.generate-token.outputs.token }}" | gh auth login --with-token
|
|
125
|
-
|
|
126
|
-
- name: Wait for Release Assets
|
|
127
|
-
run: |
|
|
128
|
-
VERSION=${GITHUB_REF#refs/tags/}
|
|
129
|
-
echo "Waiting for release assets to be available..."
|
|
130
|
-
|
|
131
|
-
# Wait for assets to be available (max 10 minutes)
|
|
132
|
-
TIMEOUT=600
|
|
133
|
-
START_TIME=$(date +%s)
|
|
134
|
-
|
|
135
|
-
while [ $(( $(date +%s) - START_TIME )) -lt $TIMEOUT ]; do
|
|
136
|
-
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" https://github.com/stacksjs/stacks/releases/download/$VERSION/buddy-darwin-arm64)
|
|
137
|
-
echo "HTTP response code: $HTTP_CODE"
|
|
138
|
-
|
|
139
|
-
if [ "$HTTP_CODE" = "200" ] || [ "$HTTP_CODE" = "302" ]; then
|
|
140
|
-
echo "Assets are available!"
|
|
141
|
-
break
|
|
142
|
-
fi
|
|
143
|
-
|
|
144
|
-
echo "Assets not ready yet, waiting 10 seconds..."
|
|
145
|
-
sleep 10
|
|
146
|
-
done
|
|
147
|
-
|
|
148
|
-
if [ $(( $(date +%s) - START_TIME )) -ge $TIMEOUT ]; then
|
|
149
|
-
echo "Timed out waiting for assets, proceeding anyway..."
|
|
150
|
-
fi
|
|
151
|
-
|
|
152
|
-
# Force continue even if we couldn't detect the file
|
|
153
|
-
# Sometimes GitHub's API can be inconsistent
|
|
154
|
-
echo "Continuing with asset download..."
|
|
155
|
-
|
|
156
|
-
- name: Download Binaries Directly
|
|
157
|
-
run: |
|
|
158
|
-
VERSION=${GITHUB_REF#refs/tags/}
|
|
159
|
-
mkdir -p .github/temp
|
|
160
|
-
cd .github/temp
|
|
161
|
-
|
|
162
|
-
# Try direct download with retries
|
|
163
|
-
download_with_retry() {
|
|
164
|
-
local url=$1
|
|
165
|
-
local output=$2
|
|
166
|
-
local max_retries=5
|
|
167
|
-
local retry=0
|
|
168
|
-
|
|
169
|
-
while [ $retry -lt $max_retries ]; do
|
|
170
|
-
echo "Downloading $url (attempt $(($retry + 1))/$max_retries)"
|
|
171
|
-
if curl -L -s -f "$url" -o "$output"; then
|
|
172
|
-
echo "Downloaded $output successfully"
|
|
173
|
-
return 0
|
|
174
|
-
fi
|
|
175
|
-
echo "Download failed, retrying in 5 seconds..."
|
|
176
|
-
retry=$((retry + 1))
|
|
177
|
-
sleep 5
|
|
178
|
-
done
|
|
179
|
-
|
|
180
|
-
echo "Failed to download $url after $max_retries attempts"
|
|
181
|
-
return 1
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
download_with_retry "https://github.com/stacksjs/stacks/releases/download/$VERSION/buddy-darwin-arm64" "buddy-darwin-arm64"
|
|
185
|
-
download_with_retry "https://github.com/stacksjs/stacks/releases/download/$VERSION/buddy-darwin-x64" "buddy-darwin-x64"
|
|
186
|
-
download_with_retry "https://github.com/stacksjs/stacks/releases/download/$VERSION/buddy-linux-arm64" "buddy-linux-arm64"
|
|
187
|
-
download_with_retry "https://github.com/stacksjs/stacks/releases/download/$VERSION/buddy-linux-x64" "buddy-linux-x64"
|
|
188
|
-
|
|
189
|
-
cd ../..
|
|
190
|
-
|
|
191
|
-
- name: Update Homebrew Formula
|
|
192
|
-
run: |
|
|
193
|
-
VERSION=${GITHUB_REF#refs/tags/}
|
|
194
|
-
bash .github/scripts/update-homebrew-formula.sh $VERSION
|
|
195
|
-
|
|
196
|
-
- name: Push to Homebrew Tap Repository
|
|
197
|
-
run: |
|
|
198
|
-
# Clone the tap repo using GitHub App token
|
|
199
|
-
git clone https://x-access-token:${{ steps.generate-token.outputs.token }}@github.com/stacksjs/homebrew-tap.git
|
|
200
|
-
|
|
201
|
-
# Set up Git config
|
|
202
|
-
cd homebrew-tap
|
|
203
|
-
git config user.name "github-actions[bot]"
|
|
204
|
-
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
205
|
-
|
|
206
|
-
# Copy the formula to the tap repo
|
|
207
|
-
mkdir -p Formula
|
|
208
|
-
cp ../.github/homebrew/stacks.rb Formula/
|
|
209
|
-
|
|
210
|
-
# Check if there are changes to commit
|
|
211
|
-
if git status --porcelain | grep -q .; then
|
|
212
|
-
# Push the changes to the tap repo
|
|
213
|
-
git add Formula/stacks.rb
|
|
214
|
-
git commit -m "chore: update stacks formula to ${GITHUB_REF#refs/tags/}"
|
|
215
|
-
git push
|
|
216
|
-
echo "Successfully updated homebrew formula!"
|
|
217
|
-
else
|
|
218
|
-
echo "No changes to commit"
|
|
219
|
-
fi
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
name: Export Size
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
pull_request:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
size:
|
|
10
|
-
strategy:
|
|
11
|
-
matrix:
|
|
12
|
-
node-version: [18.x]
|
|
13
|
-
os: [ubuntu-latest]
|
|
14
|
-
fail-fast: false
|
|
15
|
-
|
|
16
|
-
runs-on: ubuntu-latest
|
|
17
|
-
|
|
18
|
-
steps:
|
|
19
|
-
- name: Checkout Code
|
|
20
|
-
uses: actions/checkout@v3
|
|
21
|
-
|
|
22
|
-
- name: Setup Pantry
|
|
23
|
-
uses: pantry-pm/pantry/packages/action@485c7b102fe14f8af00b57441a13dc3daa1505e7 # v0.10.39
|
|
24
|
-
with:
|
|
25
|
-
install: 'false'
|