astroidjs 0.9.4 → 0.10.0

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.
@@ -1 +1 @@
1
- export { ASTROID_VITE_BUILD, astroidCspOrigins, astroidSecurity, type AstroidSecurityConfig, type CspHash, solidHydrationHash, } from "./csp.js";
1
+ export { ASTROID_VITE_BUILD, astroidCspOrigins, astroidSecurity, type AstroidSecurityConfig, type CspDirective, type CspHash, solidHydrationHash, } from "./csp.js";
@@ -47,7 +47,7 @@ export declare function readCatalogItem(slug: string, options: CatalogReadOption
47
47
  *
48
48
  * ```ts
49
49
  * // src/loaders/catalog.ts
50
- * import { defineCatalogLoader } from "louise-toolkit/astro";
50
+ * import { defineCatalogLoader } from "@louise-toolkit/astro";
51
51
  * import { astroidCatalogLoaderConfig } from "astroidjs";
52
52
  *
53
53
  * export const catalogLoader = defineCatalogLoader(
@@ -2,7 +2,7 @@
2
2
  //
3
3
  // The catalog read, and the Live Content Collection loader over it.
4
4
  //
5
- // `defineCatalogLoader` (louise-toolkit/astro) already owns the Astro-facing
5
+ // `defineCatalogLoader` (@louise-toolkit/astro) already owns the Astro-facing
6
6
  // plumbing. What each site then hand-wrote was the layer underneath — "read my
7
7
  // catalog out of D1" — and because that layer was per-site, so was the drift.
8
8
  // It doesn't need to be: once the mirror table's shape is fixed (see mirror.ts),
@@ -24,7 +24,7 @@ function decodeJson(value) {
24
24
  }
25
25
  /** Mirror row → `CatalogProduct`. */
26
26
  function toProduct(row) {
27
- const { images, variants, external_id, external_slug, sort_order, synced_at, ...rest } = row;
27
+ const { images, variants, external_id, external_slug, sort_order, synced_at: _synced_at, ...rest } = row;
28
28
  return {
29
29
  ...rest,
30
30
  externalId: String(external_id ?? ""),
@@ -65,7 +65,7 @@ export async function readCatalogItem(slug, options) {
65
65
  *
66
66
  * ```ts
67
67
  * // src/loaders/catalog.ts
68
- * import { defineCatalogLoader } from "louise-toolkit/astro";
68
+ * import { defineCatalogLoader } from "@louise-toolkit/astro";
69
69
  * import { astroidCatalogLoaderConfig } from "astroidjs";
70
70
  *
71
71
  * export const catalogLoader = defineCatalogLoader(
@@ -4,7 +4,7 @@
4
4
  // layer 2), beside the framework-agnostic `/api/louise/*` routes.
5
5
  //
6
6
  // Astroid generated only the route half. That is not a missing convenience: the
7
- // two entrypoints write the SAME rows, and the whole reason `louise-toolkit/astro`
7
+ // two entrypoints write the SAME rows, and the whole reason `@louise-toolkit/astro`
8
8
  // exposes these factories is that each one shares the raw route's store path —
9
9
  // `applyFieldSave`, `applySettingsPatch`, `applySaveDraft`. A project that wired
10
10
  // its own Actions by hand would get a second write path, and a second write path
@@ -52,7 +52,7 @@ export function generateAstroidActions(config) {
52
52
  " louiseSaveAction,",
53
53
  " louiseSaveDraftAction,",
54
54
  " louiseSettingsAction,",
55
- '} from "louise-toolkit/astro";',
55
+ '} from "@louise-toolkit/astro";',
56
56
  "import {",
57
57
  " ASTROID_SETTINGS_COLUMNS,",
58
58
  " ASTROID_SETTINGS_IMAGE_KEYS,",
@@ -18,7 +18,7 @@ import { ASTROID_VITALS_BINDING, astroidVitalsDataset } from "../analytics/index
18
18
  import { astroidCheckoutVars } from "../commerce/checkout-scaffold.js";
19
19
  import { astroidCommerceProviders } from "../commerce/roles.js";
20
20
  import { COMMERCE_PROVIDER_SECRETS, COMMERCE_PROVIDER_SETUP, commerceSecretNames, } from "../commerce/secrets.js";
21
- import { ASTROID_QUEUE_BINDING, astroidCron, astroidCrons, astroidQueueNames, astroidUsesQueues, } from "../queues/messages.js";
21
+ import { ASTROID_QUEUE_BINDING, astroidCrons, astroidQueueNames, astroidUsesQueues, } from "../queues/messages.js";
22
22
  import { ASTROID_EDIT_SESSION_CLASS, ASTROID_REALTIME_BINDING, ASTROID_REALTIME_MIGRATION_TAG, usesRealtime, } from "../realtime/scaffold.js";
23
23
  import { ASTROID_SECRET_PLACEHOLDER } from "../secrets.js";
24
24
  import { tenancyZone } from "../tenancy/index.js";
@@ -484,7 +484,7 @@ export function generateAstroidMiddleware(config) {
484
484
  "// the CSP header Astro's security.csp emits so Louise's data-driven inline",
485
485
  "// styles + inlined data: brand font are allowed.",
486
486
  'import { env } from "cloudflare:workers";',
487
- 'import { createLouiseMiddleware } from "louise-toolkit/astro";',
487
+ 'import { createLouiseMiddleware } from "@louise-toolkit/astro";',
488
488
  // One `astroidjs` import, composed from what this config actually uses —
489
489
  // two import statements for the same module is legal and reads as an
490
490
  // oversight in a file nobody is supposed to hand-edit.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astroidjs",
3
- "version": "0.9.4",
3
+ "version": "0.10.0",
4
4
  "description": "Astroid — an opinionated meta-framework over Louise Toolkit and Astro for building editable, multi-editor sites on Cloudflare Workers.",
5
5
  "keywords": [
6
6
  "astro",
@@ -14,7 +14,7 @@
14
14
  "author": "BowenLabs",
15
15
  "repository": {
16
16
  "type": "git",
17
- "url": "git+https://github.com/bowenlabs/louise-toolkit.git",
17
+ "url": "git+https://github.com/bowenlabs/astroidjs.git",
18
18
  "directory": "packages/astroid"
19
19
  },
20
20
  "bin": {
@@ -60,15 +60,15 @@
60
60
  "access": "public"
61
61
  },
62
62
  "dependencies": {
63
- "louise-toolkit": "0.26.0"
63
+ "louise-toolkit": "^0.28.0"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@types/node": "^24.13.3",
67
67
  "@typescript/native-preview": "7.0.0-dev.20260707.2",
68
- "astro": "^7.0.9",
69
- "solid-js": "^1.9.14",
70
- "typescript": "^5.8.0",
71
- "vitest": "^4.1.10"
68
+ "astro": "^7.2.9",
69
+ "solid-js": "^1.9.15",
70
+ "typescript": "^5.9.3",
71
+ "vitest": "^4.1.11"
72
72
  },
73
73
  "peerDependencies": {
74
74
  "astro": "^7.0.9",
@@ -83,12 +83,11 @@
83
83
  }
84
84
  },
85
85
  "engines": {
86
- "node": ">=24.0.0"
86
+ "node": ">=26.0.0"
87
87
  },
88
88
  "scripts": {
89
89
  "build": "tsgo -p tsconfig.build.json",
90
- "check": "vp check",
91
- "test": "vp test",
90
+ "test": "vitest run",
92
91
  "typecheck": "tsgo --noEmit"
93
92
  }
94
93
  }