@futdevpro/nts-dynamo 1.15.263 → 1.15.264

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.
@@ -0,0 +1,19 @@
1
+ /** The HTTP call the Leonardo adapter makes - injectable, so specs assert the requests without a network or a key. */
2
+ export type DyNTS_Leonardo_Fetch = (url: string, init: RequestInit) => Promise<Response>;
3
+ /**
4
+ * Settings of the Leonardo image adapter. Every field is optional; what is left out falls back to the environment
5
+ * (read at call time) or to the defaults the master-prompter donor runs in production.
6
+ */
7
+ export interface DyNTS_Leonardo_Settings {
8
+ /** API key. Falls back to `LEONARDO_API_KEY`. */
9
+ apiKey?: string;
10
+ /** HTTP implementation. Defaults to the global `fetch`. */
11
+ fetchImpl?: DyNTS_Leonardo_Fetch;
12
+ /** Wait between two status checks. Default 3000 ms (the donor's production value). */
13
+ pollIntervalMs?: number;
14
+ /** Give up on a generation after this long. Default 15 minutes (the donor's production value). */
15
+ timeoutMs?: number;
16
+ /** The wait itself - injectable, so specs do not sleep. Defaults to a timer. */
17
+ sleep?: (ms: number) => Promise<void>;
18
+ }
19
+ //# sourceMappingURL=leonardo-settings.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leonardo-settings.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/media-gen/_models/leonardo-settings.interface.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,MAAM,MAAM,oBAAoB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAC;AAEzF;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,iDAAiD;IACjD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,sFAAsF;IACtF,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kGAAkG;IAClG,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gFAAgF;IAChF,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=leonardo-settings.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leonardo-settings.interface.js","sourceRoot":"","sources":["../../../../src/_modules/media-gen/_models/leonardo-settings.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,47 @@
1
+ import { DyFM_AI_Image_Response, DyFM_AI_ImageGeneration_Request } from '@futdevpro/fsm-dynamo/ai';
2
+ import { DyNTS_Leonardo_Settings } from '../_models/leonardo-settings.interface';
3
+ import { DyNTS_MediaGen_Operation } from '../_models/media-gen-operation.type';
4
+ import { DyNTS_MediaGen_ServiceBase } from './media-gen.service-base';
5
+ /**
6
+ * Leonardo text-to-image adapter (REST API v1).
7
+ *
8
+ * The request and response shapes are measured, not assumed: base URL and bearer auth from the master-prompter
9
+ * donor that runs in production, the raw field names from the official `@leonardo-ai/sdk` 4.18.1 schemas
10
+ * (`POST /generations` with `modelId`, `prompt`, `num_images`, `width`, `height`, `public` → `sdGenerationJob.
11
+ * generationId`; `GET /generations/{id}` → `generations_by_pk.status` PENDING | COMPLETE | FAILED and
12
+ * `generated_images[].url`). ⚠️ Leonardo also documents a v2 API; this adapter targets v1, like the donor.
13
+ *
14
+ * 🔴 PRIVATE GENERATION IS ENFORCED (K-8): Leonardo takes a licence to content marked public, and its API reference
15
+ * does not state the default of `public` - so every request sends `public: false`, and nothing a caller passes
16
+ * can change that.
17
+ *
18
+ * One image per call: the POJO has no count, and the SDK default (4) would silently quadruple the cost.
19
+ * Knobs Leonardo v1 has no equivalent for (`quality`, `background`, `format`) are refused, not ignored.
20
+ */
21
+ export declare class DyNTS_Leonardo_Image_ControlService extends DyNTS_MediaGen_ServiceBase<DyFM_AI_ImageGeneration_Request, DyFM_AI_Image_Response> {
22
+ static readonly baseUrl: string;
23
+ static readonly defaultPollIntervalMs: number;
24
+ static readonly defaultTimeoutMs: number;
25
+ readonly provider: string;
26
+ readonly operations: readonly DyNTS_MediaGen_Operation[];
27
+ protected readonly settings: DyNTS_Leonardo_Settings;
28
+ constructor(settings?: DyNTS_Leonardo_Settings);
29
+ static getInstance(): DyNTS_Leonardo_Image_ControlService;
30
+ /** Reads a field of an unknown JSON value without assuming its shape. */
31
+ private static readField;
32
+ /**
33
+ * Generates one image: create the job, wait for it, download the result.
34
+ */
35
+ generate(operation: DyNTS_MediaGen_Operation, request: DyFM_AI_ImageGeneration_Request, issuer: string): Promise<DyFM_AI_Image_Response>;
36
+ /** `WIDTHxHEIGHT` → numbers; refuses anything else instead of letting the provider guess. */
37
+ private parseSize;
38
+ /** Polls `GET /generations/{id}` until COMPLETE; FAILED and the timeout are errors that carry the generation id. */
39
+ private waitForGeneration;
40
+ /** Downloads every generated image. The CDN URLs get NO auth header: the key must not travel to a CDN. */
41
+ private downloadImages;
42
+ /** Parses a JSON response, or throws with the status and the first 500 characters of the body. */
43
+ private readJson;
44
+ /** A refusal or failure, reported with this adapter's error settings. */
45
+ private failure;
46
+ }
47
+ //# sourceMappingURL=leonardo-image.control-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leonardo-image.control-service.d.ts","sourceRoot":"","sources":["../../../../src/_modules/media-gen/_services/leonardo-image.control-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,+BAA+B,EAAqB,MAAM,0BAA0B,CAAC;AAGtH,OAAO,EAAwB,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACvG,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAEtE;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,mCACX,SAAQ,0BAA0B,CAAC,+BAA+B,EAAE,sBAAsB,CAAC;IAE3F,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAA2C;IAC1E,MAAM,CAAC,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAQ;IACrD,MAAM,CAAC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAkB;IAE1D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAc;IACvC,QAAQ,CAAC,UAAU,EAAE,SAAS,wBAAwB,EAAE,CAAuB;IAE/E,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,uBAAuB,CAAC;gBAEzC,QAAQ,GAAE,uBAA4B;IAKlD,MAAM,CAAC,WAAW,IAAI,mCAAmC;IAIzD,yEAAyE;IACzE,OAAO,CAAC,MAAM,CAAC,SAAS;IAIxB;;OAEG;IACG,QAAQ,CACZ,SAAS,EAAE,wBAAwB,EACnC,OAAO,EAAE,+BAA+B,EACxC,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,sBAAsB,CAAC;IA2DlC,6FAA6F;IAC7F,OAAO,CAAC,SAAS;IAcjB,oHAAoH;YACtG,iBAAiB;IAwC/B,0GAA0G;YAC5F,cAAc;IAyC5B,kGAAkG;YACpF,QAAQ;IAatB,yEAAyE;IACzE,OAAO,CAAC,OAAO;CAOhB"}
@@ -0,0 +1,178 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DyNTS_Leonardo_Image_ControlService = void 0;
4
+ const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
5
+ const global_settings_const_1 = require("../../../_collections/global-settings.const");
6
+ const media_gen_service_base_1 = require("./media-gen.service-base");
7
+ /**
8
+ * Leonardo text-to-image adapter (REST API v1).
9
+ *
10
+ * The request and response shapes are measured, not assumed: base URL and bearer auth from the master-prompter
11
+ * donor that runs in production, the raw field names from the official `@leonardo-ai/sdk` 4.18.1 schemas
12
+ * (`POST /generations` with `modelId`, `prompt`, `num_images`, `width`, `height`, `public` → `sdGenerationJob.
13
+ * generationId`; `GET /generations/{id}` → `generations_by_pk.status` PENDING | COMPLETE | FAILED and
14
+ * `generated_images[].url`). ⚠️ Leonardo also documents a v2 API; this adapter targets v1, like the donor.
15
+ *
16
+ * 🔴 PRIVATE GENERATION IS ENFORCED (K-8): Leonardo takes a licence to content marked public, and its API reference
17
+ * does not state the default of `public` - so every request sends `public: false`, and nothing a caller passes
18
+ * can change that.
19
+ *
20
+ * One image per call: the POJO has no count, and the SDK default (4) would silently quadruple the cost.
21
+ * Knobs Leonardo v1 has no equivalent for (`quality`, `background`, `format`) are refused, not ignored.
22
+ */
23
+ class DyNTS_Leonardo_Image_ControlService extends media_gen_service_base_1.DyNTS_MediaGen_ServiceBase {
24
+ static baseUrl = 'https://cloud.leonardo.ai/api/rest/v1';
25
+ static defaultPollIntervalMs = 3000;
26
+ static defaultTimeoutMs = 15 * 60 * 1000;
27
+ provider = 'leonardo';
28
+ operations = ['text-to-image'];
29
+ settings;
30
+ constructor(settings = {}) {
31
+ super();
32
+ this.settings = settings;
33
+ }
34
+ static getInstance() {
35
+ return DyNTS_Leonardo_Image_ControlService.getSingletonInstance();
36
+ }
37
+ /** Reads a field of an unknown JSON value without assuming its shape. */
38
+ static readField(json, key) {
39
+ return json !== null && typeof json === 'object' ? Reflect.get(json, key) : undefined;
40
+ }
41
+ /**
42
+ * Generates one image: create the job, wait for it, download the result.
43
+ */
44
+ async generate(operation, request, issuer) {
45
+ if (!this.operations.includes(operation)) {
46
+ throw this.failure(`${this.constructor.name} does not serve '${operation}'. It serves: text-to-image.`, issuer);
47
+ }
48
+ if (!request.prompt) {
49
+ throw this.failure('The prompt is empty.', issuer);
50
+ }
51
+ if (!request.model) {
52
+ throw this.failure('A Leonardo model id is required (request.model).', issuer);
53
+ }
54
+ const unsupported = ['quality', 'background', 'format']
55
+ .filter((knob) => Reflect.get(request, knob) !== undefined);
56
+ if (unsupported.length) {
57
+ throw this.failure(`Leonardo v1 has no equivalent for: ${unsupported.join(', ')}. Leave them out.`, issuer);
58
+ }
59
+ const dimensions = this.parseSize(request.size, issuer);
60
+ const apiKey = this.settings.apiKey ?? process.env.LEONARDO_API_KEY;
61
+ if (!apiKey) {
62
+ throw this.failure('Missing Leonardo API key: pass settings.apiKey or set LEONARDO_API_KEY.', issuer);
63
+ }
64
+ const doFetch = this.settings.fetchImpl ?? ((url, init) => fetch(url, init));
65
+ const headers = { 'Content-Type': 'application/json', Authorization: `Bearer ${apiKey}` };
66
+ const createUrl = `${DyNTS_Leonardo_Image_ControlService.baseUrl}/generations`;
67
+ const created = await this.readJson(await doFetch(createUrl, {
68
+ method: 'POST',
69
+ headers: headers,
70
+ body: JSON.stringify({
71
+ modelId: request.model,
72
+ prompt: request.prompt,
73
+ num_images: 1,
74
+ ...(dimensions ?? {}),
75
+ public: false,
76
+ }),
77
+ }), createUrl, issuer);
78
+ const generationId = DyNTS_Leonardo_Image_ControlService.readField(DyNTS_Leonardo_Image_ControlService.readField(created, 'sdGenerationJob'), 'generationId');
79
+ if (typeof generationId !== 'string' || !generationId) {
80
+ throw this.failure(`Leonardo returned no generation id (${createUrl}).`, issuer);
81
+ }
82
+ const generation = await this.waitForGeneration(generationId, doFetch, headers, issuer);
83
+ const images = await this.downloadImages(generation, generationId, doFetch, issuer);
84
+ return {
85
+ provider: this.provider,
86
+ model: request.model,
87
+ images: images,
88
+ rawResponse: generation,
89
+ };
90
+ }
91
+ /** `WIDTHxHEIGHT` → numbers; refuses anything else instead of letting the provider guess. */
92
+ parseSize(size, issuer) {
93
+ if (size === undefined) {
94
+ return undefined;
95
+ }
96
+ const match = /^(\d+)x(\d+)$/.exec(size);
97
+ if (!match) {
98
+ throw this.failure(`Invalid size '${size}': expected WIDTHxHEIGHT, e.g. 1024x768.`, issuer);
99
+ }
100
+ return { width: Number(match[1]), height: Number(match[2]) };
101
+ }
102
+ /** Polls `GET /generations/{id}` until COMPLETE; FAILED and the timeout are errors that carry the generation id. */
103
+ async waitForGeneration(generationId, doFetch, headers, issuer) {
104
+ const intervalMs = this.settings.pollIntervalMs ?? DyNTS_Leonardo_Image_ControlService.defaultPollIntervalMs;
105
+ const timeoutMs = this.settings.timeoutMs ?? DyNTS_Leonardo_Image_ControlService.defaultTimeoutMs;
106
+ const maxChecks = Math.max(1, Math.ceil(timeoutMs / intervalMs));
107
+ const sleep = this.settings.sleep
108
+ ?? ((ms) => new Promise((resolve) => {
109
+ setTimeout(resolve, ms);
110
+ }));
111
+ const url = `${DyNTS_Leonardo_Image_ControlService.baseUrl}/generations/${encodeURIComponent(generationId)}`;
112
+ for (let check = 1; check <= maxChecks; check++) {
113
+ const json = await this.readJson(await doFetch(url, { method: 'GET', headers: headers }), url, issuer);
114
+ const generation = DyNTS_Leonardo_Image_ControlService.readField(json, 'generations_by_pk');
115
+ const status = DyNTS_Leonardo_Image_ControlService.readField(generation, 'status');
116
+ if (status === 'COMPLETE') {
117
+ return generation;
118
+ }
119
+ if (status === 'FAILED') {
120
+ throw this.failure(`Leonardo generation ${generationId} FAILED.`, issuer, { generationId: generationId });
121
+ }
122
+ if (check < maxChecks) {
123
+ await sleep(intervalMs);
124
+ }
125
+ }
126
+ throw this.failure(`Leonardo generation ${generationId} did not complete within ${timeoutMs} ms (${maxChecks} checks).`, issuer, { generationId: generationId });
127
+ }
128
+ /** Downloads every generated image. The CDN URLs get NO auth header: the key must not travel to a CDN. */
129
+ async downloadImages(generation, generationId, doFetch, issuer) {
130
+ const entries = DyNTS_Leonardo_Image_ControlService.readField(generation, 'generated_images');
131
+ const urls = (Array.isArray(entries) ? entries : [])
132
+ .map((entry) => DyNTS_Leonardo_Image_ControlService.readField(entry, 'url'))
133
+ .filter((url) => typeof url === 'string' && !!url);
134
+ if (!urls.length) {
135
+ throw this.failure(`Leonardo generation ${generationId} completed without image URLs.`, issuer, {
136
+ generationId: generationId,
137
+ });
138
+ }
139
+ const images = [];
140
+ for (const url of urls) {
141
+ const response = await doFetch(url, { method: 'GET' });
142
+ if (!response.ok) {
143
+ throw this.failure(`Downloading a Leonardo image failed: HTTP ${response.status} (${url}).`, issuer, {
144
+ generationId: generationId,
145
+ status: response.status,
146
+ });
147
+ }
148
+ const bytes = Buffer.from(await response.arrayBuffer());
149
+ images.push({
150
+ name: url.split('/').pop(),
151
+ mimeType: response.headers.get('content-type') ?? 'application/octet-stream',
152
+ base64: bytes.toString('base64'),
153
+ });
154
+ }
155
+ return images;
156
+ }
157
+ /** Parses a JSON response, or throws with the status and the first 500 characters of the body. */
158
+ async readJson(response, url, issuer) {
159
+ if (!response.ok) {
160
+ const detail = await response.text().catch(() => '');
161
+ throw this.failure(`Leonardo HTTP ${response.status}: ${detail.slice(0, 500)}`, issuer, {
162
+ status: response.status,
163
+ url: url,
164
+ });
165
+ }
166
+ return response.json();
167
+ }
168
+ /** A refusal or failure, reported with this adapter's error settings. */
169
+ failure(message, issuer, additionalContent) {
170
+ return new fsm_dynamo_1.DyFM_Error({
171
+ ...this.getDefaultErrorSettings('generate', new Error(message), issuer),
172
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-MG-LEO`,
173
+ ...(additionalContent ? { additionalContent: additionalContent } : {}),
174
+ });
175
+ }
176
+ }
177
+ exports.DyNTS_Leonardo_Image_ControlService = DyNTS_Leonardo_Image_ControlService;
178
+ //# sourceMappingURL=leonardo-image.control-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"leonardo-image.control-service.js","sourceRoot":"","sources":["../../../../src/_modules/media-gen/_services/leonardo-image.control-service.ts"],"names":[],"mappings":";;;AAAA,sDAAmD;AAGnD,uFAAoF;AAGpF,qEAAsE;AAEtE;;;;;;;;;;;;;;;GAeG;AACH,MAAa,mCACX,SAAQ,mDAAmF;IAE3F,MAAM,CAAU,OAAO,GAAW,uCAAuC,CAAC;IAC1E,MAAM,CAAU,qBAAqB,GAAW,IAAI,CAAC;IACrD,MAAM,CAAU,gBAAgB,GAAW,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;IAEjD,QAAQ,GAAW,UAAU,CAAC;IAC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,CAAC,uBAAuB,CAAC,UAAU,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;YACvE,SAAS,EAAE,GAAG,6CAAqB,CAAC,mBAAmB,eAAe;YACtE,GAAG,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SACvE,CAAC,CAAC;IACL,CAAC;;AAnNH,kFAoNC"}
@@ -1,4 +1,5 @@
1
1
  export * from './_models/elevenlabs-settings.interface';
2
+ export * from './_models/leonardo-settings.interface';
2
3
  export * from './_models/media-gen-operation.type';
3
4
  export * from './_collections/elevenlabs-region.util';
4
5
  export * from './_collections/media-gen-prompt.util';
@@ -7,4 +8,5 @@ export * from './_services/media-gen.registry';
7
8
  export * from './_services/elevenlabs.service-base';
8
9
  export * from './_services/elevenlabs-speak.control-service';
9
10
  export * from './_services/elevenlabs-transcribe.control-service';
11
+ export * from './_services/leonardo-image.control-service';
10
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_modules/media-gen/index.ts"],"names":[],"mappings":"AAUA,cAAc,yCAAyC,CAAC;AACxD,cAAc,oCAAoC,CAAC;AAGnD,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AAGrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/_modules/media-gen/index.ts"],"names":[],"mappings":"AAUA,cAAc,yCAAyC,CAAC;AACxD,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC;AAGnD,cAAc,uCAAuC,CAAC;AACtD,cAAc,sCAAsC,CAAC;AAGrD,cAAc,oCAAoC,CAAC;AACnD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,mDAAmD,CAAC;AAClE,cAAc,4CAA4C,CAAC"}
@@ -9,6 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  const tslib_1 = require("tslib");
10
10
  // MODELS
11
11
  tslib_1.__exportStar(require("./_models/elevenlabs-settings.interface"), exports);
12
+ tslib_1.__exportStar(require("./_models/leonardo-settings.interface"), exports);
12
13
  tslib_1.__exportStar(require("./_models/media-gen-operation.type"), exports);
13
14
  // COLLECTIONS
14
15
  tslib_1.__exportStar(require("./_collections/elevenlabs-region.util"), exports);
@@ -19,4 +20,5 @@ tslib_1.__exportStar(require("./_services/media-gen.registry"), exports);
19
20
  tslib_1.__exportStar(require("./_services/elevenlabs.service-base"), exports);
20
21
  tslib_1.__exportStar(require("./_services/elevenlabs-speak.control-service"), exports);
21
22
  tslib_1.__exportStar(require("./_services/elevenlabs-transcribe.control-service"), exports);
23
+ tslib_1.__exportStar(require("./_services/leonardo-image.control-service"), exports);
22
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/media-gen/index.ts"],"names":[],"mappings":";AACA,EAAE;AACF,6DAA6D;AAC7D,EAAE;AACF,2GAA2G;AAC3G,6FAA6F;AAC7F,EAAE;;;AAGF,SAAS;AACT,kFAAwD;AACxD,6EAAmD;AAEnD,cAAc;AACd,gFAAsD;AACtD,+EAAqD;AAErD,WAAW;AACX,6EAAmD;AACnD,yEAA+C;AAC/C,8EAAoD;AACpD,uFAA6D;AAC7D,4FAAkE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/media-gen/index.ts"],"names":[],"mappings":";AACA,EAAE;AACF,6DAA6D;AAC7D,EAAE;AACF,2GAA2G;AAC3G,6FAA6F;AAC7F,EAAE;;;AAGF,SAAS;AACT,kFAAwD;AACxD,gFAAsD;AACtD,6EAAmD;AAEnD,cAAc;AACd,gFAAsD;AACtD,+EAAqD;AAErD,WAAW;AACX,6EAAmD;AACnD,yEAA+C;AAC/C,8EAAoD;AACpD,uFAA6D;AAC7D,4FAAkE;AAClE,qFAA2D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@futdevpro/nts-dynamo",
3
- "version": "01.15.263",
3
+ "version": "01.15.264",
4
4
  "description": "Dynamic NodeTS (NodeJS-Typescript), MongoDB Backend System Framework by Future Development Program Ltd.",
5
5
  "DyBu_settings": {
6
6
  "packageType": "server-package",