@fluidframework/runtime-utils
Advanced tools
Comparing version 2.10.0-305357 to 2.10.0-306579
@@ -69,3 +69,3 @@ ## Alpha API Report File for "@fluidframework/runtime-utils" | ||
// @alpha (undocumented) | ||
// @alpha | ||
export class SummaryTreeBuilder implements ISummaryTreeWithStats { | ||
@@ -75,10 +75,6 @@ constructor(params?: { | ||
}); | ||
// (undocumented) | ||
addAttachment(id: string): void; | ||
// (undocumented) | ||
addBlob(key: string, content: string | Uint8Array): void; | ||
addHandle(key: string, handleType: SummaryType.Tree | SummaryType.Blob | SummaryType.Attachment, handle: string): void; | ||
// (undocumented) | ||
addWithStats(key: string, summarizeResult: ISummarizeResult): void; | ||
// (undocumented) | ||
getSummaryTree(): ISummaryTreeWithStats; | ||
@@ -85,0 +81,0 @@ // (undocumented) |
@@ -50,2 +50,4 @@ /*! | ||
/** | ||
* A helper class for building summary trees. | ||
* @remarks Uses the builder pattern. | ||
* @legacy | ||
@@ -64,2 +66,7 @@ * @alpha | ||
private summaryStats; | ||
/** | ||
* Add a blob to the summary tree. This blob will be stored at the given key in the summary tree. | ||
* @param key - The key to store the blob at in the current summary tree being generated. Should not contain any "/" characters. | ||
* @param content - The content of the blob to be added to the summary tree. | ||
*/ | ||
addBlob(key: string, content: string | Uint8Array): void; | ||
@@ -77,4 +84,21 @@ /** | ||
addHandle(key: string, handleType: SummaryType.Tree | SummaryType.Blob | SummaryType.Attachment, handle: string): void; | ||
/** | ||
* Adds a child and updates the stats accordingly. | ||
* @param key - The key to store the handle at in the current summary tree being generated. Should not contain any "/" characters. | ||
* The key should be unique within the current summary tree, and not transform when encodeURIComponent is called. | ||
* @param summarizeResult - Similar to {@link @fluidframework/runtime-definitions#ISummaryTreeWithStats}. The provided summary can be either a {@link @fluidframework/driver-definitions#ISummaryHandle} or {@link @fluidframework/driver-definitions#ISummaryTree}. | ||
*/ | ||
addWithStats(key: string, summarizeResult: ISummarizeResult): void; | ||
/** | ||
* Adds an {@link @fluidframework/driver-definitions#ISummaryAttachment} to the summary. This blob needs to already be uploaded to storage. | ||
* @param id - The id of the uploaded attachment to be added to the summary tree. | ||
*/ | ||
addAttachment(id: string): void; | ||
/** | ||
* Gives you the in-memory summary tree with stats built by the SummaryTreeBuilder. | ||
* | ||
* @remarks | ||
* Use this once you're done building the summary tree, the stats should automatically be generated. | ||
* @returns The summary tree and stats built by the SummaryTreeBuilder. | ||
*/ | ||
getSummaryTree(): ISummaryTreeWithStats; | ||
@@ -81,0 +105,0 @@ } |
@@ -119,2 +119,4 @@ "use strict"; | ||
/** | ||
* A helper class for building summary trees. | ||
* @remarks Uses the builder pattern. | ||
* @legacy | ||
@@ -144,2 +146,7 @@ * @alpha | ||
} | ||
/** | ||
* Add a blob to the summary tree. This blob will be stored at the given key in the summary tree. | ||
* @param key - The key to store the blob at in the current summary tree being generated. Should not contain any "/" characters. | ||
* @param content - The content of the blob to be added to the summary tree. | ||
*/ | ||
addBlob(key, content) { | ||
@@ -173,2 +180,8 @@ // Prevent cloning by directly referencing underlying private properties | ||
} | ||
/** | ||
* Adds a child and updates the stats accordingly. | ||
* @param key - The key to store the handle at in the current summary tree being generated. Should not contain any "/" characters. | ||
* The key should be unique within the current summary tree, and not transform when encodeURIComponent is called. | ||
* @param summarizeResult - Similar to {@link @fluidframework/runtime-definitions#ISummaryTreeWithStats}. The provided summary can be either a {@link @fluidframework/driver-definitions#ISummaryHandle} or {@link @fluidframework/driver-definitions#ISummaryTree}. | ||
*/ | ||
addWithStats(key, summarizeResult) { | ||
@@ -178,5 +191,16 @@ this.summaryTree[key] = summarizeResult.summary; | ||
} | ||
/** | ||
* Adds an {@link @fluidframework/driver-definitions#ISummaryAttachment} to the summary. This blob needs to already be uploaded to storage. | ||
* @param id - The id of the uploaded attachment to be added to the summary tree. | ||
*/ | ||
addAttachment(id) { | ||
this.summaryTree[this.attachmentCounter++] = { id, type: driver_definitions_1.SummaryType.Attachment }; | ||
} | ||
/** | ||
* Gives you the in-memory summary tree with stats built by the SummaryTreeBuilder. | ||
* | ||
* @remarks | ||
* Use this once you're done building the summary tree, the stats should automatically be generated. | ||
* @returns The summary tree and stats built by the SummaryTreeBuilder. | ||
*/ | ||
getSummaryTree() { | ||
@@ -183,0 +207,0 @@ return { summary: this.summary, stats: this.stats }; |
@@ -50,2 +50,4 @@ /*! | ||
/** | ||
* A helper class for building summary trees. | ||
* @remarks Uses the builder pattern. | ||
* @legacy | ||
@@ -64,2 +66,7 @@ * @alpha | ||
private summaryStats; | ||
/** | ||
* Add a blob to the summary tree. This blob will be stored at the given key in the summary tree. | ||
* @param key - The key to store the blob at in the current summary tree being generated. Should not contain any "/" characters. | ||
* @param content - The content of the blob to be added to the summary tree. | ||
*/ | ||
addBlob(key: string, content: string | Uint8Array): void; | ||
@@ -77,4 +84,21 @@ /** | ||
addHandle(key: string, handleType: SummaryType.Tree | SummaryType.Blob | SummaryType.Attachment, handle: string): void; | ||
/** | ||
* Adds a child and updates the stats accordingly. | ||
* @param key - The key to store the handle at in the current summary tree being generated. Should not contain any "/" characters. | ||
* The key should be unique within the current summary tree, and not transform when encodeURIComponent is called. | ||
* @param summarizeResult - Similar to {@link @fluidframework/runtime-definitions#ISummaryTreeWithStats}. The provided summary can be either a {@link @fluidframework/driver-definitions#ISummaryHandle} or {@link @fluidframework/driver-definitions#ISummaryTree}. | ||
*/ | ||
addWithStats(key: string, summarizeResult: ISummarizeResult): void; | ||
/** | ||
* Adds an {@link @fluidframework/driver-definitions#ISummaryAttachment} to the summary. This blob needs to already be uploaded to storage. | ||
* @param id - The id of the uploaded attachment to be added to the summary tree. | ||
*/ | ||
addAttachment(id: string): void; | ||
/** | ||
* Gives you the in-memory summary tree with stats built by the SummaryTreeBuilder. | ||
* | ||
* @remarks | ||
* Use this once you're done building the summary tree, the stats should automatically be generated. | ||
* @returns The summary tree and stats built by the SummaryTreeBuilder. | ||
*/ | ||
getSummaryTree(): ISummaryTreeWithStats; | ||
@@ -81,0 +105,0 @@ } |
@@ -110,2 +110,4 @@ /*! | ||
/** | ||
* A helper class for building summary trees. | ||
* @remarks Uses the builder pattern. | ||
* @legacy | ||
@@ -135,2 +137,7 @@ * @alpha | ||
} | ||
/** | ||
* Add a blob to the summary tree. This blob will be stored at the given key in the summary tree. | ||
* @param key - The key to store the blob at in the current summary tree being generated. Should not contain any "/" characters. | ||
* @param content - The content of the blob to be added to the summary tree. | ||
*/ | ||
addBlob(key, content) { | ||
@@ -164,2 +171,8 @@ // Prevent cloning by directly referencing underlying private properties | ||
} | ||
/** | ||
* Adds a child and updates the stats accordingly. | ||
* @param key - The key to store the handle at in the current summary tree being generated. Should not contain any "/" characters. | ||
* The key should be unique within the current summary tree, and not transform when encodeURIComponent is called. | ||
* @param summarizeResult - Similar to {@link @fluidframework/runtime-definitions#ISummaryTreeWithStats}. The provided summary can be either a {@link @fluidframework/driver-definitions#ISummaryHandle} or {@link @fluidframework/driver-definitions#ISummaryTree}. | ||
*/ | ||
addWithStats(key, summarizeResult) { | ||
@@ -169,5 +182,16 @@ this.summaryTree[key] = summarizeResult.summary; | ||
} | ||
/** | ||
* Adds an {@link @fluidframework/driver-definitions#ISummaryAttachment} to the summary. This blob needs to already be uploaded to storage. | ||
* @param id - The id of the uploaded attachment to be added to the summary tree. | ||
*/ | ||
addAttachment(id) { | ||
this.summaryTree[this.attachmentCounter++] = { id, type: SummaryType.Attachment }; | ||
} | ||
/** | ||
* Gives you the in-memory summary tree with stats built by the SummaryTreeBuilder. | ||
* | ||
* @remarks | ||
* Use this once you're done building the summary tree, the stats should automatically be generated. | ||
* @returns The summary tree and stats built by the SummaryTreeBuilder. | ||
*/ | ||
getSummaryTree() { | ||
@@ -174,0 +198,0 @@ return { summary: this.summary, stats: this.stats }; |
{ | ||
"name": "@fluidframework/runtime-utils", | ||
"version": "2.10.0-305357", | ||
"version": "2.10.0-306579", | ||
"description": "Collection of utility functions for Fluid Runtime", | ||
@@ -72,12 +72,12 @@ "homepage": "https://fluidframework.com", | ||
"dependencies": { | ||
"@fluid-internal/client-utils": "2.10.0-305357", | ||
"@fluidframework/container-definitions": "2.10.0-305357", | ||
"@fluidframework/container-runtime-definitions": "2.10.0-305357", | ||
"@fluidframework/core-interfaces": "2.10.0-305357", | ||
"@fluidframework/core-utils": "2.10.0-305357", | ||
"@fluidframework/datastore-definitions": "2.10.0-305357", | ||
"@fluidframework/driver-definitions": "2.10.0-305357", | ||
"@fluidframework/driver-utils": "2.10.0-305357", | ||
"@fluidframework/runtime-definitions": "2.10.0-305357", | ||
"@fluidframework/telemetry-utils": "2.10.0-305357" | ||
"@fluid-internal/client-utils": "2.10.0-306579", | ||
"@fluidframework/container-definitions": "2.10.0-306579", | ||
"@fluidframework/container-runtime-definitions": "2.10.0-306579", | ||
"@fluidframework/core-interfaces": "2.10.0-306579", | ||
"@fluidframework/core-utils": "2.10.0-306579", | ||
"@fluidframework/datastore-definitions": "2.10.0-306579", | ||
"@fluidframework/driver-definitions": "2.10.0-306579", | ||
"@fluidframework/driver-utils": "2.10.0-306579", | ||
"@fluidframework/runtime-definitions": "2.10.0-306579", | ||
"@fluidframework/telemetry-utils": "2.10.0-306579" | ||
}, | ||
@@ -87,3 +87,3 @@ "devDependencies": { | ||
"@biomejs/biome": "~1.9.3", | ||
"@fluid-internal/mocha-test-setup": "2.10.0-305357", | ||
"@fluid-internal/mocha-test-setup": "2.10.0-306579", | ||
"@fluid-tools/build-cli": "^0.50.0", | ||
@@ -90,0 +90,0 @@ "@fluidframework/build-common": "^2.0.3", |
@@ -162,2 +162,4 @@ /*! | ||
/** | ||
* A helper class for building summary trees. | ||
* @remarks Uses the builder pattern. | ||
* @legacy | ||
@@ -194,2 +196,7 @@ * @alpha | ||
/** | ||
* Add a blob to the summary tree. This blob will be stored at the given key in the summary tree. | ||
* @param key - The key to store the blob at in the current summary tree being generated. Should not contain any "/" characters. | ||
* @param content - The content of the blob to be added to the summary tree. | ||
*/ | ||
public addBlob(key: string, content: string | Uint8Array): void { | ||
@@ -233,2 +240,8 @@ // Prevent cloning by directly referencing underlying private properties | ||
/** | ||
* Adds a child and updates the stats accordingly. | ||
* @param key - The key to store the handle at in the current summary tree being generated. Should not contain any "/" characters. | ||
* The key should be unique within the current summary tree, and not transform when encodeURIComponent is called. | ||
* @param summarizeResult - Similar to {@link @fluidframework/runtime-definitions#ISummaryTreeWithStats}. The provided summary can be either a {@link @fluidframework/driver-definitions#ISummaryHandle} or {@link @fluidframework/driver-definitions#ISummaryTree}. | ||
*/ | ||
public addWithStats(key: string, summarizeResult: ISummarizeResult): void { | ||
@@ -239,2 +252,6 @@ this.summaryTree[key] = summarizeResult.summary; | ||
/** | ||
* Adds an {@link @fluidframework/driver-definitions#ISummaryAttachment} to the summary. This blob needs to already be uploaded to storage. | ||
* @param id - The id of the uploaded attachment to be added to the summary tree. | ||
*/ | ||
public addAttachment(id: string) { | ||
@@ -244,2 +261,9 @@ this.summaryTree[this.attachmentCounter++] = { id, type: SummaryType.Attachment }; | ||
/** | ||
* Gives you the in-memory summary tree with stats built by the SummaryTreeBuilder. | ||
* | ||
* @remarks | ||
* Use this once you're done building the summary tree, the stats should automatically be generated. | ||
* @returns The summary tree and stats built by the SummaryTreeBuilder. | ||
*/ | ||
public getSummaryTree(): ISummaryTreeWithStats { | ||
@@ -246,0 +270,0 @@ return { summary: this.summary, stats: this.stats }; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
393851
4632
+ Added@fluid-internal/client-utils@2.10.0-306579(transitive)
+ Added@fluidframework/container-definitions@2.10.0-306579(transitive)
+ Added@fluidframework/container-runtime-definitions@2.10.0-306579(transitive)
+ Added@fluidframework/core-interfaces@2.10.0-306579(transitive)
+ Added@fluidframework/core-utils@2.10.0-306579(transitive)
+ Added@fluidframework/datastore-definitions@2.10.0-306579(transitive)
+ Added@fluidframework/driver-definitions@2.10.0-306579(transitive)
+ Added@fluidframework/driver-utils@2.10.0-306579(transitive)
+ Added@fluidframework/id-compressor@2.10.0-306579(transitive)
+ Added@fluidframework/runtime-definitions@2.10.0-306579(transitive)
+ Added@fluidframework/telemetry-utils@2.10.0-306579(transitive)
- Removed@fluid-internal/client-utils@2.10.0-305357(transitive)
- Removed@fluidframework/container-definitions@2.10.0-305357(transitive)
- Removed@fluidframework/container-runtime-definitions@2.10.0-305357(transitive)
- Removed@fluidframework/core-interfaces@2.10.0-305357(transitive)
- Removed@fluidframework/core-utils@2.10.0-305357(transitive)
- Removed@fluidframework/datastore-definitions@2.10.0-305357(transitive)
- Removed@fluidframework/driver-definitions@2.10.0-305357(transitive)
- Removed@fluidframework/driver-utils@2.10.0-305357(transitive)
- Removed@fluidframework/id-compressor@2.10.0-305357(transitive)
- Removed@fluidframework/runtime-definitions@2.10.0-305357(transitive)
- Removed@fluidframework/telemetry-utils@2.10.0-305357(transitive)
Updated@fluidframework/container-runtime-definitions@2.10.0-306579