@carlonicora/nestjs-neo4jsonapi 3.2.3 → 3.2.4

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.
@@ -15,13 +15,49 @@ import { JsonApiServiceInterface } from "../interfaces/jsonapi.service.interface
15
15
  export declare class DescriptorBasedSerialiser extends AbstractJsonApiSerialiser implements JsonApiServiceInterface {
16
16
  protected readonly moduleRef: ModuleRef;
17
17
  protected descriptor: EntityDescriptor<any, any>;
18
- protected injectedServices: Record<string, any>;
18
+ /**
19
+ * Resolved lazily by `resolveInjectedServices()` — NEVER populate this in the
20
+ * constructor. See the comment there for why.
21
+ */
22
+ private resolvedServices?;
19
23
  constructor(serialiserFactory: JsonApiSerialiserFactory, moduleRef: ModuleRef, configService: ConfigService<BaseConfigInterface>);
20
24
  /**
21
25
  * Set the descriptor and inject required services.
22
26
  * Must be called by subclasses in their constructor.
23
27
  */
24
28
  protected setDescriptor(descriptor: EntityDescriptor<any, any>): void;
29
+ /**
30
+ * Resolve `injectServices` on FIRST USE, never at construction time.
31
+ *
32
+ * WHY THIS IS LAZY — this is load-bearing, do not inline it back into
33
+ * setDescriptor(). setDescriptor() runs from a subclass CONSTRUCTOR, i.e.
34
+ * while Nest is still instantiating the provider graph. `ModuleRef.get()`
35
+ * does not participate in that graph: it returns whatever currently sits in
36
+ * the target provider's InstanceWrapper. Nest pre-fills every wrapper with a
37
+ * PLACEHOLDER before anything is constructed (instance-wrapper.js):
38
+ *
39
+ * instancePerContext.instance = Object.create(this.metatype.prototype);
40
+ *
41
+ * and then, when it really instantiates the provider, it REPLACES that
42
+ * object rather than filling it in (injector.js, instantiateClass):
43
+ *
44
+ * instanceHost.instance = wrapper.forwardRef
45
+ * ? Object.assign(instanceHost.instance, new metatype(...instances))
46
+ * : new metatype(...instances);
47
+ *
48
+ * So a serialiser constructed BEFORE its injected service captured the
49
+ * placeholder — an object with the right prototype and ZERO own properties.
50
+ * Every constructor-injected field on it (configService, logger, …) read as
51
+ * undefined, while every other consumer of the same service worked fine,
52
+ * because they held the replacement object. Whether it broke came down to
53
+ * provider instantiation order, so it surfaced as an unrelated dependency
54
+ * bump silently reordering the graph.
55
+ *
56
+ * Resolving here instead means the lookup happens on the first serialisation
57
+ * — long after the whole graph is constructed — so it always returns the
58
+ * real instance.
59
+ */
60
+ protected resolveInjectedServices(): Record<string, any>;
25
61
  get type(): string;
26
62
  create(): JsonApiDataInterface;
27
63
  }
