@crombolo/crombolo 0.33.1 → 0.35.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/package.json +16 -14
- package/src/bundle.ts +57 -0
- package/src/host.ts +45 -0
- package/src/index.ts +82 -41
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crombolo/crombolo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.35.2",
|
|
4
4
|
"crombolo": {
|
|
5
5
|
"migrations": "compatible"
|
|
6
6
|
},
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
"type": "module",
|
|
33
33
|
"exports": {
|
|
34
34
|
".": "./src/index.ts",
|
|
35
|
+
"./bundle": "./src/bundle.ts",
|
|
36
|
+
"./host": "./src/host.ts",
|
|
35
37
|
"./branding": "./src/branding.ts",
|
|
36
38
|
"./jsx-runtime": "./src/jsx-runtime.ts",
|
|
37
39
|
"./jsx-dev-runtime": "./src/jsx-runtime.ts",
|
|
@@ -47,19 +49,19 @@
|
|
|
47
49
|
"NOTICE"
|
|
48
50
|
],
|
|
49
51
|
"dependencies": {
|
|
50
|
-
"@crombolo/api-delivery": "0.
|
|
51
|
-
"@crombolo/api-management": "0.
|
|
52
|
-
"@crombolo/auth": "0.
|
|
52
|
+
"@crombolo/api-delivery": "0.35.2",
|
|
53
|
+
"@crombolo/api-management": "0.35.2",
|
|
54
|
+
"@crombolo/auth": "0.35.2",
|
|
53
55
|
"@crombolo/backoffice-dist": "18.2.0",
|
|
54
|
-
"@crombolo/backoffice-host": "0.
|
|
55
|
-
"@crombolo/cli": "0.
|
|
56
|
-
"@crombolo/content": "0.
|
|
57
|
-
"@crombolo/contracts": "0.
|
|
58
|
-
"@crombolo/core": "0.
|
|
59
|
-
"@crombolo/data": "0.
|
|
60
|
-
"@crombolo/render": "0.
|
|
61
|
-
"@crombolo/schema": "0.
|
|
62
|
-
"@crombolo/server": "0.
|
|
63
|
-
"@crombolo/transfer": "0.
|
|
56
|
+
"@crombolo/backoffice-host": "0.35.2",
|
|
57
|
+
"@crombolo/cli": "0.35.2",
|
|
58
|
+
"@crombolo/content": "0.35.2",
|
|
59
|
+
"@crombolo/contracts": "0.35.2",
|
|
60
|
+
"@crombolo/core": "0.35.2",
|
|
61
|
+
"@crombolo/data": "0.35.2",
|
|
62
|
+
"@crombolo/render": "0.35.2",
|
|
63
|
+
"@crombolo/schema": "0.35.2",
|
|
64
|
+
"@crombolo/server": "0.35.2",
|
|
65
|
+
"@crombolo/transfer": "0.35.2"
|
|
64
66
|
}
|
|
65
67
|
}
|
package/src/bundle.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The supported API for a server bundle's author (story 173): what a bundle's
|
|
3
|
+
* factory returns, what its handlers are given, and the builder for tables of
|
|
4
|
+
* its own. `docs/api.md`, and `docs/bundles.md` Part 3.
|
|
5
|
+
*
|
|
6
|
+
* A wired bundle is trusted code in the server process; this is a stability
|
|
7
|
+
* boundary, not a sandbox.
|
|
8
|
+
*/
|
|
9
|
+
export {
|
|
10
|
+
assertBundleTables,
|
|
11
|
+
type BundleStep,
|
|
12
|
+
type BundleTables,
|
|
13
|
+
type BundleTablesCapability,
|
|
14
|
+
bundleTablesCompatibility,
|
|
15
|
+
defineBundleTables,
|
|
16
|
+
type TableHandle,
|
|
17
|
+
type Where,
|
|
18
|
+
} from '@crombolo/data'
|
|
19
|
+
export type {
|
|
20
|
+
AppAlias,
|
|
21
|
+
BackofficeBundleRoute,
|
|
22
|
+
BundleAudience,
|
|
23
|
+
BundleCaller,
|
|
24
|
+
BundleCapability,
|
|
25
|
+
BundleDocuments,
|
|
26
|
+
BundleEventHandler,
|
|
27
|
+
BundleEvents,
|
|
28
|
+
BundleForms,
|
|
29
|
+
BundleHost,
|
|
30
|
+
BundleIdentityProviders,
|
|
31
|
+
BundleLog,
|
|
32
|
+
BundleMedia,
|
|
33
|
+
BundleMediaCreate,
|
|
34
|
+
BundleMediaDeclaration,
|
|
35
|
+
BundleMediaItem,
|
|
36
|
+
BundleMediaMetadata,
|
|
37
|
+
BundleMediaRefusal,
|
|
38
|
+
BundleMediaUpdate,
|
|
39
|
+
BundleMember,
|
|
40
|
+
BundleMemberRequest,
|
|
41
|
+
BundleMethod,
|
|
42
|
+
BundlePublicRequest,
|
|
43
|
+
BundleRateLimit,
|
|
44
|
+
BundleRedirectInput,
|
|
45
|
+
BundleRedirectRule,
|
|
46
|
+
BundleRedirects,
|
|
47
|
+
BundleRequest,
|
|
48
|
+
BundleSection,
|
|
49
|
+
ExtensionSectionAlias,
|
|
50
|
+
ImageLocation,
|
|
51
|
+
MemberBundleRoute,
|
|
52
|
+
Principal,
|
|
53
|
+
ProviderOverrideInput,
|
|
54
|
+
PublicBundleRoute,
|
|
55
|
+
ServerBundle,
|
|
56
|
+
ServerBundleRoute,
|
|
57
|
+
} from '@crombolo/server'
|
package/src/host.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The supported API for whoever runs sites (story 173): booting a site from
|
|
3
|
+
* its config, the stores it keeps media and schema in, checking and installing
|
|
4
|
+
* a site's bundles and code, and the upgrade, import and export a deploy runs.
|
|
5
|
+
* `docs/api.md`.
|
|
6
|
+
*/
|
|
7
|
+
export type { BundlePackage, CromboloField, PackageJson } from '@crombolo/backoffice-host'
|
|
8
|
+
export { peerRangeProblem, validateBundlePackage } from '@crombolo/backoffice-host'
|
|
9
|
+
export {
|
|
10
|
+
contentImport,
|
|
11
|
+
findTemplate,
|
|
12
|
+
type SiteTemplate,
|
|
13
|
+
siteExport,
|
|
14
|
+
type UpgradePlanResult,
|
|
15
|
+
upgradeFix,
|
|
16
|
+
upgradePlan,
|
|
17
|
+
} from '@crombolo/cli'
|
|
18
|
+
export { type LiveNode, liveNodes } from '@crombolo/data'
|
|
19
|
+
export {
|
|
20
|
+
type AzureMediaStoreOptions,
|
|
21
|
+
type AzureSchemaStoreOptions,
|
|
22
|
+
azureMediaStore,
|
|
23
|
+
azureSchemaStore,
|
|
24
|
+
type BundleCodeCheck,
|
|
25
|
+
type BundleCodeInstall,
|
|
26
|
+
type BundleCodeOptions,
|
|
27
|
+
type BundleReload,
|
|
28
|
+
type CromboloConfig,
|
|
29
|
+
checkBundleCode,
|
|
30
|
+
createServer,
|
|
31
|
+
fileSystemMediaStore,
|
|
32
|
+
installBundleCode,
|
|
33
|
+
loadConfig,
|
|
34
|
+
type MediaStore,
|
|
35
|
+
mediaStoreFor,
|
|
36
|
+
type ReloadedBundle,
|
|
37
|
+
type S3MediaStoreOptions,
|
|
38
|
+
type S3SchemaStoreOptions,
|
|
39
|
+
type SchemaStore,
|
|
40
|
+
type ServerHandle,
|
|
41
|
+
s3MediaStore,
|
|
42
|
+
s3SchemaStore,
|
|
43
|
+
VERSION,
|
|
44
|
+
} from '@crombolo/server'
|
|
45
|
+
export { cromboloServer } from './index.ts'
|
package/src/index.ts
CHANGED
|
@@ -15,10 +15,6 @@ import {
|
|
|
15
15
|
type ServerHandle,
|
|
16
16
|
} from '@crombolo/server'
|
|
17
17
|
|
|
18
|
-
// What a bundle's package.json declares; see `docs/bundles.md`.
|
|
19
|
-
export type { BundlePackage, CromboloField, PackageJson } from '@crombolo/backoffice-host'
|
|
20
|
-
// The CMS's own checks of a bundle package, for a host that installs them (story 181).
|
|
21
|
-
export { peerRangeProblem, validateBundlePackage } from '@crombolo/backoffice-host'
|
|
22
18
|
// A view reads a form definition and a submission's state; both are domain
|
|
23
19
|
// types, so they come from core rather than from the renderer.
|
|
24
20
|
export type {
|
|
@@ -33,18 +29,6 @@ export type {
|
|
|
33
29
|
SubmittedValues,
|
|
34
30
|
} from '@crombolo/core'
|
|
35
31
|
export { allFormFields, formFieldType, storingFormFields } from '@crombolo/core'
|
|
36
|
-
export {
|
|
37
|
-
assertBundleTables,
|
|
38
|
-
type BundleStep,
|
|
39
|
-
type BundleTables,
|
|
40
|
-
type BundleTablesCapability,
|
|
41
|
-
bundleTablesCompatibility,
|
|
42
|
-
defineBundleTables,
|
|
43
|
-
type LiveNode,
|
|
44
|
-
liveNodes,
|
|
45
|
-
type TableHandle,
|
|
46
|
-
type Where,
|
|
47
|
-
} from '@crombolo/data'
|
|
48
32
|
export type {
|
|
49
33
|
BlockGridArea,
|
|
50
34
|
BlockGridItem,
|
|
@@ -64,12 +48,14 @@ export type {
|
|
|
64
48
|
FormProps,
|
|
65
49
|
InnerHTML,
|
|
66
50
|
Link,
|
|
51
|
+
MediaWithCrops,
|
|
67
52
|
Menu,
|
|
68
53
|
MenuItem,
|
|
69
54
|
Navigation,
|
|
70
55
|
PageProps,
|
|
71
56
|
PublishedContent,
|
|
72
57
|
PublishedElement,
|
|
58
|
+
PublishedMedia,
|
|
73
59
|
RedirectOptions,
|
|
74
60
|
RedirectRule,
|
|
75
61
|
RedirectTo,
|
|
@@ -83,6 +69,7 @@ export type {
|
|
|
83
69
|
TypedElement,
|
|
84
70
|
} from '@crombolo/render'
|
|
85
71
|
export {
|
|
72
|
+
AntiforgeryMeta,
|
|
86
73
|
Blocks,
|
|
87
74
|
type Context,
|
|
88
75
|
createContext,
|
|
@@ -98,33 +85,14 @@ export {
|
|
|
98
85
|
usePage,
|
|
99
86
|
} from '@crombolo/render'
|
|
100
87
|
export type { Child } from '@crombolo/render/jsx-runtime'
|
|
101
|
-
// A site's code from its bundle, checked and installed by a host in its own process (story 192).
|
|
102
88
|
export {
|
|
103
|
-
// What a bundle's server half is written against; see `docs/bundles.md`.
|
|
104
|
-
type AppAlias,
|
|
105
89
|
type AzureMediaStoreOptions,
|
|
106
90
|
type AzureSchemaStoreOptions,
|
|
107
91
|
awsIdentityCenter,
|
|
108
92
|
azureMediaStore,
|
|
109
93
|
azureSchemaStore,
|
|
110
|
-
type BundleCapability,
|
|
111
|
-
type BundleCodeCheck,
|
|
112
|
-
type BundleCodeInstall,
|
|
113
|
-
type BundleCodeOptions,
|
|
114
|
-
type BundleDocuments,
|
|
115
|
-
type BundleHost,
|
|
116
|
-
type BundleLog,
|
|
117
|
-
type BundleMethod,
|
|
118
|
-
type BundleRedirectInput,
|
|
119
|
-
type BundleRedirectRule,
|
|
120
|
-
type BundleRedirects,
|
|
121
|
-
type BundleReload,
|
|
122
|
-
type BundleRequest,
|
|
123
|
-
type BundleSection,
|
|
124
94
|
type CromboloConfig,
|
|
125
95
|
type CustomEmailOptions,
|
|
126
|
-
checkBundleCode,
|
|
127
|
-
createServer,
|
|
128
96
|
customEmail,
|
|
129
97
|
defineConfig,
|
|
130
98
|
type EmailAddress,
|
|
@@ -136,23 +104,17 @@ export {
|
|
|
136
104
|
fileSystemMediaStore,
|
|
137
105
|
type IdentityProvider,
|
|
138
106
|
type IdentityProviderOptions,
|
|
139
|
-
installBundleCode,
|
|
140
|
-
loadConfig,
|
|
141
107
|
logEmail,
|
|
142
108
|
type MediaStore,
|
|
143
109
|
mediaStoreFor,
|
|
144
110
|
oidc,
|
|
145
111
|
type PostmarkOptions,
|
|
146
|
-
type Principal,
|
|
147
112
|
postmarkEmail,
|
|
148
|
-
type ReloadedBundle,
|
|
149
113
|
type ResendOptions,
|
|
150
114
|
resendEmail,
|
|
151
115
|
type S3MediaStoreOptions,
|
|
152
116
|
type S3SchemaStoreOptions,
|
|
153
117
|
type SchemaStore,
|
|
154
|
-
type ServerBundle,
|
|
155
|
-
type ServerBundleRoute,
|
|
156
118
|
type ServerHandle,
|
|
157
119
|
type SesOptions,
|
|
158
120
|
s3MediaStore,
|
|
@@ -183,3 +145,82 @@ export async function cromboloServer(
|
|
|
183
145
|
await assertPortAvailable(config.port)
|
|
184
146
|
return createServer(config)
|
|
185
147
|
}
|
|
148
|
+
|
|
149
|
+
/** @deprecated Import it from `@crombolo/crombolo/host`. */
|
|
150
|
+
/** @deprecated Import it from `@crombolo/crombolo/host`. */
|
|
151
|
+
/** @deprecated Import it from `@crombolo/crombolo/host`. */
|
|
152
|
+
export type { BundlePackage, CromboloField, PackageJson } from '@crombolo/backoffice-host'
|
|
153
|
+
/** @deprecated Import it from `@crombolo/crombolo/host`. */
|
|
154
|
+
/** @deprecated Import it from `@crombolo/crombolo/host`. */
|
|
155
|
+
export { peerRangeProblem, validateBundlePackage } from '@crombolo/backoffice-host'
|
|
156
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
157
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
158
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
159
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
160
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
161
|
+
/** @deprecated Import it from `@crombolo/crombolo/host`. */
|
|
162
|
+
export type {
|
|
163
|
+
BundleStep,
|
|
164
|
+
BundleTables,
|
|
165
|
+
BundleTablesCapability,
|
|
166
|
+
LiveNode,
|
|
167
|
+
TableHandle,
|
|
168
|
+
Where,
|
|
169
|
+
} from '@crombolo/data'
|
|
170
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
171
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
172
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
173
|
+
/** @deprecated Import it from `@crombolo/crombolo/host`. */
|
|
174
|
+
export {
|
|
175
|
+
assertBundleTables,
|
|
176
|
+
bundleTablesCompatibility,
|
|
177
|
+
defineBundleTables,
|
|
178
|
+
liveNodes,
|
|
179
|
+
} from '@crombolo/data'
|
|
180
|
+
// Deprecated at the root since 0.34.0 (story 173): each still works here for one
|
|
181
|
+
// minor, and moves to the entry point its note names. `docs/api.md`.
|
|
182
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
183
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
184
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
185
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
186
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
187
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
188
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
189
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
190
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
191
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
192
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
193
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
194
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
195
|
+
/** @deprecated Import it from `@crombolo/crombolo/bundle`. */
|
|
196
|
+
/** @deprecated Import it from `@crombolo/crombolo/host`. */
|
|
197
|
+
/** @deprecated Import it from `@crombolo/crombolo/host`. */
|
|
198
|
+
/** @deprecated Import it from `@crombolo/crombolo/host`. */
|
|
199
|
+
/** @deprecated Import it from `@crombolo/crombolo/host`. */
|
|
200
|
+
/** @deprecated Import it from `@crombolo/crombolo/host`. */
|
|
201
|
+
export type {
|
|
202
|
+
AppAlias,
|
|
203
|
+
BundleCapability,
|
|
204
|
+
BundleCodeCheck,
|
|
205
|
+
BundleCodeInstall,
|
|
206
|
+
BundleCodeOptions,
|
|
207
|
+
BundleDocuments,
|
|
208
|
+
BundleHost,
|
|
209
|
+
BundleLog,
|
|
210
|
+
BundleMethod,
|
|
211
|
+
BundleRedirectInput,
|
|
212
|
+
BundleRedirectRule,
|
|
213
|
+
BundleRedirects,
|
|
214
|
+
BundleReload,
|
|
215
|
+
BundleRequest,
|
|
216
|
+
BundleSection,
|
|
217
|
+
Principal,
|
|
218
|
+
ReloadedBundle,
|
|
219
|
+
ServerBundle,
|
|
220
|
+
ServerBundleRoute,
|
|
221
|
+
} from '@crombolo/server'
|
|
222
|
+
/** @deprecated Import it from `@crombolo/crombolo/host`. */
|
|
223
|
+
/** @deprecated Import it from `@crombolo/crombolo/host`. */
|
|
224
|
+
/** @deprecated Import it from `@crombolo/crombolo/host`. */
|
|
225
|
+
/** @deprecated Import it from `@crombolo/crombolo/host`. */
|
|
226
|
+
export { checkBundleCode, createServer, installBundleCode, loadConfig } from '@crombolo/server'
|