c8y-nitro 0.6.0 → 0.7.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,17 +1,416 @@
1
- import { t as createError } from "../../logging-CVlaRS4O.mjs";
1
+ import { t as createError } from "../../logging-BUYT8Z2V.mjs";
2
+ import { t as useDeployedTenantClient } from "../../client-DxmbyZju.mjs";
2
3
  import { c8yTenantOptionKeys } from "c8y-nitro/runtime";
4
+ import { defineCachedFunction } from "nitro/cache";
5
+ import { useRuntimeConfig } from "nitro/runtime-config";
3
6
  import { defineEventHandler, getQuery } from "nitro/h3";
4
7
  //#region src/utils/internal/tenantOptionFetchers.ts
5
8
  /**
6
- * Internal storage for cached functions per key
9
+ * Internal storage for cached option fetchers, keyed by
10
+ * `${tenant}::${category}::${key}`.
11
+ *
12
+ * Including the tenant and category in the key keeps options from different
13
+ * tenants (multi-tenancy) and settings categories from colliding on a shared
14
+ * `key`.
7
15
  */
8
16
  const tenantOptionFetchers = {};
17
+ /**
18
+ * Builds the composite store key for a tenant/category/key triple.
19
+ * @param tenant - The tenant id owning the option
20
+ * @param category - The settings category
21
+ * @param key - The tenant option key
22
+ */
23
+ function fetcherStoreKey(tenant, category, key) {
24
+ return `${tenant}::${category}::${key}`;
25
+ }
26
+ //#endregion
27
+ //#region src/utils/tenantOptions.ts
28
+ /**
29
+ * The microservice's own settings category, resolved once from runtime config
30
+ * (`manifest.settingsCategory` → `contextPath` → `name`). This is independent of
31
+ * which tenant is targeted.
32
+ */
33
+ function getOwnCategory() {
34
+ return useRuntimeConfig().c8ySettingsCategory;
35
+ }
36
+ /**
37
+ * Resolves the tenant id a client operates on, used for per-tenant cache keys.
38
+ *
39
+ * Prefers the stamped `client.core.tenant` (set by the `use*Client` helpers);
40
+ * otherwise resolves it on demand via `/tenant/currentTenant` and memoizes it
41
+ * back onto the client.
42
+ * @param client - The Cumulocity client
43
+ */
44
+ async function resolveClientTenant(client) {
45
+ if (client.core.tenant) return client.core.tenant;
46
+ const res = await client.core.fetch("/tenant/currentTenant", {
47
+ method: "GET",
48
+ headers: { Accept: "application/json" }
49
+ });
50
+ const tenant = res.ok ? (await res.json())?.name : void 0;
51
+ if (!tenant) throw createError({
52
+ status: 500,
53
+ message: "Could not determine the target tenant",
54
+ fix: "This is unexpected. Retry the request, and contact the microservice operator if it keeps happening.",
55
+ internal: {
56
+ reason: res.ok ? "GET /tenant/currentTenant returned no tenant name" : "GET /tenant/currentTenant failed",
57
+ upstreamStatus: res.status
58
+ }
59
+ });
60
+ client.core.tenant = tenant;
61
+ return tenant;
62
+ }
63
+ /**
64
+ * Builds the Cumulocity Options API path for a category (and optional key).
65
+ * @param category - The settings category
66
+ * @param key - The tenant option key (omit for category-level operations)
67
+ */
68
+ function optionsPath(category, key) {
69
+ const base = `/tenant/options/${encodeURIComponent(category)}`;
70
+ return key === void 0 ? base : `${base}/${encodeURIComponent(key)}`;
71
+ }
72
+ /**
73
+ * Cumulocity role required to read tenant options.
74
+ */
75
+ const OPTION_READ_ROLE = "ROLE_OPTION_MANAGEMENT_READ";
76
+ /**
77
+ * Cumulocity role required to create, update or delete tenant options.
78
+ */
79
+ const OPTION_ADMIN_ROLE = "ROLE_OPTION_MANAGEMENT_ADMIN";
80
+ /**
81
+ * Builds a structured error for a failed Options API request.
82
+ *
83
+ * A failed options request is a microservice/config problem (e.g. a missing
84
+ * `ROLE_OPTION_MANAGEMENT_*` role), not something the frontend caller can act on
85
+ * — so the response is a **generic 500** that reveals nothing about tenant
86
+ * options. All the diagnostic detail (which operation, upstream status, internal
87
+ * endpoint/method, and the Cumulocity role it needs) goes into `internal`, which
88
+ * is logged for debugging but never serialized to the HTTP response.
89
+ * @param status - The upstream HTTP status (for `internal`)
90
+ * @param operation - A human-readable summary of the failed operation (for `internal`)
91
+ * @param internal - Backend-only debugging context (endpoint, method, required role)
92
+ */
93
+ function optionRequestError(status, operation, internal) {
94
+ return createError({
95
+ status: 500,
96
+ message: "Internal Server Error",
97
+ internal: {
98
+ operation,
99
+ upstreamStatus: status,
100
+ ...internal
101
+ }
102
+ });
103
+ }
104
+ /**
105
+ * Reads a single option value directly from the Options API.
106
+ * Returns `undefined` when the option is not set (404).
107
+ * @param client - The Cumulocity client (determines tenant + auth)
108
+ * @param category - The settings category
109
+ * @param key - The tenant option key
110
+ */
111
+ async function fetchOptionValue(client, category, key) {
112
+ const endpoint = optionsPath(category, key);
113
+ const res = await client.core.fetch(endpoint, {
114
+ method: "GET",
115
+ headers: { Accept: "application/json" }
116
+ });
117
+ if (res.status === 404) return;
118
+ if (!res.ok) throw optionRequestError(res.status, `Failed to read tenant option '${key}'`, {
119
+ method: "GET",
120
+ endpoint,
121
+ requiredRole: OPTION_READ_ROLE
122
+ });
123
+ return (await res.json())?.value;
124
+ }
125
+ /**
126
+ * Creates or updates a single option value (upsert) via the Options API.
127
+ * @param client - The Cumulocity client (determines tenant + auth)
128
+ * @param category - The settings category
129
+ * @param key - The tenant option key
130
+ * @param value - The value to store
131
+ */
132
+ async function putOptionValue(client, category, key, value) {
133
+ const endpoint = optionsPath(category, key);
134
+ const res = await client.core.fetch(endpoint, {
135
+ method: "PUT",
136
+ headers: {
137
+ "Content-Type": "application/json",
138
+ "Accept": "application/json"
139
+ },
140
+ body: JSON.stringify({ value })
141
+ });
142
+ if (!res.ok) throw optionRequestError(res.status, `Failed to set tenant option '${key}'`, {
143
+ method: "PUT",
144
+ endpoint,
145
+ requiredRole: OPTION_ADMIN_ROLE
146
+ });
147
+ }
148
+ /**
149
+ * Deletes a single option via the Options API. Idempotent: a 404 resolves.
150
+ * @param client - The Cumulocity client (determines tenant + auth)
151
+ * @param category - The settings category
152
+ * @param key - The tenant option key
153
+ */
154
+ async function deleteOptionValue(client, category, key) {
155
+ const endpoint = optionsPath(category, key);
156
+ const res = await client.core.fetch(endpoint, {
157
+ method: "DELETE",
158
+ headers: { Accept: "application/json" }
159
+ });
160
+ if (res.status === 404) return;
161
+ if (!res.ok) throw optionRequestError(res.status, `Failed to delete tenant option '${key}'`, {
162
+ method: "DELETE",
163
+ endpoint,
164
+ requiredRole: OPTION_ADMIN_ROLE
165
+ });
166
+ }
167
+ /**
168
+ * Updates the `editable` flag of a single option (management tenant only).
169
+ * @param client - The Cumulocity client (must be the management tenant)
170
+ * @param category - The settings category
171
+ * @param key - The tenant option key
172
+ * @param editable - Whether the option may be edited
173
+ * @param targetTenant - The tenant whose option flag is updated
174
+ */
175
+ async function putOptionEditable(client, category, key, editable, targetTenant) {
176
+ const endpoint = `${optionsPath(category, key)}/editable`;
177
+ const res = await client.core.fetch(`${endpoint}?targetTenant=${encodeURIComponent(targetTenant)}`, {
178
+ method: "PUT",
179
+ headers: {
180
+ "Content-Type": "application/json",
181
+ "Accept": "application/json"
182
+ },
183
+ body: JSON.stringify({ editable })
184
+ });
185
+ if (!res.ok) throw optionRequestError(res.status, `Failed to update editable flag for tenant option '${key}'`, {
186
+ method: "PUT",
187
+ endpoint,
188
+ targetTenant,
189
+ requiredRole: `${OPTION_ADMIN_ROLE} (management tenant only)`
190
+ });
191
+ }
192
+ /**
193
+ * Lists all options set in a category as a key/value map.
194
+ * @param client - The Cumulocity client (determines tenant + auth)
195
+ * @param category - The settings category
196
+ */
197
+ async function listCategoryOptions(client, category) {
198
+ const endpoint = optionsPath(category);
199
+ const res = await client.core.fetch(endpoint, {
200
+ method: "GET",
201
+ headers: { Accept: "application/json" }
202
+ });
203
+ if (res.status === 404) return {};
204
+ if (!res.ok) throw optionRequestError(res.status, `Failed to list tenant options for category '${category}'`, {
205
+ method: "GET",
206
+ endpoint,
207
+ requiredRole: OPTION_READ_ROLE
208
+ });
209
+ return { ...await res.json() };
210
+ }
211
+ /**
212
+ * Gets the cache TTL for a specific tenant option key.
213
+ * Uses per-key override if defined, otherwise falls back to the default TTL.
214
+ * @param key - The tenant option key
215
+ */
216
+ function getTenantOptionCacheTTL(key) {
217
+ const config = useRuntimeConfig();
218
+ return config.c8yTenantOptionsPerKeyTTL?.[key] ?? config.c8yDefaultTenantOptionsTTL ?? 600;
219
+ }
220
+ /**
221
+ * Factory that creates a cached read fetcher for a specific tenant/category/key.
222
+ * All fetchers share the same cache group so they can be invalidated together.
223
+ * @param client - The Cumulocity client (determines tenant + auth)
224
+ * @param tenant - The tenant id (for the cache key)
225
+ * @param category - The settings category
226
+ * @param key - The tenant option key
227
+ */
228
+ function createCachedTenantOptionFetcher(client, tenant, category, key) {
229
+ const cacheName = `_c8y_nitro_tenant_option_${fetcherStoreKey(tenant, category, key).replace(/[^a-zA-Z0-9]/g, "_")}`;
230
+ const cachedFetcher = defineCachedFunction(async () => fetchOptionValue(client, category, key), {
231
+ maxAge: getTenantOptionCacheTTL(key),
232
+ name: cacheName,
233
+ group: "c8y_nitro",
234
+ swr: false
235
+ });
236
+ return Object.assign(cachedFetcher, { refresh: async () => {
237
+ await cachedFetcher.invalidate();
238
+ return await cachedFetcher();
239
+ } });
240
+ }
241
+ /**
242
+ * Gets or creates the cached read fetcher for a tenant/category/key triple.
243
+ * @param client - The Cumulocity client (determines tenant + auth)
244
+ * @param tenant - The resolved tenant id
245
+ * @param category - The settings category
246
+ * @param key - The tenant option key
247
+ */
248
+ function getOrCreateFetcher(client, tenant, category, key) {
249
+ const storeKey = fetcherStoreKey(tenant, category, key);
250
+ let fetcher = tenantOptionFetchers[storeKey];
251
+ if (!fetcher) {
252
+ fetcher = createCachedTenantOptionFetcher(client, tenant, category, key);
253
+ tenantOptionFetchers[storeKey] = fetcher;
254
+ }
255
+ return fetcher;
256
+ }
257
+ /**
258
+ * Invalidates the cached read for a store key, if one has been created.
259
+ * @param storeKey - The composite `${tenant}::${category}::${key}` store key
260
+ */
261
+ async function invalidateStoreKey(storeKey) {
262
+ const fetcher = tenantOptionFetchers[storeKey];
263
+ if (fetcher) await fetcher.invalidate();
264
+ }
265
+ /**
266
+ * Invalidates every created fetcher whose store key matches the predicate.
267
+ * @param predicate - Selects store keys to invalidate
268
+ */
269
+ async function invalidateFetchers(predicate) {
270
+ await Promise.all(Object.entries(tenantOptionFetchers).filter(([storeKey]) => predicate(storeKey)).map(([, fetcher]) => fetcher.invalidate()));
271
+ }
272
+ /**
273
+ * Refreshes every created fetcher whose store key matches the predicate.
274
+ * @param predicate - Selects store keys to refresh
275
+ * @returns Map of matched store keys to their refreshed values
276
+ */
277
+ async function refreshFetchers(predicate) {
278
+ const entries = Object.entries(tenantOptionFetchers).filter(([storeKey]) => predicate(storeKey));
279
+ const values = await Promise.all(entries.map(([, fetcher]) => fetcher.refresh()));
280
+ return Object.fromEntries(entries.map(([storeKey], i) => [storeKey, values[i]]));
281
+ }
282
+ /**
283
+ * Builds a single-option handle for a client/category/key.
284
+ * @param client - The Cumulocity client (determines tenant + auth)
285
+ * @param category - The settings category
286
+ * @param key - The tenant option key
287
+ */
288
+ function makeTenantOption(client, category, key) {
289
+ const currentStoreKey = async () => fetcherStoreKey(await resolveClientTenant(client), category, key);
290
+ const readFetcher = async () => getOrCreateFetcher(client, await resolveClientTenant(client), category, key);
291
+ return {
292
+ read: async () => (await readFetcher())(),
293
+ set: async (value) => {
294
+ await putOptionValue(client, category, key, value);
295
+ await invalidateStoreKey(await currentStoreKey());
296
+ },
297
+ getOrInsert: async (fallback) => {
298
+ const current = await (await readFetcher())();
299
+ if (current !== void 0) return current;
300
+ await putOptionValue(client, category, key, fallback);
301
+ await invalidateStoreKey(await currentStoreKey());
302
+ return fallback;
303
+ },
304
+ delete: async () => {
305
+ await deleteOptionValue(client, category, key);
306
+ await invalidateStoreKey(await currentStoreKey());
307
+ },
308
+ setEditable: async (editable, options) => {
309
+ await putOptionEditable(client, category, key, editable, options.targetTenant);
310
+ await invalidateStoreKey(await currentStoreKey());
311
+ },
312
+ refresh: async () => (await readFetcher()).refresh(),
313
+ invalidate: async () => invalidateStoreKey(await currentStoreKey())
314
+ };
315
+ }
316
+ /**
317
+ * Builds a category handle. The runtime shape is identical for the own and
318
+ * foreign categories; the public overloads differ only at the type level.
319
+ * @param client - The Cumulocity client (determines tenant + auth)
320
+ * @param category - The settings category
321
+ */
322
+ function makeTenantOptionCategory(client, category) {
323
+ const categoryPrefix = async () => `${await resolveClientTenant(client)}::${category}::`;
324
+ return {
325
+ option: (key) => makeTenantOption(client, category, key),
326
+ list: () => listCategoryOptions(client, category),
327
+ setAll: async (values) => {
328
+ const entries = Object.entries(values);
329
+ await Promise.all(entries.map(([key, value]) => putOptionValue(client, category, key, value)));
330
+ const tenant = await resolveClientTenant(client);
331
+ await Promise.all(entries.map(([key]) => invalidateStoreKey(fetcherStoreKey(tenant, category, key))));
332
+ },
333
+ invalidateAll: async () => {
334
+ const prefix = await categoryPrefix();
335
+ await invalidateFetchers((storeKey) => storeKey.startsWith(prefix));
336
+ },
337
+ refreshAll: async () => {
338
+ const prefix = await categoryPrefix();
339
+ const refreshed = await refreshFetchers((storeKey) => storeKey.startsWith(prefix));
340
+ return Object.fromEntries(Object.entries(refreshed).map(([storeKey, value]) => [storeKey.slice(prefix.length), value]));
341
+ }
342
+ };
343
+ }
344
+ /**
345
+ * Gets a handle for a single tenant option in the microservice's **own** settings
346
+ * category, targeting the tenant of the given `client`.\
347
+ * Reads are cached per tenant, using the client's service user credentials.
348
+ *
349
+ * This is a shortcut for `useTenantOptions(client).option(key)` — it only drops
350
+ * the category argument. For a single option in a **foreign** category, use
351
+ * `useTenantOptions(client, category).option(key)`.
352
+ *
353
+ * Manifest-declared keys are offered via autocomplete, but any dynamic string
354
+ * is accepted too (e.g. `encrypted.password.${hash}`).
355
+ *
356
+ * @param client - The Cumulocity client that determines the target tenant
357
+ * @param key - The tenant option key
358
+ *
359
+ * @config Cache TTL can be configured via:
360
+ * - `c8y.cache.defaultTenantOptionsTTL` — Default TTL for all keys (in seconds)
361
+ * - `c8y.cache.tenantOptions` — Per-key TTL overrides
362
+ * - `NITRO_C8Y_DEFAULT_TENANT_OPTIONS_TTL` — Environment variable for default TTL
363
+ *
364
+ * @example
365
+ * // Read the owner tenant's config:
366
+ * const value = await useTenantOption(await useDeployedTenantClient(), 'featureMode').read()
367
+ *
368
+ * // Read the current request tenant's config (multi-tenant):
369
+ * const value = await useTenantOption(await useUserTenantClient(event), 'featureMode').read()
370
+ *
371
+ * // Create or update, or seed a dynamic key:
372
+ * await useTenantOption(client, 'featureMode').set('advanced')
373
+ * const token = await useTenantOption(client, `encrypted.password.${hash}`).getOrInsert('')
374
+ */
375
+ function useTenantOption(client, key) {
376
+ return makeTenantOption(client, getOwnCategory(), key);
377
+ }
378
+ const useTenantOptionsBase = ((client, category) => makeTenantOptionCategory(client, category ?? getOwnCategory()));
379
+ /**
380
+ * Gets a handle for a whole settings category, targeting the tenant of the given
381
+ * `client`.\
382
+ * Omit the category (or pass the own {@link C8YSettingsCategory}) for the
383
+ * microservice's own category; pass any other category to read/write options in
384
+ * a foreign category (where `credentials.*` keys are rejected).
385
+ *
386
+ * @param client - The Cumulocity client that determines the target tenant
387
+ *
388
+ * @example
389
+ * const client = await useUserTenantClient(event)
390
+ *
391
+ * // Own category:
392
+ * const values = await useTenantOptions(client).list()
393
+ * await useTenantOptions(client).option('featureMode').set('advanced')
394
+ *
395
+ * // Foreign category:
396
+ * const value = await useTenantOptions(client, 'other-service').option('someKey').read()
397
+ *
398
+ * // Invalidate all cached options of one tenant + category:
399
+ * await useTenantOptions(client, 'other-service').invalidateAll()
400
+ *
401
+ * // Invalidate everything, across all tenants and categories:
402
+ * await useTenantOptions.invalidateAll()
403
+ */
404
+ const useTenantOptions = Object.assign(useTenantOptionsBase, {
405
+ invalidateAll: () => invalidateFetchers(() => true),
406
+ refreshAll: () => refreshFetchers(() => true)
407
+ });
9
408
  //#endregion
