5htp 0.6.2-7 → 0.6.2-9

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.
@@ -290,7 +290,7 @@ function Plugin(babel, { app, side, debug }: TOptions) {
290
290
  }
291
291
 
292
292
  // Differenciate back / front
293
- if (relativeFileName.startsWith('/client/pages')) {
293
+ if (relativeFileName.startsWith('/client/pages') || relativeFileName.startsWith('/client/components') || relativeFileName.startsWith('/client/hooks')) {
294
294
  file.side = 'front';
295
295
  } else if (relativeFileName.startsWith('/server/routes')) {
296
296
  file.side = 'back';
package/compiler/index.ts CHANGED
@@ -247,7 +247,7 @@ export default class Compiler {
247
247
  const instanciation = (parentRef: string) =>
248
248
  `new ${serviceMetas.name}(
249
249
  ${parentRef},
250
- (instance: ${serviceMetas.name}) => (${config}),
250
+ (instance/*: ${app.identity.identifier}["${serviceMetas.name}"]*/) => (${config}),
251
251
  this
252
252
  )`
253
253
 
@@ -351,8 +351,9 @@ ${imported.join('\n')}
351
351
 
352
352
  export default class ${appClassIdentifier} extends Application {
353
353
 
354
+ // Makke sure the services typigs are reflecting the config and referring to the app
354
355
  ${sortedServices.map(service =>
355
- `public ${service.name}!: ${service.className};`
356
+ `public ${service.name}!: ReturnType<${appClassIdentifier}["registered"]["${service.id}"]["start"]>;`
356
357
  ).join('\n')}
357
358
 
358
359
  protected registered = {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "5htp",
3
3
  "description": "Convenient TypeScript framework designed for Performance and Productivity.",
4
- "version": "0.6.2-7",
4
+ "version": "0.6.2-9",
5
5
  "author": "Gaetan Le Gac (https://github.com/gaetanlegac)",
6
6
  "repository": "git://github.com/gaetanlegac/5htp.git",
7
7
  "license": "MIT",