@@ -1 +1 @@
1
- {"version":3,"file":"descriptor.based.serialiser.d.ts","sourceRoot":"","sources":["../../../../src/core/jsonapi/serialisers/descriptor.based.serialiser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,oDAAoD,CAAC;AAEvG,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AAEnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF;;;;;GAKG;AACH,qBACa,yBAA0B,SAAQ,yBAA0B,YAAW,uBAAuB;IAMvG,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS;IALzC,SAAS,CAAC,UAAU,EAAE,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACjD,SAAS,CAAC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;gBAGnD,iBAAiB,EAAE,wBAAwB,EACxB,SAAS,EAAE,SAAS,EACvC,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC;IAKnD;;;OAGG;IACH,SAAS,CAAC,aAAa,CAAC,UAAU,EAAE,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI;IAcrE,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,MAAM,IAAI,oBAAoB;CAqH/B"}
1
+ {"version":3,"file":"descriptor.based.serialiser.d.ts","sourceRoot":"","sources":["../../../../src/core/jsonapi/serialisers/descriptor.based.serialiser.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,oDAAoD,CAAC;AAEvG,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,yCAAyC,CAAC;AAEnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAElF;;;;;GAKG;AACH,qBACa,yBAA0B,SAAQ,yBAA0B,YAAW,uBAAuB;IAUvG,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,SAAS;IATzC,SAAS,CAAC,UAAU,EAAE,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACjD;;;OAGG;IACH,OAAO,CAAC,gBAAgB,CAAC,CAAsB;gBAG7C,iBAAiB,EAAE,wBAAwB,EACxB,SAAS,EAAE,SAAS,EACvC,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC;IAKnD;;;OAGG;IACH,SAAS,CAAC,aAAa,CAAC,UAAU,EAAE,gBAAgB,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI;IAMrE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,SAAS,CAAC,uBAAuB,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAgBxD,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,MAAM,IAAI,oBAAoB;CAqH/B"}
@@ -27,7 +27,6 @@ let DescriptorBasedSerialiser = class DescriptorBasedSerialiser extends abstract
27
27
  constructor(serialiserFactory, moduleRef, configService) {
28
28
  super(serialiserFactory, configService);
29
29
  this.moduleRef = moduleRef;
30
- this.injectedServices = {};
31
30
  }
32
31
  /**
33
32
  * Set the descriptor and inject required services.
@@ -35,16 +34,55 @@ let DescriptorBasedSerialiser = class DescriptorBasedSerialiser extends abstract
35
34
  */
36
35
  setDescriptor(descriptor) {
37
36
  this.descriptor = descriptor;
38
- // Inject requested services using ModuleRef
39
- for (const ServiceClass of descriptor.injectServices || []) {
37
+ // NOTE: `descriptor.injectServices` are deliberately NOT resolved here.
38
+ // See resolveInjectedServices().
39
+ }
40
+ /**
41
+ * Resolve `injectServices` on FIRST USE, never at construction time.
42
+ *
43
+ * WHY THIS IS LAZY — this is load-bearing, do not inline it back into
44
+ * setDescriptor(). setDescriptor() runs from a subclass CONSTRUCTOR, i.e.
45
+ * while Nest is still instantiating the provider graph. `ModuleRef.get()`
46
+ * does not participate in that graph: it returns whatever currently sits in
47
+ * the target provider's InstanceWrapper. Nest pre-fills every wrapper with a
48
+ * PLACEHOLDER before anything is constructed (instance-wrapper.js):
49
+ *
50
+ * instancePerContext.instance = Object.create(this.metatype.prototype);
51
+ *
52
+ * and then, when it really instantiates the provider, it REPLACES that
53
+ * object rather than filling it in (injector.js, instantiateClass):
54
+ *
55
+ * instanceHost.instance = wrapper.forwardRef
56
+ * ? Object.assign(instanceHost.instance, new metatype(...instances))
57
+ * : new metatype(...instances);
58
+ *
59
+ * So a serialiser constructed BEFORE its injected service captured the
60
+ * placeholder — an object with the right prototype and ZERO own properties.
61
+ * Every constructor-injected field on it (configService, logger, …) read as
62
+ * undefined, while every other consumer of the same service worked fine,
63
+ * because they held the replacement object. Whether it broke came down to
64
+ * provider instantiation order, so it surfaced as an unrelated dependency
65
+ * bump silently reordering the graph.
66
+ *
67
+ * Resolving here instead means the lookup happens on the first serialisation
68
+ * — long after the whole graph is constructed — so it always returns the
69
+ * real instance.
70
+ */
71
+ resolveInjectedServices() {
72
+ if (this.resolvedServices)
73
+ return this.resolvedServices;
74
+ const services = {};
75
+ for (const ServiceClass of this.descriptor.injectServices || []) {
40
76
  try {
41
- this.injectedServices[ServiceClass.name] = this.moduleRef.get(ServiceClass, { strict: false });
77
+ services[ServiceClass.name] = this.moduleRef.get(ServiceClass, { strict: false });
42
78
  }
43
79
  catch {
44
80
  // Service not available - transformer will receive undefined
45
81
  console.warn(`Service ${ServiceClass.name} not available for injection in serialiser`);
46
82
  }
47
83
  }
84
+ this.resolvedServices = services;
85
+ return services;
48
86
  }
49
87
  get type() {
50
88
  return this.descriptor.model.type;
@@ -59,7 +97,7 @@ let DescriptorBasedSerialiser = class DescriptorBasedSerialiser extends abstract
59
97
  if (fieldDef.transform) {
60
98
  // Wrap transformer with injected services
61
99
  const transformer = fieldDef.transform;
62
- const services = this.injectedServices;
100
+ const services = this.resolveInjectedServices();
63
101
  attributes[fieldName] = async (data) => {
64
102
  return await transformer(data, services);
65
103
  };
@@ -86,7 +124,7 @@ let DescriptorBasedSerialiser = class DescriptorBasedSerialiser extends abstract
86
124
  if (fieldDef.meta && !fieldDef.excludeFromJsonApi) {
87
125
  if (fieldDef.transform) {
88
126
  const transformer = fieldDef.transform;
89
- const services = this.injectedServices;
127
+ const services = this.resolveInjectedServices();
90
128
  meta[fieldName] = async (data) => {
91
129
  return await transformer(data, services);
92
130
  };
@@ -1 +1 @@
1
- {"version":3,"file":"descriptor.based.serialiser.js","sourceRoot":"","sources":["../../../../src/core/jsonapi/serialisers/descriptor.based.serialiser.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAA+C;AAC/C,uCAAyC;AAGzC,kEAAoE;AACpE,0FAAqF;AACrF,wFAAmF;AACnF,oGAA+F;AAI/F;;;;;GAKG;AA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AAC,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;wBAC7C,CAAC;oBACH,CAAC;yBAAM,CAAC;wBACN,uCAAuC;wBACvC,YAAY,CAAC,WAAW,GAAG,IAAI,CAAC;wBAChC,YAAY,CAAC,YAAY,GAAG,GAAG,OAAO,WAAW,CAAC;wBAClD,YAAY,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;oBAC1C,CAAC;gBACH,CAAC;gBACD,aAAa,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC;YACxC,CAAC;iBAAM,CAAC;gBACN,sEAAsE;gBACtE,6CAA6C;gBAC7C,OAAO,CAAC,IAAI,CACV,6CAA6C,OAAO,SAAS,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,IAAI,GAAG,aAAa;oBAC1G,iCAAiC,MAAM,CAAC,KAAK,CAAC,IAAI,iBAAiB,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,CAC9F,CAAC;YACJ,CAAC;QACH,CAAC;QACD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QAEnC,OAAO,KAAK,CAAC,MAAM,EAAE,CAAC;IACxB,CAAC;CACF,CAAA;AAvJY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,mBAAU,GAAE;qCAMU,qDAAwB;QACb,gBAAS;QACxB,sBAAa;GAPnB,yBAAyB,CAuJrC"}
1
+ {"version":3,"file":"descriptor.based.serialiser.js","sourceRoot":"","sources":["../../../../src/core/jsonapi/serialisers/descriptor.based.serialiser.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,2CAA+C;AAC/C,uCAAyC;AAGzC,kEAAoE;AACpE,0FAAqF;AACrF,wFAAmF;AACnF,oGAA+F;AAI/F;;;;;GAKG;AAEI,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,uDAAyB;IAQtE,YACE,iBAA2C,EACxB,SAAoB,EACvC,aAAiD;QAEjD,KAAK,CAA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GAAG,EAAE,CAAC;wBACvB,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;4BAClC,0EAA0E;4BAC1E,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC;wBAC7C,CAAC;oBACH,CAAC;yBAAM,CAAC;wBACN,uCAAuC;wBACvC,YAAY,CAAC,WAAW,GAAG,IAAI,CAAC;wBAChC,YAAY,CAAC,YAAY,GAAG,GAAG,OAAO,WAAW,CAAC;wBAClD,YAAY,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;oBAC1C,CAAC;gBACH,CAAC;gBACD,aAAa,CAAC,OAAO,CAAC,GAAG,YAAY,CAAC;YACxC,CAAC;iBAAM,CAAC;gBACN,sEAAsE;gBACtE,6CAA6C;gBAC7C,OAAO,CAAC,IAAI,CACV,6CAA6C,OAAO,SAAS,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,IAAI,IAAI,GAAG,aAAa;oBAC1G,iCAAiC,MAAM,CAAC,KAAK,CAAC,IAAI,iBAAiB,MAAM,CAAC,KAAK,CAAC,QAAQ,GAAG,CAC9F,CAAC;YACJ,CAAC;QACH,CAAC;QACD,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QAEnC,OAAO,KAAK,CAAC,MAAM,EAAE,CAAC;IACxB,CAAC;CACF,CAAA;AAlMY,8DAAyB;oCAAzB,yBAAyB;IADrC,IAAA,mBAAU,GAAE;qCAUU,qDAAwB;QACb,gBAAS;QACxB,sBAAa;GAXnB,yBAAyB,CAkMrC"}
@@ -1 +1 @@
1
- {"version":3,"file":"migrator.module.d.ts","sourceRoot":"","sources":["../../../src/core/migrator/migrator.module.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAOa,cAAc;CAAG"}
1
+ {"version":3,"file":"migrator.module.d.ts","sourceRoot":"","sources":["../../../src/core/migrator/migrator.module.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAUa,cAAc;CAAG"}
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.MigratorModule = void 0;
10
10
  const common_1 = require("@nestjs/common");
11
11
  const common_2 = require("../../common");
12
- const s3_service_1 = require("../../foundations/s3/services/s3.service");
12
+ const s3_service_module_1 = require("../../foundations/s3/s3.service.module");
13
13
  const migrator_service_1 = require("./services/migrator.service");
14
14
  /**
15
15
  * Migrator Module
@@ -40,10 +40,13 @@ let MigratorModule = class MigratorModule {
40
40
  exports.MigratorModule = MigratorModule;
41
41
  exports.MigratorModule = MigratorModule = __decorate([
42
42
  (0, common_1.Module)({
43
- // Provide S3Service directly (not via S3Module) so the migrator gets the
44
- // uploader without registering S3Module's /s3 controller — importing the
45
- // module double-declares GET /s3 when the app already serves it.
46
- providers: [(0, common_2.createWorkerProvider)(migrator_service_1.MigratorService), s3_service_1.S3Service],
43
+ // Import S3ServiceModule (NOT S3Module) so the migrator gets the uploader
44
+ // without registering S3Module's /s3 controller — importing S3Module here
45
+ // double-declares GET /s3 when the app already serves it. Importing rather
46
+ // than re-providing S3Service keeps S3Service to a SINGLE registration; see
47
+ // the comment in s3.service.module.ts for why that matters.
48
+ imports: [s3_service_module_1.S3ServiceModule],
49
+ providers: [(0, common_2.createWorkerProvider)(migrator_service_1.MigratorService)],
47
50
  exports: [],
48
51
  })
49
52
  ], MigratorModule);
@@ -1 +1 @@
1
- {"version":3,"file":"migrator.module.js","sourceRoot":"","sources":["../../../src/core/migrator/migrator.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,yCAAoD;AACpD,yEAAqE;AACrE,kEAA8D;AAE9D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAQI,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,wCAAc;yBAAd,cAAc;IAP1B,IAAA,eAAM,EAAC;QACN,yEAAyE;QACzE,yEAAyE;QACzE,iEAAiE;QACjE,SAAS,EAAE,CAAC,IAAA,6BAAoB,EAAC,kCAAe,CAAC,EAAE,sBAAS,CAAC;QAC7D,OAAO,EAAE,EAAE;KACZ,CAAC;GACW,cAAc,CAAG"}
1
+ {"version":3,"file":"migrator.module.js","sourceRoot":"","sources":["../../../src/core/migrator/migrator.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,yCAAoD;AACpD,8EAAyE;AACzE,kEAA8D;AAE9D;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAWI,IAAM,cAAc,GAApB,MAAM,cAAc;CAAG,CAAA;AAAjB,wCAAc;yBAAd,cAAc;IAV1B,IAAA,eAAM,EAAC;QACN,0EAA0E;QAC1E,0EAA0E;QAC1E,2EAA2E;QAC3E,4EAA4E;QAC5E,4DAA4D;QAC5D,OAAO,EAAE,CAAC,mCAAe,CAAC;QAC1B,SAAS,EAAE,CAAC,IAAA,6BAAoB,EAAC,kCAAe,CAAC,CAAC;QAClD,OAAO,EAAE,EAAE;KACZ,CAAC;GACW,cAAc,CAAG"}
@@ -1,4 +1,5 @@
1
1
  export * from "./s3.module";
2
+ export * from "./s3.service.module";
2
3
  export * from "./services/s3.service";
3
4
  export * from "./serialisers/s3.serialiser";
4
5
  export * from "./controllers/s3.controller";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/foundations/s3/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/foundations/s3/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC"}
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./s3.module"), exports);
18
+ __exportStar(require("./s3.service.module"), exports);
18
19
  __exportStar(require("./services/s3.service"), exports);
19
20
  __exportStar(require("./serialisers/s3.serialiser"), exports);
20
21
  __exportStar(require("./controllers/s3.controller"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/foundations/s3/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,wDAAsC;AACtC,8DAA4C;AAC5C,8DAA4C;AAC5C,uDAAqC;AACrC,qDAAmC;AACnC,sDAAoC;AACpC,oDAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/foundations/s3/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,sDAAoC;AACpC,wDAAsC;AACtC,8DAA4C;AAC5C,8DAA4C;AAC5C,uDAAqC;AACrC,qDAAmC;AACnC,sDAAoC;AACpC,oDAAkC"}
@@ -1 +1 @@
1
- {"version":3,"file":"s3.module.d.ts","sourceRoot":"","sources":["../../../src/foundations/s3/s3.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAOtD,qBAKa,QAAS,YAAW,YAAY;IAC3C,YAAY;CAGb"}
1
+ {"version":3,"file":"s3.module.d.ts","sourceRoot":"","sources":["../../../src/foundations/s3/s3.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAOtD,qBAQa,QAAS,YAAW,YAAY;IAC3C,YAAY;CAGb"}
@@ -12,7 +12,7 @@ const registry_1 = require("../../common/registries/registry");
12
12
  const s3_controller_1 = require("./controllers/s3.controller");
13
13
  const s3_model_1 = require("./entities/s3.model");
14
14
  const s3_serialiser_1 = require("./serialisers/s3.serialiser");
15
- const s3_service_1 = require("./services/s3.service");
15
+ const s3_service_module_1 = require("./s3.service.module");
16
16
  let S3Module = class S3Module {
17
17
  onModuleInit() {
18
18
  registry_1.modelRegistry.register(s3_model_1.S3Model);
@@ -21,9 +21,12 @@ let S3Module = class S3Module {
21
21
  exports.S3Module = S3Module;
22
22
  exports.S3Module = S3Module = __decorate([
23
23
  (0, common_1.Module)({
24
+ // S3Service is provided by S3ServiceModule (single registration — see the
25
+ // comment there); this module adds the /s3 controller and the serialiser.
26
+ imports: [s3_service_module_1.S3ServiceModule],
24
27
  controllers: [s3_controller_1.S3Controller],
25
- providers: [s3_service_1.S3Service, s3_serialiser_1.S3Serialiser],
26
- exports: [s3_service_1.S3Service, s3_serialiser_1.S3Serialiser],
28
+ providers: [s3_serialiser_1.S3Serialiser],
29
+ exports: [s3_service_module_1.S3ServiceModule, s3_serialiser_1.S3Serialiser],
27
30
  })
28
31
  ], S3Module);
29
32
  //# sourceMappingURL=s3.module.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"s3.module.js","sourceRoot":"","sources":["../../../src/foundations/s3/s3.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAsD;AACtD,+DAAiE;AACjE,+DAA2D;AAC3D,kDAA8C;AAC9C,+DAA2D;AAC3D,sDAAkD;AAO3C,IAAM,QAAQ,GAAd,MAAM,QAAQ;IACnB,YAAY;QACV,wBAAa,CAAC,QAAQ,CAAC,kBAAO,CAAC,CAAC;IAClC,CAAC;CACF,CAAA;AAJY,4BAAQ;mBAAR,QAAQ;IALpB,IAAA,eAAM,EAAC;QACN,WAAW,EAAE,CAAC,4BAAY,CAAC;QAC3B,SAAS,EAAE,CAAC,sBAAS,EAAE,4BAAY,CAAC;QACpC,OAAO,EAAE,CAAC,sBAAS,EAAE,4BAAY,CAAC;KACnC,CAAC;GACW,QAAQ,CAIpB"}
1
+ {"version":3,"file":"s3.module.js","sourceRoot":"","sources":["../../../src/foundations/s3/s3.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAsD;AACtD,+DAAiE;AACjE,+DAA2D;AAC3D,kDAA8C;AAC9C,+DAA2D;AAC3D,2DAAsD;AAU/C,IAAM,QAAQ,GAAd,MAAM,QAAQ;IACnB,YAAY;QACV,wBAAa,CAAC,QAAQ,CAAC,kBAAO,CAAC,CAAC;IAClC,CAAC;CACF,CAAA;AAJY,4BAAQ;mBAAR,QAAQ;IARpB,IAAA,eAAM,EAAC;QACN,0EAA0E;QAC1E,0EAA0E;QAC1E,OAAO,EAAE,CAAC,mCAAe,CAAC;QAC1B,WAAW,EAAE,CAAC,4BAAY,CAAC;QAC3B,SAAS,EAAE,CAAC,4BAAY,CAAC;QACzB,OAAO,EAAE,CAAC,mCAAe,EAAE,4BAAY,CAAC;KACzC,CAAC;GACW,QAAQ,CAIpB"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * S3 Service Module
3
+ *
4
+ * Provides S3Service and NOTHING else — no controller, no serialiser.
5
+ *
6
+ * WHY THIS EXISTS: S3Service used to be registered TWICE — once by S3Module,
7
+ * and once directly in MigratorModule's `providers` (so the migrator could
8
+ * upload without re-registering S3Module's GET /s3 controller). Two
9
+ * registrations mean two InstanceWrappers for one class token, and
10
+ * `ModuleRef.get(token, { strict: false })` — which the descriptor-based
11
+ * serialiser uses to satisfy `injectServices` — returns the LAST link:
12
+ *
13
+ * instanceLinksForGivenToken[instanceLinksForGivenToken.length - 1]
14
+ *
15
+ * so which instance you got depended on module registration order.
16
+ *
17
+ * NOT the cause of the 2026-08-25 `imageUrl` outage — that was the serialiser
18
+ * resolving `injectServices` in its CONSTRUCTOR and capturing Nest's
19
+ * placeholder instance; see resolveInjectedServices() in
20
+ * core/jsonapi/serialisers/descriptor.based.serialiser.ts. This split was made
21
+ * while investigating it and kept on its own merit: a single registration
22
+ * removes the order dependence from every `strict: false` lookup of S3Service,
23
+ * so the two hazards cannot compound.
24
+ *
25
+ * Import THIS module wherever S3Service is needed without the /s3 controller;
26
+ * import S3Module when the controller is wanted too.
27
+ */
28
+ export declare class S3ServiceModule {
29
+ }
30
+ //# sourceMappingURL=s3.service.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s3.service.module.d.ts","sourceRoot":"","sources":["../../../src/foundations/s3/s3.service.module.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,qBAIa,eAAe;CAAG"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.S3ServiceModule = void 0;
10
+ const common_1 = require("@nestjs/common");
11
+ const s3_service_1 = require("./services/s3.service");
12
+ /**
13
+ * S3 Service Module
14
+ *
15
+ * Provides S3Service and NOTHING else — no controller, no serialiser.
16
+ *
17
+ * WHY THIS EXISTS: S3Service used to be registered TWICE — once by S3Module,
18
+ * and once directly in MigratorModule's `providers` (so the migrator could
19
+ * upload without re-registering S3Module's GET /s3 controller). Two
20
+ * registrations mean two InstanceWrappers for one class token, and
21
+ * `ModuleRef.get(token, { strict: false })` — which the descriptor-based
22
+ * serialiser uses to satisfy `injectServices` — returns the LAST link:
23
+ *
24
+ * instanceLinksForGivenToken[instanceLinksForGivenToken.length - 1]
25
+ *
26
+ * so which instance you got depended on module registration order.
27
+ *
28
+ * NOT the cause of the 2026-08-25 `imageUrl` outage — that was the serialiser
29
+ * resolving `injectServices` in its CONSTRUCTOR and capturing Nest's
30
+ * placeholder instance; see resolveInjectedServices() in
31
+ * core/jsonapi/serialisers/descriptor.based.serialiser.ts. This split was made
32
+ * while investigating it and kept on its own merit: a single registration
33
+ * removes the order dependence from every `strict: false` lookup of S3Service,
34
+ * so the two hazards cannot compound.
35
+ *
36
+ * Import THIS module wherever S3Service is needed without the /s3 controller;
37
+ * import S3Module when the controller is wanted too.
38
+ */
39
+ let S3ServiceModule = class S3ServiceModule {
40
+ };
41
+ exports.S3ServiceModule = S3ServiceModule;
42
+ exports.S3ServiceModule = S3ServiceModule = __decorate([
43
+ (0, common_1.Module)({
44
+ providers: [s3_service_1.S3Service],
45
+ exports: [s3_service_1.S3Service],
46
+ })
47
+ ], S3ServiceModule);
48
+ //# sourceMappingURL=s3.service.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"s3.service.module.js","sourceRoot":"","sources":["../../../src/foundations/s3/s3.service.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,sDAAkD;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAKI,IAAM,eAAe,GAArB,MAAM,eAAe;CAAG,CAAA;AAAlB,0CAAe;0BAAf,eAAe;IAJ3B,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,sBAAS,CAAC;QACtB,OAAO,EAAE,CAAC,sBAAS,CAAC;KACrB,CAAC;GACW,eAAe,CAAG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carlonicora/nestjs-neo4jsonapi",
3
- "version": "3.2.3",
3
+ "version": "3.2.4",
4
4
  "description": "NestJS foundation package with JSON:API, Neo4j, Redis, LangChain agents, and common utilities",
5
5
  "author": "Carlo Nicora",
6
6
  "license": "GPL-3.0-or-later",
@@ -201,7 +201,7 @@
201
201
  "nestjs-cls": "^6.2.2",
202
202
  "nestjs-i18n": "^10.8.5",
203
203
  "prettier": "^3.9.6",
204
- "semantic-release": "^25.0.8",
204
+ "semantic-release": "25.0.8",
205
205
  "ts-node": "^10.9.2",
206
206
  "tsup": "^8.5.1",
207
207
  "typescript": "^5.9.3",