Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KeyVault] Common folder #8866

Merged
merged 26 commits into from
Jun 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
7c46f37
Update challengeBasedAuthenticationPolicy.ts
sadasant Apr 27, 2020
ec0f23a
Common folder for the challenge based auth
sadasant Apr 29, 2020
8b82b38
deleting this from certificates again
sadasant Apr 29, 2020
8824a8c
wip
sadasant Apr 29, 2020
e1f9ea0
fixes from https://github.com/ljian3377/azure-sdk-for-js/commit/0ce33…
sadasant May 12, 2020
960ac88
other changes that make sense after rebasing
sadasant May 12, 2020
2efcad1
making sure keyvault-common is up to date
sadasant May 12, 2020
bce9304
same changes on keys and secrets
sadasant May 12, 2020
ba15401
formatting
sadasant May 12, 2020
996faf4
this .gitignore is not needed
sadasant May 12, 2020
a3b1ba7
bringing the hotfix to this PR and making sure it passes CI
sadasant May 21, 2020
daf036b
Merge remote-tracking branch 'Azure/master' into keyvault/common-folder
sadasant May 21, 2020
e873fcf
new pnpm-lock after merging master
sadasant May 21, 2020
29de300
package.json and eslintrc updates
sadasant May 21, 2020
d737798
Merge remote-tracking branch 'Azure/master' into keyvault/common-folder
sadasant May 27, 2020
925bae1
Merge remote-tracking branch 'Azure/master' into keyvault/common-folder
sadasant May 29, 2020
91007b4
Merge remote-tracking branch 'Azure/master' into keyvault/common-folder
sadasant Jun 1, 2020
bf263c6
Merge remote-tracking branch 'Azure/master' into keyvault/common-folder
sadasant Jun 2, 2020
4e8265d
fixed end of file on keyvault-common/src/index.ts
sadasant Jun 2, 2020
963fae8
Merge remote-tracking branch 'Azure/master' into keyvault/common-folder
sadasant Jun 2, 2020
aae90ff
some of the feedback
sadasant Jun 13, 2020
f423dbe
Merge remote-tracking branch 'Azure/master' into keyvault/common-folder
sadasant Jun 13, 2020
a56bd99
standard tsconf on keyvault-common
sadasant Jun 13, 2020
fea30d9
Merge remote-tracking branch 'Azure/master' into keyvault/common-folder
sadasant Jun 17, 2020
4de173b
tsconfig.json cleanup
sadasant Jun 17, 2020
4ae09d5
removed unnecessary scripts from keyvault-common
sadasant Jun 17, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,242 changes: 720 additions & 522 deletions common/config/rush/pnpm-lock.yaml

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions eng/.docsettings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ omitted_paths:
- sdk/identity/identity/test/manual-integration/*
- sdk/test-utils/perfstress/README.md
- sdk/keyvault/*/test/README.md
- sdk/keyvault/keyvault-common/*
- sdk/appconfiguration/*/test/README.md
- sdk/eventhub/*/test/README.md
- sdk/search/*/test/README.md
Expand Down
5 changes: 5 additions & 0 deletions rush.json
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,11 @@
"projectFolder": "sdk/identity/identity",
"versionPolicyName": "client"
},
{
"packageName": "@azure/keyvault-common",
"projectFolder": "sdk/keyvault/keyvault-common",
"versionPolicyName": "utility"
},
{
"packageName": "@azure/keyvault-certificates",
"projectFolder": "sdk/keyvault/keyvault-certificates",
Expand Down
4 changes: 3 additions & 1 deletion sdk/keyvault/keyvault-certificates/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"ignorePatterns": ["src/core"],
"rules": {
"@typescript-eslint/no-this-alias": "off",
"no-invalid-this": "off"
"no-invalid-this": "off",
"@azure/azure-sdk/ts-package-json-module": "warn",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean we have active warnings now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what you mean. This change is needed because the current rules don't work with this project structure. Once this is merged, and after we polish it, I think we will have a good enough idea of how to change the ESLint rules! Let me know what you think.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I don't see the point in leaving active warnings in a project. Either we should fix the issue (which in this case I think means fixing the rule?) or disable the rule for now and file an issue to follow-up on turning it back on.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(@willmtemple)

Here's the thing:

As we move forward with the test guidelines, we will need to update several things, including the eslint rules. It will take us some time to get there though. I think we would better fix the libraries first, then fix the eslint plugin. What Will did makes sense for our current state. This PR is in an intermediate state.

"@azure/azure-sdk/ts-package-json-files-required": "warn"
}
}
2 changes: 1 addition & 1 deletion sdk/keyvault/keyvault-certificates/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "types/src/index.d.ts",
"mainEntryPointFilePath": "types/keyvault-certificates/src/index.d.ts",
"docModel": {
"enabled": false
},
Expand Down
12 changes: 7 additions & 5 deletions sdk/keyvault/keyvault-certificates/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,17 @@
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"main": "./dist/index.js",
"module": "dist-esm/src/index.js",
"module": "dist-esm/keyvault-certificates/src/index.js",
HarshaNalluru marked this conversation as resolved.
Show resolved Hide resolved
"types": "./types/keyvault-certificates.d.ts",
"engines": {
"node": ">=8.0.0"
},
"files": [
"types/keyvault-certificates.d.ts",
"types/",
"dist/",
"dist-esm/src",
"dist-browser/",
"dist-esm/keyvault-certificates/src",
"dist-esm/keyvault-common/src",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

"README.md",
"LICENSE"
],
Expand All @@ -52,8 +54,8 @@
"extract-api": "tsc -p . && api-extractor run --local",
"format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"samples/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
"integration-test:browser": "karma start --single-run",
"integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace dist-esm/test/*.test.js",
"integration-test:node:no-timeout": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --no-timeouts --full-trace dist-esm/test/*.test.js",
"integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace dist-esm/keyvault-certificates/test/*.test.js",
"integration-test:node:no-timeout": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --no-timeouts --full-trace dist-esm/keyvault-certificates/test/*.test.js",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o keyvault-certificates-lintReport.html",
Expand Down
8 changes: 4 additions & 4 deletions sdk/keyvault/keyvault-certificates/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function nodeConfig(test = false) {
const externalNodeBuiltins = ["crypto", "fs", "os", "url", "assert"];
const additionalExternals = ["keytar"];
const baseConfig = {
input: "dist-esm/src/index.js",
input: "dist-esm/keyvault-certificates/src/index.js",
external: depNames.concat(externalNodeBuiltins, additionalExternals),
output: {
file: "dist/index.js",
Expand All @@ -57,7 +57,7 @@ export function nodeConfig(test = false) {

if (test) {
// entry point is every test file
baseConfig.input = ["dist-esm/test/*.test.js"];
baseConfig.input = ["dist-esm/keyvault-certificates/test/*.test.js"];
baseConfig.plugins.unshift(
multiEntry({ exports: false }),
json() // This allows us to import/require the package.json file, to get the version and test it against the user agent.
Expand All @@ -83,7 +83,7 @@ export function nodeConfig(test = false) {

export function browserConfig(test = false) {
const baseConfig = {
input: "dist-esm/src/index.js",
input: "dist-esm/keyvault-certificates/src/index.js",
output: {
file: "dist-browser/azure-keyvault-certificates.js",
banner: banner,
Expand Down Expand Up @@ -131,7 +131,7 @@ export function browserConfig(test = false) {
baseConfig.external = ["fs", "fs-extra", "child_process", "path", "crypto", "constants"];
if (test) {
baseConfig.external.push("os");
baseConfig.input = ["dist-esm/test/*.test.js"];
baseConfig.input = ["dist-esm/keyvault-certificates/test/*.test.js"];
baseConfig.plugins.unshift(
multiEntry({ exports: false }),
json() // This allows us to import/require the package.json file, to get the version and test it against the user agent.
Expand Down
5 changes: 3 additions & 2 deletions sdk/keyvault/keyvault-certificates/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
// This file makes more sense if ordered based on how meaningful are some methods in relation to others.
/* eslint-disable @typescript-eslint/member-ordering */

