Skip to content

Commit

Permalink
Replace /std/uuid calls with crypto.randomUUID()
Browse files Browse the repository at this point in the history
  • Loading branch information
danopia committed Aug 27, 2021
1 parent 920c0d7 commit c8c3ed5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
5 changes: 1 addition & 4 deletions generation/helper-library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,9 @@ export const ParseBlob: Helper = {
};

export const IdemptToken: Helper = {
deps: {
uuidv4: `https://deno.land/[email protected]/uuid/v4.ts`,
},
chunks: [
`function generateIdemptToken() {`,
` return uuidv4.generate();`,
` return crypto.randomUUID();`,
`}`,
],
};
Expand Down
4 changes: 2 additions & 2 deletions grid-services.csv
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
service,version,fullname,id,namespace,protocol,generated,typechecked,bytecount,cachetime
dynamodb,2011-12-05,Amazon DynamoDB,,,json,,,,
dynamodb,2012-08-10,Amazon DynamoDB,dynamodb,DynamoDB,json,ok,ok,123556,2782
ecr,2015-09-21,Amazon EC2 Container Registry,ecr,ECR,json,ok,ok,48620,2773
dynamodb,2012-08-10,Amazon DynamoDB,dynamodb,DynamoDB,json,ok,ok,123490,3179
ecr,2015-09-21,Amazon EC2 Container Registry,ecr,ECR,json,ok,ok,48620,1926
kinesis,2013-12-02,Amazon Kinesis,kinesis,Kinesis,json,ok,ok,31141,2089
kms,2014-11-01,AWS Key Management Service,kms,KMS,json,ok,ok,50073,4290
lambda,2014-11-11,AWS Lambda,,,rest-json,,,,
Expand Down
4 changes: 2 additions & 2 deletions lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,8 @@ All API definitions are current as of [aws-sdk-js `v2.971.0`](https://github.com
| Class | Module | Protocol | File size | Approx check time |
| --- | --- | --- | ---: | ---: |
| `CloudWatch` | `cloudwatch/mod.ts` | query | 66 KiB | 3.2 sec |
| `DynamoDB` | `dynamodb/mod.ts` | json | 121 KiB | 2.8 sec |
| `ECR` | `ecr/mod.ts` | json | 47 KiB | 2.8 sec |
| `DynamoDB` | `dynamodb/mod.ts` | json | 121 KiB | 3.2 sec |
| `ECR` | `ecr/mod.ts` | json | 47 KiB | 1.9 sec |
| `Kinesis` | `kinesis/mod.ts` | json | 30 KiB | 2.1 sec |
| `KMS` | `kms/mod.ts` | json | 49 KiB | 4.3 sec |
| `Lambda` | `lambda/mod.ts` | rest-json | 97 KiB | 3.7 sec |
Expand Down
3 changes: 1 addition & 2 deletions lib/services/dynamodb/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ import * as Base64 from "https://deno.land/[email protected]/encoding/base64.ts";
import * as client from "../../client/common.ts";
import * as cmnP from "../../encoding/common.ts";
import * as jsonP from "../../encoding/json.ts";
import * as uuidv4 from "https://deno.land/[email protected]/uuid/v4.ts";
import type * as s from "./structs.ts";
function generateIdemptToken() {
return uuidv4.generate();
return crypto.randomUUID();
}
function serializeBlob(input: string | Uint8Array | null | undefined) {
if (input == null) return input;
Expand Down

0 comments on commit c8c3ed5

Please sign in to comment.