10
409
  //#region src/module/runtime/handlers/invalidateTenantOptions.ts
11
410
  var invalidateTenantOptions_default = defineEventHandler(async (event) => {
12
411
  const query = getQuery(event);
13
412
  if ("all" in query) {
14
- await Promise.all(Object.values(tenantOptionFetchers).map((fetcher) => fetcher?.invalidate()));
413
+ await useTenantOptions.invalidateAll();
15
414
  return { message: "success" };
16
415
  }
17
416
  const key = Array.isArray(query.key) ? query.key[0] : query.key;
@@ -27,8 +426,7 @@ var invalidateTenantOptions_default = defineEventHandler(async (event) => {
27
426
  why: "Only tenant option keys declared in manifest.settings can be invalidated via this route",
28
427
  fix: "Use ?all to invalidate all created tenant option caches or provide a valid manifest-defined key in ?key"
29
428
  });
30
- const fetcher = tenantOptionFetchers[key];
31
- if (fetcher) await fetcher.invalidate();
429
+ await useTenantOption(await useDeployedTenantClient(), key).invalidate();
32
430
  return { message: "success" };
33
431
  });
34
432
  //#endregion
@@ -0,0 +1,56 @@
1
+ import { n as getUserTenantDomain } from "../../client-DxmbyZju.mjs";
2
+ import { c8yManifest } from "c8y-nitro/runtime";
3
+ import { useRuntimeConfig } from "nitro/runtime-config";
4
+ import { getRequestURL } from "nitro/h3";
5
+ import { defineMiddleware } from "nitro";
6
+ //#region src/module/runtime/handlers/openapi.ts
7
+ function isOpenAPIDocument(value) {
8
+ return Boolean(value) && typeof value === "object" && "openapi" in value;
9
+ }
10
+ function joinURLSegments(origin, ...segments) {
11
+ const path = segments.map((segment) => segment?.replace(/^\/+|\/+$/g, "") ?? "").filter((segment) => segment.length > 0).join("/");
12
+ return path ? `${origin}/${path}` : origin;
13
+ }
14
+ async function resolveServer(event) {
15
+ const baseURL = useRuntimeConfig().app?.baseURL;
16
+ const contextPath = c8yManifest.contextPath ?? c8yManifest.name;
17
+ if (!import.meta.dev) try {
18
+ const domain = await getUserTenantDomain(event);
19
+ if (domain) return {
20
+ url: joinURLSegments(`https://${domain}`, "service", contextPath, baseURL),
21
+ description: "Cumulocity microservice endpoint"
22
+ };
23
+ } catch {}
24
+ const requestUrl = getRequestURL(event, {
25
+ xForwardedHost: true,
26
+ xForwardedProto: true
27
+ });
28
+ if (event.req.headers.has("x-forwarded-host")) return {
29
+ url: joinURLSegments(requestUrl.origin, "service", contextPath, baseURL),
30
+ description: "Cumulocity microservice endpoint"
31
+ };
32
+ return {
33
+ url: joinURLSegments(requestUrl.origin, baseURL),
34
+ description: "Direct server endpoint"
35
+ };
36
+ }
37
+ /**
38
+ * Transforms the OpenAPI document generated by Nitro for Cumulocity microservices:
39
+ * strips internal routes (probes, `/_c8y_nitro/**`, the spec/UI routes themselves)
40
+ * and rewrites the advertised server URL to the public tenant endpoint instead of
41
+ * the internal (e.g. cluster-local) host the service listens on.
42
+ */
43
+ var openapi_default = defineMiddleware(async (event, next) => {
44
+ const runtimeConfig = useRuntimeConfig();
45
+ const specRoute = runtimeConfig.nitro?.openAPI?.route || "/_openapi.json";
46
+ const baseURL = (runtimeConfig.app?.baseURL ?? "/").replace(/\/+$/, "");
47
+ if (event.url.pathname !== `${baseURL}${specRoute}`) return next();
48
+ const body = await next();
49
+ if (!isOpenAPIDocument(body)) return body;
50
+ const excludedPrefixes = runtimeConfig.c8yOpenApiExcludeRoutes ?? [];
51
+ if (body.paths && excludedPrefixes.length > 0) body.paths = Object.fromEntries(Object.entries(body.paths).filter(([path]) => !excludedPrefixes.some((prefix) => path.startsWith(prefix))));
52
+ body.servers = [await resolveServer(event)];
53
+ return body;
54
+ });
55
+ //#endregion
56
+ export { openapi_default as default };
@@ -1,6 +1,6 @@
1
- import { t as createError } from "../../logging-CVlaRS4O.mjs";
2
- import { defineMiddleware } from "nitro";
1
+ import { t as createError } from "../../logging-BUYT8Z2V.mjs";
3
2
  import process from "node:process";
