@fluid-internal/client-utils 2.0.0-dev-rc.5.0.0.267932 → 2.0.0-dev-rc.5.0.0.270401
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/README.md +23 -0
- package/api-extractor/api-extractor-lint-bundle.json +5 -0
- package/api-extractor/api-extractor-lint-indexBrowser.cjs.json +5 -0
- package/api-extractor/api-extractor-lint-indexBrowser.esm.json +5 -0
- package/api-extractor/api-extractor-lint-indexNode.cjs.json +5 -0
- package/api-extractor/api-extractor-lint-indexNode.esm.json +5 -0
- package/api-report/client-utils.alpha.api.md +47 -0
- package/api-report/client-utils.beta.api.md +19 -0
- package/api-report/client-utils.public.api.md +19 -0
- package/dist/base64EncodingBrowser.d.ts +28 -0
- package/dist/base64EncodingBrowser.d.ts.map +1 -0
- package/dist/{base64Encoding.js → base64EncodingBrowser.js} +6 -2
- package/dist/base64EncodingBrowser.js.map +1 -0
- package/dist/{base64Encoding.d.ts → base64EncodingNode.d.ts} +1 -1
- package/dist/base64EncodingNode.d.ts.map +1 -0
- package/dist/base64EncodingNode.js +51 -0
- package/dist/base64EncodingNode.js.map +1 -0
- package/dist/hashFileBrowser.d.ts.map +1 -1
- package/dist/hashFileBrowser.js +1 -0
- package/dist/hashFileBrowser.js.map +1 -1
- package/dist/hashFileNode.d.ts.map +1 -1
- package/dist/hashFileNode.js.map +1 -1
- package/dist/indexBrowser.d.ts +1 -1
- package/dist/indexBrowser.d.ts.map +1 -1
- package/dist/indexBrowser.js +6 -4
- package/dist/indexBrowser.js.map +1 -1
- package/dist/indexNode.d.ts +1 -1
- package/dist/indexNode.d.ts.map +1 -1
- package/dist/indexNode.js +4 -4
- package/dist/indexNode.js.map +1 -1
- package/dist/package.json +1 -5
- package/dist/trace.js +5 -3
- package/dist/trace.js.map +1 -1
- package/dist/typedEventEmitter.js +7 -0
- package/dist/typedEventEmitter.js.map +1 -1
- package/lib/base64EncodingBrowser.d.ts +28 -0
- package/lib/base64EncodingBrowser.d.ts.map +1 -0
- package/lib/{base64Encoding.js → base64EncodingBrowser.js} +6 -2
- package/lib/base64EncodingBrowser.js.map +1 -0
- package/lib/{base64Encoding.d.ts → base64EncodingNode.d.ts} +1 -1
- package/lib/base64EncodingNode.d.ts.map +1 -0
- package/lib/base64EncodingNode.js +45 -0
- package/lib/base64EncodingNode.js.map +1 -0
- package/lib/hashFileBrowser.d.ts.map +1 -1
- package/lib/hashFileBrowser.js +1 -0
- package/lib/hashFileBrowser.js.map +1 -1
- package/lib/hashFileNode.d.ts.map +1 -1
- package/lib/hashFileNode.js.map +1 -1
- package/lib/indexBrowser.d.ts +1 -1
- package/lib/indexBrowser.d.ts.map +1 -1
- package/lib/indexBrowser.js +3 -1
- package/lib/indexBrowser.js.map +1 -1
- package/lib/indexNode.d.ts +1 -1
- package/lib/indexNode.d.ts.map +1 -1
- package/lib/indexNode.js +1 -1
- package/lib/indexNode.js.map +1 -1
- package/lib/trace.js +3 -1
- package/lib/trace.js.map +1 -1
- package/lib/typedEventEmitter.js +7 -0
- package/lib/typedEventEmitter.js.map +1 -1
- package/package.json +16 -32
- package/src/{base64Encoding.ts → base64EncodingBrowser.ts} +5 -1
- package/src/base64EncodingNode.ts +50 -0
- package/src/hashFileBrowser.ts +1 -0
- package/src/hashFileNode.ts +1 -0
- package/src/indexBrowser.ts +4 -1
- package/src/indexNode.ts +4 -1
- package/src/trace.ts +1 -1
- package/tsconfig.json +1 -0
- package/api-report/client-utils.api.md +0 -111
- package/bufferBrowser.d.ts +0 -16
- package/dist/base64Encoding.d.ts.map +0 -1
- package/dist/base64Encoding.js.map +0 -1
- package/lib/base64Encoding.d.ts.map +0 -1
- package/lib/base64Encoding.js.map +0 -1
- package/src/cjs/package.json +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base64EncodingNode.d.ts","sourceRoot":"","sources":["../src/base64EncodingNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,UAAW,MAAM,KAAG,MACA,CAAC;AAElD;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,UAAW,MAAM,KAAG,MACA,CAAC;AAElD;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,UAAW,MAAM,YAAY,MAAM,KAAG,MAWxD,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
// This file is a Node.js-specific implementation of the base64 encoding functions.
|
|
6
|
+
// Aside from the below import statement, this file should be identical to the
|
|
7
|
+
// base64EncodingBrowser.ts.
|
|
8
|
+
//
|
|
9
|
+
// (See 'Isomorphic Code' section in the package README.md.)
|
|
10
|
+
import { IsoBuffer } from "./bufferNode.js";
|
|
11
|
+
/**
|
|
12
|
+
* Converts the provided {@link https://en.wikipedia.org/wiki/Base64 | base64}-encoded string
|
|
13
|
+
* to {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8}.
|
|
14
|
+
*
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export const fromBase64ToUtf8 = (input) => IsoBuffer.from(input, "base64").toString("utf8");
|
|
18
|
+
/**
|
|
19
|
+
* Converts the provided {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8}-encoded string
|
|
20
|
+
* to {@link https://en.wikipedia.org/wiki/Base64 | base64}.
|
|
21
|
+
*
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export const fromUtf8ToBase64 = (input) => IsoBuffer.from(input, "utf8").toString("base64");
|
|
25
|
+
/**
|
|
26
|
+
* Convenience function to convert unknown encoding to utf8 that avoids
|
|
27
|
+
* buffer copies/encode ops when no conversion is needed.
|
|
28
|
+
* @param input - The source string to convert.
|
|
29
|
+
* @param encoding - The source string's encoding.
|
|
30
|
+
*
|
|
31
|
+
* @internal
|
|
32
|
+
*/
|
|
33
|
+
export const toUtf8 = (input, encoding) => {
|
|
34
|
+
switch (encoding) {
|
|
35
|
+
case "utf8":
|
|
36
|
+
// eslint-disable-next-line unicorn/text-encoding-identifier-case -- this value is supported, just discouraged
|
|
37
|
+
case "utf-8": {
|
|
38
|
+
return input;
|
|
39
|
+
}
|
|
40
|
+
default: {
|
|
41
|
+
return IsoBuffer.from(input, encoding).toString();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=base64EncodingNode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base64EncodingNode.js","sourceRoot":"","sources":["../src/base64EncodingNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,mFAAmF;AACnF,8EAA8E;AAC9E,4BAA4B;AAC5B,EAAE;AACF,4DAA4D;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAU,EAAE,CACzD,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAElD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAa,EAAU,EAAE,CACzD,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAElD;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,KAAa,EAAE,QAAgB,EAAU,EAAE;IACjE,QAAQ,QAAQ,EAAE,CAAC;QAClB,KAAK,MAAM,CAAC;QACZ,8GAA8G;QAC9G,KAAK,OAAO,CAAC,CAAC,CAAC;YACd,OAAO,KAAK,CAAC;QACd,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACT,OAAO,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;QACnD,CAAC;IACF,CAAC;AACF,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// This file is a Node.js-specific implementation of the base64 encoding functions.\n// Aside from the below import statement, this file should be identical to the\n// base64EncodingBrowser.ts.\n//\n// (See 'Isomorphic Code' section in the package README.md.)\nimport { IsoBuffer } from \"./bufferNode.js\";\n\n/**\n * Converts the provided {@link https://en.wikipedia.org/wiki/Base64 | base64}-encoded string\n * to {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8}.\n *\n * @internal\n */\nexport const fromBase64ToUtf8 = (input: string): string =>\n\tIsoBuffer.from(input, \"base64\").toString(\"utf8\");\n\n/**\n * Converts the provided {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8}-encoded string\n * to {@link https://en.wikipedia.org/wiki/Base64 | base64}.\n *\n * @internal\n */\nexport const fromUtf8ToBase64 = (input: string): string =>\n\tIsoBuffer.from(input, \"utf8\").toString(\"base64\");\n\n/**\n * Convenience function to convert unknown encoding to utf8 that avoids\n * buffer copies/encode ops when no conversion is needed.\n * @param input - The source string to convert.\n * @param encoding - The source string's encoding.\n *\n * @internal\n */\nexport const toUtf8 = (input: string, encoding: string): string => {\n\tswitch (encoding) {\n\t\tcase \"utf8\":\n\t\t// eslint-disable-next-line unicorn/text-encoding-identifier-case -- this value is supported, just discouraged\n\t\tcase \"utf-8\": {\n\t\t\treturn input;\n\t\t}\n\t\tdefault: {\n\t\t\treturn IsoBuffer.from(input, encoding).toString();\n\t\t}\n\t}\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hashFileBrowser.d.ts","sourceRoot":"","sources":["../src/hashFileBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"hashFileBrowser.d.ts","sourceRoot":"","sources":["../src/hashFileBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAyB/C;;;;;;;;;;;;GAYG;AACH,wBAAsB,QAAQ,CAC7B,IAAI,EAAE,SAAS,EACf,SAAS,GAAE,OAAO,GAAG,SAAmB,EACxC,YAAY,GAAE,KAAK,GAAG,QAAgB,GACpC,OAAO,CAAC,MAAM,CAAC,CAgBjB;AAED;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAQlE"}
|
package/lib/hashFileBrowser.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import * as base64js from "base64-js";
|
|
6
|
+
// Note: See 'Isomorphic Code' section in the package README.md
|
|
6
7
|
import { IsoBuffer } from "./bufferBrowser.js";
|
|
7
8
|
async function digestBuffer(file, algorithm) {
|
|
8
9
|
const hash = await crypto.subtle.digest(algorithm, file);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hashFileBrowser.js","sourceRoot":"","sources":["../src/hashFileBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,KAAK,UAAU,YAAY,CAAC,IAAe,EAAE,SAA8B;IAC1E,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACzD,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,YAAY,CAAC,SAAqB,EAAE,QAA0B;IACtE,wCAAwC;IACxC,QAAQ,QAAQ,EAAE,CAAC;QAClB,KAAK,KAAK,CAAC,CAAC,CAAC;YACZ,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG;iBACjC,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE;gBACzB,yGAAyG;gBACzG,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAW,CAAC;YACrD,CAAC,CAAC;iBACD,IAAI,CAAC,EAAE,CAAC,CAAC;YACX,OAAO,OAAO,CAAC;QAChB,CAAC;QACD,KAAK,QAAQ,CAAC,CAAC,CAAC;YACf,OAAO,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAC1C,CAAC;IACF,CAAC;AACF,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC7B,IAAe,EACf,YAAiC,OAAO,EACxC,eAAiC,KAAK;IAEtC,8DAA8D;IAC9D,2DAA2D;IAC3D,gFAAgF;IAChF,8EAA8E;IAC9E,8BAA8B;IAC9B,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QACjC,OAAO,MAAM;QACZ,qDAAqD;QACrD,mBAAmB,CACnB,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,+EAA+E;IAC/E,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACtD,OAAO,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAe;IAChD,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC;IAC7B,qDAAqD;IACrD,MAAM,UAAU,GAAG,QAAQ,IAAI,CAAC,QAAQ,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IACtE,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEhE,mEAAmE;IACnE,OAAO,QAAQ,CAAC,UAAU,CAAC,CAAC;AAC7B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport * as base64js from \"base64-js\";\n\nimport { IsoBuffer } from \"./bufferBrowser.js\";\n\nasync function digestBuffer(file: IsoBuffer, algorithm: \"SHA-1\" | \"SHA-256\"): Promise<Uint8Array> {\n\tconst hash = await crypto.subtle.digest(algorithm, file);\n\treturn new Uint8Array(hash);\n}\n\nfunction encodeDigest(hashArray: Uint8Array, encoding: \"hex\" | \"base64\"): string {\n\t// eslint-disable-next-line default-case\n\tswitch (encoding) {\n\t\tcase \"hex\": {\n\t\t\tconst hashHex = Array.prototype.map\n\t\t\t\t.call(hashArray, (byte) => {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n\t\t\t\t\treturn byte.toString(16).padStart(2, \"0\") as string;\n\t\t\t\t})\n\t\t\t\t.join(\"\");\n\t\t\treturn hashHex;\n\t\t}\n\t\tcase \"base64\": {\n\t\t\treturn base64js.fromByteArray(hashArray);\n\t\t}\n\t}\n}\n\n/**\n * Hash a file. Consistent within a session, but should not be persisted and\n * is not consistent with git.\n * If called under an insecure context for a browser, this will fallback to\n * using the node implementation.\n *\n * @param file - The contents of the file in a buffer.\n * @param algorithm - The hash algorithm to use, artificially constrained by what is used internally.\n * @param hashEncoding - The encoding of the returned hash, also artificially constrained.\n * @returns The hash of the content of the buffer.\n *\n * @internal\n */\nexport async function hashFile(\n\tfile: IsoBuffer,\n\talgorithm: \"SHA-1\" | \"SHA-256\" = \"SHA-1\",\n\thashEncoding: \"hex\" | \"base64\" = \"hex\",\n): Promise<string> {\n\t// Handle insecure contexts (e.g. running with local services)\n\t// by deferring to Node version, which uses a hash polyfill\n\t// When packed, this chunk will show as \"FluidFramework-HashFallback\" separately\n\t// from the main chunk and will be of non-trivial size. It will not be served\n\t// under normal circumstances.\n\tif (crypto.subtle === undefined) {\n\t\treturn import(\n\t\t\t/* webpackChunkName: \"FluidFramework-HashFallback\" */\n\t\t\t\"./hashFileNode.js\"\n\t\t).then(async (m) => m.hashFile(file, algorithm, hashEncoding));\n\t}\n\n\t// This is split up this way to facilitate testing (see the test for more info)\n\tconst hashArray = await digestBuffer(file, algorithm);\n\treturn encodeDigest(hashArray, hashEncoding);\n}\n\n/**\n * Create a github hash (Github hashes the string with blob and size)\n * Must be called under secure context for browsers\n *\n * @param file - The contents of the file in a buffer\n * @returns The sha1 hash of the content of the buffer with the `blob` prefix and size\n *\n * @internal\n */\nexport async function gitHashFile(file: IsoBuffer): Promise<string> {\n\tconst size = file.byteLength;\n\t// eslint-disable-next-line unicorn/prefer-code-point\n\tconst filePrefix = `blob ${size.toString()}${String.fromCharCode(0)}`;\n\tconst hashBuffer = IsoBuffer.from(filePrefix + file.toString());\n\n\t// hashFile uses sha1; if that changes this will need to change too\n\treturn hashFile(hashBuffer);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"hashFileBrowser.js","sourceRoot":"","sources":["../src/hashFileBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,QAAQ,MAAM,WAAW,CAAC;AAEtC,+DAA+D;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,KAAK,UAAU,YAAY,CAAC,IAAe,EAAE,SAA8B;IAC1E,MAAM,IAAI,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACzD,OAAO,IAAI,UAAU,CAAC,IAAI,CAAC,CAAC;AAC7B,CAAC;AAED,SAAS,YAAY,CAAC,SAAqB,EAAE,QAA0B;IACtE,wCAAwC;IACxC,QAAQ,QAAQ,EAAE,CAAC;QAClB,KAAK,KAAK,CAAC,CAAC,CAAC;YACZ,MAAM,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG;iBACjC,IAAI,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,EAAE;gBACzB,yGAAyG;gBACzG,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAW,CAAC;YACrD,CAAC,CAAC;iBACD,IAAI,CAAC,EAAE,CAAC,CAAC;YACX,OAAO,OAAO,CAAC;QAChB,CAAC;QACD,KAAK,QAAQ,CAAC,CAAC,CAAC;YACf,OAAO,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;QAC1C,CAAC;IACF,CAAC;AACF,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC7B,IAAe,EACf,YAAiC,OAAO,EACxC,eAAiC,KAAK;IAEtC,8DAA8D;IAC9D,2DAA2D;IAC3D,gFAAgF;IAChF,8EAA8E;IAC9E,8BAA8B;IAC9B,IAAI,MAAM,CAAC,MAAM,KAAK,SAAS,EAAE,CAAC;QACjC,OAAO,MAAM;QACZ,qDAAqD;QACrD,mBAAmB,CACnB,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC;IAChE,CAAC;IAED,+EAA+E;IAC/E,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IACtD,OAAO,YAAY,CAAC,SAAS,EAAE,YAAY,CAAC,CAAC;AAC9C,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAe;IAChD,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC;IAC7B,qDAAqD;IACrD,MAAM,UAAU,GAAG,QAAQ,IAAI,CAAC,QAAQ,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IACtE,MAAM,UAAU,GAAG,SAAS,CAAC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEhE,mEAAmE;IACnE,OAAO,QAAQ,CAAC,UAAU,CAAC,CAAC;AAC7B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport * as base64js from \"base64-js\";\n\n// Note: See 'Isomorphic Code' section in the package README.md\nimport { IsoBuffer } from \"./bufferBrowser.js\";\n\nasync function digestBuffer(file: IsoBuffer, algorithm: \"SHA-1\" | \"SHA-256\"): Promise<Uint8Array> {\n\tconst hash = await crypto.subtle.digest(algorithm, file);\n\treturn new Uint8Array(hash);\n}\n\nfunction encodeDigest(hashArray: Uint8Array, encoding: \"hex\" | \"base64\"): string {\n\t// eslint-disable-next-line default-case\n\tswitch (encoding) {\n\t\tcase \"hex\": {\n\t\t\tconst hashHex = Array.prototype.map\n\t\t\t\t.call(hashArray, (byte) => {\n\t\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n\t\t\t\t\treturn byte.toString(16).padStart(2, \"0\") as string;\n\t\t\t\t})\n\t\t\t\t.join(\"\");\n\t\t\treturn hashHex;\n\t\t}\n\t\tcase \"base64\": {\n\t\t\treturn base64js.fromByteArray(hashArray);\n\t\t}\n\t}\n}\n\n/**\n * Hash a file. Consistent within a session, but should not be persisted and\n * is not consistent with git.\n * If called under an insecure context for a browser, this will fallback to\n * using the node implementation.\n *\n * @param file - The contents of the file in a buffer.\n * @param algorithm - The hash algorithm to use, artificially constrained by what is used internally.\n * @param hashEncoding - The encoding of the returned hash, also artificially constrained.\n * @returns The hash of the content of the buffer.\n *\n * @internal\n */\nexport async function hashFile(\n\tfile: IsoBuffer,\n\talgorithm: \"SHA-1\" | \"SHA-256\" = \"SHA-1\",\n\thashEncoding: \"hex\" | \"base64\" = \"hex\",\n): Promise<string> {\n\t// Handle insecure contexts (e.g. running with local services)\n\t// by deferring to Node version, which uses a hash polyfill\n\t// When packed, this chunk will show as \"FluidFramework-HashFallback\" separately\n\t// from the main chunk and will be of non-trivial size. It will not be served\n\t// under normal circumstances.\n\tif (crypto.subtle === undefined) {\n\t\treturn import(\n\t\t\t/* webpackChunkName: \"FluidFramework-HashFallback\" */\n\t\t\t\"./hashFileNode.js\"\n\t\t).then(async (m) => m.hashFile(file, algorithm, hashEncoding));\n\t}\n\n\t// This is split up this way to facilitate testing (see the test for more info)\n\tconst hashArray = await digestBuffer(file, algorithm);\n\treturn encodeDigest(hashArray, hashEncoding);\n}\n\n/**\n * Create a github hash (Github hashes the string with blob and size)\n * Must be called under secure context for browsers\n *\n * @param file - The contents of the file in a buffer\n * @returns The sha1 hash of the content of the buffer with the `blob` prefix and size\n *\n * @internal\n */\nexport async function gitHashFile(file: IsoBuffer): Promise<string> {\n\tconst size = file.byteLength;\n\t// eslint-disable-next-line unicorn/prefer-code-point\n\tconst filePrefix = `blob ${size.toString()}${String.fromCharCode(0)}`;\n\tconst hashBuffer = IsoBuffer.from(filePrefix + file.toString());\n\n\t// hashFile uses sha1; if that changes this will need to change too\n\treturn hashFile(hashBuffer);\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hashFileNode.d.ts","sourceRoot":"","sources":["../src/hashFileNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"hashFileNode.d.ts","sourceRoot":"","sources":["../src/hashFileNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;;;;;;;;;;;GAYG;AACH,wBAAsB,QAAQ,CAC7B,IAAI,EAAE,SAAS,EACf,SAAS,GAAE,OAAO,GAAG,SAAmB,EACxC,YAAY,GAAE,KAAK,GAAG,QAAgB,GACpC,OAAO,CAAC,MAAM,CAAC,CAejB;AAED;;;;;;;;GAQG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAMlE"}
|
package/lib/hashFileNode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hashFileNode.js","sourceRoot":"","sources":["../src/hashFileNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"hashFileNode.js","sourceRoot":"","sources":["../src/hashFileNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKtC;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC7B,IAAe,EACf,YAAiC,OAAO,EACxC,eAAiC,KAAK;IAEtC,IAAI,MAAM,CAAC;IACX,wCAAwC;IACxC,QAAQ,SAAS,EAAE,CAAC;QACnB,KAAK,OAAO,CAAC,CAAC,CAAC;YACd,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;YACpB,MAAM;QACP,CAAC;QACD,KAAK,SAAS,CAAC,CAAC,CAAC;YAChB,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;YACtB,MAAM;QACP,CAAC;IACF,CAAC;IACD,yGAAyG;IACzG,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,YAAY,CAAW,CAAC;AAC3D,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAe;IAChD,MAAM,IAAI,GAAG,IAAI,CAAC,UAAU,CAAC;IAC7B,qDAAqD;IACrD,MAAM,UAAU,GAAG,QAAQ,IAAI,CAAC,QAAQ,EAAE,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IACtE,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;IAC1B,OAAO,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { sha1, sha256 } from \"sha.js\";\n\n// Note: See 'Isomorphic Code' section in the package README.md\nimport type { IsoBuffer } from \"./bufferNode.js\";\n\n/**\n * Hash a file. Consistent within a session, but should not be persisted and\n * is not consistent with git.\n * If called under an insecure context for a browser, this will fallback to\n * using the node implementation.\n *\n * @param file - The contents of the file in a buffer.\n * @param algorithm - The hash algorithm to use, artificially constrained by what is used internally.\n * @param hashEncoding - The encoding of the returned hash, also artificially constrained.\n * @returns The hash of the content of the buffer.\n *\n * @internal\n */\nexport async function hashFile(\n\tfile: IsoBuffer,\n\talgorithm: \"SHA-1\" | \"SHA-256\" = \"SHA-1\",\n\thashEncoding: \"hex\" | \"base64\" = \"hex\",\n): Promise<string> {\n\tlet engine;\n\t// eslint-disable-next-line default-case\n\tswitch (algorithm) {\n\t\tcase \"SHA-1\": {\n\t\t\tengine = new sha1();\n\t\t\tbreak;\n\t\t}\n\t\tcase \"SHA-256\": {\n\t\t\tengine = new sha256();\n\t\t\tbreak;\n\t\t}\n\t}\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n\treturn engine.update(file).digest(hashEncoding) as string;\n}\n\n/**\n * Create a github hash (Github hashes the string with blob and size)\n * Must be called under secure context for browsers\n *\n * @param file - The contents of the file in a buffer\n * @returns The sha1 hash of the content of the buffer with the `blob` prefix and size\n *\n * @internal\n */\nexport async function gitHashFile(file: IsoBuffer): Promise<string> {\n\tconst size = file.byteLength;\n\t// eslint-disable-next-line unicorn/prefer-code-point\n\tconst filePrefix = `blob ${size.toString()}${String.fromCharCode(0)}`;\n\tconst engine = new sha1();\n\treturn engine.update(filePrefix).update(file).digest(\"hex\");\n}\n"]}
|
package/lib/indexBrowser.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
export { bufferToString, isArrayBuffer, IsoBuffer, stringToBuffer, Uint8ArrayToString, } from "./bufferBrowser.js";
|
|
6
6
|
export { gitHashFile, hashFile } from "./hashFileBrowser.js";
|
|
7
7
|
export { performance } from "./performanceIsomorphic.js";
|
|
8
|
-
export { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from "./
|
|
8
|
+
export { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from "./base64EncodingBrowser.js";
|
|
9
9
|
export { Uint8ArrayToArrayBuffer } from "./bufferShared.js";
|
|
10
10
|
export { EventEmitter } from "./eventEmitter.cjs";
|
|
11
11
|
export { type IsomorphicPerformance } from "./performanceIsomorphic.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexBrowser.d.ts","sourceRoot":"","sources":["../src/indexBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"indexBrowser.d.ts","sourceRoot":"","sources":["../src/indexBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EACN,cAAc,EACd,aAAa,EACb,SAAS,EACT,cAAc,EACd,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EACN,KAAK,qBAAqB,EAC1B,iBAAiB,EACjB,KAAK,mBAAmB,GACxB,MAAM,wBAAwB,CAAC"}
|
package/lib/indexBrowser.js
CHANGED
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
+
// Entrypoint for browser-specific code in the package.
|
|
6
|
+
// (See 'Isomorphic Code' section in the package README.md.)
|
|
5
7
|
export { bufferToString, isArrayBuffer, IsoBuffer, stringToBuffer, Uint8ArrayToString, } from "./bufferBrowser.js";
|
|
6
8
|
export { gitHashFile, hashFile } from "./hashFileBrowser.js";
|
|
7
9
|
export { performance } from "./performanceIsomorphic.js";
|
|
8
|
-
export { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from "./
|
|
10
|
+
export { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from "./base64EncodingBrowser.js";
|
|
9
11
|
export { Uint8ArrayToArrayBuffer } from "./bufferShared.js";
|
|
10
12
|
export { EventEmitter } from "./eventEmitter.cjs";
|
|
11
13
|
export { Trace } from "./trace.js";
|
package/lib/indexBrowser.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexBrowser.js","sourceRoot":"","sources":["../src/indexBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,cAAc,EACd,aAAa,EACb,SAAS,EACT,cAAc,EACd,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"indexBrowser.js","sourceRoot":"","sources":["../src/indexBrowser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,uDAAuD;AACvD,4DAA4D;AAE5D,OAAO,EACN,cAAc,EACd,aAAa,EACb,SAAS,EACT,cAAc,EACd,kBAAkB,GAClB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAoB,KAAK,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAEN,iBAAiB,GAEjB,MAAM,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Entrypoint for browser-specific code in the package.\n// (See 'Isomorphic Code' section in the package README.md.)\n\nexport {\n\tbufferToString,\n\tisArrayBuffer,\n\tIsoBuffer,\n\tstringToBuffer,\n\tUint8ArrayToString,\n} from \"./bufferBrowser.js\";\nexport { gitHashFile, hashFile } from \"./hashFileBrowser.js\";\nexport { performance } from \"./performanceIsomorphic.js\";\n\nexport { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from \"./base64EncodingBrowser.js\";\nexport { Uint8ArrayToArrayBuffer } from \"./bufferShared.js\";\nexport { EventEmitter } from \"./eventEmitter.cjs\";\nexport { type IsomorphicPerformance } from \"./performanceIsomorphic.js\";\nexport { type ITraceEvent, Trace } from \"./trace.js\";\nexport {\n\ttype EventEmitterEventType,\n\tTypedEventEmitter,\n\ttype TypedEventTransform,\n} from \"./typedEventEmitter.js\";\n"]}
|
package/lib/indexNode.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { type Buffer } from "./bufferNode.js";
|
|
|
6
6
|
export { bufferToString, IsoBuffer, stringToBuffer, Uint8ArrayToString } from "./bufferNode.js";
|
|
7
7
|
export { gitHashFile, hashFile } from "./hashFileNode.js";
|
|
8
8
|
export { performance } from "./performanceIsomorphic.js";
|
|
9
|
-
export { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from "./
|
|
9
|
+
export { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from "./base64EncodingNode.js";
|
|
10
10
|
export { Uint8ArrayToArrayBuffer } from "./bufferShared.js";
|
|
11
11
|
export { EventEmitter } from "./eventEmitter.cjs";
|
|
12
12
|
export { IsomorphicPerformance } from "./performanceIsomorphic.js";
|
package/lib/indexNode.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexNode.d.ts","sourceRoot":"","sources":["../src/indexNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"indexNode.d.ts","sourceRoot":"","sources":["../src/indexNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EACN,KAAK,qBAAqB,EAC1B,iBAAiB,EACjB,KAAK,mBAAmB,GACxB,MAAM,wBAAwB,CAAC"}
|
package/lib/indexNode.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
export { bufferToString, IsoBuffer, stringToBuffer, Uint8ArrayToString } from "./bufferNode.js";
|
|
6
6
|
export { gitHashFile, hashFile } from "./hashFileNode.js";
|
|
7
7
|
export { performance } from "./performanceIsomorphic.js";
|
|
8
|
-
export { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from "./
|
|
8
|
+
export { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from "./base64EncodingNode.js";
|
|
9
9
|
export { Uint8ArrayToArrayBuffer } from "./bufferShared.js";
|
|
10
10
|
export { EventEmitter } from "./eventEmitter.cjs";
|
|
11
11
|
export { Trace } from "./trace.js";
|
package/lib/indexNode.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexNode.js","sourceRoot":"","sources":["../src/indexNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"indexNode.js","sourceRoot":"","sources":["../src/indexNode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAoB,KAAK,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAEN,iBAAiB,GAEjB,MAAM,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n// Entrypoint for Node.js-specific code in the package.\n// (See 'Isomorphic Code' section in the package README.md.)\n\nexport { type Buffer } from \"./bufferNode.js\";\nexport { bufferToString, IsoBuffer, stringToBuffer, Uint8ArrayToString } from \"./bufferNode.js\";\nexport { gitHashFile, hashFile } from \"./hashFileNode.js\";\nexport { performance } from \"./performanceIsomorphic.js\";\n\nexport { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from \"./base64EncodingNode.js\";\nexport { Uint8ArrayToArrayBuffer } from \"./bufferShared.js\";\nexport { EventEmitter } from \"./eventEmitter.cjs\";\nexport { IsomorphicPerformance } from \"./performanceIsomorphic.js\";\nexport { type ITraceEvent, Trace } from \"./trace.js\";\nexport {\n\ttype EventEmitterEventType,\n\tTypedEventEmitter,\n\ttype TypedEventTransform,\n} from \"./typedEventEmitter.js\";\n"]}
|
package/lib/trace.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
|
-
import { performance } from "./
|
|
5
|
+
import { performance } from "./performanceIsomorphic.js";
|
|
6
6
|
/**
|
|
7
7
|
* Helper class for tracing performance of events
|
|
8
8
|
* Time measurements are in milliseconds as a floating point with a decimal
|
|
@@ -10,10 +10,12 @@ import { performance } from "./indexNode.js";
|
|
|
10
10
|
* @internal
|
|
11
11
|
*/
|
|
12
12
|
export class Trace {
|
|
13
|
+
startTick;
|
|
13
14
|
static start() {
|
|
14
15
|
const startTick = performance.now();
|
|
15
16
|
return new Trace(startTick);
|
|
16
17
|
}
|
|
18
|
+
lastTick;
|
|
17
19
|
constructor(startTick) {
|
|
18
20
|
this.startTick = startTick;
|
|
19
21
|
this.lastTick = startTick;
|
package/lib/trace.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trace.js","sourceRoot":"","sources":["../src/trace.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"trace.js","sourceRoot":"","sources":["../src/trace.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD;;;;;GAKG;AACH,MAAM,OAAO,KAAK;IAOqB;IAN/B,MAAM,CAAC,KAAK;QAClB,MAAM,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QACpC,OAAO,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;IAC7B,CAAC;IAES,QAAQ,CAAS;IAC3B,YAAsC,SAAiB;QAAjB,cAAS,GAAT,SAAS,CAAQ;QACtD,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;IAC3B,CAAC;IAEM,KAAK;QACX,MAAM,IAAI,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC;QAC/B,MAAM,KAAK,GAAG;YACb,gBAAgB,EAAE,IAAI,GAAG,IAAI,CAAC,SAAS;YACvC,QAAQ,EAAE,IAAI,GAAG,IAAI,CAAC,QAAQ;YAC9B,IAAI;SACJ,CAAC;QACF,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;QACrB,OAAO,KAAK,CAAC;IACd,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { performance } from \"./performanceIsomorphic.js\";\n\n/**\n * Helper class for tracing performance of events\n * Time measurements are in milliseconds as a floating point with a decimal\n *\n * @internal\n */\nexport class Trace {\n\tpublic static start(): Trace {\n\t\tconst startTick = performance.now();\n\t\treturn new Trace(startTick);\n\t}\n\n\tprotected lastTick: number;\n\tprotected constructor(public readonly startTick: number) {\n\t\tthis.lastTick = startTick;\n\t}\n\n\tpublic trace(): ITraceEvent {\n\t\tconst tick = performance.now();\n\t\tconst event = {\n\t\t\ttotalTimeElapsed: tick - this.startTick,\n\t\t\tduration: tick - this.lastTick,\n\t\t\ttick,\n\t\t};\n\t\tthis.lastTick = tick;\n\t\treturn event;\n\t}\n}\n\n/**\n * Event in a performance trace including time elapsed.\n *\n * @internal\n */\nexport interface ITraceEvent {\n\t/**\n\t * Total time elapsed since the start of the Trace.\n\t * Measured in milliseconds as a floating point with a decimal\n\t */\n\treadonly totalTimeElapsed: number;\n\t/**\n\t * Time elapsed since the last trace event.\n\t * Measured in milliseconds as a floating point with a decimal\n\t */\n\treadonly duration: number;\n\t/**\n\t * This number represents a relative time which should\n\t * be consistent for all trace ticks.\n\t */\n\treadonly tick: number;\n}\n"]}
|
package/lib/typedEventEmitter.js
CHANGED
|
@@ -20,5 +20,12 @@ export class TypedEventEmitter extends EventEmitter {
|
|
|
20
20
|
this.removeListener = super.removeListener.bind(this);
|
|
21
21
|
this.off = super.off.bind(this);
|
|
22
22
|
}
|
|
23
|
+
addListener;
|
|
24
|
+
on;
|
|
25
|
+
once;
|
|
26
|
+
prependListener;
|
|
27
|
+
prependOnceListener;
|
|
28
|
+
removeListener;
|
|
29
|
+
off;
|
|
23
30
|
}
|
|
24
31
|
//# sourceMappingURL=typedEventEmitter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typedEventEmitter.js","sourceRoot":"","sources":["../src/typedEventEmitter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AA+BlD;;;;;GAKG;AACH,MAAM,OAAO,iBACZ,SAAQ,YAAY;IAGpB;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QACrF,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QACnE,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QACvE,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAGrD,CAAC;QACF,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAG7D,CAAC;QACF,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QAC3F,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;IACtE,CAAC;
|
|
1
|
+
{"version":3,"file":"typedEventEmitter.js","sourceRoot":"","sources":["../src/typedEventEmitter.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AA+BlD;;;;;GAKG;AACH,MAAM,OAAO,iBACZ,SAAQ,YAAY;IAGpB;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QACrF,IAAI,CAAC,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QACnE,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QACvE,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAGrD,CAAC;QACF,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAG7D,CAAC;QACF,IAAI,CAAC,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;QAC3F,IAAI,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAsC,CAAC;IACtE,CAAC;IACQ,WAAW,CAAoC;IAC/C,EAAE,CAAoC;IACtC,IAAI,CAAoC;IACxC,eAAe,CAAoC;IACnD,mBAAmB,CAAoC;IACvD,cAAc,CAAoC;IAClD,GAAG,CAAoC;CAChD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIEvent,\n\tIEventProvider,\n\tIEventTransformer,\n\tTransformedEvent,\n} from \"@fluidframework/core-interfaces\";\n\nimport { EventEmitter } from \"./eventEmitter.cjs\";\n\n/**\n * The event emitter polyfill and the node event emitter have different event types:\n * string | symbol vs. string | number\n *\n * The polyfill is now always used, but string is the only event type preferred.\n * @alpha\n */\nexport type EventEmitterEventType = string;\n\n/**\n * @alpha\n */\nexport type TypedEventTransform<TThis, TEvent> =\n\t// Event emitter supports some special events for the emitter itself to use\n\t// this exposes those events for the TypedEventEmitter.\n\t// Since we know what the shape of these events are, we can describe them directly via a TransformedEvent\n\t// which easier than trying to extend TEvent directly\n\tTransformedEvent<\n\t\tTThis,\n\t\t\"newListener\" | \"removeListener\",\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tParameters<(event: string, listener: (...args: any[]) => void) => void>\n\t> &\n\t\t// Expose all the events provides by TEvent\n\t\tIEventTransformer<TThis, TEvent & IEvent> &\n\t\t// Add the default overload so this is covertable to EventEmitter regardless of environment\n\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\tTransformedEvent<TThis, EventEmitterEventType, any[]>;\n\n/**\n * Event Emitter helper class the supports emitting typed events.\n * @privateRemarks\n * This should become internal once the classes extending it become internal.\n * @alpha\n */\nexport class TypedEventEmitter<TEvent>\n\textends EventEmitter\n\timplements IEventProvider<TEvent & IEvent>\n{\n\tconstructor() {\n\t\tsuper();\n\t\tthis.addListener = super.addListener.bind(this) as TypedEventTransform<this, TEvent>;\n\t\tthis.on = super.on.bind(this) as TypedEventTransform<this, TEvent>;\n\t\tthis.once = super.once.bind(this) as TypedEventTransform<this, TEvent>;\n\t\tthis.prependListener = super.prependListener.bind(this) as TypedEventTransform<\n\t\t\tthis,\n\t\t\tTEvent\n\t\t>;\n\t\tthis.prependOnceListener = super.prependOnceListener.bind(this) as TypedEventTransform<\n\t\t\tthis,\n\t\t\tTEvent\n\t\t>;\n\t\tthis.removeListener = super.removeListener.bind(this) as TypedEventTransform<this, TEvent>;\n\t\tthis.off = super.off.bind(this) as TypedEventTransform<this, TEvent>;\n\t}\n\treadonly addListener: TypedEventTransform<this, TEvent>;\n\treadonly on: TypedEventTransform<this, TEvent>;\n\treadonly once: TypedEventTransform<this, TEvent>;\n\treadonly prependListener: TypedEventTransform<this, TEvent>;\n\treadonly prependOnceListener: TypedEventTransform<this, TEvent>;\n\treadonly removeListener: TypedEventTransform<this, TEvent>;\n\treadonly off: TypedEventTransform<this, TEvent>;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-internal/client-utils",
|
|
3
|
-
"version": "2.0.0-dev-rc.5.0.0.
|
|
3
|
+
"version": "2.0.0-dev-rc.5.0.0.270401",
|
|
4
4
|
"description": "Not intended for use outside the Fluid Framework.",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -34,32 +34,10 @@
|
|
|
34
34
|
"default": "./dist/indexBrowser.js"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
},
|
|
38
|
-
"./bufferBrowser.js": {
|
|
39
|
-
"node": {
|
|
40
|
-
"import": {
|
|
41
|
-
"types": "./lib/bufferNode.d.ts",
|
|
42
|
-
"default": "./lib/bufferNode.js"
|
|
43
|
-
},
|
|
44
|
-
"require": {
|
|
45
|
-
"types": "./dist/bufferNode.d.ts",
|
|
46
|
-
"default": "./dist/bufferNode.js"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"default": {
|
|
50
|
-
"import": {
|
|
51
|
-
"types": "./lib/bufferBrowser.d.ts",
|
|
52
|
-
"default": "./lib/bufferBrowser.js"
|
|
53
|
-
},
|
|
54
|
-
"require": {
|
|
55
|
-
"types": "./dist/bufferBrowser.d.ts",
|
|
56
|
-
"default": "./dist/bufferBrowser.js"
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
37
|
}
|
|
60
38
|
},
|
|
61
|
-
"main": "lib/
|
|
62
|
-
"types": "lib/
|
|
39
|
+
"main": "lib/indexBrowser.js",
|
|
40
|
+
"types": "lib/indexBrowser.d.ts",
|
|
63
41
|
"c8": {
|
|
64
42
|
"all": true,
|
|
65
43
|
"cache-dir": "nyc/.cache",
|
|
@@ -81,8 +59,8 @@
|
|
|
81
59
|
"temp-directory": "nyc/.nyc_output"
|
|
82
60
|
},
|
|
83
61
|
"dependencies": {
|
|
84
|
-
"@fluidframework/core-interfaces": "2.0.0-dev-rc.5.0.0.
|
|
85
|
-
"@fluidframework/core-utils": "2.0.0-dev-rc.5.0.0.
|
|
62
|
+
"@fluidframework/core-interfaces": "2.0.0-dev-rc.5.0.0.270401",
|
|
63
|
+
"@fluidframework/core-utils": "2.0.0-dev-rc.5.0.0.270401",
|
|
86
64
|
"@types/events_pkg": "npm:@types/events@^3.0.0",
|
|
87
65
|
"base64-js": "^1.5.1",
|
|
88
66
|
"buffer": "^6.0.3",
|
|
@@ -92,17 +70,17 @@
|
|
|
92
70
|
},
|
|
93
71
|
"devDependencies": {
|
|
94
72
|
"@arethetypeswrong/cli": "^0.15.2",
|
|
95
|
-
"@biomejs/biome": "^1.
|
|
73
|
+
"@biomejs/biome": "^1.7.3",
|
|
96
74
|
"@fluid-internal/client-utils-previous": "npm:@fluid-internal/client-utils@2.0.0-rc.4.0.0",
|
|
97
|
-
"@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.5.0.0.
|
|
75
|
+
"@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.5.0.0.270401",
|
|
98
76
|
"@fluid-tools/build-cli": "^0.39.0-264124",
|
|
99
77
|
"@fluidframework/build-common": "^2.0.3",
|
|
100
78
|
"@fluidframework/build-tools": "^0.39.0-264124",
|
|
101
|
-
"@fluidframework/eslint-config-fluid": "^5.
|
|
79
|
+
"@fluidframework/eslint-config-fluid": "^5.3.0",
|
|
102
80
|
"@microsoft/api-extractor": "^7.45.1",
|
|
103
81
|
"@types/base64-js": "^1.3.0",
|
|
104
82
|
"@types/jest": "29.5.3",
|
|
105
|
-
"@types/jest-environment-puppeteer": "2.0.0-dev-rc.5.0.0.
|
|
83
|
+
"@types/jest-environment-puppeteer": "2.0.0-dev-rc.5.0.0.270401",
|
|
106
84
|
"@types/mocha": "^9.1.1",
|
|
107
85
|
"@types/node": "^18.19.0",
|
|
108
86
|
"@types/rewire": "^2.5.28",
|
|
@@ -170,6 +148,12 @@
|
|
|
170
148
|
"build:test:mocha:esm": "tsc --project ./src/test/mocha/tsconfig.json",
|
|
171
149
|
"build:test:types": "tsc --project ./src/test/types/tsconfig.json",
|
|
172
150
|
"check:are-the-types-wrong": "attw --pack .",
|
|
151
|
+
"check:exports": "concurrently npm:check:exports:bundle-release-tags npm:check:exports:cjs:indexBrowser npm:check:exports:cjs:indexNode npm:check:exports:esm:indexBrowser npm:check:exports:esm:indexNode",
|
|
152
|
+
"check:exports:bundle-release-tags": "api-extractor run --config api-extractor/api-extractor-lint-bundle.json",
|
|
153
|
+
"check:exports:cjs:indexBrowser": "api-extractor run --config api-extractor/api-extractor-lint-indexBrowser.cjs.json",
|
|
154
|
+
"check:exports:cjs:indexNode": "api-extractor run --config api-extractor/api-extractor-lint-indexNode.cjs.json",
|
|
155
|
+
"check:exports:esm:indexBrowser": "api-extractor run --config api-extractor/api-extractor-lint-indexBrowser.esm.json",
|
|
156
|
+
"check:exports:esm:indexNode": "api-extractor run --config api-extractor/api-extractor-lint-indexNode.esm.json",
|
|
173
157
|
"check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
|
|
174
158
|
"check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
|
|
175
159
|
"ci:build:docs": "api-extractor run",
|
|
@@ -186,7 +170,7 @@
|
|
|
186
170
|
"test:mocha": "npm run test:mocha:esm && npm run test:mocha:cjs",
|
|
187
171
|
"test:mocha:cjs": "mocha --recursive \"dist/test/mocha/**/*.spec.*js\" --exit -r node_modules/@fluid-internal/mocha-test-setup",
|
|
188
172
|
"test:mocha:esm": "mocha --recursive \"lib/test/mocha/**/*.spec.*js\" --exit -r node_modules/@fluid-internal/mocha-test-setup",
|
|
189
|
-
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f
|
|
173
|
+
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
|
|
190
174
|
"typetests:gen": "flub generate typetests --dir . -v --level public",
|
|
191
175
|
"typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
|
|
192
176
|
}
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
//
|
|
6
|
+
// This file is a Node.js-specific implementation of the base64 encoding functions.
|
|
7
|
+
// Aside from the below import statement, this file should be identical to the
|
|
8
|
+
// base64EncodingNode.ts.
|
|
9
|
+
//
|
|
10
|
+
// (See 'Isomorphic Code' section in the package README.md.)
|
|
7
11
|
import { IsoBuffer } from "./bufferBrowser.js";
|
|
8
12
|
|
|
9
13
|
/**
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// This file is a Node.js-specific implementation of the base64 encoding functions.
|
|
7
|
+
// Aside from the below import statement, this file should be identical to the
|
|
8
|
+
// base64EncodingBrowser.ts.
|
|
9
|
+
//
|
|
10
|
+
// (See 'Isomorphic Code' section in the package README.md.)
|
|
11
|
+
import { IsoBuffer } from "./bufferNode.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Converts the provided {@link https://en.wikipedia.org/wiki/Base64 | base64}-encoded string
|
|
15
|
+
* to {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8}.
|
|
16
|
+
*
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
export const fromBase64ToUtf8 = (input: string): string =>
|
|
20
|
+
IsoBuffer.from(input, "base64").toString("utf8");
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Converts the provided {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8}-encoded string
|
|
24
|
+
* to {@link https://en.wikipedia.org/wiki/Base64 | base64}.
|
|
25
|
+
*
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
export const fromUtf8ToBase64 = (input: string): string =>
|
|
29
|
+
IsoBuffer.from(input, "utf8").toString("base64");
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Convenience function to convert unknown encoding to utf8 that avoids
|
|
33
|
+
* buffer copies/encode ops when no conversion is needed.
|
|
34
|
+
* @param input - The source string to convert.
|
|
35
|
+
* @param encoding - The source string's encoding.
|
|
36
|
+
*
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export const toUtf8 = (input: string, encoding: string): string => {
|
|
40
|
+
switch (encoding) {
|
|
41
|
+
case "utf8":
|
|
42
|
+
// eslint-disable-next-line unicorn/text-encoding-identifier-case -- this value is supported, just discouraged
|
|
43
|
+
case "utf-8": {
|
|
44
|
+
return input;
|
|
45
|
+
}
|
|
46
|
+
default: {
|
|
47
|
+
return IsoBuffer.from(input, encoding).toString();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
package/src/hashFileBrowser.ts
CHANGED
package/src/hashFileNode.ts
CHANGED
package/src/indexBrowser.ts
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
// Entrypoint for browser-specific code in the package.
|
|
7
|
+
// (See 'Isomorphic Code' section in the package README.md.)
|
|
8
|
+
|
|
6
9
|
export {
|
|
7
10
|
bufferToString,
|
|
8
11
|
isArrayBuffer,
|
|
@@ -13,7 +16,7 @@ export {
|
|
|
13
16
|
export { gitHashFile, hashFile } from "./hashFileBrowser.js";
|
|
14
17
|
export { performance } from "./performanceIsomorphic.js";
|
|
15
18
|
|
|
16
|
-
export { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from "./
|
|
19
|
+
export { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from "./base64EncodingBrowser.js";
|
|
17
20
|
export { Uint8ArrayToArrayBuffer } from "./bufferShared.js";
|
|
18
21
|
export { EventEmitter } from "./eventEmitter.cjs";
|
|
19
22
|
export { type IsomorphicPerformance } from "./performanceIsomorphic.js";
|
package/src/indexNode.ts
CHANGED
|
@@ -3,12 +3,15 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
// Entrypoint for Node.js-specific code in the package.
|
|
7
|
+
// (See 'Isomorphic Code' section in the package README.md.)
|
|
8
|
+
|
|
6
9
|
export { type Buffer } from "./bufferNode.js";
|
|
7
10
|
export { bufferToString, IsoBuffer, stringToBuffer, Uint8ArrayToString } from "./bufferNode.js";
|
|
8
11
|
export { gitHashFile, hashFile } from "./hashFileNode.js";
|
|
9
12
|
export { performance } from "./performanceIsomorphic.js";
|
|
10
13
|
|
|
11
|
-
export { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from "./
|
|
14
|
+
export { fromBase64ToUtf8, fromUtf8ToBase64, toUtf8 } from "./base64EncodingNode.js";
|
|
12
15
|
export { Uint8ArrayToArrayBuffer } from "./bufferShared.js";
|
|
13
16
|
export { EventEmitter } from "./eventEmitter.cjs";
|
|
14
17
|
export { IsomorphicPerformance } from "./performanceIsomorphic.js";
|
package/src/trace.ts
CHANGED