@platformatic/foundation 3.25.0 → 3.27.0

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.
Files changed (2) hide show
  1. package/lib/schema.js +160 -131
  2. package/package.json +1 -1
package/lib/schema.js CHANGED
@@ -721,138 +721,141 @@ export const policies = {
721
721
  additionalProperties: false
722
722
  }
723
723
 
724
- export const applications = {
725
- type: 'array',
726
- items: {
727
- type: 'object',
728
- anyOf: [{ required: ['id', 'path'] }, { required: ['id', 'url'] }],
729
- properties: {
730
- id: {
731
- type: 'string'
732
- },
733
- path: {
734
- type: 'string',
735
- // This is required for the resolve command to allow empty paths after environment variable replacement
736
- allowEmptyPaths: true,
737
- resolvePath: true
738
- },
739
- config: {
740
- type: 'string'
741
- },
742
- url: {
743
- type: 'string'
744
- },
745
- gitBranch: {
746
- type: 'string',
747
- default: 'main'
748
- },
749
- useHttp: {
750
- type: 'boolean'
751
- },
752
- reuseTcpPorts: {
753
- type: 'boolean',
754
- default: true
755
- },
756
- workers: {
757
- anyOf: [
758
- {
759
- type: 'number'
760
- },
761
- {
762
- type: 'string'
763
- },
764
- {
765
- type: 'object',
766
- properties: {
767
- static: { type: 'number', minimum: 1 },
768
- minimum: { type: 'number', minimum: 1 },
769
- maximum: { type: 'number', minimum: 0 }
770
- }
771
- }
772
- ]
773
- },
774
- health: { ...healthWithoutDefaults },
775
- dependencies: {
776
- type: 'array',
777
- items: {
778
- type: 'string'
724
+ export const application = {
725
+ type: 'object',
726
+ anyOf: [{ required: ['id', 'path'] }, { required: ['id', 'url'] }],
727
+ properties: {
728
+ id: {
729
+ type: 'string'
730
+ },
731
+ path: {
732
+ type: 'string',
733
+ // This is required for the resolve command to allow empty paths after environment variable replacement
734
+ allowEmptyPaths: true,
735
+ resolvePath: true
736
+ },
737
+ config: {
738
+ type: 'string'
739
+ },
740
+ url: {
741
+ type: 'string'
742
+ },
743
+ gitBranch: {
744
+ type: 'string',
745
+ default: 'main'
746
+ },
747
+ useHttp: {
748
+ type: 'boolean'
749
+ },
750
+ reuseTcpPorts: {
751
+ type: 'boolean',
752
+ default: true
753
+ },
754
+ workers: {
755
+ anyOf: [
756
+ {
757
+ type: 'number'
779
758
  },
780
- default: []
781
- },
782
- arguments: {
783
- type: 'array',
784
- items: {
759
+ {
785
760
  type: 'string'
761
+ },
762
+ {
763
+ type: 'object',
764
+ properties: {
765
+ static: { type: 'number', minimum: 1 },
766
+ minimum: { type: 'number', minimum: 1 },
767
+ maximum: { type: 'number', minimum: 0 }
768
+ }
786
769
  }
787
- },
788
- env,
789
- envfile: {
770
+ ]
771
+ },
772
+ health: { ...healthWithoutDefaults },
773
+ dependencies: {
774
+ type: 'array',
775
+ items: {
790
776
  type: 'string'
791
777
  },
792
- sourceMaps: {
793
- type: 'boolean'
794
- },
795
- packageManager: {
796
- type: 'string',
797
- enum: ['npm', 'pnpm', 'yarn']
798
- },
799
- preload,
800
- nodeOptions: {
778
+ default: []
779
+ },
780
+ arguments: {
781
+ type: 'array',
782
+ items: {
801
783
  type: 'string'
802
- },
803
- permissions: {
804
- type: 'object',
805
- properties: {
806
- fs: {
807
- type: 'object',
808
- properties: {
809
- read: {
810
- type: 'array',
811
- items: {
812
- type: 'string'
813
- }
814
- },
815
- write: {
816
- type: 'array',
817
- items: {
818
- type: 'string'
819
- }
784
+ }
785
+ },
786
+ env,
787
+ envfile: {
788
+ type: 'string'
789
+ },
790
+ sourceMaps: {
791
+ type: 'boolean'
792
+ },
793
+ packageManager: {
794
+ type: 'string',
795
+ enum: ['npm', 'pnpm', 'yarn']
796
+ },
797
+ preload,
798
+ nodeOptions: {
799
+ type: 'string'
800
+ },
801
+ execArgv: {
802
+ type: 'array',
803
+ items: {
804
+ type: 'string'
805
+ }
806
+ },
807
+ permissions: {
808
+ type: 'object',
809
+ properties: {
810
+ fs: {
811
+ type: 'object',
812
+ properties: {
813
+ read: {
814
+ type: 'array',
815
+ items: {
816
+ type: 'string'
820
817
  }
821
818
  },
822
- additionalProperties: false
823
- }
824
- },
825
- additionalProperties: false
819
+ write: {
820
+ type: 'array',
821
+ items: {
822
+ type: 'string'
823
+ }
824
+ }
825
+ },
826
+ additionalProperties: false
827
+ }
826
828
  },
827
- telemetry: {
828
- type: 'object',
829
- properties: {
830
- instrumentations: {
831
- type: 'array',
832
- description: 'An array of instrumentations loaded if telemetry is enabled',
833
- items: {
834
- oneOf: [
835
- {
836
- type: 'string'
837
- },
838
- {
839
- type: 'object',
840
- properties: {
841
- package: {
842
- type: 'string'
843
- },
844
- exportName: {
845
- type: 'string'
846
- },
847
- options: {
848
- type: 'object',
849
- additionalProperties: true
850
- }
829
+ additionalProperties: false
830
+ },
831
+ telemetry: {
832
+ type: 'object',
833
+ properties: {
834
+ instrumentations: {
835
+ type: 'array',
836
+ description: 'An array of instrumentations loaded if telemetry is enabled',
837
+ items: {
838
+ oneOf: [
839
+ {
840
+ type: 'string'
841
+ },
842
+ {
843
+ type: 'object',
844
+ properties: {
845
+ package: {
846
+ type: 'string'
851
847
  },
852
- required: ['package']
853
- }
854
- ]
855
- }
848
+ exportName: {
849
+ type: 'string'
850
+ },
851
+ options: {
852
+ type: 'object',
853
+ additionalProperties: true
854
+ }
855
+ },
856
+ required: ['package']
857
+ }
858
+ ]
856
859
  }
857
860
  }
858
861
  }
@@ -860,15 +863,10 @@ export const applications = {
860
863
  }
861
864
  }
862
865
 
863
- export const runtimeUnwrappablePropertiesList = [
864
- '$schema',
865
- 'entrypoint',
866
- 'applications',
867
- 'autoload',
868
- 'applications',
869
- 'web',
870
- 'resolvedApplicationsBasePath'
871
- ]
866
+ export const applications = {
867
+ type: 'array',
868
+ items: application
869
+ }
872
870
 
873
871
  export const runtimeProperties = {
874
872
  $schema: {
@@ -1332,7 +1330,38 @@ export const runtimeProperties = {
1332
1330
  policies
1333
1331
  }
1334
1332
 
1333
+ export const runtimeUnwrappablePropertiesList = [
1334
+ '$schema',
1335
+ 'entrypoint',
1336
+ 'applications',
1337
+ 'application',
1338
+ 'autoload',
1339
+ 'applications',
1340
+ 'web',
1341
+ 'resolvedApplicationsBasePath'
1342
+ ]
1343
+
1344
+ export const applicationsUnwrappablePropertiesList = [
1345
+ 'id',
1346
+ 'path',
1347
+ 'config',
1348
+ 'url',
1349
+ 'gitBranch',
1350
+ 'dependencies',
1351
+ 'useHttp'
1352
+ ]
1353
+
1335
1354
  export const wrappedRuntimeProperties = omitProperties(runtimeProperties, runtimeUnwrappablePropertiesList)
1355
+ export const wrappedApplicationProperties = omitProperties(
1356
+ application.properties,
1357
+ applicationsUnwrappablePropertiesList
1358
+ )
1359
+
1360
+ wrappedRuntimeProperties.application = {
1361
+ type: 'object',
1362
+ properties: wrappedApplicationProperties,
1363
+ additionalProperties: false
1364
+ }
1336
1365
 
1337
1366
  export const wrappedRuntime = {
1338
1367
  type: 'object',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/foundation",
3
- "version": "3.25.0",
3
+ "version": "3.27.0",
4
4
  "description": "Platformatic Foundation",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",