@dfinity/agent
Advanced tools
Comparing version 0.12.0 to 0.12.1-beta.0
@@ -14,4 +14,4 @@ /** @module CanisterStatus */ | ||
key: string; | ||
path: ArrayBuffer[]; | ||
decodeStrategy: 'cbor' | 'hex' | 'leb128' | 'raw'; | ||
path: ArrayBuffer[] | string; | ||
decodeStrategy: 'cbor' | 'hex' | 'leb128' | 'utf-8' | 'raw'; | ||
} | ||
@@ -27,3 +27,3 @@ /** | ||
path: string | ArrayBuffer; | ||
decodeStrategy: 'cbor' | 'hex' | 'leb128' | 'raw'; | ||
decodeStrategy: 'cbor' | 'hex' | 'leb128' | 'utf-8' | 'raw'; | ||
} | ||
@@ -30,0 +30,0 @@ /** |
@@ -90,2 +90,5 @@ "use strict"; | ||
} | ||
case 'utf-8': { | ||
status.set(path.key, decodeUtf8(data)); | ||
} | ||
} | ||
@@ -157,2 +160,5 @@ } | ||
}; | ||
const decodeUtf8 = (buf) => { | ||
return new TextDecoder().decode(buf); | ||
}; | ||
// time is a LEB128-encoded Nat | ||
@@ -159,0 +165,0 @@ const decodeTime = (buf) => { |
@@ -14,4 +14,4 @@ /** @module CanisterStatus */ | ||
key: string; | ||
path: ArrayBuffer[]; | ||
decodeStrategy: 'cbor' | 'hex' | 'leb128' | 'raw'; | ||
path: ArrayBuffer[] | string; | ||
decodeStrategy: 'cbor' | 'hex' | 'leb128' | 'utf-8' | 'raw'; | ||
} | ||
@@ -27,3 +27,3 @@ /** | ||
path: string | ArrayBuffer; | ||
decodeStrategy: 'cbor' | 'hex' | 'leb128' | 'raw'; | ||
decodeStrategy: 'cbor' | 'hex' | 'leb128' | 'utf-8' | 'raw'; | ||
} | ||
@@ -30,0 +30,0 @@ /** |
@@ -87,2 +87,5 @@ /** @module CanisterStatus */ | ||
} | ||
case 'utf-8': { | ||
status.set(path.key, decodeUtf8(data)); | ||
} | ||
} | ||
@@ -154,2 +157,5 @@ } | ||
}; | ||
const decodeUtf8 = (buf) => { | ||
return new TextDecoder().decode(buf); | ||
}; | ||
// time is a LEB128-encoded Nat | ||
@@ -156,0 +162,0 @@ const decodeTime = (buf) => { |
{ | ||
"name": "@dfinity/agent", | ||
"version": "0.12.0", | ||
"version": "0.12.1-beta.0", | ||
"author": "DFINITY Stiftung <sdk@dfinity.org>", | ||
@@ -52,4 +52,4 @@ "license": "Apache-2.0", | ||
"peerDependencies": { | ||
"@dfinity/candid": "^0.12.0", | ||
"@dfinity/principal": "^0.12.0" | ||
"@dfinity/candid": "^0.12.1-beta.0", | ||
"@dfinity/principal": "^0.12.1-beta.0" | ||
}, | ||
@@ -56,0 +56,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
533080
7741