Socket
Socket
Sign inDemoInstall

@fluidframework/runtime-utils

Package Overview
Dependencies
Maintainers
0
Versions
569
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluidframework/runtime-utils - npm Package Compare versions

Comparing version 2.3.0-288113 to 2.3.0

7

api-report/runtime-utils.legacy.alpha.api.md

@@ -41,3 +41,3 @@ ## Alpha API Report File for "@fluidframework/runtime-utils"

// (undocumented)
get headers(): IRequestHeader | undefined;
readonly headers?: IRequestHeader;
isLeaf(elements: number): boolean;

@@ -69,3 +69,5 @@ get pathParts(): readonly string[];

export class SummaryTreeBuilder implements ISummaryTreeWithStats {
constructor();
constructor(params?: {
groupId?: string;
});
// (undocumented)

@@ -75,3 +77,2 @@ addAttachment(id: string): void;

addBlob(key: string, content: string | Uint8Array): void;
// (undocumented)
addHandle(key: string, handleType: SummaryType.Tree | SummaryType.Blob | SummaryType.Attachment, handle: string): void;

@@ -78,0 +79,0 @@ // (undocumented)

# @fluidframework/runtime-utils
## 2.3.0
Dependency updates only.
## 2.2.0

@@ -4,0 +8,0 @@

@@ -23,3 +23,3 @@ /*!

get url(): string;
get headers(): IRequestHeader | undefined;
readonly headers?: IRequestHeader;
/**

@@ -26,0 +26,0 @@ * Returns the decoded path parts of the request's url

@@ -41,2 +41,5 @@ "use strict";

this.query = queryStartIndex >= 0 ? this.request.url.substring(queryStartIndex) : "";
if (request.headers !== undefined) {
this.headers = request.headers;
}
}

@@ -46,5 +49,2 @@ get url() {

}
get headers() {
return this.request.headers;
}
/**

@@ -51,0 +51,0 @@ * Returns the decoded path parts of the request's url

@@ -38,13 +38,38 @@ /*!

/**
* An object who's properties are used to initialize a {@link SummaryTreeBuilder}
* @legacy
* @alpha
*/
export interface SummaryTreeBuilderParams {
/**
* This value will become the {@link @fluidframework/driver-definitions#ISummaryTree.groupId}
* of the {@link @fluidframework/driver-definitions#ISummaryTree} built by the {@link SummaryTreeBuilder}.
*/
groupId?: string;
}
/**
* @legacy
* @alpha
*/
export declare class SummaryTreeBuilder implements ISummaryTreeWithStats {
private attachmentCounter;
private readonly groupId?;
get summary(): ISummaryTree;
get stats(): Readonly<ISummaryStats>;
constructor();
constructor(params?: {
groupId?: string;
});
private readonly summaryTree;
private summaryStats;
addBlob(key: string, content: string | Uint8Array): void;
/**
* Adds an {@link @fluidframework/driver-definitions#ISummaryHandle} that references a subtree, blob, or attachment in a previous summary.
*
* @remarks
* There are special limitations to both the key and handle parameters: We use encodeURIComponent and decodeURIComponent to encode and decode the key and handle parameters after they are added to the summary tree. This means that the key and handle parameters must be valid URI components. If they are not, the encoding and decoding will fail and the summary will not be generated correctly.
*
* @param key - The key to store the handle at in the current summary tree being generated. Should not contain any "/" characters.
* @param handleType - the type of {@link @fluidframework/driver-definitions#SummaryObject} besides a SummaryHandle, i.e. {@link @fluidframework/driver-definitions#SummaryType.Tree}, {@link @fluidframework/driver-definitions#SummaryType.Blob}, {@link @fluidframework/driver-definitions#SummaryType.Attachment}
* @param handle - The path pointing to the part of the previous summary being used to duplicate the data. Use {@link @fluidframework/driver-definitions#ISummaryHandle.handle} to help generate proper handle strings. Should not contain any "/" characters.
*/
addHandle(key: string, handleType: SummaryType.Tree | SummaryType.Blob | SummaryType.Attachment, handle: string): void;

@@ -51,0 +76,0 @@ addWithStats(key: string, summarizeResult: ISummarizeResult): void;

@@ -124,6 +124,10 @@ "use strict";

get summary() {
return {
const summary = {
type: driver_definitions_1.SummaryType.Tree,
tree: { ...this.summaryTree },
};
if (this.groupId !== undefined) {
summary.groupId = this.groupId;
}
return summary;
}

@@ -133,3 +137,3 @@ get stats() {

}
constructor() {
constructor(params) {
this.attachmentCounter = 0;

@@ -139,2 +143,3 @@ this.summaryTree = {};

this.summaryStats.treeNodeCount++;
this.groupId = params?.groupId;
}

@@ -151,2 +156,12 @@ addBlob(key, content) {

}
/**
* Adds an {@link @fluidframework/driver-definitions#ISummaryHandle} that references a subtree, blob, or attachment in a previous summary.
*
* @remarks
* There are special limitations to both the key and handle parameters: We use encodeURIComponent and decodeURIComponent to encode and decode the key and handle parameters after they are added to the summary tree. This means that the key and handle parameters must be valid URI components. If they are not, the encoding and decoding will fail and the summary will not be generated correctly.
*
* @param key - The key to store the handle at in the current summary tree being generated. Should not contain any "/" characters.
* @param handleType - the type of {@link @fluidframework/driver-definitions#SummaryObject} besides a SummaryHandle, i.e. {@link @fluidframework/driver-definitions#SummaryType.Tree}, {@link @fluidframework/driver-definitions#SummaryType.Blob}, {@link @fluidframework/driver-definitions#SummaryType.Attachment}
* @param handle - The path pointing to the part of the previous summary being used to duplicate the data. Use {@link @fluidframework/driver-definitions#ISummaryHandle.handle} to help generate proper handle strings. Should not contain any "/" characters.
*/
addHandle(key, handleType, handle) {

@@ -153,0 +168,0 @@ this.summaryTree[key] = {

@@ -23,3 +23,3 @@ /*!

get url(): string;
get headers(): IRequestHeader | undefined;
readonly headers?: IRequestHeader;
/**

@@ -26,0 +26,0 @@ * Returns the decoded path parts of the request's url

@@ -38,2 +38,5 @@ /*!

this.query = queryStartIndex >= 0 ? this.request.url.substring(queryStartIndex) : "";
if (request.headers !== undefined) {
this.headers = request.headers;
}
}

@@ -43,5 +46,2 @@ get url() {

}
get headers() {
return this.request.headers;
}
/**

@@ -48,0 +48,0 @@ * Returns the decoded path parts of the request's url

@@ -38,13 +38,38 @@ /*!

/**
* An object who's properties are used to initialize a {@link SummaryTreeBuilder}
* @legacy
* @alpha
*/
export interface SummaryTreeBuilderParams {
/**
* This value will become the {@link @fluidframework/driver-definitions#ISummaryTree.groupId}
* of the {@link @fluidframework/driver-definitions#ISummaryTree} built by the {@link SummaryTreeBuilder}.
*/
groupId?: string;
}
/**
* @legacy
* @alpha
*/
export declare class SummaryTreeBuilder implements ISummaryTreeWithStats {
private attachmentCounter;
private readonly groupId?;
get summary(): ISummaryTree;
get stats(): Readonly<ISummaryStats>;
constructor();
constructor(params?: {
groupId?: string;
});
private readonly summaryTree;
private summaryStats;
addBlob(key: string, content: string | Uint8Array): void;
/**
* Adds an {@link @fluidframework/driver-definitions#ISummaryHandle} that references a subtree, blob, or attachment in a previous summary.
*
* @remarks
* There are special limitations to both the key and handle parameters: We use encodeURIComponent and decodeURIComponent to encode and decode the key and handle parameters after they are added to the summary tree. This means that the key and handle parameters must be valid URI components. If they are not, the encoding and decoding will fail and the summary will not be generated correctly.
*
* @param key - The key to store the handle at in the current summary tree being generated. Should not contain any "/" characters.
* @param handleType - the type of {@link @fluidframework/driver-definitions#SummaryObject} besides a SummaryHandle, i.e. {@link @fluidframework/driver-definitions#SummaryType.Tree}, {@link @fluidframework/driver-definitions#SummaryType.Blob}, {@link @fluidframework/driver-definitions#SummaryType.Attachment}
* @param handle - The path pointing to the part of the previous summary being used to duplicate the data. Use {@link @fluidframework/driver-definitions#ISummaryHandle.handle} to help generate proper handle strings. Should not contain any "/" characters.
*/
addHandle(key: string, handleType: SummaryType.Tree | SummaryType.Blob | SummaryType.Attachment, handle: string): void;

@@ -51,0 +76,0 @@ addWithStats(key: string, summarizeResult: ISummarizeResult): void;

@@ -115,6 +115,10 @@ /*!

get summary() {
return {
const summary = {
type: SummaryType.Tree,
tree: { ...this.summaryTree },
};
if (this.groupId !== undefined) {
summary.groupId = this.groupId;
}
return summary;
}

@@ -124,3 +128,3 @@ get stats() {

}
constructor() {
constructor(params) {
this.attachmentCounter = 0;

@@ -130,2 +134,3 @@ this.summaryTree = {};

this.summaryStats.treeNodeCount++;
this.groupId = params?.groupId;
}

@@ -142,2 +147,12 @@ addBlob(key, content) {

}
/**
* Adds an {@link @fluidframework/driver-definitions#ISummaryHandle} that references a subtree, blob, or attachment in a previous summary.
*
* @remarks
* There are special limitations to both the key and handle parameters: We use encodeURIComponent and decodeURIComponent to encode and decode the key and handle parameters after they are added to the summary tree. This means that the key and handle parameters must be valid URI components. If they are not, the encoding and decoding will fail and the summary will not be generated correctly.
*
* @param key - The key to store the handle at in the current summary tree being generated. Should not contain any "/" characters.
* @param handleType - the type of {@link @fluidframework/driver-definitions#SummaryObject} besides a SummaryHandle, i.e. {@link @fluidframework/driver-definitions#SummaryType.Tree}, {@link @fluidframework/driver-definitions#SummaryType.Blob}, {@link @fluidframework/driver-definitions#SummaryType.Attachment}
* @param handle - The path pointing to the part of the previous summary being used to duplicate the data. Use {@link @fluidframework/driver-definitions#ISummaryHandle.handle} to help generate proper handle strings. Should not contain any "/" characters.
*/
addHandle(key, handleType, handle) {

@@ -144,0 +159,0 @@ this.summaryTree[key] = {

@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.

"packageName": "@microsoft/api-extractor",
"packageVersion": "7.45.1"
"packageVersion": "7.47.8"
}
]
}
{
"name": "@fluidframework/runtime-utils",
"version": "2.3.0-288113",
"version": "2.3.0",
"description": "Collection of utility functions for Fluid Runtime",

@@ -70,12 +70,12 @@ "homepage": "https://fluidframework.com",

"dependencies": {
"@fluid-internal/client-utils": "2.3.0-288113",
"@fluidframework/container-definitions": "2.3.0-288113",
"@fluidframework/container-runtime-definitions": "2.3.0-288113",
"@fluidframework/core-interfaces": "2.3.0-288113",
"@fluidframework/core-utils": "2.3.0-288113",
"@fluidframework/datastore-definitions": "2.3.0-288113",
"@fluidframework/driver-definitions": "2.3.0-288113",
"@fluidframework/driver-utils": "2.3.0-288113",
"@fluidframework/runtime-definitions": "2.3.0-288113",
"@fluidframework/telemetry-utils": "2.3.0-288113"
"@fluid-internal/client-utils": "~2.3.0",
"@fluidframework/container-definitions": "~2.3.0",
"@fluidframework/container-runtime-definitions": "~2.3.0",
"@fluidframework/core-interfaces": "~2.3.0",
"@fluidframework/core-utils": "~2.3.0",
"@fluidframework/datastore-definitions": "~2.3.0",
"@fluidframework/driver-definitions": "~2.3.0",
"@fluidframework/driver-utils": "~2.3.0",
"@fluidframework/runtime-definitions": "~2.3.0",
"@fluidframework/telemetry-utils": "~2.3.0"
},

@@ -85,9 +85,9 @@ "devDependencies": {

"@biomejs/biome": "~1.8.3",
"@fluid-internal/mocha-test-setup": "2.3.0-288113",
"@fluid-tools/build-cli": "^0.43.0",
"@fluid-internal/mocha-test-setup": "~2.3.0",
"@fluid-tools/build-cli": "^0.46.0",
"@fluidframework/build-common": "^2.0.3",
"@fluidframework/build-tools": "^0.43.0",
"@fluidframework/eslint-config-fluid": "^5.3.0",
"@fluidframework/build-tools": "^0.46.0",
"@fluidframework/eslint-config-fluid": "^5.4.0",
"@fluidframework/runtime-utils-previous": "npm:@fluidframework/runtime-utils@2.2.0",
"@microsoft/api-extractor": "^7.45.1",
"@microsoft/api-extractor": "7.47.8",
"@types/mocha": "^9.1.1",

@@ -112,3 +112,11 @@ "@types/node": "^18.19.0",

"typeValidation": {
"broken": {}
"broken": {
"Class_RequestParser": {
"backCompat": false
},
"ClassStatics_RequestParser": {
"backCompat": false
}
},
"entrypoint": "internal"
},

@@ -115,0 +123,0 @@ "scripts": {

@@ -45,2 +45,5 @@ /*!

this.query = queryStartIndex >= 0 ? this.request.url.substring(queryStartIndex) : "";
if (request.headers !== undefined) {
this.headers = request.headers;
}
}

@@ -52,5 +55,3 @@

public get headers(): IRequestHeader | undefined {
return this.request.headers;
}
public readonly headers?: IRequestHeader;

@@ -57,0 +58,0 @@ /**

@@ -150,13 +150,30 @@ /*!

/**
* An object who's properties are used to initialize a {@link SummaryTreeBuilder}
* @legacy
* @alpha
*/
export interface SummaryTreeBuilderParams {
/**
* This value will become the {@link @fluidframework/driver-definitions#ISummaryTree.groupId}
* of the {@link @fluidframework/driver-definitions#ISummaryTree} built by the {@link SummaryTreeBuilder}.
*/
groupId?: string;
}
/**
* @legacy
* @alpha
*/
export class SummaryTreeBuilder implements ISummaryTreeWithStats {
private attachmentCounter: number = 0;
private readonly groupId?: string;
public get summary(): ISummaryTree {
return {
const summary: ISummaryTree = {
type: SummaryType.Tree,
tree: { ...this.summaryTree },
};
if (this.groupId !== undefined) {
summary.groupId = this.groupId;
}
return summary;
}

@@ -168,5 +185,6 @@

constructor() {
constructor(params?: { groupId?: string }) {
this.summaryStats = mergeStats();
this.summaryStats.treeNodeCount++;
this.groupId = params?.groupId;
}

@@ -192,2 +210,12 @@

/**
* Adds an {@link @fluidframework/driver-definitions#ISummaryHandle} that references a subtree, blob, or attachment in a previous summary.
*
* @remarks
* There are special limitations to both the key and handle parameters: We use encodeURIComponent and decodeURIComponent to encode and decode the key and handle parameters after they are added to the summary tree. This means that the key and handle parameters must be valid URI components. If they are not, the encoding and decoding will fail and the summary will not be generated correctly.
*
* @param key - The key to store the handle at in the current summary tree being generated. Should not contain any "/" characters.
* @param handleType - the type of {@link @fluidframework/driver-definitions#SummaryObject} besides a SummaryHandle, i.e. {@link @fluidframework/driver-definitions#SummaryType.Tree}, {@link @fluidframework/driver-definitions#SummaryType.Blob}, {@link @fluidframework/driver-definitions#SummaryType.Attachment}
* @param handle - The path pointing to the part of the previous summary being used to duplicate the data. Use {@link @fluidframework/driver-definitions#ISummaryHandle.handle} to help generate proper handle strings. Should not contain any "/" characters.
*/
public addHandle(

@@ -194,0 +222,0 @@ key: string,

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc