@fluidframework/shared-object-base 2.0.0-rc.2.0.1 → 2.0.0-rc.3.0.0

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.
Files changed (87) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/api-report/shared-object-base.api.md +8 -1
  3. package/dist/handle.d.ts +1 -1
  4. package/dist/handle.d.ts.map +1 -1
  5. package/dist/handle.js +2 -2
  6. package/dist/handle.js.map +1 -1
  7. package/dist/index.d.ts +1 -1
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js.map +1 -1
  10. package/dist/legacy.d.ts +23 -0
  11. package/dist/packageVersion.d.ts +1 -1
  12. package/dist/packageVersion.js +1 -1
  13. package/dist/packageVersion.js.map +1 -1
  14. package/dist/public.d.ts +17 -0
  15. package/dist/remoteObjectHandle.d.ts.map +1 -1
  16. package/dist/remoteObjectHandle.js +6 -6
  17. package/dist/remoteObjectHandle.js.map +1 -1
  18. package/dist/serializer.d.ts.map +1 -1
  19. package/dist/serializer.js +3 -5
  20. package/dist/serializer.js.map +1 -1
  21. package/dist/sharedObject.d.ts +52 -4
  22. package/dist/sharedObject.d.ts.map +1 -1
  23. package/dist/sharedObject.js +22 -22
  24. package/dist/sharedObject.js.map +1 -1
  25. package/dist/summarySerializer.d.ts.map +1 -1
  26. package/dist/summarySerializer.js.map +1 -1
  27. package/dist/utils.d.ts.map +1 -1
  28. package/dist/utils.js +2 -2
  29. package/dist/utils.js.map +1 -1
  30. package/internal.d.ts +11 -0
  31. package/legacy.d.ts +11 -0
  32. package/lib/handle.d.ts +1 -1
  33. package/lib/handle.d.ts.map +1 -1
  34. package/lib/handle.js +1 -1
  35. package/lib/handle.js.map +1 -1
  36. package/lib/index.d.ts +1 -1
  37. package/lib/index.d.ts.map +1 -1
  38. package/lib/index.js.map +1 -1
  39. package/lib/legacy.d.ts +23 -0
  40. package/lib/packageVersion.d.ts +1 -1
  41. package/lib/packageVersion.js +1 -1
  42. package/lib/packageVersion.js.map +1 -1
  43. package/lib/public.d.ts +17 -0
  44. package/lib/remoteObjectHandle.d.ts.map +1 -1
  45. package/lib/remoteObjectHandle.js +3 -3
  46. package/lib/remoteObjectHandle.js.map +1 -1
  47. package/lib/serializer.d.ts.map +1 -1
  48. package/lib/serializer.js +1 -3
  49. package/lib/serializer.js.map +1 -1
  50. package/lib/sharedObject.d.ts +52 -4
  51. package/lib/sharedObject.d.ts.map +1 -1
  52. package/lib/sharedObject.js +5 -5
  53. package/lib/sharedObject.js.map +1 -1
  54. package/lib/summarySerializer.d.ts.map +1 -1
  55. package/lib/summarySerializer.js.map +1 -1
  56. package/lib/utils.d.ts.map +1 -1
  57. package/lib/utils.js +1 -1
  58. package/lib/utils.js.map +1 -1
  59. package/package.json +36 -57
  60. package/src/handle.ts +2 -1
  61. package/src/index.ts +1 -1
  62. package/src/packageVersion.ts +1 -1
  63. package/src/remoteObjectHandle.ts +4 -4
  64. package/src/serializer.ts +5 -1
  65. package/src/sharedObject.ts +71 -18
  66. package/src/summarySerializer.ts +1 -0
  67. package/src/utils.ts +2 -1
  68. package/api-extractor-cjs.json +0 -8
  69. package/dist/shared-object-base-alpha.d.ts +0 -427
  70. package/dist/shared-object-base-beta.d.ts +0 -118
  71. package/dist/shared-object-base-public.d.ts +0 -118
  72. package/dist/shared-object-base-untrimmed.d.ts +0 -513
  73. package/lib/shared-object-base-alpha.d.ts +0 -427
  74. package/lib/shared-object-base-beta.d.ts +0 -118
  75. package/lib/shared-object-base-public.d.ts +0 -118
  76. package/lib/shared-object-base-untrimmed.d.ts +0 -513
  77. package/lib/test/attachingBindingAndConnecting.spec.js +0 -334
  78. package/lib/test/attachingBindingAndConnecting.spec.js.map +0 -1
  79. package/lib/test/serializer.spec.js +0 -166
  80. package/lib/test/serializer.spec.js.map +0 -1
  81. package/lib/test/sharedObject.spec.js +0 -72
  82. package/lib/test/sharedObject.spec.js.map +0 -1
  83. package/lib/test/types/validateSharedObjectBasePrevious.generated.js +0 -26
  84. package/lib/test/types/validateSharedObjectBasePrevious.generated.js.map +0 -1
  85. package/lib/test/utils.js +0 -37
  86. package/lib/test/utils.js.map +0 -1
  87. /package/{dist → lib}/tsdoc-metadata.json +0 -0
