@stnd/account 0.2.0 → 0.2.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @stnd/account
2
2
 
3
+ ## 0.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Auto-bumped @stnd/account due to modified code.
8
+
9
+ ## 0.2.1
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+ - Updated dependencies
15
+ - @stnd/styles@0.7.0
16
+ - @stnd/utils@0.6.0
17
+
3
18
  ## 0.2.0
4
19
 
5
20
  ### Minor Changes
package/middleware.js CHANGED
@@ -18,8 +18,16 @@ export const onRequest = defineMiddleware(async (context, next) => {
18
18
  env = cfEnv;
19
19
  }
20
20
 
21
- if (!env && context.locals?.runtime?.env) {
22
- env = context.locals.runtime.env;
21
+ // `locals.runtime` was removed in Astro v6 — it's now a throwing getter,
22
+ // not just undefined, so even `?.` must be wrapped in try/catch.
23
+ if (!env) {
24
+ try {
25
+ if (context.locals?.runtime?.env) {
26
+ env = context.locals.runtime.env;
27
+ }
28
+ } catch {
29
+ // not present on this adapter/runtime — fall through
30
+ }
23
31
  }
24
32
  if (!env && context.locals?.cfContext?.env) {
25
33
  env = context.locals.cfContext.env;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stnd/account",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "svelte": "./ui/UserMenu.svelte",
6
6
  "main": "./index.module.js",
@@ -24,11 +24,11 @@
24
24
  "kysely-d1": "^0.4.0",
25
25
  "nanostores": "^1.4.0",
26
26
  "wrangler": "^4.129.0",
27
- "@stnd/art": "0.1.1",
28
27
  "@stnd/icon": "0.2.2",
28
+ "@stnd/art": "0.1.1",
29
29
  "@stnd/log": "0.5.1",
30
- "@stnd/styles": "0.6.0",
31
- "@stnd/utils": "0.5.1"
30
+ "@stnd/styles": "0.7.0",
31
+ "@stnd/utils": "0.6.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "astro": ">=5.0.0"