@platformatic/runtime 4.0.0-new-config.6 → 4.0.0-new-config.7

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/lib/generator.js CHANGED
@@ -196,7 +196,15 @@ export class RuntimeGenerator extends BaseGenerator {
196
196
  // which also scaffold no port, can adopt the same flag). The count is the gate: the moment a
197
197
  // second application exists, nothing is forced and a portless application stays mesh-only, which
198
198
  // is what keeps "expose the one" from becoming "expose them all".
199
- const totalApplications = this.existingApplications.length + this.applications.length
199
+ //
200
+ // Counted as distinct names rather than as two array lengths added: the create wizard seeds its
201
+ // uniqueness set from `existingApplications` and pushes each new name back into it, so a freshly
202
+ // scaffolded application is present in both `existingApplications` and `applications`. A plain sum
203
+ // would double-count it and never see a single-application project as single.
204
+ const totalApplications = new Set([
205
+ ...this.existingApplications,
206
+ ...this.applications.map(({ name }) => name)
207
+ ]).size
200
208
  this.applications.forEach(({ name, application }) => {
201
209
  if (!application.config) {
202
210
  // set default config
@@ -734,13 +742,13 @@ export class WrappedGenerator extends BaseGenerator {
734
742
  wrapped around.
735
743
 
736
744
  Its capability is spelled as a plain object rather than a factory call because this file is
737
- read before anything is installed, and an import cannot be resolved in that state.
745
+ read before anything is installed, and an import cannot be resolved in that state. The bare
746
+ definition sits directly under `application` -- no `config` wrapper -- because the loader wraps
747
+ a definition (a module marker, no entry keys) into the entry's config slot on its own.
738
748
  */
739
749
  const config = {
740
750
  ...this.resolveScaffoldedPlaceholders(getRuntimeWrappableProperties()),
741
- application: {
742
- config: this.resolveScaffoldedPlaceholders({ module: this.module, server: { port: '{PORT}' } })
743
- }
751
+ application: this.resolveScaffoldedPlaceholders({ module: this.module, server: { port: '{PORT}' } })
744
752
  }
745
753
 
746
754
  this.addFile({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/runtime",
3
- "version": "4.0.0-new-config.6",
3
+ "version": "4.0.0-new-config.7",
4
4
  "description": "Platformatic runtime",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -39,14 +39,14 @@
39
39
  "typescript": "~6.0.3",
40
40
  "undici-oidc-interceptor": "^0.9.0",
41
41
  "why-is-node-running": "^2.2.2",
42
- "@platformatic/composer": "4.0.0-new-config.6",
43
- "@platformatic/db": "4.0.0-new-config.6",
44
- "@platformatic/gateway": "4.0.0-new-config.6",
45
- "@platformatic/service": "4.0.0-new-config.6",
46
- "@platformatic/node": "4.0.0-new-config.6",
47
- "@platformatic/sql-graphql": "4.0.0-new-config.6",
48
- "@platformatic/sql-mapper": "4.0.0-new-config.6",
49
- "@platformatic/wattpm-pprof-capture": "4.0.0-new-config.6"
42
+ "@platformatic/composer": "4.0.0-new-config.7",
43
+ "@platformatic/db": "4.0.0-new-config.7",
44
+ "@platformatic/node": "4.0.0-new-config.7",
45
+ "@platformatic/gateway": "4.0.0-new-config.7",
46
+ "@platformatic/service": "4.0.0-new-config.7",
47
+ "@platformatic/sql-graphql": "4.0.0-new-config.7",
48
+ "@platformatic/sql-mapper": "4.0.0-new-config.7",
49
+ "@platformatic/wattpm-pprof-capture": "4.0.0-new-config.7"
50
50
  },
51
51
  "dependencies": {
52
52
  "@fastify/accepts": "^5.0.0",
@@ -78,13 +78,13 @@
78
78
  "undici": "^8.5.0",
79
79
  "undici-thread-interceptor": "^2.1.1",
80
80
  "ws": "^8.16.0",
81
- "@platformatic/basic": "4.0.0-new-config.6",
82
- "@platformatic/foundation": "4.0.0-new-config.6",
83
- "@platformatic/generators": "4.0.0-new-config.6",
84
- "@platformatic/itc": "4.0.0-new-config.6",
85
- "@platformatic/tracing": "4.0.0-new-config.6",
86
- "@platformatic/globals": "4.0.0-new-config.6",
87
- "@platformatic/metrics": "4.0.0-new-config.6"
81
+ "@platformatic/foundation": "4.0.0-new-config.7",
82
+ "@platformatic/generators": "4.0.0-new-config.7",
83
+ "@platformatic/globals": "4.0.0-new-config.7",
84
+ "@platformatic/itc": "4.0.0-new-config.7",
85
+ "@platformatic/basic": "4.0.0-new-config.7",
86
+ "@platformatic/tracing": "4.0.0-new-config.7",
87
+ "@platformatic/metrics": "4.0.0-new-config.7"
88
88
  },
89
89
  "engines": {
90
90
  "node": ">=22.19.0"
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/runtime/4.0.0-new-config.6.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/runtime/4.0.0-new-config.7.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Runtime Config",
5
5
  "type": "object",