This commit is contained in:
Sergey Shandar 2018-05-29 18:14:35 -07:00
Родитель efd237cfe4
Коммит 555f90b9da
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 1C1B75FAA0B9B3C8
18 изменённых файлов: 21 добавлений и 23 удалений

2
cli.ts
Просмотреть файл

@ -2,7 +2,7 @@
import yargs = require('yargs')
import os = require('os')
import log = require('./lib/util/logging')
import { log } from './lib/util/logging'
let defaultLogDir = log.directory
let logFilepath = log.filepath

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

@ -10,7 +10,7 @@ export let validateSpec = validate.validateSpec;
export let validateCompositeSpec = validate.validateCompositeSpec;
export let validateExamples = validate.validateExamples;
export let validateExamplesInCompositeSpec = validate.validateExamplesInCompositeSpec;
export let log = require('./lib/util/logging');
export { log } from './lib/util/logging'
export let executePromisesSequentially = utils.executePromisesSequentially;
export let resolveSpec = validate.resolveSpec;
export let resolveCompositeSpec = validate.resolveCompositeSpec;

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

@ -8,7 +8,7 @@ import linq = require('linq')
import jsonPath = require('jsonpath')
import yaml = require("js-yaml")
import utils = require("../util/utils")
import log = require('../util/logging')
import { log } from '../util/logging'
import SpecValidator = require('../validators/specValidator')
import extensionBase = require('@microsoft.azure/autorest-extension-base')

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

@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
import util = require('util')
import log = require('../util/logging')
import { log } from '../util/logging'
import validate = require('../validate')
export let command = 'extract-xmsexamples <spec-path> <recordings>'

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

@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
import util = require('util')
import log = require('../util/logging')
import { log } from '../util/logging'
import validate = require('../validate')
export let command = 'generate-uml <spec-path>'

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

@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
import util = require('util')
import log = require('../util/logging')
import { log } from '../util/logging'
import validate = require('../validate')
export let command = 'generate-wireformat <spec-path>'

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

@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
import util = require('util')
import log = require('../util/logging')
import { log } from '../util/logging'
import validate = require('../validate')
export let command = 'resolve-spec <spec-path>'

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

@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
import util = require('util')
import log = require('../util/logging')
import { log } from '../util/logging'
import validate = require('../validate')
export let command = 'validate-example <spec-path>'

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

@ -2,7 +2,7 @@
// Licensed under the MIT License. See License.txt in the project root for license information.
import util = require('util')
import log = require('../util/logging')
import { log } from '../util/logging'
import validate = require('../validate')
export let command = 'validate-spec <spec-path>'

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

@ -6,7 +6,7 @@ import JsonRefs = require('json-refs')
import yuml2svg = require('yuml2svg')
import utils = require('./util/utils')
import { Constants } from './util/constants'
import log = require('./util/logging')
import { log } from './util/logging'
let ErrorCodes = Constants.ErrorCodes;

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

@ -45,13 +45,13 @@ let customLogLevels = {
silly: 7
}
type ILogger = winston.LoggerInstance & {
export type ILogger = winston.LoggerInstance & {
consoleLogLevel: any
filepath: any
directory: any
}
let logger = new (winston.Logger)({
export let log : ILogger = new (winston.Logger)({
transports: [
new (winston.transports.Console)({
level: 'warn',
@ -61,9 +61,9 @@ let logger = new (winston.Logger)({
})
],
levels: customLogLevels
})
}) as ILogger
Object.defineProperties(logger, {
Object.defineProperties(log, {
'consoleLogLevel': {
enumerable: true,
get: function () { return this.transports.console.level; },
@ -127,5 +127,3 @@ Object.defineProperties(logger, {
}
}
});
export = (logger as any) as ILogger

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

@ -7,7 +7,7 @@ import util = require('util')
import path = require('path')
import jsonPointer from 'json-pointer'
import YAML = require('js-yaml')
import log = require('./logging')
import { log } from './logging'
import request = require('request')
import lodash from 'lodash'
import http = require('http')

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

@ -6,7 +6,7 @@ import path = require('path')
import msrest = require('ms-rest')
import msrestazure = require('ms-rest-azure')
import { ResourceManagementClient } from 'azure-arm-resource'
import log = require('./util/logging')
import { log } from './util/logging'
import utils = require('./util/utils')
import SpecValidator = require('./validators/specValidator')
import WireFormatGenerator = require('./wireFormatGenerator')

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

@ -10,7 +10,7 @@ import glob = require('glob')
import msRest = require('ms-rest')
import SpecValidator = require('./specValidator')
import { Constants } from '../util/constants'
import log = require('../util/logging')
import { log } from '../util/logging'
import utils = require('../util/utils')
import models = require('../models')
import http = require('http')

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

@ -3,7 +3,7 @@ import path = require('path')
import JsonRefs = require('json-refs')
import utils = require('../util/utils')
import { Constants } from '../util/constants'
import log = require('../util/logging')
import { log } from '../util/logging'
let ErrorCodes = Constants.ErrorCodes

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

@ -12,7 +12,7 @@ let HttpRequest = msRest.WebResource
import SpecResolver = require('./specResolver')
import utils = require('../util/utils')
import { Constants } from '../util/constants'
import log = require('../util/logging')
import { log } from '../util/logging'
import { ResponseWrapper } from '../models/responseWrapper'
import ValidationResponse = require('../util/validationResponse')

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

@ -10,7 +10,7 @@ import msRest = require('ms-rest')
let HttpRequest = msRest.WebResource
import log = require('./util/logging')
import { log } from './util/logging'
import SpecResolver = require('./validators/specResolver')
import { ResponseWrapper } from './models/responseWrapper'
import { MarkdownHttpTemplate } from './templates/markdownHttpTemplate'

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

@ -6,7 +6,7 @@ import fs = require('fs')
import pathlib = require('path')
import recursive = require('recursive-readdir')
import utils = require('./util/utils')
import log = require('./util/logging')
import { log } from './util/logging'
/**
* @class