Skip to content

Commit

Permalink
fix(token-providers): declare dependencies from sso-oidc bundle (#5064)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe authored Aug 8, 2023
1 parent 6fc06a6 commit 380482b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 4 deletions.
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)
);
})();

0 comments on commit 380482b

Please sign in to comment.