@azure/data-tables 13.1.0-alpha.20220307.1 → 13.1.0-alpha.20220321.1

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.
@@ -4,15 +4,12 @@ import { base64Decode, base64Encode } from "./bufferSerializer";
4
4
  /**
5
5
  * Encodes the nextPartitionKey and nextRowKey into a single continuation token
6
6
  */
7
- export function encodeContinuationToken(nextPartitionKey = "", nextRowKey = "") {
8
- if (!nextPartitionKey && !nextRowKey) {
7
+ export function encodeContinuationToken(nextPartitionKey, nextRowKey) {
8
+ if (!nextPartitionKey) {
9
9
  return undefined;
10
10
  }
11
- const continuationToken = JSON.stringify({
12
- nextPartitionKey,
13
- nextRowKey,
14
- });
15
- return base64Encode(continuationToken);
11
+ const continuationToken = Object.assign({ nextPartitionKey }, (nextRowKey && { nextRowKey }));
12
+ return base64Encode(JSON.stringify(continuationToken));
16
13
  }
17
14
  /**
18
15
  * Decodes a continuationToken into an object containing a nextPartitionKey and nextRowKey
@@ -1 +1 @@
1
- {"version":3,"file":"continuationToken.js","sourceRoot":"","sources":["../../../src/utils/continuationToken.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAOhE;;GAEG;AACH,MAAM,UAAU,uBAAuB,CACrC,mBAA2B,EAAE,EAC7B,aAAqB,EAAE;IAEvB,IAAI,CAAC,gBAAgB,IAAI,CAAC,UAAU,EAAE;QACpC,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC;QACvC,gBAAgB;QAChB,UAAU;KACX,CAAC,CAAC;IAEH,OAAO,YAAY,CAAC,iBAAiB,CAAC,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,YAAoB;IAC1D,MAAM,YAAY,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;IAChD,IAAI,QAAQ,GAAG,EAAE,CAAC;IAElB,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE;QAC/B,QAAQ,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;KACvC;IACD,MAAM,iBAAiB,GAAsB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAElE,OAAO,iBAAiB,CAAC;AAC3B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { base64Decode, base64Encode } from \"./bufferSerializer\";\n\nexport interface ContinuationToken {\n nextPartitionKey: string;\n nextRowKey: string;\n}\n\n/**\n * Encodes the nextPartitionKey and nextRowKey into a single continuation token\n */\nexport function encodeContinuationToken(\n nextPartitionKey: string = \"\",\n nextRowKey: string = \"\"\n): string | undefined {\n if (!nextPartitionKey && !nextRowKey) {\n return undefined;\n }\n\n const continuationToken = JSON.stringify({\n nextPartitionKey,\n nextRowKey,\n });\n\n return base64Encode(continuationToken);\n}\n\n/**\n * Decodes a continuationToken into an object containing a nextPartitionKey and nextRowKey\n */\nexport function decodeContinuationToken(encodedToken: string): ContinuationToken {\n const decodedToken = base64Decode(encodedToken);\n let tokenStr = \"\";\n\n for (const byte of decodedToken) {\n tokenStr += String.fromCharCode(byte);\n }\n const continuationToken: ContinuationToken = JSON.parse(tokenStr);\n\n return continuationToken;\n}\n"]}
1
+ {"version":3,"file":"continuationToken.js","sourceRoot":"","sources":["../../../src/utils/continuationToken.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAOhE;;GAEG;AACH,MAAM,UAAU,uBAAuB,CACrC,gBAAyB,EACzB,UAAmB;IAEnB,IAAI,CAAC,gBAAgB,EAAE;QACrB,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,iBAAiB,mBACrB,gBAAgB,IAEb,CAAC,UAAU,IAAI,EAAE,UAAU,EAAE,CAAC,CAClC,CAAC;IAEF,OAAO,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC,CAAC;AACzD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,YAAoB;IAC1D,MAAM,YAAY,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;IAChD,IAAI,QAAQ,GAAG,EAAE,CAAC;IAElB,KAAK,MAAM,IAAI,IAAI,YAAY,EAAE;QAC/B,QAAQ,IAAI,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;KACvC;IACD,MAAM,iBAAiB,GAAsB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAElE,OAAO,iBAAiB,CAAC;AAC3B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { base64Decode, base64Encode } from \"./bufferSerializer\";\n\ninterface ContinuationToken {\n nextPartitionKey: string;\n nextRowKey?: string;\n}\n\n/**\n * Encodes the nextPartitionKey and nextRowKey into a single continuation token\n */\nexport function encodeContinuationToken(\n nextPartitionKey?: string,\n nextRowKey?: string\n): string | undefined {\n if (!nextPartitionKey) {\n return undefined;\n }\n\n const continuationToken = {\n nextPartitionKey,\n // Only add nextRowKey if the value is not null, undefined or empty string.\n ...(nextRowKey && { nextRowKey }),\n };\n\n return base64Encode(JSON.stringify(continuationToken));\n}\n\n/**\n * Decodes a continuationToken into an object containing a nextPartitionKey and nextRowKey\n */\nexport function decodeContinuationToken(encodedToken: string): ContinuationToken {\n const decodedToken = base64Decode(encodedToken);\n let tokenStr = \"\";\n\n for (const byte of decodedToken) {\n tokenStr += String.fromCharCode(byte);\n }\n const continuationToken: ContinuationToken = JSON.parse(tokenStr);\n\n return continuationToken;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/data-tables",
3
- "version": "13.1.0-alpha.20220307.1",
3
+ "version": "13.1.0-alpha.20220321.1",
4
4
  "description": "An isomorphic client library for the Azure Tables service.",
5
5
  "sdk-type": "client",
6
6
  "main": "dist/index.js",
@@ -81,7 +81,7 @@
81
81
  "@azure/core-paging": "^1.1.1",
82
82
  "@azure/core-xml": "^1.0.0",
83
83
  "@azure/logger": "^1.0.0",
84
- "@azure/core-tracing": "1.0.0-preview.14",
84
+ "@azure/core-tracing": ">=1.0.0-alpha <1.0.0-alphb",
85
85
  "tslib": "^2.2.0",
86
86
  "uuid": "^8.3.0"
87
87
  },