3
+ import { defineMiddleware } from "nitro";
4
4
  //#region src/module/runtime/middlewares/c8y-client.ts
5
5
  function isC8yClientThrownResponse(error) {
6
6
  if (!error || typeof error !== "object") return false;
@@ -1,6 +1,6 @@
1
- import { defineHandler } from "nitro/h3";
2
- import process from "node:process";
3
1
  import { Buffer } from "node:buffer";
2
+ import process from "node:process";
3
+ import { defineHandler } from "nitro/h3";
4
4
  import consola from "consola";
5
5
  //#region src/module/runtime/middlewares/dev-user.dev.ts
6
6
  var dev_user_dev_default = defineHandler((event) => {
@@ -1,5 +1,5 @@
1
- import { definePlugin } from "nitro";
2
1
  import process from "node:process";
2
+ import { definePlugin } from "nitro";
3
3
  //#region src/module/runtime/plugins/c8y-variables.dev.ts
4
4
  var c8y_variables_dev_default = definePlugin(() => {
5
5
  if (import.meta.dev) {
package/dist/types.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { a as C8YRoles, c as C8YManifest, i as C8YTenantOptionKeysCacheConfig, l as C8YManifestOptions, n as C8yNitroModuleOptions, o as C8yCacheOptions, r as C8YTenantOptionKey, s as C8YZipOptions, t as C8yDevOptions, u as C8YAPIClientOptions } from "./index-uOwpI6rD.mjs";
2
- import { t as TenantCredentials } from "./credentials-9FO7rTIR.mjs";
3
- export { C8YAPIClientOptions, C8YManifest, C8YManifestOptions, C8YRoles, C8YTenantOptionKey, C8YTenantOptionKeysCacheConfig, C8YZipOptions, C8yCacheOptions, C8yDevOptions, C8yNitroModuleOptions, TenantCredentials };
1
+ import { a as C8YTenantOptionKey, c as C8yDockerOptions, d as C8YManifest, f as C8YManifestOptions, i as C8YSettingsCategory, l as C8yCacheOptions, n as C8yNitroModuleOptions, o as C8YTenantOptionKeysCacheConfig, p as C8YAPIClientOptions, r as C8yOpenAPIOptions, s as C8YRoles, t as C8yDevOptions, u as C8YZipOptions } from "./index-vu4xaFkz.mjs";
2
+ import { t as TenantCredentials } from "./credentials-eKnJ7m9Y.mjs";
3
+ export { C8YAPIClientOptions, type C8YManifest, type C8YManifestOptions, C8YRoles, C8YSettingsCategory, C8YTenantOptionKey, C8YTenantOptionKeysCacheConfig, type C8YZipOptions, type C8yCacheOptions, C8yDevOptions, type C8yDockerOptions, C8yNitroModuleOptions, C8yOpenAPIOptions, type TenantCredentials };