@decohere/scaffold 0.0.1-dev.112 → 0.0.1-dev.113

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.
@@ -344,7 +344,7 @@ function scaffoldLocalUserProfile(workspace) {
344
344
  });
345
345
  }
346
346
  for (const controller of workspace.getModels(_controllersourcefilemodel.ControllerSourceFile)){
347
- controller.addImport("UserService", "../services/user.service.js").addImport("inject", "@decohere/crucible/decorators").addConstructorParam('@inject("UserService") private readonly users: UserService');
347
+ controller.addImport("UserService", "../services/user.service.js").addImport("inject", "@decohere/crucible/decorators").addConstructorParam("@inject(UserService) private readonly users: UserService");
348
348
  controller.getMethod("getOne").setAsync(true).setBody([
349
349
  "const user = await this.users.ensureFromPrincipal(this.principalProvider.currentPrincipal);",
350
350
  "return { id, message: `Hello ${user.displayName}!`, username: user.displayName };"
@@ -98,8 +98,8 @@ class ControllerSourceFile {
98
98
  ]
99
99
  ]);
100
100
  _classDecorators = [];
101
- /** Explicit @inject — design:paramtypes can collapse to Object under SWC when the class is still undefined at decorate time. */ _ctorParams = [
102
- '@inject("SampleService") private readonly sample: SampleService'
101
+ /** Explicit @inject(SampleService): using the class as a value keeps its import, which SWC can drop when the class is only a type (design:paramtypes then collapses to Object). */ _ctorParams = [
102
+ "@inject(SampleService) private readonly sample: SampleService"
103
103
  ];
104
104
  _methods = new Map([
105
105
  [
@@ -293,7 +293,7 @@ function scaffoldLocalUserProfile(workspace) {
293
293
  });
294
294
  }
295
295
  for (const controller of workspace.getModels(ControllerSourceFile)){
296
- controller.addImport("UserService", "../services/user.service.js").addImport("inject", "@decohere/crucible/decorators").addConstructorParam('@inject("UserService") private readonly users: UserService');
296
+ controller.addImport("UserService", "../services/user.service.js").addImport("inject", "@decohere/crucible/decorators").addConstructorParam("@inject(UserService) private readonly users: UserService");
297
297
  controller.getMethod("getOne").setAsync(true).setBody([
298
298
  "const user = await this.users.ensureFromPrincipal(this.principalProvider.currentPrincipal);",
299
299
  "return { id, message: `Hello ${user.displayName}!`, username: user.displayName };"
@@ -89,8 +89,8 @@ import { WELL_KNOWN_FILES } from "../../models/const.js";
89
89
  ]
90
90
  ]);
91
91
  _classDecorators = [];
92
- /** Explicit @inject — design:paramtypes can collapse to Object under SWC when the class is still undefined at decorate time. */ _ctorParams = [
93
- '@inject("SampleService") private readonly sample: SampleService'
92
+ /** Explicit @inject(SampleService): using the class as a value keeps its import, which SWC can drop when the class is only a type (design:paramtypes then collapses to Object). */ _ctorParams = [
93
+ "@inject(SampleService) private readonly sample: SampleService"
94
94
  ];
95
95
  _methods = new Map([
96
96
  [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decohere/scaffold",
3
- "version": "0.0.1-dev.112",
3
+ "version": "0.0.1-dev.113",
4
4
  "description": "Decohere project scaffolder (runs inside ghcr.io/typesmiths/decohere/create)",
5
5
  "keywords": [
6
6
  "decohere",
@@ -22,8 +22,8 @@
22
22
  "test": "echo \"Error: no test specified\" && exit 1"
23
23
  },
24
24
  "dependencies": {
25
- "@decohere/crucible": "0.0.1-dev.112",
26
- "@decohere/nexus": "0.0.1-dev.112",
25
+ "@decohere/crucible": "0.0.1-dev.113",
26
+ "@decohere/nexus": "0.0.1-dev.113",
27
27
  "commander": "^13.1.0",
28
28
  "openapi-to-postmanv2": "^5.0.0",
29
29
  "yaml": "^2.9.1"
@@ -29,7 +29,7 @@ export declare class ControllerSourceFile implements KeyedModel {
29
29
  private readonly _cortexImports;
30
30
  private readonly _extraImportGroups;
31
31
  private readonly _classDecorators;
32
- /** Explicit @inject — design:paramtypes can collapse to Object under SWC when the class is still undefined at decorate time. */
32
+ /** Explicit @inject(SampleService): using the class as a value keeps its import, which SWC can drop when the class is only a type (design:paramtypes then collapses to Object). */
33
33
  private readonly _ctorParams;
34
34
  private readonly _methods;
35
35
  /** Retrieve a method by name to mutate its decorators. */