@ibm/zapp-core 1.2.2 → 1.2.3

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/index.d.ts +78 -12
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -126,7 +126,7 @@ export abstract class SchemaDocumentCache {
126
126
  protected normalizePath(inputPath: string): string;
127
127
  }
128
128
  /**
129
- * JSON schema for zapp.json and zapp.yaml files. Version 1.2.0 -- Licensed Materials - Property of IBM - (c) Copyright IBM Corporation 2022, 2023. All Rights Reserved.
129
+ * JSON schema for zapp.json and zapp.yaml files. Version 1.2.1 -- Licensed Materials - Property of IBM - (c) Copyright IBM Corporation 2022, 2024. All Rights Reserved.
130
130
  */
131
131
  export type IBMZappDocument = CoreProperties;
132
132
  /**
@@ -151,14 +151,14 @@ export type Profile = {
151
151
  settings: RseapiSettingsItem;
152
152
  } | {
153
153
  name: string;
154
+ language: string;
154
155
  type: 'preprocessor';
155
- location: 'local';
156
- settings: LocalPreprocessorSettingsItem;
156
+ location: string;
157
+ settings: LocalPreprocessorSettingsItem | MvsPreprocessorSettingsItem;
157
158
  } | {
158
159
  name: string;
159
- type: 'preprocessor';
160
- location: 'mvs';
161
- settings: MvsPreprocessorSettingsItem;
160
+ type: 'test';
161
+ settings: TestSettingsItem;
162
162
  };
163
163
  export interface CoreProperties {
164
164
  /**
@@ -381,6 +381,66 @@ export interface MvsPreprocessorSettingsItem {
381
381
  */
382
382
  tempDataHLQ: string;
383
383
  }
384
+ /**
385
+ * Test properties for a test case.
386
+ */
387
+ export interface TestSettingsItem {
388
+ /**
389
+ * Properties to run a unit test case.
390
+ */
391
+ unitTest: {
392
+ /**
393
+ * Specifies the list of Procedure libraries.
394
+ */
395
+ procLib: string[];
396
+ /**
397
+ * If this option is selected, the data set for the working file is allocated automatically with the allocation options.
398
+ */
399
+ allocateWorkingDs?: boolean;
400
+ /**
401
+ * Options to allocate a working file.
402
+ */
403
+ ioDataSetAllocation?: {
404
+ /**
405
+ * The unit of primary and secondary space to be allocated.
406
+ */
407
+ ioSpaceUnit?: 'TRACKS' | 'BLOCKS' | 'CYLINDERS';
408
+ /**
409
+ * The amount of DASD space to be used for primary space allocation (PRIMARY).
410
+ */
411
+ ioQuant1?: number;
412
+ /**
413
+ * The amount of DASD space to be used for secondary space allocation (SECONDARY).
414
+ */
415
+ ioQuant2?: number;
416
+ /**
417
+ * The high-level qualifier for the VSAM or QSAM data files for file I/O simulation. These files are allocated when running a Unit test case.
418
+ */
419
+ ioHLQ?: string;
420
+ [k: string]: unknown;
421
+ };
422
+ /**
423
+ * Runner configuration destination container.
424
+ */
425
+ configDS?: string;
426
+ /**
427
+ * Runner result destination container.
428
+ */
429
+ resultDS?: string;
430
+ /**
431
+ * The datat set of the application under test
432
+ */
433
+ userLibraries?: string[];
434
+ /**
435
+ * The default local folder to create the test case artifacts.
436
+ */
437
+ defaultTestCaseFolder?: string;
438
+ /**
439
+ * The job card to run a unit test
440
+ */
441
+ jobcard?: string;
442
+ };
443
+ }
384
444
  /**
385
445
  * A meta-data representation of a zapp file
386
446
  * providing path and type.
@@ -677,44 +737,50 @@ export class RseApiController extends ZappProfilesController {
677
737
  export class PreprocessorController extends ZappProfilesController {
678
738
  /**
679
739
  * @param {string} workspacePath Path to a folder in which a zapp file can be found
740
+ * @param {string} [language] optional filter by language
680
741
  * @returns {(string[] | undefined)} Returns the list of all the profiles founds in a currently caches ZAPP file
681
742
  */
