@microtronics/studio-cli 0.51.0 → 0.53.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.
@@ -412,13 +412,17 @@ export declare namespace DDE {
412
412
  default: string;
413
413
  readOnly: boolean;
414
414
  description: string;
415
+ markdownDescription: string;
415
416
  };
416
417
  cloudProject: {
417
418
  type: string;
419
+ description: string;
420
+ markdownDescription: string;
418
421
  };
419
422
  constants: {
420
423
  type: string;
421
424
  description: string;
425
+ markdownDescription: string;
422
426
  };
423
427
  state: {
424
428
  $ref: string;
@@ -432,19 +436,53 @@ export declare namespace DDE {
432
436
  timeseries: {
433
437
  type: string;
434
438
  description: string;
439
+ markdownDescription: string;
435
440
  additionalProperties: boolean;
436
441
  maxProperties: number;
442
+ errorMessage: {
443
+ maxProperties: string;
444
+ };
437
445
  properties: {
438
- _id: boolean;
439
- id: boolean;
440
- _stamp: boolean;
441
- stamp: boolean;
442
- tag: boolean;
443
- _uid: boolean;
444
- customer_id: boolean;
445
- site_id: boolean;
446
- _rec_flags__: boolean;
447
- applog: boolean;
446
+ _id: {
447
+ not: {};
448
+ errorMessage: string;
449
+ };
450
+ id: {
451
+ not: {};
452
+ errorMessage: string;
453
+ };
454
+ _stamp: {
455
+ not: {};
456
+ errorMessage: string;
457
+ };
458
+ stamp: {
459
+ not: {};
460
+ errorMessage: string;
461
+ };
462
+ tag: {
463
+ not: {};
464
+ errorMessage: string;
465
+ };
466
+ _uid: {
467
+ not: {};
468
+ errorMessage: string;
469
+ };
470
+ customer_id: {
471
+ not: {};
472
+ errorMessage: string;
473
+ };
474
+ site_id: {
475
+ not: {};
476
+ errorMessage: string;
477
+ };
478
+ _rec_flags__: {
479
+ not: {};
480
+ errorMessage: string;
481
+ };
482
+ applog: {
483
+ not: {};
484
+ errorMessage: string;
485
+ };
448
486
  };
449
487
  patternProperties: {
450
488
  "^(?!.*^field\\d+$)(?!.*^ch\\d+$)[a-zA-Z_][0-9a-zA-Z_]*$": {
@@ -455,6 +493,7 @@ export declare namespace DDE {
455
493
  aloha: {
456
494
  type: string;
457
495
  description: string;
496
+ markdownDescription: string;
458
497
  $ref: string;
459
498
  };
460
499
  setting: {
@@ -473,6 +512,7 @@ export declare namespace DDE {
473
512
  patternProperties: {
474
513
  "^(?!.*^field\\d+$)(?!.*^ch\\d+$)(?!(dde|cloudProject|constants|state|result|volatile|timeseries|aloha|setting|command|storage|relations))[a-zA-Z_][0-9a-zA-Z_]*$": {
475
514
  type: string;
515
+ description: string;
476
516
  $ref: string;
477
517
  };
478
518
  };
@@ -487,6 +527,9 @@ export declare namespace DDE {
487
527
  then: {
488
528
  type: string;
489
529
  additionalProperties: boolean;
530
+ errorMessage: {
531
+ additionalProperties: string;
532
+ };
490
533
  properties: {
491
534
  dde: {
492
535
  type: string;
@@ -515,17 +558,50 @@ export declare namespace DDE {
515
558
  description: string;
516
559
  additionalProperties: boolean;
517
560
  maxProperties: number;
561
+ errorMessage: {
562
+ maxProperties: string;
563
+ };
518
564
  properties: {
519
- _id: boolean;
520
- id: boolean;
521
- _stamp: boolean;
522
- stamp: boolean;
523
- tag: boolean;
524
- _uid: boolean;
525
- customer_id: boolean;
526
- site_id: boolean;
527
- _rec_flags__: boolean;
528
- applog: boolean;
565
+ _id: {
566
+ not: {};
567
+ errorMessage: string;
568
+ };
569
+ id: {
570
+ not: {};
571
+ errorMessage: string;
572
+ };
573
+ _stamp: {
574
+ not: {};
575
+ errorMessage: string;
576
+ };
577
+ stamp: {
578
+ not: {};
579
+ errorMessage: string;
580
+ };
581
+ tag: {
582
+ not: {};
583
+ errorMessage: string;
584
+ };
585
+ _uid: {
586
+ not: {};
587
+ errorMessage: string;
588
+ };
589
+ customer_id: {
590
+ not: {};
591
+ errorMessage: string;
592
+ };
593
+ site_id: {
594
+ not: {};
595
+ errorMessage: string;
596
+ };
597
+ _rec_flags__: {
598
+ not: {};
599
+ errorMessage: string;
600
+ };
601
+ applog: {
602
+ not: {};
603
+ errorMessage: string;
604
+ };
529
605
  };
530
606
  patternProperties: {
531
607
  "^(?!.*^field\\d+$)(?!.*^ch\\d+$)[a-zA-Z_][0-9a-zA-Z_]*$": {
@@ -558,54 +634,66 @@ export declare namespace DDE {
558
634
  type: string;
559
635
  title: string;
560
636
  description: string;
637
+ markdownDescription: string;
561
638
  $ref: string;
562
639
  };
563
640
  resultContainer: {
564
641
  type: string;
565
642
  title: string;
566
643
  description: string;
644
+ markdownDescription: string;
567
645
  $ref: string;
568
646
  };
569
647
  volatileContainer: {
570
648
  type: string;
571
649
  title: string;
572
650
  description: string;
651
+ markdownDescription: string;
573
652
  $ref: string;
574
653
  };
575
654
  alohaContainer: {
576
655
  type: string;
577
656
  title: string;
578
657
  description: string;
658
+ markdownDescription: string;
579
659
  $ref: string;
580
660
  };
581
661
  settingContainer: {
582
662
  type: string;
583
663
  title: string;
584
664
  description: string;
665
+ markdownDescription: string;
585
666
  $ref: string;
586
667
  };
587
668
  commandContainer: {
588
669
  type: string;
589
670
  title: string;
590
671
  description: string;
672
+ markdownDescription: string;
591
673
  $ref: string;
592
674
  };
593
675
  serverStorageContainer: {
594
676
  type: string;
595
677
  title: string;
596
678
  description: string;
679
+ markdownDescription: string;
597
680
  $ref: string;
598
681
  };
599
682
  serverRelationsContainer: {
600
683
  type: string;
601
684
  title: string;
602
685
  description: string;
686
+ markdownDescription: string;
603
687
  $ref: string;
604
688
  };
605
689
  configurationFields: {
606
690
  type: string;
607
691
  description: string;
692
+ markdownDescription: string;
608
693
  additionalProperties: boolean;
694
+ errorMessage: {
695
+ additionalProperties: string;
696
+ };
609
697
  $ref: string;
610
698
  properties: {};
611
699
  patternProperties: {
@@ -619,7 +707,11 @@ export declare namespace DDE {
619
707
  timeseriesFields: {
620
708
  type: string;
621
709
  description: string;
710
+ markdownDescription: string;
622
711
  additionalProperties: boolean;
712
+ errorMessage: {
713
+ additionalProperties: string;
714
+ };
623
715
  $ref: string;
624
716
  patternProperties: {
625
717
  "^(?!.*^field\\d+$)(?!.*^ch\\d+$)[a-zA-Z_][0-9a-zA-Z_]*$": {
@@ -634,6 +726,7 @@ export declare namespace DDE {
634
726
  channelMode: {
635
727
  type: string[];
636
728
  description: string;
729
+ markdownDescription: string;
637
730
  anyOf: ({
638
731
  const: string;
639
732
  description: string;
@@ -664,18 +757,21 @@ export declare namespace DDE {
664
757
  title: string;
665
758
  type: string[];
666
759
  description: string;
760
+ markdownDescription: string;
667
761
  $ref: string;
668
762
  };
669
763
  chartTriggerThreshold: {
670
764
  title: string;
671
765
  type: string[];
672
766
  description: string;
767
+ markdownDescription: string;
673
768
  $ref: string;
674
769
  };
675
770
  chartTriggerRelation: {
676
771
  title: string;
677
772
  type: string[];
678
773
  description: string;
774
+ markdownDescription: string;
679
775
  anyOf: ({
680
776
  title: string;
681
777
  description: string;
@@ -692,11 +788,15 @@ export declare namespace DDE {
692
788
  title: string;
693
789
  type: string[];
694
790
  description: string;
791
+ markdownDescription: string;
695
792
  $ref: string;
696
793
  };
697
794
  };
698
795
  dependencies: {
699
- chartTriggerRelation: string[];
796
+ chartTriggerRelation: {
797
+ required: string[];
798
+ errorMessage: string;
799
+ };
700
800
  };
701
801
  $ref?: undefined;
702
802
  })[];
@@ -706,16 +806,46 @@ export declare namespace DDE {
706
806
  reservedNamesFieldNames: {
707
807
  type: string;
708
808
  properties: {
709
- _id: boolean;
710
- id: boolean;
711
- _stamp: boolean;
712
- stamp: boolean;
713
- tag: boolean;
714
- _uid: boolean;
715
- customer_id: boolean;
716
- site_id: boolean;
717
- _rec_flags__: boolean;
718
- applog: boolean;
809
+ _id: {
810
+ not: {};
811
+ errorMessage: string;
812
+ };
813
+ id: {
814
+ not: {};
815
+ errorMessage: string;
816
+ };
817
+ _stamp: {
818
+ not: {};
819
+ errorMessage: string;
820
+ };
821
+ stamp: {
822
+ not: {};
823
+ errorMessage: string;
824
+ };
825
+ tag: {
826
+ not: {};
827
+ errorMessage: string;
828
+ };
829
+ _uid: {
830
+ not: {};
831
+ errorMessage: string;
832
+ };
833
+ customer_id: {
834
+ not: {};
835
+ errorMessage: string;
836
+ };
837
+ site_id: {
838
+ not: {};
839
+ errorMessage: string;
840
+ };
841
+ _rec_flags__: {
842
+ not: {};
843
+ errorMessage: string;
844
+ };
845
+ applog: {
846
+ not: {};
847
+ errorMessage: string;
848
+ };
719
849
  };
720
850
  };
721
851
  defaultFieldProperties: {
@@ -728,6 +858,7 @@ export declare namespace DDE {
728
858
  title: {
729
859
  type: string;
730
860
  description: string;
861
+ markdownDescription: string;
731
862
  };
732
863
  description: {
733
864
  type: string;
@@ -736,22 +867,26 @@ export declare namespace DDE {
736
867
  array: {
737
868
  type: string;
738
869
  description: string;
870
+ markdownDescription: string;
739
871
  minimum: number;
740
872
  inclusiveMaximum: number;
741
873
  };
742
874
  unit: {
743
875
  type: string;
744
876
  description: string;
877
+ markdownDescription: string;
745
878
  };
746
879
  hex: {
747
880
  type: string;
748
881
  description: string;
882
+ markdownDescription: string;
749
883
  };
750
884
  decimalPlaces: {
751
885
  $ref: string;
752
886
  };
753
887
  writePermission: {
754
888
  description: string;
889
+ markdownDescription: string;
755
890
  anyOf: ({
756
891
  $ref: string;
757
892
  const?: undefined;
@@ -766,6 +901,7 @@ export declare namespace DDE {
766
901
  };
767
902
  readPermission: {
768
903
  description: string;
904
+ markdownDescription: string;
769
905
  $ref: string;
770
906
  };
771
907
  bytes: boolean;
@@ -791,20 +927,28 @@ export declare namespace DDE {
791
927
  deprecated: boolean;
792
928
  title: string;
793
929
  description: string;
930
+ markdownDescription: string;
794
931
  $ref: string;
795
932
  };
796
933
  bitmask: {
797
934
  type: string;
798
935
  title: string;
799
936
  description: string;
937
+ markdownDescription: string;
800
938
  anyOf: {
801
939
  default: string;
802
940
  pattern: string;
941
+ patternErrorMessage: string;
803
942
  description: string;
804
943
  }[];
805
944
  };
806
945
  };
807
946
  required: string[];
947
+ errorMessage: {
948
+ required: {
949
+ type: string;
950
+ };
951
+ };
808
952
  allOf: ({
809
953
  if: {
810
954
  description: string;
@@ -821,11 +965,14 @@ export declare namespace DDE {
821
965
  bytes: {
822
966
  type: string;
823
967
  description: string;
968
+ markdownDescription: string;
824
969
  };
825
970
  defaultValue: {
826
971
  type: string;
827
972
  description: string;
973
+ markdownDescription: string;
828
974
  pattern: string;
975
+ patternErrorMessage: string;
829
976
  };
830
977
  length?: undefined;
831
978
  decimalPlaces?: undefined;
@@ -838,10 +985,19 @@ export declare namespace DDE {
838
985
  unit?: undefined;
839
986
  };
840
987
  required: string[];
988
+ errorMessage: {
989
+ required: {
990
+ bytes: string;
991
+ length?: undefined;
992
+ };
993
+ };
841
994
  };
842
995
  else: {
843
996
  properties: {
844
- bytes: boolean;
997
+ bytes: {
998
+ not: {};
999
+ errorMessage: string;
1000
+ };
845
1001
  decimalPlaces?: undefined;
846
1002
  chartMinimum?: undefined;
847
1003
  chartMaximum?: undefined;
@@ -865,12 +1021,15 @@ export declare namespace DDE {
865
1021
  length: {
866
1022
  type: string;
867
1023
  description: string;
1024
+ markdownDescription: string;
868
1025
  minimum: number;
869
1026
  };
870
1027
  defaultValue: {
871
1028
  type: string;
872
- description?: undefined;
1029
+ description: string;
1030
+ markdownDescription?: undefined;
873
1031
  pattern?: undefined;
1032
+ patternErrorMessage?: undefined;
874
1033
  };
875
1034
  bytes?: undefined;
876
1035
  decimalPlaces?: undefined;
@@ -883,6 +1042,12 @@ export declare namespace DDE {
883
1042
  unit?: undefined;
884
1043
  };
885
1044
  required: string[];
1045
+ errorMessage: {
1046
+ required: {
1047
+ length: string;
1048
+ bytes?: undefined;
1049
+ };
1050
+ };
886
1051
  };
887
1052
  else?: undefined;
888
1053
  } | {
@@ -904,34 +1069,41 @@ export declare namespace DDE {
904
1069
  defaultValue: {
905
1070
  type: string[];
906
1071
  description: string;
1072
+ markdownDescription: string;
907
1073
  pattern: string;
1074
+ patternErrorMessage: string;
908
1075
  };
909
1076
  chartMinimum: {
910
1077
  type: string[];
911
1078
  description: string;
1079
+ markdownDescription: string;
912
1080
  $ref: string;
913
1081
  };
914
1082
  chartMaximum: {
915
1083
  type: string[];
916
1084
  description: string;
1085
+ markdownDescription: string;
917
1086
  $ref: string;
918
1087
  };
919
1088
  scale: {
920
1089
  type: string[];
921
1090
  title: string;
922
1091
  description: string;
1092
+ markdownDescription: string;
923
1093
  $ref: string;
924
1094
  };
925
1095
  offset: {
926
1096
  type: string[];
927
1097
  title: string;
928
1098
  description: string;
1099
+ markdownDescription: string;
929
1100
  $ref: string;
930
1101
  };
931
1102
  utilsTransferInterval: {
932
1103
  title: string;
933
1104
  type: string[];
934
1105
  description: string;
1106
+ markdownDescription: string;
935
1107
  };
936
1108
  bytes?: undefined;
937
1109
  length?: undefined;
@@ -939,14 +1111,30 @@ export declare namespace DDE {
939
1111
  unit?: undefined;
940
1112
  };
941
1113
  required?: undefined;
1114
+ errorMessage?: undefined;
942
1115
  };
943
1116
  else: {
944
1117
  properties: {
945
- decimalPlaces: boolean;
946
- chartMinimum: boolean;
947
- chartMaximum: boolean;
948
- scale: boolean;
949
- offset: boolean;
1118
+ decimalPlaces: {
1119
+ not: {};
1120
+ errorMessage: string;
1121
+ };
1122
+ chartMinimum: {
1123
+ not: {};
1124
+ errorMessage: string;
1125
+ };
1126
+ chartMaximum: {
1127
+ not: {};
1128
+ errorMessage: string;
1129
+ };
1130
+ scale: {
1131
+ not: {};
1132
+ errorMessage: string;
1133
+ };
1134
+ offset: {
1135
+ not: {};
1136
+ errorMessage: string;
1137
+ };
950
1138
  bytes?: undefined;
951
1139
  };
952
1140
  };
@@ -978,6 +1166,7 @@ export declare namespace DDE {
978
1166
  unit?: undefined;
979
1167
  };
980
1168
  required?: undefined;
1169
+ errorMessage?: undefined;
981
1170
  };
982
1171
  else?: undefined;
983
1172
  } | {
@@ -1008,6 +1197,7 @@ export declare namespace DDE {
1008
1197
  title?: undefined;
1009
1198
  };
1010
1199
  required?: undefined;
1200
+ errorMessage?: undefined;
1011
1201
  };
1012
1202
  else?: undefined;
1013
1203
  })[];
@@ -1015,29 +1205,29 @@ export declare namespace DDE {
1015
1205
  dataTypes: {
1016
1206
  type: string;
1017
1207
  description: string;
1018
- anyOf: ({
1208
+ markdownDescription: string;
1209
+ anyOf: {
1019
1210
  const: string;
1020
1211
  title: string;
1021
1212
  description: string;
1022
- } | {
1023
- const: string;
1024
- title: string;
1025
- description?: undefined;
1026
- })[];
1213
+ }[];
1027
1214
  };
1028
1215
  userLevel: {
1029
1216
  type: string;
1030
1217
  description: string;
1218
+ markdownDescription: string;
1031
1219
  anyOf: ({
1032
1220
  const: string;
1033
1221
  title: string;
1034
1222
  description: string;
1035
1223
  pattern?: undefined;
1224
+ patternErrorMessage?: undefined;
1036
1225
  } | {
1037
1226
  pattern: string;
1227
+ patternErrorMessage: string;
1228
+ description: string;
1038
1229
  const?: undefined;
1039
1230
  title?: undefined;
1040
- description?: undefined;
1041
1231
  })[];
1042
1232
  };
1043
1233
  configArrayDefinition: {
@@ -1057,17 +1247,33 @@ export declare namespace DDE {
1057
1247
  length: {
1058
1248
  type: string;
1059
1249
  description: string;
1250
+ markdownDescription: string;
1060
1251
  minimum: number;
1061
1252
  inclusiveMaximum: number;
1062
1253
  };
1063
- array: boolean;
1064
- title: boolean;
1254
+ array: {
1255
+ not: {};
1256
+ errorMessage: string;
1257
+ };
1258
+ title: {
1259
+ not: {};
1260
+ errorMessage: string;
1261
+ };
1065
1262
  };
1066
1263
  required: string[];
1264
+ errorMessage: {
1265
+ required: {
1266
+ length: string;
1267
+ fields: string;
1268
+ };
1269
+ };
1067
1270
  };
1068
1271
  else: {
1069
1272
  properties: {
1070
- fields: boolean;
1273
+ fields: {
1274
+ not: {};
1275
+ errorMessage: string;
1276
+ };
1071
1277
  };
1072
1278
  };
1073
1279
  };
@@ -1088,34 +1294,53 @@ export declare namespace DDE {
1088
1294
  length: {
1089
1295
  type: string;
1090
1296
  description: string;
1297
+ markdownDescription: string;
1091
1298
  minimum: number;
1092
1299
  inclusiveMaximum: number;
1093
1300
  };
1094
- array: boolean;
1095
- title: boolean;
1301
+ array: {
1302
+ not: {};
1303
+ errorMessage: string;
1304
+ };
1305
+ title: {
1306
+ not: {};
1307
+ errorMessage: string;
1308
+ };
1096
1309
  };
1097
1310
  required: string[];
1311
+ errorMessage: {
1312
+ required: {
1313
+ length: string;
1314
+ fields: string;
1315
+ };
1316
+ };
1098
1317
  };
1099
1318
  else: {
1100
1319
  properties: {
1101
- fields: boolean;
1320
+ fields: {
1321
+ not: {};
1322
+ errorMessage: string;
1323
+ };
1102
1324
  };
1103
1325
  };
1104
1326
  };
1105
1327
  decimalPlaces: {
1106
1328
  type: string[];
1107
1329
  description: string;
1330
+ markdownDescription: string;
1108
1331
  minimum: number;
1109
1332
  $ref: string;
1110
1333
  };
1111
1334
  relationLinkPattern: {
1112
1335
  anyOf: {
1113
1336
  pattern: string;
1337
+ patternErrorMessage: string;
1114
1338
  }[];
1115
1339
  };
1116
1340
  setPointRelationPattern: {
1117
1341
  anyOf: ({
1118
1342
  pattern: string;
1343
+ patternErrorMessage: string;
1119
1344
  const?: undefined;
1120
1345
  description?: undefined;
1121
1346
  title?: undefined;
@@ -1124,11 +1349,13 @@ export declare namespace DDE {
1124
1349
  description: string;
1125
1350
  title: string;
1126
1351
  pattern?: undefined;
1352
+ patternErrorMessage?: undefined;
1127
1353
  })[];
1128
1354
  };
1129
1355
  chartAlarmWarn: {
1130
1356
  type: string[];
1131
1357
  description: string;
1358
+ markdownDescription: string;
1132
1359
  $ref: string;
1133
1360
  };
1134
1361
  };
@@ -1139,14 +1366,16 @@ export declare namespace DDE {
1139
1366
  * @param cwd
1140
1367
  * @param fs
1141
1368
  * @param fileName
1369
+ * @param globalDefines
1142
1370
  */
1143
- export function validate(cwd: URI, fs: LocalFS, logger: Log.Logger, fileName?: string): Promise<{
1371
+ export function validate(cwd: URI, fs: LocalFS, fileName?: string, globalDefines?: Globals.Defines): Promise<{
1144
1372
  manifest: Manifest.Manifest;
1145
1373
  libraryFiles: DDE_Core.LibraryFile[];
1146
1374
  main: {
1147
1375
  path: URI;
1148
1376
  yaml: string;
1149
1377
  };
1378
+ diagnostics: Diagnostics.File[];
1150
1379
  }>;
1151
1380
  /**
1152
1381
  * Run dde compiler in the given studio directory
@@ -1160,12 +1389,13 @@ export declare namespace DDE {
1160
1389
  diagnostics: Diagnostics.File[];
1161
1390
  }>;
1162
1391
  /**
1163
- * Validate a given dde file against the dynamic dde schema
1164
- * @param ddeFilePath
1165
- * @param yaml
1166
- * @param logger
1392
+ * Validate a given dde file against the dynamic dde schema.
1393
+ * Returns structured diagnostics with YAML source positions instead of throwing.
1394
+ * @param ddeFilePath - URI of the YAML file being validated
1395
+ * @param yaml - Raw YAML content to validate
1396
+ * @returns Array of diagnostics for any YAML syntax or schema validation errors
1167
1397
  */
1168
- export function validateJsonSchema(ddeFilePath: URI, yaml: string, logger: Log.Logger): Promise<void>;
1398
+ export function validateJsonSchema(ddeFilePath: URI, yaml: string): Diagnostics.File[];
1169
1399
  /**
1170
1400
  * Creates and returns a new precompiler instance
1171
1401
  * @param manifest
@@ -1243,6 +1473,7 @@ export declare namespace DDE {
1243
1473
  * Generate all dde related dlo files
1244
1474
  * @param cwd
1245
1475
  * @param fs
1476
+ * @param logger
1246
1477
  * @param ddeJSON
1247
1478
  */
1248
1479
  export function exportAutoDloFiles(cwd: URI, fs: LocalFS, logger: Log.Logger, ddeJSON: DDEJson): Promise<void>;
@@ -1580,6 +1811,7 @@ export declare namespace DefaultFiles {
1580
1811
  dfilesProperties: string;
1581
1812
  bloPath: string;
1582
1813
  reportTemplate: string;
1814
+ definesTs: string;
1583
1815
  };
1584
1816
  dlo: {
1585
1817
  path: string;
@@ -1594,6 +1826,8 @@ export declare namespace DefaultFiles {
1594
1826
  path: string;
1595
1827
  mainDFILES: string;
1596
1828
  };
1829
+ appIni: string;
1830
+ defaultsIni: string;
1597
1831
  };
1598
1832
  /**
1599
1833
  * Changelog.md
@@ -1992,11 +2226,67 @@ export declare namespace Globals {
1992
2226
  [key: string]: string;
1993
2227
  }
1994
2228
  /**
1995
- * Read all ini files from the project directory
1996
- * @param cwd
1997
- * @param fs
2229
+ * Tracks the source location of a define entry for LSP go-to-definition
2230
+ */
2231
+ export interface DefineEntry {
2232
+ value: string;
2233
+ sourceUri: string;
2234
+ sourceLine: number;
2235
+ comment?: string;
2236
+ }
2237
+ /**
2238
+ * Sectioned config: keys grouped by ini section name
2239
+ */
2240
+ export type SectionedConfig = {
2241
+ [section: string]: Defines;
2242
+ };
2243
+ /**
2244
+ * The resolved configuration returned by Globals.read()
2245
+ */
2246
+ export interface ResolvedConfig {
2247
+ /** Flat key-value defines - used by DLO #define and DDE {{KEY}} templates */
2248
+ flat: Defines;
2249
+ /** Keys grouped by ini section */
2250
+ sections: SectionedConfig;
2251
+ /** Source tracking for each key (for LSP go-to-definition) */
2252
+ definesWithSource: {
2253
+ [key: string]: DefineEntry;
2254
+ };
2255
+ }
2256
+ /**
2257
+ * Read all ini files from the project directory and its dependencies.
2258
+ *
2259
+ * Merge order (lowest → highest priority):
2260
+ * Library dlo/<name>.ini & defaults.ini (from each installed dependency)
2261
+ * Project dlo/<name>.ini (library projects only)
2262
+ * Project dlo/main.ini (or manifest dlo.iniFile override)
2263
+ * Project defaults.ini (library) or app.ini (app/addon/analytics)
2264
+ *
2265
+ * @param cwd - project root URI
2266
+ * @param fs - filesystem abstraction
2267
+ * @param logger
1998
2268
  */
1999
- export function read(cwd: URI, fs: LocalFS): Promise<Defines>;
2269
+ export function read(cwd: URI, fs: LocalFS, logger: Log.Logger): Promise<ResolvedConfig>;
2270
+ /**
2271
+ * Generate a dist/defines.ts file from the resolved config.
2272
+ * The generated file creates/extends globalThis.STUDIO_DEFINES.
2273
+ *
2274
+ * @param cwd - project root URI
2275
+ * @param fs - filesystem abstraction
2276
+ * @param resolvedConfig - the resolved config from Globals.read()
2277
+ */
2278
+ export function exportDefinesTs(cwd: URI, fs: LocalFS, resolvedConfig: ResolvedConfig): Promise<void>;
2279
+ /**
2280
+ * Replace {{KEY}} template tokens in a string with their resolved values.
2281
+ *
2282
+ * @param content - the content string with {{KEY}} tokens
2283
+ * @param defines - the flat defines map
2284
+ * @returns the substituted string and list of unresolved keys
2285
+ */
2286
+ export function replaceDefineTemplates(content: string, defines: Defines): {
2287
+ result: string;
2288
+ unresolvedKeys: string[];
2289
+ };
2000
2290
  }
2001
2291
 
2002
2292
  /**