@platformatic/nest 3.0.0-alpha.1 → 3.0.0-alpha.2

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.
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { transform as basicTransform, resolve, validationOptions } from '@platformatic/basic'
2
- import { kMetadata, loadConfiguration as utilsLoadConfiguration } from '@platformatic/utils'
2
+ import { kMetadata, loadConfiguration as utilsLoadConfiguration } from '@platformatic/foundation'
3
3
  import { schema } from './lib/schema.js'
4
4
  import { NestStackable } from './lib/stackable.js'
5
5
 
package/lib/schema.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { schemaComponents as basicSchemaComponents } from '@platformatic/basic'
2
- import { schemaComponents as utilsSchemaComponents } from '@platformatic/utils'
2
+ import { schemaComponents as utilsSchemaComponents } from '@platformatic/foundation'
3
3
  import { readFileSync } from 'node:fs'
4
4
  import { resolve } from 'node:path'
5
5
 
@@ -63,7 +63,7 @@ export const schema = {
63
63
  logger: utilsSchemaComponents.logger,
64
64
  server: utilsSchemaComponents.server,
65
65
  watch: basicSchemaComponents.watch,
66
- application: basicSchemaComponents.application,
66
+ application: basicSchemaComponents.buildableApplication,
67
67
  runtime: utilsSchemaComponents.wrappedRuntime,
68
68
  nest
69
69
  },
package/lib/stackable.js CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  importFile,
8
8
  resolvePackage
9
9
  } from '@platformatic/basic'
10
- import { features } from '@platformatic/utils'
10
+ import { features } from '@platformatic/foundation'
11
11
  import getPort from 'get-port'
12
12
  import inject from 'light-my-request'
13
13
  import { readFile } from 'node:fs/promises'
@@ -16,6 +16,7 @@ import { pinoHttp } from 'pino-http'
16
16
  import { satisfies } from 'semver'
17
17
  import { version } from './schema.js'
18
18
 
19
+ const kITC = Symbol.for('plt.runtime.itc')
19
20
  const supportedVersions = '^11.0.0'
20
21
 
21
22
  export class NestStackable extends BaseStackable {
@@ -72,6 +73,11 @@ export class NestStackable extends BaseStackable {
72
73
 
73
74
  if (command || !this.isProduction) {
74
75
  await this.startWithCommand(command || `node ${this.#nestjsCli} start --watch --preserveWatchOutput`)
76
+
77
+ // We use url changing as a way to notify restarts
78
+ this.childManager.on('url', () => {
79
+ globalThis[kITC].notify('event', { event: 'url', url: this.url })
80
+ })
75
81
  } else {
76
82
  return this.#startProduction(listen)
77
83
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/nest",
3
- "version": "3.0.0-alpha.1",
3
+ "version": "3.0.0-alpha.2",
4
4
  "description": "Platformatic Nest.js Stackable",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -18,9 +18,9 @@
18
18
  "get-port": "^7.1.0",
19
19
  "light-my-request": "^6.0.0",
20
20
  "pino-http": "^10.2.0",
21
- "@platformatic/basic": "3.0.0-alpha.1",
22
- "@platformatic/utils": "3.0.0-alpha.1",
23
- "@platformatic/generators": "3.0.0-alpha.1"
21
+ "@platformatic/generators": "3.0.0-alpha.2",
22
+ "@platformatic/basic": "3.0.0-alpha.2",
23
+ "@platformatic/foundation": "3.0.0-alpha.2"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@nestjs/cli": "^11.0.7",
@@ -33,8 +33,11 @@
33
33
  "neostandard": "^0.12.0",
34
34
  "tsx": "^4.19.0",
35
35
  "typescript": "^5.5.4",
36
- "@platformatic/composer": "3.0.0-alpha.1",
37
- "@platformatic/service": "3.0.0-alpha.1"
36
+ "@platformatic/composer": "3.0.0-alpha.2",
37
+ "@platformatic/service": "3.0.0-alpha.2"
38
+ },
39
+ "engines": {
40
+ "node": ">=22.18.0"
38
41
  },
39
42
  "scripts": {
40
43
  "test": "pnpm run lint && borp --concurrency=1 --timeout 1200000",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/nest/3.0.0-alpha.1.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/nest/3.0.0-alpha.2.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic NestJS Config",
5
5
  "type": "object",
@@ -362,6 +362,7 @@
362
362
  }
363
363
  },
364
364
  "additionalProperties": false,
365
+ "required": [],
365
366
  "default": {}
366
367
  },
367
368
  "runtime": {