/// <reference lib="esnext.asynciterable" />

import {
TokenCredential,
isTokenCredential,
Expand Down Expand Up @@ -140,8 +142,7 @@ import { SDK_VERSION } from "./core/utils/constants";
import { parseKeyvaultIdentifier as parseKeyvaultEntityIdentifier } from "./core/utils";
import "@azure/core-paging";
import { PageSettings, PagedAsyncIterableIterator } from "@azure/core-paging";
import { challengeBasedAuthenticationPolicy } from "./core/challengeBasedAuthenticationPolicy";

import { challengeBasedAuthenticationPolicy } from "../../keyvault-common/src";
import { CreateCertificatePoller } from "./lro/create/poller";
import { CertificateOperationPoller } from "./lro/operation/poller";
import { DeleteCertificatePoller } from "./lro/delete/poller";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {
AuthenticationChallengeCache,
AuthenticationChallenge,
parseWWWAuthenticate
} from "../src/core/challengeBasedAuthenticationPolicy";
} from "../../keyvault-common/src";
import { createSandbox } from "sinon";
import { testPollerProperties } from './utils/recorderUtils';
import { testPollerProperties } from "./utils/recorderUtils";

// Following the philosophy of not testing the insides if we can test the outsides...
// I present you with this "Get Out of Jail Free" card (in reference to Monopoly).
Expand Down Expand Up @@ -56,10 +56,16 @@ describe("Challenge based authentication tests", () => {
// Now we run what would be a normal use of the client.
// Here we will create two keys, then flush them.
// testClient.flushCertificate deletes, then purges the keys.
const certificateName = testClient.formatName(`${certificatePrefix}-${this!.test!.title}-${certificateSuffix}`);
const certificateName = testClient.formatName(
`${certificatePrefix}-${this!.test!.title}-${certificateSuffix}`
);
const certificateNames = [`${certificateName}-0`, `${certificateName}-1`];
for (const name of certificateNames) {
const poller = await client.beginCreateCertificate(name, basicCertificatePolicy, testPollerProperties);
const poller = await client.beginCreateCertificate(
name,
basicCertificatePolicy,
testPollerProperties
);
await poller.pollUntilDone();
}
for (const name of certificateNames) {
Expand All @@ -76,15 +82,21 @@ describe("Challenge based authentication tests", () => {
});

it("Authentication should work for parallel requests", async function() {
const certificateName = testClient.formatName(`${certificatePrefix}-${this!.test!.title}-${certificateSuffix}`);
const certificateName = testClient.formatName(
`${certificatePrefix}-${this!.test!.title}-${certificateSuffix}`
);
const certificateNames = [`${certificateName}-0`, `${certificateName}-1`];

const sandbox = createSandbox();
const spy = sandbox.spy(AuthenticationChallengeCache.prototype, "setCachedChallenge");
const spyEqualTo = sandbox.spy(AuthenticationChallenge.prototype, "equalTo");

const promises = certificateNames.map((name) => {
const promise = client.beginCreateCertificate(name, basicCertificatePolicy, testPollerProperties);
const promise = client.beginCreateCertificate(
name,
basicCertificatePolicy,
testPollerProperties
);
return { promise, name };
});

Expand Down
6 changes: 3 additions & 3 deletions sdk/keyvault/keyvault-certificates/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"compilerOptions": {
"declarationDir": "./types",
"outDir": "./dist-esm",
"lib": ["dom", "esnext.asynciterable"],
"lib": ["dom"],
"resolveJsonModule": true
},
"exclude": ["node_modules", "./types/**/*.d.ts", "./samples/**/*.ts"],
"include": ["./src/**/*.ts", "./test/**/*.ts"]
"exclude": ["node_modules", "../keyvault-common/node_modules", "./samples/**/*.ts"],
"include": ["./src/**/*.ts", "./test/**/*.ts", "../keyvault-common/**/*.ts"]
sadasant marked this conversation as resolved.
Show resolved Hide resolved
}
4 changes: 4 additions & 0 deletions sdk/keyvault/keyvault-common/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

export * from "./src";
55 changes: 55 additions & 0 deletions sdk/keyvault/keyvault-common/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"name": "@azure/keyvault-common",
"sideEffects": false,
"private": true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this library need to ship? If so why it is marked private?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a library, it's a shared folder that gets built and shipped through the other packages: keyvault-keys, keyvault-secrets and keyvault-certificates.

The package.json is there so that VSCode can pick up the dependencies.

"author": "Microsoft Corporation",
"version": "1.0.0",
"license": "MIT",
"description": "Common internal functionality for all of the Azure Key Vault clients in the Azure SDK for JavaScript",
"repository": "github:Azure/azure-sdk-for-js",
"main": "./src/index.ts",
"module": "dist-esm/index.js",
"types": "./types/index.d.ts",
"engines": {
"node": ">=8.0.0"
},
"scripts": {
"audit": "echo skipped",
"build:minify": "echo skipped",
"build:samples": "echo skipped",
"build:es6": "tsc -p tsconfig.json",
"build:nodebrowser": "echo skipped",
"build:test": "echo skipped",
"build": "npm run extract-api && npm run build:es6 && npm run build:nodebrowser",
"check-format": "prettier --list-different --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
"clean": "rimraf dist-esm dist-test typings *.tgz *.log samples/typescript/dist",
"execute:js-samples": "echo skipped",
"execute:ts-samples": "echo skipped",
"execute:samples": "npm run build:samples && npm run execute:js-samples && npm run execute:ts-samples",
"extract-api": "echo skipped",
"format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"*.{js,json}\"",
"integration-test:browser": "echo skipped",
"integration-test:node": "echo skipped",
"integration-test:node:no-timeout": "echo skipped",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"lint:fix": "eslint package.json src --ext .ts --fix --fix-type [problem,suggestion]",
"lint": "eslint src --ext .ts -f html -o search-lintReport.html || exit 0",
"lint:terminal": "eslint src --ext .ts",
"pack": "npm pack 2>&1",
"prebuild": "npm run clean",
"test:browser": "npm run clean && npm run build:test && npm run unit-test:browser",
"test:node": "npm run clean && npm run build:test && npm run unit-test:node",
"test": "npm run clean && npm run build:test && npm run unit-test",
"unit-test:browser": "echo skipped",
"unit-test:node": "echo skipped",
"unit-test:node:no-timeout": "echo skipped",
"unit-test": "npm run unit-test:node && npm run unit-test:browser"
},
"dependencies": {
"@azure/core-http": "^1.1.1",
"tslib": "^2.0.0"
},
"devDependencies": {
"typescript": "~3.9.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
BaseRequestPolicy,
RequestPolicy,
RequestPolicyOptions,
RequestPolicyFactory
RequestPolicyFactory,
} from "@azure/core-http";
import { Constants } from "@azure/core-http";
import { HttpOperationResponse } from "@azure/core-http";
Expand Down Expand Up @@ -78,7 +78,7 @@ export function challengeBasedAuthenticationPolicy(
tokenCache,
challengeCache
);
}
},
};
}

