@crombolo/backoffice-host 0.36.2 → 0.37.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crombolo/backoffice-host",
3
- "version": "0.36.2",
3
+ "version": "0.37.0",
4
4
  "description": "Internal to crombolo, with no compatibility promise: use @crombolo/crombolo. Serves the Umbraco backoffice SPA: shell HTML, import map and package manifests.",
5
5
  "license": "MIT",
6
6
  "author": "Crombolo",
@@ -31,7 +31,7 @@
31
31
  "access": "public"
32
32
  },
33
33
  "dependencies": {
34
- "@crombolo/core": "0.36.2",
34
+ "@crombolo/core": "0.37.0",
35
35
  "@crombolo/backoffice-dist": "18.2.0"
36
36
  }
37
37
  }
@@ -2,7 +2,7 @@
2
2
  "$schema": "../../../backoffice-dist/dist/umbraco-package-schema.json",
3
3
  "name": "Crombolo App Preview",
4
4
  "id": "Crombolo.AppPreview",
5
- "version": "0.36.2",
5
+ "version": "0.37.0",
6
6
  "allowPublicAccess": false,
7
7
  "extensions": [
8
8
  {
@@ -2,7 +2,7 @@
2
2
  "$schema": "../../../backoffice-dist/dist/umbraco-package-schema.json",
3
3
  "name": "Crombolo Localizations",
4
4
  "id": "Crombolo.Localizations",
5
- "version": "0.36.2",
5
+ "version": "0.37.0",
6
6
  "allowPublicAccess": true,
7
7
  "extensions": [
8
8
  {
@@ -2,7 +2,7 @@
2
2
  "$schema": "../../../backoffice-dist/dist/umbraco-package-schema.json",
3
3
  "name": "Crombolo Search & sharing",
4
4
  "id": "Crombolo.Seo",
5
- "version": "0.36.2",
5
+ "version": "0.37.0",
6
6
  "allowPublicAccess": false,
7
7
  "extensions": [
8
8
  {
@@ -2,7 +2,7 @@
2
2
  "$schema": "../../../backoffice-dist/dist/umbraco-package-schema.json",
3
3
  "name": "Crombolo Sign-in Dialog",
4
4
  "id": "Crombolo.SignInDialog",
5
- "version": "0.36.2",
5
+ "version": "0.37.0",
6
6
  "allowPublicAccess": true,
7
7
  "extensions": [
8
8
  {
@@ -2,7 +2,7 @@
2
2
  "$schema": "../../backoffice-dist/dist/umbraco-package-schema.json",
3
3
  "name": "Crombolo",
4
4
  "id": "Crombolo.Core",
5
- "version": "0.36.2",
5
+ "version": "0.37.0",
6
6
  "allowPublicAccess": false,
7
7
  "extensions": [
8
8
  {
@@ -39,6 +39,11 @@ export interface CromboloField {
39
39
  content?: true
40
40
  /** The factory the package exports for the server half. Never imported by core. */
41
41
  server?: string
42
+ /**
43
+ * The bundle schema its server half is written for; absent means 1. This
44
+ * release reads `BUNDLE_SCHEMA_VERSION`.
45
+ */
46
+ schemaVersion?: number
42
47
  /**
43
48
  * What this release's table steps promise a running site, for a bundle that
44
49
  * owns tables: `breaking` exactly when it ships a contract.
@@ -46,6 +51,9 @@ export interface CromboloField {
46
51
  migrations?: 'compatible' | 'breaking'
47
52
  }
48
53
 
54
+ /** The bundle schema a server half must be written for: 2 since its routes became route handlers (story 211). */
55
+ export const BUNDLE_SCHEMA_VERSION = 2
56
+
49
57
  /** A bundle as read from its package. */
50
58
  export interface BundlePackage {
51
59
  packageName: string
@@ -125,6 +133,18 @@ export function validateBundlePackage(json: PackageJson, directory?: string): st
125
133
  problems.push('"crombolo.migrations" is "compatible" or "breaking"')
126
134
  if (f.server !== undefined && (typeof f.server !== 'string' || !EXPORT_NAME.test(f.server)))
127
135
  problems.push('"crombolo.server" must name the factory the package exports')
136
+ if (
137
+ f.schemaVersion !== undefined &&
138
+ (!Number.isInteger(f.schemaVersion) || (f.schemaVersion as number) < 1)
139
+ )
140
+ problems.push('"crombolo.schemaVersion" is a whole number')
141
+ else if (
142
+ f.server !== undefined &&
143
+ ((f.schemaVersion as number | undefined) ?? 1) < BUNDLE_SCHEMA_VERSION
144
+ )
145
+ problems.push(
146
+ `its server half is written for bundle schema ${(f.schemaVersion as number | undefined) ?? 1}, and this release reads ${BUNDLE_SCHEMA_VERSION}: its routes are route handlers since 0.37 (docs/bundles.md, "Routes"), with "crombolo.schemaVersion": ${BUNDLE_SCHEMA_VERSION}`,
147
+ )
128
148
  if (f.content !== undefined) {
129
149
  if (typeof f.content === 'string')
130
150
  problems.push(