From 9a895fe33bc3ec11c2e0df227aa102ecab32e38e Mon Sep 17 00:00:00 2001 From: Qi Liang Date: Tue, 12 Mar 2024 13:44:37 +0800 Subject: [PATCH 1/2] Export interfaces Signed-off-by: Qi Liang --- package-lock.json | 4 ++-- package.json | 2 +- src/__test__/allocateDataset.test.ts | 3 +-- src/__test__/deleteJob.test.ts | 3 +-- src/__test__/getJobLog.test.ts | 3 +-- src/__test__/getJobStatus.test.ts | 4 +--- src/__test__/listDatasets.test.ts | 4 +--- src/__test__/listFiles.test.ts | 3 +-- src/__test__/listJobs.test.ts | 3 +-- src/__test__/queryJob.test.ts | 3 +-- src/__unit__/zosAccessor.test.ts | 3 +-- src/zosAccessor.ts | 16 ++++++++++++---- 12 files changed, 24 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index 32d81bf..e384920 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "zos-node-accessor", - "version": "2.0.9", + "version": "2.0.10", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "zos-node-accessor", - "version": "2.0.9", + "version": "2.0.10", "license": "EPL-1.0", "dependencies": { "ftp4": "~0.3.13", diff --git a/package.json b/package.json index dfd745a..168f673 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zos-node-accessor", - "version": "2.0.9", + "version": "2.0.10", "description": "Accessing z/OS dataset and interacting with JES in NodeJS way", "main": "./lib/zosAccessor.js", "types": "./lib/zosAccessor.d.ts", diff --git a/src/__test__/allocateDataset.test.ts b/src/__test__/allocateDataset.test.ts index 4ac9646..c6f51f3 100644 --- a/src/__test__/allocateDataset.test.ts +++ b/src/__test__/allocateDataset.test.ts @@ -11,10 +11,9 @@ /* */ /****************************************************************************/ -import { ZosAccessor } from '../zosAccessor'; +import { ZosAccessor, DatasetEntry } from '../zosAccessor'; import { connectFTPServer, getRandomDatasetName, deleteDataset } from './testUtils'; import { Utils } from '../utils'; -import { DatasetEntry } from '../interfaces/DatasetEntry'; let dsn: string; diff --git a/src/__test__/deleteJob.test.ts b/src/__test__/deleteJob.test.ts index 83e4953..ad4f197 100644 --- a/src/__test__/deleteJob.test.ts +++ b/src/__test__/deleteJob.test.ts @@ -11,8 +11,7 @@ /* */ /****************************************************************************/ -import { JobIdOption } from '../interfaces/JobIdOption'; -import { ZosAccessor } from '../zosAccessor'; +import { ZosAccessor, JobIdOption } from '../zosAccessor'; import { connectFTPServer, submitHelloJob } from './testUtils'; describe('The method of submitJCL()', () => { diff --git a/src/__test__/getJobLog.test.ts b/src/__test__/getJobLog.test.ts index 30a908e..15c0ea7 100644 --- a/src/__test__/getJobLog.test.ts +++ b/src/__test__/getJobLog.test.ts @@ -11,8 +11,7 @@ /* */ /****************************************************************************/ -import { JobLogOption } from '../interfaces/JobIdOption'; -import { ZosAccessor } from '../zosAccessor'; +import { ZosAccessor, JobLogOption } from '../zosAccessor'; import { connectFTPServer, submitHelloJob } from './testUtils'; describe('The method of getJobLog()', () => { diff --git a/src/__test__/getJobStatus.test.ts b/src/__test__/getJobStatus.test.ts index ed1197c..ee3ca49 100644 --- a/src/__test__/getJobStatus.test.ts +++ b/src/__test__/getJobStatus.test.ts @@ -11,9 +11,7 @@ /* */ /****************************************************************************/ -import { JobIdOption } from '../interfaces/JobIdOption'; -import { SpoolFile } from '../interfaces/SpoolFile'; -import { ZosAccessor } from '../zosAccessor'; +import { ZosAccessor, JobIdOption, SpoolFile } from '../zosAccessor'; import { connectFTPServer, submitHelloJob, USERNAME } from './testUtils'; describe('The method of getJobStatus()', () => { diff --git a/src/__test__/listDatasets.test.ts b/src/__test__/listDatasets.test.ts index 0648968..aa64af8 100644 --- a/src/__test__/listDatasets.test.ts +++ b/src/__test__/listDatasets.test.ts @@ -11,9 +11,7 @@ /* */ /****************************************************************************/ -import { DatasetEntry } from '../interfaces/DatasetEntry'; -import { DatasetMemberEntry } from '../interfaces/DatasetMemberEntry'; -import { TransferMode, ZosAccessor } from '../zosAccessor'; +import { TransferMode, ZosAccessor, DatasetEntry, DatasetMemberEntry } from '../zosAccessor'; import { connectFTPServer, deleteDataset, diff --git a/src/__test__/listFiles.test.ts b/src/__test__/listFiles.test.ts index 8596bf4..7abbba0 100644 --- a/src/__test__/listFiles.test.ts +++ b/src/__test__/listFiles.test.ts @@ -13,8 +13,7 @@ import path from 'path'; -import { FileType, USSEntry } from '../interfaces/USSEntry'; -import { ZosAccessor } from '../zosAccessor'; +import { ZosAccessor, FileType, USSEntry } from '../zosAccessor'; import { connectFTPServer, deleteDirectory, diff --git a/src/__test__/listJobs.test.ts b/src/__test__/listJobs.test.ts index 1a88bb2..6fd1edf 100644 --- a/src/__test__/listJobs.test.ts +++ b/src/__test__/listJobs.test.ts @@ -11,8 +11,7 @@ /* */ /****************************************************************************/ -import { JobListOption } from '../interfaces/JobListOption'; -import { ZosAccessor } from '../zosAccessor'; +import { ZosAccessor, JobListOption } from '../zosAccessor'; import { connectFTPServer, submitHelloJob } from './testUtils'; describe('The method of listJobs()', () => { diff --git a/src/__test__/queryJob.test.ts b/src/__test__/queryJob.test.ts index 854500f..22053ed 100644 --- a/src/__test__/queryJob.test.ts +++ b/src/__test__/queryJob.test.ts @@ -11,9 +11,8 @@ /* */ /****************************************************************************/ -import { ZosAccessor, JobStatusResult } from '../zosAccessor'; +import { ZosAccessor, JobStatusResult, JobIdOption } from '../zosAccessor'; import { connectFTPServer, submitHelloJob } from './testUtils'; -import { JobIdOption } from '../interfaces/JobIdOption'; describe('The method of queryJob()', () => { diff --git a/src/__unit__/zosAccessor.test.ts b/src/__unit__/zosAccessor.test.ts index 9e80405..6d0b54c 100644 --- a/src/__unit__/zosAccessor.test.ts +++ b/src/__unit__/zosAccessor.test.ts @@ -45,8 +45,7 @@ ftp4.mockImplementation(() => { import Q from 'q'; import * as stream from 'stream'; -import { SpoolFile } from '../interfaces/SpoolFile'; -import { JobStatusResult, TransferMode, ZosAccessor } from '../zosAccessor'; +import { JobStatusResult, TransferMode, ZosAccessor, SpoolFile } from '../zosAccessor'; import { rawDatasetList } from './testInput'; const USERNAME = 'ADCDA'; diff --git a/src/zosAccessor.ts b/src/zosAccessor.ts index 52b1f7b..da1dacb 100644 --- a/src/zosAccessor.ts +++ b/src/zosAccessor.ts @@ -1257,7 +1257,15 @@ class ZosAccessor { } } -export { - ZosAccessor, -}; - +export { ZosAccessor }; + +export { ConnectionOption } from "./interfaces/ConnectionOption"; +export { DatasetEntry } from "./interfaces/DatasetEntry"; +export { DatasetMemberEntry } from "./interfaces/DatasetMemberEntry"; +export { Entry } from "./interfaces/Entry"; +export { Job, JobStatus } from "./interfaces/Job" +export { JobLogOption, JobIdOption } from "./interfaces/JobIdOption" +export { JobListOption } from "./interfaces/JobListOption" +export { LoadLibMemberEntry } from "./interfaces/LoadLibMemberEntry"; +export { SpoolFile } from "./interfaces/SpoolFile" +export { USSEntry, FileType } from "./interfaces/USSEntry"; From c253ee855250b40cd544a7005584dc76db1beb89 Mon Sep 17 00:00:00 2001 From: Qi Liang Date: Sat, 16 Mar 2024 13:05:58 +0800 Subject: [PATCH 2/2] Import interface from zosAccessor Signed-off-by: Qi Liang --- src/__test__/testUtils.ts | 3 +-- src/__unit__/parser.test.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/__test__/testUtils.ts b/src/__test__/testUtils.ts index cae2b51..fd481de 100644 --- a/src/__test__/testUtils.ts +++ b/src/__test__/testUtils.ts @@ -16,9 +16,8 @@ import * as path from 'path'; import Q from 'q'; import { Writable, WritableOptions } from 'stream'; -import { JobIdOption } from '../interfaces/JobIdOption'; import { Utils } from '../utils'; -import { FileToOperate, ZosAccessor } from '../zosAccessor'; +import { FileToOperate, ZosAccessor, JobIdOption } from '../zosAccessor'; export interface JobNameAndJCL { jobName: string; diff --git a/src/__unit__/parser.test.ts b/src/__unit__/parser.test.ts index 64babc1..b48705a 100644 --- a/src/__unit__/parser.test.ts +++ b/src/__unit__/parser.test.ts @@ -11,7 +11,7 @@ /* */ /****************************************************************************/ -import { USSEntry } from '../interfaces/USSEntry'; +import { USSEntry } from '../zosAccessor'; import { parseDataSets, parseLoadLibPDSMembers, parsePDSMembers, parseUSSDirList } from '../parser'; import { rawDatasetList, rawLoadLibMemberList, rawUSSList, rawUSSList2, rawUSSList3 } from './testInput';