@prairielearn/aws 3.0.2 → 3.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @prairielearn/aws
2
2
 
3
+ ## 3.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - b6e03e9: Upgrade dependencies
8
+
9
+ ## 3.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - 144cd19: Upgrade all JavaScript dependencies
14
+
3
15
  ## 3.0.2
4
16
 
5
17
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAsC,MAAM,eAAe,CAAC;AAOnE,wEAAwE;AACxE,iEAAiE;AACjE,iJAAiJ;AACjJ,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAExC,MAAM,UAAU,qBAAqB,CAAC,EACpC,WAAW,EACX,eAAe,EACf,iBAAiB,GAKlB,EAAE;IACD,2EAA2E;IAC3E,0EAA0E;IAC1E,+EAA+E;IAC/E,sBAAsB;IACtB,EAAE;IACF,6EAA6E;IAC7E,6EAA6E;IAC7E,uEAAuE;IACvE,EAAE;IACF,yCAAyC;IACzC,kJAAkJ;IAClJ,MAAM,mBAAmB,GAAG,OAAO,CACjC,WAAW,EACX,CAAC,WAAW,EAAE,EAAE,CACd,WAAW,CAAC,UAAU,KAAK,SAAS;QACpC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,wBAAwB,EAC1E,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,UAAU,KAAK,SAAS,CACtD,CAAC;IAEF,SAAS,mBAAmB,CAAgC,WAAW,GAAM,EAAO,EAAE;QACpF,OAAO;YACL,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY;YAClC,WAAW,EAAE,mBAAmB;YAChC,GAAG,eAAe,EAAE;YACpB,GAAG,WAAW;SACf,CAAC;IAAA,CACH;IAED,SAAS,kBAAkB,CAAgC,WAAW,GAAM,EAAO,EAAE;QACnF,OAAO,mBAAmB,CAAC;YACzB,GAAG,iBAAiB,EAAE,EAAE;YACxB,GAAG,WAAW;SACf,CAAC,CAAC;IAAA,CACJ;IAED,OAAO;QACL,mBAAmB;QACnB,kBAAkB;KACnB,CAAC;AAAA,CACH","sourcesContent":["import { memoize } from '@smithy/property-provider';\nimport { type AwsCredentialIdentityProvider } from '@smithy/types';\n\ninterface AwsClientConfig {\n region: string;\n [key: string]: any;\n}\n\n// Attempt to refresh credentials 5 minutes before they actually expire.\n// This value is the same value that the AWS SDK uses internally:\n// https://github.com/aws/aws-sdk-js-v3/blob/3f8b581af7c0c8146c5b111f92ba6a024310c525/packages/middleware-signing/src/awsAuthConfiguration.ts#L18\nconst CREDENTIAL_EXPIRE_WINDOW = 300000;\n\nexport function makeAwsConfigProvider({\n credentials,\n getClientConfig,\n getS3ClientConfig,\n}: {\n credentials: AwsCredentialIdentityProvider;\n getClientConfig: () => AwsClientConfig;\n getS3ClientConfig?: () => Record<string, any>;\n}) {\n // Clients don't share credentials by default, which means that we'll flood\n // the IMDS with requests for credentials if we construct and use a lot of\n // clients in quick succession. IMDS has rate-limiting, so we'll end up failing\n // to get credentials.\n //\n // To work around this, we'll share a single credential provider chain across\n // all clients we create. We'll also memoize the credential provider chain so\n // that we don't end up making unnecessarily many requests to the IMDS.\n //\n // Memoization is based on the following:\n // https://github.com/aws/aws-sdk-js-v3/blob/3f8b581af7c0c8146c5b111f92ba6a024310c525/packages/middleware-signing/src/awsAuthConfiguration.ts#L257\n const memoizedCredentials = memoize(\n credentials,\n (credentials) =>\n credentials.expiration !== undefined &&\n credentials.expiration.getTime() - Date.now() < CREDENTIAL_EXPIRE_WINDOW,\n (credentials) => credentials.expiration !== undefined,\n );\n\n function makeAwsClientConfig<T extends Record<string, any>>(extraConfig: T = {} as T) {\n return {\n endpoint: process.env.AWS_ENDPOINT,\n credentials: memoizedCredentials,\n ...getClientConfig(),\n ...extraConfig,\n };\n }\n\n function makeS3ClientConfig<T extends Record<string, any>>(extraConfig: T = {} as T) {\n return makeAwsClientConfig({\n ...getS3ClientConfig?.(),\n ...extraConfig,\n });\n }\n\n return {\n makeAwsClientConfig,\n makeS3ClientConfig,\n };\n}\n"]}
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAsC,MAAM,eAAe,CAAC;AAOnE,wEAAwE;AACxE,iEAAiE;AACjE,iJAAiJ;AACjJ,MAAM,wBAAwB,GAAG,MAAM,CAAC;AAExC,MAAM,UAAU,qBAAqB,CAAC,EACpC,WAAW,EACX,eAAe,EACf,iBAAiB,GAKlB;IACC,2EAA2E;IAC3E,0EAA0E;IAC1E,+EAA+E;IAC/E,sBAAsB;IACtB,EAAE;IACF,6EAA6E;IAC7E,6EAA6E;IAC7E,uEAAuE;IACvE,EAAE;IACF,yCAAyC;IACzC,kJAAkJ;IAClJ,MAAM,mBAAmB,GAAG,OAAO,CACjC,WAAW,EACX,CAAC,WAAW,EAAE,EAAE,CACd,WAAW,CAAC,UAAU,KAAK,SAAS;QACpC,WAAW,CAAC,UAAU,CAAC,OAAO,EAAE,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,wBAAwB,EAC1E,CAAC,WAAW,EAAE,EAAE,CAAC,WAAW,CAAC,UAAU,KAAK,SAAS,CACtD,CAAC;IAEF,SAAS,mBAAmB,CAAgC,WAAW,GAAM,EAAO;QAClF,OAAO;YACL,QAAQ,EAAE,OAAO,CAAC,GAAG,CAAC,YAAY;YAClC,WAAW,EAAE,mBAAmB;YAChC,GAAG,eAAe,EAAE;YACpB,GAAG,WAAW;SACf,CAAC;IACJ,CAAC;IAED,SAAS,kBAAkB,CAAgC,WAAW,GAAM,EAAO;QACjF,OAAO,mBAAmB,CAAC;YACzB,GAAG,iBAAiB,EAAE,EAAE;YACxB,GAAG,WAAW;SACf,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,mBAAmB;QACnB,kBAAkB;KACnB,CAAC;AACJ,CAAC","sourcesContent":["import { memoize } from '@smithy/property-provider';\nimport { type AwsCredentialIdentityProvider } from '@smithy/types';\n\ninterface AwsClientConfig {\n region: string;\n [key: string]: any;\n}\n\n// Attempt to refresh credentials 5 minutes before they actually expire.\n// This value is the same value that the AWS SDK uses internally:\n// https://github.com/aws/aws-sdk-js-v3/blob/3f8b581af7c0c8146c5b111f92ba6a024310c525/packages/middleware-signing/src/awsAuthConfiguration.ts#L18\nconst CREDENTIAL_EXPIRE_WINDOW = 300000;\n\nexport function makeAwsConfigProvider({\n credentials,\n getClientConfig,\n getS3ClientConfig,\n}: {\n credentials: AwsCredentialIdentityProvider;\n getClientConfig: () => AwsClientConfig;\n getS3ClientConfig?: () => Record<string, any>;\n}) {\n // Clients don't share credentials by default, which means that we'll flood\n // the IMDS with requests for credentials if we construct and use a lot of\n // clients in quick succession. IMDS has rate-limiting, so we'll end up failing\n // to get credentials.\n //\n // To work around this, we'll share a single credential provider chain across\n // all clients we create. We'll also memoize the credential provider chain so\n // that we don't end up making unnecessarily many requests to the IMDS.\n //\n // Memoization is based on the following:\n // https://github.com/aws/aws-sdk-js-v3/blob/3f8b581af7c0c8146c5b111f92ba6a024310c525/packages/middleware-signing/src/awsAuthConfiguration.ts#L257\n const memoizedCredentials = memoize(\n credentials,\n (credentials) =>\n credentials.expiration !== undefined &&\n credentials.expiration.getTime() - Date.now() < CREDENTIAL_EXPIRE_WINDOW,\n (credentials) => credentials.expiration !== undefined,\n );\n\n function makeAwsClientConfig<T extends Record<string, any>>(extraConfig: T = {} as T) {\n return {\n endpoint: process.env.AWS_ENDPOINT,\n credentials: memoizedCredentials,\n ...getClientConfig(),\n ...extraConfig,\n };\n }\n\n function makeS3ClientConfig<T extends Record<string, any>>(extraConfig: T = {} as T) {\n return makeAwsClientConfig({\n ...getS3ClientConfig?.(),\n ...extraConfig,\n });\n }\n\n return {\n makeAwsClientConfig,\n makeS3ClientConfig,\n };\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prairielearn/aws",
3
- "version": "3.0.2",
3
+ "version": "3.0.4",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,13 +16,13 @@
16
16
  "dev": "tsgo --watch --preserveWatchOutput"
17
17
  },
18
18
  "dependencies": {
19
- "@smithy/property-provider": "^4.2.10",
20
- "@smithy/types": "^4.13.0"
19
+ "@smithy/property-provider": "^4.2.12",
20
+ "@smithy/types": "^4.13.1"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@prairielearn/tsconfig": "^2.0.0",
24
- "@types/node": "^24.11.0",
25
- "@typescript/native-preview": "^7.0.0-dev.20260302.1",
24
+ "@types/node": "^24.12.2",
25
+ "@typescript/native-preview": "^7.0.0-dev.20260305.1",
26
26
  "typescript": "^5.9.3"
27
27
  }
28
28
  }