@stacksjs/defaults 0.70.258 → 0.70.260
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/ide/vscode/package.json +1 -1
- package/package.json +14 -3
- package/project/buddy +7 -1
- package/views/auth/signup.stx +62 -27
package/ide/vscode/package.json
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@stacksjs/defaults",
|
|
3
3
|
"type": "module",
|
|
4
4
|
"sideEffects": false,
|
|
5
|
-
"version": "0.70.
|
|
5
|
+
"version": "0.70.260",
|
|
6
6
|
"description": "The complete managed Stacks application scaffold, including runtime defaults, AI guidance, editor metadata, and npm-backed project support files.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -29,8 +29,19 @@
|
|
|
29
29
|
"project"
|
|
30
30
|
],
|
|
31
31
|
"exports": {
|
|
32
|
-
"./*":
|
|
33
|
-
|
|
32
|
+
"./*": {
|
|
33
|
+
"types": "./dist/*.d.ts",
|
|
34
|
+
"bun": "./dist/*.js",
|
|
35
|
+
"import": "./dist/*.js",
|
|
36
|
+
"default": "./dist/*.js"
|
|
37
|
+
},
|
|
38
|
+
"./package.json": "./package.json",
|
|
39
|
+
"./*.js": {
|
|
40
|
+
"types": "./dist/*.d.ts",
|
|
41
|
+
"bun": "./dist/*.js",
|
|
42
|
+
"import": "./dist/*.js",
|
|
43
|
+
"default": "./dist/*.js"
|
|
44
|
+
}
|
|
34
45
|
},
|
|
35
46
|
"dependencies": {
|
|
36
47
|
"@iconify-json/f7": "^1.2.2",
|
package/project/buddy
CHANGED
|
@@ -53,7 +53,13 @@ run_with_timeout() {
|
|
|
53
53
|
cmd_pid=$!
|
|
54
54
|
|
|
55
55
|
(
|
|
56
|
-
|
|
56
|
+
# Do not let the timer inherit the deployment lock or a caller's
|
|
57
|
+
# stdout/stderr pipe. If the
|
|
58
|
+
# watchdog shell is terminated after the command finishes, its sleep may
|
|
59
|
+
# briefly remain orphaned; inherited deploy descriptors would otherwise
|
|
60
|
+
# keep the release locked until the full timeout elapsed.
|
|
61
|
+
exec 9>&-
|
|
62
|
+
sleep "${timeout_seconds}" </dev/null >/dev/null 2>&1
|
|
57
63
|
|
|
58
64
|
if kill -0 "${cmd_pid}" 2>/dev/null; then
|
|
59
65
|
echo "Command timed out after ${timeout_seconds}s: $*" >&2
|
package/views/auth/signup.stx
CHANGED
|
@@ -1,3 +1,32 @@
|
|
|
1
|
+
<script server>
|
|
2
|
+
/**
|
|
3
|
+
* The providers whose buttons are worth rendering.
|
|
4
|
+
*
|
|
5
|
+
* `configuredSocialProviders()` knows each provider's own required config,
|
|
6
|
+
* so a provider missing credentials never reaches a visitor as a button
|
|
7
|
+
* that fails at the redirect. Adding credentials to `config/services.ts`
|
|
8
|
+
* is the whole of what turns one on.
|
|
9
|
+
*
|
|
10
|
+
* Icons come from hugeicons, the collection Stacks defaults to. Swap the
|
|
11
|
+
* map if your app standardises on another one.
|
|
12
|
+
*/
|
|
13
|
+
import { configuredSocialProviders } from '@stacksjs/socials'
|
|
14
|
+
|
|
15
|
+
const PROVIDER_ICONS = {
|
|
16
|
+
apple: 'i-hugeicons-apple',
|
|
17
|
+
facebook: 'i-hugeicons-facebook-01',
|
|
18
|
+
github: 'i-hugeicons-github',
|
|
19
|
+
google: 'i-hugeicons-google',
|
|
20
|
+
twitter: 'i-hugeicons-new-twitter',
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const socialSignIn = configuredSocialProviders().map(provider => ({
|
|
24
|
+
label: provider.label,
|
|
25
|
+
href: `/auth/${provider.name}/redirect`,
|
|
26
|
+
icon: PROVIDER_ICONS[provider.name] ?? 'i-hugeicons-user-circle',
|
|
27
|
+
}))
|
|
28
|
+
</script>
|
|
29
|
+
|
|
1
30
|
<div class="flex flex-col justify-center py-12 sm:px-6 lg:px-8 min-h-full">
|
|
2
31
|
<div class="sm:mx-auto sm:max-w-md sm:w-full">
|
|
3
32
|
<Logo class="mx-auto h-11 w-auto" />
|
|
@@ -46,40 +75,46 @@
|
|
|
46
75
|
</div>
|
|
47
76
|
</form>
|
|
48
77
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
<div class="flex absolute inset-0 items-center" aria-hidden="true">
|
|
52
|
-
<div class="w-full border-gray-200 border-t"></div>
|
|
53
|
-
</div>
|
|
54
|
-
<div class="flex relative justify-center font-medium leading-6 text-sm">
|
|
55
|
-
<span class="px-6 text-gray-900 bg-white">Or continue with</span>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
78
|
+
{{--
|
|
79
|
+
Social sign-in, driven by which providers are actually configured.
|
|
58
80
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
81
|
+
This block used to be two hardcoded buttons pointing at `href="#"`,
|
|
82
|
+
so a scaffolded app shipped a Google and a GitHub button that both
|
|
83
|
+
did nothing, and offered them whether or not either provider had
|
|
84
|
+
credentials. `configuredSocialProviders()` answers that per
|
|
85
|
+
provider on each provider's own terms (Apple has no clientSecret
|
|
86
|
+
and is validated on its signing key instead), so what renders here
|
|
87
|
+
is exactly the set that will complete a sign-in.
|
|
88
|
+
--}}
|
|
89
|
+
@if (socialSignIn.length)
|
|
90
|
+
<div>
|
|
91
|
+
<div class="relative mt-10">
|
|
92
|
+
<div class="flex absolute inset-0 items-center" aria-hidden="true">
|
|
93
|
+
<div class="w-full border-gray-200 border-t"></div>
|
|
94
|
+
</div>
|
|
95
|
+
<div class="flex relative justify-center font-medium leading-6 text-sm">
|
|
96
|
+
<span class="px-6 text-gray-900 bg-white">Or continue with</span>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
69
99
|
|
|
70
|
-
<
|
|
71
|
-
|
|
72
|
-
<
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
100
|
+
<div class="grid gap-4 mt-6 {{ socialSignIn.length > 1 ? 'grid-cols-2' : 'grid-cols-1' }}">
|
|
101
|
+
@foreach (socialSignIn as provider)
|
|
102
|
+
<a
|
|
103
|
+
href="{{ provider.href }}"
|
|
104
|
+
class="flex gap-3 items-center justify-center px-3 py-2 w-full font-semibold text-gray-900 text-sm bg-white hover:bg-gray-50 ring-1 ring-gray-300 ring-inset rounded-md focus-visible:ring-transparent shadow-sm"
|
|
105
|
+
>
|
|
106
|
+
<i class="h-5 w-5 {{ provider.icon }}" aria-hidden="true"></i>
|
|
107
|
+
<span class="font-semibold leading-6 text-sm">{{ provider.label }}</span>
|
|
108
|
+
</a>
|
|
109
|
+
@endforeach
|
|
110
|
+
</div>
|
|
76
111
|
</div>
|
|
77
|
-
|
|
112
|
+
@endif
|
|
78
113
|
</div>
|
|
79
114
|
|
|
80
115
|
<p class="mt-10 text-center text-gray-500 text-sm">
|
|
81
116
|
Already have an account?
|
|
82
|
-
<a href="
|
|
117
|
+
<a href="/login" class="font-semibold leading-6 text-blue-600 hover:text-blue-500">Sign in</a>
|
|
83
118
|
</p>
|
|
84
119
|
</div>
|
|
85
120
|
</div>
|