Socket
Socket
Sign inDemoInstall

@microsoft/sp-diagnostics

Package Overview
Dependencies
Maintainers
0
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/sp-diagnostics - npm Package Compare versions

Comparing version 1.19.0 to 1.20.0-beta.0

dist/sp-diagnostics_none_0b6dc3a01036a92daf67.js

15

dist/78359e4b-07c2-43c6-8d0b-d060b4d577e8.manifest.json

@@ -6,3 +6,3 @@ {

"componentType": "Library",
"version": "1.19.0",
"version": "1.20.0",
"loaderConfig": {

@@ -17,4 +17,4 @@ "internalModuleBaseUrls": [

"path": {
"path": "sp-diagnostics_none_aed64128d853ed8c6736.js",
"integrity": "sha256-fNfhq8pf/GpKn8swQovPPdYPyRc+NHjNC1LUIOALNO8="
"path": "sp-diagnostics_none_0b6dc3a01036a92daf67.js",
"integrity": "sha256-CaE9P0pzeIA1jabAvEWXUP26Kfn3Cx9jYjwr8iQI8XE="
}

@@ -25,3 +25,3 @@ },

"id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b",
"version": "1.19.0"
"version": "1.20.0"
},

@@ -31,4 +31,9 @@ "@microsoft/sp-lodash-subset": {

"id": "73e1dc6c-8441-42cc-ad47-4bd3659f8a3a",
"version": "1.19.0"
"version": "1.20.0"
},
"@ms/odsp-core-bundle": {
"type": "component",
"id": "2e09fb9b-13bb-48f2-859f-97d6fff71176",
"version": "1.4.174"
},
"tslib": {

@@ -35,0 +40,0 @@ "type": "component",

@@ -9,2 +9,3 @@ /**

import type { ILogHandler } from '@microsoft/sp-core-library';
import type { IPrivacyData } from '@ms/odsp-core-bundle';
import { ServiceKey } from '@microsoft/sp-core-library';

@@ -34,2 +35,10 @@ import type { ServiceScope } from '@microsoft/sp-core-library';

/**
* Options for clearing telemetry settings including top level and nested properties
*/
declare interface IClearSettingsOptions {
diagnosticSettings?: (keyof _IDiagnosticsSettings)[];
extraDiagnosticInfo?: (keyof IExtraDiagnosticInfo)[];
}
/* Excluded from this release type: _ICustomerPromiseErrorDetails */

@@ -47,2 +56,26 @@

/**
* Extra diagnostic information not related to core configuration
*/
declare interface IExtraDiagnosticInfo {
/**
* The id of the authoring session if user is currently editing the page.
* Session id is same across all users collaborating on the same page.
* Example: `"{b29e6452-fe31-4967-872b-ea5d23dbfe07}"`
*/
authoringSessionId?: string;
/**
* Only valid in authoring session, the id of the last op that has been received by the current client.
* This id is unique and is incremented globally across the authoring session so this can be used to align
* the timing of multiple users rather than relying on browser time from different devices.
* Example: `5`
*/
authoringOpSequenceId?: number;
/**
* Only valid in authoring session. This represents the number of concurrent clients in an authoring session.
* It will be updated as and when users join and leave a page edit session.
*/
authoringSessionClientCount?: number;
}
/* Excluded from this release type: _ILogData */

@@ -49,0 +82,0 @@

@@ -9,2 +9,3 @@ /**

import type { ILogHandler } from '@microsoft/sp-core-library';
import type { IPrivacyData } from '@ms/odsp-core-bundle';
import { ServiceKey } from '@microsoft/sp-core-library';

@@ -34,2 +35,10 @@ import type { ServiceScope } from '@microsoft/sp-core-library';

/**
* Options for clearing telemetry settings including top level and nested properties
*/
declare interface IClearSettingsOptions {
diagnosticSettings?: (keyof _IDiagnosticsSettings)[];
extraDiagnosticInfo?: (keyof IExtraDiagnosticInfo)[];
}
/* Excluded from this release type: _ICustomerPromiseErrorDetails */

@@ -47,2 +56,26 @@

/**
* Extra diagnostic information not related to core configuration
*/
declare interface IExtraDiagnosticInfo {
/**
* The id of the authoring session if user is currently editing the page.
* Session id is same across all users collaborating on the same page.
* Example: `"{b29e6452-fe31-4967-872b-ea5d23dbfe07}"`
*/
authoringSessionId?: string;
/**
* Only valid in authoring session, the id of the last op that has been received by the current client.
* This id is unique and is incremented globally across the authoring session so this can be used to align
* the timing of multiple users rather than relying on browser time from different devices.
* Example: `5`
*/
authoringOpSequenceId?: number;
/**
* Only valid in authoring session. This represents the number of concurrent clients in an authoring session.
* It will be updated as and when users join and leave a page edit session.
*/
authoringSessionClientCount?: number;
}
/* Excluded from this release type: _ILogData */

@@ -49,0 +82,0 @@

@@ -9,2 +9,3 @@ /**

import type { ILogHandler } from '@microsoft/sp-core-library';
import type { IPrivacyData } from '@ms/odsp-core-bundle';
import { ServiceKey } from '@microsoft/sp-core-library';

@@ -34,2 +35,10 @@ import type { ServiceScope } from '@microsoft/sp-core-library';

/**
* Options for clearing telemetry settings including top level and nested properties
*/
declare interface IClearSettingsOptions {
diagnosticSettings?: (keyof _IDiagnosticsSettings)[];
extraDiagnosticInfo?: (keyof IExtraDiagnosticInfo)[];
}
/* Excluded from this release type: _ICustomerPromiseErrorDetails */

@@ -47,2 +56,26 @@

/**
* Extra diagnostic information not related to core configuration
*/
declare interface IExtraDiagnosticInfo {
/**
* The id of the authoring session if user is currently editing the page.
* Session id is same across all users collaborating on the same page.
* Example: `"{b29e6452-fe31-4967-872b-ea5d23dbfe07}"`
*/
authoringSessionId?: string;
/**
* Only valid in authoring session, the id of the last op that has been received by the current client.
* This id is unique and is incremented globally across the authoring session so this can be used to align
* the timing of multiple users rather than relying on browser time from different devices.
* Example: `5`
*/
authoringOpSequenceId?: number;
/**
* Only valid in authoring session. This represents the number of concurrent clients in an authoring session.
* It will be updated as and when users join and leave a page edit session.
*/
authoringSessionClientCount?: number;
}
/* Excluded from this release type: _ILogData */

@@ -49,0 +82,0 @@

@@ -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.42.3"
"packageVersion": "7.47.0"
}
]
}

