From 1bbfeca3a0688e3f40c656f680633875e08b56da Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Wed, 24 Jul 2019 18:13:58 -0700 Subject: [PATCH 01/23] Initial commit --- sdk/core/core-tracing/.typings/karma.d.ts | 10 ++ .../.typings/rollup-plugin-alias.d.ts | 4 + .../.typings/rollup-plugin-commonjs.d.ts | 4 + .../.typings/rollup-plugin-json.d.ts | 4 + .../.typings/rollup-plugin-multi-entry.d.ts | 4 + .../.typings/rollup-plugin-node-resolve.d.ts | 4 + .../.typings/rollup-plugin-sourcemaps.d.ts | 4 + .../.typings/rollup-plugin-visualizer.d.ts | 4 + sdk/core/core-tracing/Changelog.md | 1 + sdk/core/core-tracing/LICENSE.txt | 21 +++ sdk/core/core-tracing/README.md | 23 +++ .../lib/implementations/noop/spanNoOpImpl.ts | 37 ++++ .../implementations/noop/tracerNoOpImpl.ts | 24 +++ sdk/core/core-tracing/lib/index.ts | 29 +++ sdk/core/core-tracing/lib/interfaces/Event.ts | 25 +++ .../core-tracing/lib/interfaces/Sampler.ts | 37 ++++ .../lib/interfaces/SpanOptions.ts | 43 +++++ .../core-tracing/lib/interfaces/TimedEvent.ts | 25 +++ .../core-tracing/lib/interfaces/attributes.ts | 20 +++ sdk/core/core-tracing/lib/interfaces/link.ts | 29 +++ sdk/core/core-tracing/lib/interfaces/span.ts | 117 +++++++++++++ .../lib/interfaces/span_context.ts | 66 +++++++ .../core-tracing/lib/interfaces/span_kind.ts | 50 ++++++ .../core-tracing/lib/interfaces/status.ts | 165 ++++++++++++++++++ .../lib/interfaces/trace_options.ts | 27 +++ .../lib/interfaces/trace_state.ts | 63 +++++++ .../core-tracing/lib/interfaces/tracer.ts | 92 ++++++++++ .../lib/plugins/noop/noOpSpanPlugin.ts | 37 ++++ .../lib/plugins/noop/noOpTracePlugin.ts | 24 +++ .../opencensus/openCensusSpanPlugin.ts | 45 +++++ .../opencensus/openCensusTracePlugin.ts | 34 ++++ sdk/core/core-tracing/lib/tracerProxy.ts | 38 ++++ .../lib/utils/supportedPlugins.ts | 4 + sdk/core/core-tracing/package.json | 145 +++++++++++++++ sdk/core/core-tracing/rollup.config.ts | 83 +++++++++ sdk/core/core-tracing/tsconfig.es.json | 7 + sdk/core/core-tracing/tsconfig.json | 32 ++++ 37 files changed, 1381 insertions(+) create mode 100644 sdk/core/core-tracing/.typings/karma.d.ts create mode 100644 sdk/core/core-tracing/.typings/rollup-plugin-alias.d.ts create mode 100644 sdk/core/core-tracing/.typings/rollup-plugin-commonjs.d.ts create mode 100644 sdk/core/core-tracing/.typings/rollup-plugin-json.d.ts create mode 100644 sdk/core/core-tracing/.typings/rollup-plugin-multi-entry.d.ts create mode 100644 sdk/core/core-tracing/.typings/rollup-plugin-node-resolve.d.ts create mode 100644 sdk/core/core-tracing/.typings/rollup-plugin-sourcemaps.d.ts create mode 100644 sdk/core/core-tracing/.typings/rollup-plugin-visualizer.d.ts create mode 100644 sdk/core/core-tracing/Changelog.md create mode 100644 sdk/core/core-tracing/LICENSE.txt create mode 100644 sdk/core/core-tracing/README.md create mode 100644 sdk/core/core-tracing/lib/implementations/noop/spanNoOpImpl.ts create mode 100644 sdk/core/core-tracing/lib/implementations/noop/tracerNoOpImpl.ts create mode 100644 sdk/core/core-tracing/lib/index.ts create mode 100644 sdk/core/core-tracing/lib/interfaces/Event.ts create mode 100644 sdk/core/core-tracing/lib/interfaces/Sampler.ts create mode 100644 sdk/core/core-tracing/lib/interfaces/SpanOptions.ts create mode 100644 sdk/core/core-tracing/lib/interfaces/TimedEvent.ts create mode 100644 sdk/core/core-tracing/lib/interfaces/attributes.ts create mode 100644 sdk/core/core-tracing/lib/interfaces/link.ts create mode 100644 sdk/core/core-tracing/lib/interfaces/span.ts create mode 100644 sdk/core/core-tracing/lib/interfaces/span_context.ts create mode 100644 sdk/core/core-tracing/lib/interfaces/span_kind.ts create mode 100644 sdk/core/core-tracing/lib/interfaces/status.ts create mode 100644 sdk/core/core-tracing/lib/interfaces/trace_options.ts create mode 100644 sdk/core/core-tracing/lib/interfaces/trace_state.ts create mode 100644 sdk/core/core-tracing/lib/interfaces/tracer.ts create mode 100644 sdk/core/core-tracing/lib/plugins/noop/noOpSpanPlugin.ts create mode 100644 sdk/core/core-tracing/lib/plugins/noop/noOpTracePlugin.ts create mode 100644 sdk/core/core-tracing/lib/plugins/opencensus/openCensusSpanPlugin.ts create mode 100644 sdk/core/core-tracing/lib/plugins/opencensus/openCensusTracePlugin.ts create mode 100644 sdk/core/core-tracing/lib/tracerProxy.ts create mode 100644 sdk/core/core-tracing/lib/utils/supportedPlugins.ts create mode 100644 sdk/core/core-tracing/package.json create mode 100644 sdk/core/core-tracing/rollup.config.ts create mode 100644 sdk/core/core-tracing/tsconfig.es.json create mode 100644 sdk/core/core-tracing/tsconfig.json diff --git a/sdk/core/core-tracing/.typings/karma.d.ts b/sdk/core/core-tracing/.typings/karma.d.ts new file mode 100644 index 000000000000..b34d9a505976 --- /dev/null +++ b/sdk/core/core-tracing/.typings/karma.d.ts @@ -0,0 +1,10 @@ +import * as karma from "karma"; + +export type Config = karma.Config & { + rollupPreprocessor: any; + set: (config: ConfigOptions) => void; +} + +export type ConfigOptions = karma.ConfigOptions & { + rollupPreprocessor: any; +} diff --git a/sdk/core/core-tracing/.typings/rollup-plugin-alias.d.ts b/sdk/core/core-tracing/.typings/rollup-plugin-alias.d.ts new file mode 100644 index 000000000000..3b79bc14d15d --- /dev/null +++ b/sdk/core/core-tracing/.typings/rollup-plugin-alias.d.ts @@ -0,0 +1,4 @@ +declare module "rollup-plugin-alias" { + const alias(options: { [_: string]: string }) => void; + export default alias; +} diff --git a/sdk/core/core-tracing/.typings/rollup-plugin-commonjs.d.ts b/sdk/core/core-tracing/.typings/rollup-plugin-commonjs.d.ts new file mode 100644 index 000000000000..8bab998dc9dd --- /dev/null +++ b/sdk/core/core-tracing/.typings/rollup-plugin-commonjs.d.ts @@ -0,0 +1,4 @@ +declare module "rollup-plugin-commonjs" { + const commonjs(options?: any) => void; + export default commonjs; +} diff --git a/sdk/core/core-tracing/.typings/rollup-plugin-json.d.ts b/sdk/core/core-tracing/.typings/rollup-plugin-json.d.ts new file mode 100644 index 000000000000..f88cf977060b --- /dev/null +++ b/sdk/core/core-tracing/.typings/rollup-plugin-json.d.ts @@ -0,0 +1,4 @@ +declare module "rollup-plugin-json" { + const json() => void; + export default json; +} diff --git a/sdk/core/core-tracing/.typings/rollup-plugin-multi-entry.d.ts b/sdk/core/core-tracing/.typings/rollup-plugin-multi-entry.d.ts new file mode 100644 index 000000000000..c06209e91717 --- /dev/null +++ b/sdk/core/core-tracing/.typings/rollup-plugin-multi-entry.d.ts @@ -0,0 +1,4 @@ +declare module 'rollup-plugin-multi-entry' { + const multiEntry: () => void; + export default multiEntry; +} diff --git a/sdk/core/core-tracing/.typings/rollup-plugin-node-resolve.d.ts b/sdk/core/core-tracing/.typings/rollup-plugin-node-resolve.d.ts new file mode 100644 index 000000000000..f321e5f3319c --- /dev/null +++ b/sdk/core/core-tracing/.typings/rollup-plugin-node-resolve.d.ts @@ -0,0 +1,4 @@ +declare module "rollup-plugin-node-resolve" { + const nodeResolve(options: { [_: string]: any }) => void; + export default nodeResolve; +} diff --git a/sdk/core/core-tracing/.typings/rollup-plugin-sourcemaps.d.ts b/sdk/core/core-tracing/.typings/rollup-plugin-sourcemaps.d.ts new file mode 100644 index 000000000000..310f9a791751 --- /dev/null +++ b/sdk/core/core-tracing/.typings/rollup-plugin-sourcemaps.d.ts @@ -0,0 +1,4 @@ +declare module "rollup-plugin-sourcemaps" { + const sourcemaps() => void; + export default sourcemaps; +} diff --git a/sdk/core/core-tracing/.typings/rollup-plugin-visualizer.d.ts b/sdk/core/core-tracing/.typings/rollup-plugin-visualizer.d.ts new file mode 100644 index 000000000000..d84ed7df0af3 --- /dev/null +++ b/sdk/core/core-tracing/.typings/rollup-plugin-visualizer.d.ts @@ -0,0 +1,4 @@ +declare module "rollup-plugin-visualizer" { + const visualizer(options?: { [_: string]: any }) => void; + export default visualizer; +} diff --git a/sdk/core/core-tracing/Changelog.md b/sdk/core/core-tracing/Changelog.md new file mode 100644 index 000000000000..825c32f0d03d --- /dev/null +++ b/sdk/core/core-tracing/Changelog.md @@ -0,0 +1 @@ +# Changelog diff --git a/sdk/core/core-tracing/LICENSE.txt b/sdk/core/core-tracing/LICENSE.txt new file mode 100644 index 000000000000..21071075c245 --- /dev/null +++ b/sdk/core/core-tracing/LICENSE.txt @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/sdk/core/core-tracing/README.md b/sdk/core/core-tracing/README.md new file mode 100644 index 000000000000..e3e2ed80aa73 --- /dev/null +++ b/sdk/core/core-tracing/README.md @@ -0,0 +1,23 @@ +# Azure Core HTTP client library for JS + +This is the core HTTP pipeline for Azure SDK JavaScript libraries which work in the browser and Node.js. This library is primarily intended to be used in code generated by [AutoRest](https://github.com/Azure/Autorest). + +## Getting started + +Coming soon.... + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a +Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us +the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide +a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions +provided by the bot. You will only need to do this once across all repos using our CLA. + +If you'd like to contribute to this library, please read the [contributing guide](../../../CONTRIBUTING.md) to learn more about how to build and test the code. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or +contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/sdk/core/core-tracing/lib/implementations/noop/spanNoOpImpl.ts b/sdk/core/core-tracing/lib/implementations/noop/spanNoOpImpl.ts new file mode 100644 index 000000000000..1718a3eb9c66 --- /dev/null +++ b/sdk/core/core-tracing/lib/implementations/noop/spanNoOpImpl.ts @@ -0,0 +1,37 @@ +import { Span } from "../../interfaces/span"; +import { SpanContext } from "../../interfaces/span_context"; +import { Attributes } from "../../interfaces/attributes"; +import { Status } from "../../interfaces/status"; + +export class SpanNoOpImpl implements Span { + context(): SpanContext { + throw new Error("Method not implemented."); + } + setAttribute(key: string, value: unknown): this { + throw new Error("Method not implemented."); + } + setAttributes(attributes: Attributes): this { + throw new Error("Method not implemented."); + } + addEvent(name: string, attributes?: Attributes | undefined): this { + throw new Error("Method not implemented."); + } + addLink(spanContext: SpanContext, attributes?: Attributes | undefined): this { + throw new Error("Method not implemented."); + } + setStatus(status: Status): this { + throw new Error("Method not implemented."); + } + updateName(name: string): this { + throw new Error("Method not implemented."); + } + start(startTime?: number | undefined): void { + throw new Error("Method not implemented."); + } + end(endTime?: number | undefined): void { + throw new Error("Method not implemented."); + } + isRecordingEvents(): boolean { + throw new Error("Method not implemented."); + } +} diff --git a/sdk/core/core-tracing/lib/implementations/noop/tracerNoOpImpl.ts b/sdk/core/core-tracing/lib/implementations/noop/tracerNoOpImpl.ts new file mode 100644 index 000000000000..455fc11853cd --- /dev/null +++ b/sdk/core/core-tracing/lib/implementations/noop/tracerNoOpImpl.ts @@ -0,0 +1,24 @@ +import { Tracer } from "../../interfaces/tracer"; +import { SpanOptions } from "../../interfaces/SpanOptions"; +import { Span } from "../../interfaces/span"; + +export class TracerNoOpImpl implements Tracer { + getCurrentSpan(): Span { + throw new Error("Method not implemented."); + } + startSpan(name: string, options?: SpanOptions | undefined): Span { + throw new Error("Method not implemented."); + } + withSpan unknown>(span: Span, fn: T): ReturnType { + throw new Error("Method not implemented."); + } + recordSpanData(span: Span): void { + throw new Error("Method not implemented."); + } + getBinaryFormat(): unknown { + throw new Error("Method not implemented."); + } + getHttpTextFormat(): unknown { + throw new Error("Method not implemented."); + } +} diff --git a/sdk/core/core-tracing/lib/index.ts b/sdk/core/core-tracing/lib/index.ts new file mode 100644 index 000000000000..d8b06e6a3195 --- /dev/null +++ b/sdk/core/core-tracing/lib/index.ts @@ -0,0 +1,29 @@ +export { TracerProxy } from "./tracerProxy"; + +// Utils +export { SupportedPlugins } from "./utils/supportedPlugins"; + +// Plugins +export { NoOpSpanPlugin } from "./plugins/noop/noOpSpanPlugin"; +export { NoOpTracePlugin } from "./plugins/noop/noOpTracePlugin"; +export { OpenCensusSpanPlugin } from "./plugins/opencensus/openCensusSpanPlugin"; +export { OpenCensusTracePlugin } from "./plugins/opencensus/openCensusTracePlugin"; + +// Implementations +export { SpanNoOpImpl } from "./implementations/noop/spanNoOpImpl"; +export { TracerNoOpImpl } from "./implementations/noop/tracerNoOpImpl"; + +// Interfaces +export { Attributes } from "./interfaces/attributes"; +export { Event } from "./interfaces/Event"; +export { Link } from "./interfaces/link"; +export { Sampler } from "./interfaces/Sampler"; +export { SpanContext } from "./interfaces/span_context"; +export { SpanKind } from "./interfaces/span_kind"; +export { Span } from "./interfaces/span"; +export { SpanOptions } from "./interfaces/SpanOptions"; +export { Status, CanonicalCode } from "./interfaces/status"; +export { TimedEvent } from "./interfaces/TimedEvent"; +export { TraceOptions } from "./interfaces/trace_options"; +export { TraceState } from "./interfaces/trace_state"; +export { Tracer } from "./interfaces/tracer"; diff --git a/sdk/core/core-tracing/lib/interfaces/Event.ts b/sdk/core/core-tracing/lib/interfaces/Event.ts new file mode 100644 index 000000000000..ea21c330174a --- /dev/null +++ b/sdk/core/core-tracing/lib/interfaces/Event.ts @@ -0,0 +1,25 @@ +/** + * Copyright 2019, OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Attributes } from './attributes'; + +/** A text annotation with a set of attributes. */ +export interface Event { + /** The name of the event. */ + name: string; + /** The attributes of the event. */ + attributes?: Attributes; +} diff --git a/sdk/core/core-tracing/lib/interfaces/Sampler.ts b/sdk/core/core-tracing/lib/interfaces/Sampler.ts new file mode 100644 index 000000000000..ae4f3338ec86 --- /dev/null +++ b/sdk/core/core-tracing/lib/interfaces/Sampler.ts @@ -0,0 +1,37 @@ +/** + * Copyright 2019, OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { SpanContext } from './span_context'; + +/** + * This interface represent a sampler. Sampling is a mechanism to control the + * noise and overhead introduced by OpenTelemetry by reducing the number of + * samples of traces collected and sent to the backend. + */ +export interface Sampler { + /** + * Checks whether span needs to be created and tracked. + * + * TODO: Consider to add required arguments https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/sampling-api.md#shouldsample + * @param [parentContext] Parent span context. Typically taken from the wire. + * Can be null. + * @returns whether span should be sampled or not. + */ + shouldSample(parentContext?: SpanContext): boolean; + + /** Returns the sampler name or short description with the configuration. */ + toString(): string; +} diff --git a/sdk/core/core-tracing/lib/interfaces/SpanOptions.ts b/sdk/core/core-tracing/lib/interfaces/SpanOptions.ts new file mode 100644 index 000000000000..602d07e10c24 --- /dev/null +++ b/sdk/core/core-tracing/lib/interfaces/SpanOptions.ts @@ -0,0 +1,43 @@ +/** + * Copyright 2019, OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Span } from './span'; +import { Attributes } from './attributes'; +import { SpanKind } from './span_kind'; +import { SpanContext } from './span_context'; + +/** + * Options needed for span creation + */ +export interface SpanOptions { + /** The SpanKind of a span */ + kind?: SpanKind; + + /** A spans attributes */ + attributes?: Attributes; + + /** Indicates that events are being recorded for a span */ + isRecordingEvents?: boolean; + + /** + * A parent SpanContext (or Span, for convenience) that the newly-started + * span will be the child of. + */ + parent?: Span | SpanContext; + + /** A manually specified start time for the created Span object. */ + startTime?: number; +} diff --git a/sdk/core/core-tracing/lib/interfaces/TimedEvent.ts b/sdk/core/core-tracing/lib/interfaces/TimedEvent.ts new file mode 100644 index 000000000000..3b46df2e87a6 --- /dev/null +++ b/sdk/core/core-tracing/lib/interfaces/TimedEvent.ts @@ -0,0 +1,25 @@ +/** + * Copyright 2019, OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Event } from './Event'; + +/** + * Represents a timed event. + * A timed event is an event with a timestamp. + */ +export interface TimedEvent extends Event { + time: number; +} diff --git a/sdk/core/core-tracing/lib/interfaces/attributes.ts b/sdk/core/core-tracing/lib/interfaces/attributes.ts new file mode 100644 index 000000000000..a9fecfac5f1a --- /dev/null +++ b/sdk/core/core-tracing/lib/interfaces/attributes.ts @@ -0,0 +1,20 @@ +/** + * Copyright 2019, OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** Defines a attributes interface. */ +export interface Attributes { + [attributeKey: string]: unknown; +} diff --git a/sdk/core/core-tracing/lib/interfaces/link.ts b/sdk/core/core-tracing/lib/interfaces/link.ts new file mode 100644 index 000000000000..fadac28adf7f --- /dev/null +++ b/sdk/core/core-tracing/lib/interfaces/link.ts @@ -0,0 +1,29 @@ +/** + * Copyright 2019, OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Attributes } from './attributes'; +import { SpanContext } from './span_context'; + +/** + * A pointer from the current {@link Span} to another span in the same trace or + * in a different trace. + */ +export interface Link { + /** The {@link SpanContext} of a linked span. */ + spanContext: SpanContext; + /** A set of {@link Attributes} on the link. */ + attributes?: Attributes; +} diff --git a/sdk/core/core-tracing/lib/interfaces/span.ts b/sdk/core/core-tracing/lib/interfaces/span.ts new file mode 100644 index 000000000000..96304dd7c6c7 --- /dev/null +++ b/sdk/core/core-tracing/lib/interfaces/span.ts @@ -0,0 +1,117 @@ +/** + * Copyright 2019, OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Attributes } from "./attributes"; +import { SpanContext } from "./span_context"; +import { Status } from "./status"; + +/** + * An interface that represents a span. A span represents a single operation + * within a trace. Examples of span might include remote procedure calls or a + * in-process function calls to sub-components. A Trace has a single, top-level + * "root" Span that in turn may have zero or more child Spans, which in turn + * may have children. + */ +export interface Span { + /** + * Returns the {@link SpanContext} object associated with this Span. + * + * @returns the SpanContext object associated with this Span. + */ + context(): SpanContext; + + // /** + // * # TODO + // * Returns the Tracer object used to create this Span. + // * https://github.com/open-telemetry/opentelemetry-specification/issues/21 + // */ + // tracer(): Tracer; + + /** + * Sets an attribute to the span. + * + * @param key the key for this attribute. + * @param value the value for this attribute. + */ + setAttribute(key: string, value: unknown): this; + + /** + * Sets attributes to the span. + * + * @param attributes the attributes that will be added. + */ + setAttributes(attributes: Attributes): this; + + /** + * Adds an event to the Span. + * + * @param name the name of the event. + * @param [attributes] the attributes that will be added; these are + * associated with this event. + */ + addEvent(name: string, attributes?: Attributes): this; + + /** + * Adds a link to the Span. + * + * @param spanContext the context of the linked span. + * @param [attributes] the attributes that will be added; these are + * associated with this link. + */ + addLink(spanContext: SpanContext, attributes?: Attributes): this; + + /** + * Sets a status to the span. If used, this will override the default Span + * status. Default is {@link CanonicalCode.OK}. + * + * @param status the Status to set. + */ + setStatus(status: Status): this; + + /** + * Updates the Span name. + * + * TODO (revision): https://github.com/open-telemetry/opentelemetry-specification/issues/119 + * + * @param name the Span name. + */ + updateName(name: string): this; + + /** + * Marks the end of Span execution. + * + * Call to End of a Span MUST not have any effects on child spans. Those may + * still be running and can be ended later. + * + * Do not return `this`. The Span generally should not be used after it + * is ended so chaining is not desired in this context. + * + * @param [endTime] the timestamp to set as Span's end time. If not provided, + * use the current time as the span's end time. + * TODO (Add timestamp format): https://github.com/open-telemetry/opentelemetry-js/issues/19 + */ + end(endTime?: number): void; + + start(startTime?: number): void; + + /** + * Returns the flag whether this span will be recorded. + * + * @returns true if this Span is active and recording information like events + * with the AddEvent operation and attributes using setAttributes. + */ + isRecordingEvents(): boolean; +} diff --git a/sdk/core/core-tracing/lib/interfaces/span_context.ts b/sdk/core/core-tracing/lib/interfaces/span_context.ts new file mode 100644 index 000000000000..c67602a25d78 --- /dev/null +++ b/sdk/core/core-tracing/lib/interfaces/span_context.ts @@ -0,0 +1,66 @@ +/** + * Copyright 2019, OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { TraceOptions } from './trace_options'; +import { TraceState } from './trace_state'; + +/** + * A SpanContext represents the portion of a {@link Span} which must be + * serialized and propagated along side of a distributed context. + */ +export interface SpanContext { + /** + * The ID of the trace that this span belongs to. It is worldwide unique + * with practically sufficient probability by being made as 16 randomly + * generated bytes, encoded as a 32 lowercase hex characters corresponding to + * 128 bits. + */ + traceId: string; + /** + * The ID of the Span. It is globally unique with practically sufficient + * probability by being made as 8 randomly generated bytes, encoded as a 16 + * lowercase hex characters corresponding to 64 bits. + */ + spanId: string; + /** + * Trace options to propagate. + * + * It is represented as 1 byte (bitmap). Bit to represent whether trace is + * sampled or not. When set, the least significant bit documents that the + * caller may have recorded trace data. A caller who does not record trace + * data out-of-band leaves this flag unset. + * + * SAMPLED = 0x1 and UNSAMPLED = 0x0; + */ + traceOptions?: TraceOptions; + /** + * Tracing-system-specific info to propagate. + * + * The tracestate field value is a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * More Info: https://www.w3.org/TR/trace-context/#tracestate-field + * + * Examples: + * Single tracing system (generic format): + * tracestate: rojo=00f067aa0ba902b7 + * Multiple tracing systems (with different formatting): + * tracestate: rojo=00f067aa0ba902b7,congo=t61rcWkgMzE + */ + traceState?: TraceState; +} diff --git a/sdk/core/core-tracing/lib/interfaces/span_kind.ts b/sdk/core/core-tracing/lib/interfaces/span_kind.ts new file mode 100644 index 000000000000..688650f2beb6 --- /dev/null +++ b/sdk/core/core-tracing/lib/interfaces/span_kind.ts @@ -0,0 +1,50 @@ +/** + * Copyright 2019, OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Type of span. Can be used to specify additional relationships between spans + * in addition to a parent/child relationship. + */ +export enum SpanKind { + /** Default value. Indicates that the span is used internally. */ + INTERNAL = 0, + + /** + * Indicates that the span covers server-side handling of an RPC or other + * remote request. + */ + SERVER = 1, + + /** + * Indicates that the span covers the client-side wrapper around an RPC or + * other remote request. + */ + CLIENT = 2, + + /** + * Indicates that the span describes producer sending a message to a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + PRODUCER = 3, + + /** + * Indicates that the span describes consumer receiving a message from a + * broker. Unlike client and server, there is no direct critical path latency + * relationship between producer and consumer spans. + */ + CONSUMER = 4, +} diff --git a/sdk/core/core-tracing/lib/interfaces/status.ts b/sdk/core/core-tracing/lib/interfaces/status.ts new file mode 100644 index 000000000000..be84093ce18d --- /dev/null +++ b/sdk/core/core-tracing/lib/interfaces/status.ts @@ -0,0 +1,165 @@ +/** + * Copyright 2019, OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The status of a Span by providing a standard CanonicalCode in conjunction + * with an optional descriptive message. + */ +export interface Status { + /** The canonical code of this message. */ + code: CanonicalCode; + /** A developer-facing error message. */ + message?: string; +} + +/** + * An enumeration of canonical status codes. + * + * TODO (revision): https://github.com/open-telemetry/opentelemetry-specification/issues/59 + */ +export enum CanonicalCode { + /** + * Not an error; returned on success + */ + OK = 0, + /** + * The operation was cancelled (typically by the caller). + */ + CANCELLED = 1, + /** + * Unknown error. An example of where this error may be returned is + * if a status value received from another address space belongs to + * an error-space that is not known in this address space. Also + * errors raised by APIs that do not return enough error information + * may be converted to this error. + */ + UNKNOWN = 2, + /** + * Client specified an invalid argument. Note that this differs + * from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments + * that are problematic regardless of the state of the system + * (e.g., a malformed file name). + */ + INVALID_ARGUMENT = 3, + /** + * Deadline expired before operation could complete. For operations + * that change the state of the system, this error may be returned + * even if the operation has completed successfully. For example, a + * successful response from a server could have been delayed long + * enough for the deadline to expire. + */ + DEADLINE_EXCEEDED = 4, + /** + * Some requested entity (e.g., file or directory) was not found. + */ + NOT_FOUND = 5, + /** + * Some entity that we attempted to create (e.g., file or directory) + * already exists. + */ + ALREADY_EXISTS = 6, + /** + * The caller does not have permission to execute the specified + * operation. PERMISSION_DENIED must not be used for rejections + * caused by exhausting some resource (use RESOURCE_EXHAUSTED + * instead for those errors). PERMISSION_DENIED must not be + * used if the caller can not be identified (use UNAUTHENTICATED + * instead for those errors). + */ + PERMISSION_DENIED = 7, + /** + * Some resource has been exhausted, perhaps a per-user quota, or + * perhaps the entire file system is out of space. + */ + RESOURCE_EXHAUSTED = 8, + /** + * Operation was rejected because the system is not in a state + * required for the operation's execution. For example, directory + * to be deleted may be non-empty, an rmdir operation is applied to + * a non-directory, etc. + * + * A litmus test that may help a service implementor in deciding + * between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE: + * + * - Use UNAVAILABLE if the client can retry just the failing call. + * - Use ABORTED if the client should retry at a higher-level + * (e.g., restarting a read-modify-write sequence). + * - Use FAILED_PRECONDITION if the client should not retry until + * the system state has been explicitly fixed. E.g., if an "rmdir" + * fails because the directory is non-empty, FAILED_PRECONDITION + * should be returned since the client should not retry unless + * they have first fixed up the directory by deleting files from it. + * - Use FAILED_PRECONDITION if the client performs conditional + * REST Get/Update/Delete on a resource and the resource on the + * server does not match the condition. E.g., conflicting + * read-modify-write on the same resource. + */ + FAILED_PRECONDITION = 9, + /** + * The operation was aborted, typically due to a concurrency issue + * like sequencer check failures, transaction aborts, etc. + * + * See litmus test above for deciding between FAILED_PRECONDITION, + * ABORTED, and UNAVAILABLE. + */ + ABORTED = 10, + /** + * Operation was attempted past the valid range. E.g., seeking or + * reading past end of file. + * + * Unlike INVALID_ARGUMENT, this error indicates a problem that may + * be fixed if the system state changes. For example, a 32-bit file + * system will generate INVALID_ARGUMENT if asked to read at an + * offset that is not in the range [0,2^32-1], but it will generate + * OUT_OF_RANGE if asked to read from an offset past the current + * file size. + * + * There is a fair bit of overlap between FAILED_PRECONDITION and + * OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific + * error) when it applies so that callers who are iterating through + * a space can easily look for an OUT_OF_RANGE error to detect when + * they are done. + */ + OUT_OF_RANGE = 11, + /** + * Operation is not implemented or not supported/enabled in this service. + */ + UNIMPLEMENTED = 12, + /** + * Internal errors. Means some invariants expected by underlying + * system has been broken. If you see one of these errors, + * something is very broken. + */ + INTERNAL = 13, + /** + * The service is currently unavailable. This is a most likely a + * transient condition and may be corrected by retrying with + * a backoff. + * + * See litmus test above for deciding between FAILED_PRECONDITION, + * ABORTED, and UNAVAILABLE. + */ + UNAVAILABLE = 14, + /** + * Unrecoverable data loss or corruption. + */ + DATA_LOSS = 15, + /** + * The request does not have valid authentication credentials for the + * operation. + */ + UNAUTHENTICATED = 16, +} diff --git a/sdk/core/core-tracing/lib/interfaces/trace_options.ts b/sdk/core/core-tracing/lib/interfaces/trace_options.ts new file mode 100644 index 000000000000..2bad26194d26 --- /dev/null +++ b/sdk/core/core-tracing/lib/interfaces/trace_options.ts @@ -0,0 +1,27 @@ +/** + * Copyright 2019, OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * An enumeration that represents global trace options. These options are + * propagated to all child {@link Span}. These determine features such as + * whether a Span should be traced. It is implemented as a bitmask. + */ +export enum TraceOptions { + /** Bit to represent whether trace is unsampled in trace options. */ + UNSAMPLED = 0x0, + /** Bit to represent whether trace is sampled in trace options. */ + SAMPLED = 0x1, +} diff --git a/sdk/core/core-tracing/lib/interfaces/trace_state.ts b/sdk/core/core-tracing/lib/interfaces/trace_state.ts new file mode 100644 index 000000000000..78561119a426 --- /dev/null +++ b/sdk/core/core-tracing/lib/interfaces/trace_state.ts @@ -0,0 +1,63 @@ +/** + * Copyright 2019, OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Tracestate carries system-specific configuration data, represented as a list + * of key-value pairs. TraceState allows multiple tracing systems to + * participate in the same trace. + */ +export interface TraceState { + /** + * Adds or updates the TraceState that has the given `key` if it is + * present. The new State will always be added in the front of the + * list of states. + * + * @param key key of the TraceState entry. + * @param value value of the TraceState entry. + */ + set(key: string, value: string): void; + + /** + * Removes the TraceState Entry that has the given `key` if it is present. + * + * @param key the key for the TraceState Entry to be removed. + */ + unset(key: string): void; + + /** + * Returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + * + * @param key with which the specified value is to be associated. + * @returns the value to which the specified key is mapped, or `undefined` if + * this map contains no mapping for the key. + */ + get(key: string): string | undefined; + + // TODO: Consider to add support for merging an object as well by also + // accepting a single internalTraceState argument similar to the constructor. + + /** + * Serializes the TraceState to a `list` as defined below. The `list` is a + * series of `list-members` separated by commas `,`, and a list-member is a + * key/value pair separated by an equals sign `=`. Spaces and horizontal tabs + * surrounding `list-members` are ignored. There can be a maximum of 32 + * `list-members` in a `list`. + * + * @returns the serialized string. + */ + serialize(): string; +} diff --git a/sdk/core/core-tracing/lib/interfaces/tracer.ts b/sdk/core/core-tracing/lib/interfaces/tracer.ts new file mode 100644 index 000000000000..bec95f236048 --- /dev/null +++ b/sdk/core/core-tracing/lib/interfaces/tracer.ts @@ -0,0 +1,92 @@ +/** + * Copyright 2019, OpenTelemetry Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { Span } from './span'; +import { SpanOptions } from './SpanOptions'; + +/** + * Tracer provides an interface for creating {@link Span}s and propagating + * context in-process. + * + * Users may choose to use manual or automatic Context propagation. Because of + * that this class offers APIs to facilitate both usages. + */ +export interface Tracer { + /** + * Returns the current Span from the current context if available. + * + * If there is no Span associated with the current context, a default Span + * with invalid SpanContext is returned. + * + * @returns Span The currently active Span + */ + getCurrentSpan(): Span; + + /** + * Starts a new {@link Span}. + * @param name The name of the span + * @param [options] SpanOptions used for span creation + * @returns Span The newly created span + */ + startSpan(name: string, options?: SpanOptions): Span; + + /** + * Executes the function given by fn within the context provided by Span + * + * @param span The span that provides the context + * @param fn The function to be eexcuted inside the provided context + */ + withSpan unknown>( + span: Span, + fn: T + ): ReturnType; + + /** + * Send a pre-populated span object to the exporter. + * Sampling and recording decisions as well as other collection optimizations + * are the responsibility of a caller. + * + * @todo: Pending API discussion. Revisit if Span or SpanData should be passed + * in here once this is sorted out. + * @param span Span Data to be reported to all exporters. + */ + recordSpanData(span: Span): void; + + /** + * Returns the {@link BinaryFormat} interface which can serialize/deserialize + * Spans. + * + * If no tracer implementation is provided, this defaults to the W3C Trace + * Context binary format ({@link BinaryFormat}). For more details see + * W3C Trace Context + * binary protocol. + * + * @todo: Change return type once BinaryFormat is available + */ + getBinaryFormat(): unknown; + + /** + * Returns the {@link HttpTextFormat} interface which can inject/extract + * Spans. + * + * If no tracer implementation is provided, this defaults to the W3C Trace + * Context HTTP text format ({@link HttpTraceContext}). For more details see + * W3C Trace Context. + * + * @todo: Change return type once HttpTextFormat is available + */ + getHttpTextFormat(): unknown; +} diff --git a/sdk/core/core-tracing/lib/plugins/noop/noOpSpanPlugin.ts b/sdk/core/core-tracing/lib/plugins/noop/noOpSpanPlugin.ts new file mode 100644 index 000000000000..bbbc016e6120 --- /dev/null +++ b/sdk/core/core-tracing/lib/plugins/noop/noOpSpanPlugin.ts @@ -0,0 +1,37 @@ +import { Span } from "../../interfaces/span"; +import { SpanContext } from "../../interfaces/span_context"; +import { Attributes } from "../../interfaces/attributes"; +import { Status } from "../../interfaces/status"; + +export class NoOpSpanPlugin implements Span { + context(): SpanContext { + throw new Error("Method not implemented."); + } + setAttribute(key: string, value: unknown): this { + throw new Error("Method not implemented."); + } + setAttributes(attributes: Attributes): this { + throw new Error("Method not implemented."); + } + addEvent(name: string, attributes?: Attributes): this { + throw new Error("Method not implemented."); + } + addLink(spanContext: SpanContext, attributes?: Attributes): this { + throw new Error("Method not implemented."); + } + setStatus(status: Status): this { + throw new Error("Method not implemented."); + } + updateName(name: string): this { + throw new Error("Method not implemented."); + } + start(startTime?: number | undefined): void { + throw new Error("Method not implemented."); + } + end(endTime?: number): void { + throw new Error("Method not implemented."); + } + isRecordingEvents(): boolean { + throw new Error("Method not implemented."); + } +} diff --git a/sdk/core/core-tracing/lib/plugins/noop/noOpTracePlugin.ts b/sdk/core/core-tracing/lib/plugins/noop/noOpTracePlugin.ts new file mode 100644 index 000000000000..ef706aad28ce --- /dev/null +++ b/sdk/core/core-tracing/lib/plugins/noop/noOpTracePlugin.ts @@ -0,0 +1,24 @@ +import { Tracer } from "../../interfaces/tracer"; +import { Span } from "../../interfaces/span"; +import { SpanOptions } from "../../interfaces/SpanOptions"; + +export class NoOpTracePlugin implements Tracer { + getCurrentSpan(): Span { + throw new Error("Method not implemented."); + } + startSpan(name: string, options?: SpanOptions | undefined): Span { + throw new Error("Method not implemented."); + } + withSpan unknown>(span: Span, fn: T): ReturnType { + throw new Error("Method not implemented."); + } + recordSpanData(span: Span): void { + throw new Error("Method not implemented."); + } + getBinaryFormat(): unknown { + throw new Error("Method not implemented."); + } + getHttpTextFormat(): unknown { + throw new Error("Method not implemented."); + } +} diff --git a/sdk/core/core-tracing/lib/plugins/opencensus/openCensusSpanPlugin.ts b/sdk/core/core-tracing/lib/plugins/opencensus/openCensusSpanPlugin.ts new file mode 100644 index 000000000000..cbb7e02ca885 --- /dev/null +++ b/sdk/core/core-tracing/lib/plugins/opencensus/openCensusSpanPlugin.ts @@ -0,0 +1,45 @@ +import { Span } from "../../interfaces/span"; +import { SpanContext } from "../../interfaces/span_context"; +import { Attributes } from "../../interfaces/attributes"; +import { Status } from "../../interfaces/status"; + +export class OpenCensusSpanPlugin implements Span { + private _span: Span; + + constructor(span: Span) { + this._span = span; + } + + end(endTime?: number): void { + this._span.end(endTime); + } + + start(startTime?: number): void { + this._span.start(startTime); + } + + context(): SpanContext { + throw new Error("Method not implemented."); + } + setAttribute(key: string, value: unknown): this { + throw new Error("Method not implemented."); + } + setAttributes(attributes: Attributes): this { + throw new Error("Method not implemented."); + } + addEvent(name: string, attributes?: Attributes): this { + throw new Error("Method not implemented."); + } + addLink(spanContext: SpanContext, attributes?: Attributes): this { + throw new Error("Method not implemented."); + } + setStatus(status: Status): this { + throw new Error("Method not implemented."); + } + updateName(name: string): this { + throw new Error("Method not implemented."); + } + isRecordingEvents(): boolean { + throw new Error("Method not implemented."); + } +} diff --git a/sdk/core/core-tracing/lib/plugins/opencensus/openCensusTracePlugin.ts b/sdk/core/core-tracing/lib/plugins/opencensus/openCensusTracePlugin.ts new file mode 100644 index 000000000000..4af3bbeb496e --- /dev/null +++ b/sdk/core/core-tracing/lib/plugins/opencensus/openCensusTracePlugin.ts @@ -0,0 +1,34 @@ +import { Tracer } from "../../interfaces/tracer"; +import { SpanOptions } from "../../interfaces/SpanOptions"; +import { Span } from "../../interfaces/span"; +import { TracerProxy } from "../../tracerProxy"; +import { OpenCensusSpanPlugin } from "../opencensus/openCensusSpanPlugin"; + +export class OpenCensusTracePlugin implements Tracer { + startSpan(name: string, options?: SpanOptions): Span { + const span = TracerProxy.getTracer().startChildSpan({ + name: name, + childOf: options ? options.parent : undefined + }); + + const openCensusSpanPlugin = new OpenCensusSpanPlugin(span); + return openCensusSpanPlugin; + } + + getCurrentSpan(): Span { + throw new Error("Method not implemented."); + } + + withSpan unknown>(span: Span, fn: T): ReturnType { + throw new Error("Method not implemented."); + } + recordSpanData(span: Span): void { + throw new Error("Method not implemented."); + } + getBinaryFormat(): unknown { + throw new Error("Method not implemented."); + } + getHttpTextFormat(): unknown { + throw new Error("Method not implemented."); + } +} diff --git a/sdk/core/core-tracing/lib/tracerProxy.ts b/sdk/core/core-tracing/lib/tracerProxy.ts new file mode 100644 index 000000000000..80527d145c0b --- /dev/null +++ b/sdk/core/core-tracing/lib/tracerProxy.ts @@ -0,0 +1,38 @@ +import { SupportedPlugins } from "./utils/supportedPlugins"; +import { SpanOptions } from "./interfaces/SpanOptions"; +import { Span } from "./interfaces/span"; +import { OpenCensusTracePlugin } from "./plugins/opencensus/openCensusTracePlugin"; +import { NoOpTracePlugin } from "./plugins/noop/noOpTracePlugin"; +import { TracerNoOpImpl } from "./implementations/noop/tracerNoOpImpl"; + +export class TracerProxy { + private static _tracer: any; + private static _tracerPlugin: SupportedPlugins; + + private constructor() {} + + public static setTracer(tracer: any, tracerPlugin: SupportedPlugins) { + TracerProxy._tracer = tracer; + TracerProxy._tracerPlugin = tracerPlugin; + } + + public static getTracer() { + if (!TracerProxy._tracer) { + TracerProxy._tracer = new TracerNoOpImpl(); + TracerProxy._tracerPlugin = SupportedPlugins.NOOP; + } + return TracerProxy._tracer; + } + + public static startSpan(spanName: string, options: SpanOptions): Span { + if (TracerProxy._tracerPlugin === SupportedPlugins.OPENCENSUS) { + const openCensusTracerPlugin = new OpenCensusTracePlugin(); + const openCensusSpanPlugin = openCensusTracerPlugin.startSpan(spanName, options); + return openCensusSpanPlugin; + } else { + const noOpTracerPlugin = new NoOpTracePlugin(); + const noOpSpanPlugin = noOpTracerPlugin.startSpan(spanName, options); + return noOpSpanPlugin; + } + } +} diff --git a/sdk/core/core-tracing/lib/utils/supportedPlugins.ts b/sdk/core/core-tracing/lib/utils/supportedPlugins.ts new file mode 100644 index 000000000000..5eaeba3b2c20 --- /dev/null +++ b/sdk/core/core-tracing/lib/utils/supportedPlugins.ts @@ -0,0 +1,4 @@ +export enum SupportedPlugins { + OPENCENSUS, + NOOP +} diff --git a/sdk/core/core-tracing/package.json b/sdk/core/core-tracing/package.json new file mode 100644 index 000000000000..005db1bd7911 --- /dev/null +++ b/sdk/core/core-tracing/package.json @@ -0,0 +1,145 @@ +{ + "name": "@azure/core-tracing", + "sdk-type": "client", + "author": { + "name": "Microsoft Corporation", + "email": "azsdkteam@microsoft.com", + "url": "https://github.com/Azure/azure-sdk-for-js" + }, + "version": "1.0.0-preview.1", + "description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest", + "tags": [ + "isomorphic", + "browser", + "javascript", + "node", + "microsoft", + "autorest", + "clientruntime" + ], + "keywords": [ + "isomorphic", + "browser", + "javascript", + "node", + "microsoft", + "autorest", + "clientruntime" + ], + "main": "./dist/index.node.js", + "module": "./es/lib/index.js", + "types": "./es/lib/index.d.ts", + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "es/lib/**/*.js", + "es/lib/**/*.js.map", + "es/lib/**/*.d.ts", + "es/lib/**/*.d.ts.map", + "lib/**/*.ts", + "LICENSE", + "README.md", + "ThirdPartyNotices.txt" + ], + "license": "MIT", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/tracing", + "repository": { + "type": "git", + "url": "git@github.com:Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "http://github.com/Azure/azure-sdk-for-js/issues" + }, + "scripts": { + "build": "run-p build:lib", + "build:lib": "run-s build:tsc", + "build:tsc": "tsc -p tsconfig.es.json", + "build:rollup": "rollup -c rollup.config.ts 2>&1", + "build:minify-browser": "uglifyjs -c -m --comments --source-map \"content='./dist/index.browser.js.map'\" -o ./dist/index.browser.min.js ./dist/index.browser.js" + }, + "sideEffects": false, + "nyc": { + "extension": [ + ".ts" + ], + "exclude": [ + "coverage/**/*", + "**/*.d.ts", + "**/*.js" + ], + "reporter": [ + "text", + "html", + "cobertura" + ], + "all": true + }, + "dependencies": {}, + "devDependencies": { + "@azure/logger-js": "^1.0.2", + "@types/chai": "^4.1.6", + "@types/express": "^4.16.0", + "@types/glob": "^7.1.1", + "@types/karma": "^3.0.0", + "@types/mocha": "^5.2.5", + "@types/node": "^8.0.0", + "@types/semver": "^5.5.0", + "@types/sinon": "^5.0.5", + "@types/tough-cookie": "^2.3.3", + "@types/uuid": "^3.4.3", + "@types/webpack": "^4.4.13", + "@types/webpack-dev-middleware": "^2.0.2", + "@types/xml2js": "^0.4.3", + "@typescript-eslint/eslint-plugin": "^1.11.0", + "@typescript-eslint/parser": "^1.11.0", + "abortcontroller-polyfill": "^1.1.9", + "axios-mock-adapter": "^1.16.0", + "chai": "^4.2.0", + "eslint": "^5.16.0", + "eslint-config-prettier": "^4.2.0", + "eslint-detailed-reporter": "^0.8.0", + "eslint-plugin-no-null": "^1.0.2", + "eslint-plugin-no-only-tests": "^2.3.0", + "eslint-plugin-promise": "^4.1.1", + "express": "^4.16.3", + "glob": "^7.1.2", + "karma": "^4.0.1", + "karma-chai": "^0.1.0", + "karma-chrome-launcher": "^2.2.0", + "karma-mocha": "^1.3.0", + "karma-rollup-preprocessor": "^7.0.0", + "karma-sourcemap-loader": "^0.3.7", + "karma-typescript-es6-transform": "^4.0.0", + "karma-webpack": "^4.0.0-rc.6", + "mocha": "^5.2.0", + "mocha-chrome": "^1.1.0", + "mocha-junit-reporter": "^1.18.0", + "mocha-multi-reporters": "^1.1.7", + "npm-run-all": "^4.1.5", + "nyc": "^14.0.0", + "opn-cli": "^4.0.0", + "puppeteer": "^1.11.0", + "rimraf": "^2.6.2", + "rollup": "^1.16.3", + "rollup-plugin-alias": "^1.4.0", + "rollup-plugin-commonjs": "^10.0.0", + "rollup-plugin-json": "^4.0.0", + "rollup-plugin-multi-entry": "^2.1.0", + "rollup-plugin-node-resolve": "^5.0.2", + "rollup-plugin-resolve": "0.0.1-predev.1", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-visualizer": "^2.0.0", + "semver": "^5.5.0", + "shx": "^0.3.2", + "sinon": "^7.1.0", + "ts-loader": "^5.3.1", + "ts-node": "^7.0.1", + "typescript": "^3.2.2", + "uglify-js": "^3.4.9", + "webpack": "^4.16.3", + "webpack-cli": "^3.2.3", + "webpack-dev-middleware": "^3.1.2", + "xhr-mock": "^2.4.1", + "yarn": "^1.6.0" + } +} diff --git a/sdk/core/core-tracing/rollup.config.ts b/sdk/core/core-tracing/rollup.config.ts new file mode 100644 index 000000000000..e8d5cfe5c704 --- /dev/null +++ b/sdk/core/core-tracing/rollup.config.ts @@ -0,0 +1,83 @@ +/// +/// +/// +/// +/// +/// + +import alias from "rollup-plugin-alias"; +import commonjs from "rollup-plugin-commonjs"; +import json from "rollup-plugin-json"; +import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import visualizer from "rollup-plugin-visualizer"; + +const banner = `/** @license @azure/core-http + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt and ThirdPartyNotices.txt in the project root for license information. + */`; + +/** + * @type {import('rollup').RollupFileOptions} + */ +const nodeConfig = { + input: "./es/lib/index.js", + external: [ + "axios", + "form-data", + "os", + "stream", + "tough-cookie", + "tslib", + "tunnel", + "uuid/v4", + "xml2js" + ], + output: { + file: "./dist/index.node.js", + format: "cjs", + sourcemap: true, + banner + }, + plugins: [ + nodeResolve({ + mainFields: ["module"] + }), + commonjs(), + sourcemaps(), + json(), + visualizer({ + filename: "dist/node-stats.html", + sourcemap: true + }) + ] +}; + +/** + * @type {import('rollup').RollupFileOptions} + */ +const browserConfig = { + input: "./es/lib/index.js", + external: [], + output: { + file: "./dist/index.browser.js", + format: "umd", + name: "Azure.Core.Tracing", + sourcemap: true, + banner + }, + plugins: [ + nodeResolve({ + mainFields: ["module"], + browser: true + }), + commonjs(), + sourcemaps(), + visualizer({ + filename: "dist/browser-stats.html", + sourcemap: true + }) + ] +}; + +export default [nodeConfig, browserConfig]; diff --git a/sdk/core/core-tracing/tsconfig.es.json b/sdk/core/core-tracing/tsconfig.es.json new file mode 100644 index 000000000000..dae744d8a4d6 --- /dev/null +++ b/sdk/core/core-tracing/tsconfig.es.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "es6", + "outDir": "es" + } +} diff --git a/sdk/core/core-tracing/tsconfig.json b/sdk/core/core-tracing/tsconfig.json new file mode 100644 index 000000000000..6475133a6b78 --- /dev/null +++ b/sdk/core/core-tracing/tsconfig.json @@ -0,0 +1,32 @@ +{ + "compilerOptions": { + "module": "commonjs", + "sourceMap": true, + "newLine": "LF", + "target": "es5", + "moduleResolution": "node", + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": false, + "outDir": "dist", + "strict": true, + "declaration": true, + "declarationMap": true, + "importHelpers": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "lib": [ + "dom", + "dom.iterable", + "es5", + "es6", + "es7", + "esnext", + "esnext.asynciterable", + "es2015.iterable" + ] + }, + "compileOnSave": true, + "exclude": ["node_modules"], + "include": ["./lib/**/*.ts", "./samples/**/*.ts", "./test/**/*.ts"] +} From 513a9aae39b71b0eff03a5b12f95cae244f7ba1d Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Thu, 25 Jul 2019 11:35:39 -0700 Subject: [PATCH 02/23] Include Tracing to Rush & as Dep to Keys Bild Fine --- common/config/rush/pnpm-lock.yaml | 287 +++++++++++++++--------- rush.json | 4 + sdk/core/core-tracing/package.json | 5 +- sdk/keyvault/keyvault-keys/package.json | 1 + sdk/keyvault/keyvault-keys/src/index.ts | 27 ++- 5 files changed, 216 insertions(+), 108 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 90dbd6fed203..e09b6c5ad18f 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -9,7 +9,7 @@ dependencies: '@azure/logger-js': 1.3.2 '@azure/ms-rest-js': 1.8.13 '@azure/ms-rest-nodeauth': 0.9.3 - '@microsoft/api-extractor': 7.3.3 + '@microsoft/api-extractor': 7.3.4 '@rush-temp/abort-controller': 'file:projects/abort-controller.tgz' '@rush-temp/core-amqp': 'file:projects/core-amqp.tgz' '@rush-temp/core-arm': 'file:projects/core-arm.tgz' @@ -17,6 +17,7 @@ dependencies: '@rush-temp/core-auth': 'file:projects/core-auth.tgz' '@rush-temp/core-http': 'file:projects/core-http.tgz' '@rush-temp/core-paging': 'file:projects/core-paging.tgz' + '@rush-temp/core-tracing': 'file:projects/core-tracing.tgz_axios@0.19.0' '@rush-temp/cosmos': 'file:projects/cosmos.tgz' '@rush-temp/event-hubs': 'file:projects/event-hubs.tgz' '@rush-temp/event-processor-host': 'file:projects/event-processor-host.tgz' @@ -58,7 +59,7 @@ dependencies: '@types/tunnel': 0.0.0 '@types/underscore': 1.9.2 '@types/uuid': 3.4.5 - '@types/webpack': 4.32.0 + '@types/webpack': 4.32.1 '@types/webpack-dev-middleware': 2.0.3 '@types/ws': 6.0.1 '@types/xml2js': 0.4.4 @@ -119,7 +120,7 @@ dependencies: karma-rollup-preprocessor: 7.0.2_rollup@1.17.0 karma-sourcemap-loader: 0.3.7 karma-typescript-es6-transform: 4.1.1 - karma-webpack: 4.0.2_webpack@4.36.1 + karma-webpack: 4.0.2_webpack@4.37.0 long: 4.0.0 mocha: 5.2.0 mocha-chrome: 1.1.0 @@ -139,7 +140,7 @@ dependencies: priorityqueuejs: 1.0.0 process: 0.11.10 promise: 8.0.3 - puppeteer: 1.18.1 + puppeteer: 1.19.0 qs: 6.7.0 query-string: 5.1.1 requirejs: 2.3.6 @@ -149,7 +150,7 @@ dependencies: rollup: 1.17.0 rollup-plugin-alias: 1.5.2 rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 - rollup-plugin-inject: 3.0.0 + rollup-plugin-inject: 3.0.1 rollup-plugin-json: 4.0.0 rollup-plugin-multi-entry: 2.1.0 rollup-plugin-node-globals: 1.4.0 @@ -160,7 +161,7 @@ dependencies: rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 rollup-plugin-terser: 5.1.1_rollup@1.17.0 rollup-plugin-uglify: 6.0.2_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.3_rollup@1.17.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 semaphore: 1.0.5 semver: 5.7.0 shx: 0.3.2 @@ -179,9 +180,9 @@ dependencies: url: 0.11.0 util: 0.11.1 uuid: 3.3.2 - webpack: 4.36.1_webpack@4.36.1 - webpack-cli: 3.3.6_webpack@4.36.1 - webpack-dev-middleware: 3.7.0_webpack@4.36.1 + webpack: 4.37.0_webpack@4.37.0 + webpack-cli: 3.3.6_webpack@4.37.0 + webpack-dev-middleware: 3.7.0_webpack@4.37.0 ws: 6.2.1 xhr-mock: 2.5.0 xml2js: 0.4.19 @@ -417,7 +418,7 @@ packages: dev: false resolution: integrity: sha512-GfRaGz6d8fPhMOG70l2zS1s6Z8rCxcTHnwfVjb+6ln25eB4fN/jeDRlLKot+HOsVcbxvVseoeB0ZQL9nIsfbXw== - /@microsoft/api-extractor/7.3.3: + /@microsoft/api-extractor/7.3.4: dependencies: '@microsoft/api-extractor-model': 7.3.0 '@microsoft/node-core-library': 3.13.0 @@ -431,7 +432,7 @@ packages: dev: false hasBin: true resolution: - integrity: sha512-6bpVl6l3Kxgi1nFyBgvlUNhvJqh0e12TRF1yjlFIgzfjTCiNv6hzgHZNYPBofMK17u8BF7bEYRzwaXj39LE87Q== + integrity: sha512-CPs2s1miV4JVju5sqrnFSjJMBiKnpfjeIe6vSj9aiCGWmwa4r7FHo81Htz8mLHTTQg3Uh8B4IqNDNu2xPm2QIw== /@microsoft/node-core-library/3.13.0: dependencies: '@types/fs-extra': 5.0.4 @@ -741,12 +742,12 @@ packages: dependencies: '@types/connect': 3.4.32 '@types/memory-fs': 0.3.2 - '@types/webpack': 4.32.0 + '@types/webpack': 4.32.1 loglevel: 1.6.3 dev: false resolution: integrity: sha512-DzNJJ6ah/6t1n8sfAgQyEbZ/OMmFcF9j9P3aesnm7G6/iBFR/qiGin8K89J0RmaWIBzhTMdDg3I5PmKmSv7N9w== - /@types/webpack/4.32.0: + /@types/webpack/4.32.1: dependencies: '@types/anymatch': 1.3.1 '@types/node': 8.10.51 @@ -755,7 +756,7 @@ packages: source-map: 0.6.1 dev: false resolution: - integrity: sha512-kpz5wHDyG/WEpzX9gcwFp/w0oSsq0n/rmFdJelk/QBMHmNIOZdiTDInV0Lj8itGKBahQrBgJGJRss/6UHgLuKg== + integrity: sha512-9n38CBx9uga1FEAdTipnt0EkbKpsCJFh7xJb1LE65FFb/A6OOLFX022vYsGC1IyVCZ/GroNg9u/RMmlDxGcLIw== /@types/ws/6.0.1: dependencies: '@types/events': 3.0.0 @@ -785,7 +786,7 @@ packages: eslint-utils: 1.4.0 functional-red-black-tree: 1.0.1 regexpp: 2.0.1 - tsutils: 3.14.0_typescript@3.5.3 + tsutils: 3.14.1_typescript@3.5.3 dev: false engines: node: ^6.14.0 || ^8.10.0 || >=9.10.0 @@ -2176,7 +2177,7 @@ packages: /browserslist/3.2.8: dependencies: caniuse-lite: 1.0.30000985 - electron-to-chromium: 1.3.199 + electron-to-chromium: 1.3.200 dev: false hasBin: true resolution: @@ -3225,10 +3226,10 @@ packages: dev: false resolution: integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - /electron-to-chromium/1.3.199: + /electron-to-chromium/1.3.200: dev: false resolution: - integrity: sha512-gachlDdHSK47s0N2e58GH9HMC6Z4ip0SfmYUa5iEbE50AKaOUXysaJnXMfKj0xB245jWbYcyFSH+th3rqsF8hA== + integrity: sha512-PUurrpyDA74MuAjJRD+79ss5BqJlU3mdArRbuu4wO/dt6jc3Ic/6BDmFJxkdwbfq39cHf/XKm2vW98XSvut9Dg== /elliptic/6.5.0: dependencies: bn.js: 4.11.8 @@ -5143,7 +5144,7 @@ packages: '@babel/traverse': 7.5.5 '@babel/types': 7.5.5 istanbul-lib-coverage: 2.0.5 - semver: 6.2.0 + semver: 6.3.0 dev: false engines: node: '>=6' @@ -5490,15 +5491,15 @@ packages: dev: false resolution: integrity: sha512-WTGGThwufBT73c20q30iTcXq8Jb3Wat/h+JW1lwKgMtymT5rVxLknoaUVNfenaV3+cRMiTEsBT773kz9jWk6IQ== - /karma-webpack/4.0.2_webpack@4.36.1: + /karma-webpack/4.0.2_webpack@4.37.0: dependencies: clone-deep: 4.0.1 loader-utils: 1.2.3 neo-async: 2.6.1 schema-utils: 1.0.0 source-map: 0.7.3 - webpack: 4.36.1_webpack@4.36.1 - webpack-dev-middleware: 3.7.0_webpack@4.36.1 + webpack: 4.37.0_webpack@4.37.0 + webpack-dev-middleware: 3.7.0_webpack@4.37.0 dev: false engines: node: '>= 8.9.0' @@ -7263,7 +7264,7 @@ packages: node: '>=8' resolution: integrity: sha512-xxy6mj9KTirR7fpsdXrIaC4oUb/uvFfchrC4K3RFxYLQ/G05RlhJIKFF2ayCQnNaFI+fOxGWzEVUhYMXHNljeQ== - /puppeteer/1.18.1: + /puppeteer/1.19.0: dependencies: debug: 4.1.1 extract-zip: 1.6.7 @@ -7278,7 +7279,7 @@ packages: node: '>=6.4.0' requiresBuild: true resolution: - integrity: sha512-luUy0HPSuWPsPZ1wAp6NinE0zgetWtudf5zwZ6dHjMWfYpTQcmKveFRox7VBNhQ98OjNA9PQ9PzQyX8k/KrxTg== + integrity: sha512-2S6E6ygpoqcECaagDbBopoSOPDv0pAZvTbnBgUY+6hq0/XDFDOLEMNlHF/SKJlzcaZ9ckiKjKDuueWI3FN/WXw== /qjobs/1.2.0: dev: false engines: @@ -7781,14 +7782,14 @@ packages: rollup: '>=1.12.0' resolution: integrity: sha512-x0PcCVdEc4J8igv1qe2vttz8JKAKcTs3wfIA3L8xEty3VzxgORLrzZrNWaVMc+pBC4U3aDOb9BnWLAQ8J11vkA== - /rollup-plugin-inject/3.0.0: + /rollup-plugin-inject/3.0.1: dependencies: estree-walker: 0.6.1 magic-string: 0.25.3 rollup-pluginutils: 2.8.1 dev: false resolution: - integrity: sha512-euo9UmiJDxyGPjlHecpOZjUcBOOzaI5fbnqmFulG0I8k3or4JMi7UHDcRCcjkeDORF966jsA2qYbvXrgrmgCuw== + integrity: sha512-zF0jOuSpBxdLwAeDsS/+zGYgseaoH9LwqRNsByuzmE3bxfQ4Pg2gDoXGGWiia7iFyA8nLT+6iHrAqQYtH3Olow== /rollup-plugin-json/4.0.0: dependencies: rollup-pluginutils: 2.8.1 @@ -7878,7 +7879,7 @@ packages: rollup: '>=0.66.0 <2' resolution: integrity: sha512-qwz2Tryspn5QGtPUowq5oumKSxANKdrnfz7C0jm4lKxvRDsNe/hSGsB9FntUul7UeC4TsZEWKErVgE1qWSO0gw== - /rollup-plugin-visualizer/2.5.3_rollup@1.17.0: + /rollup-plugin-visualizer/2.5.4_rollup@1.17.0: dependencies: mkdirp: 0.5.1 open: 6.4.0 @@ -7891,7 +7892,7 @@ packages: peerDependencies: rollup: '>=0.60.0' resolution: - integrity: sha512-DIEN4EL/a1S6zq2AnoD8gkzN0jUR+rhQCKjyHFtocYWiaghOsXEtG+EPxp+4iGCoMvvvVUHrt4FK/inmktuyBQ== + integrity: sha512-ehMX8Us4UmHmt9y6uvBdtW3ASAQDqCcmp07Qrm8dBqQMf1eAd89Rc/owGZr0cDp764dvLKQRA03W+nWlRajl4w== /rollup-pluginutils/2.8.1: dependencies: estree-walker: 0.6.1 @@ -7989,11 +7990,11 @@ packages: hasBin: true resolution: integrity: sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA== - /semver/6.2.0: + /semver/6.3.0: dev: false hasBin: true resolution: - integrity: sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A== + integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== /send/0.17.1: dependencies: debug: 2.6.9 @@ -8643,7 +8644,7 @@ packages: node: '>=4' resolution: integrity: sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI= - /terser-webpack-plugin/1.3.0_webpack@4.36.1: + /terser-webpack-plugin/1.3.0_webpack@4.37.0: dependencies: cacache: 11.3.3 find-cache-dir: 2.1.0 @@ -8653,7 +8654,7 @@ packages: serialize-javascript: 1.7.0 source-map: 0.6.1 terser: 4.1.2 - webpack: 4.36.1_webpack@4.36.1 + webpack: 4.37.0_webpack@4.37.0 webpack-sources: 1.3.0 worker-farm: 1.7.0 dev: false @@ -8911,7 +8912,7 @@ packages: dev: false resolution: integrity: sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ== - /tsutils/3.14.0_typescript@3.5.3: + /tsutils/3.14.1_typescript@3.5.3: dependencies: tslib: 1.10.0 typescript: 3.5.3 @@ -8921,7 +8922,7 @@ packages: peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev' resolution: - integrity: sha512-SmzGbB0l+8I0QwsPgjooFRaRvHLBLNYM8SeQ0k6rtNDru5sCGeLJcZdwilNndN+GysuFjF5EIYgN8GfFG6UeUw== + integrity: sha512-kiuZzD1uUA5DxGj/uxbde+ymp6VVdAxdzOIlAFbYKrPyla8/uiJ9JLBm1QsPhOm4Muj0/+cWEDP99yoCUcSl6Q== /tty-browserify/0.0.0: dev: false resolution: @@ -9276,7 +9277,7 @@ packages: dev: false resolution: integrity: sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA== - /webpack-cli/3.3.6_webpack@4.36.1: + /webpack-cli/3.3.6_webpack@4.37.0: dependencies: chalk: 2.4.2 cross-spawn: 6.0.5 @@ -9288,7 +9289,7 @@ packages: loader-utils: 1.2.3 supports-color: 6.1.0 v8-compile-cache: 2.0.3 - webpack: 4.36.1_webpack@4.36.1 + webpack: 4.37.0_webpack@4.37.0 yargs: 13.2.4 dev: false engines: @@ -9298,12 +9299,12 @@ packages: webpack: 4.x.x resolution: integrity: sha512-0vEa83M7kJtxK/jUhlpZ27WHIOndz5mghWL2O53kiDoA9DIxSKnfqB92LoqEn77cT4f3H2cZm1BMEat/6AZz3A== - /webpack-dev-middleware/3.7.0_webpack@4.36.1: + /webpack-dev-middleware/3.7.0_webpack@4.37.0: dependencies: memory-fs: 0.4.1 mime: 2.4.4 range-parser: 1.2.1 - webpack: 4.36.1_webpack@4.36.1 + webpack: 4.37.0_webpack@4.37.0 webpack-log: 2.0.0 dev: false engines: @@ -9328,7 +9329,7 @@ packages: dev: false resolution: integrity: sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA== - /webpack/4.36.1_webpack@4.36.1: + /webpack/4.37.0_webpack@4.37.0: dependencies: '@webassemblyjs/ast': 1.8.5 '@webassemblyjs/helper-module-context': 1.8.5 @@ -9350,7 +9351,7 @@ packages: node-libs-browser: 2.2.1 schema-utils: 1.0.0 tapable: 1.1.3 - terser-webpack-plugin: 1.3.0_webpack@4.36.1 + terser-webpack-plugin: 1.3.0_webpack@4.37.0 watchpack: 1.6.0 webpack-sources: 1.3.0 dev: false @@ -9360,7 +9361,7 @@ packages: peerDependencies: webpack: '*' resolution: - integrity: sha512-Ej01/N9W8DVyhEpeQnbUdGvOECw0L46FxS12cCOs8gSK7bhUlrbHRnWkjiXckGlHjUrmL89kDpTRIkUk6Y+fKg== + integrity: sha512-iJPPvL7XpbcbwOthbzpa2BSPlmGp8lGDokAj/LdWtK80rsPoPOdANSbDBf2GAVLKZD3GhCuQ/gGkgN9HWs0Keg== /which-module/1.0.0: dev: false resolution: @@ -9654,7 +9655,7 @@ packages: integrity: sha512-DUOKC/IhbkdLKKiV89gw9DUauTV8U/8yJl1sjf6MtDmzevLKOF2duNJ495S3MFVjqZarr+qNGCPbkg4mu4PpLw== 'file:projects/abort-controller.tgz': dependencies: - '@microsoft/api-extractor': 7.3.3 + '@microsoft/api-extractor': 7.3.4 '@types/mocha': 5.2.7 '@types/node': 8.10.51 '@typescript-eslint/eslint-plugin': 1.13.0_0b5e999c52a893676e7127c05369c7b6 @@ -9697,7 +9698,7 @@ packages: dev: false name: '@rush-temp/abort-controller' resolution: - integrity: sha512-2+IDAPkc8w6F7v+Qtv+0QlKup7BbSj9/FJRqus2Fv6lv4Qwfhhl1dII2Ttv0Y3D1jF0IlqOecuzEef9zxLc/jA== + integrity: sha512-+6kIsx32k7nlN6uAwPS4JOrdVH8CuciXwOqL6DFCDjBdaJhMZ85z/WxMlAtLl/rNxgXlU41Ev3roYTR6U4g+Sw== tarball: 'file:projects/abort-controller.tgz' version: 0.0.0 'file:projects/core-amqp.tgz': @@ -9741,13 +9742,13 @@ packages: nyc: 14.1.1 prettier: 1.18.2 process: 0.11.10 - puppeteer: 1.18.1 + puppeteer: 1.19.0 rhea: 1.0.8 rhea-promise: 0.1.15 rimraf: 2.6.3 rollup: 1.17.0 rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 - rollup-plugin-inject: 3.0.0 + rollup-plugin-inject: 3.0.1 rollup-plugin-json: 4.0.0 rollup-plugin-multi-entry: 2.1.0 rollup-plugin-node-globals: 1.4.0 @@ -9767,7 +9768,7 @@ packages: dev: false name: '@rush-temp/core-amqp' resolution: - integrity: sha512-9LHxNb4QrxyNRXfAf5u1uisfKB2+L3H/fet8fGbe8aotNAfIeVipiftCD8oaATz7qdnG+FXQwLVxXMaz4dI7rg== + integrity: sha512-vSzZoGuTsZKs05qloVpqBTzhuPEWWS9Px1R9+UwwtLAMDneKZNNzzOFkUOPZ2TMM2BBp7ce13g0lxs1xY4nRTg== tarball: 'file:projects/core-amqp.tgz' version: 0.0.0 'file:projects/core-arm.tgz': @@ -9794,7 +9795,7 @@ packages: rollup: 1.17.0 rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.3_rollup@1.17.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 shx: 0.3.2 ts-loader: 5.4.5_typescript@3.5.3 ts-node: 7.0.1 @@ -9805,7 +9806,7 @@ packages: dev: false name: '@rush-temp/core-arm' resolution: - integrity: sha512-ydCkKGPwdsqk3cZtb5s+PlhnUJNHifGymT1Rh6PjJCVoOOXGTXqZYc4k/EI9DMk/sgI4Vo9cQknrmjG5hRz5dw== + integrity: sha512-9YUKGvAJqpqJ1OBnZ80TGWf2k5LwlQAWgBpcaxHxAIJ+z3Bb1ZoZFZOMqon7EIRsVNpdAt4M1KVqZSnRv6N2SQ== tarball: 'file:projects/core-arm.tgz' version: 0.0.0 'file:projects/core-asynciterator-polyfill.tgz': @@ -9824,13 +9825,13 @@ packages: dev: false name: '@rush-temp/core-asynciterator-polyfill' resolution: - integrity: sha512-oJErNaXrpCzEEVyYVvv8gcBRnv36c76LBxalfW/l4wlABmUh9u+EuvwI46ig0V3m1bmIluW4S/9O08nO18uyGw== + integrity: sha512-v2OkkGp4BscubKnr7qikdSqLJttDTy5skuwpX+KeQv9H5aMDtfGU4CKUmqdwGsI/+vnXlPU57ZBVJ0BtucQBng== tarball: 'file:projects/core-asynciterator-polyfill.tgz' version: 0.0.0 'file:projects/core-auth.tgz': dependencies: '@azure/abort-controller': 1.0.0-preview.1 - '@microsoft/api-extractor': 7.3.3 + '@microsoft/api-extractor': 7.3.4 '@types/mocha': 5.2.7 '@types/node': 8.10.51 '@typescript-eslint/eslint-plugin': 1.13.0_0b5e999c52a893676e7127c05369c7b6 @@ -9857,14 +9858,14 @@ packages: rollup-plugin-replace: 2.2.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.3_rollup@1.17.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 tslib: 1.10.0 typescript: 3.5.3 util: 0.11.1 dev: false name: '@rush-temp/core-auth' resolution: - integrity: sha512-D6tMjROHeCf7ijXZIPhewnP5sPK7Aj+k5Na5O5OU629HF7qLBczazjTCnpnnex4X8yvi4X3b82rX/LD2OxZ0dQ== + integrity: sha512-oIG+pWtdToJ12ubczgGEAYEOBnE88rHXfw4CpDaPYV1DOhdRQ95ZCvcZ1LXAU0ov2OsyOTUrzXq7cl06hmCWUg== tarball: 'file:projects/core-auth.tgz' version: 0.0.0 'file:projects/core-http.tgz': @@ -9881,7 +9882,7 @@ packages: '@types/tough-cookie': 2.3.5 '@types/tunnel': 0.0.0 '@types/uuid': 3.4.5 - '@types/webpack': 4.32.0 + '@types/webpack': 4.32.1 '@types/webpack-dev-middleware': 2.0.3 '@types/xml2js': 0.4.4 '@typescript-eslint/eslint-plugin': 1.13.0_0b5e999c52a893676e7127c05369c7b6 @@ -9906,7 +9907,7 @@ packages: karma-rollup-preprocessor: 7.0.2_rollup@1.17.0 karma-sourcemap-loader: 0.3.7 karma-typescript-es6-transform: 4.1.1 - karma-webpack: 4.0.2_webpack@4.36.1 + karma-webpack: 4.0.2_webpack@4.37.0 mocha: 5.2.0 mocha-chrome: 1.1.0 mocha-junit-reporter: 1.23.1_mocha@5.2.0 @@ -9915,7 +9916,7 @@ packages: nyc: 14.1.1 opn-cli: 4.1.0 process: 0.11.10 - puppeteer: 1.18.1 + puppeteer: 1.19.0 rimraf: 2.6.3 rollup: 1.17.0 rollup-plugin-alias: 1.5.2 @@ -9925,7 +9926,7 @@ packages: rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 rollup-plugin-resolve: 0.0.1-predev.1 rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.3_rollup@1.17.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 semver: 5.7.0 shx: 0.3.2 sinon: 7.3.2 @@ -9937,16 +9938,16 @@ packages: typescript: 3.5.3 uglify-js: 3.6.0 uuid: 3.3.2 - webpack: 4.36.1_webpack@4.36.1 - webpack-cli: 3.3.6_webpack@4.36.1 - webpack-dev-middleware: 3.7.0_webpack@4.36.1 + webpack: 4.37.0_webpack@4.37.0 + webpack-cli: 3.3.6_webpack@4.37.0 + webpack-dev-middleware: 3.7.0_webpack@4.37.0 xhr-mock: 2.5.0 xml2js: 0.4.19 yarn: 1.17.3 dev: false name: '@rush-temp/core-http' resolution: - integrity: sha512-boYkGbWKFBT8jqs2q2lgsBLUfHRsHzd4utdb9GWM8kR/3Goq7pqiXBSHAnuSaowbK0/QqsCtuZ6bYCnaS1ORQg== + integrity: sha512-Fycn4IMExj6fHlcivPijmzjgNVpZb3IYFrAHGgrIHOCKi+4Z36IQaI2YsakxKwFmMqFvb2iHX7H2m3gSsp/xcQ== tarball: 'file:projects/core-http.tgz' version: 0.0.0 'file:projects/core-paging.tgz': @@ -9966,9 +9967,85 @@ packages: dev: false name: '@rush-temp/core-paging' resolution: - integrity: sha512-MTsl2eG0FXkUyouQVkSEpgLuG6tNUKE8ckhH8y4B3VUevh/MOS/ghpCqXFRKEAMF7jVfB1s2BSSorGYFuWlcDg== + integrity: sha512-2u4fno6260w1XLYISrBU+SlPSNrMlY9/Au3oQxjk4EzkWkZXOuDrC9WKNu5w0EHEktYtOi8eX9lAU9+JtZR3Hg== tarball: 'file:projects/core-paging.tgz' version: 0.0.0 + 'file:projects/core-tracing.tgz_axios@0.19.0': + dependencies: + '@azure/logger-js': 1.3.2 + '@types/chai': 4.1.7 + '@types/express': 4.17.0 + '@types/glob': 7.1.1 + '@types/karma': 3.0.3 + '@types/mocha': 5.2.7 + '@types/node': 8.10.51 + '@types/semver': 5.5.0 + '@types/sinon': 5.0.7 + '@types/tough-cookie': 2.3.5 + '@types/uuid': 3.4.5 + '@types/webpack': 4.32.1 + '@types/webpack-dev-middleware': 2.0.3 + '@types/xml2js': 0.4.4 + '@typescript-eslint/eslint-plugin': 1.13.0_0b5e999c52a893676e7127c05369c7b6 + '@typescript-eslint/parser': 1.13.0_eslint@5.16.0 + abortcontroller-polyfill: 1.3.0 + axios-mock-adapter: 1.17.0_axios@0.19.0 + chai: 4.2.0 + eslint: 5.16.0 + eslint-config-prettier: 4.3.0_eslint@5.16.0 + eslint-detailed-reporter: 0.8.0_eslint@5.16.0 + eslint-plugin-no-null: 1.0.2_eslint@5.16.0 + eslint-plugin-no-only-tests: 2.3.1 + eslint-plugin-promise: 4.2.1 + express: 4.17.1 + glob: 7.1.4 + karma: 4.2.0 + karma-chai: 0.1.0_chai@4.2.0+karma@4.2.0 + karma-chrome-launcher: 2.2.0 + karma-mocha: 1.3.0 + karma-rollup-preprocessor: 7.0.2_rollup@1.17.0 + karma-sourcemap-loader: 0.3.7 + karma-typescript-es6-transform: 4.1.1 + karma-webpack: 4.0.2_webpack@4.37.0 + mocha: 5.2.0 + mocha-chrome: 1.1.0 + mocha-junit-reporter: 1.23.1_mocha@5.2.0 + mocha-multi-reporters: 1.1.7 + npm-run-all: 4.1.5 + nyc: 14.1.1 + opn-cli: 4.1.0 + puppeteer: 1.19.0 + rimraf: 2.6.3 + rollup: 1.17.0 + rollup-plugin-alias: 1.5.2 + rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup-plugin-json: 4.0.0 + rollup-plugin-multi-entry: 2.1.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-resolve: 0.0.1-predev.1 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 + semver: 5.7.0 + shx: 0.3.2 + sinon: 7.3.2 + ts-loader: 5.4.5_typescript@3.5.3 + ts-node: 7.0.1 + typescript: 3.5.3 + uglify-js: 3.6.0 + webpack: 4.37.0_webpack@4.37.0 + webpack-cli: 3.3.6_webpack@4.37.0 + webpack-dev-middleware: 3.7.0_webpack@4.37.0 + xhr-mock: 2.5.0 + yarn: 1.17.3 + dev: false + id: 'file:projects/core-tracing.tgz' + name: '@rush-temp/core-tracing' + peerDependencies: + axios: '*' + resolution: + integrity: sha512-yrsNyYPJK/tlt/HlHN82AL/NYnCypodeUJ3PY6BziIYp/LMfP1KqRgdtXFWMGchr/lqDA89lrGv8Uqq7RTt1rQ== + tarball: 'file:projects/core-tracing.tgz' + version: 0.0.0 'file:projects/cosmos.tgz': dependencies: '@types/mocha': 5.2.7 @@ -10003,19 +10080,19 @@ packages: tslib: 1.10.0 tunnel: 0.0.6 typescript: 3.5.3 - webpack: 4.36.1_webpack@4.36.1 - webpack-cli: 3.3.6_webpack@4.36.1 + webpack: 4.37.0_webpack@4.37.0 + webpack-cli: 3.3.6_webpack@4.37.0 dev: false name: '@rush-temp/cosmos' resolution: - integrity: sha512-rLhtUCCGnwzY3OigHd+TEJ4U0lyBKc2RpjKGMl9koha/aSUchKfm8qHWS+4XO/J2+WldP7yQx6gZY5C+t3cBvQ== + integrity: sha512-f7IyBbSYkZZ+guO7QopSGUb/7d5QYQiotA3hWoIvC0iUo4XhGa+DqlnQ/yn5zx+p8ogWU8pvIixA8GQU4nMUfA== tarball: 'file:projects/cosmos.tgz' version: 0.0.0 'file:projects/event-hubs.tgz': dependencies: '@azure/abort-controller': 1.0.0-preview.1 '@azure/core-asynciterator-polyfill': 1.0.0-preview.1 - '@microsoft/api-extractor': 7.3.3 + '@microsoft/api-extractor': 7.3.4 '@types/async-lock': 1.1.1 '@types/chai': 4.1.7 '@types/chai-as-promised': 7.1.0 @@ -10062,12 +10139,12 @@ packages: mocha-multi: 1.1.0_mocha@5.2.0 nyc: 14.1.1 prettier: 1.18.2 - puppeteer: 1.18.1 + puppeteer: 1.19.0 rhea-promise: 0.1.15 rimraf: 2.6.3 rollup: 1.17.0 rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 - rollup-plugin-inject: 3.0.0 + rollup-plugin-inject: 3.0.1 rollup-plugin-json: 4.0.0 rollup-plugin-multi-entry: 2.1.0 rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 @@ -10084,14 +10161,14 @@ packages: dev: false name: '@rush-temp/event-hubs' resolution: - integrity: sha512-1GJu6YVyxIFLe1hq0W9+is9tGnNt5ExJ6aHDvGGPX+j1zCZnh2x0Lb/fK0VTUcEybCw9D+lLpTd4vXNYphTMww== + integrity: sha512-fdaoQurVXqFHfVM3Rr01ickk6ci9YUzyPVmfmb9VvJ5P0TqrLXeCQLFCh5AA3o6xA4sr13AUJ68CczXFqEaoBA== tarball: 'file:projects/event-hubs.tgz' version: 0.0.0 'file:projects/event-processor-host.tgz': dependencies: '@azure/event-hubs': 2.1.1 '@azure/ms-rest-nodeauth': 0.9.3 - '@microsoft/api-extractor': 7.3.3 + '@microsoft/api-extractor': 7.3.4 '@types/async-lock': 1.1.1 '@types/chai': 4.1.7 '@types/chai-as-promised': 7.1.0 @@ -10101,6 +10178,7 @@ packages: '@types/mocha': 5.2.7 '@types/node': 8.10.51 '@types/uuid': 3.4.5 + '@types/ws': 6.0.1 '@typescript-eslint/eslint-plugin': 1.13.0_0b5e999c52a893676e7127c05369c7b6 '@typescript-eslint/parser': 1.13.0_eslint@5.16.0 async-lock: 1.2.2 @@ -10117,6 +10195,7 @@ packages: eslint-plugin-no-null: 1.0.2_eslint@5.16.0 eslint-plugin-no-only-tests: 2.3.1 eslint-plugin-promise: 4.2.1 + https-proxy-agent: 2.2.2 mocha: 5.2.0 mocha-junit-reporter: 1.23.1_mocha@5.2.0 mocha-multi: 1.1.0_mocha@5.2.0 @@ -10136,10 +10215,11 @@ packages: tslib: 1.10.0 typescript: 3.5.3 uuid: 3.3.2 + ws: 6.2.1 dev: false name: '@rush-temp/event-processor-host' resolution: - integrity: sha512-YEltFsweWeV5/IHJyEd/kVz7RG4iRz2AWE6rsw23UIXJaMkEc3nhsw/FtJpWq8bGWs8Dp3pvzKx1VezkCFB9MQ== + integrity: sha512-61Ultc6G27j08ScxQ+P74F49NcOdbgfBBYDyohrr50iQ8TxGI6GX661E6ryHllObZB0NM+r96aChe2W9P/WyCg== tarball: 'file:projects/event-processor-host.tgz' version: 0.0.0 'file:projects/identity.tgz': @@ -10171,7 +10251,7 @@ packages: mocha-junit-reporter: 1.23.1_mocha@5.2.0 mocha-multi: 1.1.0_mocha@5.2.0 prettier: 1.18.2 - puppeteer: 1.18.1 + puppeteer: 1.19.0 qs: 6.7.0 rimraf: 2.6.3 rollup: 1.17.0 @@ -10182,7 +10262,7 @@ packages: rollup-plugin-replace: 2.2.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.3_rollup@1.17.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 tslib: 1.10.0 typescript: 3.5.3 util: 0.11.1 @@ -10190,12 +10270,12 @@ packages: dev: false name: '@rush-temp/identity' resolution: - integrity: sha512-aLe+RHGk7M6wqCmNrblNMYMUtng49pfjo7pctPvnPORnPMD3acKp1+Ld3wQaAjImwPxlq60O1eulxRKAGM/fag== + integrity: sha512-Jo3h3GHu1DGCFEz+zAYytqJfH+CqJGOQJETkQS3KfQeT1zFLHEPA5XEMnczQ4WAqsfYI2d7aJiis57NkuiZUFA== tarball: 'file:projects/identity.tgz' version: 0.0.0 'file:projects/keyvault-certificates.tgz': dependencies: - '@microsoft/api-extractor': 7.3.3 + '@microsoft/api-extractor': 7.3.4 '@types/chai': 4.1.7 '@types/node': 8.10.51 '@typescript-eslint/eslint-plugin': 1.13.0_0b5e999c52a893676e7127c05369c7b6 @@ -10219,14 +10299,14 @@ packages: dev: false name: '@rush-temp/keyvault-certificates' resolution: - integrity: sha512-QXnSrcEl4SWcc1wYPRy2BeupDtio52G/miaEJAgse04u88EeU5YoZpQNtZ9l2rzpd/wuJmB2GMkVgUXRnB6zgg== + integrity: sha512-0Rr3TCScxlCMTaQ42DE3wAzan3NPSnborTqYIH8v/tJnxaFbjfD15Z0x2qGdmpn6Rs+45kG26uwKeG14AxtNPA== tarball: 'file:projects/keyvault-certificates.tgz' version: 0.0.0 'file:projects/keyvault-keys.tgz': dependencies: '@azure/abort-controller': 1.0.0-preview.1 '@azure/core-paging': 1.0.0-preview.1 - '@microsoft/api-extractor': 7.3.3 + '@microsoft/api-extractor': 7.3.4 '@types/chai': 4.1.7 '@types/dotenv': 6.1.1 '@types/fs-extra': 7.0.0 @@ -10268,7 +10348,7 @@ packages: nock: 10.0.6 nyc: 14.1.1 prettier: 1.18.2 - puppeteer: 1.18.1 + puppeteer: 1.19.0 query-string: 5.1.1 rimraf: 2.6.3 rollup: 1.17.0 @@ -10279,7 +10359,7 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.3_rollup@1.17.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 source-map-support: 0.5.12 tslib: 1.10.0 typescript: 3.5.3 @@ -10288,14 +10368,14 @@ packages: dev: false name: '@rush-temp/keyvault-keys' resolution: - integrity: sha512-kv1LOiu2pl432/WjarVRLropOwyQrGkOU4tdlA6MiTR9aeysnBosJzkOlScA6HdnBA1rUaoZoILYXQg7x6eS+g== + integrity: sha512-/XVa4BXKrwTWKE6a0z2e6RjwMNCHLWqeFAM66uJZn89i8Nl94oNH+3BUVXrehsZ5g5OgvmObnW22r0ngfaYGeg== tarball: 'file:projects/keyvault-keys.tgz' version: 0.0.0 'file:projects/keyvault-secrets.tgz': dependencies: '@azure/abort-controller': 1.0.0-preview.1 '@azure/core-paging': 1.0.0-preview.1 - '@microsoft/api-extractor': 7.3.3 + '@microsoft/api-extractor': 7.3.4 '@types/chai': 4.1.7 '@types/dotenv': 6.1.1 '@types/fs-extra': 7.0.0 @@ -10337,7 +10417,7 @@ packages: nock: 10.0.6 nyc: 14.1.1 prettier: 1.18.2 - puppeteer: 1.18.1 + puppeteer: 1.19.0 query-string: 5.1.1 rimraf: 2.6.3 rollup: 1.17.0 @@ -10348,7 +10428,7 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.3_rollup@1.17.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 source-map-support: 0.5.12 tslib: 1.10.0 typescript: 3.5.3 @@ -10357,7 +10437,7 @@ packages: dev: false name: '@rush-temp/keyvault-secrets' resolution: - integrity: sha512-x5m+5BJfn2ssYVl2jzY4YVgvVpgOHP8IQdoFzVG5NlUhYld2DHz4KsEzgYUGdQx5SNud9KLLimjIb4f9FPzSjQ== + integrity: sha512-2BkoWHCHM7mwug++tnAJT11TU1o5itq5prJqfjeLOrhrUWieS6GPpwveClcV6CHXGIiZjJ5O0XITdt0/hOPDwA== tarball: 'file:projects/keyvault-secrets.tgz' version: 0.0.0 'file:projects/service-bus.tgz': @@ -10365,7 +10445,7 @@ packages: '@azure/amqp-common': 1.0.0-preview.6_rhea-promise@0.1.15 '@azure/arm-servicebus': 0.1.0 '@azure/ms-rest-nodeauth': 0.9.3 - '@microsoft/api-extractor': 7.3.3 + '@microsoft/api-extractor': 7.3.4 '@types/async-lock': 1.1.1 '@types/chai': 4.1.7 '@types/chai-as-promised': 7.1.0 @@ -10414,13 +10494,13 @@ packages: prettier: 1.18.2 process: 0.11.10 promise: 8.0.3 - puppeteer: 1.18.1 + puppeteer: 1.19.0 rhea: 1.0.8 rhea-promise: 0.1.15 rimraf: 2.6.3 rollup: 1.17.0 rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 - rollup-plugin-inject: 3.0.0 + rollup-plugin-inject: 3.0.1 rollup-plugin-json: 4.0.0 rollup-plugin-multi-entry: 2.1.0 rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 @@ -10435,13 +10515,13 @@ packages: dev: false name: '@rush-temp/service-bus' resolution: - integrity: sha512-rkb1doDhx3T0RhPqtdxGi4/jeyG/9Wr5ZfAYDUy+Ck2LzlPuJcbl/S08urt5y51dalNoZHP3n6cjykuKoK0Ylg== + integrity: sha512-NZHotJLX4FKwY6NVijuN5RkbKfb59wKzmyX+z6gMvy4I41itMzdQfd6w7kPEUFgsjqLic/aGOZANnKnKiLaNLA== tarball: 'file:projects/service-bus.tgz' version: 0.0.0 'file:projects/storage-blob.tgz': dependencies: '@azure/ms-rest-js': 1.8.13 - '@microsoft/api-extractor': 7.3.3 + '@microsoft/api-extractor': 7.3.4 '@types/dotenv': 6.1.1 '@types/fs-extra': 7.0.0 '@types/mocha': 5.2.7 @@ -10486,7 +10566,7 @@ packages: nock: 10.0.6 nyc: 14.1.1 prettier: 1.18.2 - puppeteer: 1.18.1 + puppeteer: 1.19.0 query-string: 5.1.1 rimraf: 2.6.3 rollup: 1.17.0 @@ -10497,7 +10577,7 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.3_rollup@1.17.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 source-map-support: 0.5.12 ts-node: 7.0.1 tslib: 1.10.0 @@ -10506,13 +10586,13 @@ packages: dev: false name: '@rush-temp/storage-blob' resolution: - integrity: sha512-4105iXB3hoaFSq5UdvNfztT1BgIPpS9xe/jnH5QPvhO5vxg7S0zIh7RuKqQE9BjpVpbNYU03ANCVnaymnDmZOQ== + integrity: sha512-KNp0iQwCm/S9NZEzJnzd1ES37i6N8Uqem3e97HdELUG/yZcXMi1G2nPrkBxCbbJsijt60ZPAMmCxCAwbtDRzTg== tarball: 'file:projects/storage-blob.tgz' version: 0.0.0 'file:projects/storage-file.tgz': dependencies: '@azure/ms-rest-js': 1.8.13 - '@microsoft/api-extractor': 7.3.3 + '@microsoft/api-extractor': 7.3.4 '@types/dotenv': 6.1.1 '@types/fs-extra': 7.0.0 '@types/mocha': 5.2.7 @@ -10557,7 +10637,7 @@ packages: nock: 10.0.6 nyc: 14.1.1 prettier: 1.18.2 - puppeteer: 1.18.1 + puppeteer: 1.19.0 query-string: 5.1.1 rimraf: 2.6.3 rollup: 1.17.0 @@ -10568,7 +10648,7 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.3_rollup@1.17.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 source-map-support: 0.5.12 ts-node: 7.0.1 tslib: 1.10.0 @@ -10577,13 +10657,13 @@ packages: dev: false name: '@rush-temp/storage-file' resolution: - integrity: sha512-juOCmmDWgZhQNzudPSlmhETCWJ2pXvezQg1oaVg+MNtkkz8uD2q03kXb7yfYOEM+w9cegsJZUp3jCXt61VkPtQ== + integrity: sha512-J8s4BR2MQXwtYf8Hm6NlaS4WYc0VKdVZapL478+44pNo5lab3u4sDECvFwxYL1BLPcmyrBm59iW8vCTbVfnJ4g== tarball: 'file:projects/storage-file.tgz' version: 0.0.0 'file:projects/storage-queue.tgz': dependencies: '@azure/ms-rest-js': 1.8.13 - '@microsoft/api-extractor': 7.3.3 + '@microsoft/api-extractor': 7.3.4 '@types/dotenv': 6.1.1 '@types/fs-extra': 7.0.0 '@types/mocha': 5.2.7 @@ -10627,7 +10707,7 @@ packages: nock: 10.0.6 nyc: 14.1.1 prettier: 1.18.2 - puppeteer: 1.18.1 + puppeteer: 1.19.0 query-string: 5.1.1 rimraf: 2.6.3 rollup: 1.17.0 @@ -10638,7 +10718,7 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.3_rollup@1.17.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 source-map-support: 0.5.12 ts-node: 7.0.1 tslib: 1.10.0 @@ -10647,13 +10727,13 @@ packages: dev: false name: '@rush-temp/storage-queue' resolution: - integrity: sha512-s5r16h2hU8MIPBfqhtCgY59+GGhaRwA+vdgVyFzzlWvwd3IE3MDSc/GjVHDXFt0bHes3PU3AQQU6el2IURCm2w== + integrity: sha512-3xjQvHHk+zS/jRDwXqk9W/Y3fO9miaWGYJAdIpXEJuiIsKwfeCirGu988QSkHqjz7pv0v28joO8E1XSEPecovA== tarball: 'file:projects/storage-queue.tgz' version: 0.0.0 'file:projects/template.tgz': dependencies: '@azure/ms-rest-js': 1.8.13 - '@microsoft/api-extractor': 7.3.3 + '@microsoft/api-extractor': 7.3.4 '@types/mocha': 5.2.7 '@types/node': 8.10.51 '@typescript-eslint/eslint-plugin': 1.13.0_0b5e999c52a893676e7127c05369c7b6 @@ -10692,14 +10772,14 @@ packages: rollup-plugin-replace: 2.2.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.3_rollup@1.17.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 tslib: 1.10.0 typescript: 3.5.3 util: 0.11.1 dev: false name: '@rush-temp/template' resolution: - integrity: sha512-Lbng6NWBk6fVPMUAdf3pqeb/y6PrAfaBE8BlVthaVo1FsUn1CnIYdCPJylV3q1WReebpXxvvoh7isVsDNvVZ+Q== + integrity: sha512-SsN1TzIAhjm92cBBvws295kBKgwb0Ck0VwXMKKxkohR2XGCjaIc6ypNNgHjPMV/cmyaOue3kd7KYDlNdrFBDpw== tarball: 'file:projects/template.tgz' version: 0.0.0 'file:projects/testhub.tgz': @@ -10725,7 +10805,7 @@ packages: dev: false name: '@rush-temp/testhub' resolution: - integrity: sha512-Lt7NGJIhEbyVoQ1sJ4eUnUg7nGIkdgatRJJMWz18ZVWxKFXPxbBjxPsvIJNirR8QdA3efLv1FhyM4lszfJHcjw== + integrity: sha512-5aP/T4HsltLa6B6z0LQSHKjR/pM6y/sD4Y1gp4g/Nt35FzVnQVDkcAbSKTjr4DVb1a2pOwY3q5NDhv0CUDjYbQ== tarball: 'file:projects/testhub.tgz' version: 0.0.0 specifiers: @@ -10747,6 +10827,7 @@ specifiers: '@rush-temp/core-auth': 'file:./projects/core-auth.tgz' '@rush-temp/core-http': 'file:./projects/core-http.tgz' '@rush-temp/core-paging': 'file:./projects/core-paging.tgz' + '@rush-temp/core-tracing': 'file:./projects/core-tracing.tgz' '@rush-temp/cosmos': 'file:./projects/cosmos.tgz' '@rush-temp/event-hubs': 'file:./projects/event-hubs.tgz' '@rush-temp/event-processor-host': 'file:./projects/event-processor-host.tgz' diff --git a/rush.json b/rush.json index 4da6a4a595c2..45365b369f57 100644 --- a/rush.json +++ b/rush.json @@ -389,6 +389,10 @@ { "packageName": "@azure/template", "projectFolder": "sdk/template/template" + }, + { + "packageName": "@azure/core-tracing", + "projectFolder": "sdk/core/core-tracing" } ] } diff --git a/sdk/core/core-tracing/package.json b/sdk/core/core-tracing/package.json index 005db1bd7911..ac2b2dafd559 100644 --- a/sdk/core/core-tracing/package.json +++ b/sdk/core/core-tracing/package.json @@ -27,8 +27,8 @@ "clientruntime" ], "main": "./dist/index.node.js", - "module": "./es/lib/index.js", - "types": "./es/lib/index.d.ts", + "module": "./es/index.js", + "types": "./es/index.d.ts", "files": [ "dist/**/*.js", "dist/**/*.js.map", @@ -74,7 +74,6 @@ ], "all": true }, - "dependencies": {}, "devDependencies": { "@azure/logger-js": "^1.0.2", "@types/chai": "^4.1.6", diff --git a/sdk/keyvault/keyvault-keys/package.json b/sdk/keyvault/keyvault-keys/package.json index c3dacb301ed9..3e42f9ca745c 100644 --- a/sdk/keyvault/keyvault-keys/package.json +++ b/sdk/keyvault/keyvault-keys/package.json @@ -68,6 +68,7 @@ }, "sideEffects": false, "dependencies": { + "@azure/core-tracing": "1.0.0-preview.1", "@azure/core-arm": "1.0.0-preview.2", "@azure/core-http": "1.0.0-preview.2", "@azure/core-paging": "1.0.0-preview.1", diff --git a/sdk/keyvault/keyvault-keys/src/index.ts b/sdk/keyvault/keyvault-keys/src/index.ts index 4331f89f4344..6408422b3451 100644 --- a/sdk/keyvault/keyvault-keys/src/index.ts +++ b/sdk/keyvault/keyvault-keys/src/index.ts @@ -20,6 +20,8 @@ import { userAgentPolicy } from "@azure/core-http"; +import { TracerProxy, Span } from "@azure/core-tracing"; + import { getDefaultUserAgentValue } from "@azure/core-http"; import "@azure/core-paging"; import { PageSettings, PagedAsyncIterableIterator } from "@azure/core-paging"; @@ -188,9 +190,9 @@ export class KeysClient { this.pipeline = pipelineOrOptions; } - this.pipeline.requestPolicyFactories + this.pipeline.requestPolicyFactories; - this.client = new KeyVaultClient(credential, this.pipeline); + this.client = new KeyVaultClient(credential, this.pipeline); } private static getUserAgentString(telemetry?: TelemetryOptions): string { @@ -497,12 +499,23 @@ export class KeysClient { * @returns Promise */ public async getKey(name: string, options?: GetKeyOptions): Promise { + const span:Span = TracerProxy.getTracer().startSpan( + "getKeyMethod", + options ? + options.requestOptions ? options.requestOptions["spanOptions"] : undefined + : undefined + ); + span.start(); + const response = await this.client.getKey( this.vaultBaseUrl, name, options && options.version ? options.version : "", options ); + + span.end(); + return this.getKeyFromKeyBundle(response); } @@ -752,7 +765,17 @@ export class KeysClient { public listKeys( options?: ListKeysOptions ): PagedAsyncIterableIterator { + const span:Span = TracerProxy.getTracer().startSpan( + "listKeysMethod", + options ? + options.requestOptions ? options.requestOptions["spanOptions"] : undefined + : undefined + ); + span.start(); + const iter = this.listKeysAll(options); + + span.end(); return { next() { return iter.next(); From 067b8fad23ce033599f881f39ea75f98d280ac60 Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Thu, 25 Jul 2019 13:20:43 -0700 Subject: [PATCH 03/23] Minor change to package.json file --- sdk/core/core-tracing/package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/core/core-tracing/package.json b/sdk/core/core-tracing/package.json index ac2b2dafd559..a17c43055130 100644 --- a/sdk/core/core-tracing/package.json +++ b/sdk/core/core-tracing/package.json @@ -32,10 +32,10 @@ "files": [ "dist/**/*.js", "dist/**/*.js.map", - "es/lib/**/*.js", - "es/lib/**/*.js.map", - "es/lib/**/*.d.ts", - "es/lib/**/*.d.ts.map", + "es/**/*.js", + "es/**/*.js.map", + "es/**/*.d.ts", + "es/**/*.d.ts.map", "lib/**/*.ts", "LICENSE", "README.md", From 2db9c72cdd07488b50822e301c78fbed8e632f64 Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Thu, 25 Jul 2019 13:23:44 -0700 Subject: [PATCH 04/23] Temporary Sample Changes. REMOVE LATER --- sdk/core/core-tracing-sample/Changelog.md | 1 + sdk/core/core-tracing-sample/LICENSE.txt | 21 +++ sdk/core/core-tracing-sample/README.md | 23 +++ sdk/core/core-tracing-sample/lib/index.ts | 3 + sdk/core/core-tracing-sample/package.json | 132 ++++++++++++++++++ sdk/core/core-tracing-sample/rollup.config.ts | 83 +++++++++++ sdk/core/core-tracing-sample/tsconfig.es.json | 7 + sdk/core/core-tracing-sample/tsconfig.json | 32 +++++ 8 files changed, 302 insertions(+) create mode 100644 sdk/core/core-tracing-sample/Changelog.md create mode 100644 sdk/core/core-tracing-sample/LICENSE.txt create mode 100644 sdk/core/core-tracing-sample/README.md create mode 100644 sdk/core/core-tracing-sample/lib/index.ts create mode 100644 sdk/core/core-tracing-sample/package.json create mode 100644 sdk/core/core-tracing-sample/rollup.config.ts create mode 100644 sdk/core/core-tracing-sample/tsconfig.es.json create mode 100644 sdk/core/core-tracing-sample/tsconfig.json diff --git a/sdk/core/core-tracing-sample/Changelog.md b/sdk/core/core-tracing-sample/Changelog.md new file mode 100644 index 000000000000..825c32f0d03d --- /dev/null +++ b/sdk/core/core-tracing-sample/Changelog.md @@ -0,0 +1 @@ +# Changelog diff --git a/sdk/core/core-tracing-sample/LICENSE.txt b/sdk/core/core-tracing-sample/LICENSE.txt new file mode 100644 index 000000000000..21071075c245 --- /dev/null +++ b/sdk/core/core-tracing-sample/LICENSE.txt @@ -0,0 +1,21 @@ + MIT License + + Copyright (c) Microsoft Corporation. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/sdk/core/core-tracing-sample/README.md b/sdk/core/core-tracing-sample/README.md new file mode 100644 index 000000000000..e3e2ed80aa73 --- /dev/null +++ b/sdk/core/core-tracing-sample/README.md @@ -0,0 +1,23 @@ +# Azure Core HTTP client library for JS + +This is the core HTTP pipeline for Azure SDK JavaScript libraries which work in the browser and Node.js. This library is primarily intended to be used in code generated by [AutoRest](https://github.com/Azure/Autorest). + +## Getting started + +Coming soon.... + +## Contributing + +This project welcomes contributions and suggestions. Most contributions require you to agree to a +Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us +the rights to use your contribution. For details, visit https://cla.microsoft.com. + +When you submit a pull request, a CLA-bot will automatically determine whether you need to provide +a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions +provided by the bot. You will only need to do this once across all repos using our CLA. + +If you'd like to contribute to this library, please read the [contributing guide](../../../CONTRIBUTING.md) to learn more about how to build and test the code. + +This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). +For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or +contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/sdk/core/core-tracing-sample/lib/index.ts b/sdk/core/core-tracing-sample/lib/index.ts new file mode 100644 index 000000000000..74b3fd2f11a1 --- /dev/null +++ b/sdk/core/core-tracing-sample/lib/index.ts @@ -0,0 +1,3 @@ +import tracing = require("@opencensus/nodejs"); +import { EnvironmentCredential } from "@azure/identity"; +import { ZipkinTraceExporter } from "@opencensus/exporter-zipkin"; diff --git a/sdk/core/core-tracing-sample/package.json b/sdk/core/core-tracing-sample/package.json new file mode 100644 index 000000000000..b11158883d11 --- /dev/null +++ b/sdk/core/core-tracing-sample/package.json @@ -0,0 +1,132 @@ +{ + "name": "@azure/core-tracing-sample", + "sdk-type": "client", + "author": { + "name": "Microsoft Corporation", + "email": "azsdkteam@microsoft.com", + "url": "https://github.com/Azure/azure-sdk-for-js" + }, + "version": "1.0.0-preview.1", + "description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest", + "main": "./dist/index.node.js", + "module": "./es/index.js", + "types": "./es/index.d.ts", + "files": [ + "dist/**/*.js", + "dist/**/*.js.map", + "es/**/*.js", + "es/**/*.js.map", + "es/**/*.d.ts", + "es/**/*.d.ts.map", + "lib/**/*.ts", + "LICENSE", + "README.md", + "ThirdPartyNotices.txt" + ], + "license": "MIT", + "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/tracing", + "repository": { + "type": "git", + "url": "git@github.com:Azure/azure-sdk-for-js.git" + }, + "bugs": { + "url": "http://github.com/Azure/azure-sdk-for-js/issues" + }, + "scripts": { + "build": "run-p build:lib", + "build:lib": "run-s build:tsc", + "build:tsc": "tsc -p tsconfig.es.json", + "build:rollup": "rollup -c rollup.config.ts 2>&1", + "build:minify-browser": "uglifyjs -c -m --comments --source-map \"content='./dist/index.browser.js.map'\" -o ./dist/index.browser.min.js ./dist/index.browser.js" + }, + "sideEffects": false, + "nyc": { + "extension": [ + ".ts" + ], + "exclude": [ + "coverage/**/*", + "**/*.d.ts", + "**/*.js" + ], + "reporter": [ + "text", + "html", + "cobertura" + ], + "all": true + }, + "dependencies": { + "@azure/core-tracing": "1.0.0-preview.1", + "@opencensus/exporter-zipkin": "0.0.15", + "@opencensus/nodejs": "0.0.15", + "@types/continuation-local-storage": "^3.2.1" + }, + "devDependencies": { + "@azure/logger-js": "^1.0.2", + "@types/chai": "^4.1.6", + "@types/express": "^4.16.0", + "@types/glob": "^7.1.1", + "@types/karma": "^3.0.0", + "@types/mocha": "^5.2.5", + "@types/node": "^8.0.0", + "@types/semver": "^5.5.0", + "@types/sinon": "^5.0.5", + "@types/tough-cookie": "^2.3.3", + "@types/uuid": "^3.4.3", + "@types/webpack": "^4.4.13", + "@types/webpack-dev-middleware": "^2.0.2", + "@types/xml2js": "^0.4.3", + "@typescript-eslint/eslint-plugin": "^1.11.0", + "@typescript-eslint/parser": "^1.11.0", + "abortcontroller-polyfill": "^1.1.9", + "axios-mock-adapter": "^1.16.0", + "chai": "^4.2.0", + "eslint": "^5.16.0", + "eslint-config-prettier": "^4.2.0", + "eslint-detailed-reporter": "^0.8.0", + "eslint-plugin-no-null": "^1.0.2", + "eslint-plugin-no-only-tests": "^2.3.0", + "eslint-plugin-promise": "^4.1.1", + "express": "^4.16.3", + "glob": "^7.1.2", + "karma": "^4.0.1", + "karma-chai": "^0.1.0", + "karma-chrome-launcher": "^2.2.0", + "karma-mocha": "^1.3.0", + "karma-rollup-preprocessor": "^7.0.0", + "karma-sourcemap-loader": "^0.3.7", + "karma-typescript-es6-transform": "^4.0.0", + "karma-webpack": "^4.0.0-rc.6", + "mocha": "^5.2.0", + "mocha-chrome": "^1.1.0", + "mocha-junit-reporter": "^1.18.0", + "mocha-multi-reporters": "^1.1.7", + "npm-run-all": "^4.1.5", + "nyc": "^14.0.0", + "opn-cli": "^4.0.0", + "puppeteer": "^1.11.0", + "rimraf": "^2.6.2", + "rollup": "^1.16.3", + "rollup-plugin-alias": "^1.4.0", + "rollup-plugin-commonjs": "^10.0.0", + "rollup-plugin-json": "^4.0.0", + "rollup-plugin-multi-entry": "^2.1.0", + "rollup-plugin-node-resolve": "^5.0.2", + "rollup-plugin-resolve": "0.0.1-predev.1", + "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-visualizer": "^2.0.0", + "semver": "^5.5.0", + "shx": "^0.3.2", + "sinon": "^7.1.0", + "ts-loader": "^5.3.1", + "ts-node": "^7.0.1", + "typescript": "^3.2.2", + "uglify-js": "^3.4.9", + "webpack": "^4.16.3", + "webpack-cli": "^3.2.3", + "webpack-dev-middleware": "^3.1.2", + "xhr-mock": "^2.4.1", + "yarn": "^1.6.0" + } +} diff --git a/sdk/core/core-tracing-sample/rollup.config.ts b/sdk/core/core-tracing-sample/rollup.config.ts new file mode 100644 index 000000000000..e8d5cfe5c704 --- /dev/null +++ b/sdk/core/core-tracing-sample/rollup.config.ts @@ -0,0 +1,83 @@ +/// +/// +/// +/// +/// +/// + +import alias from "rollup-plugin-alias"; +import commonjs from "rollup-plugin-commonjs"; +import json from "rollup-plugin-json"; +import nodeResolve from "rollup-plugin-node-resolve"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import visualizer from "rollup-plugin-visualizer"; + +const banner = `/** @license @azure/core-http + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt and ThirdPartyNotices.txt in the project root for license information. + */`; + +/** + * @type {import('rollup').RollupFileOptions} + */ +const nodeConfig = { + input: "./es/lib/index.js", + external: [ + "axios", + "form-data", + "os", + "stream", + "tough-cookie", + "tslib", + "tunnel", + "uuid/v4", + "xml2js" + ], + output: { + file: "./dist/index.node.js", + format: "cjs", + sourcemap: true, + banner + }, + plugins: [ + nodeResolve({ + mainFields: ["module"] + }), + commonjs(), + sourcemaps(), + json(), + visualizer({ + filename: "dist/node-stats.html", + sourcemap: true + }) + ] +}; + +/** + * @type {import('rollup').RollupFileOptions} + */ +const browserConfig = { + input: "./es/lib/index.js", + external: [], + output: { + file: "./dist/index.browser.js", + format: "umd", + name: "Azure.Core.Tracing", + sourcemap: true, + banner + }, + plugins: [ + nodeResolve({ + mainFields: ["module"], + browser: true + }), + commonjs(), + sourcemaps(), + visualizer({ + filename: "dist/browser-stats.html", + sourcemap: true + }) + ] +}; + +export default [nodeConfig, browserConfig]; diff --git a/sdk/core/core-tracing-sample/tsconfig.es.json b/sdk/core/core-tracing-sample/tsconfig.es.json new file mode 100644 index 000000000000..dae744d8a4d6 --- /dev/null +++ b/sdk/core/core-tracing-sample/tsconfig.es.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "es6", + "outDir": "es" + } +} diff --git a/sdk/core/core-tracing-sample/tsconfig.json b/sdk/core/core-tracing-sample/tsconfig.json new file mode 100644 index 000000000000..6475133a6b78 --- /dev/null +++ b/sdk/core/core-tracing-sample/tsconfig.json @@ -0,0 +1,32 @@ +{ + "compilerOptions": { + "module": "commonjs", + "sourceMap": true, + "newLine": "LF", + "target": "es5", + "moduleResolution": "node", + "noImplicitReturns": true, + "noUnusedLocals": true, + "noUnusedParameters": false, + "outDir": "dist", + "strict": true, + "declaration": true, + "declarationMap": true, + "importHelpers": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "lib": [ + "dom", + "dom.iterable", + "es5", + "es6", + "es7", + "esnext", + "esnext.asynciterable", + "es2015.iterable" + ] + }, + "compileOnSave": true, + "exclude": ["node_modules"], + "include": ["./lib/**/*.ts", "./samples/**/*.ts", "./test/**/*.ts"] +} From d275d55d607242b7a45e2aa0f12f28186a2c8430 Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Thu, 25 Jul 2019 14:49:26 -0700 Subject: [PATCH 05/23] Revert samples --- sdk/core/core-tracing-sample/Changelog.md | 1 - sdk/core/core-tracing-sample/LICENSE.txt | 21 --- sdk/core/core-tracing-sample/README.md | 23 --- sdk/core/core-tracing-sample/lib/index.ts | 3 - sdk/core/core-tracing-sample/package.json | 132 ------------------ sdk/core/core-tracing-sample/rollup.config.ts | 83 ----------- sdk/core/core-tracing-sample/tsconfig.es.json | 7 - sdk/core/core-tracing-sample/tsconfig.json | 32 ----- 8 files changed, 302 deletions(-) delete mode 100644 sdk/core/core-tracing-sample/Changelog.md delete mode 100644 sdk/core/core-tracing-sample/LICENSE.txt delete mode 100644 sdk/core/core-tracing-sample/README.md delete mode 100644 sdk/core/core-tracing-sample/lib/index.ts delete mode 100644 sdk/core/core-tracing-sample/package.json delete mode 100644 sdk/core/core-tracing-sample/rollup.config.ts delete mode 100644 sdk/core/core-tracing-sample/tsconfig.es.json delete mode 100644 sdk/core/core-tracing-sample/tsconfig.json diff --git a/sdk/core/core-tracing-sample/Changelog.md b/sdk/core/core-tracing-sample/Changelog.md deleted file mode 100644 index 825c32f0d03d..000000000000 --- a/sdk/core/core-tracing-sample/Changelog.md +++ /dev/null @@ -1 +0,0 @@ -# Changelog diff --git a/sdk/core/core-tracing-sample/LICENSE.txt b/sdk/core/core-tracing-sample/LICENSE.txt deleted file mode 100644 index 21071075c245..000000000000 --- a/sdk/core/core-tracing-sample/LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/sdk/core/core-tracing-sample/README.md b/sdk/core/core-tracing-sample/README.md deleted file mode 100644 index e3e2ed80aa73..000000000000 --- a/sdk/core/core-tracing-sample/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# Azure Core HTTP client library for JS - -This is the core HTTP pipeline for Azure SDK JavaScript libraries which work in the browser and Node.js. This library is primarily intended to be used in code generated by [AutoRest](https://github.com/Azure/Autorest). - -## Getting started - -Coming soon.... - -## Contributing - -This project welcomes contributions and suggestions. Most contributions require you to agree to a -Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us -the rights to use your contribution. For details, visit https://cla.microsoft.com. - -When you submit a pull request, a CLA-bot will automatically determine whether you need to provide -a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions -provided by the bot. You will only need to do this once across all repos using our CLA. - -If you'd like to contribute to this library, please read the [contributing guide](../../../CONTRIBUTING.md) to learn more about how to build and test the code. - -This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). -For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or -contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments. diff --git a/sdk/core/core-tracing-sample/lib/index.ts b/sdk/core/core-tracing-sample/lib/index.ts deleted file mode 100644 index 74b3fd2f11a1..000000000000 --- a/sdk/core/core-tracing-sample/lib/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import tracing = require("@opencensus/nodejs"); -import { EnvironmentCredential } from "@azure/identity"; -import { ZipkinTraceExporter } from "@opencensus/exporter-zipkin"; diff --git a/sdk/core/core-tracing-sample/package.json b/sdk/core/core-tracing-sample/package.json deleted file mode 100644 index b11158883d11..000000000000 --- a/sdk/core/core-tracing-sample/package.json +++ /dev/null @@ -1,132 +0,0 @@ -{ - "name": "@azure/core-tracing-sample", - "sdk-type": "client", - "author": { - "name": "Microsoft Corporation", - "email": "azsdkteam@microsoft.com", - "url": "https://github.com/Azure/azure-sdk-for-js" - }, - "version": "1.0.0-preview.1", - "description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest", - "main": "./dist/index.node.js", - "module": "./es/index.js", - "types": "./es/index.d.ts", - "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "es/**/*.js", - "es/**/*.js.map", - "es/**/*.d.ts", - "es/**/*.d.ts.map", - "lib/**/*.ts", - "LICENSE", - "README.md", - "ThirdPartyNotices.txt" - ], - "license": "MIT", - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/tracing", - "repository": { - "type": "git", - "url": "git@github.com:Azure/azure-sdk-for-js.git" - }, - "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-js/issues" - }, - "scripts": { - "build": "run-p build:lib", - "build:lib": "run-s build:tsc", - "build:tsc": "tsc -p tsconfig.es.json", - "build:rollup": "rollup -c rollup.config.ts 2>&1", - "build:minify-browser": "uglifyjs -c -m --comments --source-map \"content='./dist/index.browser.js.map'\" -o ./dist/index.browser.min.js ./dist/index.browser.js" - }, - "sideEffects": false, - "nyc": { - "extension": [ - ".ts" - ], - "exclude": [ - "coverage/**/*", - "**/*.d.ts", - "**/*.js" - ], - "reporter": [ - "text", - "html", - "cobertura" - ], - "all": true - }, - "dependencies": { - "@azure/core-tracing": "1.0.0-preview.1", - "@opencensus/exporter-zipkin": "0.0.15", - "@opencensus/nodejs": "0.0.15", - "@types/continuation-local-storage": "^3.2.1" - }, - "devDependencies": { - "@azure/logger-js": "^1.0.2", - "@types/chai": "^4.1.6", - "@types/express": "^4.16.0", - "@types/glob": "^7.1.1", - "@types/karma": "^3.0.0", - "@types/mocha": "^5.2.5", - "@types/node": "^8.0.0", - "@types/semver": "^5.5.0", - "@types/sinon": "^5.0.5", - "@types/tough-cookie": "^2.3.3", - "@types/uuid": "^3.4.3", - "@types/webpack": "^4.4.13", - "@types/webpack-dev-middleware": "^2.0.2", - "@types/xml2js": "^0.4.3", - "@typescript-eslint/eslint-plugin": "^1.11.0", - "@typescript-eslint/parser": "^1.11.0", - "abortcontroller-polyfill": "^1.1.9", - "axios-mock-adapter": "^1.16.0", - "chai": "^4.2.0", - "eslint": "^5.16.0", - "eslint-config-prettier": "^4.2.0", - "eslint-detailed-reporter": "^0.8.0", - "eslint-plugin-no-null": "^1.0.2", - "eslint-plugin-no-only-tests": "^2.3.0", - "eslint-plugin-promise": "^4.1.1", - "express": "^4.16.3", - "glob": "^7.1.2", - "karma": "^4.0.1", - "karma-chai": "^0.1.0", - "karma-chrome-launcher": "^2.2.0", - "karma-mocha": "^1.3.0", - "karma-rollup-preprocessor": "^7.0.0", - "karma-sourcemap-loader": "^0.3.7", - "karma-typescript-es6-transform": "^4.0.0", - "karma-webpack": "^4.0.0-rc.6", - "mocha": "^5.2.0", - "mocha-chrome": "^1.1.0", - "mocha-junit-reporter": "^1.18.0", - "mocha-multi-reporters": "^1.1.7", - "npm-run-all": "^4.1.5", - "nyc": "^14.0.0", - "opn-cli": "^4.0.0", - "puppeteer": "^1.11.0", - "rimraf": "^2.6.2", - "rollup": "^1.16.3", - "rollup-plugin-alias": "^1.4.0", - "rollup-plugin-commonjs": "^10.0.0", - "rollup-plugin-json": "^4.0.0", - "rollup-plugin-multi-entry": "^2.1.0", - "rollup-plugin-node-resolve": "^5.0.2", - "rollup-plugin-resolve": "0.0.1-predev.1", - "rollup-plugin-sourcemaps": "^0.4.2", - "rollup-plugin-visualizer": "^2.0.0", - "semver": "^5.5.0", - "shx": "^0.3.2", - "sinon": "^7.1.0", - "ts-loader": "^5.3.1", - "ts-node": "^7.0.1", - "typescript": "^3.2.2", - "uglify-js": "^3.4.9", - "webpack": "^4.16.3", - "webpack-cli": "^3.2.3", - "webpack-dev-middleware": "^3.1.2", - "xhr-mock": "^2.4.1", - "yarn": "^1.6.0" - } -} diff --git a/sdk/core/core-tracing-sample/rollup.config.ts b/sdk/core/core-tracing-sample/rollup.config.ts deleted file mode 100644 index e8d5cfe5c704..000000000000 --- a/sdk/core/core-tracing-sample/rollup.config.ts +++ /dev/null @@ -1,83 +0,0 @@ -/// -/// -/// -/// -/// -/// - -import alias from "rollup-plugin-alias"; -import commonjs from "rollup-plugin-commonjs"; -import json from "rollup-plugin-json"; -import nodeResolve from "rollup-plugin-node-resolve"; -import sourcemaps from "rollup-plugin-sourcemaps"; -import visualizer from "rollup-plugin-visualizer"; - -const banner = `/** @license @azure/core-http - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt and ThirdPartyNotices.txt in the project root for license information. - */`; - -/** - * @type {import('rollup').RollupFileOptions} - */ -const nodeConfig = { - input: "./es/lib/index.js", - external: [ - "axios", - "form-data", - "os", - "stream", - "tough-cookie", - "tslib", - "tunnel", - "uuid/v4", - "xml2js" - ], - output: { - file: "./dist/index.node.js", - format: "cjs", - sourcemap: true, - banner - }, - plugins: [ - nodeResolve({ - mainFields: ["module"] - }), - commonjs(), - sourcemaps(), - json(), - visualizer({ - filename: "dist/node-stats.html", - sourcemap: true - }) - ] -}; - -/** - * @type {import('rollup').RollupFileOptions} - */ -const browserConfig = { - input: "./es/lib/index.js", - external: [], - output: { - file: "./dist/index.browser.js", - format: "umd", - name: "Azure.Core.Tracing", - sourcemap: true, - banner - }, - plugins: [ - nodeResolve({ - mainFields: ["module"], - browser: true - }), - commonjs(), - sourcemaps(), - visualizer({ - filename: "dist/browser-stats.html", - sourcemap: true - }) - ] -}; - -export default [nodeConfig, browserConfig]; diff --git a/sdk/core/core-tracing-sample/tsconfig.es.json b/sdk/core/core-tracing-sample/tsconfig.es.json deleted file mode 100644 index dae744d8a4d6..000000000000 --- a/sdk/core/core-tracing-sample/tsconfig.es.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "es6", - "outDir": "es" - } -} diff --git a/sdk/core/core-tracing-sample/tsconfig.json b/sdk/core/core-tracing-sample/tsconfig.json deleted file mode 100644 index 6475133a6b78..000000000000 --- a/sdk/core/core-tracing-sample/tsconfig.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "compilerOptions": { - "module": "commonjs", - "sourceMap": true, - "newLine": "LF", - "target": "es5", - "moduleResolution": "node", - "noImplicitReturns": true, - "noUnusedLocals": true, - "noUnusedParameters": false, - "outDir": "dist", - "strict": true, - "declaration": true, - "declarationMap": true, - "importHelpers": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "lib": [ - "dom", - "dom.iterable", - "es5", - "es6", - "es7", - "esnext", - "esnext.asynciterable", - "es2015.iterable" - ] - }, - "compileOnSave": true, - "exclude": ["node_modules"], - "include": ["./lib/**/*.ts", "./samples/**/*.ts", "./test/**/*.ts"] -} From 6be74efaa70375297fa2496f6ff4fcdc4ce8c2ad Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Thu, 25 Jul 2019 15:30:49 -0700 Subject: [PATCH 06/23] Changes to make it work with sample --- sdk/core/core-tracing/package.json | 42 +++++++++++++++++++++----- sdk/core/core-tracing/rollup.config.ts | 6 ++-- sdk/core/core-tracing/tsconfig.json | 2 +- 3 files changed, 39 insertions(+), 11 deletions(-) diff --git a/sdk/core/core-tracing/package.json b/sdk/core/core-tracing/package.json index a17c43055130..e604f9d0bcb1 100644 --- a/sdk/core/core-tracing/package.json +++ b/sdk/core/core-tracing/package.json @@ -1,13 +1,16 @@ { "name": "@azure/core-tracing", + "version": "1.0.0-preview.1", + "description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest", "sdk-type": "client", + "main": "./dist/index.node.js", + "module": "./es/index.js", + "types": "./es/index.d.ts", "author": { "name": "Microsoft Corporation", "email": "azsdkteam@microsoft.com", "url": "https://github.com/Azure/azure-sdk-for-js" }, - "version": "1.0.0-preview.1", - "description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest", "tags": [ "isomorphic", "browser", @@ -26,9 +29,6 @@ "autorest", "clientruntime" ], - "main": "./dist/index.node.js", - "module": "./es/index.js", - "types": "./es/index.d.ts", "files": [ "dist/**/*.js", "dist/**/*.js.map", @@ -51,11 +51,39 @@ "url": "http://github.com/Azure/azure-sdk-for-js/issues" }, "scripts": { + "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", "build": "run-p build:lib", - "build:lib": "run-s build:tsc", + "build:lib": "run-s build:tsc build:rollup build:minify-browser", + "build:scripts": "tsc -p ./.scripts/", + "build:test": "run-s build build:test-browser", "build:tsc": "tsc -p tsconfig.es.json", "build:rollup": "rollup -c rollup.config.ts 2>&1", - "build:minify-browser": "uglifyjs -c -m --comments --source-map \"content='./dist/index.browser.js.map'\" -o ./dist/index.browser.min.js ./dist/index.browser.js" + "build:minify-browser": "uglifyjs -c -m --comments --source-map \"content='./dist/index.browser.js.map'\" -o ./dist/index.browser.min.js ./dist/index.browser.js", + "build:test-browser": "webpack --config webpack.testconfig.ts", + "check-format": "prettier --list-different --config ../../.prettierrc.json \"lib/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "clean": "rimraf ./es ./dist", + "format": "prettier --write --config ../../.prettierrc.json \"lib/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "integration-test:browser": "echo skipped", + "integration-test:node": "echo skipped", + "integration-test": "npm run integration-test:node && npm run integration-test:browser", + "lint:fix": "eslint \"lib/**/*.ts\" \"test/**/*.ts\" -c ../../.eslintrc.json --fix --fix-type [problem,suggestion]", + "lint": "eslint -c ../../.eslintrc.json lib test --ext .ts -f node_modules/eslint-detailed-reporter/lib/detailed.js -o core-http-lintReport.html || exit 0", + "pack": "npm pack 2>&1", + "prebuild": "npm run clean", + "test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser", + "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", + "test": "npm run build:test && npm run unit-test && npm run integration-test", + "unit-test": "npm run unit-test:node && npm run unit-test:browser", + "unit-test:browser": "node ./node_modules/karma/bin/karma start karma.conf.ts --browsers ChromeNoSecurity --single-run", + "unit-test:node": "nyc mocha", + "check:packagejsonversion": "ts-node ./.scripts/checkPackageJsonVersion.ts", + "check:foronlycalls": "ts-node ./.scripts/checkForOnlyCalls.ts", + "check:everything": "ts-node ./.scripts/checkEverything.ts", + "dep:autorest.typescript": "npx ts-node .scripts/testDependentProjects.ts autorest.typescript 'gulp build' 'gulp regenerate' 'npm run local'", + "dep:ms-rest-azure-js": "npx ts-node .scripts/testDependentProjects.ts ms-rest-azure-js", + "publish-preview": "mocha --no-colors && shx rm -rf dist/test && node ./.scripts/publish", + "local": "ts-node ./.scripts/local.ts", + "latest": "ts-node ./.scripts/latest.ts" }, "sideEffects": false, "nyc": { diff --git a/sdk/core/core-tracing/rollup.config.ts b/sdk/core/core-tracing/rollup.config.ts index e8d5cfe5c704..c8edfb550921 100644 --- a/sdk/core/core-tracing/rollup.config.ts +++ b/sdk/core/core-tracing/rollup.config.ts @@ -12,7 +12,7 @@ import nodeResolve from "rollup-plugin-node-resolve"; import sourcemaps from "rollup-plugin-sourcemaps"; import visualizer from "rollup-plugin-visualizer"; -const banner = `/** @license @azure/core-http +const banner = `/** @license @azure/core-tracing * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt and ThirdPartyNotices.txt in the project root for license information. */`; @@ -21,7 +21,7 @@ const banner = `/** @license @azure/core-http * @type {import('rollup').RollupFileOptions} */ const nodeConfig = { - input: "./es/lib/index.js", + input: "./es/index.js", external: [ "axios", "form-data", @@ -57,7 +57,7 @@ const nodeConfig = { * @type {import('rollup').RollupFileOptions} */ const browserConfig = { - input: "./es/lib/index.js", + input: "./es/index.js", external: [], output: { file: "./dist/index.browser.js", diff --git a/sdk/core/core-tracing/tsconfig.json b/sdk/core/core-tracing/tsconfig.json index 6475133a6b78..38d1521cdf37 100644 --- a/sdk/core/core-tracing/tsconfig.json +++ b/sdk/core/core-tracing/tsconfig.json @@ -8,7 +8,7 @@ "noImplicitReturns": true, "noUnusedLocals": true, "noUnusedParameters": false, - "outDir": "dist", + "outDir": "./dist" /* Redirect output structure to the directory. */, "strict": true, "declaration": true, "declarationMap": true, From 2ccba3631fbecc6790de4f25bb8cf7d2c8250b09 Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Thu, 25 Jul 2019 23:13:47 -0700 Subject: [PATCH 07/23] Further changes --- .../lib/plugins/noop/noOpTracePlugin.ts | 6 ++++ .../opencensus/openCensusTracePlugin.ts | 10 ++++-- sdk/core/core-tracing/lib/tracerProxy.ts | 34 ++++++------------- sdk/core/core-tracing/tsconfig.json | 2 +- sdk/keyvault/keyvault-keys/src/index.ts | 28 ++++++++------- 5 files changed, 42 insertions(+), 38 deletions(-) diff --git a/sdk/core/core-tracing/lib/plugins/noop/noOpTracePlugin.ts b/sdk/core/core-tracing/lib/plugins/noop/noOpTracePlugin.ts index ef706aad28ce..9477850862b3 100644 --- a/sdk/core/core-tracing/lib/plugins/noop/noOpTracePlugin.ts +++ b/sdk/core/core-tracing/lib/plugins/noop/noOpTracePlugin.ts @@ -3,6 +3,12 @@ import { Span } from "../../interfaces/span"; import { SpanOptions } from "../../interfaces/SpanOptions"; export class NoOpTracePlugin implements Tracer { + private _tracer: any; + + public constructor(tracer: any) { + this._tracer = tracer; + } + getCurrentSpan(): Span { throw new Error("Method not implemented."); } diff --git a/sdk/core/core-tracing/lib/plugins/opencensus/openCensusTracePlugin.ts b/sdk/core/core-tracing/lib/plugins/opencensus/openCensusTracePlugin.ts index 4af3bbeb496e..92c52efb0895 100644 --- a/sdk/core/core-tracing/lib/plugins/opencensus/openCensusTracePlugin.ts +++ b/sdk/core/core-tracing/lib/plugins/opencensus/openCensusTracePlugin.ts @@ -1,12 +1,18 @@ import { Tracer } from "../../interfaces/tracer"; import { SpanOptions } from "../../interfaces/SpanOptions"; import { Span } from "../../interfaces/span"; -import { TracerProxy } from "../../tracerProxy"; +// import { TracerProxy } from "../../tracerProxy"; import { OpenCensusSpanPlugin } from "../opencensus/openCensusSpanPlugin"; export class OpenCensusTracePlugin implements Tracer { + private _tracer: any; + + public constructor(tracer: any) { + this._tracer = tracer; + } + startSpan(name: string, options?: SpanOptions): Span { - const span = TracerProxy.getTracer().startChildSpan({ + const span = this._tracer.startChildSpan({ name: name, childOf: options ? options.parent : undefined }); diff --git a/sdk/core/core-tracing/lib/tracerProxy.ts b/sdk/core/core-tracing/lib/tracerProxy.ts index 80527d145c0b..627acfe682de 100644 --- a/sdk/core/core-tracing/lib/tracerProxy.ts +++ b/sdk/core/core-tracing/lib/tracerProxy.ts @@ -1,38 +1,26 @@ import { SupportedPlugins } from "./utils/supportedPlugins"; -import { SpanOptions } from "./interfaces/SpanOptions"; -import { Span } from "./interfaces/span"; import { OpenCensusTracePlugin } from "./plugins/opencensus/openCensusTracePlugin"; import { NoOpTracePlugin } from "./plugins/noop/noOpTracePlugin"; import { TracerNoOpImpl } from "./implementations/noop/tracerNoOpImpl"; +import { Tracer } from "./interfaces/tracer"; export class TracerProxy { - private static _tracer: any; - private static _tracerPlugin: SupportedPlugins; + private static _tracerPlugin: Tracer; private constructor() {} - public static setTracer(tracer: any, tracerPlugin: SupportedPlugins) { - TracerProxy._tracer = tracer; - TracerProxy._tracerPlugin = tracerPlugin; - } - - public static getTracer() { - if (!TracerProxy._tracer) { - TracerProxy._tracer = new TracerNoOpImpl(); - TracerProxy._tracerPlugin = SupportedPlugins.NOOP; + public static setTracer(tracer: any, tracerPluginType: SupportedPlugins) { + if (tracerPluginType === SupportedPlugins.OPENCENSUS) { + TracerProxy._tracerPlugin = new OpenCensusTracePlugin(tracer); + } else { + TracerProxy._tracerPlugin = new NoOpTracePlugin(tracer); } - return TracerProxy._tracer; } - public static startSpan(spanName: string, options: SpanOptions): Span { - if (TracerProxy._tracerPlugin === SupportedPlugins.OPENCENSUS) { - const openCensusTracerPlugin = new OpenCensusTracePlugin(); - const openCensusSpanPlugin = openCensusTracerPlugin.startSpan(spanName, options); - return openCensusSpanPlugin; - } else { - const noOpTracerPlugin = new NoOpTracePlugin(); - const noOpSpanPlugin = noOpTracerPlugin.startSpan(spanName, options); - return noOpSpanPlugin; + public static getTracer() { + if (!TracerProxy._tracerPlugin) { + TracerProxy._tracerPlugin = new NoOpTracePlugin(new TracerNoOpImpl()); } + return TracerProxy._tracerPlugin; } } diff --git a/sdk/core/core-tracing/tsconfig.json b/sdk/core/core-tracing/tsconfig.json index 38d1521cdf37..1dc8d1c56f7f 100644 --- a/sdk/core/core-tracing/tsconfig.json +++ b/sdk/core/core-tracing/tsconfig.json @@ -6,7 +6,7 @@ "target": "es5", "moduleResolution": "node", "noImplicitReturns": true, - "noUnusedLocals": true, + "noUnusedLocals": false, "noUnusedParameters": false, "outDir": "./dist" /* Redirect output structure to the directory. */, "strict": true, diff --git a/sdk/keyvault/keyvault-keys/src/index.ts b/sdk/keyvault/keyvault-keys/src/index.ts index 6408422b3451..895a75b07df8 100644 --- a/sdk/keyvault/keyvault-keys/src/index.ts +++ b/sdk/keyvault/keyvault-keys/src/index.ts @@ -192,7 +192,7 @@ export class KeysClient { this.pipeline.requestPolicyFactories; - this.client = new KeyVaultClient(credential, this.pipeline); + this.client = new KeyVaultClient(credential, this.pipeline); } private static getUserAgentString(telemetry?: TelemetryOptions): string { @@ -499,11 +499,13 @@ export class KeysClient { * @returns Promise */ public async getKey(name: string, options?: GetKeyOptions): Promise { - const span:Span = TracerProxy.getTracer().startSpan( - "getKeyMethod", - options ? - options.requestOptions ? options.requestOptions["spanOptions"] : undefined - : undefined + const span: Span = TracerProxy.getTracer().startSpan( + "getKeyMethod", + options + ? options.requestOptions + ? options.requestOptions["spanOptions"] + : undefined + : undefined ); span.start(); @@ -515,7 +517,7 @@ export class KeysClient { ); span.end(); - + return this.getKeyFromKeyBundle(response); } @@ -765,11 +767,13 @@ export class KeysClient { public listKeys( options?: ListKeysOptions ): PagedAsyncIterableIterator { - const span:Span = TracerProxy.getTracer().startSpan( - "listKeysMethod", - options ? - options.requestOptions ? options.requestOptions["spanOptions"] : undefined - : undefined + const span: Span = TracerProxy.getTracer().startSpan( + "listKeysMethod", + options + ? options.requestOptions + ? options.requestOptions["spanOptions"] + : undefined + : undefined ); span.start(); From 444dd203c22b2460a1a16e5c43ff71d63d093b9d Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Fri, 26 Jul 2019 10:27:34 -0700 Subject: [PATCH 08/23] Add spanOptions as sep field in msRequestoptions --- common/config/rush/pnpm-lock.yaml | 2 +- sdk/core/core-http/lib/webResource.ts | 139 +++++++++++++----- sdk/core/core-http/package.json | 1 + .../opencensus/openCensusSpanPlugin.ts | 22 ++- sdk/keyvault/keyvault-keys/src/index.ts | 4 +- 5 files changed, 121 insertions(+), 47 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index e09b6c5ad18f..ac6a30348de9 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -9947,7 +9947,7 @@ packages: dev: false name: '@rush-temp/core-http' resolution: - integrity: sha512-Fycn4IMExj6fHlcivPijmzjgNVpZb3IYFrAHGgrIHOCKi+4Z36IQaI2YsakxKwFmMqFvb2iHX7H2m3gSsp/xcQ== + integrity: sha512-3VuIPnMde24Iibyf06vLLg0nyPy15nMyS3U7vtV2xWsB3Lt9QNSwo7XKjPyyCXbD0zQIYLxNiytbgT8//No2Lw== tarball: 'file:projects/core-http.tgz' version: 0.0.0 'file:projects/core-paging.tgz': diff --git a/sdk/core/core-http/lib/webResource.ts b/sdk/core/core-http/lib/webResource.ts index 17ec3eef3ea2..80a9c8698b06 100644 --- a/sdk/core/core-http/lib/webResource.ts +++ b/sdk/core/core-http/lib/webResource.ts @@ -8,9 +8,23 @@ import { generateUuid } from "./util/utils"; import { HttpOperationResponse } from "./httpOperationResponse"; import { OperationResponse } from "./operationResponse"; import { ProxySettings } from "./serviceClient"; - -export type HttpMethods = "GET" | "PUT" | "POST" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS" | "TRACE"; -export type HttpRequestBody = Blob | string | ArrayBuffer | ArrayBufferView | (() => NodeJS.ReadableStream); +import { SpanOptions } from "@azure/core-tracing"; + +export type HttpMethods = + | "GET" + | "PUT" + | "POST" + | "DELETE" + | "PATCH" + | "HEAD" + | "OPTIONS" + | "TRACE"; +export type HttpRequestBody = + | Blob + | string + | ArrayBuffer + | ArrayBufferView + | (() => NodeJS.ReadableStream); /** * Fired in response to upload or download progress. @@ -19,7 +33,7 @@ export type TransferProgressEvent = { /** * The number of bytes loaded so far. */ - loadedBytes: number + loadedBytes: number; }; /** @@ -28,8 +42,16 @@ export type TransferProgressEvent = { */ export interface AbortSignalLike { readonly aborted: boolean; - addEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void; - removeEventListener(type: "abort", listener: (this: AbortSignalLike, ev: any) => any, options?: any): void; + addEventListener( + type: "abort", + listener: (this: AbortSignalLike, ev: any) => any, + options?: any + ): void; + removeEventListener( + type: "abort", + listener: (this: AbortSignalLike, ev: any) => any, + options?: any + ): void; } /** @@ -59,9 +81,12 @@ export class WebResource { * HttpOperationResponse combination. If this is undefined, then a simple status code lookup will * be used. */ - operationResponseGetter?: (operationSpec: OperationSpec, response: HttpOperationResponse) => (undefined | OperationResponse); + operationResponseGetter?: ( + operationSpec: OperationSpec, + response: HttpOperationResponse + ) => undefined | OperationResponse; formData?: any; - query?: { [key: string]: any; }; + query?: { [key: string]: any }; operationSpec?: OperationSpec; withCredentials: boolean; timeout: number; @@ -79,20 +104,20 @@ export class WebResource { url?: string, method?: HttpMethods, body?: any, - query?: { [key: string]: any; }, - headers?: { [key: string]: any; } | HttpHeaders, + query?: { [key: string]: any }, + headers?: { [key: string]: any } | HttpHeaders, streamResponseBody?: boolean, withCredentials?: boolean, abortSignal?: AbortSignalLike, timeout?: number, onUploadProgress?: (progress: TransferProgressEvent) => void, onDownloadProgress?: (progress: TransferProgressEvent) => void, - proxySettings?: ProxySettings) { - + proxySettings?: ProxySettings + ) { this.streamResponseBody = streamResponseBody; this.url = url || ""; this.method = method || "GET"; - this.headers = (headers instanceof HttpHeaders ? headers : new HttpHeaders(headers)); + this.headers = headers instanceof HttpHeaders ? headers : new HttpHeaders(headers); this.body = body; this.query = query; this.formData = undefined; @@ -133,18 +158,22 @@ export class WebResource { } if (options.url && options.pathTemplate) { - throw new Error("options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them."); + throw new Error( + "options.url and options.pathTemplate are mutually exclusive. Please provide exactly one of them." + ); } - - if ((options.pathTemplate == undefined || typeof options.pathTemplate.valueOf() !== "string") && (options.url == undefined || typeof options.url.valueOf() !== "string")) { + if ( + (options.pathTemplate == undefined || typeof options.pathTemplate.valueOf() !== "string") && + (options.url == undefined || typeof options.url.valueOf() !== "string") + ) { throw new Error("Please provide exactly one of options.pathTemplate or options.url."); } // set the url if it is provided. if (options.url) { if (typeof options.url !== "string") { - throw new Error("options.url must be of type \"string\"."); + throw new Error('options.url must be of type "string".'); } this.url = options.url; } @@ -153,35 +182,55 @@ export class WebResource { if (options.method) { const validMethods = ["GET", "PUT", "HEAD", "DELETE", "OPTIONS", "POST", "PATCH", "TRACE"]; if (validMethods.indexOf(options.method.toUpperCase()) === -1) { - throw new Error("The provided method \"" + options.method + "\" is invalid. Supported HTTP methods are: " + JSON.stringify(validMethods)); + throw new Error( + 'The provided method "' + + options.method + + '" is invalid. Supported HTTP methods are: ' + + JSON.stringify(validMethods) + ); } } - this.method = (options.method.toUpperCase() as HttpMethods); + this.method = options.method.toUpperCase() as HttpMethods; // construct the url if path template is provided if (options.pathTemplate) { const { pathTemplate, pathParameters } = options; if (typeof pathTemplate !== "string") { - throw new Error("options.pathTemplate must be of type \"string\"."); + throw new Error('options.pathTemplate must be of type "string".'); } if (!options.baseUrl) { options.baseUrl = "https://management.azure.com"; } const baseUrl = options.baseUrl; - let url = baseUrl + (baseUrl.endsWith("/") ? "" : "/") + (pathTemplate.startsWith("/") ? pathTemplate.slice(1) : pathTemplate); - const segments = url.match(/({\w*\s*\w*})/ig); + let url = + baseUrl + + (baseUrl.endsWith("/") ? "" : "/") + + (pathTemplate.startsWith("/") ? pathTemplate.slice(1) : pathTemplate); + const segments = url.match(/({\w*\s*\w*})/gi); if (segments && segments.length) { if (!pathParameters) { - throw new Error(`pathTemplate: ${pathTemplate} has been provided. Hence, options.pathParameters must also be provided.`); + throw new Error( + `pathTemplate: ${pathTemplate} has been provided. Hence, options.pathParameters must also be provided.` + ); } - segments.forEach(function (item) { + segments.forEach(function(item) { const pathParamName = item.slice(1, -1); const pathParam = (pathParameters as { [key: string]: any })[pathParamName]; - if (pathParam === null || pathParam === undefined || !(typeof pathParam === "string" || typeof pathParam === "object")) { - throw new Error(`pathTemplate: ${pathTemplate} contains the path parameter ${pathParamName}` + - ` however, it is not present in ${pathParameters} - ${JSON.stringify(pathParameters, undefined, 2)}.` + - `The value of the path parameter can either be a "string" of the form { ${pathParamName}: "some sample value" } or ` + - `it can be an "object" of the form { "${pathParamName}": { value: "some sample value", skipUrlEncoding: true } }.`); + if ( + pathParam === null || + pathParam === undefined || + !(typeof pathParam === "string" || typeof pathParam === "object") + ) { + throw new Error( + `pathTemplate: ${pathTemplate} contains the path parameter ${pathParamName}` + + ` however, it is not present in ${pathParameters} - ${JSON.stringify( + pathParameters, + undefined, + 2 + )}.` + + `The value of the path parameter can either be a "string" of the form { ${pathParamName}: "some sample value" } or ` + + `it can be an "object" of the form { "${pathParamName}": { value: "some sample value", skipUrlEncoding: true } }.` + ); } if (typeof pathParam.valueOf() === "string") { @@ -190,7 +239,9 @@ export class WebResource { if (typeof pathParam.valueOf() === "object") { if (!pathParam.value) { - throw new Error(`options.pathParameters[${pathParamName}] is of type "object" but it does not contain a "value" property.`); + throw new Error( + `options.pathParameters[${pathParamName}] is of type "object" but it does not contain a "value" property.` + ); } if (pathParam.skipUrlEncoding) { url = url.replace(item, pathParam.value); @@ -207,9 +258,11 @@ export class WebResource { if (options.queryParameters) { const queryParameters = options.queryParameters; if (typeof queryParameters !== "object") { - throw new Error(`options.queryParameters must be of type object. It should be a JSON object ` + - `of "query-parameter-name" as the key and the "query-parameter-value" as the value. ` + - `The "query-parameter-value" may be fo type "string" or an "object" of the form { value: "query-parameter-value", skipUrlEncoding: true }.`); + throw new Error( + `options.queryParameters must be of type object. It should be a JSON object ` + + `of "query-parameter-name" as the key and the "query-parameter-value" as the value. ` + + `The "query-parameter-value" may be fo type "string" or an "object" of the form { value: "query-parameter-value", skipUrlEncoding: true }.` + ); } // append question mark if it is not present in the url if (this.url && this.url.indexOf("?") === -1) { @@ -225,10 +278,11 @@ export class WebResource { if (typeof queryParam === "string") { queryParams.push(queryParamName + "=" + encodeURIComponent(queryParam)); this.query[queryParamName] = encodeURIComponent(queryParam); - } - else if (typeof queryParam === "object") { + } else if (typeof queryParam === "object") { if (!queryParam.value) { - throw new Error(`options.queryParameters[${queryParamName}] is of type "object" but it does not contain a "value" property.`); + throw new Error( + `options.queryParameters[${queryParamName}] is of type "object" but it does not contain a "value" property.` + ); } if (queryParam.skipUrlEncoding) { queryParams.push(queryParamName + "=" + queryParam.value); @@ -239,7 +293,7 @@ export class WebResource { } } } - }// end-of-for + } // end-of-for // append the queryString this.url += queryParams.join("&"); } @@ -278,7 +332,11 @@ export class WebResource { } } else { if (options.serializationMapper) { - this.body = new Serializer(options.mappers).serialize(options.serializationMapper, options.body, "requestBody"); + this.body = new Serializer(options.mappers).serialize( + options.serializationMapper, + options.body, + "requestBody" + ); } if (!options.disableJsonStringifyOnBody) { this.body = JSON.stringify(options.body); @@ -309,7 +367,8 @@ export class WebResource { this.abortSignal, this.timeout, this.onUploadProgress, - this.onDownloadProgress); + this.onDownloadProgress + ); if (this.formData) { result.formData = this.formData; @@ -460,5 +519,7 @@ export interface RequestOptionsBase { */ onDownloadProgress?: (progress: TransferProgressEvent) => void; + spanOptions?: SpanOptions | undefined; + [key: string]: any; } diff --git a/sdk/core/core-http/package.json b/sdk/core/core-http/package.json index cc837b10867f..7adbbd5c9e6f 100644 --- a/sdk/core/core-http/package.json +++ b/sdk/core/core-http/package.json @@ -110,6 +110,7 @@ "all": true }, "dependencies": { + "@azure/core-tracing": "1.0.0-preview.1", "@azure/core-auth": "1.0.0-preview.1", "@types/tunnel": "^0.0.0", "axios": "^0.19.0", diff --git a/sdk/core/core-tracing/lib/plugins/opencensus/openCensusSpanPlugin.ts b/sdk/core/core-tracing/lib/plugins/opencensus/openCensusSpanPlugin.ts index cbb7e02ca885..c63f75a36444 100644 --- a/sdk/core/core-tracing/lib/plugins/opencensus/openCensusSpanPlugin.ts +++ b/sdk/core/core-tracing/lib/plugins/opencensus/openCensusSpanPlugin.ts @@ -4,9 +4,9 @@ import { Attributes } from "../../interfaces/attributes"; import { Status } from "../../interfaces/status"; export class OpenCensusSpanPlugin implements Span { - private _span: Span; + private _span: any; - constructor(span: Span) { + constructor(span: any) { this._span = span; } @@ -21,24 +21,36 @@ export class OpenCensusSpanPlugin implements Span { context(): SpanContext { throw new Error("Method not implemented."); } + setAttribute(key: string, value: unknown): this { - throw new Error("Method not implemented."); + this._span.addAttribute(key, value); + return this; } + setAttributes(attributes: Attributes): this { throw new Error("Method not implemented."); } + addEvent(name: string, attributes?: Attributes): this { throw new Error("Method not implemented."); } + addLink(spanContext: SpanContext, attributes?: Attributes): this { - throw new Error("Method not implemented."); + // Since there is no way to specify the link relationship + // It is set as Unspecified = 0 + this._span.addLink(spanContext.traceId, spanContext.spanId, 0, attributes); + return this; } + setStatus(status: Status): this { - throw new Error("Method not implemented."); + this._span.setStatus(status.code, status.message); + return this; } + updateName(name: string): this { throw new Error("Method not implemented."); } + isRecordingEvents(): boolean { throw new Error("Method not implemented."); } diff --git a/sdk/keyvault/keyvault-keys/src/index.ts b/sdk/keyvault/keyvault-keys/src/index.ts index 895a75b07df8..279b650e7042 100644 --- a/sdk/keyvault/keyvault-keys/src/index.ts +++ b/sdk/keyvault/keyvault-keys/src/index.ts @@ -503,7 +503,7 @@ export class KeysClient { "getKeyMethod", options ? options.requestOptions - ? options.requestOptions["spanOptions"] + ? options.requestOptions.spanOptions : undefined : undefined ); @@ -771,7 +771,7 @@ export class KeysClient { "listKeysMethod", options ? options.requestOptions - ? options.requestOptions["spanOptions"] + ? options.requestOptions.spanOptions : undefined : undefined ); From c4a8394351f8533ca42a819c8fe89b3fb2e7595a Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Fri, 26 Jul 2019 13:01:35 -0700 Subject: [PATCH 09/23] Adding serializing to the span options --- .../keyvault-keys/src/core/keyVaultClient.ts | 6 +++--- .../keyvault-keys/src/core/models/parameters.ts | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/sdk/keyvault/keyvault-keys/src/core/keyVaultClient.ts b/sdk/keyvault/keyvault-keys/src/core/keyVaultClient.ts index c2b8feed53e3..cc1ed344c6ac 100644 --- a/sdk/keyvault/keyvault-keys/src/core/keyVaultClient.ts +++ b/sdk/keyvault/keyvault-keys/src/core/keyVaultClient.ts @@ -5371,7 +5371,7 @@ const getKeyOperationSpec: coreHttp.OperationSpec = { path: "keys/{key-name}/{key-version}", urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1, Parameters.keyVersion], queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.acceptLanguage, Parameters.spanOptions], responses: { 200: { bodyMapper: Mappers.KeyBundle @@ -5405,7 +5405,7 @@ const getKeysOperationSpec: coreHttp.OperationSpec = { path: "keys", urlParameters: [Parameters.vaultBaseUrl], queryParameters: [Parameters.maxresults, Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.acceptLanguage, Parameters.spanOptions], responses: { 200: { bodyMapper: Mappers.KeyListResult @@ -6512,7 +6512,7 @@ const getDeletedStorageAccountsOperationSpec: coreHttp.OperationSpec = { path: "deletedstorage", urlParameters: [Parameters.vaultBaseUrl], queryParameters: [Parameters.maxresults, Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.acceptLanguage, Parameters.spanOptions], responses: { 200: { bodyMapper: Mappers.DeletedStorageListResult diff --git a/sdk/keyvault/keyvault-keys/src/core/models/parameters.ts b/sdk/keyvault/keyvault-keys/src/core/models/parameters.ts index b4c971b3b708..e1f2a02dd7ef 100644 --- a/sdk/keyvault/keyvault-keys/src/core/models/parameters.ts +++ b/sdk/keyvault/keyvault-keys/src/core/models/parameters.ts @@ -20,6 +20,17 @@ export const acceptLanguage: coreHttp.OperationParameter = { } } }; + +export const spanOptions: coreHttp.OperationParameter = { + parameterPath: ["options", "requestOptions", "spanOptions"], + mapper: { + serializedName: "span-options", + type: { + name: "Object" + } + } +}; + export const apiVersion: coreHttp.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { @@ -30,6 +41,7 @@ export const apiVersion: coreHttp.OperationQueryParameter = { } } }; + export const certificateName0: coreHttp.OperationURLParameter = { parameterPath: "certificateName", mapper: { From fdee6b007785a8c334e8806824164f58104085e4 Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Fri, 26 Jul 2019 13:17:03 -0700 Subject: [PATCH 10/23] Adding parent child relationship to the span --- sdk/keyvault/keyvault-keys/src/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk/keyvault/keyvault-keys/src/index.ts b/sdk/keyvault/keyvault-keys/src/index.ts index 279b650e7042..6dc955c0c8bd 100644 --- a/sdk/keyvault/keyvault-keys/src/index.ts +++ b/sdk/keyvault/keyvault-keys/src/index.ts @@ -507,6 +507,9 @@ export class KeysClient { : undefined : undefined ); + if (options && options.requestOptions && options.requestOptions.spanOptions) { + options.requestOptions.spanOptions.parent = span; + } span.start(); const response = await this.client.getKey( @@ -775,6 +778,9 @@ export class KeysClient { : undefined : undefined ); + if (options && options.requestOptions && options.requestOptions.spanOptions) { + options.requestOptions.spanOptions.parent = span; + } span.start(); const iter = this.listKeysAll(options); From 82800766f753d110f96fda7fd9a5c983e86b20d9 Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Mon, 29 Jul 2019 10:46:43 -0700 Subject: [PATCH 11/23] Additional changes --- common/config/rush/pnpm-lock.yaml | 58 +++++++++---------- sdk/core/core-http/lib/webResource.ts | 3 +- .../keyvault-keys/src/core/keyVaultClient.ts | 4 +- .../src/core/models/parameters.ts | 10 ++++ 4 files changed, 42 insertions(+), 33 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index ac6a30348de9..7767e2d81b2d 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -120,7 +120,7 @@ dependencies: karma-rollup-preprocessor: 7.0.2_rollup@1.17.0 karma-sourcemap-loader: 0.3.7 karma-typescript-es6-transform: 4.1.1 - karma-webpack: 4.0.2_webpack@4.37.0 + karma-webpack: 4.0.2_webpack@4.38.0 long: 4.0.0 mocha: 5.2.0 mocha-chrome: 1.1.0 @@ -180,9 +180,9 @@ dependencies: url: 0.11.0 util: 0.11.1 uuid: 3.3.2 - webpack: 4.37.0_webpack@4.37.0 - webpack-cli: 3.3.6_webpack@4.37.0 - webpack-dev-middleware: 3.7.0_webpack@4.37.0 + webpack: 4.38.0_webpack@4.38.0 + webpack-cli: 3.3.6_webpack@4.38.0 + webpack-dev-middleware: 3.7.0_webpack@4.38.0 ws: 6.2.1 xhr-mock: 2.5.0 xml2js: 0.4.19 @@ -2177,7 +2177,7 @@ packages: /browserslist/3.2.8: dependencies: caniuse-lite: 1.0.30000985 - electron-to-chromium: 1.3.200 + electron-to-chromium: 1.3.201 dev: false hasBin: true resolution: @@ -3226,10 +3226,10 @@ packages: dev: false resolution: integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - /electron-to-chromium/1.3.200: + /electron-to-chromium/1.3.201: dev: false resolution: - integrity: sha512-PUurrpyDA74MuAjJRD+79ss5BqJlU3mdArRbuu4wO/dt6jc3Ic/6BDmFJxkdwbfq39cHf/XKm2vW98XSvut9Dg== + integrity: sha512-aCTPIfY1Jvuam5b6vuWRjt1F8i4kY7zX0Qtpu5SNd6l1zjuxU9fDNpbM4o6+oJsra+TMD2o7D20GnkSIgpTr9w== /elliptic/6.5.0: dependencies: bn.js: 4.11.8 @@ -5491,15 +5491,15 @@ packages: dev: false resolution: integrity: sha512-WTGGThwufBT73c20q30iTcXq8Jb3Wat/h+JW1lwKgMtymT5rVxLknoaUVNfenaV3+cRMiTEsBT773kz9jWk6IQ== - /karma-webpack/4.0.2_webpack@4.37.0: + /karma-webpack/4.0.2_webpack@4.38.0: dependencies: clone-deep: 4.0.1 loader-utils: 1.2.3 neo-async: 2.6.1 schema-utils: 1.0.0 source-map: 0.7.3 - webpack: 4.37.0_webpack@4.37.0 - webpack-dev-middleware: 3.7.0_webpack@4.37.0 + webpack: 4.38.0_webpack@4.38.0 + webpack-dev-middleware: 3.7.0_webpack@4.38.0 dev: false engines: node: '>= 8.9.0' @@ -8644,7 +8644,7 @@ packages: node: '>=4' resolution: integrity: sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI= - /terser-webpack-plugin/1.3.0_webpack@4.37.0: + /terser-webpack-plugin/1.3.0_webpack@4.38.0: dependencies: cacache: 11.3.3 find-cache-dir: 2.1.0 @@ -8654,7 +8654,7 @@ packages: serialize-javascript: 1.7.0 source-map: 0.6.1 terser: 4.1.2 - webpack: 4.37.0_webpack@4.37.0 + webpack: 4.38.0_webpack@4.38.0 webpack-sources: 1.3.0 worker-farm: 1.7.0 dev: false @@ -9277,7 +9277,7 @@ packages: dev: false resolution: integrity: sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA== - /webpack-cli/3.3.6_webpack@4.37.0: + /webpack-cli/3.3.6_webpack@4.38.0: dependencies: chalk: 2.4.2 cross-spawn: 6.0.5 @@ -9289,7 +9289,7 @@ packages: loader-utils: 1.2.3 supports-color: 6.1.0 v8-compile-cache: 2.0.3 - webpack: 4.37.0_webpack@4.37.0 + webpack: 4.38.0_webpack@4.38.0 yargs: 13.2.4 dev: false engines: @@ -9299,12 +9299,12 @@ packages: webpack: 4.x.x resolution: integrity: sha512-0vEa83M7kJtxK/jUhlpZ27WHIOndz5mghWL2O53kiDoA9DIxSKnfqB92LoqEn77cT4f3H2cZm1BMEat/6AZz3A== - /webpack-dev-middleware/3.7.0_webpack@4.37.0: + /webpack-dev-middleware/3.7.0_webpack@4.38.0: dependencies: memory-fs: 0.4.1 mime: 2.4.4 range-parser: 1.2.1 - webpack: 4.37.0_webpack@4.37.0 + webpack: 4.38.0_webpack@4.38.0 webpack-log: 2.0.0 dev: false engines: @@ -9329,7 +9329,7 @@ packages: dev: false resolution: integrity: sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA== - /webpack/4.37.0_webpack@4.37.0: + /webpack/4.38.0_webpack@4.38.0: dependencies: '@webassemblyjs/ast': 1.8.5 '@webassemblyjs/helper-module-context': 1.8.5 @@ -9351,7 +9351,7 @@ packages: node-libs-browser: 2.2.1 schema-utils: 1.0.0 tapable: 1.1.3 - terser-webpack-plugin: 1.3.0_webpack@4.37.0 + terser-webpack-plugin: 1.3.0_webpack@4.38.0 watchpack: 1.6.0 webpack-sources: 1.3.0 dev: false @@ -9361,7 +9361,7 @@ packages: peerDependencies: webpack: '*' resolution: - integrity: sha512-iJPPvL7XpbcbwOthbzpa2BSPlmGp8lGDokAj/LdWtK80rsPoPOdANSbDBf2GAVLKZD3GhCuQ/gGkgN9HWs0Keg== + integrity: sha512-lbuFsVOq8PZY+1Ytz/mYOvYOo+d4IJ31hHk/7iyoeWtwN33V+5HYotSH+UIb9tq914ey0Hot7z6HugD+je3sWw== /which-module/1.0.0: dev: false resolution: @@ -9907,7 +9907,7 @@ packages: karma-rollup-preprocessor: 7.0.2_rollup@1.17.0 karma-sourcemap-loader: 0.3.7 karma-typescript-es6-transform: 4.1.1 - karma-webpack: 4.0.2_webpack@4.37.0 + karma-webpack: 4.0.2_webpack@4.38.0 mocha: 5.2.0 mocha-chrome: 1.1.0 mocha-junit-reporter: 1.23.1_mocha@5.2.0 @@ -9938,9 +9938,9 @@ packages: typescript: 3.5.3 uglify-js: 3.6.0 uuid: 3.3.2 - webpack: 4.37.0_webpack@4.37.0 - webpack-cli: 3.3.6_webpack@4.37.0 - webpack-dev-middleware: 3.7.0_webpack@4.37.0 + webpack: 4.38.0_webpack@4.38.0 + webpack-cli: 3.3.6_webpack@4.38.0 + webpack-dev-middleware: 3.7.0_webpack@4.38.0 xhr-mock: 2.5.0 xml2js: 0.4.19 yarn: 1.17.3 @@ -10006,7 +10006,7 @@ packages: karma-rollup-preprocessor: 7.0.2_rollup@1.17.0 karma-sourcemap-loader: 0.3.7 karma-typescript-es6-transform: 4.1.1 - karma-webpack: 4.0.2_webpack@4.37.0 + karma-webpack: 4.0.2_webpack@4.38.0 mocha: 5.2.0 mocha-chrome: 1.1.0 mocha-junit-reporter: 1.23.1_mocha@5.2.0 @@ -10032,9 +10032,9 @@ packages: ts-node: 7.0.1 typescript: 3.5.3 uglify-js: 3.6.0 - webpack: 4.37.0_webpack@4.37.0 - webpack-cli: 3.3.6_webpack@4.37.0 - webpack-dev-middleware: 3.7.0_webpack@4.37.0 + webpack: 4.38.0_webpack@4.38.0 + webpack-cli: 3.3.6_webpack@4.38.0 + webpack-dev-middleware: 3.7.0_webpack@4.38.0 xhr-mock: 2.5.0 yarn: 1.17.3 dev: false @@ -10080,8 +10080,8 @@ packages: tslib: 1.10.0 tunnel: 0.0.6 typescript: 3.5.3 - webpack: 4.37.0_webpack@4.37.0 - webpack-cli: 3.3.6_webpack@4.37.0 + webpack: 4.38.0_webpack@4.38.0 + webpack-cli: 3.3.6_webpack@4.38.0 dev: false name: '@rush-temp/cosmos' resolution: diff --git a/sdk/core/core-http/lib/webResource.ts b/sdk/core/core-http/lib/webResource.ts index 80a9c8698b06..901ae49666ba 100644 --- a/sdk/core/core-http/lib/webResource.ts +++ b/sdk/core/core-http/lib/webResource.ts @@ -8,7 +8,6 @@ import { generateUuid } from "./util/utils"; import { HttpOperationResponse } from "./httpOperationResponse"; import { OperationResponse } from "./operationResponse"; import { ProxySettings } from "./serviceClient"; -import { SpanOptions } from "@azure/core-tracing"; export type HttpMethods = | "GET" @@ -519,7 +518,7 @@ export interface RequestOptionsBase { */ onDownloadProgress?: (progress: TransferProgressEvent) => void; - spanOptions?: SpanOptions | undefined; + spanOptions?: any; [key: string]: any; } diff --git a/sdk/keyvault/keyvault-keys/src/core/keyVaultClient.ts b/sdk/keyvault/keyvault-keys/src/core/keyVaultClient.ts index cc1ed344c6ac..034c5c944646 100644 --- a/sdk/keyvault/keyvault-keys/src/core/keyVaultClient.ts +++ b/sdk/keyvault/keyvault-keys/src/core/keyVaultClient.ts @@ -5405,7 +5405,7 @@ const getKeysOperationSpec: coreHttp.OperationSpec = { path: "keys", urlParameters: [Parameters.vaultBaseUrl], queryParameters: [Parameters.maxresults, Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage, Parameters.spanOptions], + headerParameters: [Parameters.acceptLanguage, Parameters.spanOptionsV2], responses: { 200: { bodyMapper: Mappers.KeyListResult @@ -6512,7 +6512,7 @@ const getDeletedStorageAccountsOperationSpec: coreHttp.OperationSpec = { path: "deletedstorage", urlParameters: [Parameters.vaultBaseUrl], queryParameters: [Parameters.maxresults, Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage, Parameters.spanOptions], + headerParameters: [Parameters.acceptLanguage], responses: { 200: { bodyMapper: Mappers.DeletedStorageListResult diff --git a/sdk/keyvault/keyvault-keys/src/core/models/parameters.ts b/sdk/keyvault/keyvault-keys/src/core/models/parameters.ts index e1f2a02dd7ef..c6a6e34bfec5 100644 --- a/sdk/keyvault/keyvault-keys/src/core/models/parameters.ts +++ b/sdk/keyvault/keyvault-keys/src/core/models/parameters.ts @@ -31,6 +31,16 @@ export const spanOptions: coreHttp.OperationParameter = { } }; +export const spanOptionsV2: coreHttp.OperationParameter = { + parameterPath: ["options", "spanOptions"], + mapper: { + serializedName: "span-options", + type: { + name: "Object" + } + } +}; + export const apiVersion: coreHttp.OperationQueryParameter = { parameterPath: "apiVersion", mapper: { From f28a88204e00e3686bf0d3f93ede066cd42631e5 Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Mon, 29 Jul 2019 13:19:06 -0700 Subject: [PATCH 12/23] Adding code for create/delete --- .../keyvault-keys/src/core/keyVaultClient.ts | 4 +-- sdk/keyvault/keyvault-keys/src/index.ts | 28 +++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/sdk/keyvault/keyvault-keys/src/core/keyVaultClient.ts b/sdk/keyvault/keyvault-keys/src/core/keyVaultClient.ts index 034c5c944646..e35a0b8b923b 100644 --- a/sdk/keyvault/keyvault-keys/src/core/keyVaultClient.ts +++ b/sdk/keyvault/keyvault-keys/src/core/keyVaultClient.ts @@ -5266,7 +5266,7 @@ const createKeyOperationSpec: coreHttp.OperationSpec = { path: "keys/{key-name}/create", urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName0], queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.acceptLanguage, Parameters.spanOptionsV2], requestBody: { parameterPath: { kty: "kty", @@ -5326,7 +5326,7 @@ const deleteKeyOperationSpec: coreHttp.OperationSpec = { path: "keys/{key-name}", urlParameters: [Parameters.vaultBaseUrl, Parameters.keyName1], queryParameters: [Parameters.apiVersion], - headerParameters: [Parameters.acceptLanguage], + headerParameters: [Parameters.acceptLanguage, Parameters.spanOptionsV2], responses: { 200: { bodyMapper: Mappers.DeletedKeyBundle diff --git a/sdk/keyvault/keyvault-keys/src/index.ts b/sdk/keyvault/keyvault-keys/src/index.ts index 6dc955c0c8bd..891f8ed0ae94 100644 --- a/sdk/keyvault/keyvault-keys/src/index.ts +++ b/sdk/keyvault/keyvault-keys/src/index.ts @@ -254,12 +254,23 @@ export class KeysClient { delete unflattenedOptions.expires; delete unflattenedOptions.requestOptions; + const span: Span = TracerProxy.getTracer().startSpan( + "createKeyMethod", + options.requestOptions ? options.requestOptions.spanOptions : undefined + ); + if (options.requestOptions && options.requestOptions.spanOptions) { + options.requestOptions.spanOptions.parent = span; + } + span.start(); + const response = await this.client.createKey( this.vaultBaseUrl, name, keyType, unflattenedOptions ); + + span.end(); return this.getKeyFromKeyBundle(response); } else { const response = await this.client.createKey(this.vaultBaseUrl, name, keyType, options); @@ -424,11 +435,28 @@ export class KeysClient { * @returns Promise */ public async deleteKey(name: string, options?: RequestOptions): Promise { + const span: Span = TracerProxy.getTracer().startSpan( + "deleteKeyMethod", + options + ? options.requestOptions + ? options.requestOptions.spanOptions + : undefined + : undefined + ); + + if (options && options.requestOptions && options.requestOptions.spanOptions) { + options.requestOptions.spanOptions.parent = span; + } + + span.start(); + const response = await this.client.deleteKey( this.vaultBaseUrl, name, options ? options.requestOptions : {} ); + + span.end(); return this.getKeyFromKeyBundle(response); } From c4a03052f67a1e43dff8788978eb68b2cc06fb07 Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Mon, 29 Jul 2019 13:52:35 -0700 Subject: [PATCH 13/23] Rush Update full --- common/config/rush/pnpm-lock.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 7767e2d81b2d..f8d6234455a7 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -2176,8 +2176,8 @@ packages: integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== /browserslist/3.2.8: dependencies: - caniuse-lite: 1.0.30000985 - electron-to-chromium: 1.3.201 + caniuse-lite: 1.0.30000986 + electron-to-chromium: 1.3.204 dev: false hasBin: true resolution: @@ -2353,10 +2353,10 @@ packages: node: '>=6' resolution: integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - /caniuse-lite/1.0.30000985: + /caniuse-lite/1.0.30000986: dev: false resolution: - integrity: sha512-1ngiwkgqAYPG0JSSUp3PUDGPKKY59EK7NrGGX+VOxaKCNzRbNc7uXMny+c3VJfZxtoK3wSImTvG9T9sXiTw2+w== + integrity: sha512-pM+LnkoAX0+QnIH3tpW5EnkmfpEoqOD8FAcoBvsl3Xh6DXkgctiCxeCbXphP/k3XJtJzm+zOAJbi6U6IVkpWZQ== /caseless/0.12.0: dev: false resolution: @@ -3226,10 +3226,10 @@ packages: dev: false resolution: integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - /electron-to-chromium/1.3.201: + /electron-to-chromium/1.3.204: dev: false resolution: - integrity: sha512-aCTPIfY1Jvuam5b6vuWRjt1F8i4kY7zX0Qtpu5SNd6l1zjuxU9fDNpbM4o6+oJsra+TMD2o7D20GnkSIgpTr9w== + integrity: sha512-T0eXE6hfbtpzRUaI7aHI/HYJ29Ndk84aVSborRAmXfWvBvz2EuB2OWYUxNcUX9d+jtqEIjgZjWMdoxS0hp5j1g== /elliptic/6.5.0: dependencies: bn.js: 4.11.8 @@ -7256,14 +7256,14 @@ packages: node: '>=6' resolution: integrity: sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - /pupa/2.0.0: + /pupa/2.0.1: dependencies: escape-goat: 2.1.0 dev: false engines: node: '>=8' resolution: - integrity: sha512-xxy6mj9KTirR7fpsdXrIaC4oUb/uvFfchrC4K3RFxYLQ/G05RlhJIKFF2ayCQnNaFI+fOxGWzEVUhYMXHNljeQ== + integrity: sha512-hEJH0s8PXLY/cdXh66tNEQGndDrIKNqNC5xmrysZy3i5C3oEoLna7YAOad+7u125+zH1HNXUmGEkrhb3c2VriA== /puppeteer/1.19.0: dependencies: debug: 4.1.1 @@ -7883,7 +7883,7 @@ packages: dependencies: mkdirp: 0.5.1 open: 6.4.0 - pupa: 2.0.0 + pupa: 2.0.1 rollup: 1.17.0 source-map: 0.7.3 dev: false From 71205ab464600392ad2213e087b5892f29beca03 Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Wed, 31 Jul 2019 16:09:09 -0700 Subject: [PATCH 14/23] Fix call to OpenCensus --- .../lib/plugins/opencensus/openCensusSpanPlugin.ts | 4 ++++ .../lib/plugins/opencensus/openCensusTracePlugin.ts | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/sdk/core/core-tracing/lib/plugins/opencensus/openCensusSpanPlugin.ts b/sdk/core/core-tracing/lib/plugins/opencensus/openCensusSpanPlugin.ts index c63f75a36444..1e3aa3f5669a 100644 --- a/sdk/core/core-tracing/lib/plugins/opencensus/openCensusSpanPlugin.ts +++ b/sdk/core/core-tracing/lib/plugins/opencensus/openCensusSpanPlugin.ts @@ -6,6 +6,10 @@ import { Status } from "../../interfaces/status"; export class OpenCensusSpanPlugin implements Span { private _span: any; + public getSpan() { + return this._span; + } + constructor(span: any) { this._span = span; } diff --git a/sdk/core/core-tracing/lib/plugins/opencensus/openCensusTracePlugin.ts b/sdk/core/core-tracing/lib/plugins/opencensus/openCensusTracePlugin.ts index 92c52efb0895..b4c86e2940c0 100644 --- a/sdk/core/core-tracing/lib/plugins/opencensus/openCensusTracePlugin.ts +++ b/sdk/core/core-tracing/lib/plugins/opencensus/openCensusTracePlugin.ts @@ -12,9 +12,16 @@ export class OpenCensusTracePlugin implements Tracer { } startSpan(name: string, options?: SpanOptions): Span { + const parent = + options ? + options.parent ? + options.parent instanceof OpenCensusSpanPlugin ? options.parent.getSpan() : options.parent + : undefined + :undefined + const span = this._tracer.startChildSpan({ name: name, - childOf: options ? options.parent : undefined + childOf: parent }); const openCensusSpanPlugin = new OpenCensusSpanPlugin(span); From 0fed10975ec6d0a69082b1aecdecc101d0513b6d Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Thu, 1 Aug 2019 11:59:22 -0700 Subject: [PATCH 15/23] Add span to all(almost) apis --- common/config/rush/pnpm-lock.yaml | 386 ++++++++++++------------ sdk/keyvault/keyvault-keys/src/index.ts | 147 +++++++++ 2 files changed, 342 insertions(+), 191 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index f8d6234455a7..6e7d6343e589 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -117,10 +117,10 @@ dependencies: karma-mocha: 1.3.0 karma-mocha-reporter: 2.2.5_karma@4.2.0 karma-remap-coverage: 0.1.5_karma-coverage@1.1.2 - karma-rollup-preprocessor: 7.0.2_rollup@1.17.0 + karma-rollup-preprocessor: 7.0.2_rollup@1.18.0 karma-sourcemap-loader: 0.3.7 karma-typescript-es6-transform: 4.1.1 - karma-webpack: 4.0.2_webpack@4.38.0 + karma-webpack: 4.0.2_webpack@4.39.0 long: 4.0.0 mocha: 5.2.0 mocha-chrome: 1.1.0 @@ -147,26 +147,26 @@ dependencies: rhea: 1.0.8 rhea-promise: 0.1.15 rimraf: 2.6.3 - rollup: 1.17.0 + rollup: 1.18.0 rollup-plugin-alias: 1.5.2 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-inject: 3.0.1 rollup-plugin-json: 4.0.0 rollup-plugin-multi-entry: 2.1.0 rollup-plugin-node-globals: 1.4.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-replace: 2.2.0 rollup-plugin-resolve: 0.0.1-predev.1 rollup-plugin-shim: 1.0.0 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-uglify: 6.0.2_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-terser: 5.1.1_rollup@1.18.0 + rollup-plugin-uglify: 6.0.2_rollup@1.18.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 semaphore: 1.0.5 semver: 5.7.0 shx: 0.3.2 sinon: 7.3.2 - source-map-support: 0.5.12 + source-map-support: 0.5.13 stream-browserify: 2.0.2 stream-http: 2.8.3 tough-cookie: 2.5.0 @@ -180,9 +180,9 @@ dependencies: url: 0.11.0 util: 0.11.1 uuid: 3.3.2 - webpack: 4.38.0_webpack@4.38.0 - webpack-cli: 3.3.6_webpack@4.38.0 - webpack-dev-middleware: 3.7.0_webpack@4.38.0 + webpack: 4.39.0_webpack@4.39.0 + webpack-cli: 3.3.6_webpack@4.39.0 + webpack-dev-middleware: 3.7.0_webpack@4.39.0 ws: 6.2.1 xhr-mock: 2.5.0 xml2js: 0.4.19 @@ -368,7 +368,7 @@ packages: /@babel/highlight/7.5.0: dependencies: chalk: 2.4.2 - esutils: 2.0.2 + esutils: 2.0.3 js-tokens: 4.0.0 dev: false resolution: @@ -404,7 +404,7 @@ packages: integrity: sha512-MqB0782whsfffYfSjH4TM+LMjrJnhCNEDMDIjeTpl+ASaUvxcjoiVCo/sM1GhS1pHOXYfWVCYneLjMckuUxDaQ== /@babel/types/7.5.5: dependencies: - esutils: 2.0.2 + esutils: 2.0.3 lodash: 4.17.15 to-fast-properties: 2.0.0 dev: false @@ -1498,7 +1498,7 @@ packages: /babel-code-frame/6.26.0: dependencies: chalk: 1.1.3 - esutils: 2.0.2 + esutils: 2.0.3 js-tokens: 3.0.2 dev: false resolution: @@ -1951,7 +1951,7 @@ packages: /babel-types/6.26.0: dependencies: babel-runtime: 6.26.0 - esutils: 2.0.2 + esutils: 2.0.3 lodash: 4.17.15 to-fast-properties: 1.0.3 dev: false @@ -2176,8 +2176,8 @@ packages: integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA== /browserslist/3.2.8: dependencies: - caniuse-lite: 1.0.30000986 - electron-to-chromium: 1.3.204 + caniuse-lite: 1.0.30000988 + electron-to-chromium: 1.3.210 dev: false hasBin: true resolution: @@ -2254,13 +2254,14 @@ packages: node: '>= 0.8' resolution: integrity: sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== - /cacache/11.3.3: + /cacache/12.0.2: dependencies: bluebird: 3.5.5 chownr: 1.1.2 figgy-pudding: 3.5.1 glob: 7.1.4 graceful-fs: 4.2.0 + infer-owner: 1.0.4 lru-cache: 5.1.1 mississippi: 3.0.0 mkdirp: 0.5.1 @@ -2272,7 +2273,7 @@ packages: y18n: 4.0.0 dev: false resolution: - integrity: sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA== + integrity: sha512-ifKgxH2CKhJEg6tNdAwziu6Q33EvuG26tYcda6PT3WKisZcYDXsnEdnRv67Po3yCzFfaSoMjGZzJyD2c3DT1dg== /cache-base/1.0.1: dependencies: collection-visit: 1.0.0 @@ -2353,10 +2354,10 @@ packages: node: '>=6' resolution: integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - /caniuse-lite/1.0.30000986: + /caniuse-lite/1.0.30000988: dev: false resolution: - integrity: sha512-pM+LnkoAX0+QnIH3tpW5EnkmfpEoqOD8FAcoBvsl3Xh6DXkgctiCxeCbXphP/k3XJtJzm+zOAJbi6U6IVkpWZQ== + integrity: sha512-lPj3T8poYrRc/bniW5SQPND3GRtSrQdUM/R4mCYTbZxyi3jQiggLvZH4+BYUuX0t4TXjU+vMM7KFDQg+rSzZUQ== /caseless/0.12.0: dev: false resolution: @@ -3153,7 +3154,7 @@ packages: integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== /doctrine/3.0.0: dependencies: - esutils: 2.0.2 + esutils: 2.0.3 dev: false engines: node: '>=6.0.0' @@ -3226,10 +3227,10 @@ packages: dev: false resolution: integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - /electron-to-chromium/1.3.204: + /electron-to-chromium/1.3.210: dev: false resolution: - integrity: sha512-T0eXE6hfbtpzRUaI7aHI/HYJ29Ndk84aVSborRAmXfWvBvz2EuB2OWYUxNcUX9d+jtqEIjgZjWMdoxS0hp5j1g== + integrity: sha512-m1i/F+gw9jkauxDx0mOr7Sj6vp6se1mfkQNYqZb1yL5VGTp0AC1NZH5CGI6YMSO7WaScILmkKDZFG9/hlR9axQ== /elliptic/6.5.0: dependencies: bn.js: 4.11.8 @@ -3421,7 +3422,7 @@ packages: dependencies: esprima: 2.7.3 estraverse: 1.9.3 - esutils: 2.0.2 + esutils: 2.0.3 optionator: 0.8.2 dev: false engines: @@ -3508,7 +3509,7 @@ packages: eslint-visitor-keys: 1.0.0 espree: 5.0.1 esquery: 1.0.1 - esutils: 2.0.2 + esutils: 2.0.3 file-entry-cache: 5.0.1 functional-red-black-tree: 1.0.1 glob: 7.1.4 @@ -3531,7 +3532,7 @@ packages: semver: 5.7.0 strip-ansi: 4.0.0 strip-json-comments: 2.0.1 - table: 5.4.4 + table: 5.4.5 text-table: 0.2.0 dev: false engines: @@ -3599,12 +3600,12 @@ packages: dev: false resolution: integrity: sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w== - /esutils/2.0.2: + /esutils/2.0.3: dev: false engines: node: '>=0.10.0' resolution: - integrity: sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs= + integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== /etag/1.8.1: dev: false engines: @@ -4710,6 +4711,10 @@ packages: dev: false resolution: integrity: sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10= + /infer-owner/1.0.4: + dev: false + resolution: + integrity: sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== /inflight/1.0.6: dependencies: once: 1.4.0 @@ -5462,11 +5467,11 @@ packages: karma-coverage: '>=0.5.4' resolution: integrity: sha512-FM5h8eHcHbMMR+2INBUxD+4+wUbkCnobfn5uWprkLyj6Xcm2MRFQOuAJn9h2H13nNso6rk+QoNpHd5xCevlPOw== - /karma-rollup-preprocessor/7.0.2_rollup@1.17.0: + /karma-rollup-preprocessor/7.0.2_rollup@1.18.0: dependencies: chokidar: 3.0.2 debounce: 1.2.0 - rollup: 1.17.0 + rollup: 1.18.0 dev: false engines: node: '>= 8.0.0' @@ -5491,15 +5496,15 @@ packages: dev: false resolution: integrity: sha512-WTGGThwufBT73c20q30iTcXq8Jb3Wat/h+JW1lwKgMtymT5rVxLknoaUVNfenaV3+cRMiTEsBT773kz9jWk6IQ== - /karma-webpack/4.0.2_webpack@4.38.0: + /karma-webpack/4.0.2_webpack@4.39.0: dependencies: clone-deep: 4.0.1 loader-utils: 1.2.3 neo-async: 2.6.1 schema-utils: 1.0.0 source-map: 0.7.3 - webpack: 4.38.0_webpack@4.38.0 - webpack-dev-middleware: 3.7.0_webpack@4.38.0 + webpack: 4.39.0_webpack@4.39.0 + webpack-dev-middleware: 3.7.0_webpack@4.39.0 dev: false engines: node: '>= 8.9.0' @@ -5635,7 +5640,7 @@ packages: is-plain-object: 2.0.4 object.map: 1.0.1 rechoir: 0.6.2 - resolve: 1.11.1 + resolve: 1.12.0 dev: false engines: node: '>= 0.8' @@ -5891,7 +5896,7 @@ packages: dependencies: findup-sync: 2.0.0 micromatch: 3.1.10 - resolve: 1.11.1 + resolve: 1.12.0 stack-trace: 0.0.10 dev: false engines: @@ -6460,7 +6465,7 @@ packages: /normalize-package-data/2.5.0: dependencies: hosted-git-info: 2.7.1 - resolve: 1.11.1 + resolve: 1.12.0 semver: 5.7.0 validate-npm-package-license: 3.0.4 dev: false @@ -7205,10 +7210,10 @@ packages: dev: false resolution: integrity: sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - /psl/1.2.0: + /psl/1.3.0: dev: false resolution: - integrity: sha512-GEn74ZffufCmkDDLNcl3uuyF/aSD6exEyh1v/ZSdAomB82t6G9hzJVRx0jBmLDW+VfZqks3aScmMw9DszwUalA== + integrity: sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag== /public-encrypt/4.0.3: dependencies: bn.js: 4.11.8 @@ -7446,7 +7451,7 @@ packages: integrity: sha512-XXdSXZrQuvqoETj50+JAitxz1UPdt5dupjT6T5nVB+WvjMv2XKYj+s7hPeAVCXvmJrL36O4YYyWlIC3an2ePiQ== /rechoir/0.6.2: dependencies: - resolve: 1.11.1 + resolve: 1.12.0 dev: false engines: node: '>= 0.10' @@ -7704,12 +7709,12 @@ packages: dev: false resolution: integrity: sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= - /resolve/1.11.1: + /resolve/1.12.0: dependencies: path-parse: 1.0.6 dev: false resolution: - integrity: sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw== + integrity: sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w== /resolve/1.8.1: dependencies: path-parse: 1.0.6 @@ -7769,13 +7774,13 @@ packages: dev: false resolution: integrity: sha512-ODeZXhTxpD48sfcYLAFc1BGrsXKDj7o1CSNH3uYbdK3o0NxyMmaQPTNgW+ko+am92DLC8QSTe4kyxTuEkI5S5w== - /rollup-plugin-commonjs/10.0.1_rollup@1.17.0: + /rollup-plugin-commonjs/10.0.1_rollup@1.18.0: dependencies: estree-walker: 0.6.1 is-reference: 1.1.3 magic-string: 0.25.3 - resolve: 1.11.1 - rollup: 1.17.0 + resolve: 1.12.0 + rollup: 1.18.0 rollup-pluginutils: 2.8.1 dev: false peerDependencies: @@ -7813,13 +7818,13 @@ packages: dev: false resolution: integrity: sha512-xRkB+W/m1KLIzPUmG0ofvR+CPNcvuCuNdjVBVS7ALKSxr3EDhnzNceGkGi1m8MToSli13AzKFYH4ie9w3I5L3g== - /rollup-plugin-node-resolve/5.2.0_rollup@1.17.0: + /rollup-plugin-node-resolve/5.2.0_rollup@1.18.0: dependencies: '@types/resolve': 0.0.8 builtin-modules: 3.1.0 is-module: 1.0.0 - resolve: 1.11.1 - rollup: 1.17.0 + resolve: 1.12.0 + rollup: 1.18.0 rollup-pluginutils: 2.8.1 dev: false peerDependencies: @@ -7841,9 +7846,9 @@ packages: dev: false resolution: integrity: sha512-rZqFD43y4U9nSqVq3iyWBiDwmBQJY8Txi04yI9jTKD3xcl7CbFjh1qRpQshUB3sONLubDzm7vJiwB+1MEGv67w== - /rollup-plugin-sourcemaps/0.4.2_rollup@1.17.0: + /rollup-plugin-sourcemaps/0.4.2_rollup@1.18.0: dependencies: - rollup: 1.17.0 + rollup: 1.18.0 rollup-pluginutils: 2.8.1 source-map-resolve: 0.5.2 dev: false @@ -7854,11 +7859,11 @@ packages: rollup: '>=0.31.2' resolution: integrity: sha1-YhJaqUCHqt97g+9N+vYptHMTXoc= - /rollup-plugin-terser/5.1.1_rollup@1.17.0: + /rollup-plugin-terser/5.1.1_rollup@1.18.0: dependencies: '@babel/code-frame': 7.5.5 jest-worker: 24.6.0 - rollup: 1.17.0 + rollup: 1.18.0 rollup-pluginutils: 2.8.1 serialize-javascript: 1.7.0 terser: 4.1.2 @@ -7867,11 +7872,11 @@ packages: rollup: '>=0.66.0 <2' resolution: integrity: sha512-McIMCDEY8EU6Y839C09UopeRR56wXHGdvKKjlfiZG/GrP6wvZQ62u2ko/Xh1MNH2M9WDL+obAAHySljIZYCuPQ== - /rollup-plugin-uglify/6.0.2_rollup@1.17.0: + /rollup-plugin-uglify/6.0.2_rollup@1.18.0: dependencies: '@babel/code-frame': 7.5.5 jest-worker: 24.6.0 - rollup: 1.17.0 + rollup: 1.18.0 serialize-javascript: 1.7.0 uglify-js: 3.6.0 dev: false @@ -7879,12 +7884,12 @@ packages: rollup: '>=0.66.0 <2' resolution: integrity: sha512-qwz2Tryspn5QGtPUowq5oumKSxANKdrnfz7C0jm4lKxvRDsNe/hSGsB9FntUul7UeC4TsZEWKErVgE1qWSO0gw== - /rollup-plugin-visualizer/2.5.4_rollup@1.17.0: + /rollup-plugin-visualizer/2.5.4_rollup@1.18.0: dependencies: mkdirp: 0.5.1 open: 6.4.0 pupa: 2.0.1 - rollup: 1.17.0 + rollup: 1.18.0 source-map: 0.7.3 dev: false engines: @@ -7899,7 +7904,7 @@ packages: dev: false resolution: integrity: sha512-J5oAoysWar6GuZo0s+3bZ6sVZAC0pfqKz68De7ZgDi5z63jOVZn1uJL/+z1jeKHNbGII8kAyHF5q8LnxSX5lQg== - /rollup/1.17.0: + /rollup/1.18.0: dependencies: '@types/estree': 0.0.39 '@types/node': 12.6.8 @@ -7907,7 +7912,7 @@ packages: dev: false hasBin: true resolution: - integrity: sha512-k/j1m0NIsI4SYgCJR4MWPstGJOWfJyd6gycKoMhyoKPVXxm+L49XtbUwZyFsrSU2YXsOkM4u1ll9CS/ZgJBUpw== + integrity: sha512-MBAWr6ectF948gW/bs/yfi0jW7DzwI8n0tEYG/ZMQutmK+blF/Oazyhg3oPqtScCGV8bzCtL9KzlzPtTriEOJA== /run-async/2.3.0: dependencies: is-promise: 2.1.0 @@ -8247,13 +8252,13 @@ packages: dev: false resolution: integrity: sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== - /source-map-support/0.5.12: + /source-map-support/0.5.13: dependencies: buffer-from: 1.1.1 source-map: 0.6.1 dev: false resolution: - integrity: sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== + integrity: sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w== /source-map-url/0.4.0: dev: false resolution: @@ -8608,7 +8613,7 @@ packages: dev: false resolution: integrity: sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg= - /table/5.4.4: + /table/5.4.5: dependencies: ajv: 6.10.2 lodash: 4.17.15 @@ -8618,7 +8623,7 @@ packages: engines: node: '>=6.0.0' resolution: - integrity: sha512-IIfEAUx5QlODLblLrGTTLJA7Tk0iLSGBvgY8essPRVNGHAzThujww1YqHLs6h3HfTg55h++RzLHH5Xw/rfv+mg== + integrity: sha512-oGa2Hl7CQjfoaogtrOHEJroOcYILTx7BZWLGsJIlzoWmB2zmguhNfPJZsWPKYek/MgCxfco54gEi31d1uN2hFA== /tapable/1.1.3: dev: false engines: @@ -8644,18 +8649,17 @@ packages: node: '>=4' resolution: integrity: sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI= - /terser-webpack-plugin/1.3.0_webpack@4.38.0: + /terser-webpack-plugin/1.4.1_webpack@4.39.0: dependencies: - cacache: 11.3.3 + cacache: 12.0.2 find-cache-dir: 2.1.0 is-wsl: 1.1.0 - loader-utils: 1.2.3 schema-utils: 1.0.0 serialize-javascript: 1.7.0 source-map: 0.6.1 terser: 4.1.2 - webpack: 4.38.0_webpack@4.38.0 - webpack-sources: 1.3.0 + webpack: 4.39.0_webpack@4.39.0 + webpack-sources: 1.4.1 worker-farm: 1.7.0 dev: false engines: @@ -8663,12 +8667,12 @@ packages: peerDependencies: webpack: ^4.0.0 resolution: - integrity: sha512-W2YWmxPjjkUcOWa4pBEv4OP4er1aeQJlSo2UhtCFQCuRXEHjOFscO8VyWHj9JLlA0RzQb8Y2/Ta78XZvT54uGg== + integrity: sha512-ZXmmfiwtCLfz8WKZyYUuuHf3dMYEjg8NrjHMb0JqHVHVOSkzp3cW2/XG1fP3tRhqEqSzMwzzRQGtAPbs4Cncxg== /terser/4.1.2: dependencies: commander: 2.20.0 source-map: 0.6.1 - source-map-support: 0.5.12 + source-map-support: 0.5.13 dev: false engines: node: '>=6.0.0' @@ -8818,7 +8822,7 @@ packages: integrity: sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== /tough-cookie/2.4.3: dependencies: - psl: 1.2.0 + psl: 1.3.0 punycode: 1.4.1 dev: false engines: @@ -8827,7 +8831,7 @@ packages: integrity: sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ== /tough-cookie/2.5.0: dependencies: - psl: 1.2.0 + psl: 1.3.0 punycode: 2.1.1 dev: false engines: @@ -8889,7 +8893,7 @@ packages: make-error: 1.3.5 minimist: 1.2.0 mkdirp: 0.5.1 - source-map-support: 0.5.12 + source-map-support: 0.5.13 yn: 2.0.0 dev: false engines: @@ -9277,7 +9281,7 @@ packages: dev: false resolution: integrity: sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA== - /webpack-cli/3.3.6_webpack@4.38.0: + /webpack-cli/3.3.6_webpack@4.39.0: dependencies: chalk: 2.4.2 cross-spawn: 6.0.5 @@ -9289,7 +9293,7 @@ packages: loader-utils: 1.2.3 supports-color: 6.1.0 v8-compile-cache: 2.0.3 - webpack: 4.38.0_webpack@4.38.0 + webpack: 4.39.0_webpack@4.39.0 yargs: 13.2.4 dev: false engines: @@ -9299,12 +9303,12 @@ packages: webpack: 4.x.x resolution: integrity: sha512-0vEa83M7kJtxK/jUhlpZ27WHIOndz5mghWL2O53kiDoA9DIxSKnfqB92LoqEn77cT4f3H2cZm1BMEat/6AZz3A== - /webpack-dev-middleware/3.7.0_webpack@4.38.0: + /webpack-dev-middleware/3.7.0_webpack@4.39.0: dependencies: memory-fs: 0.4.1 mime: 2.4.4 range-parser: 1.2.1 - webpack: 4.38.0_webpack@4.38.0 + webpack: 4.39.0_webpack@4.39.0 webpack-log: 2.0.0 dev: false engines: @@ -9322,14 +9326,14 @@ packages: node: '>= 6' resolution: integrity: sha512-cX8G2vR/85UYG59FgkoMamwHUIkSSlV3bBMRsbxVXVUk2j6NleCKjQ/WE9eYg9WY4w25O9w8wKP4rzNZFmUcUg== - /webpack-sources/1.3.0: + /webpack-sources/1.4.1: dependencies: source-list-map: 2.0.1 source-map: 0.6.1 dev: false resolution: - integrity: sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA== - /webpack/4.38.0_webpack@4.38.0: + integrity: sha512-XSz38193PTo/1csJabKaV4b53uRVotlMgqJXm3s3eje0Bu6gQTxYDqpD38CmQfDBA+gN+QqaGjasuC8I/7eW3Q== + /webpack/4.39.0_webpack@4.39.0: dependencies: '@webassemblyjs/ast': 1.8.5 '@webassemblyjs/helper-module-context': 1.8.5 @@ -9351,9 +9355,9 @@ packages: node-libs-browser: 2.2.1 schema-utils: 1.0.0 tapable: 1.1.3 - terser-webpack-plugin: 1.3.0_webpack@4.38.0 + terser-webpack-plugin: 1.4.1_webpack@4.39.0 watchpack: 1.6.0 - webpack-sources: 1.3.0 + webpack-sources: 1.4.1 dev: false engines: node: '>=6.11.5' @@ -9361,7 +9365,7 @@ packages: peerDependencies: webpack: '*' resolution: - integrity: sha512-lbuFsVOq8PZY+1Ytz/mYOvYOo+d4IJ31hHk/7iyoeWtwN33V+5HYotSH+UIb9tq914ey0Hot7z6HugD+je3sWw== + integrity: sha512-nrxFNSEKm4T1C/EsgOgN50skt//Pl4X7kgJC1MrlE47M292LSCVmMOC47iTGL0CGxbdwhKGgeThrJcw0bstEfA== /which-module/1.0.0: dev: false resolution: @@ -9686,13 +9690,13 @@ packages: nyc: 14.1.1 prettier: 1.18.2 rimraf: 2.6.3 - rollup: 1.17.0 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup: 1.18.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-multi-entry: 2.1.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-replace: 2.2.0 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-terser: 5.1.1_rollup@1.17.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-terser: 5.1.1_rollup@1.18.0 tslib: 1.10.0 typescript: 3.5.3 dev: false @@ -9746,17 +9750,17 @@ packages: rhea: 1.0.8 rhea-promise: 0.1.15 rimraf: 2.6.3 - rollup: 1.17.0 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup: 1.18.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-inject: 3.0.1 rollup-plugin-json: 4.0.0 rollup-plugin-multi-entry: 2.1.0 rollup-plugin-node-globals: 1.4.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-replace: 2.2.0 rollup-plugin-shim: 1.0.0 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-terser: 5.1.1_rollup@1.17.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-terser: 5.1.1_rollup@1.18.0 sinon: 7.3.2 stream-browserify: 2.0.2 ts-node: 7.0.1 @@ -9792,10 +9796,10 @@ packages: nyc: 14.1.1 opn-cli: 4.1.0 rimraf: 2.6.3 - rollup: 1.17.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 + rollup: 1.18.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 shx: 0.3.2 ts-loader: 5.4.5_typescript@3.5.3 ts-node: 7.0.1 @@ -9850,15 +9854,15 @@ packages: mocha-multi: 1.1.0_mocha@5.2.0 prettier: 1.18.2 rimraf: 2.6.3 - rollup: 1.17.0 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup: 1.18.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-json: 4.0.0 rollup-plugin-multi-entry: 2.1.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-replace: 2.2.0 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-terser: 5.1.1_rollup@1.18.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 tslib: 1.10.0 typescript: 3.5.3 util: 0.11.1 @@ -9904,10 +9908,10 @@ packages: karma-chai: 0.1.0_chai@4.2.0+karma@4.2.0 karma-chrome-launcher: 2.2.0 karma-mocha: 1.3.0 - karma-rollup-preprocessor: 7.0.2_rollup@1.17.0 + karma-rollup-preprocessor: 7.0.2_rollup@1.18.0 karma-sourcemap-loader: 0.3.7 karma-typescript-es6-transform: 4.1.1 - karma-webpack: 4.0.2_webpack@4.38.0 + karma-webpack: 4.0.2_webpack@4.39.0 mocha: 5.2.0 mocha-chrome: 1.1.0 mocha-junit-reporter: 1.23.1_mocha@5.2.0 @@ -9918,15 +9922,15 @@ packages: process: 0.11.10 puppeteer: 1.19.0 rimraf: 2.6.3 - rollup: 1.17.0 + rollup: 1.18.0 rollup-plugin-alias: 1.5.2 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-json: 4.0.0 rollup-plugin-multi-entry: 2.1.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-resolve: 0.0.1-predev.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 semver: 5.7.0 shx: 0.3.2 sinon: 7.3.2 @@ -9938,9 +9942,9 @@ packages: typescript: 3.5.3 uglify-js: 3.6.0 uuid: 3.3.2 - webpack: 4.38.0_webpack@4.38.0 - webpack-cli: 3.3.6_webpack@4.38.0 - webpack-dev-middleware: 3.7.0_webpack@4.38.0 + webpack: 4.39.0_webpack@4.39.0 + webpack-cli: 3.3.6_webpack@4.39.0 + webpack-dev-middleware: 3.7.0_webpack@4.39.0 xhr-mock: 2.5.0 xml2js: 0.4.19 yarn: 1.17.3 @@ -10003,10 +10007,10 @@ packages: karma-chai: 0.1.0_chai@4.2.0+karma@4.2.0 karma-chrome-launcher: 2.2.0 karma-mocha: 1.3.0 - karma-rollup-preprocessor: 7.0.2_rollup@1.17.0 + karma-rollup-preprocessor: 7.0.2_rollup@1.18.0 karma-sourcemap-loader: 0.3.7 karma-typescript-es6-transform: 4.1.1 - karma-webpack: 4.0.2_webpack@4.38.0 + karma-webpack: 4.0.2_webpack@4.39.0 mocha: 5.2.0 mocha-chrome: 1.1.0 mocha-junit-reporter: 1.23.1_mocha@5.2.0 @@ -10016,15 +10020,15 @@ packages: opn-cli: 4.1.0 puppeteer: 1.19.0 rimraf: 2.6.3 - rollup: 1.17.0 + rollup: 1.18.0 rollup-plugin-alias: 1.5.2 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-json: 4.0.0 rollup-plugin-multi-entry: 2.1.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-resolve: 0.0.1-predev.1 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 semver: 5.7.0 shx: 0.3.2 sinon: 7.3.2 @@ -10032,9 +10036,9 @@ packages: ts-node: 7.0.1 typescript: 3.5.3 uglify-js: 3.6.0 - webpack: 4.38.0_webpack@4.38.0 - webpack-cli: 3.3.6_webpack@4.38.0 - webpack-dev-middleware: 3.7.0_webpack@4.38.0 + webpack: 4.39.0_webpack@4.39.0 + webpack-cli: 3.3.6_webpack@4.39.0 + webpack-dev-middleware: 3.7.0_webpack@4.39.0 xhr-mock: 2.5.0 yarn: 1.17.3 dev: false @@ -10080,8 +10084,8 @@ packages: tslib: 1.10.0 tunnel: 0.0.6 typescript: 3.5.3 - webpack: 4.38.0_webpack@4.38.0 - webpack-cli: 3.3.6_webpack@4.38.0 + webpack: 4.39.0_webpack@4.39.0 + webpack-cli: 3.3.6_webpack@4.39.0 dev: false name: '@rush-temp/cosmos' resolution: @@ -10142,16 +10146,16 @@ packages: puppeteer: 1.19.0 rhea-promise: 0.1.15 rimraf: 2.6.3 - rollup: 1.17.0 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup: 1.18.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-inject: 3.0.1 rollup-plugin-json: 4.0.0 rollup-plugin-multi-entry: 2.1.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-replace: 2.2.0 rollup-plugin-shim: 1.0.0 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-terser: 5.1.1_rollup@1.17.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-terser: 5.1.1_rollup@1.18.0 ts-mocha: 6.0.0_mocha@5.2.0 ts-node: 7.0.1 tslib: 1.10.0 @@ -10203,14 +10207,14 @@ packages: path-browserify: 1.0.0 prettier: 1.18.2 rimraf: 2.6.3 - rollup: 1.17.0 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup: 1.18.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-json: 4.0.0 rollup-plugin-multi-entry: 2.1.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-replace: 2.2.0 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-uglify: 6.0.2_rollup@1.17.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-uglify: 6.0.2_rollup@1.18.0 ts-node: 7.0.1 tslib: 1.10.0 typescript: 3.5.3 @@ -10254,15 +10258,15 @@ packages: puppeteer: 1.19.0 qs: 6.7.0 rimraf: 2.6.3 - rollup: 1.17.0 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup: 1.18.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-json: 4.0.0 rollup-plugin-multi-entry: 2.1.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-replace: 2.2.0 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-terser: 5.1.1_rollup@1.18.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 tslib: 1.10.0 typescript: 3.5.3 util: 0.11.1 @@ -10289,9 +10293,9 @@ packages: eslint-plugin-promise: 4.2.1 prettier: 1.18.2 rimraf: 2.6.3 - rollup: 1.17.0 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup: 1.18.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 tslib: 1.10.0 typescript: 3.5.3 uglify-js: 3.6.0 @@ -10351,16 +10355,16 @@ packages: puppeteer: 1.19.0 query-string: 5.1.1 rimraf: 2.6.3 - rollup: 1.17.0 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup: 1.18.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-multi-entry: 2.1.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-replace: 2.2.0 rollup-plugin-shim: 1.0.0 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 - source-map-support: 0.5.12 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-terser: 5.1.1_rollup@1.18.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 + source-map-support: 0.5.13 tslib: 1.10.0 typescript: 3.5.3 uglify-js: 3.6.0 @@ -10420,16 +10424,16 @@ packages: puppeteer: 1.19.0 query-string: 5.1.1 rimraf: 2.6.3 - rollup: 1.17.0 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup: 1.18.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-multi-entry: 2.1.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-replace: 2.2.0 rollup-plugin-shim: 1.0.0 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 - source-map-support: 0.5.12 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-terser: 5.1.1_rollup@1.18.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 + source-map-support: 0.5.13 tslib: 1.10.0 typescript: 3.5.3 uglify-js: 3.6.0 @@ -10498,16 +10502,16 @@ packages: rhea: 1.0.8 rhea-promise: 0.1.15 rimraf: 2.6.3 - rollup: 1.17.0 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup: 1.18.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-inject: 3.0.1 rollup-plugin-json: 4.0.0 rollup-plugin-multi-entry: 2.1.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-replace: 2.2.0 rollup-plugin-shim: 1.0.0 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-terser: 5.1.1_rollup@1.17.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-terser: 5.1.1_rollup@1.18.0 ts-node: 7.0.1 tslib: 1.10.0 typescript: 3.5.3 @@ -10569,16 +10573,16 @@ packages: puppeteer: 1.19.0 query-string: 5.1.1 rimraf: 2.6.3 - rollup: 1.17.0 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup: 1.18.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-multi-entry: 2.1.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-replace: 2.2.0 rollup-plugin-shim: 1.0.0 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 - source-map-support: 0.5.12 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-terser: 5.1.1_rollup@1.18.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 + source-map-support: 0.5.13 ts-node: 7.0.1 tslib: 1.10.0 typescript: 3.5.3 @@ -10640,16 +10644,16 @@ packages: puppeteer: 1.19.0 query-string: 5.1.1 rimraf: 2.6.3 - rollup: 1.17.0 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup: 1.18.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-multi-entry: 2.1.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-replace: 2.2.0 rollup-plugin-shim: 1.0.0 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 - source-map-support: 0.5.12 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-terser: 5.1.1_rollup@1.18.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 + source-map-support: 0.5.13 ts-node: 7.0.1 tslib: 1.10.0 typescript: 3.5.3 @@ -10710,16 +10714,16 @@ packages: puppeteer: 1.19.0 query-string: 5.1.1 rimraf: 2.6.3 - rollup: 1.17.0 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup: 1.18.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-multi-entry: 2.1.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-replace: 2.2.0 rollup-plugin-shim: 1.0.0 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 - source-map-support: 0.5.12 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-terser: 5.1.1_rollup@1.18.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 + source-map-support: 0.5.13 ts-node: 7.0.1 tslib: 1.10.0 typescript: 3.5.3 @@ -10764,15 +10768,15 @@ packages: mocha-multi: 1.1.0_mocha@5.2.0 prettier: 1.18.2 rimraf: 2.6.3 - rollup: 1.17.0 - rollup-plugin-commonjs: 10.0.1_rollup@1.17.0 + rollup: 1.18.0 + rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-json: 4.0.0 rollup-plugin-multi-entry: 2.1.0 - rollup-plugin-node-resolve: 5.2.0_rollup@1.17.0 + rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-replace: 2.2.0 - rollup-plugin-sourcemaps: 0.4.2_rollup@1.17.0 - rollup-plugin-terser: 5.1.1_rollup@1.17.0 - rollup-plugin-visualizer: 2.5.4_rollup@1.17.0 + rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-terser: 5.1.1_rollup@1.18.0 + rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 tslib: 1.10.0 typescript: 3.5.3 util: 0.11.1 diff --git a/sdk/keyvault/keyvault-keys/src/index.ts b/sdk/keyvault/keyvault-keys/src/index.ts index 891f8ed0ae94..0be7cc8bb008 100644 --- a/sdk/keyvault/keyvault-keys/src/index.ts +++ b/sdk/keyvault/keyvault-keys/src/index.ts @@ -312,12 +312,23 @@ export class KeysClient { delete unflattenedOptions.expires; delete unflattenedOptions.requestOptions; + const span: Span = TracerProxy.getTracer().startSpan( + "createEcKeyMethod", + options.requestOptions ? options.requestOptions.spanOptions : undefined + ); + if (options.requestOptions && options.requestOptions.spanOptions) { + options.requestOptions.spanOptions.parent = span; + } + span.start(); + const response = await this.client.createKey( this.vaultBaseUrl, name, options.hsm ? "EC-HSM" : "EC", unflattenedOptions ); + + span.end(); return this.getKeyFromKeyBundle(response); } else { const response = await this.client.createKey(this.vaultBaseUrl, name, "EC", options); @@ -359,12 +370,23 @@ export class KeysClient { delete unflattenedOptions.expires; delete unflattenedOptions.requestOptions; + const span: Span = TracerProxy.getTracer().startSpan( + "createRsaKeyMethod", + options.requestOptions ? options.requestOptions.spanOptions : undefined + ); + if (options.requestOptions && options.requestOptions.spanOptions) { + options.requestOptions.spanOptions.parent = span; + } + span.start(); + const response = await this.client.createKey( this.vaultBaseUrl, name, options.hsm ? "RSA-HSM" : "RSA", unflattenedOptions ); + + span.end(); return this.getKeyFromKeyBundle(response); } else { const response = await this.client.createKey(this.vaultBaseUrl, name, "RSA", options); @@ -406,12 +428,23 @@ export class KeysClient { delete unflattenedOptions.expires; delete unflattenedOptions.requestOptions; + const span: Span = TracerProxy.getTracer().startSpan( + "importKeyMethod", + options.requestOptions ? options.requestOptions.spanOptions : undefined + ); + if (options.requestOptions && options.requestOptions.spanOptions) { + options.requestOptions.spanOptions.parent = span; + } + span.start(); + const response = await this.client.importKey( this.vaultBaseUrl, name, key, unflattenedOptions ); + + span.end(); return this.getKeyFromKeyBundle(response); } else { const response = await this.client.importKey(this.vaultBaseUrl, name, key, options); @@ -499,12 +532,23 @@ export class KeysClient { delete unflattenedOptions.expires; delete unflattenedOptions.requestOptions; + const span: Span = TracerProxy.getTracer().startSpan( + "updateKeyMethod", + options.requestOptions ? options.requestOptions.spanOptions : undefined + ); + if (options.requestOptions && options.requestOptions.spanOptions) { + options.requestOptions.spanOptions.parent = span; + } + span.start(); + const response = await this.client.updateKey( this.vaultBaseUrl, name, keyVersion, unflattenedOptions ); + + span.end(); return this.getKeyFromKeyBundle(response); } else { const response = await this.client.updateKey(this.vaultBaseUrl, name, keyVersion, options); @@ -567,11 +611,26 @@ export class KeysClient { * @returns Promise */ public async getDeletedKey(name: string, options?: RequestOptions): Promise { + const span: Span = TracerProxy.getTracer().startSpan( + "getDeletedKeyMethod", + options + ? options.requestOptions + ? options.requestOptions.spanOptions + : undefined + : undefined + ); + if (options && options.requestOptions && options.requestOptions.spanOptions) { + options.requestOptions.spanOptions.parent = span; + } + span.start(); + const response = await this.client.getDeletedKey( this.vaultBaseUrl, name, options ? options.requestOptions : {} ); + + span.end(); return this.getKeyFromKeyBundle(response); } @@ -593,11 +652,26 @@ export class KeysClient { * @returns Promise */ public async purgeDeletedKey(name: string, options?: RequestOptions): Promise { + const span: Span = TracerProxy.getTracer().startSpan( + "purgeDeletedKeyMethod", + options + ? options.requestOptions + ? options.requestOptions.spanOptions + : undefined + : undefined + ); + if (options && options.requestOptions && options.requestOptions.spanOptions) { + options.requestOptions.spanOptions.parent = span; + } + span.start(); + await this.client.purgeDeletedKey( this.vaultBaseUrl, name, options ? options.requestOptions : {} ); + + span.end(); } /** @@ -617,11 +691,26 @@ export class KeysClient { * @returns Promise */ public async recoverDeletedKey(name: string, options?: RequestOptions): Promise { + const span: Span = TracerProxy.getTracer().startSpan( + "recoverDeletedKeyMethod", + options + ? options.requestOptions + ? options.requestOptions.spanOptions + : undefined + : undefined + ); + if (options && options.requestOptions && options.requestOptions.spanOptions) { + options.requestOptions.spanOptions.parent = span; + } + span.start(); + const response = await this.client.recoverDeletedKey( this.vaultBaseUrl, name, options ? options.requestOptions : {} ); + + span.end(); return this.getKeyFromKeyBundle(response); } @@ -640,11 +729,26 @@ export class KeysClient { * @returns Promise */ public async backupKey(name: string, options?: RequestOptions): Promise { + const span: Span = TracerProxy.getTracer().startSpan( + "backupKeyMethod", + options + ? options.requestOptions + ? options.requestOptions.spanOptions + : undefined + : undefined + ); + if (options && options.requestOptions && options.requestOptions.spanOptions) { + options.requestOptions.spanOptions.parent = span; + } + span.start(); + const response = await this.client.backupKey( this.vaultBaseUrl, name, options ? options.requestOptions : {} ); + + span.end(); return response.value; } @@ -665,11 +769,24 @@ export class KeysClient { * @returns Promise */ public async restoreKey(backup: Uint8Array, options?: RequestOptions): Promise { + const span: Span = TracerProxy.getTracer().startSpan( + "restoreKeyMethod", + options + ? options.requestOptions + ? options.requestOptions.spanOptions + : undefined + : undefined + ); + if (options && options.requestOptions && options.requestOptions.spanOptions) { + options.requestOptions.spanOptions.parent = span; + } + span.start(); const response = await this.client.restoreKey( this.vaultBaseUrl, backup, options ? options.requestOptions : {} ); + span.end(); return this.getKeyFromKeyBundle(response); } @@ -734,7 +851,22 @@ export class KeysClient { name: string, options?: ListKeysOptions ): PagedAsyncIterableIterator { + const span: Span = TracerProxy.getTracer().startSpan( + "listKeyVersionsMethod", + options + ? options.requestOptions + ? options.requestOptions.spanOptions + : undefined + : undefined + ); + if (options && options.requestOptions && options.requestOptions.spanOptions) { + options.requestOptions.spanOptions.parent = span; + } + span.start(); + const iter = this.listKeyVersionsAll(name, options); + + span.end(); return { next() { return iter.next(); @@ -882,7 +1014,22 @@ export class KeysClient { public listDeletedKeys( options?: ListKeysOptions ): PagedAsyncIterableIterator { + const span: Span = TracerProxy.getTracer().startSpan( + "listDeletedKeysMethod", + options + ? options.requestOptions + ? options.requestOptions.spanOptions + : undefined + : undefined + ); + if (options && options.requestOptions && options.requestOptions.spanOptions) { + options.requestOptions.spanOptions.parent = span; + } + span.start(); + const iter = this.listDeletedKeysAll(options); + + span.end(); return { next() { return iter.next(); From 9af78bfbf18f5fddb4695d39aac824d4178a9db6 Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Thu, 1 Aug 2019 12:55:33 -0700 Subject: [PATCH 16/23] Minor Optimization --- sdk/keyvault/keyvault-keys/src/index.ts | 80 ++++++++----------------- 1 file changed, 25 insertions(+), 55 deletions(-) diff --git a/sdk/keyvault/keyvault-keys/src/index.ts b/sdk/keyvault/keyvault-keys/src/index.ts index 0be7cc8bb008..a72e4bc96059 100644 --- a/sdk/keyvault/keyvault-keys/src/index.ts +++ b/sdk/keyvault/keyvault-keys/src/index.ts @@ -256,7 +256,7 @@ export class KeysClient { const span: Span = TracerProxy.getTracer().startSpan( "createKeyMethod", - options.requestOptions ? options.requestOptions.spanOptions : undefined + this.getSpanOptions(options) ); if (options.requestOptions && options.requestOptions.spanOptions) { options.requestOptions.spanOptions.parent = span; @@ -314,7 +314,7 @@ export class KeysClient { const span: Span = TracerProxy.getTracer().startSpan( "createEcKeyMethod", - options.requestOptions ? options.requestOptions.spanOptions : undefined + this.getSpanOptions(options) ); if (options.requestOptions && options.requestOptions.spanOptions) { options.requestOptions.spanOptions.parent = span; @@ -372,7 +372,7 @@ export class KeysClient { const span: Span = TracerProxy.getTracer().startSpan( "createRsaKeyMethod", - options.requestOptions ? options.requestOptions.spanOptions : undefined + this.getSpanOptions(options) ); if (options.requestOptions && options.requestOptions.spanOptions) { options.requestOptions.spanOptions.parent = span; @@ -430,7 +430,7 @@ export class KeysClient { const span: Span = TracerProxy.getTracer().startSpan( "importKeyMethod", - options.requestOptions ? options.requestOptions.spanOptions : undefined + this.getSpanOptions(options) ); if (options.requestOptions && options.requestOptions.spanOptions) { options.requestOptions.spanOptions.parent = span; @@ -470,11 +470,7 @@ export class KeysClient { public async deleteKey(name: string, options?: RequestOptions): Promise { const span: Span = TracerProxy.getTracer().startSpan( "deleteKeyMethod", - options - ? options.requestOptions - ? options.requestOptions.spanOptions - : undefined - : undefined + this.getSpanOptions(options) ); if (options && options.requestOptions && options.requestOptions.spanOptions) { @@ -534,7 +530,7 @@ export class KeysClient { const span: Span = TracerProxy.getTracer().startSpan( "updateKeyMethod", - options.requestOptions ? options.requestOptions.spanOptions : undefined + this.getSpanOptions(options) ); if (options.requestOptions && options.requestOptions.spanOptions) { options.requestOptions.spanOptions.parent = span; @@ -573,11 +569,7 @@ export class KeysClient { public async getKey(name: string, options?: GetKeyOptions): Promise { const span: Span = TracerProxy.getTracer().startSpan( "getKeyMethod", - options - ? options.requestOptions - ? options.requestOptions.spanOptions - : undefined - : undefined + this.getSpanOptions(options) ); if (options && options.requestOptions && options.requestOptions.spanOptions) { options.requestOptions.spanOptions.parent = span; @@ -613,11 +605,7 @@ export class KeysClient { public async getDeletedKey(name: string, options?: RequestOptions): Promise { const span: Span = TracerProxy.getTracer().startSpan( "getDeletedKeyMethod", - options - ? options.requestOptions - ? options.requestOptions.spanOptions - : undefined - : undefined + this.getSpanOptions(options) ); if (options && options.requestOptions && options.requestOptions.spanOptions) { options.requestOptions.spanOptions.parent = span; @@ -654,11 +642,7 @@ export class KeysClient { public async purgeDeletedKey(name: string, options?: RequestOptions): Promise { const span: Span = TracerProxy.getTracer().startSpan( "purgeDeletedKeyMethod", - options - ? options.requestOptions - ? options.requestOptions.spanOptions - : undefined - : undefined + this.getSpanOptions(options) ); if (options && options.requestOptions && options.requestOptions.spanOptions) { options.requestOptions.spanOptions.parent = span; @@ -693,11 +677,7 @@ export class KeysClient { public async recoverDeletedKey(name: string, options?: RequestOptions): Promise { const span: Span = TracerProxy.getTracer().startSpan( "recoverDeletedKeyMethod", - options - ? options.requestOptions - ? options.requestOptions.spanOptions - : undefined - : undefined + this.getSpanOptions(options) ); if (options && options.requestOptions && options.requestOptions.spanOptions) { options.requestOptions.spanOptions.parent = span; @@ -731,11 +711,7 @@ export class KeysClient { public async backupKey(name: string, options?: RequestOptions): Promise { const span: Span = TracerProxy.getTracer().startSpan( "backupKeyMethod", - options - ? options.requestOptions - ? options.requestOptions.spanOptions - : undefined - : undefined + this.getSpanOptions(options) ); if (options && options.requestOptions && options.requestOptions.spanOptions) { options.requestOptions.spanOptions.parent = span; @@ -771,11 +747,7 @@ export class KeysClient { public async restoreKey(backup: Uint8Array, options?: RequestOptions): Promise { const span: Span = TracerProxy.getTracer().startSpan( "restoreKeyMethod", - options - ? options.requestOptions - ? options.requestOptions.spanOptions - : undefined - : undefined + this.getSpanOptions(options) ); if (options && options.requestOptions && options.requestOptions.spanOptions) { options.requestOptions.spanOptions.parent = span; @@ -853,11 +825,7 @@ export class KeysClient { ): PagedAsyncIterableIterator { const span: Span = TracerProxy.getTracer().startSpan( "listKeyVersionsMethod", - options - ? options.requestOptions - ? options.requestOptions.spanOptions - : undefined - : undefined + this.getSpanOptions(options) ); if (options && options.requestOptions && options.requestOptions.spanOptions) { options.requestOptions.spanOptions.parent = span; @@ -932,11 +900,7 @@ export class KeysClient { ): PagedAsyncIterableIterator { const span: Span = TracerProxy.getTracer().startSpan( "listKeysMethod", - options - ? options.requestOptions - ? options.requestOptions.spanOptions - : undefined - : undefined + this.getSpanOptions(options) ); if (options && options.requestOptions && options.requestOptions.spanOptions) { options.requestOptions.spanOptions.parent = span; @@ -1016,11 +980,7 @@ export class KeysClient { ): PagedAsyncIterableIterator { const span: Span = TracerProxy.getTracer().startSpan( "listDeletedKeysMethod", - options - ? options.requestOptions - ? options.requestOptions.spanOptions - : undefined - : undefined + this.getSpanOptions(options) ); if (options && options.requestOptions && options.requestOptions.spanOptions) { options.requestOptions.spanOptions.parent = span; @@ -1087,4 +1047,14 @@ export class KeysClient { return resultObject; } + + private getSpanOptions( + options?: ListKeysOptions | RequestOptions | GetKeyOptions | UpdateKeyOptions + ): any { + return options + ? options.requestOptions + ? options.requestOptions.spanOptions + : undefined + : undefined; + } } From aca53f56b7587cd4a8840a5ab9d4bd5da7bffacf Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Thu, 1 Aug 2019 13:12:03 -0700 Subject: [PATCH 17/23] Further optimization --- sdk/keyvault/keyvault-keys/src/index.ts | 152 ++++++++++-------------- 1 file changed, 60 insertions(+), 92 deletions(-) diff --git a/sdk/keyvault/keyvault-keys/src/index.ts b/sdk/keyvault/keyvault-keys/src/index.ts index a72e4bc96059..a0d014726378 100644 --- a/sdk/keyvault/keyvault-keys/src/index.ts +++ b/sdk/keyvault/keyvault-keys/src/index.ts @@ -254,12 +254,10 @@ export class KeysClient { delete unflattenedOptions.expires; delete unflattenedOptions.requestOptions; - const span: Span = TracerProxy.getTracer().startSpan( - "createKeyMethod", - this.getSpanOptions(options) - ); - if (options.requestOptions && options.requestOptions.spanOptions) { - options.requestOptions.spanOptions.parent = span; + const spanOptions = this.getSpanOptions(options); + const span: Span = TracerProxy.getTracer().startSpan("createKeyMethod", spanOptions); + if (spanOptions) { + spanOptions.parent = span; } span.start(); @@ -312,12 +310,10 @@ export class KeysClient { delete unflattenedOptions.expires; delete unflattenedOptions.requestOptions; - const span: Span = TracerProxy.getTracer().startSpan( - "createEcKeyMethod", - this.getSpanOptions(options) - ); - if (options.requestOptions && options.requestOptions.spanOptions) { - options.requestOptions.spanOptions.parent = span; + const spanOptions = this.getSpanOptions(options); + const span: Span = TracerProxy.getTracer().startSpan("createEcKeyMethod", spanOptions); + if (spanOptions) { + spanOptions.parent = span; } span.start(); @@ -370,12 +366,10 @@ export class KeysClient { delete unflattenedOptions.expires; delete unflattenedOptions.requestOptions; - const span: Span = TracerProxy.getTracer().startSpan( - "createRsaKeyMethod", - this.getSpanOptions(options) - ); - if (options.requestOptions && options.requestOptions.spanOptions) { - options.requestOptions.spanOptions.parent = span; + const spanOptions = this.getSpanOptions(options); + const span: Span = TracerProxy.getTracer().startSpan("createRsaKeyMethod", spanOptions); + if (spanOptions) { + spanOptions.parent = span; } span.start(); @@ -428,12 +422,10 @@ export class KeysClient { delete unflattenedOptions.expires; delete unflattenedOptions.requestOptions; - const span: Span = TracerProxy.getTracer().startSpan( - "importKeyMethod", - this.getSpanOptions(options) - ); - if (options.requestOptions && options.requestOptions.spanOptions) { - options.requestOptions.spanOptions.parent = span; + const spanOptions = this.getSpanOptions(options); + const span: Span = TracerProxy.getTracer().startSpan("importKeyMethod", spanOptions); + if (spanOptions) { + spanOptions.parent = span; } span.start(); @@ -468,15 +460,11 @@ export class KeysClient { * @returns Promise */ public async deleteKey(name: string, options?: RequestOptions): Promise { - const span: Span = TracerProxy.getTracer().startSpan( - "deleteKeyMethod", - this.getSpanOptions(options) - ); - - if (options && options.requestOptions && options.requestOptions.spanOptions) { - options.requestOptions.spanOptions.parent = span; + const spanOptions = this.getSpanOptions(options); + const span: Span = TracerProxy.getTracer().startSpan("deleteKeyMethod", spanOptions); + if (spanOptions) { + spanOptions.parent = span; } - span.start(); const response = await this.client.deleteKey( @@ -528,12 +516,10 @@ export class KeysClient { delete unflattenedOptions.expires; delete unflattenedOptions.requestOptions; - const span: Span = TracerProxy.getTracer().startSpan( - "updateKeyMethod", - this.getSpanOptions(options) - ); - if (options.requestOptions && options.requestOptions.spanOptions) { - options.requestOptions.spanOptions.parent = span; + const spanOptions = this.getSpanOptions(options); + const span: Span = TracerProxy.getTracer().startSpan("updateKeyMethod", spanOptions); + if (spanOptions) { + spanOptions.parent = span; } span.start(); @@ -567,12 +553,10 @@ export class KeysClient { * @returns Promise */ public async getKey(name: string, options?: GetKeyOptions): Promise { - const span: Span = TracerProxy.getTracer().startSpan( - "getKeyMethod", - this.getSpanOptions(options) - ); - if (options && options.requestOptions && options.requestOptions.spanOptions) { - options.requestOptions.spanOptions.parent = span; + const spanOptions = this.getSpanOptions(options); + const span: Span = TracerProxy.getTracer().startSpan("getKeyMethod", spanOptions); + if (spanOptions) { + spanOptions.parent = span; } span.start(); @@ -603,12 +587,10 @@ export class KeysClient { * @returns Promise */ public async getDeletedKey(name: string, options?: RequestOptions): Promise { - const span: Span = TracerProxy.getTracer().startSpan( - "getDeletedKeyMethod", - this.getSpanOptions(options) - ); - if (options && options.requestOptions && options.requestOptions.spanOptions) { - options.requestOptions.spanOptions.parent = span; + const spanOptions = this.getSpanOptions(options); + const span: Span = TracerProxy.getTracer().startSpan("getDeletedKeyMethod", spanOptions); + if (spanOptions) { + spanOptions.parent = span; } span.start(); @@ -640,12 +622,10 @@ export class KeysClient { * @returns Promise */ public async purgeDeletedKey(name: string, options?: RequestOptions): Promise { - const span: Span = TracerProxy.getTracer().startSpan( - "purgeDeletedKeyMethod", - this.getSpanOptions(options) - ); - if (options && options.requestOptions && options.requestOptions.spanOptions) { - options.requestOptions.spanOptions.parent = span; + const spanOptions = this.getSpanOptions(options); + const span: Span = TracerProxy.getTracer().startSpan("purgeDeletedKeyMethod", spanOptions); + if (spanOptions) { + spanOptions.parent = span; } span.start(); @@ -675,12 +655,10 @@ export class KeysClient { * @returns Promise */ public async recoverDeletedKey(name: string, options?: RequestOptions): Promise { - const span: Span = TracerProxy.getTracer().startSpan( - "recoverDeletedKeyMethod", - this.getSpanOptions(options) - ); - if (options && options.requestOptions && options.requestOptions.spanOptions) { - options.requestOptions.spanOptions.parent = span; + const spanOptions = this.getSpanOptions(options); + const span: Span = TracerProxy.getTracer().startSpan("recoverDeletedKeyMethod", spanOptions); + if (spanOptions) { + spanOptions.parent = span; } span.start(); @@ -709,12 +687,10 @@ export class KeysClient { * @returns Promise */ public async backupKey(name: string, options?: RequestOptions): Promise { - const span: Span = TracerProxy.getTracer().startSpan( - "backupKeyMethod", - this.getSpanOptions(options) - ); - if (options && options.requestOptions && options.requestOptions.spanOptions) { - options.requestOptions.spanOptions.parent = span; + const spanOptions = this.getSpanOptions(options); + const span: Span = TracerProxy.getTracer().startSpan("backupKeyMethod", spanOptions); + if (spanOptions) { + spanOptions.parent = span; } span.start(); @@ -745,12 +721,10 @@ export class KeysClient { * @returns Promise */ public async restoreKey(backup: Uint8Array, options?: RequestOptions): Promise { - const span: Span = TracerProxy.getTracer().startSpan( - "restoreKeyMethod", - this.getSpanOptions(options) - ); - if (options && options.requestOptions && options.requestOptions.spanOptions) { - options.requestOptions.spanOptions.parent = span; + const spanOptions = this.getSpanOptions(options); + const span: Span = TracerProxy.getTracer().startSpan("restoreKeyMethod", spanOptions); + if (spanOptions) { + spanOptions.parent = span; } span.start(); const response = await this.client.restoreKey( @@ -823,12 +797,10 @@ export class KeysClient { name: string, options?: ListKeysOptions ): PagedAsyncIterableIterator { - const span: Span = TracerProxy.getTracer().startSpan( - "listKeyVersionsMethod", - this.getSpanOptions(options) - ); - if (options && options.requestOptions && options.requestOptions.spanOptions) { - options.requestOptions.spanOptions.parent = span; + const spanOptions = this.getSpanOptions(options); + const span: Span = TracerProxy.getTracer().startSpan("listKeyVersionsMethod", spanOptions); + if (spanOptions) { + spanOptions.parent = span; } span.start(); @@ -898,12 +870,10 @@ export class KeysClient { public listKeys( options?: ListKeysOptions ): PagedAsyncIterableIterator { - const span: Span = TracerProxy.getTracer().startSpan( - "listKeysMethod", - this.getSpanOptions(options) - ); - if (options && options.requestOptions && options.requestOptions.spanOptions) { - options.requestOptions.spanOptions.parent = span; + const spanOptions = this.getSpanOptions(options); + const span: Span = TracerProxy.getTracer().startSpan("listKeysMethod", spanOptions); + if (spanOptions) { + spanOptions.parent = span; } span.start(); @@ -978,12 +948,10 @@ export class KeysClient { public listDeletedKeys( options?: ListKeysOptions ): PagedAsyncIterableIterator { - const span: Span = TracerProxy.getTracer().startSpan( - "listDeletedKeysMethod", - this.getSpanOptions(options) - ); - if (options && options.requestOptions && options.requestOptions.spanOptions) { - options.requestOptions.spanOptions.parent = span; + const spanOptions = this.getSpanOptions(options); + const span: Span = TracerProxy.getTracer().startSpan("listDeletedKeysMethod", spanOptions); + if (spanOptions) { + spanOptions.parent = span; } span.start(); From 25ba6f249cea35203ecc8168c262f84d7b43007c Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Thu, 1 Aug 2019 13:33:04 -0700 Subject: [PATCH 18/23] Implement NoOp --- common/config/rush/pnpm-lock.yaml | 20 +++++++------- .../lib/implementations/noop/spanNoOpImpl.ts | 8 ++---- .../lib/plugins/noop/noOpSpanPlugin.ts | 27 ++++++++++++++----- .../lib/plugins/noop/noOpTracePlugin.ts | 11 +++++--- .../opencensus/openCensusTracePlugin.ts | 12 ++++----- 5 files changed, 47 insertions(+), 31 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 6e7d6343e589..90b88bafd294 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -33,7 +33,7 @@ dependencies: '@rush-temp/testhub': 'file:projects/testhub.tgz' '@types/async-lock': 1.1.1 '@types/chai': 4.1.7 - '@types/chai-as-promised': 7.1.0 + '@types/chai-as-promised': 7.1.1 '@types/chai-string': 1.4.1 '@types/debug': 0.0.31 '@types/dotenv': 6.1.1 @@ -507,12 +507,12 @@ packages: dev: false resolution: integrity: sha512-a2+YeUjPkztKJu5aIF2yArYFQQp8d51wZ7DavSHjFuY1mqVgidGyzEQ41JIVNy82fXj8yPgy2vJmfIywgESW6w== - /@types/chai-as-promised/7.1.0: + /@types/chai-as-promised/7.1.1: dependencies: '@types/chai': 4.1.7 dev: false resolution: - integrity: sha512-MFiW54UOSt+f2bRw8J7LgQeIvE/9b4oGvwU7XW30S9QGAiHGnU/fmiOprsyMkdmH2rl8xSPc0/yrQw8juXU6bQ== + integrity: sha512-dberBxQW/XWv6BMj0su1lV9/C9AUx5Hqu2pisuS6S4YK/Qt6vurcj/BmcbEsobIWWCQzhesNY8k73kIxx4X7Mg== /@types/chai-string/1.4.1: dependencies: '@types/chai': 4.1.7 @@ -655,10 +655,10 @@ packages: dev: false resolution: integrity: sha512-OthuN+2FuzfZO3yONJ/QVjKmLEuRagS9TV9lEId+WHL9KhftYG+/2z+pxlr0UgVVXSpVD8woie/3fzQn8ft/Ow== - /@types/node/12.6.8: + /@types/node/12.6.9: dev: false resolution: - integrity: sha512-aX+gFgA5GHcDi89KG5keey2zf0WfZk/HAQotEamsK2kbey+8yGKcson0hbK8E+v0NArlCJQCqMP161YhV6ZXLg== + integrity: sha512-+YB9FtyxXGyD54p8rXwWaN1EWEyar5L58GlGWgtH2I9rGmLGBQcw63+0jw+ujqVavNuO47S1ByAjm9zdHMnskw== /@types/node/8.10.51: dev: false resolution: @@ -7907,7 +7907,7 @@ packages: /rollup/1.18.0: dependencies: '@types/estree': 0.0.39 - '@types/node': 12.6.8 + '@types/node': 12.6.9 acorn: 6.2.1 dev: false hasBin: true @@ -9710,7 +9710,7 @@ packages: '@azure/abort-controller': 1.0.0-preview.1 '@types/async-lock': 1.1.1 '@types/chai': 4.1.7 - '@types/chai-as-promised': 7.1.0 + '@types/chai-as-promised': 7.1.1 '@types/debug': 0.0.31 '@types/dotenv': 6.1.1 '@types/is-buffer': 2.0.0 @@ -10099,7 +10099,7 @@ packages: '@microsoft/api-extractor': 7.3.4 '@types/async-lock': 1.1.1 '@types/chai': 4.1.7 - '@types/chai-as-promised': 7.1.0 + '@types/chai-as-promised': 7.1.1 '@types/chai-string': 1.4.1 '@types/debug': 0.0.31 '@types/dotenv': 6.1.1 @@ -10175,7 +10175,7 @@ packages: '@microsoft/api-extractor': 7.3.4 '@types/async-lock': 1.1.1 '@types/chai': 4.1.7 - '@types/chai-as-promised': 7.1.0 + '@types/chai-as-promised': 7.1.1 '@types/chai-string': 1.4.1 '@types/debug': 0.0.31 '@types/dotenv': 6.1.1 @@ -10452,7 +10452,7 @@ packages: '@microsoft/api-extractor': 7.3.4 '@types/async-lock': 1.1.1 '@types/chai': 4.1.7 - '@types/chai-as-promised': 7.1.0 + '@types/chai-as-promised': 7.1.1 '@types/debug': 0.0.31 '@types/dotenv': 6.1.1 '@types/is-buffer': 2.0.0 diff --git a/sdk/core/core-tracing/lib/implementations/noop/spanNoOpImpl.ts b/sdk/core/core-tracing/lib/implementations/noop/spanNoOpImpl.ts index 1718a3eb9c66..0b602b907960 100644 --- a/sdk/core/core-tracing/lib/implementations/noop/spanNoOpImpl.ts +++ b/sdk/core/core-tracing/lib/implementations/noop/spanNoOpImpl.ts @@ -25,12 +25,8 @@ export class SpanNoOpImpl implements Span { updateName(name: string): this { throw new Error("Method not implemented."); } - start(startTime?: number | undefined): void { - throw new Error("Method not implemented."); - } - end(endTime?: number | undefined): void { - throw new Error("Method not implemented."); - } + start(startTime?: number): void {} + end(endTime?: number): void {} isRecordingEvents(): boolean { throw new Error("Method not implemented."); } diff --git a/sdk/core/core-tracing/lib/plugins/noop/noOpSpanPlugin.ts b/sdk/core/core-tracing/lib/plugins/noop/noOpSpanPlugin.ts index bbbc016e6120..11d96ac5edc4 100644 --- a/sdk/core/core-tracing/lib/plugins/noop/noOpSpanPlugin.ts +++ b/sdk/core/core-tracing/lib/plugins/noop/noOpSpanPlugin.ts @@ -4,33 +4,48 @@ import { Attributes } from "../../interfaces/attributes"; import { Status } from "../../interfaces/status"; export class NoOpSpanPlugin implements Span { + private _span: any; + + constructor(span: any) { + this._span = span; + } + context(): SpanContext { throw new Error("Method not implemented."); } + + end(endTime?: number): void { + this._span.end(endTime); + } + + start(startTime?: number): void { + this._span.start(startTime); + } + setAttribute(key: string, value: unknown): this { throw new Error("Method not implemented."); } + setAttributes(attributes: Attributes): this { throw new Error("Method not implemented."); } + addEvent(name: string, attributes?: Attributes): this { throw new Error("Method not implemented."); } + addLink(spanContext: SpanContext, attributes?: Attributes): this { throw new Error("Method not implemented."); } + setStatus(status: Status): this { throw new Error("Method not implemented."); } + updateName(name: string): this { throw new Error("Method not implemented."); } - start(startTime?: number | undefined): void { - throw new Error("Method not implemented."); - } - end(endTime?: number): void { - throw new Error("Method not implemented."); - } + isRecordingEvents(): boolean { throw new Error("Method not implemented."); } diff --git a/sdk/core/core-tracing/lib/plugins/noop/noOpTracePlugin.ts b/sdk/core/core-tracing/lib/plugins/noop/noOpTracePlugin.ts index 9477850862b3..4161a78f3dd7 100644 --- a/sdk/core/core-tracing/lib/plugins/noop/noOpTracePlugin.ts +++ b/sdk/core/core-tracing/lib/plugins/noop/noOpTracePlugin.ts @@ -1,6 +1,8 @@ import { Tracer } from "../../interfaces/tracer"; import { Span } from "../../interfaces/span"; import { SpanOptions } from "../../interfaces/SpanOptions"; +import { NoOpSpanPlugin } from "./noOpSpanPlugin"; +import { SpanNoOpImpl } from "../../implementations/noop/spanNoOpImpl"; export class NoOpTracePlugin implements Tracer { private _tracer: any; @@ -9,10 +11,13 @@ export class NoOpTracePlugin implements Tracer { this._tracer = tracer; } - getCurrentSpan(): Span { - throw new Error("Method not implemented."); + startSpan(name: string, options?: SpanOptions): Span { + const span = new SpanNoOpImpl(); + const noOpSpanPlugin = new NoOpSpanPlugin(span); + return noOpSpanPlugin; } - startSpan(name: string, options?: SpanOptions | undefined): Span { + + getCurrentSpan(): Span { throw new Error("Method not implemented."); } withSpan unknown>(span: Span, fn: T): ReturnType { diff --git a/sdk/core/core-tracing/lib/plugins/opencensus/openCensusTracePlugin.ts b/sdk/core/core-tracing/lib/plugins/opencensus/openCensusTracePlugin.ts index b4c86e2940c0..1e1cdb086156 100644 --- a/sdk/core/core-tracing/lib/plugins/opencensus/openCensusTracePlugin.ts +++ b/sdk/core/core-tracing/lib/plugins/opencensus/openCensusTracePlugin.ts @@ -1,7 +1,6 @@ import { Tracer } from "../../interfaces/tracer"; import { SpanOptions } from "../../interfaces/SpanOptions"; import { Span } from "../../interfaces/span"; -// import { TracerProxy } from "../../tracerProxy"; import { OpenCensusSpanPlugin } from "../opencensus/openCensusSpanPlugin"; export class OpenCensusTracePlugin implements Tracer { @@ -12,12 +11,13 @@ export class OpenCensusTracePlugin implements Tracer { } startSpan(name: string, options?: SpanOptions): Span { - const parent = - options ? - options.parent ? - options.parent instanceof OpenCensusSpanPlugin ? options.parent.getSpan() : options.parent + const parent = options + ? options.parent + ? options.parent instanceof OpenCensusSpanPlugin + ? options.parent.getSpan() + : options.parent : undefined - :undefined + : undefined; const span = this._tracer.startChildSpan({ name: name, From 6c3de84fd7f7b7cbd3c251a390d05f1cba6fe252 Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Thu, 1 Aug 2019 13:48:19 -0700 Subject: [PATCH 19/23] Add NoOp Impl --- .../core-tracing/lib/implementations/noop/tracerNoOpImpl.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/core/core-tracing/lib/implementations/noop/tracerNoOpImpl.ts b/sdk/core/core-tracing/lib/implementations/noop/tracerNoOpImpl.ts index 455fc11853cd..8d00b5392c39 100644 --- a/sdk/core/core-tracing/lib/implementations/noop/tracerNoOpImpl.ts +++ b/sdk/core/core-tracing/lib/implementations/noop/tracerNoOpImpl.ts @@ -1,13 +1,14 @@ import { Tracer } from "../../interfaces/tracer"; import { SpanOptions } from "../../interfaces/SpanOptions"; import { Span } from "../../interfaces/span"; +import { SpanNoOpImpl } from "./spanNoOpImpl"; export class TracerNoOpImpl implements Tracer { getCurrentSpan(): Span { throw new Error("Method not implemented."); } startSpan(name: string, options?: SpanOptions | undefined): Span { - throw new Error("Method not implemented."); + return new SpanNoOpImpl(); } withSpan unknown>(span: Span, fn: T): ReturnType { throw new Error("Method not implemented."); From 2934dd4e036e726999dc6bee5548d44ffd2e9687 Mon Sep 17 00:00:00 2001 From: Ramya Achutha Rao Date: Thu, 1 Aug 2019 17:31:44 -0700 Subject: [PATCH 20/23] Update core-tracing to follow template --- sdk/core/core-tracing/.typings/karma.d.ts | 10 - .../.typings/rollup-plugin-alias.d.ts | 4 - .../.typings/rollup-plugin-commonjs.d.ts | 4 - .../.typings/rollup-plugin-json.d.ts | 4 - .../.typings/rollup-plugin-multi-entry.d.ts | 4 - .../.typings/rollup-plugin-node-resolve.d.ts | 4 - .../.typings/rollup-plugin-sourcemaps.d.ts | 4 - .../.typings/rollup-plugin-visualizer.d.ts | 4 - sdk/core/core-tracing/api-extractor.json | 32 ++ sdk/core/core-tracing/package.json | 183 ++++-------- .../core-tracing/review/core-tracing.api.md | 274 ++++++++++++++++++ sdk/core/core-tracing/rollup.base.config.js | 105 +++++++ sdk/core/core-tracing/rollup.config.js | 14 + sdk/core/core-tracing/rollup.config.ts | 83 ------ sdk/core/core-tracing/rollup.test.config.js | 3 + sdk/core/core-tracing/tsconfig.es.json | 7 - sdk/core/core-tracing/tsconfig.json | 87 ++++-- 17 files changed, 539 insertions(+), 287 deletions(-) delete mode 100644 sdk/core/core-tracing/.typings/karma.d.ts delete mode 100644 sdk/core/core-tracing/.typings/rollup-plugin-alias.d.ts delete mode 100644 sdk/core/core-tracing/.typings/rollup-plugin-commonjs.d.ts delete mode 100644 sdk/core/core-tracing/.typings/rollup-plugin-json.d.ts delete mode 100644 sdk/core/core-tracing/.typings/rollup-plugin-multi-entry.d.ts delete mode 100644 sdk/core/core-tracing/.typings/rollup-plugin-node-resolve.d.ts delete mode 100644 sdk/core/core-tracing/.typings/rollup-plugin-sourcemaps.d.ts delete mode 100644 sdk/core/core-tracing/.typings/rollup-plugin-visualizer.d.ts create mode 100644 sdk/core/core-tracing/api-extractor.json create mode 100644 sdk/core/core-tracing/review/core-tracing.api.md create mode 100644 sdk/core/core-tracing/rollup.base.config.js create mode 100644 sdk/core/core-tracing/rollup.config.js delete mode 100644 sdk/core/core-tracing/rollup.config.ts create mode 100644 sdk/core/core-tracing/rollup.test.config.js delete mode 100644 sdk/core/core-tracing/tsconfig.es.json diff --git a/sdk/core/core-tracing/.typings/karma.d.ts b/sdk/core/core-tracing/.typings/karma.d.ts deleted file mode 100644 index b34d9a505976..000000000000 --- a/sdk/core/core-tracing/.typings/karma.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import * as karma from "karma"; - -export type Config = karma.Config & { - rollupPreprocessor: any; - set: (config: ConfigOptions) => void; -} - -export type ConfigOptions = karma.ConfigOptions & { - rollupPreprocessor: any; -} diff --git a/sdk/core/core-tracing/.typings/rollup-plugin-alias.d.ts b/sdk/core/core-tracing/.typings/rollup-plugin-alias.d.ts deleted file mode 100644 index 3b79bc14d15d..000000000000 --- a/sdk/core/core-tracing/.typings/rollup-plugin-alias.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module "rollup-plugin-alias" { - const alias(options: { [_: string]: string }) => void; - export default alias; -} diff --git a/sdk/core/core-tracing/.typings/rollup-plugin-commonjs.d.ts b/sdk/core/core-tracing/.typings/rollup-plugin-commonjs.d.ts deleted file mode 100644 index 8bab998dc9dd..000000000000 --- a/sdk/core/core-tracing/.typings/rollup-plugin-commonjs.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module "rollup-plugin-commonjs" { - const commonjs(options?: any) => void; - export default commonjs; -} diff --git a/sdk/core/core-tracing/.typings/rollup-plugin-json.d.ts b/sdk/core/core-tracing/.typings/rollup-plugin-json.d.ts deleted file mode 100644 index f88cf977060b..000000000000 --- a/sdk/core/core-tracing/.typings/rollup-plugin-json.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module "rollup-plugin-json" { - const json() => void; - export default json; -} diff --git a/sdk/core/core-tracing/.typings/rollup-plugin-multi-entry.d.ts b/sdk/core/core-tracing/.typings/rollup-plugin-multi-entry.d.ts deleted file mode 100644 index c06209e91717..000000000000 --- a/sdk/core/core-tracing/.typings/rollup-plugin-multi-entry.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module 'rollup-plugin-multi-entry' { - const multiEntry: () => void; - export default multiEntry; -} diff --git a/sdk/core/core-tracing/.typings/rollup-plugin-node-resolve.d.ts b/sdk/core/core-tracing/.typings/rollup-plugin-node-resolve.d.ts deleted file mode 100644 index f321e5f3319c..000000000000 --- a/sdk/core/core-tracing/.typings/rollup-plugin-node-resolve.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module "rollup-plugin-node-resolve" { - const nodeResolve(options: { [_: string]: any }) => void; - export default nodeResolve; -} diff --git a/sdk/core/core-tracing/.typings/rollup-plugin-sourcemaps.d.ts b/sdk/core/core-tracing/.typings/rollup-plugin-sourcemaps.d.ts deleted file mode 100644 index 310f9a791751..000000000000 --- a/sdk/core/core-tracing/.typings/rollup-plugin-sourcemaps.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module "rollup-plugin-sourcemaps" { - const sourcemaps() => void; - export default sourcemaps; -} diff --git a/sdk/core/core-tracing/.typings/rollup-plugin-visualizer.d.ts b/sdk/core/core-tracing/.typings/rollup-plugin-visualizer.d.ts deleted file mode 100644 index d84ed7df0af3..000000000000 --- a/sdk/core/core-tracing/.typings/rollup-plugin-visualizer.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -declare module "rollup-plugin-visualizer" { - const visualizer(options?: { [_: string]: any }) => void; - export default visualizer; -} diff --git a/sdk/core/core-tracing/api-extractor.json b/sdk/core/core-tracing/api-extractor.json new file mode 100644 index 000000000000..ea431776e9eb --- /dev/null +++ b/sdk/core/core-tracing/api-extractor.json @@ -0,0 +1,32 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", + "mainEntryPointFilePath": "types/index.d.ts", + "docModel": { + "enabled": false + }, + "apiReport": { + "enabled": true, + "reportFolder": "./review" + }, + "dtsRollup": { + "enabled": true, + "untrimmedFilePath": "", + "publicTrimmedFilePath": "./types/core-tracing.d.ts" + }, + "messages": { + "tsdocMessageReporting": { + "default": { + "logLevel": "none" + } + }, + "extractorMessageReporting": { + "ae-missing-release-tag": { + "logLevel": "none" + }, + "ae-unresolved-link": { + "logLevel": "none" + } + } + } + } + \ No newline at end of file diff --git a/sdk/core/core-tracing/package.json b/sdk/core/core-tracing/package.json index e604f9d0bcb1..3badcf3b59e9 100644 --- a/sdk/core/core-tracing/package.json +++ b/sdk/core/core-tracing/package.json @@ -1,172 +1,95 @@ { "name": "@azure/core-tracing", "version": "1.0.0-preview.1", - "description": "Isomorphic client Runtime for Typescript/node.js/browser javascript client libraries generated using AutoRest", + "description": "Provides low-level interfaces and helper methods for tracing in Azure SDK", "sdk-type": "client", - "main": "./dist/index.node.js", - "module": "./es/index.js", - "types": "./es/index.d.ts", - "author": { - "name": "Microsoft Corporation", - "email": "azsdkteam@microsoft.com", - "url": "https://github.com/Azure/azure-sdk-for-js" - }, - "tags": [ - "isomorphic", - "browser", - "javascript", - "node", - "microsoft", - "autorest", - "clientruntime" - ], - "keywords": [ - "isomorphic", - "browser", - "javascript", - "node", - "microsoft", - "autorest", - "clientruntime" - ], - "files": [ - "dist/**/*.js", - "dist/**/*.js.map", - "es/**/*.js", - "es/**/*.js.map", - "es/**/*.d.ts", - "es/**/*.d.ts.map", - "lib/**/*.ts", - "LICENSE", - "README.md", - "ThirdPartyNotices.txt" - ], - "license": "MIT", - "homepage": "https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/tracing", - "repository": { - "type": "git", - "url": "git@github.com:Azure/azure-sdk-for-js.git" - }, - "bugs": { - "url": "http://github.com/Azure/azure-sdk-for-js/issues" + "main": "dist/index.js", + "module": "dist-esm/index.js", + "browser": { + "./dist/index.js": "./browser/index.js" }, + "types": "types/core-tracing.d.ts", "scripts": { "audit": "node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit", - "build": "run-p build:lib", - "build:lib": "run-s build:tsc build:rollup build:minify-browser", - "build:scripts": "tsc -p ./.scripts/", - "build:test": "run-s build build:test-browser", - "build:tsc": "tsc -p tsconfig.es.json", - "build:rollup": "rollup -c rollup.config.ts 2>&1", - "build:minify-browser": "uglifyjs -c -m --comments --source-map \"content='./dist/index.browser.js.map'\" -o ./dist/index.browser.min.js ./dist/index.browser.js", - "build:test-browser": "webpack --config webpack.testconfig.ts", - "check-format": "prettier --list-different --config ../../.prettierrc.json \"lib/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", - "clean": "rimraf ./es ./dist", - "format": "prettier --write --config ../../.prettierrc.json \"lib/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "build:browser": "tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1", + "build:node": "tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1", + "build:samples": "cd samples && tsc -p .", + "build:test": "tsc -p . && rollup -c rollup.test.config.js 2>&1", + "build": "tsc -p . && rollup -c 2>&1 && api-extractor run --local", + "check-format": "prettier --list-different --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", + "clean": "rimraf dist dist-esm test-dist types *.tgz *.log", + "extract-api": "tsc -p . && api-extractor run --local", + "format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"", "integration-test:browser": "echo skipped", "integration-test:node": "echo skipped", "integration-test": "npm run integration-test:node && npm run integration-test:browser", - "lint:fix": "eslint \"lib/**/*.ts\" \"test/**/*.ts\" -c ../../.eslintrc.json --fix --fix-type [problem,suggestion]", - "lint": "eslint -c ../../.eslintrc.json lib test --ext .ts -f node_modules/eslint-detailed-reporter/lib/detailed.js -o core-http-lintReport.html || exit 0", + "lint:fix": "eslint \"src/**/*.ts\" \"test/**/*.ts\" -c ../../.eslintrc.json --fix --fix-type [problem,suggestion]", + "lint": "eslint -c ../../.eslintrc.json src test --ext .ts -f node_modules/eslint-detailed-reporter/lib/detailed.js -o template-lintReport.html || exit 0", "pack": "npm pack 2>&1", "prebuild": "npm run clean", "test:browser": "npm run build:test && npm run unit-test:browser && npm run integration-test:browser", "test:node": "npm run build:test && npm run unit-test:node && npm run integration-test:node", "test": "npm run build:test && npm run unit-test && npm run integration-test", - "unit-test": "npm run unit-test:node && npm run unit-test:browser", - "unit-test:browser": "node ./node_modules/karma/bin/karma start karma.conf.ts --browsers ChromeNoSecurity --single-run", - "unit-test:node": "nyc mocha", - "check:packagejsonversion": "ts-node ./.scripts/checkPackageJsonVersion.ts", - "check:foronlycalls": "ts-node ./.scripts/checkForOnlyCalls.ts", - "check:everything": "ts-node ./.scripts/checkEverything.ts", - "dep:autorest.typescript": "npx ts-node .scripts/testDependentProjects.ts autorest.typescript 'gulp build' 'gulp regenerate' 'npm run local'", - "dep:ms-rest-azure-js": "npx ts-node .scripts/testDependentProjects.ts ms-rest-azure-js", - "publish-preview": "mocha --no-colors && shx rm -rf dist/test && node ./.scripts/publish", - "local": "ts-node ./.scripts/local.ts", - "latest": "ts-node ./.scripts/latest.ts" + "unit-test:browser": "echo skipped", + "unit-test:node": "mocha test-dist/**/*.js --reporter mocha-multi --reporter-options spec=-,mocha-junit-reporter=-", + "unit-test": "npm run unit-test:node && npm run unit-test:browser" + }, + "files": [ + "browser/*.js*", + "dist/", + "dist-esm/", + "src/", + "types/core-tracing.d.ts" + ], + "repository": "github:Azure/azure-sdk-for-js", + "keywords": [ + "azure", + "tracing" + ], + "author": "Microsoft Corporation", + "license": "MIT", + "bugs": { + "url": "https://github.com/azure/azure-sdk-for-js/issues" + }, + "engine": { + "node": ">=6.0.0" }, + "homepage": "https://github.com/azure/azure-sdk-for-js/tree/master/sdk/core/core-tracing", "sideEffects": false, - "nyc": { - "extension": [ - ".ts" - ], - "exclude": [ - "coverage/**/*", - "**/*.d.ts", - "**/*.js" - ], - "reporter": [ - "text", - "html", - "cobertura" - ], - "all": true + "private": true, + "dependencies": { + "tslib": "^1.9.3" }, "devDependencies": { - "@azure/logger-js": "^1.0.2", - "@types/chai": "^4.1.6", - "@types/express": "^4.16.0", - "@types/glob": "^7.1.1", - "@types/karma": "^3.0.0", + "@microsoft/api-extractor": "^7.1.5", "@types/mocha": "^5.2.5", "@types/node": "^8.0.0", - "@types/semver": "^5.5.0", - "@types/sinon": "^5.0.5", - "@types/tough-cookie": "^2.3.3", - "@types/uuid": "^3.4.3", - "@types/webpack": "^4.4.13", - "@types/webpack-dev-middleware": "^2.0.2", - "@types/xml2js": "^0.4.3", "@typescript-eslint/eslint-plugin": "^1.11.0", "@typescript-eslint/parser": "^1.11.0", - "abortcontroller-polyfill": "^1.1.9", - "axios-mock-adapter": "^1.16.0", - "chai": "^4.2.0", + "assert": "^1.4.1", + "cross-env": "^5.2.0", "eslint": "^5.16.0", "eslint-config-prettier": "^4.2.0", "eslint-detailed-reporter": "^0.8.0", "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-no-only-tests": "^2.3.0", "eslint-plugin-promise": "^4.1.1", - "express": "^4.16.3", - "glob": "^7.1.2", - "karma": "^4.0.1", - "karma-chai": "^0.1.0", - "karma-chrome-launcher": "^2.2.0", - "karma-mocha": "^1.3.0", - "karma-rollup-preprocessor": "^7.0.0", - "karma-sourcemap-loader": "^0.3.7", - "karma-typescript-es6-transform": "^4.0.0", - "karma-webpack": "^4.0.0-rc.6", + "inherits": "^2.0.3", "mocha": "^5.2.0", - "mocha-chrome": "^1.1.0", "mocha-junit-reporter": "^1.18.0", - "mocha-multi-reporters": "^1.1.7", - "npm-run-all": "^4.1.5", - "nyc": "^14.0.0", - "opn-cli": "^4.0.0", - "puppeteer": "^1.11.0", + "mocha-multi": "^1.0.1", + "prettier": "^1.16.4", "rimraf": "^2.6.2", "rollup": "^1.16.3", - "rollup-plugin-alias": "^1.4.0", "rollup-plugin-commonjs": "^10.0.0", "rollup-plugin-json": "^4.0.0", "rollup-plugin-multi-entry": "^2.1.0", "rollup-plugin-node-resolve": "^5.0.2", - "rollup-plugin-resolve": "0.0.1-predev.1", + "rollup-plugin-replace": "^2.1.0", "rollup-plugin-sourcemaps": "^0.4.2", + "rollup-plugin-terser": "^5.1.1", "rollup-plugin-visualizer": "^2.0.0", - "semver": "^5.5.0", - "shx": "^0.3.2", - "sinon": "^7.1.0", - "ts-loader": "^5.3.1", - "ts-node": "^7.0.1", "typescript": "^3.2.2", - "uglify-js": "^3.4.9", - "webpack": "^4.16.3", - "webpack-cli": "^3.2.3", - "webpack-dev-middleware": "^3.1.2", - "xhr-mock": "^2.4.1", - "yarn": "^1.6.0" + "util": "^0.11.1" } } diff --git a/sdk/core/core-tracing/review/core-tracing.api.md b/sdk/core/core-tracing/review/core-tracing.api.md new file mode 100644 index 000000000000..adb07cd6f2e4 --- /dev/null +++ b/sdk/core/core-tracing/review/core-tracing.api.md @@ -0,0 +1,274 @@ +## API Report File for "@azure/core-tracing" + +> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). + +```ts + +// @public +export interface Attributes { + // (undocumented) + [attributeKey: string]: unknown; +} + +// @public +export enum CanonicalCode { + ABORTED = 10, + ALREADY_EXISTS = 6, + CANCELLED = 1, + DATA_LOSS = 15, + DEADLINE_EXCEEDED = 4, + FAILED_PRECONDITION = 9, + INTERNAL = 13, + INVALID_ARGUMENT = 3, + NOT_FOUND = 5, + OK = 0, + OUT_OF_RANGE = 11, + PERMISSION_DENIED = 7, + RESOURCE_EXHAUSTED = 8, + UNAUTHENTICATED = 16, + UNAVAILABLE = 14, + UNIMPLEMENTED = 12, + UNKNOWN = 2 +} + +// @public +export interface Event { + attributes?: Attributes; + name: string; +} + +// @public +export interface Link { + attributes?: Attributes; + spanContext: SpanContext; +} + +// @public (undocumented) +export class NoOpSpanPlugin implements Span { + constructor(span: any); + // (undocumented) + addEvent(name: string, attributes?: Attributes): this; + // (undocumented) + addLink(spanContext: SpanContext, attributes?: Attributes): this; + // (undocumented) + context(): SpanContext; + // (undocumented) + end(endTime?: number): void; + // (undocumented) + isRecordingEvents(): boolean; + // (undocumented) + setAttribute(key: string, value: unknown): this; + // (undocumented) + setAttributes(attributes: Attributes): this; + // (undocumented) + setStatus(status: Status): this; + // (undocumented) + start(startTime?: number): void; + // (undocumented) + updateName(name: string): this; +} + +// @public (undocumented) +export class NoOpTracePlugin implements Tracer { + constructor(tracer: any); + // (undocumented) + getBinaryFormat(): unknown; + // (undocumented) + getCurrentSpan(): Span; + // (undocumented) + getHttpTextFormat(): unknown; + // (undocumented) + recordSpanData(span: Span): void; + // (undocumented) + startSpan(name: string, options?: SpanOptions): Span; + // (undocumented) + withSpan unknown>(span: Span, fn: T): ReturnType; +} + +// @public (undocumented) +export class OpenCensusSpanPlugin implements Span { + constructor(span: any); + // (undocumented) + addEvent(name: string, attributes?: Attributes): this; + // (undocumented) + addLink(spanContext: SpanContext, attributes?: Attributes): this; + // (undocumented) + context(): SpanContext; + // (undocumented) + end(endTime?: number): void; + // (undocumented) + getSpan(): any; + // (undocumented) + isRecordingEvents(): boolean; + // (undocumented) + setAttribute(key: string, value: unknown): this; + // (undocumented) + setAttributes(attributes: Attributes): this; + // (undocumented) + setStatus(status: Status): this; + // (undocumented) + start(startTime?: number): void; + // (undocumented) + updateName(name: string): this; +} + +// @public (undocumented) +export class OpenCensusTracePlugin implements Tracer { + constructor(tracer: any); + // (undocumented) + getBinaryFormat(): unknown; + // (undocumented) + getCurrentSpan(): Span; + // (undocumented) + getHttpTextFormat(): unknown; + // (undocumented) + recordSpanData(span: Span): void; + // (undocumented) + startSpan(name: string, options?: SpanOptions): Span; + // (undocumented) + withSpan unknown>(span: Span, fn: T): ReturnType; +} + +// @public +export interface Sampler { + shouldSample(parentContext?: SpanContext): boolean; + toString(): string; +} + +// @public +export interface Span { + addEvent(name: string, attributes?: Attributes): this; + addLink(spanContext: SpanContext, attributes?: Attributes): this; + context(): SpanContext; + end(endTime?: number): void; + isRecordingEvents(): boolean; + setAttribute(key: string, value: unknown): this; + setAttributes(attributes: Attributes): this; + setStatus(status: Status): this; + // (undocumented) + start(startTime?: number): void; + updateName(name: string): this; +} + +// @public +export interface SpanContext { + spanId: string; + traceId: string; + traceOptions?: TraceOptions; + traceState?: TraceState; +} + +// @public +export enum SpanKind { + CLIENT = 2, + CONSUMER = 4, + INTERNAL = 0, + PRODUCER = 3, + SERVER = 1 +} + +// @public (undocumented) +export class SpanNoOpImpl implements Span { + // (undocumented) + addEvent(name: string, attributes?: Attributes | undefined): this; + // (undocumented) + addLink(spanContext: SpanContext, attributes?: Attributes | undefined): this; + // (undocumented) + context(): SpanContext; + // (undocumented) + end(endTime?: number): void; + // (undocumented) + isRecordingEvents(): boolean; + // (undocumented) + setAttribute(key: string, value: unknown): this; + // (undocumented) + setAttributes(attributes: Attributes): this; + // (undocumented) + setStatus(status: Status): this; + // (undocumented) + start(startTime?: number): void; + // (undocumented) + updateName(name: string): this; +} + +// @public +export interface SpanOptions { + attributes?: Attributes; + isRecordingEvents?: boolean; + kind?: SpanKind; + parent?: Span | SpanContext; + startTime?: number; +} + +// @public +export interface Status { + code: CanonicalCode; + message?: string; +} + +// @public (undocumented) +export enum SupportedPlugins { + // (undocumented) + NOOP = 1, + // (undocumented) + OPENCENSUS = 0 +} + +// @public +export interface TimedEvent extends Event { + // (undocumented) + time: number; +} + +// @public +export enum TraceOptions { + SAMPLED = 1, + UNSAMPLED = 0 +} + +// @public +export interface Tracer { + getBinaryFormat(): unknown; + getCurrentSpan(): Span; + getHttpTextFormat(): unknown; + recordSpanData(span: Span): void; + startSpan(name: string, options?: SpanOptions): Span; + withSpan unknown>(span: Span, fn: T): ReturnType; +} + +// @public (undocumented) +export class TracerNoOpImpl implements Tracer { + // (undocumented) + getBinaryFormat(): unknown; + // (undocumented) + getCurrentSpan(): Span; + // (undocumented) + getHttpTextFormat(): unknown; + // (undocumented) + recordSpanData(span: Span): void; + // (undocumented) + startSpan(name: string, options?: SpanOptions | undefined): Span; + // (undocumented) + withSpan unknown>(span: Span, fn: T): ReturnType; +} + +// @public (undocumented) +export class TracerProxy { + // (undocumented) + static getTracer(): Tracer; + // (undocumented) + static setTracer(tracer: any, tracerPluginType: SupportedPlugins): void; + } + +// @public +export interface TraceState { + get(key: string): string | undefined; + serialize(): string; + set(key: string, value: string): void; + unset(key: string): void; +} + + +// (No @packageDocumentation comment for this package) + +``` diff --git a/sdk/core/core-tracing/rollup.base.config.js b/sdk/core/core-tracing/rollup.base.config.js new file mode 100644 index 000000000000..4697560724a9 --- /dev/null +++ b/sdk/core/core-tracing/rollup.base.config.js @@ -0,0 +1,105 @@ +import nodeResolve from "rollup-plugin-node-resolve"; +import multiEntry from "rollup-plugin-multi-entry"; +import cjs from "rollup-plugin-commonjs"; +import replace from "rollup-plugin-replace"; +import { terser } from "rollup-plugin-terser"; +import sourcemaps from "rollup-plugin-sourcemaps"; +import viz from "rollup-plugin-visualizer"; + +const pkg = require("./package.json"); +const depNames = Object.keys(pkg.dependencies); +const input = "dist-esm/index.js"; +const production = process.env.NODE_ENV === "production"; + +export function nodeConfig(test = false) { + const externalNodeBuiltins = ["events"]; + const baseConfig = { + input: input, + external: depNames.concat(externalNodeBuiltins), + output: { file: "dist/index.js", format: "cjs", sourcemap: true }, + preserveSymlinks: false, + plugins: [ + sourcemaps(), + replace({ + delimiters: ["", ""], + values: { + // replace dynamic checks with if (true) since this is for node only. + // Allows rollup's dead code elimination to be more aggressive. + "if (isNode)": "if (true)" + } + }), + nodeResolve({ preferBuiltins: true }), + cjs() + ] + }; + + if (test) { + // entry point is every test file + baseConfig.input = "dist-esm/test/**/*.spec.js"; + baseConfig.plugins.unshift(multiEntry({ exports: false })); + + // different output file + baseConfig.output.file = "test-dist/index.js"; + + // mark assert as external + baseConfig.external.push("assert"); + + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting + // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also + // applies to test code, which causes all tests to be removed by tree-shaking. + baseConfig.treeshake = false; + } else if (production) { + baseConfig.plugins.push(terser()); + } + + return baseConfig; +} + +export function browserConfig(test = false, production = false) { + const baseConfig = { + input: input, + output: { + file: "browser/core-tracing.js", + format: "umd", + name: "Azure.Core.Tracing", + sourcemap: true + }, + preserveSymlinks: false, + plugins: [ + sourcemaps(), + replace({ + delimiters: ["", ""], + values: { + // replace dynamic checks with if (false) since this is for + // browser only. Rollup's dead code elimination will remove + // any code guarded by if (isNode) { ... } + "if (isNode)": "if (false)" + } + }), + nodeResolve({ + mainFields: ['module', 'browser'], + preferBuiltins: false + }), + cjs({ + namedExports: { events: ["EventEmitter"] } + }), + viz({ filename: "browser/browser-stats.html", sourcemap: false }) + ] + }; + + if (test) { + baseConfig.input = "dist-esm/test/**/*.spec.js"; + baseConfig.plugins.unshift(multiEntry({ exports: false })); + baseConfig.output.file = "test-browser/index.js"; + + // Disable tree-shaking of test code. In rollup-plugin-node-resolve@5.0.0, rollup started respecting + // the "sideEffects" field in package.json. Since our package.json sets "sideEffects=false", this also + // applies to test code, which causes all tests to be removed by tree-shaking. + baseConfig.treeshake = false; + } else if (production) { + baseConfig.output.file = "browser/core-tracing.min.js"; + baseConfig.plugins.push(terser()); + } + + return baseConfig; +} diff --git a/sdk/core/core-tracing/rollup.config.js b/sdk/core/core-tracing/rollup.config.js new file mode 100644 index 000000000000..49a26bd6fdd6 --- /dev/null +++ b/sdk/core/core-tracing/rollup.config.js @@ -0,0 +1,14 @@ +import * as base from "./rollup.base.config"; + +const inputs = []; + +if (!process.env.ONLY_BROWSER) { + inputs.push(base.nodeConfig()); +} + +if (!process.env.ONLY_NODE) { + inputs.push(base.browserConfig()); + inputs.push(base.browserConfig(false, true)); +} + +export default inputs; diff --git a/sdk/core/core-tracing/rollup.config.ts b/sdk/core/core-tracing/rollup.config.ts deleted file mode 100644 index c8edfb550921..000000000000 --- a/sdk/core/core-tracing/rollup.config.ts +++ /dev/null @@ -1,83 +0,0 @@ -/// -/// -/// -/// -/// -/// - -import alias from "rollup-plugin-alias"; -import commonjs from "rollup-plugin-commonjs"; -import json from "rollup-plugin-json"; -import nodeResolve from "rollup-plugin-node-resolve"; -import sourcemaps from "rollup-plugin-sourcemaps"; -import visualizer from "rollup-plugin-visualizer"; - -const banner = `/** @license @azure/core-tracing - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. See License.txt and ThirdPartyNotices.txt in the project root for license information. - */`; - -/** - * @type {import('rollup').RollupFileOptions} - */ -const nodeConfig = { - input: "./es/index.js", - external: [ - "axios", - "form-data", - "os", - "stream", - "tough-cookie", - "tslib", - "tunnel", - "uuid/v4", - "xml2js" - ], - output: { - file: "./dist/index.node.js", - format: "cjs", - sourcemap: true, - banner - }, - plugins: [ - nodeResolve({ - mainFields: ["module"] - }), - commonjs(), - sourcemaps(), - json(), - visualizer({ - filename: "dist/node-stats.html", - sourcemap: true - }) - ] -}; - -/** - * @type {import('rollup').RollupFileOptions} - */ -const browserConfig = { - input: "./es/index.js", - external: [], - output: { - file: "./dist/index.browser.js", - format: "umd", - name: "Azure.Core.Tracing", - sourcemap: true, - banner - }, - plugins: [ - nodeResolve({ - mainFields: ["module"], - browser: true - }), - commonjs(), - sourcemaps(), - visualizer({ - filename: "dist/browser-stats.html", - sourcemap: true - }) - ] -}; - -export default [nodeConfig, browserConfig]; diff --git a/sdk/core/core-tracing/rollup.test.config.js b/sdk/core/core-tracing/rollup.test.config.js new file mode 100644 index 000000000000..069a53566909 --- /dev/null +++ b/sdk/core/core-tracing/rollup.test.config.js @@ -0,0 +1,3 @@ +import * as base from "./rollup.base.config"; + +export default [base.nodeConfig(true), base.browserConfig(true)]; \ No newline at end of file diff --git a/sdk/core/core-tracing/tsconfig.es.json b/sdk/core/core-tracing/tsconfig.es.json deleted file mode 100644 index dae744d8a4d6..000000000000 --- a/sdk/core/core-tracing/tsconfig.es.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "module": "es6", - "outDir": "es" - } -} diff --git a/sdk/core/core-tracing/tsconfig.json b/sdk/core/core-tracing/tsconfig.json index 1dc8d1c56f7f..2e1218772c63 100644 --- a/sdk/core/core-tracing/tsconfig.json +++ b/sdk/core/core-tracing/tsconfig.json @@ -1,32 +1,61 @@ { "compilerOptions": { - "module": "commonjs", - "sourceMap": true, - "newLine": "LF", - "target": "es5", - "moduleResolution": "node", - "noImplicitReturns": true, - "noUnusedLocals": false, - "noUnusedParameters": false, - "outDir": "./dist" /* Redirect output structure to the directory. */, - "strict": true, - "declaration": true, - "declarationMap": true, - "importHelpers": true, - "esModuleInterop": true, - "allowSyntheticDefaultImports": true, - "lib": [ - "dom", - "dom.iterable", - "es5", - "es6", - "es7", - "esnext", - "esnext.asynciterable", - "es2015.iterable" - ] - }, - "compileOnSave": true, - "exclude": ["node_modules"], - "include": ["./lib/**/*.ts", "./samples/**/*.ts", "./test/**/*.ts"] + /* Basic Options */ + "target": "es5" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */, + "module": "es6" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */, + // "lib": [], /* Specify library files to be included in the compilation. */ + // "allowJs": true, /* Allow javascript files to be compiled. */ + // "checkJs": true, /* Report errors in .js files. */ + // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ + "declaration": true /* Generates corresponding '.d.ts' file. */, + "declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */, + "declarationDir": "./types" /* Output directory for generated declaration files.*/, + "sourceMap": true /* Generates corresponding '.map' file. */, + // "outFile": "./", /* Concatenate and emit output to single file. */ + "outDir": "./dist-esm" /* Redirect output structure to the directory. */, + // "rootDir": "." /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */, + // "composite": true, /* Enable project compilation */ + // "removeComments": true, /* Do not emit comments to output. */ + // "noEmit": true, /* Do not emit outputs. */ + "importHelpers": true /* Import emit helpers from 'tslib'. */, + // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ + // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ + + /* Strict Type-Checking Options */ + "strict": true /* Enable all strict type-checking options. */, + // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ + // "strictNullChecks": true, /* Enable strict null checks. */ + // "strictFunctionTypes": true, /* Enable strict checking of function types. */ + // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ + // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ + // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ + + /* Additional Checks */ + // "noUnusedLocals": true, /* Report errors on unused locals. */ + // "noUnusedParameters": true, /* Report errors on unused parameters. */ + // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ + // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ + + /* Module Resolution Options */ + "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, + // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ + // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ + // "rootDirs": [] /* List of root folders whose combined content represents the structure of the project at runtime. */, + // "typeRoots": [], /* List of folders to include type definitions from. */ + // "types": [], /* Type declaration files to be included in compilation. */ + "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, + // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ + + /* Source Map Options */ + // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ + // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ + + /* Experimental Options */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + "forceConsistentCasingInFileNames": true + } } From 8c870c46e6ee157a72b4f87114bfd3163532e884 Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Fri, 2 Aug 2019 11:19:14 -0700 Subject: [PATCH 21/23] Resolving conflict --- common/config/rush/pnpm-lock.yaml | 121 +++++++++++------------------- 1 file changed, 42 insertions(+), 79 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 90b88bafd294..4fc1b230dadc 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -17,7 +17,7 @@ dependencies: '@rush-temp/core-auth': 'file:projects/core-auth.tgz' '@rush-temp/core-http': 'file:projects/core-http.tgz' '@rush-temp/core-paging': 'file:projects/core-paging.tgz' - '@rush-temp/core-tracing': 'file:projects/core-tracing.tgz_axios@0.19.0' + '@rush-temp/core-tracing': 'file:projects/core-tracing.tgz' '@rush-temp/cosmos': 'file:projects/cosmos.tgz' '@rush-temp/event-hubs': 'file:projects/event-hubs.tgz' '@rush-temp/event-processor-host': 'file:projects/event-processor-host.tgz' @@ -120,7 +120,7 @@ dependencies: karma-rollup-preprocessor: 7.0.2_rollup@1.18.0 karma-sourcemap-loader: 0.3.7 karma-typescript-es6-transform: 4.1.1 - karma-webpack: 4.0.2_webpack@4.39.0 + karma-webpack: 4.0.2_webpack@4.39.1 long: 4.0.0 mocha: 5.2.0 mocha-chrome: 1.1.0 @@ -180,9 +180,9 @@ dependencies: url: 0.11.0 util: 0.11.1 uuid: 3.3.2 - webpack: 4.39.0_webpack@4.39.0 - webpack-cli: 3.3.6_webpack@4.39.0 - webpack-dev-middleware: 3.7.0_webpack@4.39.0 + webpack: 4.39.1_webpack@4.39.1 + webpack-cli: 3.3.6_webpack@4.39.1 + webpack-dev-middleware: 3.7.0_webpack@4.39.1 ws: 6.2.1 xhr-mock: 2.5.0 xml2js: 0.4.19 @@ -1406,10 +1406,10 @@ packages: dev: false resolution: integrity: sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== - /async-limiter/1.0.0: + /async-limiter/1.0.1: dev: false resolution: - integrity: sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== + integrity: sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== /async-lock/1.2.2: dev: false resolution: @@ -2177,7 +2177,7 @@ packages: /browserslist/3.2.8: dependencies: caniuse-lite: 1.0.30000988 - electron-to-chromium: 1.3.210 + electron-to-chromium: 1.3.211 dev: false hasBin: true resolution: @@ -3227,10 +3227,10 @@ packages: dev: false resolution: integrity: sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - /electron-to-chromium/1.3.210: + /electron-to-chromium/1.3.211: dev: false resolution: - integrity: sha512-m1i/F+gw9jkauxDx0mOr7Sj6vp6se1mfkQNYqZb1yL5VGTp0AC1NZH5CGI6YMSO7WaScILmkKDZFG9/hlR9axQ== + integrity: sha512-GZAiK3oHrs0K+LwH+HD+bdjZ17v40oQQdXbbd3dgrwgbENvazrGpcuIADSAREWnxzo9gADB1evuizrbXsnoU2Q== /elliptic/6.5.0: dependencies: bn.js: 4.11.8 @@ -5496,15 +5496,15 @@ packages: dev: false resolution: integrity: sha512-WTGGThwufBT73c20q30iTcXq8Jb3Wat/h+JW1lwKgMtymT5rVxLknoaUVNfenaV3+cRMiTEsBT773kz9jWk6IQ== - /karma-webpack/4.0.2_webpack@4.39.0: + /karma-webpack/4.0.2_webpack@4.39.1: dependencies: clone-deep: 4.0.1 loader-utils: 1.2.3 neo-async: 2.6.1 schema-utils: 1.0.0 source-map: 0.7.3 - webpack: 4.39.0_webpack@4.39.0 - webpack-dev-middleware: 3.7.0_webpack@4.39.0 + webpack: 4.39.1_webpack@4.39.1 + webpack-dev-middleware: 3.7.0_webpack@4.39.1 dev: false engines: node: '>= 8.9.0' @@ -8649,7 +8649,7 @@ packages: node: '>=4' resolution: integrity: sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI= - /terser-webpack-plugin/1.4.1_webpack@4.39.0: + /terser-webpack-plugin/1.4.1_webpack@4.39.1: dependencies: cacache: 12.0.2 find-cache-dir: 2.1.0 @@ -8658,7 +8658,7 @@ packages: serialize-javascript: 1.7.0 source-map: 0.6.1 terser: 4.1.2 - webpack: 4.39.0_webpack@4.39.0 + webpack: 4.39.1_webpack@4.39.1 webpack-sources: 1.4.1 worker-farm: 1.7.0 dev: false @@ -9281,7 +9281,7 @@ packages: dev: false resolution: integrity: sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA== - /webpack-cli/3.3.6_webpack@4.39.0: + /webpack-cli/3.3.6_webpack@4.39.1: dependencies: chalk: 2.4.2 cross-spawn: 6.0.5 @@ -9293,7 +9293,7 @@ packages: loader-utils: 1.2.3 supports-color: 6.1.0 v8-compile-cache: 2.0.3 - webpack: 4.39.0_webpack@4.39.0 + webpack: 4.39.1_webpack@4.39.1 yargs: 13.2.4 dev: false engines: @@ -9303,12 +9303,12 @@ packages: webpack: 4.x.x resolution: integrity: sha512-0vEa83M7kJtxK/jUhlpZ27WHIOndz5mghWL2O53kiDoA9DIxSKnfqB92LoqEn77cT4f3H2cZm1BMEat/6AZz3A== - /webpack-dev-middleware/3.7.0_webpack@4.39.0: + /webpack-dev-middleware/3.7.0_webpack@4.39.1: dependencies: memory-fs: 0.4.1 mime: 2.4.4 range-parser: 1.2.1 - webpack: 4.39.0_webpack@4.39.0 + webpack: 4.39.1_webpack@4.39.1 webpack-log: 2.0.0 dev: false engines: @@ -9333,7 +9333,7 @@ packages: dev: false resolution: integrity: sha512-XSz38193PTo/1csJabKaV4b53uRVotlMgqJXm3s3eje0Bu6gQTxYDqpD38CmQfDBA+gN+QqaGjasuC8I/7eW3Q== - /webpack/4.39.0_webpack@4.39.0: + /webpack/4.39.1_webpack@4.39.1: dependencies: '@webassemblyjs/ast': 1.8.5 '@webassemblyjs/helper-module-context': 1.8.5 @@ -9355,7 +9355,7 @@ packages: node-libs-browser: 2.2.1 schema-utils: 1.0.0 tapable: 1.1.3 - terser-webpack-plugin: 1.4.1_webpack@4.39.0 + terser-webpack-plugin: 1.4.1_webpack@4.39.1 watchpack: 1.6.0 webpack-sources: 1.4.1 dev: false @@ -9365,7 +9365,7 @@ packages: peerDependencies: webpack: '*' resolution: - integrity: sha512-nrxFNSEKm4T1C/EsgOgN50skt//Pl4X7kgJC1MrlE47M292LSCVmMOC47iTGL0CGxbdwhKGgeThrJcw0bstEfA== + integrity: sha512-/LAb2TJ2z+eVwisldp3dqTEoNhzp/TLCZlmZm3GGGAlnfIWDgOEE758j/9atklNLfRyhKbZTCOIoPqLJXeBLbQ== /which-module/1.0.0: dev: false resolution: @@ -9438,7 +9438,7 @@ packages: integrity: sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig== /ws/3.3.3: dependencies: - async-limiter: 1.0.0 + async-limiter: 1.0.1 safe-buffer: 5.1.2 ultron: 1.1.1 dev: false @@ -9446,7 +9446,7 @@ packages: integrity: sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== /ws/6.2.1: dependencies: - async-limiter: 1.0.0 + async-limiter: 1.0.1 dev: false resolution: integrity: sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA== @@ -9911,7 +9911,7 @@ packages: karma-rollup-preprocessor: 7.0.2_rollup@1.18.0 karma-sourcemap-loader: 0.3.7 karma-typescript-es6-transform: 4.1.1 - karma-webpack: 4.0.2_webpack@4.39.0 + karma-webpack: 4.0.2_webpack@4.39.1 mocha: 5.2.0 mocha-chrome: 1.1.0 mocha-junit-reporter: 1.23.1_mocha@5.2.0 @@ -9942,9 +9942,9 @@ packages: typescript: 3.5.3 uglify-js: 3.6.0 uuid: 3.3.2 - webpack: 4.39.0_webpack@4.39.0 - webpack-cli: 3.3.6_webpack@4.39.0 - webpack-dev-middleware: 3.7.0_webpack@4.39.0 + webpack: 4.39.1_webpack@4.39.1 + webpack-cli: 3.3.6_webpack@4.39.1 + webpack-dev-middleware: 3.7.0_webpack@4.39.1 xhr-mock: 2.5.0 xml2js: 0.4.19 yarn: 1.17.3 @@ -9974,80 +9974,43 @@ packages: integrity: sha512-2u4fno6260w1XLYISrBU+SlPSNrMlY9/Au3oQxjk4EzkWkZXOuDrC9WKNu5w0EHEktYtOi8eX9lAU9+JtZR3Hg== tarball: 'file:projects/core-paging.tgz' version: 0.0.0 - 'file:projects/core-tracing.tgz_axios@0.19.0': + 'file:projects/core-tracing.tgz': dependencies: - '@azure/logger-js': 1.3.2 - '@types/chai': 4.1.7 - '@types/express': 4.17.0 - '@types/glob': 7.1.1 - '@types/karma': 3.0.3 + '@microsoft/api-extractor': 7.3.4 '@types/mocha': 5.2.7 '@types/node': 8.10.51 - '@types/semver': 5.5.0 - '@types/sinon': 5.0.7 - '@types/tough-cookie': 2.3.5 - '@types/uuid': 3.4.5 - '@types/webpack': 4.32.1 - '@types/webpack-dev-middleware': 2.0.3 - '@types/xml2js': 0.4.4 '@typescript-eslint/eslint-plugin': 1.13.0_0b5e999c52a893676e7127c05369c7b6 '@typescript-eslint/parser': 1.13.0_eslint@5.16.0 - abortcontroller-polyfill: 1.3.0 - axios-mock-adapter: 1.17.0_axios@0.19.0 - chai: 4.2.0 + assert: 1.5.0 + cross-env: 5.2.0 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 eslint-detailed-reporter: 0.8.0_eslint@5.16.0 eslint-plugin-no-null: 1.0.2_eslint@5.16.0 eslint-plugin-no-only-tests: 2.3.1 eslint-plugin-promise: 4.2.1 - express: 4.17.1 - glob: 7.1.4 - karma: 4.2.0 - karma-chai: 0.1.0_chai@4.2.0+karma@4.2.0 - karma-chrome-launcher: 2.2.0 - karma-mocha: 1.3.0 - karma-rollup-preprocessor: 7.0.2_rollup@1.18.0 - karma-sourcemap-loader: 0.3.7 - karma-typescript-es6-transform: 4.1.1 - karma-webpack: 4.0.2_webpack@4.39.0 + inherits: 2.0.4 mocha: 5.2.0 - mocha-chrome: 1.1.0 mocha-junit-reporter: 1.23.1_mocha@5.2.0 - mocha-multi-reporters: 1.1.7 - npm-run-all: 4.1.5 - nyc: 14.1.1 - opn-cli: 4.1.0 - puppeteer: 1.19.0 + mocha-multi: 1.1.0_mocha@5.2.0 + prettier: 1.18.2 rimraf: 2.6.3 rollup: 1.18.0 - rollup-plugin-alias: 1.5.2 rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 rollup-plugin-json: 4.0.0 rollup-plugin-multi-entry: 2.1.0 rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 - rollup-plugin-resolve: 0.0.1-predev.1 + rollup-plugin-replace: 2.2.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 + rollup-plugin-terser: 5.1.1_rollup@1.18.0 rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 - semver: 5.7.0 - shx: 0.3.2 - sinon: 7.3.2 - ts-loader: 5.4.5_typescript@3.5.3 - ts-node: 7.0.1 + tslib: 1.10.0 typescript: 3.5.3 - uglify-js: 3.6.0 - webpack: 4.39.0_webpack@4.39.0 - webpack-cli: 3.3.6_webpack@4.39.0 - webpack-dev-middleware: 3.7.0_webpack@4.39.0 - xhr-mock: 2.5.0 - yarn: 1.17.3 + util: 0.11.1 dev: false - id: 'file:projects/core-tracing.tgz' name: '@rush-temp/core-tracing' - peerDependencies: - axios: '*' resolution: - integrity: sha512-yrsNyYPJK/tlt/HlHN82AL/NYnCypodeUJ3PY6BziIYp/LMfP1KqRgdtXFWMGchr/lqDA89lrGv8Uqq7RTt1rQ== + integrity: sha512-LqzYXfbEu6WNq0mj/G5IAEBR4aE6yCeGDBJcqw899/Qty7APDUMIf9oPbMkow6TagKmr6gBWYv0jfClG2lwTtg== tarball: 'file:projects/core-tracing.tgz' version: 0.0.0 'file:projects/cosmos.tgz': @@ -10084,8 +10047,8 @@ packages: tslib: 1.10.0 tunnel: 0.0.6 typescript: 3.5.3 - webpack: 4.39.0_webpack@4.39.0 - webpack-cli: 3.3.6_webpack@4.39.0 + webpack: 4.39.1_webpack@4.39.1 + webpack-cli: 3.3.6_webpack@4.39.1 dev: false name: '@rush-temp/cosmos' resolution: From ae1822f35030296ab325b422a015aa5068dbc713 Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Fri, 2 Aug 2019 12:31:27 -0700 Subject: [PATCH 22/23] Adding cloning --- common/config/rush/pnpm-lock.yaml | 748 +++++++++--------- sdk/core/core-tracing/package.json | 2 +- .../keyvault-keys/review/keyvault-keys.api.md | 9 +- sdk/keyvault/keyvault-keys/src/index.ts | 23 +- 4 files changed, 405 insertions(+), 377 deletions(-) diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 1705017c5d0e..f63084107ff0 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -1,13 +1,13 @@ dependencies: '@azure/abort-controller': 1.0.0-preview.1 '@azure/amqp-common': 1.0.0-preview.6_rhea-promise@0.1.15 - '@azure/arm-servicebus': 0.1.0 + '@azure/arm-servicebus': 3.2.0 '@azure/core-asynciterator-polyfill': 1.0.0-preview.1 + '@azure/core-auth': 1.0.0-preview.1 '@azure/core-paging': 1.0.0-preview.1 '@azure/event-hubs': 2.1.1 - '@azure/event-processor-host': 1.0.6 '@azure/logger-js': 1.3.2 - '@azure/ms-rest-js': 1.8.13 + '@azure/ms-rest-js': 2.0.4 '@azure/ms-rest-nodeauth': 0.9.3 '@microsoft/api-extractor': 7.3.4 '@rush-temp/abort-controller': 'file:projects/abort-controller.tgz' @@ -31,6 +31,7 @@ dependencies: '@rush-temp/storage-queue': 'file:projects/storage-queue.tgz' '@rush-temp/template': 'file:projects/template.tgz' '@rush-temp/testhub': 'file:projects/testhub.tgz' + '@trust/keyto': 0.3.7 '@types/async-lock': 1.1.1 '@types/chai': 4.1.7 '@types/chai-as-promised': 7.1.1 @@ -38,7 +39,7 @@ dependencies: '@types/debug': 0.0.31 '@types/dotenv': 6.1.1 '@types/express': 4.17.0 - '@types/fs-extra': 7.0.0 + '@types/fs-extra': 8.0.0 '@types/glob': 7.1.1 '@types/is-buffer': 2.0.0 '@types/jssha': 2.0.0 @@ -54,16 +55,16 @@ dependencies: '@types/query-string': 6.2.0 '@types/semaphore': 1.1.0 '@types/semver': 5.5.0 - '@types/sinon': 5.0.7 + '@types/sinon': 7.0.13 '@types/tough-cookie': 2.3.5 - '@types/tunnel': 0.0.0 + '@types/tunnel': 0.0.1 '@types/underscore': 1.9.2 '@types/uuid': 3.4.5 '@types/webpack': 4.32.1 '@types/webpack-dev-middleware': 2.0.3 '@types/ws': 6.0.1 '@types/xml2js': 0.4.4 - '@types/yargs': 11.1.2 + '@types/yargs': 13.0.2 '@typescript-eslint/eslint-plugin': 1.13.0_0b5e999c52a893676e7127c05369c7b6 '@typescript-eslint/parser': 1.13.0_eslint@5.16.0 abortcontroller-polyfill: 1.3.0 @@ -82,7 +83,7 @@ dependencies: death: 1.1.0 debug: 3.2.6 delay: 4.3.0 - dotenv: 7.0.0 + dotenv: 8.0.0 es6-promise: 4.2.8 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 @@ -94,10 +95,10 @@ dependencies: execa: 1.0.0 express: 4.17.1 form-data: 2.5.0 - fs-extra: 8.0.1 + fs-extra: 8.1.0 glob: 7.1.4 gulp: 4.0.2 - gulp-zip: 4.2.0 + gulp-zip: 5.0.0_gulp@4.0.2 https-proxy-agent: 2.2.2 inherits: 2.0.4 is-buffer: 2.0.3 @@ -105,7 +106,7 @@ dependencies: jws: 3.2.2 karma: 4.2.0 karma-chai: 0.1.0_chai@4.2.0+karma@4.2.0 - karma-chrome-launcher: 2.2.0 + karma-chrome-launcher: 3.0.0 karma-coverage: 1.1.2 karma-edge-launcher: 0.4.2_karma@4.2.0 karma-env-preprocessor: 0.1.1 @@ -120,7 +121,7 @@ dependencies: karma-rollup-preprocessor: 7.0.2_rollup@1.18.0 karma-sourcemap-loader: 0.3.7 karma-typescript-es6-transform: 4.1.1 - karma-webpack: 4.0.2_webpack@4.39.0 + karma-webpack: 4.0.2_webpack@4.39.1 long: 4.0.0 mocha: 5.2.0 mocha-chrome: 1.1.0 @@ -134,7 +135,6 @@ dependencies: nock: 10.0.6 npm-run-all: 4.1.5 nyc: 14.1.1 - opn-cli: 4.1.0 path-browserify: 1.0.0 prettier: 1.18.2 priorityqueuejs: 1.0.0 @@ -144,6 +144,7 @@ dependencies: qs: 6.7.0 query-string: 5.1.1 requirejs: 2.3.6 + resolve: 1.11.1 rhea: 1.0.8 rhea-promise: 0.1.15 rimraf: 2.6.3 @@ -169,16 +170,16 @@ dependencies: source-map-support: 0.5.13 stream-browserify: 2.0.2 stream-http: 2.8.3 - tough-cookie: 2.5.0 - ts-loader: 5.4.5_typescript@3.5.3 + tough-cookie: 3.0.1 + ts-loader: 6.0.4_typescript@3.5.3 ts-mocha: 6.0.0_mocha@5.2.0 - ts-node: 7.0.1 + ts-node: 8.3.0_typescript@3.5.3 tslib: 1.10.0 tunnel: 0.0.6 typescript: 3.5.3 uglify-js: 3.6.0 url: 0.11.0 - util: 0.11.1 + util: 0.12.1 uuid: 3.3.2 webpack: 4.39.1_webpack@4.39.1 webpack-cli: 3.3.6_webpack@4.39.1 @@ -186,7 +187,7 @@ dependencies: ws: 6.2.1 xhr-mock: 2.5.0 xml2js: 0.4.19 - yargs: 11.1.0 + yargs: 13.3.0 yarn: 1.17.3 lockfileVersion: 5.1 packages: @@ -196,20 +197,6 @@ packages: dev: false resolution: integrity: sha512-NnJqi6oHqt06Q2hz4nO1HO0QlyusBa3E/wezvn9flHEtl0IHYSmzGbtlb+MaAJ5GzxwqSevQ4q1+4B8fvVijOA== - /@azure/amqp-common/0.1.9_rhea-promise@0.1.15: - dependencies: - async-lock: 1.2.2 - debug: 3.2.6 - is-buffer: 2.0.3 - jssha: 2.3.1 - ms-rest-azure: 2.6.0 - rhea-promise: 0.1.15 - tslib: 1.10.0 - dev: false - peerDependencies: - rhea-promise: ^0.1.13 - resolution: - integrity: sha512-B/HFWNbqAjFjhj8x/zlHcpuYtsr92l3ZVArJdumi2kpN2Di/h4g6GIa2JeQEDD+rkLa3oAR6zHKfJbGnybOmvg== /@azure/amqp-common/1.0.0-preview.6_rhea-promise@0.1.15: dependencies: '@azure/ms-rest-nodeauth': 0.9.3 @@ -232,38 +219,30 @@ packages: rhea-promise: ^0.1.15 resolution: integrity: sha512-5XJZaJGtGoPmLhFx5y0vfCXiAHksoA4fdSnHAfkgEm4krhCW1jt1LH/6aJdUwUTJe+bz6m3Pv0sG/ILG0Vd65g== - /@azure/arm-servicebus/0.1.0: + /@azure/arm-servicebus/3.2.0: dependencies: '@azure/ms-rest-azure-js': 1.3.8 '@azure/ms-rest-js': 1.8.13 tslib: 1.10.0 dev: false resolution: - integrity: sha512-mjfeTrEayb1koiy9hq/c9mfa5mys4P6zZdW2QAx4Ma0x4W6/f24O3p0109NHRkiHRay4QsOY3PaTy6CBlvIp+g== + integrity: sha512-e0nNyP0O802YMb4jq0nsVduIBHRWtmX/AtiWMCDI1f0KtcEmNRPfbP8DxU6iNgwnV09qy3EfaRfSY0vMsYs5cg== /@azure/core-asynciterator-polyfill/1.0.0-preview.1: dev: false resolution: integrity: sha512-hMp0y+j/odkAyTa5TYewn4hUlFdEe3sR9uTd2Oq+se61RtuDsqM7UWrNNlyylPyjIENSZHJVWN7jte/jvvMN2Q== - /@azure/core-paging/1.0.0-preview.1: + /@azure/core-auth/1.0.0-preview.1: dependencies: - '@azure/core-asynciterator-polyfill': 1.0.0-preview.1 + tslib: 1.10.0 dev: false resolution: - integrity: sha512-mZHkadyAbhV1+brHEsWICnURW6E72D2HReM+8MWDn5oVJdlxD51w14PeqsOZC4UDYv4x2Eww5+PFRTEOrNB1Uw== - /@azure/event-hubs/1.0.8: + integrity: sha512-47pHpL+9g4m/cwi1+SplZ0eZfIevwt4F6peD7/t3kK4wa8Q8fOMKcQX967vZ3gpRPvon7/ox8EM+tm1l4UiXbg== + /@azure/core-paging/1.0.0-preview.1: dependencies: - '@azure/amqp-common': 0.1.9_rhea-promise@0.1.15 - async-lock: 1.2.2 - debug: 3.2.6 - is-buffer: 2.0.2 - jssha: 2.3.1 - ms-rest-azure: 2.6.0 - rhea-promise: 0.1.15 - tslib: 1.10.0 - uuid: 3.3.2 + '@azure/core-asynciterator-polyfill': 1.0.0-preview.1 dev: false resolution: - integrity: sha512-iYaB08erq2Eg5sUOXD0GXn4OmkqC67xczLfnlaaF0fLtgk999ePTuFqj4LHYT5HHUdDumYZ+U3WjPSvb0ztHJw== + integrity: sha512-mZHkadyAbhV1+brHEsWICnURW6E72D2HReM+8MWDn5oVJdlxD51w14PeqsOZC4UDYv4x2Eww5+PFRTEOrNB1Uw== /@azure/event-hubs/2.1.1: dependencies: '@azure/amqp-common': 1.0.0-preview.6_rhea-promise@0.1.15 @@ -278,19 +257,6 @@ packages: dev: false resolution: integrity: sha512-nGnFBPcB/rs+5YWwmHJg+d3Cs7BrjtVfuD1eEv8j+ui2X6uXxB88wom1A2t/7xsSzkunQSrXJ2mCwdHxKI5aHw== - /@azure/event-processor-host/1.0.6: - dependencies: - '@azure/event-hubs': 1.0.8 - async-lock: 1.2.2 - azure-storage: 2.10.3 - debug: 3.2.6 - ms-rest-azure: 2.6.0 - path-browserify: 1.0.0 - tslib: 1.10.0 - uuid: 3.3.2 - dev: false - resolution: - integrity: sha512-SjlC+eXXeVWEU0oSK7Q6xVhbFd9G7tG+F6QK7orqpIYSzn0NPtDeKZasTO+nS0uvrUDKr3vs2DiK+fEjz8hm5g== /@azure/logger-js/1.3.2: dependencies: tslib: 1.10.0 @@ -321,6 +287,21 @@ packages: dev: false resolution: integrity: sha512-jAa6Y2XrvwbEqkaEXDHK+ReNo0WnCPS+LgQ1dRAJUUNxK4CghF5u+SXsVtPENritilVE7FVteqsLOtlhTk+haA== + /@azure/ms-rest-js/2.0.4: + dependencies: + '@types/node-fetch': 2.5.0 + '@types/tunnel': 0.0.1 + abort-controller: 3.0.0 + form-data: 2.5.0 + node-fetch: 2.6.0 + tough-cookie: 3.0.1 + tslib: 1.10.0 + tunnel: 0.0.6 + uuid: 3.3.2 + xml2js: 0.4.19 + dev: false + resolution: + integrity: sha512-nSOPt6st0RtxclYBQV65qXZpvMDqiDQssktvB/SMTAJ5bIytSPtBmlttTTigO5qHvwQcfzzpQE0sMceK+dJ/IQ== /@azure/ms-rest-nodeauth/0.9.3: dependencies: '@azure/ms-rest-azure-env': 1.1.2 @@ -484,6 +465,14 @@ packages: dev: false resolution: integrity: sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ== + /@trust/keyto/0.3.7: + dependencies: + asn1.js: 5.2.0 + base64url: 3.0.1 + elliptic: 6.5.0 + dev: false + resolution: + integrity: sha512-t5kWWCTkPgg24JWVuCTPMx7l13F7YHdxBeJkT1vmoHjROgiOIEAN8eeY+iRmP1Hwsx+S7U55HyuqSsECr08a8A== /@types/anymatch/1.3.1: dev: false resolution: @@ -572,12 +561,12 @@ packages: dev: false resolution: integrity: sha512-DsknoBvD8s+RFfSGjmERJ7ZOP1HI0UZRA3FSI+Zakhrc/Gy26YQsLI+m5V5DHxroHRJqCDLKJp7Hixn8zyaF7g== - /@types/fs-extra/7.0.0: + /@types/fs-extra/8.0.0: dependencies: '@types/node': 8.10.51 dev: false resolution: - integrity: sha512-ndoMMbGyuToTy4qB6Lex/inR98nPiNHacsgMPvy+zqMLgSxbt8VtWpDArpGp69h1fEDQHn1KB+9DWD++wgbwYA== + integrity: sha512-bCtL5v9zdbQW86yexOlXWTEGvLNqWxMFyi7gQA7Gcthbezr2cPSOb8SkESVKA937QD5cIwOFLDFt0MQoXOEr9Q== /@types/glob/7.1.1: dependencies: '@types/events': 3.0.0 @@ -655,6 +644,12 @@ packages: dev: false resolution: integrity: sha512-OthuN+2FuzfZO3yONJ/QVjKmLEuRagS9TV9lEId+WHL9KhftYG+/2z+pxlr0UgVVXSpVD8woie/3fzQn8ft/Ow== + /@types/node-fetch/2.5.0: + dependencies: + '@types/node': 8.10.51 + dev: false + resolution: + integrity: sha512-TLFRywthBgL68auWj+ziWu+vnmmcHCDFC/sqCOQf1xTz4hRq8cu79z8CtHU9lncExGBsB8fXA4TiLDLt6xvMzw== /@types/node/12.6.9: dev: false resolution: @@ -704,10 +699,10 @@ packages: dev: false resolution: integrity: sha512-/BZ4QRLpH/bNYgZgwhKEh+5AsboDBcUdlBYgzoLX0fpj3Y2gp6EApyOlM3bK53wQS/OE1SrdSYBAbux2D1528Q== - /@types/sinon/5.0.7: + /@types/sinon/7.0.13: dev: false resolution: - integrity: sha512-opwMHufhUwkn/UUDk35LDbKJpA2VBsZT8WLU8NjayvRLGPxQkN+8XmfC2Xl35MAscBE8469koLLBjaI3XLEIww== + integrity: sha512-d7c/C/+H/knZ3L8/cxhicHUiTDxdgap0b/aNJfsmLwFu/iOP17mdgbQsbHA3SJmrzsjD0l3UEE5SN4xxuz5ung== /@types/tapable/1.0.4: dev: false resolution: @@ -722,6 +717,12 @@ packages: dev: false resolution: integrity: sha512-FGDp0iBRiBdPjOgjJmn1NH0KDLN+Z8fRmo+9J7XGBhubq1DPrGrbmG4UTlGzrpbCpesMqD0sWkzi27EYkOMHyg== + /@types/tunnel/0.0.1: + dependencies: + '@types/node': 8.10.51 + dev: false + resolution: + integrity: sha512-AOqu6bQu5MSWwYvehMXLukFHnupHrpZ8nvgae5Ggie9UwzDR1CCwoXgSSWNZJuyOlCdfdsWMA5F2LlmvyoTv8A== /@types/uglify-js/3.0.4: dependencies: source-map: 0.6.1 @@ -770,10 +771,16 @@ packages: dev: false resolution: integrity: sha512-O6Xgai01b9PB3IGA0lRIp1Ex3JBcxGDhdO0n3NIIpCyDOAjxcIGQFmkvgJpP8anTrthxOUQjBfLdRRi0Zn/TXA== - /@types/yargs/11.1.2: + /@types/yargs-parser/13.0.0: + dev: false + resolution: + integrity: sha512-wBlsw+8n21e6eTd4yVv8YD/E3xq0O6nNnJIquutAsFGE7EyMKz7W6RNT6BRu1SmdgmlCZ9tb0X+j+D6HGr8pZw== + /@types/yargs/13.0.2: + dependencies: + '@types/yargs-parser': 13.0.0 dev: false resolution: - integrity: sha512-zG61PAp2OcoIBjRV44wftJj6AJgzJrOc32LCYOBqk9bdgcdzK5DCJHV9QZJ60+Fu+fOn79g8Ks3Gixm4CfkZ+w== + integrity: sha512-lwwgizwk/bIIU+3ELORkyuOgDjCh7zuWDFqRtPPhhVgq9N1F7CvLNKg1TX4f2duwtKQ0p044Au9r1PLIXHrIzQ== /@types/z-schema/3.16.31: dev: false resolution: @@ -976,6 +983,14 @@ packages: dev: false resolution: integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== + /abort-controller/3.0.0: + dependencies: + event-target-shim: 5.0.1 + dev: false + engines: + node: '>=6.5' + resolution: + integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== /abortcontroller-polyfill/1.3.0: dev: false resolution: @@ -1196,6 +1211,10 @@ packages: dev: false resolution: integrity: sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= + /arg/4.1.1: + dev: false + resolution: + integrity: sha512-SlmP3fEA88MBv0PypnXZ8ZfJhwmDeIE3SP71j37AiXQBXYosPV0x6uISAaHYSlSVhmHOVkomen0tbGk6Anlebw== /argparse/1.0.10: dependencies: sprintf-js: 1.0.3 @@ -1350,6 +1369,14 @@ packages: dev: false resolution: integrity: sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw== + /asn1.js/5.2.0: + dependencies: + bn.js: 4.11.8 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: false + resolution: + integrity: sha512-Q7hnYGGNYbcmGrCPulXfkEw7oW7qjWeM4ZTALmgpuIcZLxyqqKYWxCZg2UBm8bklrnB4m2mGyJPWfoktdORD8A== /asn1/0.2.4: dependencies: safer-buffer: 2.1.2 @@ -2016,6 +2043,12 @@ packages: node: '>= 0.4.0' resolution: integrity: sha1-R2iMuZu2gE8OBtPnY7HDLlfY5rY= + /base64url/3.0.1: + dev: false + engines: + node: '>=6.0.0' + resolution: + integrity: sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A== /bcrypt-pbkdf/1.0.2: dependencies: tweetnacl: 0.14.5 @@ -2542,14 +2575,6 @@ packages: dev: false resolution: integrity: sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= - /cliui/4.1.0: - dependencies: - string-width: 2.1.1 - strip-ansi: 4.0.0 - wrap-ansi: 2.1.0 - dev: false - resolution: - integrity: sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== /cliui/5.0.0: dependencies: string-width: 3.1.0 @@ -2851,14 +2876,6 @@ packages: dev: false resolution: integrity: sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE= - /cross-spawn/5.1.0: - dependencies: - lru-cache: 4.1.5 - shebang-command: 1.2.0 - which: 1.3.1 - dev: false - resolution: - integrity: sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= /cross-spawn/6.0.5: dependencies: nice-try: 1.0.5 @@ -3144,6 +3161,12 @@ packages: node: '>=0.3.1' resolution: integrity: sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + /diff/4.0.1: + dev: false + engines: + node: '>=0.3.1' + resolution: + integrity: sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q== /diffie-hellman/5.0.3: dependencies: bn.js: 4.11.8 @@ -3180,12 +3203,12 @@ packages: npm: '>=1.2' resolution: integrity: sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA== - /dotenv/7.0.0: + /dotenv/8.0.0: dev: false engines: - node: '>=6' + node: '>=8' resolution: - integrity: sha512-M3NhsLbV1i6HuGzBUH8vXrtxOk+tWmzWKDMbAVSUp3Zsjm7ywFeuwrUXhmhQyRK1q5B5GGy7hcXPbj3bnfZg2g== + integrity: sha512-30xVGqjLjiUOArT4+M5q9sYdvuR4riM6yK9wMcas9Vbp6zZa+ocC9dp6QoftuhTPhFAiLK/0C5Ni2nou/Bk8lg== /duplexer/0.1.1: dev: false resolution: @@ -3612,6 +3635,12 @@ packages: node: '>= 0.6' resolution: integrity: sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + /event-target-shim/5.0.1: + dev: false + engines: + node: '>=6' + resolution: + integrity: sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== /eventemitter3/3.1.2: dev: false resolution: @@ -3629,20 +3658,6 @@ packages: dev: false resolution: integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - /execa/0.7.0: - dependencies: - cross-spawn: 5.1.0 - get-stream: 3.0.0 - is-stream: 1.1.0 - npm-run-path: 2.0.2 - p-finally: 1.0.0 - signal-exit: 3.0.2 - strip-eof: 1.0.0 - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= /execa/1.0.0: dependencies: cross-spawn: 6.0.5 @@ -3841,12 +3856,6 @@ packages: node: '>=4' resolution: integrity: sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g== - /file-type/10.11.0: - dev: false - engines: - node: '>=6' - resolution: - integrity: sha512-uzk64HRpUZyTGZtVuvrjP0FYxzQrBf4rojot6J65YMEbwBLB0CWm0CLojVpwpmFmxcE/lkvYICgfcGozbBq6rw== /fill-range/4.0.0: dependencies: extend-shallow: 2.0.1 @@ -4064,14 +4073,6 @@ packages: dev: false resolution: integrity: sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= - /fs-access/1.0.1: - dependencies: - null-check: 1.0.0 - dev: false - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-1qh/JiJxzv6+wwxVNAf7mV2od3o= /fs-extra/7.0.1: dependencies: graceful-fs: 4.2.0 @@ -4082,7 +4083,7 @@ packages: node: '>=6 <7 || >=8' resolution: integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== - /fs-extra/8.0.1: + /fs-extra/8.1.0: dependencies: graceful-fs: 4.2.0 jsonfile: 4.0.0 @@ -4091,7 +4092,7 @@ packages: engines: node: '>=6 <7 || >=8' resolution: - integrity: sha512-W+XLrggcDzlle47X/XnS7FXrXu9sDo+Ze9zpndeBxdgv88FHLm1HtmkhEwavruS6koanBjp098rUpHs65EmG7A== + integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== /fs-mkdirp-stream/1.0.0: dependencies: graceful-fs: 4.2.0 @@ -4167,12 +4168,6 @@ packages: node: '>=4' resolution: integrity: sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== - /get-stream/3.0.0: - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= /get-stream/4.1.0: dependencies: pump: 3.0.0 @@ -4181,6 +4176,14 @@ packages: node: '>=6' resolution: integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + /get-stream/5.1.0: + dependencies: + pump: 3.0.0 + dev: false + engines: + node: '>=8' + resolution: + integrity: sha512-EXr1FOzrzTfGeL0gQdeFEvOMm2mzMOglyiOXSTpPC+iAjAKftbr3jpCMWynogwYnM+eSj9sHGc6wjIcDvYiygw== /get-value/2.0.6: dev: false engines: @@ -4373,18 +4376,21 @@ packages: hasBin: true resolution: integrity: sha512-rGs3bVYHdyJpLqR0TUBnlcZ1O5O++Zs4bA0ajm+zr3WFCfiSLjGwoCBqFs18wzN+ZxahT9DkOK5nDf26iDsWjA== - /gulp-zip/4.2.0: + /gulp-zip/5.0.0_gulp@4.0.2: dependencies: - get-stream: 3.0.0 - plugin-error: 0.1.2 - through2: 2.0.5 + get-stream: 5.1.0 + gulp: 4.0.2 + plugin-error: 1.0.1 + through2: 3.0.1 vinyl: 2.2.0 yazl: 2.5.1 dev: false engines: - node: '>=4' + node: '>=8' + peerDependencies: + gulp: '>=4' resolution: - integrity: sha512-I+697f6jf+PncdTrqfuwoauxgnLG1yHRg3vlmvDgmJuEnlEHy4meBktJ/oHgfyg4tp6X25wuZqUOraVeVg97wQ== + integrity: sha512-oR3t8kn+ccHkSyRcBV5kBLPXrhqTh5d6wBAR7r7wqjNQNBhYvOwPedCwlAaGcNl1qSeXNDn6qOk1Qyxvx9Wrow== /gulp/4.0.2: dependencies: glob-watcher: 5.0.3 @@ -4782,6 +4788,12 @@ packages: node: '>=4' resolution: integrity: sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== + /ip-regex/2.1.0: + dev: false + engines: + node: '>=4' + resolution: + integrity: sha1-+ni/XS5pE8kRzp+BnuUUa7bYROk= /ipaddr.js/1.9.0: dev: false engines: @@ -4813,6 +4825,12 @@ packages: node: '>=0.10.0' resolution: integrity: sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== + /is-arguments/1.0.4: + dev: false + engines: + node: '>= 0.4' + resolution: + integrity: sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA== /is-arrayish/0.2.1: dev: false resolution: @@ -4837,12 +4855,6 @@ packages: dev: false resolution: integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - /is-buffer/2.0.2: - dev: false - engines: - node: '>=4' - resolution: - integrity: sha512-imvkm8cOGKeZ/NwkAd+FAURi0hsL9gr3kvdi0r3MnqChcOdPaQRIOQiOU+sD40XzUIe6nFmSHYtQjbkDvaQbEg== /is-buffer/2.0.3: dev: false engines: @@ -4939,6 +4951,12 @@ packages: node: '>=4' resolution: integrity: sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + /is-generator-function/1.0.7: + dev: false + engines: + node: '>= 0.4' + resolution: + integrity: sha512-YZc5EwyO4f2kWCax7oegfuSr9mFz1ZvieNYBEjmukLxgXfBUbxAWGVF7GZf0zidYtoBl3WvC07YK0wT76a+Rtw== /is-glob/3.1.0: dependencies: is-extglob: 2.1.1 @@ -5370,13 +5388,12 @@ packages: karma: '>=0.10.9' resolution: integrity: sha1-vuWtQEAFF4Ea40u5RfdikJEIt5o= - /karma-chrome-launcher/2.2.0: + /karma-chrome-launcher/3.0.0: dependencies: - fs-access: 1.0.1 which: 1.3.1 dev: false resolution: - integrity: sha512-uf/ZVpAabDBPvdPdveyk1EPgbnloPvFFGgmRhYLTDH7gEB4nZdSBk8yTU47w1g/drLSx5uMOkjKk7IWKfWg/+w== + integrity: sha512-u/PnVgDOP97AUe/gJeABlC6Wa6aQ83MZsm0JgsJQ5bGQ9XcXON/7b2aRhl59A62Zom+q3PFveBkczc7E1RT7TA== /karma-coverage/1.1.2: dependencies: dateformat: 1.0.12 @@ -5640,7 +5657,7 @@ packages: is-plain-object: 2.0.4 object.map: 1.0.1 rechoir: 0.6.2 - resolve: 1.12.0 + resolve: 1.11.1 dev: false engines: node: '>= 0.8' @@ -5821,14 +5838,6 @@ packages: dev: false resolution: integrity: sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA== - /make-dir/1.3.0: - dependencies: - pify: 3.0.0 - dev: false - engines: - node: '>=4' - resolution: - integrity: sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== /make-dir/2.1.0: dependencies: pify: 4.0.1 @@ -5896,7 +5905,7 @@ packages: dependencies: findup-sync: 2.0.0 micromatch: 3.1.10 - resolve: 1.12.0 + resolve: 1.11.1 stack-trace: 0.0.10 dev: false engines: @@ -5945,14 +5954,6 @@ packages: node: '>= 0.6' resolution: integrity: sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - /mem/1.1.0: - dependencies: - mimic-fn: 1.2.0 - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= /mem/4.3.0: dependencies: map-age-cleaner: 0.1.3 @@ -6009,22 +6010,6 @@ packages: node: '>=4' resolution: integrity: sha512-xcSBHD5Z86zaOc+781KrupuHAzeGXSLtiAOmBsiLDiPSaYSB6hdew2ng9EBAnZ62jagG9MHAOdxpDi/lWBFJ/A== - /meow/5.0.0: - dependencies: - camelcase-keys: 4.2.0 - decamelize-keys: 1.1.0 - loud-rejection: 1.6.0 - minimist-options: 3.0.2 - normalize-package-data: 2.5.0 - read-pkg-up: 3.0.0 - redent: 2.0.0 - trim-newlines: 2.0.0 - yargs-parser: 10.1.0 - dev: false - engines: - node: '>=6' - resolution: - integrity: sha512-CbTqYU17ABaLefO8vCU153ZZlprKYWDljcndKKDCFcYQITzWCXZAVk4QMFZPgvzrnUQ3uItnIE/LoUOwrT15Ig== /merge-descriptors/1.0.1: dev: false resolution: @@ -6067,6 +6052,15 @@ packages: node: '>=0.10.0' resolution: integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== + /micromatch/4.0.2: + dependencies: + braces: 3.0.2 + picomatch: 2.0.7 + dev: false + engines: + node: '>=8' + resolution: + integrity: sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q== /miller-rabin/4.0.1: dependencies: bn.js: 4.11.8 @@ -6427,6 +6421,12 @@ packages: node: '>= 6.0' resolution: integrity: sha512-b47OWj1qf/LqSQYnmokNWM8D88KvUl2y7jT0567NB3ZBAZFz2bWp2PC81Xn7u8F2/vJxzkzNZybnemeFa7AZ2w== + /node-fetch/2.6.0: + dev: false + engines: + node: 4.x || >=6.0.0 + resolution: + integrity: sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA== /node-libs-browser/2.2.1: dependencies: assert: 1.5.0 @@ -6465,7 +6465,7 @@ packages: /normalize-package-data/2.5.0: dependencies: hosted-git-info: 2.7.1 - resolve: 1.12.0 + resolve: 1.11.1 semver: 5.7.0 validate-npm-package-license: 3.0.4 dev: false @@ -6518,12 +6518,6 @@ packages: node: '>=4' resolution: integrity: sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= - /null-check/1.0.0: - dev: false - engines: - node: '>=0.10.0' - resolution: - integrity: sha1-l33/1xdgErnsMNKjnbXPcqBDnt0= /number-is-nan/1.0.1: dev: false engines: @@ -6623,6 +6617,17 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8= + /object.entries/1.1.0: + dependencies: + define-properties: 1.1.3 + es-abstract: 1.13.0 + function-bind: 1.1.1 + has: 1.0.3 + dev: false + engines: + node: '>= 0.4' + resolution: + integrity: sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA== /object.map/1.0.1: dependencies: for-own: 1.0.0 @@ -6679,19 +6684,6 @@ packages: node: '>=8' resolution: integrity: sha512-IFenVPgF70fSm1keSd2iDBIDIBZkroLeuffXq+wKTzTJlBpesFWojV9lb8mzOfaAzM1sr7HQHuO0vtV0zYekGg== - /opn-cli/4.1.0: - dependencies: - file-type: 10.11.0 - get-stdin: 6.0.0 - meow: 5.0.0 - open: 6.4.0 - temp-write: 3.4.0 - dev: false - engines: - node: '>=8' - hasBin: true - resolution: - integrity: sha512-nVJ9dVb4fEKtmACWxUql+hhQxVWMt7BSRT+6TnB85W3xs5Pgk9sKW3icYeCIwOtOKALBw/6WUCoNmI1+ADfAow== /optimist/0.6.1: dependencies: minimist: 0.0.10 @@ -6736,16 +6728,6 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= - /os-locale/2.1.0: - dependencies: - execa: 0.7.0 - lcid: 1.0.0 - mem: 1.1.0 - dev: false - engines: - node: '>=4' - resolution: - integrity: sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== /os-locale/3.1.0: dependencies: execa: 1.0.0 @@ -7114,6 +7096,17 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4= + /plugin-error/1.0.1: + dependencies: + ansi-colors: 1.1.0 + arr-diff: 4.0.0 + arr-union: 3.1.0 + extend-shallow: 3.0.2 + dev: false + engines: + node: '>= 0.10' + resolution: + integrity: sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA== /posix-character-classes/0.1.1: dev: false engines: @@ -7431,6 +7424,16 @@ packages: dev: false resolution: integrity: sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== + /readable-stream/3.4.0: + dependencies: + inherits: 2.0.4 + string_decoder: 1.2.0 + util-deprecate: 1.0.2 + dev: false + engines: + node: '>= 6' + resolution: + integrity: sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== /readdirp/2.2.1: dependencies: graceful-fs: 4.2.0 @@ -7451,7 +7454,7 @@ packages: integrity: sha512-XXdSXZrQuvqoETj50+JAitxz1UPdt5dupjT6T5nVB+WvjMv2XKYj+s7hPeAVCXvmJrL36O4YYyWlIC3an2ePiQ== /rechoir/0.6.2: dependencies: - resolve: 1.12.0 + resolve: 1.11.1 dev: false engines: node: '>= 0.10' @@ -7709,12 +7712,12 @@ packages: dev: false resolution: integrity: sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs= - /resolve/1.12.0: + /resolve/1.11.1: dependencies: path-parse: 1.0.6 dev: false resolution: - integrity: sha512-B/dOmuoAik5bKcD6s6nXDCjzUKnaDvdkRyAk6rsmsKLipWj4797iothd7jmmUhWTfinVMU+wc56rYKsit2Qy4w== + integrity: sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw== /resolve/1.8.1: dependencies: path-parse: 1.0.6 @@ -7748,6 +7751,14 @@ packages: dev: false resolution: integrity: sha512-+6uilZXSJGyiqVeHQI3Krv6NTAd8cWRCY2uyCxmzR4/5IFtBqqFem1HV2OiwSj0Gu7OFChIJDfH2JyjN7J0vRA== + /rhea-promise/1.0.0: + dependencies: + debug: 3.2.6 + rhea: 1.0.8 + tslib: 1.10.0 + dev: false + resolution: + integrity: sha512-odAjpbB/IpFFBenPDwPkTWMQldt+DUlMBH9yI48Ct5OgTeDuuQcBnlhB+YCc6g2z8+URiP2ejms88joEanNCaw== /rhea/1.0.8: dependencies: debug: 3.2.6 @@ -7779,7 +7790,7 @@ packages: estree-walker: 0.6.1 is-reference: 1.1.3 magic-string: 0.25.3 - resolve: 1.12.0 + resolve: 1.11.1 rollup: 1.18.0 rollup-pluginutils: 2.8.1 dev: false @@ -7823,7 +7834,7 @@ packages: '@types/resolve': 0.0.8 builtin-modules: 3.1.0 is-module: 1.0.0 - resolve: 1.12.0 + resolve: 1.11.1 rollup: 1.18.0 rollup-pluginutils: 2.8.1 dev: false @@ -8630,25 +8641,6 @@ packages: node: '>=6' resolution: integrity: sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== - /temp-dir/1.0.0: - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-CnwOom06Oa+n4OvqnB/AvE2qAR0= - /temp-write/3.4.0: - dependencies: - graceful-fs: 4.2.0 - is-stream: 1.1.0 - make-dir: 1.3.0 - pify: 3.0.0 - temp-dir: 1.0.0 - uuid: 3.3.2 - dev: false - engines: - node: '>=4' - resolution: - integrity: sha1-jP9jD7fp2gXwR8dM5M5NaFRX1JI= /terser-webpack-plugin/1.4.1_webpack@4.39.1: dependencies: cacache: 12.0.2 @@ -8719,6 +8711,12 @@ packages: dev: false resolution: integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + /through2/3.0.1: + dependencies: + readable-stream: 3.4.0 + dev: false + resolution: + integrity: sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww== /time-stamp/1.1.0: dev: false engines: @@ -8838,6 +8836,16 @@ packages: node: '>=0.8' resolution: integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + /tough-cookie/3.0.1: + dependencies: + ip-regex: 2.1.0 + psl: 1.3.0 + punycode: 2.1.1 + dev: false + engines: + node: '>=6' + resolution: + integrity: sha512-yQyJ0u4pZsv9D4clxO69OEjLWYw+jbgspjTue4lTQZLfV0c5l1VmK2y1JK8E9ahdpltPOaAThPcp5nKPUgSnsg== /trim-newlines/1.0.0: dev: false engines: @@ -8856,21 +8864,21 @@ packages: node: '>=0.10.0' resolution: integrity: sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - /ts-loader/5.4.5_typescript@3.5.3: + /ts-loader/6.0.4_typescript@3.5.3: dependencies: chalk: 2.4.2 enhanced-resolve: 4.1.0 loader-utils: 1.2.3 - micromatch: 3.1.10 - semver: 5.7.0 + micromatch: 4.0.2 + semver: 6.3.0 typescript: 3.5.3 dev: false engines: - node: '>=6.11.5' + node: '>=8.6' peerDependencies: typescript: '*' resolution: - integrity: sha512-XYsjfnRQCBum9AMRZpk2rTYSVpdZBpZK+kDh0TeT3kxmQNBDVIeUjdPjY5RZry4eIAb8XHc4gYSUiUWPYvzSRw== + integrity: sha512-p2zJYe7OtwR+49kv4gs7v4dMrfYD1IPpOtqiSPCbe8oR+4zEBtdHwzM7A7M91F+suReqgzZrlClk4LRSSp882g== /ts-mocha/6.0.0_mocha@5.2.0: dependencies: mocha: 5.2.0 @@ -8901,6 +8909,22 @@ packages: hasBin: true resolution: integrity: sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw== + /ts-node/8.3.0_typescript@3.5.3: + dependencies: + arg: 4.1.1 + diff: 4.0.1 + make-error: 1.3.5 + source-map-support: 0.5.13 + typescript: 3.5.3 + yn: 3.1.1 + dev: false + engines: + node: '>=4.2.0' + hasBin: true + peerDependencies: + typescript: '>=2.0' + resolution: + integrity: sha512-dyNS/RqyVTDcmNM4NIBAeDMpsAdaQ+ojdf0GOLqE6nwJOgzEkdRNzJywhDfwnuvB10oa6NLVG1rUJQCpRN7qoQ== /tsconfig-paths/3.8.0: dependencies: '@types/json5': 0.0.29 @@ -9144,6 +9168,16 @@ packages: dev: false resolution: integrity: sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ== + /util/0.12.1: + dependencies: + inherits: 2.0.4 + is-arguments: 1.0.4 + is-generator-function: 1.0.7 + object.entries: 1.1.0 + safe-buffer: 5.2.0 + dev: false + resolution: + integrity: sha512-MREAtYOp+GTt9/+kwf00IYoHZyjM8VU4aVrkzUlejyqaIjd2GztVl5V9hGXKlvBKE3gENn/FMfHE5v6hElXGcQ== /utils-merge/1.0.1: dev: false engines: @@ -9526,12 +9560,6 @@ packages: dev: false resolution: integrity: sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A== - /yargs-parser/10.1.0: - dependencies: - camelcase: 4.1.0 - dev: false - resolution: - integrity: sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== /yargs-parser/13.1.1: dependencies: camelcase: 5.3.1 @@ -9545,29 +9573,6 @@ packages: dev: false resolution: integrity: sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo= - /yargs-parser/9.0.2: - dependencies: - camelcase: 4.1.0 - dev: false - resolution: - integrity: sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc= - /yargs/11.1.0: - dependencies: - cliui: 4.1.0 - decamelize: 1.2.0 - find-up: 2.1.0 - get-caller-file: 1.0.3 - os-locale: 2.1.0 - require-directory: 2.1.1 - require-main-filename: 1.0.1 - set-blocking: 2.0.0 - string-width: 2.1.1 - which-module: 2.0.0 - y18n: 3.2.1 - yargs-parser: 9.0.2 - dev: false - resolution: - integrity: sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A== /yargs/13.2.4: dependencies: cliui: 5.0.0 @@ -9646,6 +9651,12 @@ packages: node: '>=4' resolution: integrity: sha1-5a2ryKz0CPY4X8dklWhMiOavaJo= + /yn/3.1.1: + dev: false + engines: + node: '>=6' + resolution: + integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== /z-schema/3.18.4: dependencies: lodash.get: 4.4.2 @@ -9674,7 +9685,7 @@ packages: eslint-plugin-no-only-tests: 2.3.1 eslint-plugin-promise: 4.2.1 karma: 4.2.0 - karma-chrome-launcher: 2.2.0 + karma-chrome-launcher: 3.0.0 karma-coverage: 1.1.2 karma-edge-launcher: 0.4.2_karma@4.2.0 karma-env-preprocessor: 0.1.1 @@ -9697,17 +9708,19 @@ packages: rollup-plugin-replace: 2.2.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 rollup-plugin-terser: 5.1.1_rollup@1.18.0 + ts-node: 8.3.0_typescript@3.5.3 tslib: 1.10.0 typescript: 3.5.3 dev: false name: '@rush-temp/abort-controller' resolution: - integrity: sha512-+6kIsx32k7nlN6uAwPS4JOrdVH8CuciXwOqL6DFCDjBdaJhMZ85z/WxMlAtLl/rNxgXlU41Ev3roYTR6U4g+Sw== + integrity: sha512-RuhnSQySoyCi5RWYPvJ0/Lkcae++dII8y5MmaB2lyctYmgZSNGZQiHC8ynz1Ff+nx1aSrFm+OTR5fN6OM86nZA== tarball: 'file:projects/abort-controller.tgz' version: 0.0.0 'file:projects/core-amqp.tgz': dependencies: '@azure/abort-controller': 1.0.0-preview.1 + '@azure/core-auth': 1.0.0-preview.1 '@types/async-lock': 1.1.1 '@types/chai': 4.1.7 '@types/chai-as-promised': 7.1.1 @@ -9717,7 +9730,7 @@ packages: '@types/jssha': 2.0.0 '@types/mocha': 5.2.7 '@types/node': 8.10.51 - '@types/sinon': 5.0.7 + '@types/sinon': 7.0.13 '@typescript-eslint/eslint-plugin': 1.13.0_0b5e999c52a893676e7127c05369c7b6 '@typescript-eslint/parser': 1.13.0_eslint@5.16.0 assert: 1.5.0 @@ -9727,7 +9740,7 @@ packages: chai-as-promised: 7.1.1_chai@4.2.0 cross-env: 5.2.0 debug: 3.2.6 - dotenv: 7.0.0 + dotenv: 8.0.0 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 eslint-detailed-reporter: 0.8.0_eslint@5.16.0 @@ -9738,7 +9751,7 @@ packages: is-buffer: 2.0.3 jssha: 2.3.1 karma: 4.2.0 - karma-chrome-launcher: 2.2.0 + karma-chrome-launcher: 3.0.0 karma-mocha: 1.3.0 mocha: 5.2.0 mocha-junit-reporter: 1.23.1_mocha@5.2.0 @@ -9748,7 +9761,7 @@ packages: process: 0.11.10 puppeteer: 1.19.0 rhea: 1.0.8 - rhea-promise: 0.1.15 + rhea-promise: 1.0.0 rimraf: 2.6.3 rollup: 1.18.0 rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 @@ -9763,16 +9776,16 @@ packages: rollup-plugin-terser: 5.1.1_rollup@1.18.0 sinon: 7.3.2 stream-browserify: 2.0.2 - ts-node: 7.0.1 + ts-node: 8.3.0_typescript@3.5.3 tslib: 1.10.0 typescript: 3.5.3 url: 0.11.0 - util: 0.11.1 + util: 0.12.1 ws: 6.2.1 dev: false name: '@rush-temp/core-amqp' resolution: - integrity: sha512-vSzZoGuTsZKs05qloVpqBTzhuPEWWS9Px1R9+UwwtLAMDneKZNNzzOFkUOPZ2TMM2BBp7ce13g0lxs1xY4nRTg== + integrity: sha512-TO5tSHoJ1Uxi7Um7qtmzxYsEipKbbVF7wsY5faQRM4XvRkcjjL2cKSRrYyHNmSWZSniQ+KFfol5lHo3zOt+gDQ== tarball: 'file:projects/core-amqp.tgz' version: 0.0.0 'file:projects/core-arm.tgz': @@ -9794,15 +9807,13 @@ packages: mocha-multi-reporters: 1.1.7 npm-run-all: 4.1.5 nyc: 14.1.1 - opn-cli: 4.1.0 rimraf: 2.6.3 rollup: 1.18.0 rollup-plugin-node-resolve: 5.2.0_rollup@1.18.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 shx: 0.3.2 - ts-loader: 5.4.5_typescript@3.5.3 - ts-node: 7.0.1 + ts-node: 8.3.0_typescript@3.5.3 tslib: 1.10.0 typescript: 3.5.3 uglify-js: 3.6.0 @@ -9810,7 +9821,7 @@ packages: dev: false name: '@rush-temp/core-arm' resolution: - integrity: sha512-9YUKGvAJqpqJ1OBnZ80TGWf2k5LwlQAWgBpcaxHxAIJ+z3Bb1ZoZFZOMqon7EIRsVNpdAt4M1KVqZSnRv6N2SQ== + integrity: sha512-6qM3GwDqOSp1yOIQKFqERC8tTW+BIR+9tgvlm/Ohje5N1Nj6Cspy/YVtVO/efHYP9LMJ9hi2rjCXU6Plp4An9w== tarball: 'file:projects/core-arm.tgz' version: 0.0.0 'file:projects/core-asynciterator-polyfill.tgz': @@ -9865,15 +9876,16 @@ packages: rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 tslib: 1.10.0 typescript: 3.5.3 - util: 0.11.1 + util: 0.12.1 dev: false name: '@rush-temp/core-auth' resolution: - integrity: sha512-oIG+pWtdToJ12ubczgGEAYEOBnE88rHXfw4CpDaPYV1DOhdRQ95ZCvcZ1LXAU0ov2OsyOTUrzXq7cl06hmCWUg== + integrity: sha512-AVe2WfWPpab/mPESHoXACFqnYn8KyHT12AxqypS0RVPo/yQllkiRSaBaY+Qv//K25+jJKOHgyrHqhjLJRzvczQ== tarball: 'file:projects/core-auth.tgz' version: 0.0.0 'file:projects/core-http.tgz': dependencies: + '@azure/core-auth': 1.0.0-preview.1 '@azure/logger-js': 1.3.2 '@types/chai': 4.1.7 '@types/express': 4.17.0 @@ -9882,9 +9894,9 @@ packages: '@types/mocha': 5.2.7 '@types/node': 8.10.51 '@types/semver': 5.5.0 - '@types/sinon': 5.0.7 + '@types/sinon': 7.0.13 '@types/tough-cookie': 2.3.5 - '@types/tunnel': 0.0.0 + '@types/tunnel': 0.0.1 '@types/uuid': 3.4.5 '@types/webpack': 4.32.1 '@types/webpack-dev-middleware': 2.0.3 @@ -9906,7 +9918,7 @@ packages: glob: 7.1.4 karma: 4.2.0 karma-chai: 0.1.0_chai@4.2.0+karma@4.2.0 - karma-chrome-launcher: 2.2.0 + karma-chrome-launcher: 3.0.0 karma-mocha: 1.3.0 karma-rollup-preprocessor: 7.0.2_rollup@1.18.0 karma-sourcemap-loader: 0.3.7 @@ -9918,7 +9930,6 @@ packages: mocha-multi-reporters: 1.1.7 npm-run-all: 4.1.5 nyc: 14.1.1 - opn-cli: 4.1.0 process: 0.11.10 puppeteer: 1.19.0 rimraf: 2.6.3 @@ -9934,9 +9945,9 @@ packages: semver: 5.7.0 shx: 0.3.2 sinon: 7.3.2 - tough-cookie: 2.5.0 - ts-loader: 5.4.5_typescript@3.5.3 - ts-node: 7.0.1 + tough-cookie: 3.0.1 + ts-loader: 6.0.4_typescript@3.5.3 + ts-node: 8.3.0_typescript@3.5.3 tslib: 1.10.0 tunnel: 0.0.6 typescript: 3.5.3 @@ -9951,7 +9962,7 @@ packages: dev: false name: '@rush-temp/core-http' resolution: - integrity: sha512-3VuIPnMde24Iibyf06vLLg0nyPy15nMyS3U7vtV2xWsB3Lt9QNSwo7XKjPyyCXbD0zQIYLxNiytbgT8//No2Lw== + integrity: sha512-a7TAzfLcvRZgWb2Zf8nz9R2dhjPrKRUY0VdxXJMEqmG6n+73XLWmJolYlsenMFjmM76Flt6pzaQ/w0Js7JWx/Q== tarball: 'file:projects/core-http.tgz' version: 0.0.0 'file:projects/core-paging.tgz': @@ -10006,11 +10017,11 @@ packages: rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 tslib: 1.10.0 typescript: 3.5.3 - util: 0.11.1 + util: 0.12.1 dev: false name: '@rush-temp/core-tracing' resolution: - integrity: sha512-LqzYXfbEu6WNq0mj/G5IAEBR4aE6yCeGDBJcqw899/Qty7APDUMIf9oPbMkow6TagKmr6gBWYv0jfClG2lwTtg== + integrity: sha512-QLUT0kQIoWe4V02xaBiWpWATkW5Gqi0y39uYpu0qXbpogrTouiI/WVu/qQFqvrksojBFBJajCQQM6DOgbqBtcw== tarball: 'file:projects/core-tracing.tgz' version: 0.0.0 'file:projects/cosmos.tgz': @@ -10019,8 +10030,8 @@ packages: '@types/node': 8.10.51 '@types/priorityqueuejs': 1.0.1 '@types/semaphore': 1.1.0 - '@types/sinon': 5.0.7 - '@types/tunnel': 0.0.0 + '@types/sinon': 7.0.13 + '@types/tunnel': 0.0.1 '@types/underscore': 1.9.2 '@typescript-eslint/eslint-plugin': 1.13.0_0b5e999c52a893676e7127c05369c7b6 '@typescript-eslint/parser': 1.13.0_eslint@5.16.0 @@ -10043,7 +10054,7 @@ packages: semaphore: 1.0.5 sinon: 7.3.2 stream-http: 2.8.3 - ts-node: 7.0.1 + ts-node: 8.3.0_typescript@3.5.3 tslib: 1.10.0 tunnel: 0.0.6 typescript: 3.5.3 @@ -10052,7 +10063,7 @@ packages: dev: false name: '@rush-temp/cosmos' resolution: - integrity: sha512-f7IyBbSYkZZ+guO7QopSGUb/7d5QYQiotA3hWoIvC0iUo4XhGa+DqlnQ/yn5zx+p8ogWU8pvIixA8GQU4nMUfA== + integrity: sha512-QdnsCtEZYRaiLoFGvg8zhJFo6FdtllFmm5mJaVrGP54JtFcGxgKXtE21v7LuuBoe/+jo/pROjMv59yvrxw/qsw== tarball: 'file:projects/cosmos.tgz' version: 0.0.0 'file:projects/event-hubs.tgz': @@ -10080,7 +10091,7 @@ packages: chai-string: 1.5.0_chai@4.2.0 cross-env: 5.2.0 debug: 3.2.6 - dotenv: 7.0.0 + dotenv: 8.0.0 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 eslint-detailed-reporter: 0.8.0_eslint@5.16.0 @@ -10091,7 +10102,7 @@ packages: is-buffer: 2.0.3 jssha: 2.3.1 karma: 4.2.0 - karma-chrome-launcher: 2.2.0 + karma-chrome-launcher: 3.0.0 karma-coverage: 1.1.2 karma-edge-launcher: 0.4.2_karma@4.2.0 karma-env-preprocessor: 0.1.1 @@ -10107,7 +10118,7 @@ packages: nyc: 14.1.1 prettier: 1.18.2 puppeteer: 1.19.0 - rhea-promise: 0.1.15 + rhea-promise: 1.0.0 rimraf: 2.6.3 rollup: 1.18.0 rollup-plugin-commonjs: 10.0.1_rollup@1.18.0 @@ -10120,7 +10131,7 @@ packages: rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 rollup-plugin-terser: 5.1.1_rollup@1.18.0 ts-mocha: 6.0.0_mocha@5.2.0 - ts-node: 7.0.1 + ts-node: 8.3.0_typescript@3.5.3 tslib: 1.10.0 typescript: 3.5.3 uuid: 3.3.2 @@ -10128,7 +10139,7 @@ packages: dev: false name: '@rush-temp/event-hubs' resolution: - integrity: sha512-fdaoQurVXqFHfVM3Rr01ickk6ci9YUzyPVmfmb9VvJ5P0TqrLXeCQLFCh5AA3o6xA4sr13AUJ68CczXFqEaoBA== + integrity: sha512-senhWyZk3l8A041gtjoRjoLcikYZKIcCZRZjtuMVaVjDc+P9fttnMfAE+Bc7BThmRYYYURn/2WocPAKtKjNLBQ== tarball: 'file:projects/event-hubs.tgz' version: 0.0.0 'file:projects/event-processor-host.tgz': @@ -10155,7 +10166,7 @@ packages: chai-string: 1.5.0_chai@4.2.0 cross-env: 5.2.0 debug: 3.2.6 - dotenv: 7.0.0 + dotenv: 8.0.0 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 eslint-detailed-reporter: 0.8.0_eslint@5.16.0 @@ -10178,7 +10189,7 @@ packages: rollup-plugin-replace: 2.2.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 rollup-plugin-uglify: 6.0.2_rollup@1.18.0 - ts-node: 7.0.1 + ts-node: 8.3.0_typescript@3.5.3 tslib: 1.10.0 typescript: 3.5.3 uuid: 3.3.2 @@ -10186,11 +10197,12 @@ packages: dev: false name: '@rush-temp/event-processor-host' resolution: - integrity: sha512-61Ultc6G27j08ScxQ+P74F49NcOdbgfBBYDyohrr50iQ8TxGI6GX661E6ryHllObZB0NM+r96aChe2W9P/WyCg== + integrity: sha512-8cK8BQGt608wzcnNTZBssdPfgdyX7xQbvTA8Q8U0Hqe5XKbykhzHpx/Y32+CE6bOW17QDbKmIgxPYywIRRBFag== tarball: 'file:projects/event-processor-host.tgz' version: 0.0.0 'file:projects/identity.tgz': dependencies: + '@azure/abort-controller': 1.0.0-preview.1 '@types/jws': 3.2.0 '@types/mocha': 5.2.7 '@types/node': 8.10.51 @@ -10205,7 +10217,7 @@ packages: inherits: 2.0.4 jws: 3.2.2 karma: 4.2.0 - karma-chrome-launcher: 2.2.0 + karma-chrome-launcher: 3.0.0 karma-coverage: 1.1.2 karma-env-preprocessor: 0.1.1 karma-json-preprocessor: 0.3.3_karma@4.2.0 @@ -10232,12 +10244,12 @@ packages: rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 tslib: 1.10.0 typescript: 3.5.3 - util: 0.11.1 + util: 0.12.1 uuid: 3.3.2 dev: false name: '@rush-temp/identity' resolution: - integrity: sha512-Jo3h3GHu1DGCFEz+zAYytqJfH+CqJGOQJETkQS3KfQeT1zFLHEPA5XEMnczQ4WAqsfYI2d7aJiis57NkuiZUFA== + integrity: sha512-JChnsLgbSP6jz9PepCG2gwy+9hc4TsDItlZa19dV29bgFBPNLJSCeHtvF7S0GqQl3oz+RxvR4kdY885ZPX0D4A== tarball: 'file:projects/identity.tgz' version: 0.0.0 'file:projects/keyvault-certificates.tgz': @@ -10274,9 +10286,10 @@ packages: '@azure/abort-controller': 1.0.0-preview.1 '@azure/core-paging': 1.0.0-preview.1 '@microsoft/api-extractor': 7.3.4 + '@trust/keyto': 0.3.7 '@types/chai': 4.1.7 '@types/dotenv': 6.1.1 - '@types/fs-extra': 7.0.0 + '@types/fs-extra': 8.0.0 '@types/mocha': 5.2.7 '@types/nise': 1.4.0 '@types/nock': 10.0.3 @@ -10287,16 +10300,16 @@ packages: assert: 1.5.0 chai: 4.2.0 cross-env: 5.2.0 - dotenv: 7.0.0 + dotenv: 8.0.0 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 eslint-detailed-reporter: 0.8.0_eslint@5.16.0 eslint-plugin-no-null: 1.0.2_eslint@5.16.0 eslint-plugin-no-only-tests: 2.3.1 eslint-plugin-promise: 4.2.1 - fs-extra: 8.0.1 + fs-extra: 8.1.0 karma: 4.2.0 - karma-chrome-launcher: 2.2.0 + karma-chrome-launcher: 3.0.0 karma-coverage: 1.1.2 karma-edge-launcher: 0.4.2_karma@4.2.0 karma-env-preprocessor: 0.1.1 @@ -10335,7 +10348,7 @@ packages: dev: false name: '@rush-temp/keyvault-keys' resolution: - integrity: sha512-/XVa4BXKrwTWKE6a0z2e6RjwMNCHLWqeFAM66uJZn89i8Nl94oNH+3BUVXrehsZ5g5OgvmObnW22r0ngfaYGeg== + integrity: sha512-wpkra8wA469Evwmtd4Azev2TIagSHE8HGNW2K4lQd00aosqkr9HY9gaoH8hf3HDINNnqHdvBf/BirAul88AKbw== tarball: 'file:projects/keyvault-keys.tgz' version: 0.0.0 'file:projects/keyvault-secrets.tgz': @@ -10345,7 +10358,7 @@ packages: '@microsoft/api-extractor': 7.3.4 '@types/chai': 4.1.7 '@types/dotenv': 6.1.1 - '@types/fs-extra': 7.0.0 + '@types/fs-extra': 8.0.0 '@types/mocha': 5.2.7 '@types/nise': 1.4.0 '@types/nock': 10.0.3 @@ -10356,16 +10369,16 @@ packages: assert: 1.5.0 chai: 4.2.0 cross-env: 5.2.0 - dotenv: 7.0.0 + dotenv: 8.0.0 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 eslint-detailed-reporter: 0.8.0_eslint@5.16.0 eslint-plugin-no-null: 1.0.2_eslint@5.16.0 eslint-plugin-no-only-tests: 2.3.1 eslint-plugin-promise: 4.2.1 - fs-extra: 8.0.1 + fs-extra: 8.1.0 karma: 4.2.0 - karma-chrome-launcher: 2.2.0 + karma-chrome-launcher: 3.0.0 karma-coverage: 1.1.2 karma-edge-launcher: 0.4.2_karma@4.2.0 karma-env-preprocessor: 0.1.1 @@ -10404,13 +10417,13 @@ packages: dev: false name: '@rush-temp/keyvault-secrets' resolution: - integrity: sha512-2BkoWHCHM7mwug++tnAJT11TU1o5itq5prJqfjeLOrhrUWieS6GPpwveClcV6CHXGIiZjJ5O0XITdt0/hOPDwA== + integrity: sha512-I2NMoFjZFDUEowFdFO7/T1kbyOW/qfBaE4FcjEPrmTTQe7w+nisRgSz1OK/VZXtckgS7lJCX1AjbMqG6e+XixA== tarball: 'file:projects/keyvault-secrets.tgz' version: 0.0.0 'file:projects/service-bus.tgz': dependencies: '@azure/amqp-common': 1.0.0-preview.6_rhea-promise@0.1.15 - '@azure/arm-servicebus': 0.1.0 + '@azure/arm-servicebus': 3.2.0 '@azure/ms-rest-nodeauth': 0.9.3 '@microsoft/api-extractor': 7.3.4 '@types/async-lock': 1.1.1 @@ -10432,7 +10445,7 @@ packages: cross-env: 5.2.0 debug: 3.2.6 delay: 4.3.0 - dotenv: 7.0.0 + dotenv: 8.0.0 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 eslint-detailed-reporter: 0.8.0_eslint@5.16.0 @@ -10442,7 +10455,7 @@ packages: https-proxy-agent: 2.2.2 is-buffer: 2.0.3 karma: 4.2.0 - karma-chrome-launcher: 2.2.0 + karma-chrome-launcher: 3.0.0 karma-coverage: 1.1.2 karma-edge-launcher: 0.4.2_karma@4.2.0 karma-env-preprocessor: 0.1.1 @@ -10475,22 +10488,22 @@ packages: rollup-plugin-shim: 1.0.0 rollup-plugin-sourcemaps: 0.4.2_rollup@1.18.0 rollup-plugin-terser: 5.1.1_rollup@1.18.0 - ts-node: 7.0.1 + ts-node: 8.3.0_typescript@3.5.3 tslib: 1.10.0 typescript: 3.5.3 ws: 6.2.1 dev: false name: '@rush-temp/service-bus' resolution: - integrity: sha512-NZHotJLX4FKwY6NVijuN5RkbKfb59wKzmyX+z6gMvy4I41itMzdQfd6w7kPEUFgsjqLic/aGOZANnKnKiLaNLA== + integrity: sha512-93tbhWPPZ04ozrpvFWfn2wOaLRvnilD6vxPq7xMAnyvi52T7HjHo+NyY1S8bojg4xciYHiDrByvNGxVlgPxVIQ== tarball: 'file:projects/service-bus.tgz' version: 0.0.0 'file:projects/storage-blob.tgz': dependencies: - '@azure/ms-rest-js': 1.8.13 + '@azure/ms-rest-js': 2.0.4 '@microsoft/api-extractor': 7.3.4 '@types/dotenv': 6.1.1 - '@types/fs-extra': 7.0.0 + '@types/fs-extra': 8.0.0 '@types/mocha': 5.2.7 '@types/nise': 1.4.0 '@types/nock': 10.0.3 @@ -10500,7 +10513,7 @@ packages: '@typescript-eslint/parser': 1.13.0_eslint@5.16.0 assert: 1.5.0 cross-env: 5.2.0 - dotenv: 7.0.0 + dotenv: 8.0.0 es6-promise: 4.2.8 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 @@ -10509,12 +10522,12 @@ packages: eslint-plugin-no-only-tests: 2.3.1 eslint-plugin-promise: 4.2.1 events: 3.0.0 - fs-extra: 8.0.1 + fs-extra: 8.1.0 gulp: 4.0.2 - gulp-zip: 4.2.0 + gulp-zip: 5.0.0_gulp@4.0.2 inherits: 2.0.4 karma: 4.2.0 - karma-chrome-launcher: 2.2.0 + karma-chrome-launcher: 3.0.0 karma-coverage: 1.1.2 karma-edge-launcher: 0.4.2_karma@4.2.0 karma-env-preprocessor: 0.1.1 @@ -10546,22 +10559,22 @@ packages: rollup-plugin-terser: 5.1.1_rollup@1.18.0 rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 source-map-support: 0.5.13 - ts-node: 7.0.1 + ts-node: 8.3.0_typescript@3.5.3 tslib: 1.10.0 typescript: 3.5.3 - util: 0.11.1 + util: 0.12.1 dev: false name: '@rush-temp/storage-blob' resolution: - integrity: sha512-KNp0iQwCm/S9NZEzJnzd1ES37i6N8Uqem3e97HdELUG/yZcXMi1G2nPrkBxCbbJsijt60ZPAMmCxCAwbtDRzTg== + integrity: sha512-O9urZlGKQ1g4q8rHMVMRZx+yIpQKI9aZDIZ6VkYXfxjbsi6KSCHjW7k1FQBxoPZv9hk3bGcTBh2DfFfVSa9gDA== tarball: 'file:projects/storage-blob.tgz' version: 0.0.0 'file:projects/storage-file.tgz': dependencies: - '@azure/ms-rest-js': 1.8.13 + '@azure/ms-rest-js': 2.0.4 '@microsoft/api-extractor': 7.3.4 '@types/dotenv': 6.1.1 - '@types/fs-extra': 7.0.0 + '@types/fs-extra': 8.0.0 '@types/mocha': 5.2.7 '@types/nise': 1.4.0 '@types/nock': 10.0.3 @@ -10571,7 +10584,7 @@ packages: '@typescript-eslint/parser': 1.13.0_eslint@5.16.0 assert: 1.5.0 cross-env: 5.2.0 - dotenv: 7.0.0 + dotenv: 8.0.0 es6-promise: 4.2.8 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 @@ -10580,12 +10593,12 @@ packages: eslint-plugin-no-only-tests: 2.3.1 eslint-plugin-promise: 4.2.1 events: 3.0.0 - fs-extra: 8.0.1 + fs-extra: 8.1.0 gulp: 4.0.2 - gulp-zip: 4.2.0 + gulp-zip: 5.0.0_gulp@4.0.2 inherits: 2.0.4 karma: 4.2.0 - karma-chrome-launcher: 2.2.0 + karma-chrome-launcher: 3.0.0 karma-coverage: 1.1.2 karma-edge-launcher: 0.4.2_karma@4.2.0 karma-env-preprocessor: 0.1.1 @@ -10617,22 +10630,22 @@ packages: rollup-plugin-terser: 5.1.1_rollup@1.18.0 rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 source-map-support: 0.5.13 - ts-node: 7.0.1 + ts-node: 8.3.0_typescript@3.5.3 tslib: 1.10.0 typescript: 3.5.3 - util: 0.11.1 + util: 0.12.1 dev: false name: '@rush-temp/storage-file' resolution: - integrity: sha512-J8s4BR2MQXwtYf8Hm6NlaS4WYc0VKdVZapL478+44pNo5lab3u4sDECvFwxYL1BLPcmyrBm59iW8vCTbVfnJ4g== + integrity: sha512-T8/LjmL+LzpeHkEZYIngTSdHgtLopUvlbUHSkzCCkxeVyXi8rUVIwf+P+OcNZ8DNKPH/27xc/zf5zVunVuwSJg== tarball: 'file:projects/storage-file.tgz' version: 0.0.0 'file:projects/storage-queue.tgz': dependencies: - '@azure/ms-rest-js': 1.8.13 + '@azure/ms-rest-js': 2.0.4 '@microsoft/api-extractor': 7.3.4 '@types/dotenv': 6.1.1 - '@types/fs-extra': 7.0.0 + '@types/fs-extra': 8.0.0 '@types/mocha': 5.2.7 '@types/nise': 1.4.0 '@types/nock': 10.0.3 @@ -10642,7 +10655,7 @@ packages: '@typescript-eslint/parser': 1.13.0_eslint@5.16.0 assert: 1.5.0 cross-env: 5.2.0 - dotenv: 7.0.0 + dotenv: 8.0.0 es6-promise: 4.2.8 eslint: 5.16.0 eslint-config-prettier: 4.3.0_eslint@5.16.0 @@ -10650,12 +10663,12 @@ packages: eslint-plugin-no-null: 1.0.2_eslint@5.16.0 eslint-plugin-no-only-tests: 2.3.1 eslint-plugin-promise: 4.2.1 - fs-extra: 8.0.1 + fs-extra: 8.1.0 gulp: 4.0.2 - gulp-zip: 4.2.0 + gulp-zip: 5.0.0_gulp@4.0.2 inherits: 2.0.4 karma: 4.2.0 - karma-chrome-launcher: 2.2.0 + karma-chrome-launcher: 3.0.0 karma-coverage: 1.1.2 karma-edge-launcher: 0.4.2_karma@4.2.0 karma-env-preprocessor: 0.1.1 @@ -10687,19 +10700,18 @@ packages: rollup-plugin-terser: 5.1.1_rollup@1.18.0 rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 source-map-support: 0.5.13 - ts-node: 7.0.1 + ts-node: 8.3.0_typescript@3.5.3 tslib: 1.10.0 typescript: 3.5.3 - util: 0.11.1 + util: 0.12.1 dev: false name: '@rush-temp/storage-queue' resolution: - integrity: sha512-3xjQvHHk+zS/jRDwXqk9W/Y3fO9miaWGYJAdIpXEJuiIsKwfeCirGu988QSkHqjz7pv0v28joO8E1XSEPecovA== + integrity: sha512-FrYcWgIUWbnLdsgPTJqK0xP9kS1ElkifwhzRZ7bC1w4T3wgGwbEleN+1weyt+79EatjIVSelsZTzX6tUuIwBEw== tarball: 'file:projects/storage-queue.tgz' version: 0.0.0 'file:projects/template.tgz': dependencies: - '@azure/ms-rest-js': 1.8.13 '@microsoft/api-extractor': 7.3.4 '@types/mocha': 5.2.7 '@types/node': 8.10.51 @@ -10716,7 +10728,7 @@ packages: events: 3.0.0 inherits: 2.0.4 karma: 4.2.0 - karma-chrome-launcher: 2.2.0 + karma-chrome-launcher: 3.0.0 karma-coverage: 1.1.2 karma-edge-launcher: 0.4.2_karma@4.2.0 karma-env-preprocessor: 0.1.1 @@ -10742,20 +10754,19 @@ packages: rollup-plugin-visualizer: 2.5.4_rollup@1.18.0 tslib: 1.10.0 typescript: 3.5.3 - util: 0.11.1 + util: 0.12.1 dev: false name: '@rush-temp/template' resolution: - integrity: sha512-SsN1TzIAhjm92cBBvws295kBKgwb0Ck0VwXMKKxkohR2XGCjaIc6ypNNgHjPMV/cmyaOue3kd7KYDlNdrFBDpw== + integrity: sha512-Ke/uOOWmrBKdkteo3wsma9x9Dda9mgqZLsDQTxXOG/YS2tBdKzf7kcQxZqjUBNnKCQXerpbu0/3YghicCc7NNA== tarball: 'file:projects/template.tgz' version: 0.0.0 'file:projects/testhub.tgz': dependencies: '@azure/event-hubs': 2.1.1 - '@azure/event-processor-host': 1.0.6 '@types/node': 8.10.51 '@types/uuid': 3.4.5 - '@types/yargs': 11.1.2 + '@types/yargs': 13.0.2 async-lock: 1.2.2 death: 1.1.0 debug: 3.2.6 @@ -10768,23 +10779,23 @@ packages: tslib: 1.10.0 typescript: 3.5.3 uuid: 3.3.2 - yargs: 11.1.0 + yargs: 13.3.0 dev: false name: '@rush-temp/testhub' resolution: - integrity: sha512-5aP/T4HsltLa6B6z0LQSHKjR/pM6y/sD4Y1gp4g/Nt35FzVnQVDkcAbSKTjr4DVb1a2pOwY3q5NDhv0CUDjYbQ== + integrity: sha512-qcngMCJsJmX+G0stXZchWUI/WxyiMNfPI6MBDVbg/YMXc/lqEmttj/MghcZQiS+FMR859XarQzv5mfGa1q5DZQ== tarball: 'file:projects/testhub.tgz' version: 0.0.0 specifiers: '@azure/abort-controller': 1.0.0-preview.1 '@azure/amqp-common': 1.0.0-preview.6 - '@azure/arm-servicebus': ^0.1.0 + '@azure/arm-servicebus': ^3.2.0 '@azure/core-asynciterator-polyfill': 1.0.0-preview.1 + '@azure/core-auth': 1.0.0-preview.1 '@azure/core-paging': 1.0.0-preview.1 '@azure/event-hubs': ^2.1.1 - '@azure/event-processor-host': ^1.0.6 '@azure/logger-js': ^1.0.2 - '@azure/ms-rest-js': ^1.2.6 + '@azure/ms-rest-js': ^2.0.0 '@azure/ms-rest-nodeauth': ^0.9.2 '@microsoft/api-extractor': ^7.1.5 '@rush-temp/abort-controller': 'file:./projects/abort-controller.tgz' @@ -10808,6 +10819,7 @@ specifiers: '@rush-temp/storage-queue': 'file:./projects/storage-queue.tgz' '@rush-temp/template': 'file:./projects/template.tgz' '@rush-temp/testhub': 'file:./projects/testhub.tgz' + '@trust/keyto': 0.3.7 '@types/async-lock': ^1.1.0 '@types/chai': ^4.1.6 '@types/chai-as-promised': ^7.1.0 @@ -10815,7 +10827,7 @@ specifiers: '@types/debug': ^0.0.31 '@types/dotenv': ^6.1.0 '@types/express': ^4.16.0 - '@types/fs-extra': ~7.0.0 + '@types/fs-extra': ^8.0.0 '@types/glob': ^7.1.1 '@types/is-buffer': ^2.0.0 '@types/jssha': ^2.0.0 @@ -10831,16 +10843,16 @@ specifiers: '@types/query-string': 6.2.0 '@types/semaphore': ^1.1.0 '@types/semver': ^5.5.0 - '@types/sinon': ^5.0.5 - '@types/tough-cookie': ^2.3.3 - '@types/tunnel': ^0.0.0 + '@types/sinon': ^7.0.13 + '@types/tough-cookie': ^2.3.5 + '@types/tunnel': ^0.0.1 '@types/underscore': ^1.8.8 '@types/uuid': ^3.4.3 '@types/webpack': ^4.4.13 '@types/webpack-dev-middleware': ^2.0.2 '@types/ws': ^6.0.1 '@types/xml2js': ^0.4.3 - '@types/yargs': ^11.0.0 + '@types/yargs': ^13.0.0 '@typescript-eslint/eslint-plugin': ^1.11.0 '@typescript-eslint/parser': ^1.11.0 abortcontroller-polyfill: ^1.1.9 @@ -10859,7 +10871,7 @@ specifiers: death: ^1.1.0 debug: ^3.1.0 delay: ^4.2.0 - dotenv: ^7.0.0 + dotenv: ^8.0.0 es6-promise: ^4.2.5 eslint: ^5.16.0 eslint-config-prettier: ^4.2.0 @@ -10871,10 +10883,10 @@ specifiers: execa: 1.0.0 express: ^4.16.3 form-data: ^2.5.0 - fs-extra: ~8.0.1 + fs-extra: ^8.1.0 glob: ^7.1.2 gulp: ^4.0.0 - gulp-zip: ^4.2.0 + gulp-zip: ^5.0.0 https-proxy-agent: ^2.2.1 inherits: ^2.0.3 is-buffer: ^2.0.3 @@ -10882,7 +10894,7 @@ specifiers: jws: ~3.2.2 karma: ^4.0.1 karma-chai: ^0.1.0 - karma-chrome-launcher: ^2.2.0 + karma-chrome-launcher: ^3.0.0 karma-coverage: ^1.1.2 karma-edge-launcher: ^0.4.2 karma-env-preprocessor: ^0.1.1 @@ -10911,7 +10923,6 @@ specifiers: nock: ^10.0.6 npm-run-all: ^4.1.5 nyc: ^14.0.0 - opn-cli: ^4.0.0 path-browserify: ^1.0.0 prettier: ^1.16.4 priorityqueuejs: 1.0.0 @@ -10921,6 +10932,7 @@ specifiers: qs: 6.7.0 query-string: ^5.0.0 requirejs: ^2.3.5 + resolve: 1.11.1 rhea: ^1.0.4 rhea-promise: ^0.1.15 rimraf: ^2.6.2 @@ -10946,16 +10958,16 @@ specifiers: source-map-support: ^0.5.9 stream-browserify: ^2.0.2 stream-http: ^2.8.3 - tough-cookie: ^2.4.3 - ts-loader: ^5.3.1 + tough-cookie: ^3.0.1 + ts-loader: ^6.0.4 ts-mocha: ^6.0.0 - ts-node: ^7.0.1 + ts-node: ^8.3.0 tslib: ^1.9.3 - tunnel: 0.0.6 + tunnel: ^0.0.6 typescript: ^3.2.2 uglify-js: ^3.4.9 url: ^0.11.0 - util: ^0.11.1 + util: ^0.12.1 uuid: ^3.3.2 webpack: ^4.16.3 webpack-cli: ^3.2.3 @@ -10963,5 +10975,5 @@ specifiers: ws: ^6.2.1 xhr-mock: ^2.4.1 xml2js: ^0.4.19 - yargs: ^11.0.0 + yargs: ^13.0.0 yarn: ^1.6.0 diff --git a/sdk/core/core-tracing/package.json b/sdk/core/core-tracing/package.json index 3badcf3b59e9..ae0de01db51e 100644 --- a/sdk/core/core-tracing/package.json +++ b/sdk/core/core-tracing/package.json @@ -90,6 +90,6 @@ "rollup-plugin-terser": "^5.1.1", "rollup-plugin-visualizer": "^2.0.0", "typescript": "^3.2.2", - "util": "^0.11.1" + "util": "^0.12.1" } } diff --git a/sdk/keyvault/keyvault-keys/review/keyvault-keys.api.md b/sdk/keyvault/keyvault-keys/review/keyvault-keys.api.md index 10520dbf84c8..2fcad9943f4c 100644 --- a/sdk/keyvault/keyvault-keys/review/keyvault-keys.api.md +++ b/sdk/keyvault/keyvault-keys/review/keyvault-keys.api.md @@ -50,13 +50,13 @@ export class CryptographyClient { getKey(options?: GetKeyOptions): Promise; key: string | JsonWebKey; readonly pipeline: ServiceClientOptions; - sign(algorithm: JsonWebKeySignatureAlgorithm, digest: Uint8Array, options?: RequestOptions): Promise; + // Warning: (ae-forgotten-export) The symbol "KeySignatureAlgorithm" needs to be exported by the entry point index.d.ts + sign(algorithm: KeySignatureAlgorithm, digest: Uint8Array, options?: RequestOptions): Promise; signData(algorithm: KeySignatureAlgorithm, data: Uint8Array, options?: RequestOptions): Promise; unwrapKey(algorithm: KeyWrapAlgorithm, encryptedKey: Uint8Array, options?: RequestOptions): Promise; readonly vaultBaseUrl: string; - // Warning: (ae-forgotten-export) The symbol "KeySignatureAlgorithm" needs to be exported by the entry point index.d.ts verify(algorithm: KeySignatureAlgorithm, digest: Uint8Array, signature: Uint8Array, options?: RequestOptions): Promise; - verifyData(algorithm: JsonWebKeySignatureAlgorithm, data: Uint8Array, signature: Uint8Array, options?: RequestOptions): Promise; + verifyData(algorithm: KeySignatureAlgorithm, data: Uint8Array, signature: Uint8Array, options?: RequestOptions): Promise; wrapKey(algorithm: KeyWrapAlgorithm, key: Uint8Array, options?: RequestOptions): Promise; } @@ -149,9 +149,6 @@ export type JsonWebKeyEncryptionAlgorithm = "RSA-OAEP" | "RSA-OAEP-256" | "RSA1_ // @public export type JsonWebKeyOperation = "encrypt" | "decrypt" | "sign" | "verify" | "wrapKey" | "unwrapKey"; -// @public -export type JsonWebKeySignatureAlgorithm = "PS256" | "PS384" | "PS512" | "RS256" | "RS384" | "RS512" | "RSNULL" | "ES256" | "ES384" | "ES512" | "ES256K"; - // @public export type JsonWebKeyType = "EC" | "EC-HSM" | "RSA" | "RSA-HSM" | "oct"; diff --git a/sdk/keyvault/keyvault-keys/src/index.ts b/sdk/keyvault/keyvault-keys/src/index.ts index cd2eb534e9b2..95245c63637b 100644 --- a/sdk/keyvault/keyvault-keys/src/index.ts +++ b/sdk/keyvault/keyvault-keys/src/index.ts @@ -69,7 +69,7 @@ import { KeyWrapAlgorithm, EncryptResult, DecryptResult, - SignResult, + SignResult, VerifyResult, WrapResult, UnwrapResult @@ -106,7 +106,7 @@ export { UnwrapResult, UpdateKeyOptions, VerifyResult, - WrapResult, + WrapResult }; export { ProxyOptions, TelemetryOptions, RetryOptions }; @@ -484,6 +484,7 @@ export class KeysClient { * @returns Promise */ public async deleteKey(name: string, options?: RequestOptions): Promise { + options = this.getClonedOptions(options); const spanOptions = this.getSpanOptions(options); const span: Span = TracerProxy.getTracer().startSpan("deleteKeyMethod", spanOptions); if (spanOptions) { @@ -577,6 +578,7 @@ export class KeysClient { * @returns Promise */ public async getKey(name: string, options?: GetKeyOptions): Promise { + options = this.getClonedOptions(options); const spanOptions = this.getSpanOptions(options); const span: Span = TracerProxy.getTracer().startSpan("getKeyMethod", spanOptions); if (spanOptions) { @@ -611,6 +613,7 @@ export class KeysClient { * @returns Promise */ public async getDeletedKey(name: string, options?: RequestOptions): Promise { + options = this.getClonedOptions(options); const spanOptions = this.getSpanOptions(options); const span: Span = TracerProxy.getTracer().startSpan("getDeletedKeyMethod", spanOptions); if (spanOptions) { @@ -646,6 +649,7 @@ export class KeysClient { * @returns Promise */ public async purgeDeletedKey(name: string, options?: RequestOptions): Promise { + options = this.getClonedOptions(options); const spanOptions = this.getSpanOptions(options); const span: Span = TracerProxy.getTracer().startSpan("purgeDeletedKeyMethod", spanOptions); if (spanOptions) { @@ -679,6 +683,7 @@ export class KeysClient { * @returns Promise */ public async recoverDeletedKey(name: string, options?: RequestOptions): Promise { + options = this.getClonedOptions(options); const spanOptions = this.getSpanOptions(options); const span: Span = TracerProxy.getTracer().startSpan("recoverDeletedKeyMethod", spanOptions); if (spanOptions) { @@ -711,6 +716,7 @@ export class KeysClient { * @returns Promise */ public async backupKey(name: string, options?: RequestOptions): Promise { + options = this.getClonedOptions(options); const spanOptions = this.getSpanOptions(options); const span: Span = TracerProxy.getTracer().startSpan("backupKeyMethod", spanOptions); if (spanOptions) { @@ -745,6 +751,7 @@ export class KeysClient { * @returns Promise */ public async restoreKey(backup: Uint8Array, options?: RequestOptions): Promise { + options = this.getClonedOptions(options); const spanOptions = this.getSpanOptions(options); const span: Span = TracerProxy.getTracer().startSpan("restoreKeyMethod", spanOptions); if (spanOptions) { @@ -821,6 +828,7 @@ export class KeysClient { name: string, options?: ListKeysOptions ): PagedAsyncIterableIterator { + options = this.getClonedOptions(options); const spanOptions = this.getSpanOptions(options); const span: Span = TracerProxy.getTracer().startSpan("listKeyVersionsMethod", spanOptions); if (spanOptions) { @@ -894,6 +902,7 @@ export class KeysClient { public listKeys( options?: ListKeysOptions ): PagedAsyncIterableIterator { + options = this.getClonedOptions(options); const spanOptions = this.getSpanOptions(options); const span: Span = TracerProxy.getTracer().startSpan("listKeysMethod", spanOptions); if (spanOptions) { @@ -1040,6 +1049,16 @@ export class KeysClient { return resultObject; } + private getClonedOptions( + options?: ListKeysOptions | RequestOptions | GetKeyOptions | UpdateKeyOptions + ): any { + if (!options) { + return options; + } + + return { ...options }; + } + private getSpanOptions( options?: ListKeysOptions | RequestOptions | GetKeyOptions | UpdateKeyOptions ): any { From 858af9ebf51d424f53d19b90cb57e130cec67ca0 Mon Sep 17 00:00:00 2001 From: Sarangan Rajamanickam Date: Fri, 2 Aug 2019 12:50:26 -0700 Subject: [PATCH 23/23] Adding cloning to remaining APIs --- sdk/keyvault/keyvault-keys/src/index.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sdk/keyvault/keyvault-keys/src/index.ts b/sdk/keyvault/keyvault-keys/src/index.ts index 95245c63637b..4aa379a6dbaf 100644 --- a/sdk/keyvault/keyvault-keys/src/index.ts +++ b/sdk/keyvault/keyvault-keys/src/index.ts @@ -278,7 +278,7 @@ export class KeysClient { delete unflattenedOptions.expires; delete unflattenedOptions.requestOptions; - const spanOptions = this.getSpanOptions(options); + const spanOptions = this.getSpanOptions(unflattenedOptions); const span: Span = TracerProxy.getTracer().startSpan("createKeyMethod", spanOptions); if (spanOptions) { spanOptions.parent = span; @@ -334,7 +334,7 @@ export class KeysClient { delete unflattenedOptions.expires; delete unflattenedOptions.requestOptions; - const spanOptions = this.getSpanOptions(options); + const spanOptions = this.getSpanOptions(unflattenedOptions); const span: Span = TracerProxy.getTracer().startSpan("createEcKeyMethod", spanOptions); if (spanOptions) { spanOptions.parent = span; @@ -390,7 +390,7 @@ export class KeysClient { delete unflattenedOptions.expires; delete unflattenedOptions.requestOptions; - const spanOptions = this.getSpanOptions(options); + const spanOptions = this.getSpanOptions(unflattenedOptions); const span: Span = TracerProxy.getTracer().startSpan("createRsaKeyMethod", spanOptions); if (spanOptions) { spanOptions.parent = span; @@ -446,7 +446,7 @@ export class KeysClient { delete unflattenedOptions.expires; delete unflattenedOptions.requestOptions; - const spanOptions = this.getSpanOptions(options); + const spanOptions = this.getSpanOptions(unflattenedOptions); const span: Span = TracerProxy.getTracer().startSpan("importKeyMethod", spanOptions); if (spanOptions) { spanOptions.parent = span; @@ -541,7 +541,7 @@ export class KeysClient { delete unflattenedOptions.expires; delete unflattenedOptions.requestOptions; - const spanOptions = this.getSpanOptions(options); + const spanOptions = this.getSpanOptions(unflattenedOptions); const span: Span = TracerProxy.getTracer().startSpan("updateKeyMethod", spanOptions); if (spanOptions) { spanOptions.parent = span; @@ -1059,12 +1059,12 @@ export class KeysClient { return { ...options }; } - private getSpanOptions( - options?: ListKeysOptions | RequestOptions | GetKeyOptions | UpdateKeyOptions - ): any { + private getSpanOptions(options?: any): any { return options ? options.requestOptions ? options.requestOptions.spanOptions + : options.spanOptions + ? options.spanOptions : undefined : undefined; }