682
- static getPreprocessorProfileNames(workspacePath: string): string[] | undefined;
743
+ static getPreprocessorProfileNames(workspacePath: string, language?: string): string[] | undefined;
683
744
  /**
684
745
  * @param {string} workspacePath Path to a folder in which a zapp file can be found
746
+ * @param {string} [language] optional filter by language
685
747
  * @returns {(string[] | undefined)} Returns the list of all the profiles founds in a currently caches ZAPP file based on location
686
748
  */
687
- static getPreprocessorProfileNamesBasedOnLocation(workspacePath: string, location: string): string[] | undefined;
749
+ static getPreprocessorProfileNamesBasedOnLocation(workspacePath: string, location: string, language?: string): string[] | undefined;
688
750
  /**
689
751
  * Requires that the ZAPP file was already cached. If in doubt call loadPreprocessorSettings()
690
752
  *
691
753
  * @param {string} workspacePath Path to a folder in which a zapp file can be found
754
+ * @param {string} [language] optional filter by language
692
755
  * @returns {(zapp.LocalPreprocessorSettingsItem | undefined)} Returns the settings specified for Local Preprocessor
693
756
  */
694
- static getLocalPreprocessorSettings(workspacePath: string): LocalPreprocessorSettingsItem | undefined;
757
+ static getLocalPreprocessorSettings(workspacePath: string, language?: string): LocalPreprocessorSettingsItem | undefined;
695
758
  /**
696
759
  * Requires that the ZAPP file was already cached. If in doubt call loadPreprocessorSettings()
697
760
  *
698
761
  * @param {string} workspacePath Path to a folder in which a zapp file can be found
762
+ * @param {string} [language] optional filter by language
699
763
  * @returns {(zapp.MvsPreprocessorSettingsItem | undefined)} Returns the settings specified for Remote Preprocessor
700
764
  */
701
- static getMvsPreprocessorSettings(workspacePath: string): MvsPreprocessorSettingsItem | undefined;
765
+ static getMvsPreprocessorSettings(workspacePath: string, language?: string): MvsPreprocessorSettingsItem | undefined;
702
766
  /**
703
767
  * Requires that the ZAPP file was already cached. If in doubt call loadPreprocessorSettings()
704
768
  *
705
769
  * @param {string} workspacePath Path to a folder in which a zapp file can be found
706
770
  * @param {string} name Name of the preprocessor profile
771
+ * @param {string} [language] optional filter by language
707
772
  * @returns {(zapp.LocalPreprocessorSettingsItem | undefined)} Returns the settings specified for Local Preprocessor
708
773
  */
709
- static getLocalPreprocessorProfileNamesBasedOnName(workspacePath: string, name: string): LocalPreprocessorSettingsItem | undefined;
774
+ static getLocalPreprocessorProfileNamesBasedOnName(workspacePath: string, name: string, language?: string): LocalPreprocessorSettingsItem | undefined;
710
775
  /**
711
776
  * Requires that the ZAPP file was already cached. If in doubt call loadPreprocessorSettings()
712
777
  *
713
778
  * @param {string} workspacePath Path to a folder in which a zapp file can be found
714
779
  * @param {string} name Name of the preprocessor profile
780
+ * @param {string} [language] optional filter by language
715
781
  * @returns {(zapp.MvsPreprocessorSettingsItem | undefined)} Returns the settings specified for Remote Preprocessor
716
782
  */
717
- static getMvsPreprocessorProfileNamesBasedOnName(workspacePath: string, name: string): MvsPreprocessorSettingsItem | undefined;
783
+ static getMvsPreprocessorProfileNamesBasedOnName(workspacePath: string, name: string, language?: string): MvsPreprocessorSettingsItem | undefined;
718
784
  }
719
785
 
720
786
  //# sourceMappingURL=index.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibm/zapp-core",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "IBM ZAPP parser and core utilities",
5
5
  "publisher": "IBM",
6
6
  "license": "SEE LICENSE IN LICENSE.txt",