@azure/attestation 1.0.1-alpha.20250805.1 → 1.0.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utf8-browser.d.mts","sourceRoot":"","sources":["../../../src/utils/utf8-browser.mts"],"names":[],"mappings":"AAMA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAEzD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAEzD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utf8-browser.mjs","sourceRoot":"","sources":["../../../src/utils/utf8-browser.mts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,OAAO,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;AACzC,MAAM,OAAO,GAAG,IAAI,WAAW,EAAE,CAAC;AAElC;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,OAAO,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAmB;IAC/C,OAAO,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACjC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nconst decoder = new TextDecoder(\"ascii\");\nconst encoder = new TextEncoder();\n\n/**\n * Converts a string into a utf8 encoded byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function stringToBytes(content: string): Uint8Array {\n return encoder.encode(content);\n}\n\n/**\n * Converts a utf8 string into a byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function bytesToString(content: Uint8Array): string {\n return decoder.decode(content);\n}\n"]}
@@ -10,4 +10,4 @@ export declare function stringToBytes(content: string): Uint8Array;
10
10
  * @internal
11
11
  */
12
12
  export declare function bytesToString(content: Uint8Array): string;
13
- //# sourceMappingURL=utf8.d.ts.map
13
+ //# sourceMappingURL=utf8-browser.d.mts.map
@@ -1,20 +1,14 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- const decoder = typeof Buffer === "undefined" ? new TextDecoder("ascii") : undefined;
4
- const encoder = typeof Buffer === "undefined" ? new TextEncoder() : undefined;
5
- const decode = decoder
6
- ? (buffer) => decoder.decode(buffer)
7
- : (buffer) => buffer.toString("ascii");
8
- const encode = encoder
9
- ? (str) => encoder.encode(str)
10
- : (str) => Buffer.from(str, "utf8");
3
+ const decoder = new TextDecoder("ascii");
4
+ const encoder = new TextEncoder();
11
5
  /**
12
6
  * Converts a string into a utf8 encoded byte array.
13
7
  * @param content - The utf8 string to convert.
14
8
  * @internal
15
9
  */
16
10
  export function stringToBytes(content) {
17
- return encode(content);
11
+ return encoder.encode(content);
18
12
  }
19
13
  /**
20
14
  * Converts a utf8 string into a byte array.
@@ -22,6 +16,6 @@ export function stringToBytes(content) {
22
16
  * @internal
23
17
  */
24
18
  export function bytesToString(content) {
25
- return decode(content);
19
+ return decoder.decode(content);
26
20
  }
