@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.
- package/lib/schema.js +160 -131
- 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
|
|
725
|
-
type: '
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
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
|
-
|
|
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
|
-
|
|
789
|
-
|
|
770
|
+
]
|
|
771
|
+
},
|
|
772
|
+
health: { ...healthWithoutDefaults },
|
|
773
|
+
dependencies: {
|
|
774
|
+
type: 'array',
|
|
775
|
+
items: {
|
|
790
776
|
type: 'string'
|
|
791
777
|
},
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
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
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
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
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
819
|
+
write: {
|
|
820
|
+
type: 'array',
|
|
821
|
+
items: {
|
|
822
|
+
type: 'string'
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
additionalProperties: false
|
|
827
|
+
}
|
|
826
828
|
},
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
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
|
-
|
|
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
|
|
864
|
-
'
|
|
865
|
-
|
|
866
|
-
|
|
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',
|