@aws/lsp-codewhisperer 0.0.9 → 0.0.11
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/CHANGELOG.md +8 -0
- package/node_modules/@amzn/codewhisperer-streaming/package.json +4 -4
- package/node_modules/@aws/lsp-fqn/out/common/commonFqnWorkerPool.js +12 -25
- package/node_modules/@aws/lsp-fqn/out/common/commonFqnWorkerPool.js.map +1 -1
- package/node_modules/@aws/lsp-fqn/out/common/fqnExtractor.js +1 -2
- package/node_modules/@aws/lsp-fqn/out/common/fqnExtractor.js.map +1 -1
- package/node_modules/@aws/lsp-fqn/package.json +1 -1
- package/node_modules/@aws/lsp-fqn/tsconfig.tsbuildinfo +1 -1
- package/out/client/streamingClient/codewhispererStreamingClient.d.ts +5 -0
- package/out/client/streamingClient/codewhispererStreamingClient.js +25 -0
- package/out/client/streamingClient/codewhispererStreamingClient.js.map +1 -0
- package/out/client/token/bearer-token-service.json +55 -2
- package/out/index.d.ts +1 -0
- package/out/index.js +1 -0
- package/out/index.js.map +1 -1
- package/out/language-server/chat/chatController.js +104 -108
- package/out/language-server/chat/chatController.js.map +1 -1
- package/out/language-server/chat/chatController.test.js +16 -1
- package/out/language-server/chat/chatController.test.js.map +1 -1
- package/out/language-server/chat/chatEventParser.js +28 -34
- package/out/language-server/chat/chatEventParser.js.map +1 -1
- package/out/language-server/chat/chatSessionManagementService.js +22 -36
- package/out/language-server/chat/chatSessionManagementService.js.map +1 -1
- package/out/language-server/chat/chatSessionService.js +24 -37
- package/out/language-server/chat/chatSessionService.js.map +1 -1
- package/out/language-server/chat/constants.d.ts +2 -0
- package/out/language-server/chat/constants.js +32 -0
- package/out/language-server/chat/constants.js.map +1 -0
- package/out/language-server/chat/contexts/documentContext.js +11 -24
- package/out/language-server/chat/contexts/documentContext.js.map +1 -1
- package/out/language-server/chat/contexts/documentFqnExtractor.js +67 -78
- package/out/language-server/chat/contexts/documentFqnExtractor.js.map +1 -1
- package/out/language-server/chat/contexts/triggerContext.js +32 -44
- package/out/language-server/chat/contexts/triggerContext.js.map +1 -1
- package/out/language-server/chat/quickActions.d.ts +0 -1
- package/out/language-server/chat/quickActions.js +1 -28
- package/out/language-server/chat/quickActions.js.map +1 -1
- package/out/language-server/chat/telemetry/chatTelemetryController.js +114 -126
- package/out/language-server/chat/telemetry/chatTelemetryController.js.map +1 -1
- package/out/language-server/chat/utils.d.ts +6 -0
- package/out/language-server/chat/utils.js +60 -0
- package/out/language-server/chat/utils.js.map +1 -0
- package/out/language-server/codeWhispererService.js +13 -11
- package/out/language-server/codeWhispererService.js.map +1 -1
- package/out/language-server/constants.d.ts +3 -0
- package/out/language-server/constants.js +7 -0
- package/out/language-server/constants.js.map +1 -0
- package/out/language-server/dependencyGraph/csharpDependencyGraph.js +2 -2
- package/out/language-server/dependencyGraph/csharpDependencyGraph.js.map +1 -1
- package/out/language-server/dependencyGraph/dependencyGraph.js +12 -9
- package/out/language-server/dependencyGraph/dependencyGraph.js.map +1 -1
- package/out/language-server/dependencyGraph/gitIgnoreFilter.js +1 -0
- package/out/language-server/dependencyGraph/gitIgnoreFilter.js.map +1 -1
- package/out/language-server/netTransform/artifactManager.d.ts +29 -0
- package/out/language-server/netTransform/artifactManager.js +191 -0
- package/out/language-server/netTransform/artifactManager.js.map +1 -0
- package/out/language-server/netTransform/converter.d.ts +9 -0
- package/out/language-server/netTransform/converter.js +108 -0
- package/out/language-server/netTransform/converter.js.map +1 -0
- package/out/language-server/netTransform/metrics.d.ts +17 -0
- package/out/language-server/netTransform/metrics.js +222 -0
- package/out/language-server/netTransform/metrics.js.map +1 -0
- package/out/language-server/netTransform/models.d.ts +84 -0
- package/out/language-server/netTransform/models.js +12 -0
- package/out/language-server/netTransform/models.js.map +1 -0
- package/out/language-server/netTransform/resources/SupportedProjects.d.ts +2 -0
- package/out/language-server/netTransform/resources/SupportedProjects.js +26 -0
- package/out/language-server/netTransform/resources/SupportedProjects.js.map +1 -0
- package/out/language-server/netTransform/tests/converter.test.d.ts +1 -0
- package/out/language-server/netTransform/tests/converter.test.js +265 -0
- package/out/language-server/netTransform/tests/converter.test.js.map +1 -0
- package/out/language-server/netTransform/tests/mockData.d.ts +21 -0
- package/out/language-server/netTransform/tests/mockData.js +60 -0
- package/out/language-server/netTransform/tests/mockData.js.map +1 -0
- package/out/language-server/netTransform/tests/transformHandler.test.d.ts +1 -0
- package/out/language-server/netTransform/tests/transformHandler.test.js +242 -0
- package/out/language-server/netTransform/tests/transformHandler.test.js.map +1 -0
- package/out/language-server/netTransform/tests/validation.test.d.ts +1 -0
- package/out/language-server/netTransform/tests/validation.test.js +80 -0
- package/out/language-server/netTransform/tests/validation.test.js.map +1 -0
- package/out/language-server/netTransform/transformHandler.d.ts +27 -0
- package/out/language-server/netTransform/transformHandler.js +315 -0
- package/out/language-server/netTransform/transformHandler.js.map +1 -0
- package/out/language-server/netTransform/validation.d.ts +9 -0
- package/out/language-server/netTransform/validation.js +79 -0
- package/out/language-server/netTransform/validation.js.map +1 -0
- package/out/language-server/netTransformServer.d.ts +5 -6
- package/out/language-server/netTransformServer.js +149 -15
- package/out/language-server/netTransformServer.js.map +1 -1
- package/out/language-server/proxy-server.d.ts +1 -0
- package/out/language-server/proxy-server.js +16 -1
- package/out/language-server/proxy-server.js.map +1 -1
- package/out/language-server/securityScan/securityScanDiagnosticsProvider.js +10 -6
- package/out/language-server/securityScan/securityScanDiagnosticsProvider.js.map +1 -1
- package/out/language-server/securityScan/securityScanHandler.js +4 -0
- package/out/language-server/securityScan/securityScanHandler.js.map +1 -1
- package/out/language-server/session/sessionManager.js +35 -15
- package/out/language-server/session/sessionManager.js.map +1 -1
- package/out/language-server/telemetry/codeDiffTracker.js +69 -80
- package/out/language-server/telemetry/codeDiffTracker.js.map +1 -1
- package/out/language-server/telemetry/codePercentage.js +3 -0
- package/out/language-server/telemetry/codePercentage.js.map +1 -1
- package/out/language-server/telemetry/metric.js +8 -21
- package/out/language-server/telemetry/metric.js.map +1 -1
- package/out/language-server/telemetry/types.d.ts +38 -0
- package/out/language-server/telemetry/types.js.map +1 -1
- package/out/language-server/utils.d.ts +2 -5
- package/out/language-server/utils.js +25 -49
- package/out/language-server/utils.js.map +1 -1
- package/package.json +5 -2
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/HISTORY.md +0 -395
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/LICENSE +0 -201
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/README.md +0 -530
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/worker.js +0 -288
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/worker.js.map +0 -1
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/worker.min.js +0 -2
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/worker.min.js.map +0 -1
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/workerpool.js +0 -1737
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/workerpool.js.map +0 -1
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/workerpool.min.js +0 -3
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/workerpool.min.js.LICENSE.txt +0 -24
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/dist/workerpool.min.js.map +0 -1
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/package.json +0 -57
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/Pool.js +0 -476
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/Promise.js +0 -293
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/WorkerHandler.js +0 -547
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/debug-port-allocator.js +0 -28
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/environment.js +0 -30
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/generated/embeddedWorker.js +0 -6
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/header.js +0 -24
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/index.js +0 -60
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/requireFoolWebpack.js +0 -8
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/transfer.js +0 -12
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/types.js +0 -46
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/validateOptions.js +0 -51
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/src/worker.js +0 -256
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/Pool.d.ts +0 -130
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/Promise.d.ts +0 -125
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/WorkerHandler.d.ts +0 -89
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/debug-port-allocator.d.ts +0 -8
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/environment.d.ts +0 -4
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/generated/embeddedWorker.d.ts +0 -2
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/index.d.ts +0 -43
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/transfer.d.ts +0 -19
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/types.d.ts +0 -99
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/validateOptions.d.ts +0 -4
- package/node_modules/@aws/lsp-fqn/node_modules/workerpool/types/worker.d.ts +0 -8
- package/node_modules/@aws-sdk/middleware-recursion-detection/LICENSE +0 -201
- package/node_modules/@aws-sdk/middleware-recursion-detection/README.md +0 -10
- package/node_modules/@aws-sdk/middleware-recursion-detection/dist-cjs/index.js +0 -39
- package/node_modules/@aws-sdk/middleware-recursion-detection/dist-es/index.js +0 -34
- package/node_modules/@aws-sdk/middleware-recursion-detection/dist-types/index.d.ts +0 -18
- package/node_modules/@aws-sdk/middleware-recursion-detection/dist-types/ts3.4/index.d.ts +0 -18
- package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +0 -59
- package/node_modules/@aws-sdk/middleware-user-agent/LICENSE +0 -201
- package/node_modules/@aws-sdk/middleware-user-agent/README.md +0 -4
- package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/configurations.js +0 -10
- package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/constants.js +0 -10
- package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/index.js +0 -5
- package/node_modules/@aws-sdk/middleware-user-agent/dist-cjs/user-agent-middleware.js +0 -79
- package/node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js +0 -6
- package/node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js +0 -7
- package/node_modules/@aws-sdk/middleware-user-agent/dist-es/index.js +0 -2
- package/node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js +0 -72
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/configurations.d.ts +0 -31
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/constants.d.ts +0 -7
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/index.d.ts +0 -2
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/configurations.d.ts +0 -17
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/constants.d.ts +0 -7
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/index.d.ts +0 -2
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/ts3.4/user-agent-middleware.d.ts +0 -20
- package/node_modules/@aws-sdk/middleware-user-agent/dist-types/user-agent-middleware.d.ts +0 -17
- package/node_modules/@aws-sdk/middleware-user-agent/package.json +0 -61
- package/node_modules/@aws-sdk/util-locate-window/LICENSE +0 -201
- package/node_modules/@aws-sdk/util-locate-window/README.md +0 -4
- package/node_modules/@aws-sdk/util-locate-window/dist-cjs/index.js +0 -41
- package/node_modules/@aws-sdk/util-locate-window/dist-es/index.js +0 -10
- package/node_modules/@aws-sdk/util-locate-window/dist-types/index.d.ts +0 -6
- package/node_modules/@aws-sdk/util-locate-window/dist-types/ts3.4/index.d.ts +0 -1
- package/node_modules/@aws-sdk/util-locate-window/package.json +0 -52
- package/node_modules/@smithy/eventstream-serde-config-resolver/LICENSE +0 -201
- package/node_modules/@smithy/eventstream-serde-config-resolver/README.md +0 -10
- package/node_modules/@smithy/eventstream-serde-config-resolver/dist-cjs/EventStreamSerdeConfig.js +0 -1
- package/node_modules/@smithy/eventstream-serde-config-resolver/dist-cjs/index.js +0 -37
- package/node_modules/@smithy/eventstream-serde-config-resolver/dist-es/EventStreamSerdeConfig.js +0 -4
- package/node_modules/@smithy/eventstream-serde-config-resolver/dist-es/index.js +0 -1
- package/node_modules/@smithy/eventstream-serde-config-resolver/dist-types/EventStreamSerdeConfig.d.ts +0 -24
- package/node_modules/@smithy/eventstream-serde-config-resolver/dist-types/index.d.ts +0 -4
- package/node_modules/@smithy/eventstream-serde-config-resolver/dist-types/ts3.4/EventStreamSerdeConfig.d.ts +0 -24
- package/node_modules/@smithy/eventstream-serde-config-resolver/dist-types/ts3.4/index.d.ts +0 -4
- package/node_modules/@smithy/eventstream-serde-config-resolver/package.json +0 -61
- package/node_modules/@smithy/util-utf8/LICENSE +0 -201
- package/node_modules/@smithy/util-utf8/README.md +0 -4
- package/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.browser.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-cjs/fromUtf8.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-cjs/index.js +0 -65
- package/node_modules/@smithy/util-utf8/dist-cjs/toUint8Array.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.browser.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-cjs/toUtf8.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-es/fromUtf8.browser.js +0 -1
- package/node_modules/@smithy/util-utf8/dist-es/fromUtf8.js +0 -5
- package/node_modules/@smithy/util-utf8/dist-es/index.js +0 -3
- package/node_modules/@smithy/util-utf8/dist-es/toUint8Array.js +0 -10
- package/node_modules/@smithy/util-utf8/dist-es/toUtf8.browser.js +0 -9
- package/node_modules/@smithy/util-utf8/dist-es/toUtf8.js +0 -10
- package/node_modules/@smithy/util-utf8/dist-types/fromUtf8.browser.d.ts +0 -1
- package/node_modules/@smithy/util-utf8/dist-types/fromUtf8.d.ts +0 -1
- package/node_modules/@smithy/util-utf8/dist-types/index.d.ts +0 -3
- package/node_modules/@smithy/util-utf8/dist-types/toUint8Array.d.ts +0 -1
- package/node_modules/@smithy/util-utf8/dist-types/toUtf8.browser.d.ts +0 -7
- package/node_modules/@smithy/util-utf8/dist-types/toUtf8.d.ts +0 -7
- package/node_modules/@smithy/util-utf8/dist-types/ts3.4/fromUtf8.browser.d.ts +0 -1
- package/node_modules/@smithy/util-utf8/dist-types/ts3.4/fromUtf8.d.ts +0 -1
- package/node_modules/@smithy/util-utf8/dist-types/ts3.4/index.d.ts +0 -3
- package/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUint8Array.d.ts +0 -1
- package/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUtf8.browser.d.ts +0 -7
- package/node_modules/@smithy/util-utf8/dist-types/ts3.4/toUtf8.d.ts +0 -7
- package/node_modules/@smithy/util-utf8/package.json +0 -66
- package/node_modules/bowser/CHANGELOG.md +0 -218
- package/node_modules/bowser/LICENSE +0 -39
- package/node_modules/bowser/README.md +0 -179
- package/node_modules/bowser/bundled.js +0 -1
- package/node_modules/bowser/es5.js +0 -1
- package/node_modules/bowser/index.d.ts +0 -250
- package/node_modules/bowser/package.json +0 -83
- package/node_modules/bowser/src/bowser.js +0 -77
- package/node_modules/bowser/src/constants.js +0 -116
- package/node_modules/bowser/src/parser-browsers.js +0 -700
- package/node_modules/bowser/src/parser-engines.js +0 -120
- package/node_modules/bowser/src/parser-os.js +0 -199
- package/node_modules/bowser/src/parser-platforms.js +0 -266
- package/node_modules/bowser/src/parser.js +0 -496
- package/node_modules/bowser/src/utils.js +0 -309
- package/node_modules/tslib/CopyrightNotice.txt +0 -15
- package/node_modules/tslib/LICENSE.txt +0 -12
- package/node_modules/tslib/README.md +0 -164
- package/node_modules/tslib/SECURITY.md +0 -41
- package/node_modules/tslib/modules/index.d.ts +0 -37
- package/node_modules/tslib/modules/index.js +0 -68
- package/node_modules/tslib/modules/package.json +0 -3
- package/node_modules/tslib/package.json +0 -47
- package/node_modules/tslib/tslib.d.ts +0 -453
- package/node_modules/tslib/tslib.es6.html +0 -1
- package/node_modules/tslib/tslib.es6.js +0 -374
- package/node_modules/tslib/tslib.es6.mjs +0 -373
- package/node_modules/tslib/tslib.html +0 -1
- package/node_modules/tslib/tslib.js +0 -424
- package/node_modules/uuid/CHANGELOG.md +0 -274
- package/node_modules/uuid/CONTRIBUTING.md +0 -18
- package/node_modules/uuid/LICENSE.md +0 -9
- package/node_modules/uuid/README.md +0 -466
- package/node_modules/uuid/dist/bin/uuid +0 -2
- package/node_modules/uuid/dist/commonjs-browser/index.js +0 -79
- package/node_modules/uuid/dist/commonjs-browser/md5.js +0 -223
- package/node_modules/uuid/dist/commonjs-browser/native.js +0 -11
- package/node_modules/uuid/dist/commonjs-browser/nil.js +0 -8
- package/node_modules/uuid/dist/commonjs-browser/parse.js +0 -45
- package/node_modules/uuid/dist/commonjs-browser/regex.js +0 -8
- package/node_modules/uuid/dist/commonjs-browser/rng.js +0 -25
- package/node_modules/uuid/dist/commonjs-browser/sha1.js +0 -104
- package/node_modules/uuid/dist/commonjs-browser/stringify.js +0 -44
- package/node_modules/uuid/dist/commonjs-browser/v1.js +0 -107
- package/node_modules/uuid/dist/commonjs-browser/v3.js +0 -16
- package/node_modules/uuid/dist/commonjs-browser/v35.js +0 -80
- package/node_modules/uuid/dist/commonjs-browser/v4.js +0 -43
- package/node_modules/uuid/dist/commonjs-browser/v5.js +0 -16
- package/node_modules/uuid/dist/commonjs-browser/validate.js +0 -17
- package/node_modules/uuid/dist/commonjs-browser/version.js +0 -21
- package/node_modules/uuid/dist/esm-browser/index.js +0 -9
- package/node_modules/uuid/dist/esm-browser/md5.js +0 -215
- package/node_modules/uuid/dist/esm-browser/native.js +0 -4
- package/node_modules/uuid/dist/esm-browser/nil.js +0 -1
- package/node_modules/uuid/dist/esm-browser/parse.js +0 -35
- package/node_modules/uuid/dist/esm-browser/regex.js +0 -1
- package/node_modules/uuid/dist/esm-browser/rng.js +0 -18
- package/node_modules/uuid/dist/esm-browser/sha1.js +0 -96
- package/node_modules/uuid/dist/esm-browser/stringify.js +0 -33
- package/node_modules/uuid/dist/esm-browser/v1.js +0 -95
- package/node_modules/uuid/dist/esm-browser/v3.js +0 -4
- package/node_modules/uuid/dist/esm-browser/v35.js +0 -66
- package/node_modules/uuid/dist/esm-browser/v4.js +0 -29
- package/node_modules/uuid/dist/esm-browser/v5.js +0 -4
- package/node_modules/uuid/dist/esm-browser/validate.js +0 -7
- package/node_modules/uuid/dist/esm-browser/version.js +0 -11
- package/node_modules/uuid/dist/esm-node/index.js +0 -9
- package/node_modules/uuid/dist/esm-node/md5.js +0 -13
- package/node_modules/uuid/dist/esm-node/native.js +0 -4
- package/node_modules/uuid/dist/esm-node/nil.js +0 -1
- package/node_modules/uuid/dist/esm-node/parse.js +0 -35
- package/node_modules/uuid/dist/esm-node/regex.js +0 -1
- package/node_modules/uuid/dist/esm-node/rng.js +0 -12
- package/node_modules/uuid/dist/esm-node/sha1.js +0 -13
- package/node_modules/uuid/dist/esm-node/stringify.js +0 -33
- package/node_modules/uuid/dist/esm-node/v1.js +0 -95
- package/node_modules/uuid/dist/esm-node/v3.js +0 -4
- package/node_modules/uuid/dist/esm-node/v35.js +0 -66
- package/node_modules/uuid/dist/esm-node/v4.js +0 -29
- package/node_modules/uuid/dist/esm-node/v5.js +0 -4
- package/node_modules/uuid/dist/esm-node/validate.js +0 -7
- package/node_modules/uuid/dist/esm-node/version.js +0 -11
- package/node_modules/uuid/dist/index.js +0 -79
- package/node_modules/uuid/dist/md5-browser.js +0 -223
- package/node_modules/uuid/dist/md5.js +0 -23
- package/node_modules/uuid/dist/native-browser.js +0 -11
- package/node_modules/uuid/dist/native.js +0 -15
- package/node_modules/uuid/dist/nil.js +0 -8
- package/node_modules/uuid/dist/parse.js +0 -45
- package/node_modules/uuid/dist/regex.js +0 -8
- package/node_modules/uuid/dist/rng-browser.js +0 -25
- package/node_modules/uuid/dist/rng.js +0 -24
- package/node_modules/uuid/dist/sha1-browser.js +0 -104
- package/node_modules/uuid/dist/sha1.js +0 -23
- package/node_modules/uuid/dist/stringify.js +0 -44
- package/node_modules/uuid/dist/uuid-bin.js +0 -85
- package/node_modules/uuid/dist/v1.js +0 -107
- package/node_modules/uuid/dist/v3.js +0 -16
- package/node_modules/uuid/dist/v35.js +0 -80
- package/node_modules/uuid/dist/v4.js +0 -43
- package/node_modules/uuid/dist/v5.js +0 -16
- package/node_modules/uuid/dist/validate.js +0 -17
- package/node_modules/uuid/dist/version.js +0 -21
- package/node_modules/uuid/package.json +0 -135
- package/node_modules/uuid/wrapper.mjs +0 -10
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const EXAMPLE_REQUEST: {
|
|
2
|
+
SolutionRootPath: string;
|
|
3
|
+
TargetFramework: string;
|
|
4
|
+
ProgramLanguage: string;
|
|
5
|
+
SelectedProjectPath: string;
|
|
6
|
+
SourceCodeFilePaths: string[];
|
|
7
|
+
ProjectMetadata: {
|
|
8
|
+
Name: string;
|
|
9
|
+
ProjectPath: string;
|
|
10
|
+
ProjectLanguage: string;
|
|
11
|
+
ProjectType: string;
|
|
12
|
+
ExternalReferences: {
|
|
13
|
+
ProjectPath: string;
|
|
14
|
+
RelativePath: string;
|
|
15
|
+
AssemblyFullPath: string;
|
|
16
|
+
TargetFrameworkId: string;
|
|
17
|
+
IncludedInArtifact: boolean;
|
|
18
|
+
}[];
|
|
19
|
+
}[];
|
|
20
|
+
command: string;
|
|
21
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EXAMPLE_REQUEST = void 0;
|
|
4
|
+
exports.EXAMPLE_REQUEST = {
|
|
5
|
+
SolutionRootPath: 'D:\\TestProjects-master\\TestProjects-master\\netcoreapp3.1\\CoreMVC',
|
|
6
|
+
TargetFramework: 'net8.0',
|
|
7
|
+
ProgramLanguage: 'csharp',
|
|
8
|
+
SelectedProjectPath: 'D:\\TestProjects-master\\TestProjects-master\\netcoreapp3.1\\CoreMVC\\CoreMVC\\CoreMVC.csproj',
|
|
9
|
+
SourceCodeFilePaths: [
|
|
10
|
+
'D:\\TestProjects-master\\TestProjects-master\\netcoreapp3.1\\CoreMVC\\CoreMVC\\appsettings.Development.json',
|
|
11
|
+
'D:\\TestProjects-master\\TestProjects-master\\netcoreapp3.1\\CoreMVC\\CoreMVC\\appsettings.json',
|
|
12
|
+
'D:\\TestProjects-master\\TestProjects-master\\netcoreapp3.1\\CoreMVC\\CoreMVC\\CoreMVC.csproj',
|
|
13
|
+
'D:\\TestProjects-master\\TestProjects-master\\netcoreapp3.1\\CoreMVC\\CoreMVC\\Program.cs',
|
|
14
|
+
'D:\\TestProjects-master\\TestProjects-master\\netcoreapp3.1\\CoreMVC\\CoreMVC\\Startup.cs',
|
|
15
|
+
'D:\\TestProjects-master\\TestProjects-master\\netcoreapp3.1\\CoreMVC\\CoreMVC.sln',
|
|
16
|
+
'D:\\TestProjects-master\\TestProjects-master\\netcoreapp3.1\\CoreMVC\\PortSolutionResult.json',
|
|
17
|
+
'D:\\TestProjects-master\\TestProjects-master\\netcoreapp3.1\\CoreMVC\\PortSolutionResult.txt',
|
|
18
|
+
],
|
|
19
|
+
ProjectMetadata: [
|
|
20
|
+
{
|
|
21
|
+
Name: 'CoreMVC',
|
|
22
|
+
ProjectPath: 'D:\\TestProjects-master\\TestProjects-master\\netcoreapp3.1\\CoreMVC\\CoreMVC\\CoreMVC.csproj',
|
|
23
|
+
ProjectLanguage: 'csharp',
|
|
24
|
+
ProjectType: '',
|
|
25
|
+
ExternalReferences: [
|
|
26
|
+
{
|
|
27
|
+
ProjectPath: 'D:\\TestProjects-master\\TestProjects-master\\netcoreapp3.1\\CoreMVC\\CoreMVC\\CoreMVC.csproj',
|
|
28
|
+
RelativePath: 'references\\packages\\microsoft.aspnetcore.app.ref\\3.1.10\\ref\\netcoreapp3.1\\Microsoft.Extensions.Http.dll',
|
|
29
|
+
AssemblyFullPath: 'C:\\.nuget\\packages\\microsoft.aspnetcore.app.ref\\3.1.10\\ref\\netcoreapp3.1\\Microsoft.Extensions.Http.dll',
|
|
30
|
+
TargetFrameworkId: '',
|
|
31
|
+
IncludedInArtifact: true,
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
Name: 'test',
|
|
37
|
+
ProjectPath: 'D:\\TestProjects-master\\TestProjects-master\\netcoreapp3.1\\CoreMVC\\test\\test.csproj',
|
|
38
|
+
ProjectLanguage: 'C#',
|
|
39
|
+
ProjectType: '',
|
|
40
|
+
ExternalReferences: [
|
|
41
|
+
{
|
|
42
|
+
ProjectPath: 'D:\\TestProjects-master\\TestProjects-master\\net40\\mvc\\MvcMusicStore\\MvcMusicStore.csproj',
|
|
43
|
+
RelativePath: 'references\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.0\\System.Drawing.dll',
|
|
44
|
+
AssemblyFullPath: 'C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.0\\System.Drawing.dll',
|
|
45
|
+
TargetFrameworkId: 'netframework4.0',
|
|
46
|
+
IncludedInArtifact: false,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
ProjectPath: 'D:\\TestProjects-master\\TestProjects-master\\net40\\mvc\\MvcMusicStore\\MvcMusicStore.csproj',
|
|
50
|
+
RelativePath: 'references\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.0\\System.Web.dll',
|
|
51
|
+
AssemblyFullPath: 'C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.0\\System.Web.dll',
|
|
52
|
+
TargetFrameworkId: 'netframework4.0',
|
|
53
|
+
IncludedInArtifact: false,
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
command: 'aws/qNetTransform/startTransform',
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=mockData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mockData.js","sourceRoot":"","sources":["../../../../src/language-server/netTransform/tests/mockData.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG;IAC3B,gBAAgB,EAAE,sEAAsE;IACxF,eAAe,EAAE,QAAQ;IACzB,eAAe,EAAE,QAAQ;IACzB,mBAAmB,EACf,+FAA+F;IACnG,mBAAmB,EAAE;QACjB,6GAA6G;QAC7G,iGAAiG;QACjG,+FAA+F;QAC/F,2FAA2F;QAC3F,2FAA2F;QAC3F,mFAAmF;QACnF,+FAA+F;QAC/F,8FAA8F;KACjG;IACD,eAAe,EAAE;QACb;YACI,IAAI,EAAE,SAAS;YACf,WAAW,EACP,+FAA+F;YACnG,eAAe,EAAE,QAAQ;YACzB,WAAW,EAAE,EAAE;YACf,kBAAkB,EAAE;gBAChB;oBACI,WAAW,EACP,+FAA+F;oBACnG,YAAY,EACR,+GAA+G;oBACnH,gBAAgB,EACZ,+GAA+G;oBACnH,iBAAiB,EAAE,EAAE;oBACrB,kBAAkB,EAAE,IAAI;iBAC3B;aACJ;SACJ;QACD;YACI,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,yFAAyF;YACtG,eAAe,EAAE,IAAI;YACrB,WAAW,EAAE,EAAE;YACf,kBAAkB,EAAE;gBAChB;oBACI,WAAW,EACP,+FAA+F;oBACnG,YAAY,EACR,iGAAiG;oBACrG,gBAAgB,EACZ,8GAA8G;oBAClH,iBAAiB,EAAE,iBAAiB;oBACpC,kBAAkB,EAAE,KAAK;iBAC5B;gBACD;oBACI,WAAW,EACP,+FAA+F;oBACnG,YAAY,EACR,6FAA6F;oBACjG,gBAAgB,EACZ,0GAA0G;oBAC9G,iBAAiB,EAAE,iBAAiB;oBACpC,kBAAkB,EAAE,KAAK;iBAC5B;aACJ;SACJ;KACJ;IACD,OAAO,EAAE,kCAAkC;CAC9C,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const codewhisperer_streaming_1 = require("@amzn/codewhisperer-streaming");
|
|
4
|
+
const assert = require("assert");
|
|
5
|
+
const aws_sdk_1 = require("aws-sdk");
|
|
6
|
+
const chai_1 = require("chai");
|
|
7
|
+
const fs = require("fs");
|
|
8
|
+
const got_1 = require("got");
|
|
9
|
+
const ts_sinon_1 = require("ts-sinon");
|
|
10
|
+
const codewhispererStreamingClient_1 = require("../../../client/streamingClient/codewhispererStreamingClient");
|
|
11
|
+
const models_1 = require("../models");
|
|
12
|
+
const transformHandler_1 = require("../transformHandler");
|
|
13
|
+
const sinon = require("sinon");
|
|
14
|
+
const mocked$Response = {
|
|
15
|
+
$response: {
|
|
16
|
+
hasNextPage: ts_sinon_1.default.mock(),
|
|
17
|
+
nextPage: ts_sinon_1.default.mock(),
|
|
18
|
+
data: undefined,
|
|
19
|
+
error: undefined,
|
|
20
|
+
requestId: '',
|
|
21
|
+
redirectCount: 0,
|
|
22
|
+
retryCount: 0,
|
|
23
|
+
httpResponse: new aws_sdk_1.HttpResponse(),
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
const testUploadId = 'test-upoload-id';
|
|
27
|
+
const testTransformId = 'test-transform-id';
|
|
28
|
+
const payloadFileName = 'C:\\test.zip';
|
|
29
|
+
describe('Test Transform handler ', () => {
|
|
30
|
+
let client;
|
|
31
|
+
let workspace;
|
|
32
|
+
let transformHandler;
|
|
33
|
+
const mockedLogging = (0, ts_sinon_1.stubInterface)();
|
|
34
|
+
beforeEach(async () => {
|
|
35
|
+
// Set up the server with a mock service
|
|
36
|
+
client = (0, ts_sinon_1.stubInterface)();
|
|
37
|
+
workspace = (0, ts_sinon_1.stubInterface)();
|
|
38
|
+
transformHandler = new transformHandler_1.TransformHandler(client, workspace, mockedLogging);
|
|
39
|
+
});
|
|
40
|
+
describe('test upload artifact', () => {
|
|
41
|
+
it('call upload method correctly', async () => {
|
|
42
|
+
const putStub = sinon.stub(got_1.default, 'put').resolves({ statusCode: 'Success' });
|
|
43
|
+
const readFileSyncStub = sinon.stub(fs, 'readFileSync').returns('text file content');
|
|
44
|
+
await transformHandler.uploadArtifactToS3Async(payloadFileName, {
|
|
45
|
+
uploadId: testUploadId,
|
|
46
|
+
uploadUrl: 'dummy-upload-url',
|
|
47
|
+
kmsKeyArn: 'ResourceArn',
|
|
48
|
+
...mocked$Response,
|
|
49
|
+
}, 'dummy-256');
|
|
50
|
+
ts_sinon_1.default.assert.callCount(putStub, 1);
|
|
51
|
+
ts_sinon_1.default.assert.callCount(readFileSyncStub, 1);
|
|
52
|
+
putStub.restore();
|
|
53
|
+
readFileSyncStub.restore();
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
describe('Test transform create presign url and upload', () => {
|
|
57
|
+
beforeEach(async () => {
|
|
58
|
+
// mock default return value for createUploadUrl
|
|
59
|
+
client.codeModernizerCreateUploadUrl.resolves({
|
|
60
|
+
uploadId: testUploadId,
|
|
61
|
+
uploadUrl: 'dummy-upload-url',
|
|
62
|
+
kmsKeyArn: 'ResourceArn',
|
|
63
|
+
...mocked$Response,
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
it('returns upload id correctly', async () => {
|
|
67
|
+
const readFileSyncStub = sinon.stub(fs, 'readFileSync').returns('text file content');
|
|
68
|
+
const uploadStub = sinon.stub(transformHandler, 'uploadArtifactToS3Async');
|
|
69
|
+
const res = await transformHandler.uploadPayloadAsync(payloadFileName);
|
|
70
|
+
ts_sinon_1.default.assert.callCount(readFileSyncStub, 1);
|
|
71
|
+
ts_sinon_1.default.assert.callCount(uploadStub, 1);
|
|
72
|
+
assert.equal(res, testUploadId);
|
|
73
|
+
uploadStub.restore();
|
|
74
|
+
readFileSyncStub.restore();
|
|
75
|
+
});
|
|
76
|
+
it('should throw error if uploadArtifactToS3Async fails', async () => {
|
|
77
|
+
const mockError = new Error('Error in uploadArtifactToS3 call');
|
|
78
|
+
const readFileSyncStub = sinon.stub(fs, 'readFileSync').returns('text file content');
|
|
79
|
+
sinon.stub(transformHandler, 'uploadArtifactToS3Async').rejects(mockError);
|
|
80
|
+
// Call the method to be tested
|
|
81
|
+
try {
|
|
82
|
+
await transformHandler.uploadPayloadAsync(payloadFileName);
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
// Assertions
|
|
86
|
+
(0, chai_1.expect)(error.message).to.equal(mockError.message);
|
|
87
|
+
sinon.assert.calledOnce(readFileSyncStub);
|
|
88
|
+
readFileSyncStub.restore();
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
/*
|
|
92
|
+
it('should upload payload and return uploadId', async () => {
|
|
93
|
+
workspace.fs.getTempDirPath = simon.stub().returns('C:\\tmp')
|
|
94
|
+
const zipStub = sinon.stub(transformHandler, 'zipCodeAsync').returns(Promise.resolve(payloadFileName))
|
|
95
|
+
const uploadStub = sinon.stub(transformHandler, 'uploadPayloadAsync').returns(Promise.resolve(testUploadId))
|
|
96
|
+
const result = await transformHandler.preTransformationUploadCode(payloadFileName)
|
|
97
|
+
expect(result).to.equal(testUploadId)
|
|
98
|
+
sinon.assert.calledOnce(zipStub)
|
|
99
|
+
sinon.assert.calledOnce(uploadStub)
|
|
100
|
+
zipStub.restore()
|
|
101
|
+
uploadStub.restore()
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
it('should throw error if upload fails', async () => {
|
|
105
|
+
// Mocking necessary dependencies and methods
|
|
106
|
+
const mockError = new Error('Upload failed')
|
|
107
|
+
const requestString = JSON.stringify(EXAMPLE_REQUEST)
|
|
108
|
+
const request = JSON.parse(requestString) as StartTransformRequest
|
|
109
|
+
workspace.fs.getTempDirPath = simon.stub().returns('C:\\tmp')
|
|
110
|
+
const zipStub = sinon.stub(transformHandler, 'zipCodeAsync').returns(Promise.resolve(payloadFileName))
|
|
111
|
+
sinon.stub(transformHandler, 'uploadPayloadAsync').rejects(mockError)
|
|
112
|
+
try {
|
|
113
|
+
await transformHandler.preTransformationUploadCode(request)
|
|
114
|
+
} catch (error) {
|
|
115
|
+
sinon.assert.calledOnce(zipStub)
|
|
116
|
+
expect((error as Error).message).to.equal(mockError.message)
|
|
117
|
+
zipStub.restore()
|
|
118
|
+
}
|
|
119
|
+
})
|
|
120
|
+
*/
|
|
121
|
+
});
|
|
122
|
+
describe('Test cancel transform job', () => {
|
|
123
|
+
beforeEach(async () => {
|
|
124
|
+
// mock default return value for cancelTransform
|
|
125
|
+
client.codeModernizerStopCodeTransformation.returns(Promise.resolve({
|
|
126
|
+
transformationStatus: 'STOPPED',
|
|
127
|
+
...mocked$Response,
|
|
128
|
+
}));
|
|
129
|
+
});
|
|
130
|
+
it('should cancel transform', async () => {
|
|
131
|
+
const requestString = JSON.stringify({ TransformationJobId: testTransformId });
|
|
132
|
+
const request = JSON.parse(requestString);
|
|
133
|
+
const res = await transformHandler.cancelTransformation(request);
|
|
134
|
+
(0, chai_1.expect)(res.TransformationJobStatus).to.equal(models_1.CancellationJobStatus.SUCCESSFULLY_CANCELLED);
|
|
135
|
+
});
|
|
136
|
+
it('should throw error if cancellation fails', async () => {
|
|
137
|
+
client.codeModernizerStopCodeTransformation.returns(Promise.resolve({
|
|
138
|
+
transformationStatus: 'COMPLETED',
|
|
139
|
+
...mocked$Response,
|
|
140
|
+
}));
|
|
141
|
+
const requestString = JSON.stringify({ TransformationJobId: testTransformId });
|
|
142
|
+
const request = JSON.parse(requestString);
|
|
143
|
+
const res = await transformHandler.cancelTransformation(request);
|
|
144
|
+
(0, chai_1.expect)(res.TransformationJobStatus).to.equal(models_1.CancellationJobStatus.FAILED_TO_CANCEL);
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
const mockedCredentialsProvider = {
|
|
148
|
+
getCredentials: sinon.stub().returns({ token: 'mockedToken' }),
|
|
149
|
+
};
|
|
150
|
+
describe('StreamingClient', () => {
|
|
151
|
+
it('should create a new streaming client', async () => {
|
|
152
|
+
const streamingClient = new codewhispererStreamingClient_1.StreamingClient();
|
|
153
|
+
const client = await streamingClient.getStreamingClient(mockedCredentialsProvider);
|
|
154
|
+
(0, chai_1.expect)(client).to.be.instanceOf(codewhisperer_streaming_1.CodeWhispererStreaming);
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
describe('createStreamingClient', () => {
|
|
158
|
+
it('should create a new streaming client with correct configurations', async () => {
|
|
159
|
+
const client = await (0, codewhispererStreamingClient_1.createStreamingClient)(mockedCredentialsProvider);
|
|
160
|
+
(0, chai_1.expect)(client).to.be.instanceOf(codewhisperer_streaming_1.CodeWhispererStreaming);
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
describe('Test get transformJob', () => {
|
|
164
|
+
beforeEach(async () => {
|
|
165
|
+
// mock default return value for Transformation Job
|
|
166
|
+
client.codeModernizerGetCodeTransformation.returns(Promise.resolve({
|
|
167
|
+
transformationJob: {
|
|
168
|
+
jobId: testTransformId,
|
|
169
|
+
status: 'COMPLETED',
|
|
170
|
+
...mocked$Response,
|
|
171
|
+
},
|
|
172
|
+
...mocked$Response,
|
|
173
|
+
}));
|
|
174
|
+
});
|
|
175
|
+
it('should get transform', async () => {
|
|
176
|
+
const requestString = JSON.stringify({ TransformationJobId: testTransformId });
|
|
177
|
+
const request = JSON.parse(requestString);
|
|
178
|
+
const res = await transformHandler.getTransformation(request);
|
|
179
|
+
(0, chai_1.expect)(res.TransformationJob.status).to.equal('COMPLETED');
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
describe('Test get transformJob for failed case', () => {
|
|
183
|
+
beforeEach(async () => {
|
|
184
|
+
// mock default return value for Transformation Job
|
|
185
|
+
client.codeModernizerGetCodeTransformation.returns(Promise.resolve({
|
|
186
|
+
transformationJob: {
|
|
187
|
+
jobId: testTransformId,
|
|
188
|
+
status: 'FAILED',
|
|
189
|
+
...mocked$Response,
|
|
190
|
+
},
|
|
191
|
+
...mocked$Response,
|
|
192
|
+
}));
|
|
193
|
+
});
|
|
194
|
+
it('should get transform for failed case', async () => {
|
|
195
|
+
const requestString = JSON.stringify({ TransformationJobId: testTransformId });
|
|
196
|
+
const request = JSON.parse(requestString);
|
|
197
|
+
const res = await transformHandler.getTransformation(request);
|
|
198
|
+
(0, chai_1.expect)(res.TransformationJob.status).to.equal('FAILED');
|
|
199
|
+
});
|
|
200
|
+
});
|
|
201
|
+
describe('Test get transform plan', () => {
|
|
202
|
+
beforeEach(async () => {
|
|
203
|
+
// mock default return value for Transformation plan
|
|
204
|
+
const mockPlanString = JSON.stringify({
|
|
205
|
+
transformationPlan: {
|
|
206
|
+
transformationSteps: [
|
|
207
|
+
{
|
|
208
|
+
id: '1',
|
|
209
|
+
name: 'PlanStepName 1',
|
|
210
|
+
description: 'PlanStepDescription 1',
|
|
211
|
+
status: 'COMPLETED',
|
|
212
|
+
progressUpdates: [
|
|
213
|
+
{
|
|
214
|
+
name: 'ProgressUpdateName 1 for PlanStep 1',
|
|
215
|
+
status: 'COMPLETED',
|
|
216
|
+
description: 'ProgressUpdateDescription 1 for PlanStep 1',
|
|
217
|
+
startTime: '2024-03-11T23:27:33.935Z',
|
|
218
|
+
endTime: '2024-03-11T23:27:34.038Z',
|
|
219
|
+
},
|
|
220
|
+
],
|
|
221
|
+
startTime: '2024-03-12T18:49:41.431Z',
|
|
222
|
+
endTime: '2024-03-12T18:49:42.431Z',
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
},
|
|
226
|
+
});
|
|
227
|
+
const response = JSON.parse(mockPlanString);
|
|
228
|
+
client.codeModernizerGetCodeTransformationPlan.returns(Promise.resolve(response));
|
|
229
|
+
});
|
|
230
|
+
it('should get transform plan', async () => {
|
|
231
|
+
const requestString = JSON.stringify({ TransformationJobId: testTransformId });
|
|
232
|
+
const request = JSON.parse(requestString);
|
|
233
|
+
const res = await transformHandler.getTransformationPlan(request);
|
|
234
|
+
(0, chai_1.expect)(res.TransformationPlan.transformationSteps[0].status).to.equal('COMPLETED');
|
|
235
|
+
(0, chai_1.expect)(res.TransformationPlan.transformationSteps[0].name).to.equal('PlanStepName 1');
|
|
236
|
+
if (res.TransformationPlan.transformationSteps[0].progressUpdates) {
|
|
237
|
+
(0, chai_1.expect)(res.TransformationPlan.transformationSteps[0].progressUpdates[0].name).to.equal('ProgressUpdateName 1 for PlanStep 1');
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
});
|
|
241
|
+
});
|
|
242
|
+
//# sourceMappingURL=transformHandler.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transformHandler.test.js","sourceRoot":"","sources":["../../../../src/language-server/netTransform/tests/transformHandler.test.ts"],"names":[],"mappings":";;AAAA,2EAAsE;AAEtE,iCAAgC;AAChC,qCAAsC;AACtC,+BAA6B;AAC7B,yBAAwB;AACxB,6BAAqB;AACrB,uCAA2E;AAC3E,+GAAqH;AAErH,sCAMkB;AAClB,0DAAsD;AAEtD,+BAA+B;AAC/B,MAAM,eAAe,GAAG;IACpB,SAAS,EAAE;QACP,WAAW,EAAE,kBAAK,CAAC,IAAI,EAAE;QACzB,QAAQ,EAAE,kBAAK,CAAC,IAAI,EAAE;QACtB,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,SAAS,EAAE,EAAE;QACb,aAAa,EAAE,CAAC;QAChB,UAAU,EAAE,CAAC;QACb,YAAY,EAAE,IAAI,sBAAY,EAAE;KACnC;CACJ,CAAA;AACD,MAAM,YAAY,GAAG,iBAAiB,CAAA;AACtC,MAA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E,CAAC,2BAA2B,EAAE,KAAK,IAAI,EAAE;YACvC,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,EAAE,mBAAmB,EAAE,eAAe,EAAE,CAAC,CAAA;YAC9E,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAA4B,CAAA;YACpE,MAAM,GAAG,GAAG,MAAM,gBAAgB,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAA;YAEjE,IAAA,aAAM,EAAC,GAAG,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAA;YAClF,IAAA,aAAM,EAAC,GAAG,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAA;YACrF,IAAI,GAAG,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,eAAe,EAAE;gBAC/D,IAAA,aAAM,EAAC,GAAG,CAAC,kBAAkB,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,KAAK,CAClF,qCAAqC,CACxC,CAAA;aACJ;QACL,CAAC,CAAC,CAAA;IACN,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const chai_1 = require("chai");
|
|
4
|
+
const validation_1 = require("../validation");
|
|
5
|
+
const sampleStartTransformRequest = {
|
|
6
|
+
SolutionRootPath: '',
|
|
7
|
+
SelectedProjectPath: 'test.csproj',
|
|
8
|
+
ProgramLanguage: '',
|
|
9
|
+
TargetFramework: '',
|
|
10
|
+
SolutionConfigPaths: [],
|
|
11
|
+
ProjectMetadata: [],
|
|
12
|
+
command: '',
|
|
13
|
+
};
|
|
14
|
+
describe('Test validation functionality', () => {
|
|
15
|
+
it('should return true when selectedProjectPath is a valid csproj', () => {
|
|
16
|
+
let mockStartTransformationRequest = sampleStartTransformRequest;
|
|
17
|
+
mockStartTransformationRequest.SelectedProjectPath = 'test.csproj';
|
|
18
|
+
(0, chai_1.expect)((0, validation_1.isProject)(mockStartTransformationRequest)).to.equal(true);
|
|
19
|
+
});
|
|
20
|
+
it('should return false when selectedProjectPath is not a valid csproj', () => {
|
|
21
|
+
let mockStartTransformationRequest = sampleStartTransformRequest;
|
|
22
|
+
mockStartTransformationRequest.SelectedProjectPath = 'test.sln';
|
|
23
|
+
(0, chai_1.expect)((0, validation_1.isProject)(mockStartTransformationRequest)).to.equal(false);
|
|
24
|
+
});
|
|
25
|
+
it('should return true when selectedProjectPath is a valid sln', () => {
|
|
26
|
+
let mockStartTransformationRequest = sampleStartTransformRequest;
|
|
27
|
+
mockStartTransformationRequest.SelectedProjectPath = 'test.sln';
|
|
28
|
+
(0, chai_1.expect)((0, validation_1.isSolution)(mockStartTransformationRequest)).to.equal(true);
|
|
29
|
+
});
|
|
30
|
+
it('should return false when selectedProjectPath is not a valid sln', () => {
|
|
31
|
+
let mockStartTransformationRequest = sampleStartTransformRequest;
|
|
32
|
+
mockStartTransformationRequest.SelectedProjectPath = 'test.csproj';
|
|
33
|
+
(0, chai_1.expect)((0, validation_1.isSolution)(mockStartTransformationRequest)).to.equal(false);
|
|
34
|
+
});
|
|
35
|
+
it('should return true when project is a supported type', () => {
|
|
36
|
+
let mockStartTransformationRequest = sampleStartTransformRequest;
|
|
37
|
+
const mockProjectMeta = {
|
|
38
|
+
Name: '',
|
|
39
|
+
ProjectTargetFramework: '',
|
|
40
|
+
ProjectPath: 'test.csproj',
|
|
41
|
+
SourceCodeFilePaths: [],
|
|
42
|
+
ProjectLanguage: '',
|
|
43
|
+
ProjectType: 'AspNetCoreMvc',
|
|
44
|
+
ExternalReferences: [],
|
|
45
|
+
};
|
|
46
|
+
mockStartTransformationRequest.ProjectMetadata.push(mockProjectMeta);
|
|
47
|
+
(0, chai_1.expect)((0, validation_1.validateProject)(mockStartTransformationRequest)).to.equal(true);
|
|
48
|
+
});
|
|
49
|
+
it('should return false when project is not a supported type', () => {
|
|
50
|
+
let mockStartTransformationRequest = sampleStartTransformRequest;
|
|
51
|
+
const mockProjectMeta = {
|
|
52
|
+
Name: '',
|
|
53
|
+
ProjectTargetFramework: '',
|
|
54
|
+
ProjectPath: 'test.csproj',
|
|
55
|
+
SourceCodeFilePaths: [],
|
|
56
|
+
ProjectLanguage: '',
|
|
57
|
+
ProjectType: 'not supported',
|
|
58
|
+
ExternalReferences: [],
|
|
59
|
+
};
|
|
60
|
+
mockStartTransformationRequest.ProjectMetadata = [];
|
|
61
|
+
mockStartTransformationRequest.ProjectMetadata.push(mockProjectMeta);
|
|
62
|
+
(0, chai_1.expect)((0, validation_1.validateProject)(mockStartTransformationRequest)).to.equal(false);
|
|
63
|
+
});
|
|
64
|
+
it('should return false when there is no project path that is the same as the selected project path', () => {
|
|
65
|
+
let mockStartTransformationRequest = sampleStartTransformRequest;
|
|
66
|
+
const mockProjectMeta = {
|
|
67
|
+
Name: '',
|
|
68
|
+
ProjectTargetFramework: '',
|
|
69
|
+
ProjectPath: 'different.csproj',
|
|
70
|
+
SourceCodeFilePaths: [],
|
|
71
|
+
ProjectLanguage: '',
|
|
72
|
+
ProjectType: 'AspNetCoreMvc',
|
|
73
|
+
ExternalReferences: [],
|
|
74
|
+
};
|
|
75
|
+
mockStartTransformationRequest.ProjectMetadata = [];
|
|
76
|
+
mockStartTransformationRequest.ProjectMetadata.push(mockProjectMeta);
|
|
77
|
+
(0, chai_1.expect)((0, validation_1.validateProject)(mockStartTransformationRequest)).to.equal(false);
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
//# sourceMappingURL=validation.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.test.js","sourceRoot":"","sources":["../../../../src/language-server/netTransform/tests/validation.test.ts"],"names":[],"mappings":";;AAAA,+BAA6B;AAE7B,8CAAsE;AAItE,MAAM,2BAA2B,GAA0B;IACvD,gBAAgB,EAAE,EAAE;IACpB,mBAAmB,EAAE,aAAa;IAClC,eAAe,EAAE,EAAE;IACnB,eAAe,EAAE,EAAE;IACnB,mBAAmB,EAAE,EAAE;IACvB,eAAe,EAAE,EAAE;IACnB,OAAO,EAAE,EAAE;CACd,CAAA;AAED,QAAQ,CAAC,+BAA+B,EAAE,GAAG,EAAE;IAC3C,EAAE,CAAC,+DAA+D,EAAE,GAAG,EAAE;QACrE,IAAI,8BAA8B,GAA0B,2BAA2B,CAAA;QACvF,8BAA8B,CAAC,mBAAmB,GAAG,aAAa,CAAA;QAClE,IAAA,aAAM,EAAC,IAAA,sBAAS,EAAC,8BAA8B,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACpE,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,oEAAoE,EAAE,GAAG,EAAE;QAC1E,IAAI,8BAA8B,GAA0B,2BAA2B,CAAA;QACvF,8BAA8B,CAAC,mBAAmB,GAAG,UAAU,CAAA;QAC/D,IAAA,aAAM,EAAC,IAAA,sBAAS,EAAC,8BAA8B,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IACrE,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,4DAA4D,EAAE,GAAG,EAAE;QAClE,IAAI,8BAA8B,GAA0B,2BAA2B,CAAA;QACvF,8BAA8B,CAAC,mBAAmB,GAAG,UAAU,CAAA;QAC/D,IAAA,aAAM,EAAC,IAAA,uBAAU,EAAC,8BAA8B,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACrE,CAAC,CAAC,CAAA;IAEF,EAAE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CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAC3E,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,iGAAiG,EAAE,GAAG,EAAE;QACvG,IAAI,8BAA8B,GAA0B,2BAA2B,CAAA;QACvF,MAAM,eAAe,GAAG;YACpB,IAAI,EAAE,EAAE;YACR,sBAAsB,EAAE,EAAE;YAC1B,WAAW,EAAE,kBAAkB;YAC/B,mBAAmB,EAAE,EAAE;YACvB,eAAe,EAAE,EAAE;YACnB,WAAW,EAAE,eAAe;YAC5B,kBAAkB,EAAE,EAAE;SACzB,CAAA;QACD,8BAA8B,CAAC,eAAe,GAAG,EAAE,CAAA;QACnD,8BAA8B,CAAC,eAAe,CAAC,IAAI,CAAC,eAAe,CAAC,CAAA;QAEpE,IAAA,aAAM,EAAC,IAAA,4BAAe,EAAC,8BAA8B,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;IAC3E,CAAC,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CodeWhispererStreaming } from '@amzn/codewhisperer-streaming';
|
|
2
|
+
import { Logging, Workspace } from '@aws/language-server-runtimes/server-interface';
|
|
3
|
+
import { CreateUploadUrlResponse } from '../../client/token/codewhispererbearertokenclient';
|
|
4
|
+
import { CodeWhispererServiceToken } from '../codeWhispererService';
|
|
5
|
+
import { ArtifactManager } from './artifactManager';
|
|
6
|
+
import { CancelTransformRequest, CancelTransformResponse, DownloadArtifactsResponse, GetTransformPlanRequest, GetTransformPlanResponse, GetTransformRequest, GetTransformResponse, StartTransformRequest, StartTransformResponse } from './models';
|
|
7
|
+
export declare class TransformHandler {
|
|
8
|
+
private client;
|
|
9
|
+
private workspace;
|
|
10
|
+
private logging;
|
|
11
|
+
constructor(client: CodeWhispererServiceToken, workspace: Workspace, logging: Logging);
|
|
12
|
+
startTransformation(userInputrequest: StartTransformRequest): Promise<StartTransformResponse>;
|
|
13
|
+
preTransformationUploadCode(payloadFilePath: string): Promise<string>;
|
|
14
|
+
uploadPayloadAsync(payloadFileName: string): Promise<string>;
|
|
15
|
+
zipCodeAsync(request: StartTransformRequest, artifactManager: ArtifactManager): Promise<string>;
|
|
16
|
+
uploadArtifactToS3Async(fileName: string, resp: CreateUploadUrlResponse, sha256: string): Promise<void>;
|
|
17
|
+
getHeadersObj(sha256: string, kmsKeyArn: string | undefined): {};
|
|
18
|
+
getTransformation(request: GetTransformRequest): Promise<GetTransformResponse>;
|
|
19
|
+
getTransformationPlan(request: GetTransformPlanRequest): Promise<GetTransformPlanResponse>;
|
|
20
|
+
cancelTransformation(request: CancelTransformRequest): Promise<CancelTransformResponse>;
|
|
21
|
+
sleep(duration?: number): Promise<void>;
|
|
22
|
+
pollTransformation(request: GetTransformRequest, validExitStatus: string[], failureStates: string[]): Promise<GetTransformResponse>;
|
|
23
|
+
downloadExportResultArchive(cwStreamingClient: CodeWhispererStreaming, exportId: string, saveToDir: string): Promise<DownloadArtifactsResponse>;
|
|
24
|
+
archivePathGenerator(exportId: string, buffer: Uint8Array[], saveToDir: string): Promise<string>;
|
|
25
|
+
directoryExists(directoryPath: any): Promise<void>;
|
|
26
|
+
getWorkspacePath(solutionRootPath: string): string;
|
|
27
|
+
}
|