@jskit-ai/agent-docs 0.1.353 → 0.1.355
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/guide/agent/app-extras/assistant.md +70 -0
- package/guide/agent/app-setup/authentication.md +157 -2
- package/guide/agent/app-setup/database-layer.md +49 -15
- package/guide/agent/app-setup/service-keys.md +103 -0
- package/guide/agent/app-setup/upgrading-jskit.md +17 -5
- package/guide/agent/framework/data-access.md +13 -0
- package/guide/agent/framework/material-3.md +3 -4
- package/guide/agent/framework/speed-pass.md +7 -1
- package/guide/agent/framework/typed-features.md +56 -25
- package/guide/agent/index.md +2 -0
- package/package.json +1 -1
- package/patterns/feature-package/example/booking-engine/package.json +1 -1
- package/patterns/minimal-foundation/example/package.json +6 -6
- package/patterns/shell-foundation/example/package.json +7 -7
- package/patterns/shell-foundation/example/packages/main/package.json +1 -1
- package/patterns/shell-foundation/example/src/components/menus/TabLinkItem.vue +5 -0
- package/reference/autogen/PATTERN_INDEX.md +49 -38
- package/reference/autogen/packages/agent-runtime.md +1 -1
- package/reference/autogen/packages/assistant-core.md +44 -8
- package/reference/autogen/packages/assistant-runtime.md +25 -0
- package/reference/autogen/packages/assistant-voice-sherpa.md +2 -1
- package/reference/autogen/packages/auth-core.md +4 -0
- package/reference/autogen/packages/auth-provider-local-core.md +13 -0
- package/reference/autogen/packages/auth-web.md +60 -16
- package/reference/autogen/packages/crud-core.md +3 -1
- package/reference/autogen/packages/database-runtime.md +1 -0
- package/reference/autogen/packages/http-web.md +1 -0
- package/reference/autogen/packages/kernel.md +1 -1
- package/reference/autogen/packages/material-web.md +2 -0
- package/reference/autogen/packages/realtime.md +2 -1
- package/reference/autogen/packages/resource-runtime.md +9 -0
- package/reference/autogen/packages/shell-web.md +35 -0
- package/reference/autogen/tooling/jskit-catalog.md +21 -8
- package/reference/autogen/tooling/testUtils.md +1 -0
- package/skills/jskit/references/data-access.md +13 -0
- package/skills/jskit/references/database-layer.md +49 -15
- package/skills/jskit/references/heuristics/placements.md +1 -0
- package/skills/jskit/references/heuristics/row-policies.md +1 -1
- package/skills/jskit/references/heuristics/ui-testing.md +3 -3
- package/skills/jskit/references/material-3.md +3 -4
- package/skills/jskit/references/pattern-index.md +49 -38
- package/skills/jskit/references/patterns/app/minimal-foundation/example/package.json +6 -6
- package/skills/jskit/references/patterns/app/shell-foundation/example/package.json +7 -7
- package/skills/jskit/references/patterns/app/shell-foundation/example/packages/main/package.json +1 -1
- package/skills/jskit/references/patterns/app/shell-foundation/example/src/components/menus/TabLinkItem.vue +5 -0
- package/skills/jskit/references/patterns/auth/accounts-hub/example/package.json +3 -3
- package/skills/jskit/references/patterns/auth/auth-surface/PATTERN.md +3 -0
- package/skills/jskit/references/patterns/auth/oidc-sign-in/example/package.json +2 -2
- package/skills/jskit/references/patterns/auth/own-design-sign-in/PATTERN.md +141 -0
- package/skills/jskit/references/patterns/auth/own-design-sign-in/example/src/components/ConfirmItsYouDialog.vue +182 -0
- package/skills/jskit/references/patterns/auth/own-design-sign-in/example/src/theme/tokens.css +35 -0
- package/skills/jskit/references/patterns/auth/own-design-sign-in/example/src/views/auth/LoginView.vue +473 -0
- package/skills/jskit/references/patterns/auth/supabase-auth/example/package.json +1 -1
- package/skills/jskit/references/patterns/connectors/calendar-cli/example/package.json +5 -5
- package/skills/jskit/references/patterns/crud/crud-feature-package/example/packages/books/package.json +3 -3
- package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookListPage.vue +1 -1
- package/skills/jskit/references/patterns/database/mysql-application/example/package.json +2 -2
- package/skills/jskit/references/patterns/database/postgres-application/example/package.json +2 -2
- package/skills/jskit/references/patterns/realtime/realtime-application/PATTERN.md +5 -1
- package/skills/jskit/references/patterns/realtime/realtime-application/example/package.json +2 -2
- package/skills/jskit/references/patterns/server/feature-package/example/booking-engine/package.json +1 -1
- package/skills/jskit/references/patterns/shell/application-shell/example/src/components/menus/TabLinkItem.vue +5 -0
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users/package.json +3 -3
- package/skills/jskit/references/patterns/users/user-administration-server/example/packages/users-workspace/package.json +6 -6
- package/skills/jskit/references/speed-pass.md +7 -1
- package/skills/jskit/references/typed-features.md +56 -25
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useId } from "vue";
|
|
3
|
+
import { useJskitText } from "@jskit-ai/kernel/client";
|
|
4
|
+
import { useLoginView } from "@jskit-ai/auth-web/client/composables/useLoginView";
|
|
5
|
+
import AppBrand from "@/components/AppBrand.vue";
|
|
6
|
+
|
|
7
|
+
// The app's sign-in screen in its own design system: plain HTML and the app's CSS (the tokens of src/theme/), no
|
|
8
|
+
// Vuetify. Every behavior comes from useLoginView(), the composable JSKIT's DefaultLoginView renders in Material 3:
|
|
9
|
+
// the modes, the provider buttons, the remembered account, invitations, the returnTo landing and the session checks.
|
|
10
|
+
// The words are JSKIT's messages, so the app's translations apply.
|
|
11
|
+
const { t } = useJskitText();
|
|
12
|
+
const id = useId();
|
|
13
|
+
const {
|
|
14
|
+
authTitle,
|
|
15
|
+
authSubtitle,
|
|
16
|
+
isLogin,
|
|
17
|
+
isRegister,
|
|
18
|
+
isForgot,
|
|
19
|
+
isOtp,
|
|
20
|
+
isEmailConfirmationPending,
|
|
21
|
+
redirectingSignedIn,
|
|
22
|
+
canUsePasswordLogin,
|
|
23
|
+
canRegister,
|
|
24
|
+
canRequestPasswordRecovery,
|
|
25
|
+
canUseOtp,
|
|
26
|
+
canUseOAuth,
|
|
27
|
+
canResendEmailConfirmation,
|
|
28
|
+
canEnterConfirmationCode,
|
|
29
|
+
needsFirstAccountSetupCode,
|
|
30
|
+
setupCode,
|
|
31
|
+
confirmationUrl,
|
|
32
|
+
confirmationCode,
|
|
33
|
+
confirmationLinkToken,
|
|
34
|
+
registrationConfirmPending,
|
|
35
|
+
confirmRegistrationFromLink,
|
|
36
|
+
emailConfirmationMessage,
|
|
37
|
+
showRememberedAccount,
|
|
38
|
+
switchMode,
|
|
39
|
+
goToMainScreen,
|
|
40
|
+
rememberedAccountDisplayName,
|
|
41
|
+
rememberedAccountMaskedEmail,
|
|
42
|
+
rememberedAccountSwitchLabel,
|
|
43
|
+
switchAccount,
|
|
44
|
+
email,
|
|
45
|
+
emailErrorMessages,
|
|
46
|
+
emailTouched,
|
|
47
|
+
password,
|
|
48
|
+
passwordErrorMessages,
|
|
49
|
+
passwordTouched,
|
|
50
|
+
confirmPassword,
|
|
51
|
+
confirmPasswordErrorMessages,
|
|
52
|
+
confirmPasswordTouched,
|
|
53
|
+
otpCode,
|
|
54
|
+
otpCodeErrorMessages,
|
|
55
|
+
otpCodeTouched,
|
|
56
|
+
rememberAccountOnDevice,
|
|
57
|
+
otpRequestPending,
|
|
58
|
+
registerConfirmationResendPending,
|
|
59
|
+
requestOtpCode,
|
|
60
|
+
resendRegisterConfirmationEmail,
|
|
61
|
+
oauthProviders,
|
|
62
|
+
startOAuthSignIn,
|
|
63
|
+
oauthProviderButtonLabel,
|
|
64
|
+
oauthRetryProvider,
|
|
65
|
+
signInPausedMinutes,
|
|
66
|
+
errorMessage,
|
|
67
|
+
infoMessage,
|
|
68
|
+
loading,
|
|
69
|
+
canSubmit,
|
|
70
|
+
submitLabel,
|
|
71
|
+
submitAuth
|
|
72
|
+
} = useLoginView();
|
|
73
|
+
|
|
74
|
+
function providerName(providerId) {
|
|
75
|
+
return oauthProviders.value.find((provider) => provider.id === providerId)?.label || providerId;
|
|
76
|
+
}
|
|
77
|
+
</script>
|
|
78
|
+
|
|
79
|
+
<template>
|
|
80
|
+
<main class="auth-page">
|
|
81
|
+
<!-- A browser already signed in is on its way to the page it asked for: it is shown no form. -->
|
|
82
|
+
<section v-if="!redirectingSignedIn" class="auth-panel" :aria-labelledby="`${id}-title`">
|
|
83
|
+
<AppBrand />
|
|
84
|
+
<h1 :id="`${id}-title`" class="auth-title">{{ authTitle }}</h1>
|
|
85
|
+
<p v-if="authSubtitle" class="auth-muted">{{ authSubtitle }}</p>
|
|
86
|
+
|
|
87
|
+
<div
|
|
88
|
+
v-if="canRegister && (isLogin || isRegister) && !showRememberedAccount"
|
|
89
|
+
class="auth-tabs"
|
|
90
|
+
role="radiogroup"
|
|
91
|
+
:aria-label="t('jskit.auth.login.mode.label')"
|
|
92
|
+
>
|
|
93
|
+
<button type="button" role="radio" :aria-checked="String(isLogin)" @click="switchMode('login')">
|
|
94
|
+
{{ t("jskit.auth.login.mode.signIn") }}
|
|
95
|
+
</button>
|
|
96
|
+
<button type="button" role="radio" :aria-checked="String(isRegister)" @click="switchMode('register')">
|
|
97
|
+
{{ t("jskit.auth.login.mode.register") }}
|
|
98
|
+
</button>
|
|
99
|
+
</div>
|
|
100
|
+
|
|
101
|
+
<!-- The refusal stays beside the form until the next attempt; the shell's banner hears it too. -->
|
|
102
|
+
<p v-if="errorMessage" class="auth-message auth-message--error" role="alert">{{ errorMessage }}</p>
|
|
103
|
+
<p v-else-if="infoMessage" class="auth-message" role="status">{{ infoMessage }}</p>
|
|
104
|
+
|
|
105
|
+
<form class="auth-form" novalidate @submit.prevent="submitAuth">
|
|
106
|
+
<template v-if="isEmailConfirmationPending">
|
|
107
|
+
<p class="auth-note">{{ emailConfirmationMessage }}</p>
|
|
108
|
+
<div class="auth-field">
|
|
109
|
+
<label :for="`${id}-registration-password`">{{ t("jskit.auth.login.field.registrationPassword") }}</label>
|
|
110
|
+
<input
|
|
111
|
+
:id="`${id}-registration-password`"
|
|
112
|
+
v-model="password"
|
|
113
|
+
type="password"
|
|
114
|
+
autocomplete="current-password"
|
|
115
|
+
:aria-invalid="passwordErrorMessages.length > 0"
|
|
116
|
+
:aria-describedby="`${id}-registration-password-hint`"
|
|
117
|
+
@blur="passwordTouched = true"
|
|
118
|
+
>
|
|
119
|
+
<p :id="`${id}-registration-password-hint`" class="auth-field__line">
|
|
120
|
+
{{ passwordErrorMessages[0] || t("jskit.auth.login.confirmEmail.passwordHint") }}
|
|
121
|
+
</p>
|
|
122
|
+
</div>
|
|
123
|
+
<div v-if="canEnterConfirmationCode && !confirmationLinkToken" class="auth-field">
|
|
124
|
+
<label :for="`${id}-confirmation-code`">{{ t("jskit.auth.login.field.confirmationCode") }}</label>
|
|
125
|
+
<input :id="`${id}-confirmation-code`" v-model="confirmationCode" autocomplete="off">
|
|
126
|
+
</div>
|
|
127
|
+
<button
|
|
128
|
+
v-if="confirmationLinkToken || canEnterConfirmationCode"
|
|
129
|
+
class="auth-button auth-button--primary"
|
|
130
|
+
type="submit"
|
|
131
|
+
:disabled="!password || registrationConfirmPending || (!confirmationLinkToken && !confirmationCode.trim())"
|
|
132
|
+
>
|
|
133
|
+
{{ t("jskit.auth.login.confirmEmail.confirm") }}
|
|
134
|
+
</button>
|
|
135
|
+
<div v-if="confirmationUrl" class="auth-note">
|
|
136
|
+
<p>{{ t("jskit.auth.login.confirmEmail.devLink") }}</p>
|
|
137
|
+
<p class="auth-code">{{ confirmationUrl }}</p>
|
|
138
|
+
<button class="auth-button" type="button" :disabled="!password || registrationConfirmPending" @click="confirmRegistrationFromLink">
|
|
139
|
+
{{ t("jskit.auth.login.confirmEmail.useDevLink") }}
|
|
140
|
+
</button>
|
|
141
|
+
</div>
|
|
142
|
+
<div class="auth-row">
|
|
143
|
+
<button class="auth-button" type="button" @click="goToMainScreen">{{ t("jskit.auth.login.confirmEmail.goToMainScreen") }}</button>
|
|
144
|
+
<button
|
|
145
|
+
v-if="canResendEmailConfirmation"
|
|
146
|
+
class="auth-button"
|
|
147
|
+
type="button"
|
|
148
|
+
:disabled="registerConfirmationResendPending"
|
|
149
|
+
@click="resendRegisterConfirmationEmail"
|
|
150
|
+
>
|
|
151
|
+
{{ t("jskit.auth.login.confirmEmail.resend") }}
|
|
152
|
+
</button>
|
|
153
|
+
<button class="auth-link" type="button" @click="switchMode('login')">{{ t("jskit.auth.login.backToSignIn") }}</button>
|
|
154
|
+
</div>
|
|
155
|
+
</template>
|
|
156
|
+
|
|
157
|
+
<template v-else>
|
|
158
|
+
<div v-if="showRememberedAccount" class="auth-note auth-row">
|
|
159
|
+
<div>
|
|
160
|
+
<p class="auth-strong">{{ t("jskit.auth.login.rememberedAccount.welcomeBack", { name: rememberedAccountDisplayName }) }}</p>
|
|
161
|
+
<p class="auth-muted">{{ rememberedAccountMaskedEmail }}</p>
|
|
162
|
+
</div>
|
|
163
|
+
<button class="auth-link" type="button" @click="switchAccount">{{ rememberedAccountSwitchLabel }}</button>
|
|
164
|
+
</div>
|
|
165
|
+
|
|
166
|
+
<div v-if="isRegister && needsFirstAccountSetupCode" class="auth-field">
|
|
167
|
+
<p class="auth-note">{{ t("jskit.auth.login.firstAccount.explain") }}</p>
|
|
168
|
+
<label :for="`${id}-setup-code`">{{ t("jskit.auth.login.field.setupCode") }}</label>
|
|
169
|
+
<input :id="`${id}-setup-code`" v-model="setupCode" autocomplete="off" spellcheck="false">
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
<div v-if="!isLogin || canUsePasswordLogin" class="auth-field">
|
|
173
|
+
<label :for="`${id}-email`">{{ t("jskit.auth.login.field.email") }}</label>
|
|
174
|
+
<input
|
|
175
|
+
:id="`${id}-email`"
|
|
176
|
+
v-model="email"
|
|
177
|
+
type="email"
|
|
178
|
+
autocomplete="email"
|
|
179
|
+
:aria-invalid="emailErrorMessages.length > 0"
|
|
180
|
+
:aria-describedby="`${id}-email-error`"
|
|
181
|
+
@blur="emailTouched = true"
|
|
182
|
+
>
|
|
183
|
+
<!-- Each field keeps its error line, so an error shown on blur moves nothing below it. -->
|
|
184
|
+
<p :id="`${id}-email-error`" class="auth-field__line auth-field__line--error">{{ emailErrorMessages[0] }}</p>
|
|
185
|
+
</div>
|
|
186
|
+
|
|
187
|
+
<div v-if="(isLogin && canUsePasswordLogin) || isRegister" class="auth-field">
|
|
188
|
+
<label :for="`${id}-password`">{{ t("jskit.auth.login.field.password") }}</label>
|
|
189
|
+
<input
|
|
190
|
+
:id="`${id}-password`"
|
|
191
|
+
v-model="password"
|
|
192
|
+
type="password"
|
|
193
|
+
:autocomplete="isRegister ? 'new-password' : 'current-password'"
|
|
194
|
+
:aria-invalid="passwordErrorMessages.length > 0"
|
|
195
|
+
:aria-describedby="`${id}-password-error`"
|
|
196
|
+
@blur="passwordTouched = true"
|
|
197
|
+
>
|
|
198
|
+
<p :id="`${id}-password-error`" class="auth-field__line auth-field__line--error">{{ passwordErrorMessages[0] }}</p>
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
<div v-if="isRegister" class="auth-field">
|
|
202
|
+
<label :for="`${id}-confirm-password`">{{ t("jskit.auth.login.field.confirmPassword") }}</label>
|
|
203
|
+
<input
|
|
204
|
+
:id="`${id}-confirm-password`"
|
|
205
|
+
v-model="confirmPassword"
|
|
206
|
+
type="password"
|
|
207
|
+
autocomplete="new-password"
|
|
208
|
+
:aria-invalid="confirmPasswordErrorMessages.length > 0"
|
|
209
|
+
:aria-describedby="`${id}-confirm-password-error`"
|
|
210
|
+
@blur="confirmPasswordTouched = true"
|
|
211
|
+
>
|
|
212
|
+
<p :id="`${id}-confirm-password-error`" class="auth-field__line auth-field__line--error">{{ confirmPasswordErrorMessages[0] }}</p>
|
|
213
|
+
</div>
|
|
214
|
+
|
|
215
|
+
<div v-if="isOtp" class="auth-field">
|
|
216
|
+
<label :for="`${id}-otp`">{{ t("jskit.auth.login.field.otpCode") }}</label>
|
|
217
|
+
<input
|
|
218
|
+
:id="`${id}-otp`"
|
|
219
|
+
v-model="otpCode"
|
|
220
|
+
autocomplete="one-time-code"
|
|
221
|
+
:aria-invalid="otpCodeErrorMessages.length > 0"
|
|
222
|
+
:aria-describedby="`${id}-otp-error`"
|
|
223
|
+
@blur="otpCodeTouched = true"
|
|
224
|
+
>
|
|
225
|
+
<p :id="`${id}-otp-error`" class="auth-field__line auth-field__line--error">{{ otpCodeErrorMessages[0] }}</p>
|
|
226
|
+
<button class="auth-button" type="button" :disabled="otpRequestPending" @click="requestOtpCode">
|
|
227
|
+
{{ t("jskit.auth.login.sendOtp") }}
|
|
228
|
+
</button>
|
|
229
|
+
</div>
|
|
230
|
+
|
|
231
|
+
<div v-if="isLogin && (canRequestPasswordRecovery || canUseOtp)" class="auth-row auth-row--end">
|
|
232
|
+
<button v-if="canRequestPasswordRecovery" class="auth-link" type="button" @click="switchMode('forgot')">
|
|
233
|
+
{{ t("jskit.auth.login.forgotPassword") }}
|
|
234
|
+
</button>
|
|
235
|
+
<button v-if="canUseOtp" class="auth-link" type="button" @click="switchMode('otp')">{{ t("jskit.auth.login.useOtp") }}</button>
|
|
236
|
+
</div>
|
|
237
|
+
|
|
238
|
+
<label v-if="(isLogin && canUsePasswordLogin) || isOtp" class="auth-check">
|
|
239
|
+
<input v-model="rememberAccountOnDevice" type="checkbox">
|
|
240
|
+
{{ t("jskit.auth.login.rememberedAccount.rememberDevice") }}
|
|
241
|
+
</label>
|
|
242
|
+
|
|
243
|
+
<!-- Password sign-in paused for this address: the ways forward this app offers besides waiting. -->
|
|
244
|
+
<div v-if="isLogin && signInPausedMinutes > 0" class="auth-note" role="status">
|
|
245
|
+
<p>{{ t("jskit.auth.login.signInPaused.wait", { count: signInPausedMinutes }) }}</p>
|
|
246
|
+
<div v-if="canRequestPasswordRecovery || canRegister" class="auth-row">
|
|
247
|
+
<button v-if="canRequestPasswordRecovery" class="auth-button" type="button" @click="switchMode('forgot')">
|
|
248
|
+
{{ t("jskit.auth.login.signInPaused.resetPassword") }}
|
|
249
|
+
</button>
|
|
250
|
+
<button v-if="canRegister" class="auth-button" type="button" @click="switchMode('register')">
|
|
251
|
+
{{ t("jskit.auth.login.signInPaused.register") }}
|
|
252
|
+
</button>
|
|
253
|
+
</div>
|
|
254
|
+
</div>
|
|
255
|
+
|
|
256
|
+
<button
|
|
257
|
+
v-if="!isLogin || canUsePasswordLogin"
|
|
258
|
+
class="auth-button auth-button--primary"
|
|
259
|
+
type="submit"
|
|
260
|
+
:disabled="!canSubmit"
|
|
261
|
+
>
|
|
262
|
+
{{ submitLabel }}
|
|
263
|
+
</button>
|
|
264
|
+
|
|
265
|
+
<div v-if="canUseOAuth && (isLogin || isRegister)" class="auth-providers">
|
|
266
|
+
<!-- A provider sign-in that took too long: start it again, to the same page. -->
|
|
267
|
+
<button v-if="oauthRetryProvider" class="auth-button" type="button" :disabled="loading" @click="startOAuthSignIn(oauthRetryProvider)">
|
|
268
|
+
{{ t("jskit.auth.login.oauth.tryAgain", { provider: providerName(oauthRetryProvider) }) }}
|
|
269
|
+
</button>
|
|
270
|
+
<button
|
|
271
|
+
v-for="provider in oauthProviders"
|
|
272
|
+
:key="provider.id"
|
|
273
|
+
class="auth-button"
|
|
274
|
+
type="button"
|
|
275
|
+
:disabled="loading"
|
|
276
|
+
@click="startOAuthSignIn(provider.id)"
|
|
277
|
+
>
|
|
278
|
+
{{ oauthProviderButtonLabel(provider) }}
|
|
279
|
+
</button>
|
|
280
|
+
</div>
|
|
281
|
+
|
|
282
|
+
<div v-if="isForgot || isOtp" class="auth-row">
|
|
283
|
+
<span class="auth-muted">{{ isForgot ? t("jskit.auth.login.rememberedPassword") : t("jskit.auth.login.otherMethod") }}</span>
|
|
284
|
+
<button class="auth-link" type="button" @click="switchMode('login')">{{ t("jskit.auth.login.backToSignIn") }}</button>
|
|
285
|
+
</div>
|
|
286
|
+
</template>
|
|
287
|
+
</form>
|
|
288
|
+
</section>
|
|
289
|
+
</main>
|
|
290
|
+
</template>
|
|
291
|
+
|
|
292
|
+
<style scoped>
|
|
293
|
+
/* Every colour, radius and font is one of the app's design tokens (src/theme/tokens.css). */
|
|
294
|
+
.auth-page {
|
|
295
|
+
display: grid;
|
|
296
|
+
place-items: center;
|
|
297
|
+
min-height: 100dvh;
|
|
298
|
+
padding: 24px 16px;
|
|
299
|
+
background: var(--ds-page);
|
|
300
|
+
color: var(--ds-text);
|
|
301
|
+
font-family: var(--ds-font);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.auth-panel {
|
|
305
|
+
display: grid;
|
|
306
|
+
gap: 16px;
|
|
307
|
+
width: min(420px, 100%);
|
|
308
|
+
padding: 32px;
|
|
309
|
+
border-radius: var(--ds-radius-large);
|
|
310
|
+
background: var(--ds-panel);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.auth-title {
|
|
314
|
+
margin: 0;
|
|
315
|
+
font-size: 1.75rem;
|
|
316
|
+
font-weight: 700;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
.auth-muted,
|
|
320
|
+
.auth-note p,
|
|
321
|
+
.auth-panel p {
|
|
322
|
+
margin: 0;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.auth-muted {
|
|
326
|
+
color: var(--ds-text-muted);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.auth-strong {
|
|
330
|
+
font-weight: 600;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.auth-tabs {
|
|
334
|
+
display: grid;
|
|
335
|
+
grid-template-columns: 1fr 1fr;
|
|
336
|
+
padding: 4px;
|
|
337
|
+
border-radius: var(--ds-radius);
|
|
338
|
+
background: var(--ds-page);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.auth-tabs button {
|
|
342
|
+
padding: 8px;
|
|
343
|
+
border: 0;
|
|
344
|
+
border-radius: var(--ds-radius);
|
|
345
|
+
background: transparent;
|
|
346
|
+
color: inherit;
|
|
347
|
+
font: inherit;
|
|
348
|
+
cursor: pointer;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.auth-tabs button[aria-checked="true"] {
|
|
352
|
+
background: var(--ds-panel);
|
|
353
|
+
font-weight: 600;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.auth-form {
|
|
357
|
+
display: grid;
|
|
358
|
+
gap: 12px;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.auth-field {
|
|
362
|
+
display: grid;
|
|
363
|
+
gap: 4px;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.auth-field label {
|
|
367
|
+
font-weight: 600;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.auth-field input {
|
|
371
|
+
padding: 10px 12px;
|
|
372
|
+
border: 1px solid var(--ds-line);
|
|
373
|
+
border-radius: var(--ds-radius);
|
|
374
|
+
background: var(--ds-panel);
|
|
375
|
+
color: inherit;
|
|
376
|
+
font: inherit;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.auth-field input:focus-visible,
|
|
380
|
+
.auth-button:focus-visible,
|
|
381
|
+
.auth-link:focus-visible,
|
|
382
|
+
.auth-tabs button:focus-visible {
|
|
383
|
+
outline: 2px solid var(--ds-accent);
|
|
384
|
+
outline-offset: 2px;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.auth-field input[aria-invalid="true"] {
|
|
388
|
+
border-color: var(--ds-danger);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
.auth-field__line {
|
|
392
|
+
min-height: 1.25em;
|
|
393
|
+
margin: 0;
|
|
394
|
+
color: var(--ds-text-muted);
|
|
395
|
+
font-size: 0.875rem;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.auth-field__line--error {
|
|
399
|
+
color: var(--ds-danger);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.auth-button {
|
|
403
|
+
min-height: 44px;
|
|
404
|
+
padding: 10px 16px;
|
|
405
|
+
border: 1px solid var(--ds-line);
|
|
406
|
+
border-radius: var(--ds-radius);
|
|
407
|
+
background: var(--ds-panel);
|
|
408
|
+
color: inherit;
|
|
409
|
+
font: inherit;
|
|
410
|
+
font-weight: 600;
|
|
411
|
+
cursor: pointer;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.auth-button--primary {
|
|
415
|
+
border-color: var(--ds-accent);
|
|
416
|
+
background: var(--ds-accent);
|
|
417
|
+
color: var(--ds-on-accent);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.auth-button:disabled {
|
|
421
|
+
opacity: 0.5;
|
|
422
|
+
cursor: default;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.auth-link {
|
|
426
|
+
padding: 4px 0;
|
|
427
|
+
border: 0;
|
|
428
|
+
background: none;
|
|
429
|
+
color: var(--ds-accent);
|
|
430
|
+
font: inherit;
|
|
431
|
+
cursor: pointer;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.auth-row {
|
|
435
|
+
display: flex;
|
|
436
|
+
flex-wrap: wrap;
|
|
437
|
+
gap: 12px;
|
|
438
|
+
align-items: center;
|
|
439
|
+
justify-content: space-between;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
.auth-row--end {
|
|
443
|
+
justify-content: flex-end;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
.auth-providers {
|
|
447
|
+
display: grid;
|
|
448
|
+
gap: 8px;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
.auth-check {
|
|
452
|
+
display: flex;
|
|
453
|
+
gap: 8px;
|
|
454
|
+
align-items: center;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.auth-note,
|
|
458
|
+
.auth-message {
|
|
459
|
+
padding: 12px 16px;
|
|
460
|
+
border-radius: var(--ds-radius);
|
|
461
|
+
background: var(--ds-page);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.auth-message--error {
|
|
465
|
+
background: var(--ds-danger-soft);
|
|
466
|
+
color: var(--ds-danger);
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.auth-code {
|
|
470
|
+
font-family: monospace;
|
|
471
|
+
overflow-wrap: anywhere;
|
|
472
|
+
}
|
|
473
|
+
</style>
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
"db:migrate:status": "knex --knexfile ./knexfile.js migrate:list"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@jskit-ai/connectors-core": "0.2.
|
|
11
|
-
"@jskit-ai/connector-google-calendar": "0.2.
|
|
12
|
-
"@jskit-ai/database-runtime": "0.1.
|
|
13
|
-
"@jskit-ai/database-runtime-mysql": "0.1.
|
|
14
|
-
"@jskit-ai/kernel": "0.2.
|
|
10
|
+
"@jskit-ai/connectors-core": "0.2.53",
|
|
11
|
+
"@jskit-ai/connector-google-calendar": "0.2.53",
|
|
12
|
+
"@jskit-ai/database-runtime": "0.1.286",
|
|
13
|
+
"@jskit-ai/database-runtime-mysql": "0.1.284",
|
|
14
|
+
"@jskit-ai/kernel": "0.2.35",
|
|
15
15
|
"knex": "^3.1.0"
|
|
16
16
|
}
|
|
17
17
|
}
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
"./shared": "./src/shared/index.js"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@jskit-ai/crud-core": "0.2.
|
|
13
|
-
"@jskit-ai/resource-core": "0.1.
|
|
14
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
12
|
+
"@jskit-ai/crud-core": "0.2.54",
|
|
13
|
+
"@jskit-ai/resource-core": "0.1.226",
|
|
14
|
+
"@jskit-ai/resource-crud-core": "0.1.228"
|
|
15
15
|
},
|
|
16
16
|
"jskit": {
|
|
17
17
|
"kind": "runtime",
|
package/skills/jskit/references/patterns/crud/crud-screen-set/example/books/BookListPage.vue
CHANGED
|
@@ -31,7 +31,7 @@ const screen = useCrudListScreen({
|
|
|
31
31
|
empty-body="Add your first book to begin the catalogue."
|
|
32
32
|
>
|
|
33
33
|
<template #card-fields="{ record, formatListCardValue }">
|
|
34
|
-
<dl class="d-
|
|
34
|
+
<dl class="d-flex flex-column ga-2 mb-0">
|
|
35
35
|
<div>
|
|
36
36
|
<dt class="text-body-small on-surface-variant">Author</dt>
|
|
37
37
|
<dd class="text-body-medium ma-0">{{ formatListCardValue(record.author) }}</dd>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"test": "jskit test --databases"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@jskit-ai/database-runtime": "0.1.
|
|
13
|
-
"@jskit-ai/database-runtime-postgres": "0.1.
|
|
12
|
+
"@jskit-ai/database-runtime": "0.1.286",
|
|
13
|
+
"@jskit-ai/database-runtime-postgres": "0.1.283"
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -74,7 +74,11 @@ so the next handshake resolves the new actor.
|
|
|
74
74
|
Use `auth.service.realtime.authorizeEvent({ actor, event: { name, payload } })`
|
|
75
75
|
for resource-specific read authorization. Return `true` only when the current
|
|
76
76
|
actor can read that event's resource. Authentication is revalidated before
|
|
77
|
-
delivery and every 30 seconds while idle.
|
|
77
|
+
delivery and every 30 seconds while idle. A service that can tell when a login
|
|
78
|
+
ends offers `realtime.holdSocket(request, close)`: realtime holds each signed-in
|
|
79
|
+
socket with it, the service calls `close` the moment that login ends, and the
|
|
80
|
+
socket is then authenticated at its handshake and every 30 seconds instead of
|
|
81
|
+
before every delivery (`authorizeEvent` still answers each one). Redis peers perform the same checks
|
|
78
82
|
locally. Realtime failures are logged without failing an already-successful
|
|
79
83
|
mutation; one mutation owner publishes each completion, while progress events
|
|
80
84
|
describe distinct lifecycle states.
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"./shared": "./src/shared/index.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@jskit-ai/crud-core": "0.2.
|
|
14
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
15
|
-
"@jskit-ai/users-core": "0.2.
|
|
13
|
+
"@jskit-ai/crud-core": "0.2.54",
|
|
14
|
+
"@jskit-ai/resource-crud-core": "0.1.228",
|
|
15
|
+
"@jskit-ai/users-core": "0.2.65"
|
|
16
16
|
},
|
|
17
17
|
"jskit": {
|
|
18
18
|
"kind": "runtime",
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
"./shared": "./src/shared/index.js"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@jskit-ai/crud-core": "0.2.
|
|
14
|
-
"@jskit-ai/resource-crud-core": "0.1.
|
|
15
|
-
"@jskit-ai/users-core": "0.2.
|
|
16
|
-
"@jskit-ai/workspaces-core": "0.2.
|
|
13
|
+
"@jskit-ai/crud-core": "0.2.54",
|
|
14
|
+
"@jskit-ai/resource-crud-core": "0.1.228",
|
|
15
|
+
"@jskit-ai/users-core": "0.2.65",
|
|
16
|
+
"@jskit-ai/workspaces-core": "0.2.65"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@jskit-ai/kernel": "0.2.
|
|
20
|
-
"@jskit-ai/resource-runtime": "0.2.
|
|
19
|
+
"@jskit-ai/kernel": "0.2.35",
|
|
20
|
+
"@jskit-ai/resource-runtime": "0.2.50"
|
|
21
21
|
},
|
|
22
22
|
"jskit": {
|
|
23
23
|
"kind": "runtime",
|
|
@@ -43,9 +43,15 @@ database time, apply that page to the path.
|
|
|
43
43
|
that runs files one at a time ([test-run rules](typed-features.md#test-run-rules)).
|
|
44
44
|
- Files that collide are isolated, never run one at a time: a port from
|
|
45
45
|
`listen(0)`, a directory from `mkdtemp`, the database `jskit test --databases`
|
|
46
|
-
gives each file,
|
|
46
|
+
gives each file, a scratch database from
|
|
47
|
+
`createPackageTestKnex(t, { environment: process.env })` for a test that
|
|
48
|
+
needs an empty one (or several), and a Vite `cacheDir` of its own. The
|
|
47
49
|
`// jskit-test: alone - <reason>` marker is only for a file that holds a
|
|
48
50
|
resource of the whole machine.
|
|
51
|
+
- A `jskit test --databases` run whose databases let fewer files run at once
|
|
52
|
+
than the budget (no `TEST_DB_NAME`, or copies the database user may not
|
|
53
|
+
create) says why at its start and end and fails: give the user its copies
|
|
54
|
+
([Integration test databases](database-layer.md#integration-test-databases)).
|
|
49
55
|
- `jskit test --databases` restores each file's database from a snapshot
|
|
50
56
|
rebuilt only when the migrations' digest changes. A file that runs
|
|
51
57
|
`knex.migrate.latest()` itself replays the whole history for every file:
|