From d68b6257350c724a3eb831edd373567e598b5806 Mon Sep 17 00:00:00 2001 From: Timothy Johnson Date: Fri, 1 Nov 2024 15:57:41 -0400 Subject: [PATCH] Fix imports failing to resolve in TSO SDK Signed-off-by: Timothy Johnson --- .eslintrc.js | 6 ++++++ packages/imperative/src/cmd/src/doc/ICommandDefinition.ts | 2 +- .../cmd/src/doc/handler/ICommandHandlerResponseValidator.ts | 2 +- .../src/doc/response/api/handler/IHandlerFormatOutputApi.ts | 2 +- .../imperative/src/cmd/src/help/DefaultHelpGenerator.ts | 2 +- packages/imperative/src/cmd/src/response/CommandResponse.ts | 2 +- .../imperative/src/cmd/src/yargs/AbstractCommandYargs.ts | 2 +- packages/imperative/src/cmd/src/yargs/CommandYargs.ts | 6 +++--- packages/imperative/src/cmd/src/yargs/doc/IYargsResponse.ts | 2 +- .../src/imperative/src/plugins/PluginManagementFacility.ts | 4 ++-- packages/zostso/CHANGELOG.md | 4 ++++ packages/zostso/src/AddressSpaceApps.ts | 2 +- packages/zostso/src/doc/IASAppResponse.ts | 2 +- packages/zostso/src/doc/IIssueResponse.ts | 2 +- 14 files changed, 25 insertions(+), 15 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 2e3218d37f..20b722d1da 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -25,6 +25,7 @@ module.exports = { ], "rules": { "@typescript-eslint/no-magic-numbers": "off", + "@typescript-eslint/no-restricted-imports": "off", "jest/expect-expect": ["warn", { "assertFunctionNames": ["expect*", "**.*expect*"] }], @@ -64,6 +65,11 @@ module.exports = { "ignoreEnums": true, "ignoreReadonlyClassProperties": true }], + "@typescript-eslint/no-restricted-imports": ["error", { + "patterns": [{ + "group": ["**/../lib", "**/../src"] + }] + }], "@typescript-eslint/no-unused-vars": "off", "@typescript-eslint/no-var-requires": "off", "@typescript-eslint/semi": "warn", diff --git a/packages/imperative/src/cmd/src/doc/ICommandDefinition.ts b/packages/imperative/src/cmd/src/doc/ICommandDefinition.ts index 3d8294934d..8a750b165d 100644 --- a/packages/imperative/src/cmd/src/doc/ICommandDefinition.ts +++ b/packages/imperative/src/cmd/src/doc/ICommandDefinition.ts @@ -14,7 +14,7 @@ import { IChainedHandlerEntry } from "./handler/IChainedHandlerEntry"; import { ICommandOptionDefinition } from "./option/ICommandOptionDefinition"; import { ICommandPositionalDefinition } from "./option/ICommandPositionalDefinition"; import { ICommandDefinitionPassOn } from "./ICommandDefinitionPassOn"; -import { ICommandProfile } from "../../src/doc/profiles/definition/ICommandProfile"; +import { ICommandProfile } from "../doc/profiles/definition/ICommandProfile"; /** * Command Segment type - either "group" or "command". * diff --git a/packages/imperative/src/cmd/src/doc/handler/ICommandHandlerResponseValidator.ts b/packages/imperative/src/cmd/src/doc/handler/ICommandHandlerResponseValidator.ts index 6ec47d051c..581bef3595 100644 --- a/packages/imperative/src/cmd/src/doc/handler/ICommandHandlerResponseValidator.ts +++ b/packages/imperative/src/cmd/src/doc/handler/ICommandHandlerResponseValidator.ts @@ -9,7 +9,7 @@ * */ -import { ICommandResponse } from "../../../src/doc/response/response/ICommandResponse"; +import { ICommandResponse } from "../../doc/response/response/ICommandResponse"; import { CommandResponse } from "../../response/CommandResponse"; export interface ICommandHandlerResponseValidator { diff --git a/packages/imperative/src/cmd/src/doc/response/api/handler/IHandlerFormatOutputApi.ts b/packages/imperative/src/cmd/src/doc/response/api/handler/IHandlerFormatOutputApi.ts index f52555ee6d..4ab25a36e9 100644 --- a/packages/imperative/src/cmd/src/doc/response/api/handler/IHandlerFormatOutputApi.ts +++ b/packages/imperative/src/cmd/src/doc/response/api/handler/IHandlerFormatOutputApi.ts @@ -9,7 +9,7 @@ * */ -import { ICommandOutputFormat } from "../../../../../src/doc/response/response/ICommandOutputFormat"; +import { ICommandOutputFormat } from "../../../../doc/response/response/ICommandOutputFormat"; export interface IHandlerFormatOutputApi { output: (format: ICommandOutputFormat) => void; diff --git a/packages/imperative/src/cmd/src/help/DefaultHelpGenerator.ts b/packages/imperative/src/cmd/src/help/DefaultHelpGenerator.ts index 59387adb23..19d1dd2e1a 100644 --- a/packages/imperative/src/cmd/src/help/DefaultHelpGenerator.ts +++ b/packages/imperative/src/cmd/src/help/DefaultHelpGenerator.ts @@ -17,7 +17,7 @@ import { CommandUtils } from "../utils/CommandUtils"; import { ImperativeError } from "../../../error"; import { IHelpGeneratorParms } from "./doc/IHelpGeneratorParms"; import { IHelpGeneratorFactoryParms } from "./doc/IHelpGeneratorFactoryParms"; -import { compareCommands, ICommandDefinition } from "../../src/doc/ICommandDefinition"; +import { compareCommands, ICommandDefinition } from "../doc/ICommandDefinition"; import stripAnsi = require("strip-ansi"); import { CliUtils } from "../../../utilities/src/CliUtils"; diff --git a/packages/imperative/src/cmd/src/response/CommandResponse.ts b/packages/imperative/src/cmd/src/response/CommandResponse.ts index 17470952f2..62c44037ef 100644 --- a/packages/imperative/src/cmd/src/response/CommandResponse.ts +++ b/packages/imperative/src/cmd/src/response/CommandResponse.ts @@ -24,7 +24,7 @@ import { ImperativeExpect } from "../../../expect"; import { IHandlerFormatOutputApi } from "../doc/response/api/handler/IHandlerFormatOutputApi"; import { ICommandOutputFormat, OUTPUT_FORMAT } from "../doc/response/response/ICommandOutputFormat"; import { Arguments } from "yargs"; -import { ICommandDefinition } from "../../src/doc/ICommandDefinition"; +import { ICommandDefinition } from "../doc/ICommandDefinition"; import { OptionConstants } from "../constants/OptionConstants"; import { inspect } from "util"; import * as DeepMerge from "deepmerge"; diff --git a/packages/imperative/src/cmd/src/yargs/AbstractCommandYargs.ts b/packages/imperative/src/cmd/src/yargs/AbstractCommandYargs.ts index a179f2786b..d0a5381066 100644 --- a/packages/imperative/src/cmd/src/yargs/AbstractCommandYargs.ts +++ b/packages/imperative/src/cmd/src/yargs/AbstractCommandYargs.ts @@ -21,7 +21,7 @@ import { ImperativeYargsCommandAction, IYargsResponse } from "./doc/IYargsRespon import { GroupCommandYargs } from "./GroupCommandYargs"; import { IHelpGeneratorFactory } from "../help/doc/IHelpGeneratorFactory"; import { CommandResponse } from "../response/CommandResponse"; -import { ICommandResponse } from "../../src/doc/response/response/ICommandResponse"; +import { ICommandResponse } from "../doc/response/response/ICommandResponse"; import { ICommandExampleDefinition } from "../.."; import { ImperativeConfig } from "../../../utilities/src/ImperativeConfig"; diff --git a/packages/imperative/src/cmd/src/yargs/CommandYargs.ts b/packages/imperative/src/cmd/src/yargs/CommandYargs.ts index 637e8389d3..3b22542ec0 100644 --- a/packages/imperative/src/cmd/src/yargs/CommandYargs.ts +++ b/packages/imperative/src/cmd/src/yargs/CommandYargs.ts @@ -14,11 +14,11 @@ import { inspect } from "util"; import { Constants } from "../../../constants"; import { IYargsResponse } from "./doc/IYargsResponse"; import { AbstractCommandYargs, YargsCommandCompleted } from "./AbstractCommandYargs"; -import { ICommandOptionDefinition } from "../../src/doc/option/ICommandOptionDefinition"; +import { ICommandOptionDefinition } from "../doc/option/ICommandOptionDefinition"; import { ICommandDefinition } from "../doc/ICommandDefinition"; import { CommandProcessor } from "../CommandProcessor"; -import { ICommandResponse } from "../../src/doc/response/response/ICommandResponse"; -import { CommandResponse } from "../../src/response/CommandResponse"; +import { ICommandResponse } from "../doc/response/response/ICommandResponse"; +import { CommandResponse } from "../response/CommandResponse"; import { ImperativeConfig } from "../../../utilities"; /** diff --git a/packages/imperative/src/cmd/src/yargs/doc/IYargsResponse.ts b/packages/imperative/src/cmd/src/yargs/doc/IYargsResponse.ts index 6d3337007f..97c5b922b5 100644 --- a/packages/imperative/src/cmd/src/yargs/doc/IYargsResponse.ts +++ b/packages/imperative/src/cmd/src/yargs/doc/IYargsResponse.ts @@ -9,7 +9,7 @@ * */ -import { ICommandResponse } from "../../../src/doc/response/response/ICommandResponse"; +import { ICommandResponse } from "../../doc/response/response/ICommandResponse"; /** * Indicates the action performed. */ diff --git a/packages/imperative/src/imperative/src/plugins/PluginManagementFacility.ts b/packages/imperative/src/imperative/src/plugins/PluginManagementFacility.ts index 58094e46a5..bb152f156b 100644 --- a/packages/imperative/src/imperative/src/plugins/PluginManagementFacility.ts +++ b/packages/imperative/src/imperative/src/plugins/PluginManagementFacility.ts @@ -9,8 +9,8 @@ * */ -import { IImperativeConfig } from "../../src/doc/IImperativeConfig"; -import { UpdateImpConfig } from "../../src/UpdateImpConfig"; +import { IImperativeConfig } from "../doc/IImperativeConfig"; +import { UpdateImpConfig } from "../UpdateImpConfig"; import { isAbsolute, join } from "path"; import { ImperativeConfig, JsUtils } from "../../../utilities"; import { Logger } from "../../../logger"; diff --git a/packages/zostso/CHANGELOG.md b/packages/zostso/CHANGELOG.md index 63188b9bea..65a0667e54 100644 --- a/packages/zostso/CHANGELOG.md +++ b/packages/zostso/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the Zowe z/OS TSO SDK package will be documented in this file. +## Recent Changes + +- BugFix: Fixed imports that failed to resolve. [#2343](https://github.com/zowe/zowe-cli/pull/2343) + ## `8.6.0` - Enhancement: Issue `app` commands to better target communication with a TSO/E application. The `app` command is now included in the `start`/`send` command group and the new `receive` command group, diff --git a/packages/zostso/src/AddressSpaceApps.ts b/packages/zostso/src/AddressSpaceApps.ts index 3169d464c2..b79a93d8b9 100644 --- a/packages/zostso/src/AddressSpaceApps.ts +++ b/packages/zostso/src/AddressSpaceApps.ts @@ -18,7 +18,7 @@ import { IStartTsoParms } from "./doc/input/IStartTsoParms"; import { TsoValidator } from "./TsoValidator"; import { IStartTsoAppParms } from "./doc/input/IStartTsoAppParms"; import { StartTso } from "./StartTso"; -import { IIssueResponse } from "../src"; +import { IIssueResponse } from "./doc/IIssueResponse"; export class AddressSpaceApps { /** diff --git a/packages/zostso/src/doc/IASAppResponse.ts b/packages/zostso/src/doc/IASAppResponse.ts index 5b43b31526..d9afd33f2f 100644 --- a/packages/zostso/src/doc/IASAppResponse.ts +++ b/packages/zostso/src/doc/IASAppResponse.ts @@ -9,7 +9,7 @@ * */ -import { ITsoMessage } from "../../src"; +import { ITsoMessage } from "./zosmf/ITsoMessage"; export interface IASAppResponse { /** diff --git a/packages/zostso/src/doc/IIssueResponse.ts b/packages/zostso/src/doc/IIssueResponse.ts index b54ab48062..6d40d95287 100644 --- a/packages/zostso/src/doc/IIssueResponse.ts +++ b/packages/zostso/src/doc/IIssueResponse.ts @@ -33,7 +33,7 @@ export interface IIssueResponse { startResponse?: IStartStopResponses; /** - * Indicates if started TSO containes "READY " message + * Indicates if started TSO contains "READY" message * @type {boolean} * @memberof IIssueResponse */