diff --git a/packages/token-providers/package.json b/packages/token-providers/package.json index 5bd1f873b9a9..af0598bd9c40 100644 --- a/packages/token-providers/package.json +++ b/packages/token-providers/package.json @@ -27,11 +27,41 @@ }, "license": "Apache-2.0", "dependencies": { + "@aws-crypto/sha256-browser": "3.0.0", + "@aws-crypto/sha256-js": "3.0.0", + "@aws-sdk/middleware-host-header": "*", + "@aws-sdk/middleware-logger": "*", + "@aws-sdk/middleware-recursion-detection": "*", + "@aws-sdk/middleware-user-agent": "*", "@aws-sdk/types": "*", - "@smithy/property-provider": "^2.0.0", - "@smithy/shared-ini-file-loader": "^2.0.0", + "@aws-sdk/util-endpoints": "*", + "@aws-sdk/util-user-agent-browser": "*", + "@aws-sdk/util-user-agent-node": "*", + "@smithy/config-resolver": "^2.0.2", + "@smithy/fetch-http-handler": "^2.0.2", + "@smithy/hash-node": "^2.0.2", + "@smithy/invalid-dependency": "^2.0.2", + "@smithy/middleware-content-length": "^2.0.2", + "@smithy/middleware-endpoint": "^2.0.2", + "@smithy/middleware-retry": "^2.0.2", + "@smithy/middleware-serde": "^2.0.2", + "@smithy/middleware-stack": "^2.0.0", + "@smithy/node-config-provider": "^2.0.2", + "@smithy/node-http-handler": "^2.0.2", + "@smithy/protocol-http": "^2.0.2", + "@smithy/smithy-client": "^2.0.2", "@smithy/types": "^2.1.0", - "tslib": "^2.5.0" + "@smithy/url-parser": "^2.0.2", + "@smithy/util-base64": "^2.0.0", + "@smithy/util-body-length-browser": "^2.0.0", + "@smithy/util-body-length-node": "^2.0.0", + "@smithy/util-defaults-mode-browser": "^2.0.2", + "@smithy/util-defaults-mode-node": "^2.0.2", + "@smithy/util-retry": "^2.0.0", + "@smithy/util-utf8": "^2.0.0", + "tslib": "^2.5.0", + "@smithy/property-provider": "^2.0.0", + "@smithy/shared-ini-file-loader": "^2.0.0" }, "devDependencies": { "@tsconfig/recommended": "1.0.1", @@ -71,4 +101,4 @@ "typedoc": { "entryPoint": "src/index.ts" } -} +} \ No newline at end of file diff --git a/packages/token-providers/scripts/esbuild.js b/packages/token-providers/scripts/esbuild.js index bf96fcabfc5f..1f9471860b49 100644 --- a/packages/token-providers/scripts/esbuild.js +++ b/packages/token-providers/scripts/esbuild.js @@ -22,6 +22,9 @@ const root = path.join(__dirname, "..", "..", ".."); path.join(path.dirname(defaultRuntimeConfigFile), "runtimeConfig.browser.ts") ); + const clientSsoOidcPkgJson = require(path.join(root, "clients", "client-sso-oidc", "package.json")); + const tokenProvidersPkgJson = require(path.join(root, "packages", "token-providers", "package.json")); + for (const platform of ["browser", "node"]) { if (platform === "browser") { fs.writeFileSync(defaultRuntimeConfigFile, browserRuntimeConfig); @@ -54,4 +57,15 @@ const root = path.join(__dirname, "..", "..", ".."); } fs.writeFileSync(defaultRuntimeConfigFile, nodeRuntimeConfig); + + // add a dependency on the externals of the bundle, using the declared dependencies of SSOOIDCClient. + tokenProvidersPkgJson.dependencies = { + ...clientSsoOidcPkgJson.dependencies, + ...tokenProvidersPkgJson.dependencies, + }; + + fs.writeFileSync( + path.join(root, "packages", "token-providers", "package.json"), + JSON.stringify(tokenProvidersPkgJson, null, 2) + ); })();