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

fix(token-providers): declare dependencies from sso-oidc bundle #5064

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
38 changes: 34 additions & 4 deletions packages/token-providers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -71,4 +101,4 @@
"typedoc": {
"entryPoint": "src/index.ts"
}
}
}
14 changes: 14 additions & 0 deletions packages/token-providers/scripts/esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
);
})();