* wip

* make perform-load work when no inputs

* adding more info to header printout

* filter out stuff not needed here

* update to 2018
This commit is contained in:
Garrett Serack 2018-01-12 16:59:57 -08:00 коммит произвёл Johannes Bader
Родитель 6e00cd5553
Коммит b900c8e6c6
40 изменённых файлов: 14 добавлений и 79 удалений

Просмотреть файл

@ -36,7 +36,11 @@ task 'regenerate', 'regenerate samples', (done) ->
sed "-i", /\sat .*/g, "at ...", file # exception stack traces
sed "-i", /mem:\/\/\/[^: ]*/g, "mem", file # memory URIs (depend on timing)
(cat file).replace(/(at \.\.\.\s*)+/g, "at ...\n").to(file) # minify exception stack traces
(cat file).replace(/.* AutoRest extension '.*\n/g, "").to(file) # remove extension messages
(cat file).replace(/.*AutoRest code generation utility.*\n/g, "").to(file) # remove header message
(cat file).replace(/.*\(C\) \d* Microsoft Corporation.*\n/g, "").to(file) # remove header message
(cat file).replace(/.* AutoRest extension '.*\n/g, "").to(file) # remove extension loading messages
(cat file).replace(/.* Loading AutoRest core.*\n/g, "").to(file) # remove core loading messages
(cat file).replace(/.* -> .*\n/g, "").to(file) # remove bin install messages (npm 5.6.0+)
(cat file).replace(/Recording package path.*\n/g, "").to(file) # dotnet-2.0.0 installation message
(sort file).to(file) if file.endsWith("stdout.txt") || file.endsWith("stderr.txt")

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -248,8 +248,6 @@
--output-folder=<string> target folder for generated artifacts; default: "<base folder>/generated"
--output-folder=<string> target folder for generated artifacts; default: "<base folder>/generated"
--package-name=<string> Distribution package name (i.e. PyPI). Impact base folder and UserAgent
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
C# Generator (activated by --csharp)
C# Generator (activated by --csharp)
C# Generator (activated by --csharp)

Просмотреть файл

@ -26,7 +26,6 @@
"uri": "stdout:///ICowbellOperations.cs",
"uri": "stdout:///Models/Cowbell.cs",
"sources": []
(C) 2017 Microsoft Corporation.
{
{
{
@ -41,5 +40,4 @@
}
}
}
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -34,8 +34,6 @@
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/d374d03801e97737ddb32e01f20513e7b2bbd9c3/arm-storage/2015-06-15/swagger/storage.json:726:8 ($.definitions.StorageAccountRegenerateKeyParameters.properties.keyName)
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/d374d03801e97737ddb32e01f20513e7b2bbd9c3/arm-storage/2015-06-15/swagger/storage.json:74:6 ($.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}"].put)
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/d374d03801e97737ddb32e01f20513e7b2bbd9c3/arm-storage/2015-06-15/swagger/storage.json:800:4 ($.definitions.Resource)
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest
WARNING (DescriptionAndTitleMissing/R4000/SDKViolation): 'keyName' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation.
WARNING (DescriptionAndTitleMissing/R4000/SDKViolation): 'name' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation.

Просмотреть файл

@ -34,8 +34,6 @@
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/d374d03801e97737ddb32e01f20513e7b2bbd9c3/arm-storage/2015-06-15/swagger/storage.json:726:8 ($.definitions.StorageAccountRegenerateKeyParameters.properties.keyName)
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/d374d03801e97737ddb32e01f20513e7b2bbd9c3/arm-storage/2015-06-15/swagger/storage.json:74:6 ($.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}"].put)
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/d374d03801e97737ddb32e01f20513e7b2bbd9c3/arm-storage/2015-06-15/swagger/storage.json:800:4 ($.definitions.Resource)
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest
WARNING (DescriptionAndTitleMissing/R4000/SDKViolation): 'keyName' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation.
WARNING (DescriptionAndTitleMissing/R4000/SDKViolation): 'name' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation.

Просмотреть файл

@ -26,8 +26,6 @@
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/network/resource-manager/Microsoft.Network/stable/2017-03-01/network.json:43:8 ($.definitions.ErrorDetails.properties.code)
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/network/resource-manager/Microsoft.Network/stable/2017-03-01/network.json:46:8 ($.definitions.ErrorDetails.properties.target)
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/network/resource-manager/Microsoft.Network/stable/2017-03-01/network.json:49:8 ($.definitions.ErrorDetails.properties.message)
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest
WARNING (AvoidNestedProperties/R2001/SDKViolation): Consider using x-ms-client-flatten to provide a better end user experience
WARNING (DescriptionAndTitleMissing/R4000/SDKViolation): 'code' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation.

Просмотреть файл

@ -34,8 +34,6 @@
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/d374d03801e97737ddb32e01f20513e7b2bbd9c3/arm-storage/2015-06-15/swagger/storage.json:726:8 ($.definitions.StorageAccountRegenerateKeyParameters.properties.keyName)
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/d374d03801e97737ddb32e01f20513e7b2bbd9c3/arm-storage/2015-06-15/swagger/storage.json:74:6 ($.paths["/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Storage/storageAccounts/{accountName}"].put)
- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/d374d03801e97737ddb32e01f20513e7b2bbd9c3/arm-storage/2015-06-15/swagger/storage.json:800:4 ($.definitions.Resource)
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest
WARNING (DescriptionAndTitleMissing/R4000/SDKViolation): 'keyName' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation.
WARNING (DescriptionAndTitleMissing/R4000/SDKViolation): 'name' model/property lacks 'description' and 'title' property. Consider adding a 'description'/'title' element. Accurate description/title is essential for maintaining reference documentation.

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,8 +1,6 @@
- trans_input?mem:1:0
- trans_input?mem:1:0
- trans_input?mem:1:0
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest
WARNING: Custom test failed
WARNING: Custom test failed

Просмотреть файл

@ -1,5 +1,3 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest
Processing batch task - {"activate-csharp":true,"output-folder":"output1"} .
Processing batch task - {"java":true,"output-folder":"output2"} .

Просмотреть файл

@ -1,5 +1,3 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest
WARNING: Did not generate example 'Create load balancer' of 'loadBalancers/beginCreateOrUpdate'
WARNING: Did not generate example 'Create load balancer' of 'loadBalancers/beginCreateOrUpdate'

Просмотреть файл

@ -1,4 +1,2 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest
Including configuration file '/Samples/1a-code-generation-minimal/readme.md'

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,4 +1,2 @@
(C) 2017 Microsoft Corporation.
[OperationAbortedException] Error occurred. Exiting.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,4 +1,2 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest
Process() Cancelled due to exception : Syntax errors encountered.

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,4 +1,2 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest
Process() Cancelled due to exception : File '/Samples/test/error-behavior/openapi-not-swagger/tiny.json' is not a valid OpenAPI 2.0 definition (expected 'swagger: 2.0')

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,4 +1,2 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest
Process() Cancelled due to exception : Could not resolve reference #/definitions/Cowball

Просмотреть файл

@ -1,4 +1,2 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest
Process() Cancelled due to exception : Syntax errors encountered.

Просмотреть файл

@ -1,4 +1,2 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest
Process() Cancelled due to exception : Plugin imodeler1 reported failure.

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,5 +1,3 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest
Processing batch task - {"output-folder":"Client"} .
Processing batch task - {"output-folder":"ClientFancy","directive":[{"remove-operation":"Cowbell_Add"}],"output-artifact":"swagger-document.yaml"} .

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -1,3 +1 @@
(C) 2017 Microsoft Corporation.
AutoRest code generation utility [version: 2.0.0]
https://aka.ms/autorest

Просмотреть файл

@ -161,11 +161,12 @@ ${Stringify(config).replace(/^---\n/, "")}
* Current AutoRest
*/
type CommandLineArgs = { configFileOrFolder?: string, switches: any[] };
type CommandLineArgs = { configFileOrFolder?: string, switches: any[], rawSwitches: any };
function parseArgs(autorestArgs: string[]): CommandLineArgs {
const result: CommandLineArgs = {
switches: []
switches: [],
rawSwitches: {}
};
for (const arg of autorestArgs) {
@ -194,6 +195,7 @@ function parseArgs(autorestArgs: string[]): CommandLineArgs {
// quote numbers with decimal point, we don't have any use for non-integer numbers (while on the other hand version strings may look like decimal numbers)
rawValue = !isNaN(parseFloat(rawValue)) && rawValue.includes('.') ? `'${rawValue}'` : rawValue;
const value = Parse(rawValue);
result.rawSwitches[key] = value;
result.switches.push(CreateObject(key.split("."), value));
}
@ -286,6 +288,9 @@ async function currentMain(autorestArgs: string[]): Promise<number> {
// parse the args from the command line
args = parseArgs(autorestArgs);
if ((!args.rawSwitches["message-format"]) || args.rawSwitches["message-format"] === "regular") {
console.log(color(`> Loading AutoRest core '${__dirname}' (${require("../package.json").version})`));
}
// identify where we are starting from.
const currentDirUri = CreateFolderUri(currentDirectory());

Просмотреть файл

@ -87,8 +87,8 @@ args["preview"] = args["preview"] || args["prerelease"];
// Suppress the banner if the message-format is set to something other than regular.
if ((!args["message-format"]) || args["message-format"] === "regular") {
console.log(chalk.green.bold.underline(`AutoRest code generation utility [version: ${chalk.white.bold(pkgVersion)}]`));
console.log(color(`(C) 2017 **Microsoft Corporation.**`));
console.log(chalk.green.bold.underline(`AutoRest code generation utility [version: ${chalk.white.bold(pkgVersion)}; node: ${chalk.white.bold(process.version)}]`));
console.log(color(`(C) 2018 **Microsoft Corporation.**`));
console.log(chalk.blue.bold.underline(`https://aka.ms/autorest`));
}