diff --git a/runtime/ms-rest/.scripts/postinstall.js b/runtime/ms-rest/.scripts/postinstall.js deleted file mode 100644 index 48fe2dc236..0000000000 --- a/runtime/ms-rest/.scripts/postinstall.js +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT License. See License.txt in the project root for license information. - -const resetColor = "\x1b[0m"; -const brightColor = "\x1b[1m"; -const highlightColor = "\x1b[31m"; - -const customPackageMapping = { - "azure-arm-sb": "@azure/arm-servicebus" -}; - -try { - const packageConfig = require("../../../package.json"); - const packageName = packageConfig["name"]; - const typeScriptPackageName = customPackageMapping[packageName] || "@azure/" + packageName.replace("azure-", ""); - const invisibleCharactersLength = resetColor.length + brightColor.length + highlightColor.length; - - const firstLine = `Active development of this SDK has been moved to ${highlightColor}${typeScriptPackageName}${resetColor}${brightColor} package.`; - const secondLine = "This package is in maintenance mode and will be deprecated in July 2018."; - const thirdLine = "Visit https://aka.ms/azure-sdk-for-js-migration for more information."; - - const framePadding = 4; - const adjustedFirstLineLength = firstLine.length - invisibleCharactersLength; - const width = Math.max(adjustedFirstLineLength, secondLine.length, thirdLine.length) + framePadding; - const getPaddingLength = (strLength) => width - strLength - framePadding; - - const firstLinePaddingLength = getPaddingLength(adjustedFirstLineLength); - const secondLinePaddingLength = getPaddingLength(secondLine.length); - const thirdLinePaddingLength = getPaddingLength(thirdLine.length); - const line = "#".repeat(width); - - const formatTextLine = (text, padding) => `#${" ".repeat(Math.floor(padding / 2))} ${text} ${" ".repeat(Math.ceil(padding / 2))}#`; - - console.log(brightColor); - console.log("\n" + line); - console.log(formatTextLine(firstLine, firstLinePaddingLength)); - console.log(formatTextLine(secondLine, secondLinePaddingLength)); - console.log(formatTextLine(thirdLine, thirdLinePaddingLength)); - console.log(line + "\n"); - console.log(resetColor); -} catch (err) { - // ignore -} diff --git a/runtime/ms-rest/package.json b/runtime/ms-rest/package.json index 136f41a033..4d6c1f831b 100644 --- a/runtime/ms-rest/package.json +++ b/runtime/ms-rest/package.json @@ -5,7 +5,7 @@ "email": "azsdkteam@microsoft.com", "url": "https://github.com/Azure/azure-sdk-for-node" }, - "version": "2.4.1", + "version": "2.5.0", "description": "Client Runtime for Node.js client libraries generated using AutoRest", "tags": [ "node", @@ -53,7 +53,6 @@ "scripts": { "test": "npm install && npm run jshint && npm run unit", "unit": "node test/unit.js testlist.txt", - "jshint": "jshint lib --reporter=jslint", - "print-deprecation-message": "node ./.scripts/postinstall.js" + "jshint": "jshint lib --reporter=jslint" } }