@@ -26,3 +26,3 @@ "use strict";

LogLevel[LogLevel["Error"] = 4] = "Error";
})(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
})(LogLevel || (exports.LogLevel = LogLevel = {}));
//# sourceMappingURL=LogLevel.js.map

@@ -7,2 +7,3 @@ "use strict";

var sp_core_library_2 = require("@microsoft/sp-core-library");
var odsp_core_bundle_1 = require("@ms/odsp-core-bundle");
var TraceLogger_1 = tslib_1.__importDefault(require("../Trace/TraceLogger"));

@@ -12,2 +13,3 @@ var QosResultType_1 = require("./QosResultType");

var EngagementLogger_1 = tslib_1.__importDefault(require("../Engagement/EngagementLogger"));
var Diagnostics_1 = tslib_1.__importDefault(require("../../Diagnostics"));
var DiagnosticsSettingsManager_1 = tslib_1.__importDefault(require("../../DiagnosticsSettingsManager"));

@@ -21,2 +23,3 @@ var Killswitches_1 = require("../../common/Killswitches");

var AUTHORING_OP_SEQUENCE_ID_KEY = 'AuthoringOpSequenceId';
var AUTHORING_SESSION_CLIENT_COUNT = 'AuthoringSessionClientCount';
/**

@@ -51,7 +54,15 @@ * Qos logger

_this._ensureEndExtraData();
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
_this._endExtraData[AUTHORING_SESSION_ID_KEY] = authoringSessionId;
var authoringOpSequenceId = (_d = (_c = DiagnosticsSettingsManager_1.default.settings) === null || _c === void 0 ? void 0 : _c.extraDiagnosticInfo) === null || _d === void 0 ? void 0 : _d.authoringOpSequenceId;
if (authoringOpSequenceId) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
_this._endExtraData[AUTHORING_OP_SEQUENCE_ID_KEY] = authoringOpSequenceId;
}
if (!(0, Killswitches_1.isDifferentiateMultiUserSessionFailureKSActive)()) {
var authoringSessionClientCount = Diagnostics_1.default.getAuthoringSessionClientCountInfo();
if (authoringSessionClientCount && _this._endExtraData) {
_this._endExtraData[AUTHORING_SESSION_CLIENT_COUNT] = authoringSessionClientCount;
}
}
}

@@ -165,6 +176,11 @@ };

this._endResult = resultType;
var errorString = !ex
? undefined
: !(0, Killswitches_1.isMarkPrivacyDataKSActive)()
? (0, odsp_core_bundle_1.getErrorMessage)(ex)
: ex.message;
var endData = {
resultCode: this._endResultCode,
resultType: this._endResult,
error: ex ? ex.message : undefined,
error: errorString,
extraData: this._endExtraData

@@ -181,2 +197,3 @@ };

// Instead of slower ...[spread], copy over the incoming values manually
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
Object.keys(extraData).forEach(function (k) { return (_this._endExtraData[k] = extraData[k]); });

@@ -242,3 +259,5 @@ }

// Unlikely, but avoid overwriting matching key value
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
if (!this._endExtraData[hostKey]) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
this._endExtraData[hostKey] = appHostType;

@@ -245,0 +264,0 @@ }

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

var tslib_1 = require("tslib");
var Diagnostics_1 = tslib_1.__importDefault(require("../../Diagnostics"));
var Killswitches_1 = require("../../common/Killswitches");

@@ -24,5 +25,6 @@ var QosMonitor_1 = tslib_1.__importDefault(require("./QosMonitor"));

*/
function QosMonitorShareFailureWithCP(scenarioName, copyToEngagement, extraDataForCustomerPromise) {
function QosMonitorShareFailureWithCP(scenarioName, copyToEngagement, extraDataForCustomerPromise, copyToCosmos) {
if (copyToEngagement === void 0) { copyToEngagement = false; }
var _this = _super.call(this, scenarioName, /* copyToCosmos */ false, /* copyToInterana */ copyToEngagement) || this;
if (copyToCosmos === void 0) { copyToCosmos = false; }
var _this = _super.call(this, scenarioName, /* copyToCosmos */ copyToCosmos, /* copyToInterana */ copyToEngagement) || this;
_this._extraDataForCustomerPromise = extraDataForCustomerPromise;

@@ -77,3 +79,10 @@ return _this;

this._extraDataForCustomerPromise.forEach(function (extraHandlerInfo) {
var errorModuleName = extraHandlerInfo.errorModuleName, logFailure = extraHandlerInfo.logFailure, veto = extraHandlerInfo.veto;
var logFailure = extraHandlerInfo.logFailure, veto = extraHandlerInfo.veto;
var errorModuleName = extraHandlerInfo.errorModuleName;
if (!(0, Killswitches_1.isDifferentiateMultiUserSessionFailureKSActive)()) {
var authoringSessionClientCount = Diagnostics_1.default.getAuthoringSessionClientCountInfo();
if (authoringSessionClientCount && authoringSessionClientCount > 1) {
errorModuleName += " with Multiple Users";
}
}
var errorDetailsForCP = {

@@ -80,0 +89,0 @@ errorCode: errorModuleName,

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isAllowSkippingCPErrorKSActive = exports.isAddingDebugFlagToEngagementExtraDataKSActive = exports.isLogTeamsAppTypeKSActivated = exports.isLogVivaConnectionMobileAsAppHostTypeKSActivated = void 0;
exports.isDifferentiateMultiUserSessionFailureKSActive = exports.isAllowSkippingCPErrorKSActive = exports.isMarkPrivacyDataKSActive = exports.isLogTeamsAppTypeKSActivated = exports.isLogVivaConnectionMobileAsAppHostTypeKSActivated = void 0;
var sp_core_library_1 = require("@microsoft/sp-core-library");

@@ -17,8 +17,8 @@ function isLogVivaConnectionMobileAsAppHostTypeKSActivated() {

exports.isLogTeamsAppTypeKSActivated = isLogTeamsAppTypeKSActivated;
function isAddingDebugFlagToEngagementExtraDataKSActive() {
return sp_core_library_1._SPKillSwitch.isActivated('76672562-f587-4362-a7ad-a1b397102c9a'
/* '08/23/2023', 'Log isDebug in EngagementLogger extra data' */
function isMarkPrivacyDataKSActive() {
return sp_core_library_1._SPKillSwitch.isActivated('d953c006-7eeb-48b7-ab00-ee9bb15488c3'
/* '07/30/2024', 'liaye - Support marking privacy data in QosMonitor' */
);
}
exports.isAddingDebugFlagToEngagementExtraDataKSActive = isAddingDebugFlagToEngagementExtraDataKSActive;
exports.isMarkPrivacyDataKSActive = isMarkPrivacyDataKSActive;
// cross-projects

@@ -31,2 +31,9 @@ function isAllowSkippingCPErrorKSActive() {

exports.isAllowSkippingCPErrorKSActive = isAllowSkippingCPErrorKSActive;
// cross-project: also in sp-edit-customer-promise and sp-pages-fluid
function isDifferentiateMultiUserSessionFailureKSActive() {
return sp_core_library_1._SPKillSwitch.isActivated('f215a9d1-26ca-4398-b7b1-2600b0e3b1a6'
/* '06/14/2024', 'dhivyavk - Differentiate single and multiple user session and failures for coauth' */
);
}
exports.isDifferentiateMultiUserSessionFailureKSActive = isDifferentiateMultiUserSessionFailureKSActive;
//# sourceMappingURL=Killswitches.js.map

@@ -54,2 +54,19 @@ "use strict";

};
/**
* Get the authoring session client count info from the extraDiagnosticsInfo from Diagnostics settings
* @returns the number of clients in the authoring session
*/
Diagnostics.getAuthoringSessionClientCountInfo = function () {
var _a, _b;
return (_b = (_a = DiagnosticsSettingsManager_1.default.settings) === null || _a === void 0 ? void 0 : _a.extraDiagnosticInfo) === null || _b === void 0 ? void 0 : _b.authoringSessionClientCount;
};
/**
* Used to delete telemetry settings when they are no longer needed or need to be reset.
* The current updateSettings implementation does not support un-setting previously
* set settings values.
* @param settings - the subset of the telemetry settings to be cleared.
*/
Diagnostics.clearSettings = function (settings) {
DiagnosticsSettingsManager_1.default.clearSettings(settings);
};
Diagnostics._isInitialized = false;

@@ -56,0 +73,0 @@ return Diagnostics;

@@ -23,2 +23,17 @@ "use strict";

};
DiagnosticsSettingsManager.clearSettings = function (settings) {
var _this = this;
if (settings.diagnosticSettings) {
settings.diagnosticSettings.forEach(function (setting) {
delete _this.settings[setting];
});
}
if (settings.extraDiagnosticInfo) {
settings.extraDiagnosticInfo.forEach(function (info) {
if (_this.settings.extraDiagnosticInfo && _this.settings.extraDiagnosticInfo[info]) {
delete _this.settings.extraDiagnosticInfo[info];
}
});
}
};
Object.defineProperty(DiagnosticsSettingsManager, "isInitialized", {

@@ -25,0 +40,0 @@ get: function () {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DisplayApp = void 0;
var DisplayApp;
(function (DisplayApp) {
DisplayApp["Sharepoint"] = "Sharepoint";
DisplayApp["Teams"] = "Teams";
})(DisplayApp = exports.DisplayApp || (exports.DisplayApp = {}));
// eslint-disable-next-line @typescript-eslint/typedef
exports.DisplayApp = {
Sharepoint: 'Sharepoint',
Teams: 'Teams'
};
//# sourceMappingURL=DisplayApp.js.map

@@ -18,3 +18,3 @@ "use strict";

PageType["NewsDigest"] = "NewsDigest";
})(PageType = exports.PageType || (exports.PageType = {}));
})(PageType || (exports.PageType = PageType = {}));
//# sourceMappingURL=PageType.js.map

@@ -19,3 +19,3 @@ "use strict";

PromotedState[PromotedState["Promoted"] = 2] = "Promoted";
})(PromotedState = exports.PromotedState || (exports.PromotedState = {}));
})(PromotedState || (exports.PromotedState = PromotedState = {}));
//# sourceMappingURL=PromotedState.js.map

@@ -9,3 +9,2 @@ "use strict";

var PageType_1 = require("./PageType");
var Killswitches_1 = require("../common/Killswitches");
function setPageExtraData(contextInfo, extraData) {

@@ -65,7 +64,5 @@ extraData.pageId = contextInfo.pageId;

extraData.pageType = pageType;
if (!(0, Killswitches_1.isAddingDebugFlagToEngagementExtraDataKSActive)()) {
extraData.isDebug = !!sp_core_library_1._BrowserUtilities.safelyAccessSessionStorage('spfx-debug');
}
extraData.isDebug = !!sp_core_library_1._BrowserUtilities.safelyAccessSessionStorage('spfx-debug');
}
exports.setPageExtraData = setPageExtraData;
//# sourceMappingURL=setPageExtraData.js.map

@@ -6,9 +6,9 @@ "use strict";

// https://onedrive.visualstudio.com/SPIN/_git/FFTScripts?path=%2Fsrc%2FCreateDBScripts%2FFFTDashboard-WebTemplateNames.sql&version=GBmaster
var WebTemplateId;
(function (WebTemplateId) {
WebTemplateId["TeamSite"] = "1";
WebTemplateId["MySite"] = "21";
WebTemplateId["GroupSite"] = "64";
WebTemplateId["SitePagePublishing"] = "68";
})(WebTemplateId = exports.WebTemplateId || (exports.WebTemplateId = {}));
// eslint-disable-next-line @typescript-eslint/typedef
exports.WebTemplateId = {
TeamSite: '1',
MySite: '21',
GroupSite: '64',
SitePagePublishing: '68'
};
//# sourceMappingURL=WebTemplateId.js.map
{
"name": "@microsoft/sp-diagnostics",
"version": "1.19.0",
"version": "1.20.0-beta.0",
"description": "Diagnostics tools for the SharePoint Framework",

@@ -11,10 +11,11 @@ "license": "https://aka.ms/spfx/license",

"devDependencies": {
"@rushstack/heft": "0.66.0",
"eslint": "8.7.0",
"@rushstack/heft": "0.66.19",
"eslint": "8.57.0",
"tslib": "2.3.1",
"@ms/spfx-internal-web-build-rig": "0.1.0"
"@ms/spfx-internal-web-build-rig": "0.1.0",
"@ms/odsp-core-bundle": "1.4.174"
},
"dependencies": {
"@microsoft/sp-lodash-subset": "1.19.0",
"@microsoft/sp-core-library": "1.19.0"
"@microsoft/sp-core-library": "1.20.0-beta.0",
"@microsoft/sp-lodash-subset": "1.20.0-beta.0"
},

@@ -21,0 +22,0 @@ "engines": {

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