@@ -1,118 +0,0 @@
1
- import { EventEmitterEventType } from '@fluid-internal/client-utils';
2
- import { EventEmitterWithErrorHandling } from '@fluidframework/telemetry-utils';
3
- import { IChannel } from '@fluidframework/datastore-definitions';
4
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
5
- import { IChannelServices } from '@fluidframework/datastore-definitions';
6
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
7
- import { IErrorEvent } from '@fluidframework/core-interfaces';
8
- import { IEventProvider } from '@fluidframework/core-interfaces';
9
- import { IEventThisPlaceHolder } from '@fluidframework/core-interfaces';
10
- import { IExperimentalIncrementalSummaryContext } from '@fluidframework/runtime-definitions';
11
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
12
- import { IFluidHandle } from '@fluidframework/core-interfaces';
13
- import { IFluidHandleContext } from '@fluidframework/core-interfaces';
14
- import { IGarbageCollectionData } from '@fluidframework/runtime-definitions';
15
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
16
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
17
- import { ITelemetryContext } from '@fluidframework/runtime-definitions';
18
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
19
-
20
- /* Excluded from this release type: bindHandles */
21
-
22
- /* Excluded from this release type: createSingleBlobSummary */
23
-
24
- /* Excluded from this release type: EventEmitterWithErrorHandling */
25
-
26
- /* Excluded from this release type: FluidSerializer */
27
-
28
- /**
29
- * @public
30
- */
31
- export declare interface IFluidSerializer {
32
- /**
33
- * Given a mostly-plain object that may have handle objects embedded within, will return a fully-plain object
34
- * where any embedded IFluidHandles have been replaced with a serializable form.
35
- *
36
- * The original `input` object is not mutated. This method will shallowly clones all objects in the path from
37
- * the root to any replaced handles. (If no handles are found, returns the original object.)
38
- */
39
- encode(value: any, bind: IFluidHandle): any;
40
- /**
41
- * Given a fully-jsonable object tree that may have encoded handle objects embedded within, will return an
42
- * equivalent object tree where any encoded IFluidHandles have been replaced with their decoded form.
43
- *
44
- * The original `input` object is not mutated. This method will shallowly clone all objects in the path from
45
- * the root to any replaced handles. (If no handles are found, returns the original object.)
46
- *
47
- * The decoded handles are implicitly bound to the handle context of this serializer.
48
- */
49
- decode(input: any): any;
50
- /**
51
- * Stringifies a given value. Converts any IFluidHandle to its stringified equivalent.
52
- */
53
- stringify(value: any, bind: IFluidHandle): string;
54
- /**
55
- * Parses the given JSON input string and returns the JavaScript object defined by it. Any Fluid
56
- * handles will be realized as part of the parse
57
- */
58
- parse(value: string): any;
59
- }
60
-
61
- /**
62
- * Base interface for shared objects from which other interfaces derive. Implemented by SharedObject
63
- * @public
64
- */
65
- export declare interface ISharedObject<TEvent extends ISharedObjectEvents = ISharedObjectEvents> extends IChannel, IEventProvider<TEvent> {
66
- /**
67
- * Binds the given shared object to its containing data store runtime, causing it to attach once
68
- * the runtime attaches.
69
- */
70
- bindToContext(): void;
71
- /**
72
- * Returns the GC data for this shared object. It contains a list of GC nodes that contains references to
73
- * other GC nodes.
74
- * @param fullGC - true to bypass optimizations and force full generation of GC data.
75
- */
76
- getGCData(fullGC?: boolean): IGarbageCollectionData;
77
- }
78
-
79
- /**
80
- * Events emitted by {@link ISharedObject}.
81
- * @public
82
- */
83
- export declare interface ISharedObjectEvents extends IErrorEvent {
84
- /**
85
- * Fires before an incoming operation (op) is applied to the shared object.
86
- *
87
- * @remarks Note: this should be considered an internal implementation detail. It is not recommended for external
88
- * use.
89
- *
90
- * @eventProperty
91
- */
92
- (event: "pre-op", listener: (op: ISequencedDocumentMessage, local: boolean, target: IEventThisPlaceHolder) => void): any;
93
- /**
94
- * Fires after an incoming op is applied to the shared object.
95
- *
96
- * @remarks Note: this should be considered an internal implementation detail. It is not recommended for external
97
- * use.
98
- *
99
- * @eventProperty
100
- */
101
- (event: "op", listener: (op: ISequencedDocumentMessage, local: boolean, target: IEventThisPlaceHolder) => void): any;
102
- }
103
-
104
- /* Excluded from this release type: makeHandlesSerializable */
105
-
106
- /* Excluded from this release type: parseHandles */
107
-
108
- /* Excluded from this release type: serializeHandles */
109
-
110
- /* Excluded from this release type: SharedObject */
111
-
112
- /* Excluded from this release type: SharedObjectCore */
113
-
114
- /* Excluded from this release type: SummarySerializer */
115
-
116
- /* Excluded from this release type: ValueType */
117
-
118
- export { }
@@ -1,118 +0,0 @@
1
- import { EventEmitterEventType } from '@fluid-internal/client-utils';
2
- import { EventEmitterWithErrorHandling } from '@fluidframework/telemetry-utils';
3
- import { IChannel } from '@fluidframework/datastore-definitions';
4
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
5
- import { IChannelServices } from '@fluidframework/datastore-definitions';
6
- import { IChannelStorageService } from '@fluidframework/datastore-definitions';
7
- import { IErrorEvent } from '@fluidframework/core-interfaces';
8
- import { IEventProvider } from '@fluidframework/core-interfaces';
9
- import { IEventThisPlaceHolder } from '@fluidframework/core-interfaces';
10
- import { IExperimentalIncrementalSummaryContext } from '@fluidframework/runtime-definitions';
11
- import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
12
- import { IFluidHandle } from '@fluidframework/core-interfaces';
13
- import { IFluidHandleContext } from '@fluidframework/core-interfaces';
14
- import { IGarbageCollectionData } from '@fluidframework/runtime-definitions';
15
- import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
16
- import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
17
- import { ITelemetryContext } from '@fluidframework/runtime-definitions';
18
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
19
-
20
- /* Excluded from this release type: bindHandles */
21
-
22
- /* Excluded from this release type: createSingleBlobSummary */
23
-
24
- /* Excluded from this release type: EventEmitterWithErrorHandling */
25
-
26
- /* Excluded from this release type: FluidSerializer */
27
-
28
- /**
29
- * @public
30
- */
31
- export declare interface IFluidSerializer {
32
- /**
33
- * Given a mostly-plain object that may have handle objects embedded within, will return a fully-plain object
34
- * where any embedded IFluidHandles have been replaced with a serializable form.
35
- *
36
- * The original `input` object is not mutated. This method will shallowly clones all objects in the path from
37
- * the root to any replaced handles. (If no handles are found, returns the original object.)
38
- */
39
- encode(value: any, bind: IFluidHandle): any;
40
- /**
41
- * Given a fully-jsonable object tree that may have encoded handle objects embedded within, will return an
42
- * equivalent object tree where any encoded IFluidHandles have been replaced with their decoded form.
43
- *
44
- * The original `input` object is not mutated. This method will shallowly clone all objects in the path from
45
- * the root to any replaced handles. (If no handles are found, returns the original object.)
46
- *
47
- * The decoded handles are implicitly bound to the handle context of this serializer.
48
- */
49
- decode(input: any): any;
50
- /**
51
- * Stringifies a given value. Converts any IFluidHandle to its stringified equivalent.
52
- */
53
- stringify(value: any, bind: IFluidHandle): string;
54
- /**
55
- * Parses the given JSON input string and returns the JavaScript object defined by it. Any Fluid
56
- * handles will be realized as part of the parse
57
- */
58
- parse(value: string): any;
59
- }
60
-
61
- /**
62
- * Base interface for shared objects from which other interfaces derive. Implemented by SharedObject
63
- * @public
64
- */
65
- export declare interface ISharedObject<TEvent extends ISharedObjectEvents = ISharedObjectEvents> extends IChannel, IEventProvider<TEvent> {
66
- /**
67
- * Binds the given shared object to its containing data store runtime, causing it to attach once
68
- * the runtime attaches.
69
- */
70
- bindToContext(): void;
71
- /**
72
- * Returns the GC data for this shared object. It contains a list of GC nodes that contains references to
73
- * other GC nodes.
74
- * @param fullGC - true to bypass optimizations and force full generation of GC data.
75
- */
76
- getGCData(fullGC?: boolean): IGarbageCollectionData;
77
- }
78
-
79
- /**
80
- * Events emitted by {@link ISharedObject}.
81
- * @public
82
- */
83
- export declare interface ISharedObjectEvents extends IErrorEvent {
84
- /**
85
- * Fires before an incoming operation (op) is applied to the shared object.
86
- *
87
- * @remarks Note: this should be considered an internal implementation detail. It is not recommended for external
88
- * use.
89
- *
90
- * @eventProperty
91
- */
92
- (event: "pre-op", listener: (op: ISequencedDocumentMessage, local: boolean, target: IEventThisPlaceHolder) => void): any;
93
- /**
94
- * Fires after an incoming op is applied to the shared object.
95
- *
96
- * @remarks Note: this should be considered an internal implementation detail. It is not recommended for external
97
- * use.
98
- *
99
- * @eventProperty
100
- */
101
- (event: "op", listener: (op: ISequencedDocumentMessage, local: boolean, target: IEventThisPlaceHolder) => void): any;
102
- }
103
-
104
- /* Excluded from this release type: makeHandlesSerializable */
105
-
106
- /* Excluded from this release type: parseHandles */
107
-
108
- /* Excluded from this release type: serializeHandles */
109
-
110
- /* Excluded from this release type: SharedObject */
111
-
112
- /* Excluded from this release type: SharedObjectCore */
113
-
114
- /* Excluded from this release type: SummarySerializer */
115
-
116
- /* Excluded from this release type: ValueType */
117
-
118
- export { }