@crombolo/api-management 0.34.0 → 0.36.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crombolo/api-management",
3
- "version": "0.34.0",
3
+ "version": "0.36.2",
4
4
  "description": "Internal to crombolo, with no compatibility promise: use @crombolo/crombolo. Umbraco-compatible Management API handlers for crombolo.",
5
5
  "license": "MIT",
6
6
  "author": "Crombolo",
@@ -28,8 +28,8 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@crombolo/content": "0.34.0",
32
- "@crombolo/contracts": "0.34.0",
33
- "@crombolo/core": "0.34.0"
31
+ "@crombolo/content": "0.36.2",
32
+ "@crombolo/contracts": "0.36.2",
33
+ "@crombolo/core": "0.36.2"
34
34
  }
35
35
  }
@@ -161,7 +161,10 @@ export function registerPackageHandlers(router: ManagementApiRouter, port: Packa
161
161
  })
162
162
 
163
163
  router.handle('GetPackageCreatedByIdDownload', async (ctx) => {
164
- const built = await port.build(ctx.params.id as string)
164
+ // Without media unless asked, as every command that writes a bundle (story 195).
165
+ const built = await port.build(ctx.params.id as string, {
166
+ withMedia: ctx.url.searchParams.get('withMedia') === 'true',
167
+ })
165
168
  if (!built) return packageNotFound()
166
169
  return new Response(built.bytes, {
167
170
  headers: {
@@ -54,6 +54,9 @@ export interface PackagePort {
54
54
  create(input: PackageDefinitionInput, id: string | undefined): Promise<PackageWriteResult>
55
55
  update(id: string, input: PackageDefinitionInput): Promise<PackageWriteResult>
56
56
  remove(id: string): Promise<'deleted' | 'notFound'>
57
- /** Serializes and packs the definition now; undefined when it is gone. */
58
- build(id: string): Promise<BuiltPackage | undefined>
57
+ /**
58
+ * Serializes and packs the definition now; undefined when it is gone. Media
59
+ * files are carried only when asked for (story 195).
60
+ */
61
+ build(id: string, options?: { withMedia?: boolean }): Promise<BuiltPackage | undefined>
59
62
  }