c8y-nitro 0.10.0 → 0.10.1

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,4 +1,4 @@
1
- import { n as name, r as version, t as description } from "../package-CX0mgzB-.mjs";
1
+ import { n as name, r as version, t as description } from "../package-Bt8__Vz0.mjs";
2
2
  import { defineCommand, runMain } from "citty";
3
3
  //#region src/cli/index.ts
4
4
  const main = defineCommand({
@@ -381,6 +381,12 @@ interface C8YZipOptions {
381
381
  * @default './'
382
382
  */
383
383
  outputDir?: string;
384
+ /**
385
+ * ZIP DEFLATE compression level used for `image.tar` and `cumulocity.json`.
386
+ * Valid values are 1 (faster, larger) to 9 (slower, smaller).
387
+ * @default 6
388
+ */
389
+ compressionLevel?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
384
390
  /**
385
391
  * Configuration of the "cumulocity.json" manifest file used for the zip.
386
392
  */
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as C8yNitroModuleOptions } from "./index-DHd7xpBX.mjs";
1
+ import { n as C8yNitroModuleOptions } from "./index-BEFoDy-y.mjs";
2
2
  import { t as TenantCredentials } from "./credentials-eKnJ7m9Y.mjs";
3
3
  import { NitroModule } from "nitro/types";
4
4
  //#region src/index.d.ts
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as GENERATED_INVALIDATE_TENANT_OPTIONS_ROUTE, i as C8Y_NITRO_TYPES_FILE, n as createC8yManifestFromNitro, o as GENERATED_LIVENESS_ROUTE, r as C8Y_NITRO_TYPES_DIR, s as GENERATED_READINESS_ROUTE, t as createC8yManifest } from "./manifest-DV3UW9Dl.mjs";
2
2
  import { t as writeAPIClient } from "./apiClient-kxv5KHYJ.mjs";
3
3
  import { t as autoBootstrap } from "./autoBootstrap-DUjHuHe_.mjs";
4
- import { n as name } from "./package-CX0mgzB-.mjs";
4
+ import { n as name } from "./package-Bt8__Vz0.mjs";
5
5
  import { basename, join, resolve } from "node:path";
6
6
  import { copyFile, mkdir, writeFile } from "node:fs/promises";
7
7
  import { x } from "tinyexec";
@@ -159,9 +159,11 @@ async function createC8yZip(nitro, options = {}, dockerOptions = {}) {
159
159
  const zip = new JSZip();
160
160
  zip.file("image.tar", imageTarBuffer);
161
161
  zip.file("cumulocity.json", JSON.stringify(manifest, null, 2));
162
+ const compressionLevel = options.compressionLevel ?? 6;
162
163
  const zipBuffer = await zip.generateAsync({
163
164
  type: "nodebuffer",
164
- compression: "STORE"
165
+ compression: "DEFLATE",
166
+ compressionOptions: { level: compressionLevel }
165
167
  });
166
168
  const outputFile = resolveZipOutputPath(nitro.options.rootDir, options, manifest);
167
169
  const outputDir = join$1(outputFile, "..");
@@ -1,6 +1,6 @@
1
1
  //#region package.json
2
2
  var name = "c8y-nitro";
3
- var version = "0.10.0";
3
+ var version = "0.10.1";
4
4
  var description = "Lightning fast Cumulocity IoT microservice development powered by Nitro";
5
5
  //#endregion
6
6
  export { name as n, version as r, description as t };
package/dist/types.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { a as C8YTenantOptionKey, c as C8yDockerOptions, d as C8YManifest, f as C8YManifestOptions, g as C8YAPIClientOptions, h as C8YKnownRole, i as C8YSettingsCategory, l as C8yCacheOptions, m as C8YRoles, n as C8yNitroModuleOptions, o as C8YTenantOptionKeysCacheConfig, p as C8YRole, r as C8yOpenAPIOptions, s as C8yRealtimeOptions, t as C8yDevOptions, u as C8YZipOptions } from "./index-DHd7xpBX.mjs";
1
+ import { a as C8YTenantOptionKey, c as C8yDockerOptions, d as C8YManifest, f as C8YManifestOptions, g as C8YAPIClientOptions, h as C8YKnownRole, i as C8YSettingsCategory, l as C8yCacheOptions, m as C8YRoles, n as C8yNitroModuleOptions, o as C8YTenantOptionKeysCacheConfig, p as C8YRole, r as C8yOpenAPIOptions, s as C8yRealtimeOptions, t as C8yDevOptions, u as C8YZipOptions } from "./index-BEFoDy-y.mjs";
2
2
  import { t as TenantCredentials } from "./credentials-eKnJ7m9Y.mjs";
3
3
  export { C8YAPIClientOptions, type C8YKnownRole, type C8YManifest, type C8YManifestOptions, C8YRole, C8YRoles, C8YSettingsCategory, C8YTenantOptionKey, C8YTenantOptionKeysCacheConfig, type C8YZipOptions, type C8yCacheOptions, C8yDevOptions, type C8yDockerOptions, C8yNitroModuleOptions, C8yOpenAPIOptions, type C8yRealtimeOptions, type TenantCredentials };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "c8y-nitro",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "type": "module",
5
5
  "description": "Lightning fast Cumulocity IoT microservice development powered by Nitro",
6
6
  "keywords": [