@fluidframework/container-runtime 2.0.0-internal.7.4.0 → 2.0.0-internal.8.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +32 -0
- package/api-report/container-runtime.api.md +0 -17
- package/dist/container-runtime-alpha.d.ts +3 -32
- package/dist/container-runtime-beta.d.ts +0 -8
- package/dist/container-runtime-public.d.ts +0 -8
- package/dist/container-runtime-untrimmed.d.ts +3 -47
- package/dist/containerRuntime.d.ts +6 -36
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +6 -67
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStore.js +0 -12
- package/dist/dataStore.js.map +1 -1
- package/dist/gc/garbageCollection.d.ts +8 -12
- package/dist/gc/garbageCollection.d.ts.map +1 -1
- package/dist/gc/garbageCollection.js +71 -103
- package/dist/gc/garbageCollection.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +0 -1
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts +1 -1
- package/dist/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/dist/gc/gcSummaryStateTracker.js +3 -0
- package/dist/gc/gcSummaryStateTracker.js.map +1 -1
- package/dist/gc/gcTelemetry.d.ts.map +1 -1
- package/dist/gc/gcTelemetry.js +4 -14
- package/dist/gc/gcTelemetry.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/summary/summarizer.d.ts +0 -12
- package/dist/summary/summarizer.d.ts.map +1 -1
- package/dist/summary/summarizer.js +0 -46
- package/dist/summary/summarizer.js.map +1 -1
- package/lib/container-runtime-alpha.d.ts +3 -32
- package/lib/container-runtime-beta.d.ts +0 -8
- package/lib/container-runtime-public.d.ts +0 -8
- package/lib/container-runtime-untrimmed.d.ts +3 -47
- package/lib/containerRuntime.d.ts +6 -36
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +5 -65
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStore.js +0 -12
- package/lib/dataStore.js.map +1 -1
- package/lib/gc/garbageCollection.d.ts +8 -12
- package/lib/gc/garbageCollection.d.ts.map +1 -1
- package/lib/gc/garbageCollection.js +72 -104
- package/lib/gc/garbageCollection.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +0 -1
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts +1 -1
- package/lib/gc/gcSummaryStateTracker.d.ts.map +1 -1
- package/lib/gc/gcSummaryStateTracker.js +3 -0
- package/lib/gc/gcSummaryStateTracker.js.map +1 -1
- package/lib/gc/gcTelemetry.d.ts.map +1 -1
- package/lib/gc/gcTelemetry.js +4 -14
- package/lib/gc/gcTelemetry.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/summary/summarizer.d.ts +0 -12
- package/lib/summary/summarizer.d.ts.map +1 -1
- package/lib/summary/summarizer.js +0 -46
- package/lib/summary/summarizer.js.map +1 -1
- package/package.json +20 -16
- package/src/containerRuntime.ts +7 -88
- package/src/dataStore.ts +1 -15
- package/src/gc/garbageCollection.ts +92 -119
- package/src/gc/gcDefinitions.ts +0 -1
- package/src/gc/gcSummaryStateTracker.ts +5 -1
- package/src/gc/gcTelemetry.ts +4 -13
- package/src/index.ts +0 -1
- package/src/packageVersion.ts +1 -1
- package/src/summary/summarizer.ts +1 -50
package/dist/containerRuntime.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.ContainerRuntime = exports.
|
|
26
|
+
exports.ContainerRuntime = exports.makeLegacySendBatchFn = exports.getDeviceSpec = exports.agentSchedulerId = exports.isRuntimeMessage = exports.RuntimeMessage = exports.defaultPendingOpsRetryDelayMs = exports.defaultPendingOpsWaitTimeoutMs = exports.CompressionAlgorithms = exports.defaultRuntimeHeaderData = exports.InactiveResponseHeaderKey = exports.TombstoneResponseHeaderKey = exports.AllowInactiveRequestHeaderKey = exports.AllowTombstoneRequestHeaderKey = exports.RuntimeHeaders = exports.DefaultSummaryConfiguration = void 0;
|
|
27
27
|
const container_definitions_1 = require("@fluidframework/container-definitions");
|
|
28
28
|
const core_utils_1 = require("@fluidframework/core-utils");
|
|
29
29
|
const client_utils_1 = require("@fluid-internal/client-utils");
|
|
@@ -230,7 +230,9 @@ async function createSummarizer(loader, url) {
|
|
|
230
230
|
fluidObject = await resolvedContainer.getEntryPoint();
|
|
231
231
|
}
|
|
232
232
|
else {
|
|
233
|
-
const response = await resolvedContainer.request({
|
|
233
|
+
const response = await resolvedContainer.request({
|
|
234
|
+
url: `/${summarizerRequestUrl}`,
|
|
235
|
+
});
|
|
234
236
|
if (response.status !== 200 || response.mimeType !== "fluid/object") {
|
|
235
237
|
throw (0, runtime_utils_1.responseToException)(response, request);
|
|
236
238
|
}
|
|
@@ -241,55 +243,12 @@ async function createSummarizer(loader, url) {
|
|
|
241
243
|
}
|
|
242
244
|
return fluidObject.ISummarizer;
|
|
243
245
|
}
|
|
244
|
-
/**
|
|
245
|
-
* This function is not supported publicly and exists for e2e testing
|
|
246
|
-
* @internal
|
|
247
|
-
*/
|
|
248
|
-
async function TEST_requestSummarizer(loader, url) {
|
|
249
|
-
return createSummarizer(loader, url);
|
|
250
|
-
}
|
|
251
|
-
exports.TEST_requestSummarizer = TEST_requestSummarizer;
|
|
252
246
|
/**
|
|
253
247
|
* Represents the runtime of the container. Contains helper functions/state of the container.
|
|
254
248
|
* It will define the store level mappings.
|
|
255
249
|
* @alpha
|
|
256
250
|
*/
|
|
257
251
|
class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
258
|
-
/**
|
|
259
|
-
* @deprecated Will be removed in future major release. Migrate all usage of IFluidRouter to the "entryPoint" pattern. Refer to Removing-IFluidRouter.md
|
|
260
|
-
*/
|
|
261
|
-
get IFluidRouter() {
|
|
262
|
-
return this;
|
|
263
|
-
}
|
|
264
|
-
/**
|
|
265
|
-
* @deprecated use loadRuntime instead.
|
|
266
|
-
* Load the stores from a snapshot and returns the runtime.
|
|
267
|
-
* @param context - Context of the container.
|
|
268
|
-
* @param registryEntries - Mapping to the stores.
|
|
269
|
-
* @param requestHandler - Request handlers for the container runtime
|
|
270
|
-
* @param runtimeOptions - Additional options to be passed to the runtime
|
|
271
|
-
* @param existing - (optional) When loading from an existing snapshot. Precedes context.existing if provided
|
|
272
|
-
* @param containerRuntimeCtor - (optional) Constructor to use to create the ContainerRuntime instance. This
|
|
273
|
-
* allows mixin classes to leverage this method to define their own async initializer.
|
|
274
|
-
*/
|
|
275
|
-
static async load(context, registryEntries, requestHandler, runtimeOptions = {}, containerScope = context.scope, existing, containerRuntimeCtor = ContainerRuntime) {
|
|
276
|
-
let existingFlag = true;
|
|
277
|
-
if (!existing) {
|
|
278
|
-
existingFlag = false;
|
|
279
|
-
}
|
|
280
|
-
return this.loadRuntime({
|
|
281
|
-
context,
|
|
282
|
-
registryEntries,
|
|
283
|
-
existing: existingFlag,
|
|
284
|
-
runtimeOptions,
|
|
285
|
-
containerScope,
|
|
286
|
-
containerRuntimeCtor,
|
|
287
|
-
requestHandler,
|
|
288
|
-
provideEntryPoint: () => {
|
|
289
|
-
throw new telemetry_utils_1.UsageError("ContainerRuntime.load is deprecated and should no longer be used");
|
|
290
|
-
},
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
252
|
/**
|
|
294
253
|
* Load the stores from a snapshot and returns the runtime.
|
|
295
254
|
* @param params - An object housing the runtime properties:
|
|
@@ -651,9 +610,6 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
651
610
|
getNodePackagePath: async (nodePath) => this.getGCNodePackagePath(nodePath),
|
|
652
611
|
getLastSummaryTimestampMs: () => this.messageAtLastSummary?.timestamp,
|
|
653
612
|
readAndParseBlob: async (id) => (0, driver_utils_1.readAndParse)(this.storage, id),
|
|
654
|
-
// GC runs in summarizer client and needs access to the real (non-proxy) active information. The proxy
|
|
655
|
-
// delta manager would always return false for summarizer client.
|
|
656
|
-
activeConnection: () => this.innerDeltaManager.active,
|
|
657
613
|
submitMessage: (message) => this.submit(message),
|
|
658
614
|
});
|
|
659
615
|
const loadedFromSequenceNumber = this.deltaManager.initialSequenceNumber;
|
|
@@ -862,8 +818,9 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
862
818
|
/**
|
|
863
819
|
* Notifies this object about the request made to the container.
|
|
864
820
|
* @param request - Request made to the handler.
|
|
865
|
-
* @deprecated Will be removed in future major release.
|
|
821
|
+
* @deprecated Will be removed in future major release. This method needs to stay private until LTS version of Loader moves to "2.0.0-internal.7.0.0".
|
|
866
822
|
*/
|
|
823
|
+
// @ts-expect-error expected to be used by LTS Loaders and Containers
|
|
867
824
|
async request(request) {
|
|
868
825
|
try {
|
|
869
826
|
const parser = runtime_utils_1.RequestParser.create(request);
|
|
@@ -1380,23 +1337,6 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
1380
1337
|
}
|
|
1381
1338
|
this.dataStores.processSignal(envelope.address, transformed, local);
|
|
1382
1339
|
}
|
|
1383
|
-
/**
|
|
1384
|
-
* Returns the runtime of the data store.
|
|
1385
|
-
* @param id - Id supplied during creating the data store.
|
|
1386
|
-
* @param wait - True if you want to wait for it.
|
|
1387
|
-
* @deprecated Use getAliasedDataStoreEntryPoint instead to get an aliased data store's entry point.
|
|
1388
|
-
*/
|
|
1389
|
-
// eslint-disable-next-line import/no-deprecated
|
|
1390
|
-
async getRootDataStore(id, wait = true) {
|
|
1391
|
-
return this.getRootDataStoreChannel(id, wait);
|
|
1392
|
-
}
|
|
1393
|
-
async getRootDataStoreChannel(id, wait = true) {
|
|
1394
|
-
await this.dataStores.waitIfPendingAlias(id);
|
|
1395
|
-
const internalId = this.internalId(id);
|
|
1396
|
-
const context = await this.dataStores.getDataStore(internalId, { wait });
|
|
1397
|
-
(0, core_utils_1.assert)(await context.isRoot(), 0x12b /* "did not get root data store" */);
|
|
1398
|
-
return context.realize();
|
|
1399
|
-
}
|
|
1400
1340
|
/**
|
|
1401
1341
|
* Flush the pending ops manually.
|
|
1402
1342
|
* This method is expected to be called at the end of a batch.
|
|
@@ -2519,7 +2459,6 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
2519
2459
|
};
|
|
2520
2460
|
});
|
|
2521
2461
|
}
|
|
2522
|
-
notifyAttaching() { } // do nothing (deprecated method)
|
|
2523
2462
|
async getPendingLocalState(props) {
|
|
2524
2463
|
return telemetry_utils_1.PerformanceEvent.timedExecAsync(this.mc.logger, {
|
|
2525
2464
|
eventName: "getPendingLocalState",
|