Expand All @@ -103,7 +103,7 @@ export function parseWWWAuthenticate(wwwAuthenticate: string): ParsedWWWAuthenti
const parsed = keyValues.reduce<ParsedWWWAuthenticate>(
(result, [key, value]: string[]) => ({
...result,
[key]: value.slice(1, -1)
[key]: value.slice(1, -1),
}),
{}
);
Expand Down
4 changes: 4 additions & 0 deletions sdk/keyvault/keyvault-common/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

export * from "./challengeBasedAuthenticationPolicy";
sadasant marked this conversation as resolved.
Show resolved Hide resolved
11 changes: 11 additions & 0 deletions sdk/keyvault/keyvault-common/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: this should extend the common one rather than creating more debt ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woah!! Since when??? ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be good now!

"extends": "../../../tsconfig.package",
"compilerOptions": {
"declarationDir": "./types",
"outDir": "./dist-esm",
"lib": ["dom"],
"resolveJsonModule": true
},
"exclude": ["node_modules"],
"include": ["./src/**/*.ts"]
}
4 changes: 3 additions & 1 deletion sdk/keyvault/keyvault-keys/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
"ignorePatterns": ["src/core"],
"rules": {
"@typescript-eslint/no-this-alias": "off",
"no-invalid-this": "off"
"no-invalid-this": "off",
"@azure/azure-sdk/ts-package-json-module": "warn",
"@azure/azure-sdk/ts-package-json-files-required": "warn"
}
}
2 changes: 1 addition & 1 deletion sdk/keyvault/keyvault-keys/api-extractor.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "types/src/index.d.ts",
"mainEntryPointFilePath": "types/keyvault-keys/src/index.d.ts",
"docModel": {
"enabled": false
},
Expand Down
14 changes: 4 additions & 10 deletions sdk/keyvault/keyvault-keys/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,12 @@
"url": "https://github.com/Azure/azure-sdk-for-js/issues"
},
"main": "./dist/index.js",
"module": "dist-esm/src/index.js",
"module": "dist-esm/keyvault-keys/src/index.js",
"types": "./types/keyvault-keys.d.ts",
"engines": {
"node": ">=8.0.0"
},
"files": [
"types/keyvault-keys.d.ts",
"dist/",
"dist-esm/src",
"README.md",
"LICENSE"
],
"files": ["types/keyvault-keys.d.ts", "types/", "dist/", "dist-browser/", "dist-esm/keyvault-keys/src", "dist-esm/keyvault-common/src", "README.md", "LICENSE"],
"browser": {
"os": false,
"process": false
Expand All @@ -52,8 +46,8 @@
"extract-api": "tsc -p . && api-extractor run --local",
"format": "prettier --write --config ../../.prettierrc.json \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
"integration-test:browser": "karma start --single-run",
"integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace dist-esm/test/*.test.js",
"integration-test:node:no-timeout": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --no-timeouts --full-trace dist-esm/test/*.test.js",
"integration-test:node": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace dist-esm/keyvault-keys/test/*.test.js",
"integration-test:node:no-timeout": "nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --no-timeouts --full-trace dist-esm/keyvault-keys/test/*.test.js",
"integration-test": "npm run integration-test:node && npm run integration-test:browser",
"lint:fix": "eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]",
"lint": "eslint package.json api-extractor.json src test --ext .ts -f html -o keyvault-keys-lintReport.html",
Expand Down
8 changes: 4 additions & 4 deletions sdk/keyvault/keyvault-keys/rollup.base.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function nodeConfig(test = false) {
const externalNodeBuiltins = ["crypto", "fs", "os", "url", "assert"];
const additionalExternals = ["keytar"];
const baseConfig = {
input: "dist-esm/src/index.js",
input: "dist-esm/keyvault-keys/src/index.js",
external: depNames.concat(externalNodeBuiltins, additionalExternals),
output: {
file: "dist/index.js",
Expand All @@ -57,7 +57,7 @@ export function nodeConfig(test = false) {

if (test) {
// entry point is every test file
baseConfig.input = ["dist-esm/test/*.test.js"];
baseConfig.input = ["dist-esm/keyvault-keys/test/*.test.js"];
baseConfig.plugins.unshift(
multiEntry({ exports: false }),
json() // This allows us to import/require the package.json file, to get the version and test it against the user agent.
Expand All @@ -83,7 +83,7 @@ export function nodeConfig(test = false) {

export function browserConfig(test = false) {
const baseConfig = {
input: "dist-esm/src/index.js",
input: "dist-esm/keyvault-keys/src/index.js",
output: {
file: "dist-browser/azure-keyvault-keys.js",
banner: banner,
Expand Down Expand Up @@ -128,7 +128,7 @@ export function browserConfig(test = false) {

baseConfig.external = ["fs-extra", "path", "crypto", "constants"];
if (test) {
baseConfig.input = ["dist-esm/test/*.test.js"];
baseConfig.input = ["dist-esm/keyvault-keys/test/*.test.js"];
baseConfig.plugins.unshift(
multiEntry({ exports: false }),
json() // This allows us to import/require the package.json file, to get the version and test it against the user agent.
Expand Down
Loading