27
- //# sourceMappingURL=utf8.js.map
21
+ //# sourceMappingURL=utf8-browser.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"utf8.d.ts","sourceRoot":"","sources":["../../../src/utils/utf8.ts"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAEzD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAEzD"}
1
+ {"version":3,"file":"utf8.d.ts","sourceRoot":"","sources":["../../../src/utils/utf8.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAEzD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAEzD"}
@@ -4,21 +4,13 @@
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
5
  exports.stringToBytes = stringToBytes;
6
6
  exports.bytesToString = bytesToString;
7
- const decoder = typeof Buffer === "undefined" ? new TextDecoder("ascii") : undefined;
8
- const encoder = typeof Buffer === "undefined" ? new TextEncoder() : undefined;
9
- const decode = decoder
10
- ? (buffer) => decoder.decode(buffer)
11
- : (buffer) => buffer.toString("ascii");
12
- const encode = encoder
13
- ? (str) => encoder.encode(str)
14
- : (str) => Buffer.from(str, "utf8");
15
7
  /**
16
8
  * Converts a string into a utf8 encoded byte array.
17
9
  * @param content - The utf8 string to convert.
18
10
  * @internal
19
11
  */
20
12
  function stringToBytes(content) {
21
- return encode(content);
13
+ return Buffer.from(content, "utf8");
22
14
  }
23
15
  /**
24
16
  * Converts a utf8 string into a byte array.
@@ -26,6 +18,6 @@ function stringToBytes(content) {
26
18
  * @internal
27
19
  */
28
20
  function bytesToString(content) {
29
- return decode(content);
21
+ return Buffer.from(content.buffer, content.byteOffset, content.byteLength).toString("ascii");
30
22
  }
31
23
  //# sourceMappingURL=utf8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utf8.js","sourceRoot":"","sources":["../../../src/utils/utf8.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAmBlC,sCAEC;AAOD,sCAEC;AA5BD,MAAM,OAAO,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAErF,MAAM,OAAO,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAE9E,MAAM,MAAM,GAAoC,OAAO;IACrD,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAE,MAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAErD,MAAM,MAAM,GAAgC,OAAO;IACjD,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC;IAC9B,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AAEtC;;;;GAIG;AACH,SAAgB,aAAa,CAAC,OAAe;IAC3C,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,OAAmB;IAC/C,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nconst decoder = typeof Buffer === \"undefined\" ? new TextDecoder(\"ascii\") : undefined;\n\nconst encoder = typeof Buffer === \"undefined\" ? new TextEncoder() : undefined;\n\nconst decode: (buffer: ArrayBuffer) => string = decoder\n ? (buffer) => decoder.decode(buffer)\n : (buffer) => (buffer as Buffer).toString(\"ascii\");\n\nconst encode: (str: string) => Uint8Array = encoder\n ? (str) => encoder.encode(str)\n : (str) => Buffer.from(str, \"utf8\");\n\n/**\n * Converts a string into a utf8 encoded byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function stringToBytes(content: string): Uint8Array {\n return encode(content);\n}\n\n/**\n * Converts a utf8 string into a byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function bytesToString(content: Uint8Array): string {\n return decode(content);\n}\n"]}
1
+ {"version":3,"file":"utf8.js","sourceRoot":"","sources":["../../../src/utils/utf8.ts"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;;AAOlC,sCAEC;AAOD,sCAEC;AAhBD;;;;GAIG;AACH,SAAgB,aAAa,CAAC,OAAe;IAC3C,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AACtC,CAAC;AAED;;;;GAIG;AACH,SAAgB,aAAa,CAAC,OAAmB;IAC/C,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC/F,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Converts a string into a utf8 encoded byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function stringToBytes(content: string): Uint8Array {\n return Buffer.from(content, \"utf8\");\n}\n\n/**\n * Converts a utf8 string into a byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function bytesToString(content: Uint8Array): string {\n return Buffer.from(content.buffer, content.byteOffset, content.byteLength).toString(\"ascii\");\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"utf8.d.ts","sourceRoot":"","sources":["../../../src/utils/utf8.ts"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAEzD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAEzD"}
1
+ {"version":3,"file":"utf8.d.ts","sourceRoot":"","sources":["../../../src/utils/utf8.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAEzD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAEzD"}
@@ -1,20 +1,12 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- const decoder = typeof Buffer === "undefined" ? new TextDecoder("ascii") : undefined;
4
- const encoder = typeof Buffer === "undefined" ? new TextEncoder() : undefined;
5
- const decode = decoder
6
- ? (buffer) => decoder.decode(buffer)
7
- : (buffer) => buffer.toString("ascii");
8
- const encode = encoder
9
- ? (str) => encoder.encode(str)
10
- : (str) => Buffer.from(str, "utf8");
11
3
  /**
12
4
  * Converts a string into a utf8 encoded byte array.
13
5
  * @param content - The utf8 string to convert.
14
6
  * @internal
15
7
  */
16
8
  export function stringToBytes(content) {
17
- return encode(content);
9
+ return Buffer.from(content, "utf8");
18
10
  }
19
11
  /**
20
12
  * Converts a utf8 string into a byte array.
@@ -22,6 +14,6 @@ export function stringToBytes(content) {
22
14
  * @internal
23
15
  */
24
16
  export function bytesToString(content) {
25
- return decode(content);
17
+ return Buffer.from(content.buffer, content.byteOffset, content.byteLength).toString("ascii");
26
18
  }
27
19
  //# sourceMappingURL=utf8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utf8.js","sourceRoot":"","sources":["../../../src/utils/utf8.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,OAAO,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAErF,MAAM,OAAO,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAE9E,MAAM,MAAM,GAAoC,OAAO;IACrD,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAE,MAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAErD,MAAM,MAAM,GAAgC,OAAO;IACjD,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC;IAC9B,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AAEtC;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAmB;IAC/C,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nconst decoder = typeof Buffer === \"undefined\" ? new TextDecoder(\"ascii\") : undefined;\n\nconst encoder = typeof Buffer === \"undefined\" ? new TextEncoder() : undefined;\n\nconst decode: (buffer: ArrayBuffer) => string = decoder\n ? (buffer) => decoder.decode(buffer)\n : (buffer) => (buffer as Buffer).toString(\"ascii\");\n\nconst encode: (str: string) => Uint8Array = encoder\n ? (str) => encoder.encode(str)\n : (str) => Buffer.from(str, \"utf8\");\n\n/**\n * Converts a string into a utf8 encoded byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function stringToBytes(content: string): Uint8Array {\n return encode(content);\n}\n\n/**\n * Converts a utf8 string into a byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function bytesToString(content: Uint8Array): string {\n return decode(content);\n}\n"]}
1
+ {"version":3,"file":"utf8.js","sourceRoot":"","sources":["../../../src/utils/utf8.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AACtC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAmB;IAC/C,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC/F,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Converts a string into a utf8 encoded byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function stringToBytes(content: string): Uint8Array {\n return Buffer.from(content, \"utf8\");\n}\n\n/**\n * Converts a utf8 string into a byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function bytesToString(content: Uint8Array): string {\n return Buffer.from(content.buffer, content.byteOffset, content.byteLength).toString(\"ascii\");\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"utf8.d.ts","sourceRoot":"","sources":["../../../src/utils/utf8.ts"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAEzD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAEzD"}
1
+ {"version":3,"file":"utf8.d.ts","sourceRoot":"","sources":["../../../src/utils/utf8.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAEzD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAEzD"}
@@ -1,20 +1,12 @@
1
1
  // Copyright (c) Microsoft Corporation.
2
2
  // Licensed under the MIT License.
3
- const decoder = typeof Buffer === "undefined" ? new TextDecoder("ascii") : undefined;
4
- const encoder = typeof Buffer === "undefined" ? new TextEncoder() : undefined;
5
- const decode = decoder
6
- ? (buffer) => decoder.decode(buffer)
7
- : (buffer) => buffer.toString("ascii");
8
- const encode = encoder
9
- ? (str) => encoder.encode(str)
10
- : (str) => Buffer.from(str, "utf8");
11
3
  /**
12
4
  * Converts a string into a utf8 encoded byte array.
13
5
  * @param content - The utf8 string to convert.
14
6
  * @internal
15
7
  */
16
8
  export function stringToBytes(content) {
17
- return encode(content);
9
+ return Buffer.from(content, "utf8");
18
10
  }
19
11
  /**
20
12
  * Converts a utf8 string into a byte array.
@@ -22,6 +14,6 @@ export function stringToBytes(content) {
22
14
  * @internal
23
15
  */
24
16
  export function bytesToString(content) {
25
- return decode(content);
17
+ return Buffer.from(content.buffer, content.byteOffset, content.byteLength).toString("ascii");
26
18
  }
27
19
  //# sourceMappingURL=utf8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utf8.js","sourceRoot":"","sources":["../../../src/utils/utf8.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,OAAO,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAErF,MAAM,OAAO,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAE9E,MAAM,MAAM,GAAoC,OAAO;IACrD,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAE,MAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAErD,MAAM,MAAM,GAAgC,OAAO;IACjD,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC;IAC9B,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AAEtC;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAmB;IAC/C,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nconst decoder = typeof Buffer === \"undefined\" ? new TextDecoder(\"ascii\") : undefined;\n\nconst encoder = typeof Buffer === \"undefined\" ? new TextEncoder() : undefined;\n\nconst decode: (buffer: ArrayBuffer) => string = decoder\n ? (buffer) => decoder.decode(buffer)\n : (buffer) => (buffer as Buffer).toString(\"ascii\");\n\nconst encode: (str: string) => Uint8Array = encoder\n ? (str) => encoder.encode(str)\n : (str) => Buffer.from(str, \"utf8\");\n\n/**\n * Converts a string into a utf8 encoded byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function stringToBytes(content: string): Uint8Array {\n return encode(content);\n}\n\n/**\n * Converts a utf8 string into a byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function bytesToString(content: Uint8Array): string {\n return decode(content);\n}\n"]}
1
+ {"version":3,"file":"utf8.js","sourceRoot":"","sources":["../../../src/utils/utf8.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AACtC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAmB;IAC/C,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAC/F,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/**\n * Converts a string into a utf8 encoded byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function stringToBytes(content: string): Uint8Array {\n return Buffer.from(content, \"utf8\");\n}\n\n/**\n * Converts a utf8 string into a byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function bytesToString(content: Uint8Array): string {\n return Buffer.from(content.buffer, content.byteOffset, content.byteLength).toString(\"ascii\");\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/attestation",
3
- "version": "1.0.1-alpha.20250805.1",
3
+ "version": "1.0.1",
4
4
  "description": "Javascript/Typescript client implementation for the Microsoft Azure Attestation service.",
5
5
  "sdk-type": "client",
6
6
  "main": "./dist/commonjs/index.js",
@@ -19,25 +19,6 @@
19
19
  ]
20
20
  },
21
21
  "types": "./dist/commonjs/index.d.ts",
22
- "scripts": {
23
- "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
24
- "build:nodebrowser": "dev-tool run build-test",
25
- "build:samples": "echo Obsolete.",
26
- "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
27
- "clean": "dev-tool run vendored rimraf --glob dist dist-* temp types *.tgz *.log",
28
- "execute:samples": "dev-tool samples run samples-dev",
29
- "extract-api": "dev-tool run build-package && dev-tool run extract-api",
30
- "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
31
- "generate:client": "autorest --typescript ./swagger/README.md",
32
- "lint": "eslint package.json src test",
33
- "lint:fix": "eslint package.json src test --fix --fix-type [problem,suggestion]",
34
- "pack": "npm pack 2>&1",
35
- "test": "npm run test:node && npm run test:browser",
36
- "test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
37
- "test:node": "dev-tool run test:vitest",
38
- "test:node:esm": "dev-tool run test:vitest --esm -- --test-timeout 5000000",
39
- "update-snippets": "dev-tool run update-snippets"
40
- },
41
22
  "files": [
42
23
  "dist/",
43
24
  "README.md",
@@ -73,22 +54,22 @@
73
54
  "tslib": "^2.8.1"
74
55
  },
75
56
  "devDependencies": {
76
- "@azure-tools/test-credential": "^2.0.0",
77
- "@azure-tools/test-recorder": ">=4.1.0-alpha <4.1.0-alphb",
78
- "@azure-tools/test-utils-vitest": ">=1.0.0-alpha <1.0.0-alphb",
79
- "@azure/dev-tool": ">=1.0.0-alpha <1.0.0-alphb",
80
- "@azure/eslint-plugin-azure-sdk": ">=3.0.0-alpha <3.0.0-alphb",
81
- "@azure/identity": "^4.5.0",
82
- "@types/node": "^20.0.0",
83
- "@vitest/browser": "^3.0.9",
84
- "@vitest/coverage-istanbul": "^3.0.9",
57
+ "@azure/identity": "4.11.1",
58
+ "@types/node": "^20.19.0",
59
+ "@vitest/browser": "^3.2.3",
60
+ "@vitest/coverage-istanbul": "^3.2.3",
85
61
  "buffer": "^6.0.0",
86
62
  "dotenv": "^16.0.0",
87
- "eslint": "^9.9.0",
88
- "playwright": "^1.48.1",
63
+ "eslint": "^9.33.0",
64
+ "playwright": "^1.50.1",
89
65
  "safe-buffer": "^5.2.1",
90
- "typescript": "~5.8.2",
91
- "vitest": "^3.0.9"
66
+ "typescript": "~5.8.3",
67
+ "vitest": "^3.2.3",
68
+ "@azure-tools/test-credential": "^2.1.1",
69
+ "@azure-tools/test-utils-vitest": "^1.0.0",
70
+ "@azure/dev-tool": "^1.0.0",
71
+ "@azure-tools/test-recorder": "^4.1.0",
72
+ "@azure/eslint-plugin-azure-sdk": "^3.0.0"
92
73
  },
93
74
  "//sampleConfiguration": {
94
75
  "skipFolder": false,
@@ -135,5 +116,24 @@
135
116
  "default": "./dist/commonjs/index.js"
136
117
  }
137
118
  }
119
+ },
120
+ "scripts": {
121
+ "build": "npm run clean && dev-tool run build-package && dev-tool run extract-api",
122
+ "build:nodebrowser": "dev-tool run build-test",
123
+ "build:samples": "tsc -p tsconfig.samples.json",
124
+ "check-format": "dev-tool run vendored prettier --list-different --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"",
125
+ "clean": "dev-tool run vendored rimraf --glob dist dist-* temp types *.tgz *.log",
126
+ "execute:samples": "dev-tool samples run samples-dev",
127
+ "extract-api": "dev-tool run build-package && dev-tool run extract-api",
128
+ "format": "dev-tool run vendored prettier --write --config ../../../.prettierrc.json --ignore-path ../../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"samples-dev/**/*.ts\" \"*.{js,json}\"",
129
+ "generate:client": "autorest --typescript ./swagger/README.md",
130
+ "lint": "eslint package.json src test",
131
+ "lint:fix": "eslint package.json src test --fix --fix-type [problem,suggestion]",
132
+ "pack": "pnpm pack 2>&1",
133
+ "test": "npm run test:node && npm run test:browser",
134
+ "test:browser": "npm run clean && dev-tool run build-package && dev-tool run build-test && dev-tool run test:vitest --browser",
135
+ "test:node": "dev-tool run test:vitest",
136
+ "test:node:esm": "dev-tool run test:vitest --esm -- --test-timeout 5000000",
137
+ "update-snippets": "dev-tool run update-snippets"
138
138
  }
139
- }
139
+ }
@@ -1 +0,0 @@
1
- {"version":3,"file":"utf8.d.ts","sourceRoot":"","sources":["../../../src/utils/utf8.ts"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,UAAU,CAEzD;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,CAEzD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"utf8.js","sourceRoot":"","sources":["../../../src/utils/utf8.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,MAAM,OAAO,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAErF,MAAM,OAAO,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAE9E,MAAM,MAAM,GAAoC,OAAO;IACrD,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC;IACpC,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAE,MAAiB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAErD,MAAM,MAAM,GAAgC,OAAO;IACjD,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC;IAC9B,CAAC,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;AAEtC;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,OAAmB;IAC/C,OAAO,MAAM,CAAC,OAAO,CAAC,CAAC;AACzB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nconst decoder = typeof Buffer === \"undefined\" ? new TextDecoder(\"ascii\") : undefined;\n\nconst encoder = typeof Buffer === \"undefined\" ? new TextEncoder() : undefined;\n\nconst decode: (buffer: ArrayBuffer) => string = decoder\n ? (buffer) => decoder.decode(buffer)\n : (buffer) => (buffer as Buffer).toString(\"ascii\");\n\nconst encode: (str: string) => Uint8Array = encoder\n ? (str) => encoder.encode(str)\n : (str) => Buffer.from(str, \"utf8\");\n\n/**\n * Converts a string into a utf8 encoded byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function stringToBytes(content: string): Uint8Array {\n return encode(content);\n}\n\n/**\n * Converts a utf8 string into a byte array.\n * @param content - The utf8 string to convert.\n * @internal\n */\nexport function bytesToString(content: Uint8Array): string {\n return decode(content);\n}\n"]}