@interopio/fdc3 2.7.0 → 2.7.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/README.md +13 -13
- package/changelog.md +200 -198
- package/dist/fdc3.electron.es.js +312 -213
- package/dist/fdc3.electron.umd.js +312 -213
- package/dist/fdc3.es.js +291 -201
- package/dist/fdc3.umd.js +291 -201
- package/license.md +9 -9
- package/package.json +2 -2
- package/types.d.ts +1 -1
package/dist/fdc3.electron.es.js
CHANGED
|
@@ -226,10 +226,10 @@ var syntax = SyntaxError;
|
|
|
226
226
|
var type = TypeError;
|
|
227
227
|
|
|
228
228
|
/** @type {import('./gOPD')} */
|
|
229
|
-
var gOPD$
|
|
229
|
+
var gOPD$5 = Object.getOwnPropertyDescriptor;
|
|
230
230
|
|
|
231
231
|
/** @type {import('.')} */
|
|
232
|
-
var $gOPD$2 = gOPD$
|
|
232
|
+
var $gOPD$2 = gOPD$5;
|
|
233
233
|
|
|
234
234
|
if ($gOPD$2) {
|
|
235
235
|
try {
|
|
@@ -319,7 +319,7 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
|
|
|
319
319
|
var hasPropertyDescriptors_1 = hasPropertyDescriptors;
|
|
320
320
|
|
|
321
321
|
var keys = objectKeys$2;
|
|
322
|
-
var hasSymbols$
|
|
322
|
+
var hasSymbols$4 = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
|
323
323
|
|
|
324
324
|
var toStr$4 = Object.prototype.toString;
|
|
325
325
|
var concat = Array.prototype.concat;
|
|
@@ -352,7 +352,7 @@ var defineProperty$1 = function (object, name, value, predicate) {
|
|
|
352
352
|
var defineProperties$1 = function (object, map) {
|
|
353
353
|
var predicates = arguments.length > 2 ? arguments[2] : {};
|
|
354
354
|
var props = keys(map);
|
|
355
|
-
if (hasSymbols$
|
|
355
|
+
if (hasSymbols$4) {
|
|
356
356
|
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
|
357
357
|
}
|
|
358
358
|
for (var i = 0; i < props.length; i += 1) {
|
|
@@ -364,7 +364,7 @@ defineProperties$1.supportsDescriptors = !!supportsDescriptors$2;
|
|
|
364
364
|
|
|
365
365
|
var defineProperties_1 = defineProperties$1;
|
|
366
366
|
|
|
367
|
-
var callBind$
|
|
367
|
+
var callBind$6 = {exports: {}};
|
|
368
368
|
|
|
369
369
|
/** @type {import('.')} */
|
|
370
370
|
var esObjectAtoms = Object;
|
|
@@ -418,11 +418,11 @@ var sign$1 = function sign(number) {
|
|
|
418
418
|
};
|
|
419
419
|
|
|
420
420
|
var shams$1;
|
|
421
|
-
var hasRequiredShams;
|
|
421
|
+
var hasRequiredShams$1;
|
|
422
422
|
|
|
423
|
-
function requireShams () {
|
|
424
|
-
if (hasRequiredShams) return shams$1;
|
|
425
|
-
hasRequiredShams = 1;
|
|
423
|
+
function requireShams$1 () {
|
|
424
|
+
if (hasRequiredShams$1) return shams$1;
|
|
425
|
+
hasRequiredShams$1 = 1;
|
|
426
426
|
|
|
427
427
|
/** @type {import('./shams')} */
|
|
428
428
|
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
@@ -471,10 +471,10 @@ function requireShams () {
|
|
|
471
471
|
}
|
|
472
472
|
|
|
473
473
|
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
474
|
-
var hasSymbolSham = requireShams();
|
|
474
|
+
var hasSymbolSham = requireShams$1();
|
|
475
475
|
|
|
476
476
|
/** @type {import('.')} */
|
|
477
|
-
var hasSymbols$
|
|
477
|
+
var hasSymbols$3 = function hasNativeSymbols() {
|
|
478
478
|
if (typeof origSymbol !== 'function') { return false; }
|
|
479
479
|
if (typeof Symbol !== 'function') { return false; }
|
|
480
480
|
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
@@ -641,16 +641,16 @@ function requireFunctionApply () {
|
|
|
641
641
|
/** @type {import('./reflectApply')} */
|
|
642
642
|
var reflectApply$1 = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
|
|
643
643
|
|
|
644
|
-
var bind$
|
|
644
|
+
var bind$3 = requireFunctionBind();
|
|
645
645
|
|
|
646
646
|
var $apply$2 = requireFunctionApply();
|
|
647
647
|
var $call$2 = requireFunctionCall();
|
|
648
648
|
var $reflectApply = reflectApply$1;
|
|
649
649
|
|
|
650
650
|
/** @type {import('./actualApply')} */
|
|
651
|
-
var actualApply$1 = $reflectApply || bind$
|
|
651
|
+
var actualApply$1 = $reflectApply || bind$3.call($call$2, $apply$2);
|
|
652
652
|
|
|
653
|
-
var bind$
|
|
653
|
+
var bind$2 = requireFunctionBind();
|
|
654
654
|
var $TypeError$a = type;
|
|
655
655
|
|
|
656
656
|
var $call$1 = requireFunctionCall();
|
|
@@ -661,70 +661,97 @@ var callBindApplyHelpers = function callBindBasic(args) {
|
|
|
661
661
|
if (args.length < 1 || typeof args[0] !== 'function') {
|
|
662
662
|
throw new $TypeError$a('a function is required');
|
|
663
663
|
}
|
|
664
|
-
return $actualApply(bind$
|
|
664
|
+
return $actualApply(bind$2, $call$1, args);
|
|
665
665
|
};
|
|
666
666
|
|
|
667
|
-
var
|
|
668
|
-
var
|
|
667
|
+
var get;
|
|
668
|
+
var hasRequiredGet;
|
|
669
669
|
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
670
|
+
function requireGet () {
|
|
671
|
+
if (hasRequiredGet) return get;
|
|
672
|
+
hasRequiredGet = 1;
|
|
673
|
+
|
|
674
|
+
var callBind = callBindApplyHelpers;
|
|
675
|
+
var gOPD = gopd$1;
|
|
676
|
+
|
|
677
|
+
var hasProtoAccessor;
|
|
678
|
+
try {
|
|
679
|
+
// eslint-disable-next-line no-extra-parens, no-proto
|
|
680
|
+
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
|
|
681
|
+
} catch (e) {
|
|
682
|
+
if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
|
|
683
|
+
throw e;
|
|
684
|
+
}
|
|
677
685
|
}
|
|
678
|
-
}
|
|
679
686
|
|
|
680
|
-
// eslint-disable-next-line no-extra-parens
|
|
681
|
-
var desc = !!hasProtoAccessor && gOPD
|
|
687
|
+
// eslint-disable-next-line no-extra-parens
|
|
688
|
+
var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
|
|
682
689
|
|
|
683
|
-
var $Object
|
|
684
|
-
var $getPrototypeOf = $Object
|
|
690
|
+
var $Object = Object;
|
|
691
|
+
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
685
692
|
|
|
686
|
-
/** @type {import('./get')} */
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
693
|
+
/** @type {import('./get')} */
|
|
694
|
+
get = desc && typeof desc.get === 'function'
|
|
695
|
+
? callBind([desc.get])
|
|
696
|
+
: typeof $getPrototypeOf === 'function'
|
|
697
|
+
? /** @type {import('./get')} */ function getDunder(value) {
|
|
698
|
+
// eslint-disable-next-line eqeqeq
|
|
699
|
+
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
700
|
+
}
|
|
701
|
+
: false;
|
|
702
|
+
return get;
|
|
703
|
+
}
|
|
695
704
|
|
|
696
|
-
var
|
|
697
|
-
var
|
|
705
|
+
var getProto$3;
|
|
706
|
+
var hasRequiredGetProto;
|
|
698
707
|
|
|
699
|
-
|
|
708
|
+
function requireGetProto () {
|
|
709
|
+
if (hasRequiredGetProto) return getProto$3;
|
|
710
|
+
hasRequiredGetProto = 1;
|
|
700
711
|
|
|
701
|
-
|
|
702
|
-
var
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
}
|
|
707
|
-
|
|
712
|
+
var reflectGetProto = requireReflect_getPrototypeOf();
|
|
713
|
+
var originalGetProto = requireObject_getPrototypeOf();
|
|
714
|
+
|
|
715
|
+
var getDunderProto = requireGet();
|
|
716
|
+
|
|
717
|
+
/** @type {import('.')} */
|
|
718
|
+
getProto$3 = reflectGetProto
|
|
708
719
|
? function getProto(O) {
|
|
709
|
-
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
|
|
710
|
-
throw new TypeError('getProto: not an object');
|
|
711
|
-
}
|
|
712
720
|
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
713
|
-
return
|
|
721
|
+
return reflectGetProto(O);
|
|
714
722
|
}
|
|
715
|
-
:
|
|
723
|
+
: originalGetProto
|
|
716
724
|
? function getProto(O) {
|
|
725
|
+
if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
|
|
726
|
+
throw new TypeError('getProto: not an object');
|
|
727
|
+
}
|
|
717
728
|
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
718
|
-
return
|
|
729
|
+
return originalGetProto(O);
|
|
719
730
|
}
|
|
720
|
-
:
|
|
731
|
+
: getDunderProto
|
|
732
|
+
? function getProto(O) {
|
|
733
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
734
|
+
return getDunderProto(O);
|
|
735
|
+
}
|
|
736
|
+
: null;
|
|
737
|
+
return getProto$3;
|
|
738
|
+
}
|
|
721
739
|
|
|
722
|
-
var
|
|
723
|
-
var
|
|
724
|
-
var bind$2 = requireFunctionBind();
|
|
740
|
+
var hasown;
|
|
741
|
+
var hasRequiredHasown;
|
|
725
742
|
|
|
726
|
-
|
|
727
|
-
|
|
743
|
+
function requireHasown () {
|
|
744
|
+
if (hasRequiredHasown) return hasown;
|
|
745
|
+
hasRequiredHasown = 1;
|
|
746
|
+
|
|
747
|
+
var call = Function.prototype.call;
|
|
748
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
749
|
+
var bind = requireFunctionBind();
|
|
750
|
+
|
|
751
|
+
/** @type {import('.')} */
|
|
752
|
+
hasown = bind.call(call, $hasOwn);
|
|
753
|
+
return hasown;
|
|
754
|
+
}
|
|
728
755
|
|
|
729
756
|
var undefined$1;
|
|
730
757
|
|
|
@@ -778,9 +805,9 @@ var ThrowTypeError = $gOPD$1
|
|
|
778
805
|
}())
|
|
779
806
|
: throwTypeError;
|
|
780
807
|
|
|
781
|
-
var hasSymbols$
|
|
808
|
+
var hasSymbols$2 = hasSymbols$3();
|
|
782
809
|
|
|
783
|
-
var getProto$2 =
|
|
810
|
+
var getProto$2 = requireGetProto();
|
|
784
811
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
785
812
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
786
813
|
|
|
@@ -796,7 +823,7 @@ var INTRINSICS = {
|
|
|
796
823
|
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
797
824
|
'%Array%': Array,
|
|
798
825
|
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
799
|
-
'%ArrayIteratorPrototype%': hasSymbols$
|
|
826
|
+
'%ArrayIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$1,
|
|
800
827
|
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
801
828
|
'%AsyncFunction%': needsEval,
|
|
802
829
|
'%AsyncGenerator%': needsEval,
|
|
@@ -827,10 +854,10 @@ var INTRINSICS = {
|
|
|
827
854
|
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
828
855
|
'%isFinite%': isFinite,
|
|
829
856
|
'%isNaN%': isNaN,
|
|
830
|
-
'%IteratorPrototype%': hasSymbols$
|
|
857
|
+
'%IteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$1,
|
|
831
858
|
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
832
859
|
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
833
|
-
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$
|
|
860
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Map()[Symbol.iterator]()),
|
|
834
861
|
'%Math%': Math,
|
|
835
862
|
'%Number%': Number,
|
|
836
863
|
'%Object%': $Object$2,
|
|
@@ -844,11 +871,11 @@ var INTRINSICS = {
|
|
|
844
871
|
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
845
872
|
'%RegExp%': RegExp,
|
|
846
873
|
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
847
|
-
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$
|
|
874
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$1 : getProto$2(new Set()[Symbol.iterator]()),
|
|
848
875
|
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
849
876
|
'%String%': String,
|
|
850
|
-
'%StringIteratorPrototype%': hasSymbols$
|
|
851
|
-
'%Symbol%': hasSymbols$
|
|
877
|
+
'%StringIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$1,
|
|
878
|
+
'%Symbol%': hasSymbols$2 ? Symbol : undefined$1,
|
|
852
879
|
'%SyntaxError%': $SyntaxError$1,
|
|
853
880
|
'%ThrowTypeError%': ThrowTypeError,
|
|
854
881
|
'%TypedArray%': TypedArray,
|
|
@@ -967,7 +994,7 @@ var LEGACY_ALIASES = {
|
|
|
967
994
|
};
|
|
968
995
|
|
|
969
996
|
var bind$1 = requireFunctionBind();
|
|
970
|
-
var hasOwn$3 =
|
|
997
|
+
var hasOwn$3 = requireHasown();
|
|
971
998
|
var $concat$1 = bind$1.call($call, Array.prototype.concat);
|
|
972
999
|
var $spliceApply = bind$1.call($apply$1, Array.prototype.splice);
|
|
973
1000
|
var $replace$1 = bind$1.call($call, String.prototype.replace);
|
|
@@ -1177,9 +1204,9 @@ var applyBind = function applyBind() {
|
|
|
1177
1204
|
} else {
|
|
1178
1205
|
module.exports.apply = applyBind$1;
|
|
1179
1206
|
}
|
|
1180
|
-
} (callBind$
|
|
1207
|
+
} (callBind$6));
|
|
1181
1208
|
|
|
1182
|
-
var callBindExports = callBind$
|
|
1209
|
+
var callBindExports = callBind$6.exports;
|
|
1183
1210
|
|
|
1184
1211
|
var GetIntrinsic$7 = getIntrinsic;
|
|
1185
1212
|
|
|
@@ -1189,7 +1216,7 @@ var callBindBasic = callBindApplyHelpers;
|
|
|
1189
1216
|
var $indexOf$2 = callBindBasic([GetIntrinsic$7('%String.prototype.indexOf%')]);
|
|
1190
1217
|
|
|
1191
1218
|
/** @type {import('.')} */
|
|
1192
|
-
var callBound$
|
|
1219
|
+
var callBound$h = function callBoundIntrinsic(name, allowMissing) {
|
|
1193
1220
|
/* eslint no-extra-parens: 0 */
|
|
1194
1221
|
|
|
1195
1222
|
var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic$7(name, !!allowMissing));
|
|
@@ -1201,12 +1228,12 @@ var callBound$i = function callBoundIntrinsic(name, allowMissing) {
|
|
|
1201
1228
|
|
|
1202
1229
|
// modified from https://github.com/es-shims/es6-shim
|
|
1203
1230
|
var objectKeys$1 = objectKeys$2;
|
|
1204
|
-
var hasSymbols$
|
|
1205
|
-
var callBound$
|
|
1231
|
+
var hasSymbols$1 = requireShams$1()();
|
|
1232
|
+
var callBound$g = callBound$h;
|
|
1206
1233
|
var $Object$1 = esObjectAtoms;
|
|
1207
|
-
var $push = callBound$
|
|
1208
|
-
var $propIsEnumerable = callBound$
|
|
1209
|
-
var originalGetSymbols = hasSymbols$
|
|
1234
|
+
var $push = callBound$g('Array.prototype.push');
|
|
1235
|
+
var $propIsEnumerable = callBound$g('Object.prototype.propertyIsEnumerable');
|
|
1236
|
+
var originalGetSymbols = hasSymbols$1 ? $Object$1.getOwnPropertySymbols : null;
|
|
1210
1237
|
|
|
1211
1238
|
// eslint-disable-next-line no-unused-vars
|
|
1212
1239
|
var implementation$8 = function assign(target, source1) {
|
|
@@ -1220,7 +1247,7 @@ var implementation$8 = function assign(target, source1) {
|
|
|
1220
1247
|
|
|
1221
1248
|
// step 3.a.ii:
|
|
1222
1249
|
var keys = objectKeys$1(from);
|
|
1223
|
-
var getSymbols = hasSymbols$
|
|
1250
|
+
var getSymbols = hasSymbols$1 && ($Object$1.getOwnPropertySymbols || originalGetSymbols);
|
|
1224
1251
|
if (getSymbols) {
|
|
1225
1252
|
var syms = getSymbols(from);
|
|
1226
1253
|
for (var j = 0; j < syms.length; ++j) {
|
|
@@ -1338,7 +1365,7 @@ var callBind$4 = callBindExports;
|
|
|
1338
1365
|
|
|
1339
1366
|
var $indexOf$1 = callBind$4(GetIntrinsic$6('String.prototype.indexOf'));
|
|
1340
1367
|
|
|
1341
|
-
var callBound$
|
|
1368
|
+
var callBound$f = function callBoundIntrinsic(name, allowMissing) {
|
|
1342
1369
|
var intrinsic = GetIntrinsic$6(name, !!allowMissing);
|
|
1343
1370
|
if (typeof intrinsic === 'function' && $indexOf$1(name, '.prototype.') > -1) {
|
|
1344
1371
|
return callBind$4(intrinsic);
|
|
@@ -1478,7 +1505,7 @@ var getPolyfill$3 = polyfill$2;
|
|
|
1478
1505
|
var gOPD$2 = gopd$1;
|
|
1479
1506
|
var defineProperty = Object.defineProperty;
|
|
1480
1507
|
var $TypeError$5 = esErrors;
|
|
1481
|
-
var getProto$1 =
|
|
1508
|
+
var getProto$1 = requireGetProto();
|
|
1482
1509
|
var regex = /a/;
|
|
1483
1510
|
|
|
1484
1511
|
var shim$3 = function shimFlags() {
|
|
@@ -1517,29 +1544,38 @@ var regexp_prototype_flags = flagsBound;
|
|
|
1517
1544
|
|
|
1518
1545
|
var esGetIterator = {exports: {}};
|
|
1519
1546
|
|
|
1520
|
-
var
|
|
1547
|
+
var shams;
|
|
1548
|
+
var hasRequiredShams;
|
|
1521
1549
|
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
};
|
|
1550
|
+
function requireShams () {
|
|
1551
|
+
if (hasRequiredShams) return shams;
|
|
1552
|
+
hasRequiredShams = 1;
|
|
1526
1553
|
|
|
1527
|
-
var
|
|
1528
|
-
var callBound$f = callBound$i;
|
|
1554
|
+
var hasSymbols = requireShams$1();
|
|
1529
1555
|
|
|
1530
|
-
|
|
1556
|
+
/** @type {import('.')} */
|
|
1557
|
+
shams = function hasToStringTagShams() {
|
|
1558
|
+
return hasSymbols() && !!Symbol.toStringTag;
|
|
1559
|
+
};
|
|
1560
|
+
return shams;
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
var hasToStringTag$6 = requireShams()();
|
|
1564
|
+
var callBound$e = callBound$h;
|
|
1565
|
+
|
|
1566
|
+
var $toString$6 = callBound$e('Object.prototype.toString');
|
|
1531
1567
|
|
|
1532
1568
|
/** @type {import('.')} */
|
|
1533
1569
|
var isStandardArguments = function isArguments(value) {
|
|
1534
1570
|
if (
|
|
1535
|
-
hasToStringTag$
|
|
1571
|
+
hasToStringTag$6
|
|
1536
1572
|
&& value
|
|
1537
1573
|
&& typeof value === 'object'
|
|
1538
1574
|
&& Symbol.toStringTag in value
|
|
1539
1575
|
) {
|
|
1540
1576
|
return false;
|
|
1541
1577
|
}
|
|
1542
|
-
return $toString$
|
|
1578
|
+
return $toString$6(value) === '[object Arguments]';
|
|
1543
1579
|
};
|
|
1544
1580
|
|
|
1545
1581
|
/** @type {import('.')} */
|
|
@@ -1552,9 +1588,9 @@ var isLegacyArguments = function isArguments(value) {
|
|
|
1552
1588
|
&& 'length' in value
|
|
1553
1589
|
&& typeof value.length === 'number'
|
|
1554
1590
|
&& value.length >= 0
|
|
1555
|
-
&& $toString$
|
|
1591
|
+
&& $toString$6(value) !== '[object Array]'
|
|
1556
1592
|
&& 'callee' in value
|
|
1557
|
-
&& $toString$
|
|
1593
|
+
&& $toString$6(value.callee) === '[object Function]';
|
|
1558
1594
|
};
|
|
1559
1595
|
|
|
1560
1596
|
var supportsStandardArguments = (function () {
|
|
@@ -2234,22 +2270,22 @@ var sideChannelList = function getSideChannelList() {
|
|
|
2234
2270
|
};
|
|
2235
2271
|
|
|
2236
2272
|
var GetIntrinsic$5 = getIntrinsic;
|
|
2237
|
-
var callBound$
|
|
2273
|
+
var callBound$d = callBound$h;
|
|
2238
2274
|
var inspect$2 = objectInspect;
|
|
2239
2275
|
|
|
2240
2276
|
var $TypeError$3 = type;
|
|
2241
2277
|
var $Map$3 = GetIntrinsic$5('%Map%', true);
|
|
2242
2278
|
|
|
2243
2279
|
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */
|
|
2244
|
-
var $mapGet$1 = callBound$
|
|
2280
|
+
var $mapGet$1 = callBound$d('Map.prototype.get', true);
|
|
2245
2281
|
/** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */
|
|
2246
|
-
var $mapSet = callBound$
|
|
2282
|
+
var $mapSet = callBound$d('Map.prototype.set', true);
|
|
2247
2283
|
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
|
|
2248
|
-
var $mapHas$5 = callBound$
|
|
2284
|
+
var $mapHas$5 = callBound$d('Map.prototype.has', true);
|
|
2249
2285
|
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
|
|
2250
|
-
var $mapDelete = callBound$
|
|
2286
|
+
var $mapDelete = callBound$d('Map.prototype.delete', true);
|
|
2251
2287
|
/** @type {<K, V>(thisArg: Map<K, V>) => number} */
|
|
2252
|
-
var $mapSize$1 = callBound$
|
|
2288
|
+
var $mapSize$1 = callBound$d('Map.prototype.size', true);
|
|
2253
2289
|
|
|
2254
2290
|
/** @type {import('.')} */
|
|
2255
2291
|
var sideChannelMap = !!$Map$3 && /** @type {Exclude<import('.'), false>} */ function getSideChannelMap() {
|
|
@@ -2301,7 +2337,7 @@ var sideChannelMap = !!$Map$3 && /** @type {Exclude<import('.'), false>} */ func
|
|
|
2301
2337
|
};
|
|
2302
2338
|
|
|
2303
2339
|
var GetIntrinsic$4 = getIntrinsic;
|
|
2304
|
-
var callBound$
|
|
2340
|
+
var callBound$c = callBound$h;
|
|
2305
2341
|
var inspect$1 = objectInspect;
|
|
2306
2342
|
var getSideChannelMap$1 = sideChannelMap;
|
|
2307
2343
|
|
|
@@ -2309,13 +2345,13 @@ var $TypeError$2 = type;
|
|
|
2309
2345
|
var $WeakMap$1 = GetIntrinsic$4('%WeakMap%', true);
|
|
2310
2346
|
|
|
2311
2347
|
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => V} */
|
|
2312
|
-
var $weakMapGet = callBound$
|
|
2348
|
+
var $weakMapGet = callBound$c('WeakMap.prototype.get', true);
|
|
2313
2349
|
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K, value: V) => void} */
|
|
2314
|
-
var $weakMapSet = callBound$
|
|
2350
|
+
var $weakMapSet = callBound$c('WeakMap.prototype.set', true);
|
|
2315
2351
|
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
|
|
2316
|
-
var $weakMapHas = callBound$
|
|
2352
|
+
var $weakMapHas = callBound$c('WeakMap.prototype.has', true);
|
|
2317
2353
|
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
|
|
2318
|
-
var $weakMapDelete = callBound$
|
|
2354
|
+
var $weakMapDelete = callBound$c('WeakMap.prototype.delete', true);
|
|
2319
2355
|
|
|
2320
2356
|
/** @type {import('.')} */
|
|
2321
2357
|
var sideChannelWeakmap = $WeakMap$1
|
|
@@ -2428,7 +2464,7 @@ var sideChannel = function getSideChannel() {
|
|
|
2428
2464
|
/** @typedef {`$${import('.').InternalSlot}`} SaltedInternalSlot */
|
|
2429
2465
|
/** @typedef {{ [k in SaltedInternalSlot]?: unknown }} SlotsObject */
|
|
2430
2466
|
|
|
2431
|
-
var hasOwn$1 =
|
|
2467
|
+
var hasOwn$1 = requireHasown();
|
|
2432
2468
|
/** @type {import('side-channel').Channel<object, SlotsObject>} */
|
|
2433
2469
|
var channel = sideChannel();
|
|
2434
2470
|
|
|
@@ -2544,35 +2580,44 @@ var isarray = Array.isArray || function (arr) {
|
|
|
2544
2580
|
return toString.call(arr) == '[object Array]';
|
|
2545
2581
|
};
|
|
2546
2582
|
|
|
2547
|
-
var
|
|
2583
|
+
var isString$2;
|
|
2584
|
+
var hasRequiredIsString;
|
|
2548
2585
|
|
|
2549
|
-
|
|
2550
|
-
|
|
2586
|
+
function requireIsString () {
|
|
2587
|
+
if (hasRequiredIsString) return isString$2;
|
|
2588
|
+
hasRequiredIsString = 1;
|
|
2551
2589
|
|
|
2552
|
-
|
|
2553
|
-
var tryStringObject = function tryStringObject(value) {
|
|
2554
|
-
try {
|
|
2555
|
-
$strValueOf(value);
|
|
2556
|
-
return true;
|
|
2557
|
-
} catch (e) {
|
|
2558
|
-
return false;
|
|
2559
|
-
}
|
|
2560
|
-
};
|
|
2561
|
-
/** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
|
|
2562
|
-
var $toString$6 = callBound$c('Object.prototype.toString');
|
|
2563
|
-
var strClass = '[object String]';
|
|
2564
|
-
var hasToStringTag$6 = shams();
|
|
2590
|
+
var callBound = callBound$h;
|
|
2565
2591
|
|
|
2566
|
-
/** @type {
|
|
2567
|
-
var
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2592
|
+
/** @type {(receiver: ThisParameterType<typeof String.prototype.valueOf>, ...args: Parameters<typeof String.prototype.valueOf>) => ReturnType<typeof String.prototype.valueOf>} */
|
|
2593
|
+
var $strValueOf = callBound('String.prototype.valueOf');
|
|
2594
|
+
|
|
2595
|
+
/** @type {import('.')} */
|
|
2596
|
+
var tryStringObject = function tryStringObject(value) {
|
|
2597
|
+
try {
|
|
2598
|
+
$strValueOf(value);
|
|
2599
|
+
return true;
|
|
2600
|
+
} catch (e) {
|
|
2601
|
+
return false;
|
|
2602
|
+
}
|
|
2603
|
+
};
|
|
2604
|
+
/** @type {(receiver: ThisParameterType<typeof Object.prototype.toString>, ...args: Parameters<typeof Object.prototype.toString>) => ReturnType<typeof Object.prototype.toString>} */
|
|
2605
|
+
var $toString = callBound('Object.prototype.toString');
|
|
2606
|
+
var strClass = '[object String]';
|
|
2607
|
+
var hasToStringTag = requireShams()();
|
|
2608
|
+
|
|
2609
|
+
/** @type {import('.')} */
|
|
2610
|
+
isString$2 = function isString(value) {
|
|
2611
|
+
if (typeof value === 'string') {
|
|
2612
|
+
return true;
|
|
2613
|
+
}
|
|
2614
|
+
if (!value || typeof value !== 'object') {
|
|
2615
|
+
return false;
|
|
2616
|
+
}
|
|
2617
|
+
return hasToStringTag ? tryStringObject(value) : $toString(value) === strClass;
|
|
2618
|
+
};
|
|
2619
|
+
return isString$2;
|
|
2620
|
+
}
|
|
2576
2621
|
|
|
2577
2622
|
/** @const */
|
|
2578
2623
|
var $Map$2 = typeof Map === 'function' && Map.prototype ? Map : null;
|
|
@@ -2677,7 +2722,7 @@ var isSet$2 = exported$1 || function isSet(x) {
|
|
|
2677
2722
|
var isArguments$1 = isArguments$2;
|
|
2678
2723
|
var getStopIterationIterator = stopIterationIterator;
|
|
2679
2724
|
|
|
2680
|
-
if (hasSymbols$
|
|
2725
|
+
if (hasSymbols$3() || requireShams$1()()) {
|
|
2681
2726
|
var $iterator = Symbol.iterator;
|
|
2682
2727
|
// Symbol is available natively or shammed
|
|
2683
2728
|
// natively:
|
|
@@ -2700,11 +2745,11 @@ if (hasSymbols$4() || requireShams()()) {
|
|
|
2700
2745
|
} else {
|
|
2701
2746
|
// Symbol is not available, native or shammed
|
|
2702
2747
|
var isArray$2 = isarray;
|
|
2703
|
-
var isString$1 =
|
|
2748
|
+
var isString$1 = requireIsString();
|
|
2704
2749
|
var GetIntrinsic$3 = getIntrinsic;
|
|
2705
2750
|
var $Map = GetIntrinsic$3('%Map%', true);
|
|
2706
2751
|
var $Set$1 = GetIntrinsic$3('%Set%', true);
|
|
2707
|
-
var callBound$b = callBound$
|
|
2752
|
+
var callBound$b = callBound$f;
|
|
2708
2753
|
var $arrayPush = callBound$b('Array.prototype.push');
|
|
2709
2754
|
var $charCodeAt = callBound$b('String.prototype.charCodeAt');
|
|
2710
2755
|
var $stringSlice = callBound$b('String.prototype.slice');
|
|
@@ -2909,7 +2954,7 @@ define(polyfill, {
|
|
|
2909
2954
|
var objectIs = polyfill;
|
|
2910
2955
|
|
|
2911
2956
|
var callBind$1 = callBindExports;
|
|
2912
|
-
var callBound$a = callBound$
|
|
2957
|
+
var callBound$a = callBound$h;
|
|
2913
2958
|
var GetIntrinsic$2 = getIntrinsic;
|
|
2914
2959
|
|
|
2915
2960
|
var $ArrayBuffer = GetIntrinsic$2('%ArrayBuffer%', true);
|
|
@@ -2950,7 +2995,7 @@ var isArrayBuffer$2 = $byteLength$2 || $abSlice
|
|
|
2950
2995
|
return false;
|
|
2951
2996
|
};
|
|
2952
2997
|
|
|
2953
|
-
var callBound$9 = callBound$
|
|
2998
|
+
var callBound$9 = callBound$h;
|
|
2954
2999
|
|
|
2955
3000
|
var getDay = callBound$9('Date.prototype.getDay');
|
|
2956
3001
|
/** @type {import('.')} */
|
|
@@ -2966,7 +3011,7 @@ var tryDateObject = function tryDateGetDayCall(value) {
|
|
|
2966
3011
|
/** @type {(value: unknown) => string} */
|
|
2967
3012
|
var toStr$2 = callBound$9('Object.prototype.toString');
|
|
2968
3013
|
var dateClass = '[object Date]';
|
|
2969
|
-
var hasToStringTag$5 =
|
|
3014
|
+
var hasToStringTag$5 = requireShams()();
|
|
2970
3015
|
|
|
2971
3016
|
/** @type {import('.')} */
|
|
2972
3017
|
var isDateObject = function isDateObject(value) {
|
|
@@ -2976,9 +3021,9 @@ var isDateObject = function isDateObject(value) {
|
|
|
2976
3021
|
return hasToStringTag$5 ? tryDateObject(value) : toStr$2(value) === dateClass;
|
|
2977
3022
|
};
|
|
2978
3023
|
|
|
2979
|
-
var callBound$8 = callBound$
|
|
2980
|
-
var hasToStringTag$4 =
|
|
2981
|
-
var hasOwn =
|
|
3024
|
+
var callBound$8 = callBound$h;
|
|
3025
|
+
var hasToStringTag$4 = requireShams()();
|
|
3026
|
+
var hasOwn = requireHasown();
|
|
2982
3027
|
var gOPD$1 = gopd$1;
|
|
2983
3028
|
|
|
2984
3029
|
/** @type {import('.')} */
|
|
@@ -3044,7 +3089,7 @@ if (hasToStringTag$4) {
|
|
|
3044
3089
|
|
|
3045
3090
|
var isRegex$1 = fn;
|
|
3046
3091
|
|
|
3047
|
-
var callBound$7 = callBound$
|
|
3092
|
+
var callBound$7 = callBound$h;
|
|
3048
3093
|
|
|
3049
3094
|
/** @type {undefined | ((thisArg: SharedArrayBuffer) => number)} */
|
|
3050
3095
|
var $byteLength$1 = callBound$7('SharedArrayBuffer.prototype.byteLength', true);
|
|
@@ -3067,7 +3112,7 @@ var isSharedArrayBuffer$1 = $byteLength$1
|
|
|
3067
3112
|
return false;
|
|
3068
3113
|
};
|
|
3069
3114
|
|
|
3070
|
-
var callBound$6 = callBound$
|
|
3115
|
+
var callBound$6 = callBound$h;
|
|
3071
3116
|
|
|
3072
3117
|
var $numToStr = callBound$6('Number.prototype.toString');
|
|
3073
3118
|
|
|
@@ -3082,7 +3127,7 @@ var tryNumberObject = function tryNumberObject(value) {
|
|
|
3082
3127
|
};
|
|
3083
3128
|
var $toString$3 = callBound$6('Object.prototype.toString');
|
|
3084
3129
|
var numClass = '[object Number]';
|
|
3085
|
-
var hasToStringTag$3 =
|
|
3130
|
+
var hasToStringTag$3 = requireShams()();
|
|
3086
3131
|
|
|
3087
3132
|
/** @type {import('.')} */
|
|
3088
3133
|
var isNumberObject = function isNumberObject(value) {
|
|
@@ -3095,7 +3140,7 @@ var isNumberObject = function isNumberObject(value) {
|
|
|
3095
3140
|
return hasToStringTag$3 ? tryNumberObject(value) : $toString$3(value) === numClass;
|
|
3096
3141
|
};
|
|
3097
3142
|
|
|
3098
|
-
var callBound$5 = callBound$
|
|
3143
|
+
var callBound$5 = callBound$h;
|
|
3099
3144
|
var $boolToStr = callBound$5('Boolean.prototype.toString');
|
|
3100
3145
|
var $toString$2 = callBound$5('Object.prototype.toString');
|
|
3101
3146
|
|
|
@@ -3109,7 +3154,7 @@ var tryBooleanObject = function booleanBrandCheck(value) {
|
|
|
3109
3154
|
}
|
|
3110
3155
|
};
|
|
3111
3156
|
var boolClass = '[object Boolean]';
|
|
3112
|
-
var hasToStringTag$2 =
|
|
3157
|
+
var hasToStringTag$2 = requireShams()();
|
|
3113
3158
|
|
|
3114
3159
|
/** @type {import('.')} */
|
|
3115
3160
|
var isBooleanObject = function isBoolean(value) {
|
|
@@ -3131,7 +3176,7 @@ function requireSafeRegexTest () {
|
|
|
3131
3176
|
if (hasRequiredSafeRegexTest) return safeRegexTest$1;
|
|
3132
3177
|
hasRequiredSafeRegexTest = 1;
|
|
3133
3178
|
|
|
3134
|
-
var callBound = callBound$
|
|
3179
|
+
var callBound = callBound$h;
|
|
3135
3180
|
var isRegex = isRegex$1;
|
|
3136
3181
|
|
|
3137
3182
|
var $exec = callBound('RegExp.prototype.exec');
|
|
@@ -3149,9 +3194,9 @@ function requireSafeRegexTest () {
|
|
|
3149
3194
|
return safeRegexTest$1;
|
|
3150
3195
|
}
|
|
3151
3196
|
|
|
3152
|
-
var callBound$4 = callBound$
|
|
3197
|
+
var callBound$4 = callBound$h;
|
|
3153
3198
|
var $toString$1 = callBound$4('Object.prototype.toString');
|
|
3154
|
-
var hasSymbols = hasSymbols$
|
|
3199
|
+
var hasSymbols = hasSymbols$3();
|
|
3155
3200
|
var safeRegexTest = requireSafeRegexTest();
|
|
3156
3201
|
|
|
3157
3202
|
if (hasSymbols) {
|
|
@@ -3244,7 +3289,7 @@ if (hasBigInts) {
|
|
|
3244
3289
|
|
|
3245
3290
|
var isBigintExports = isBigint.exports;
|
|
3246
3291
|
|
|
3247
|
-
var isString =
|
|
3292
|
+
var isString = requireIsString();
|
|
3248
3293
|
var isNumber = isNumberObject;
|
|
3249
3294
|
var isBoolean = isBooleanObject;
|
|
3250
3295
|
var isSymbol = isSymbolExports;
|
|
@@ -3322,7 +3367,7 @@ var isWeakmap = exported || function isWeakMap(x) {
|
|
|
3322
3367
|
var isWeakset = {exports: {}};
|
|
3323
3368
|
|
|
3324
3369
|
var GetIntrinsic$1 = getIntrinsic;
|
|
3325
|
-
var callBound$3 = callBound$
|
|
3370
|
+
var callBound$3 = callBound$h;
|
|
3326
3371
|
|
|
3327
3372
|
var $WeakSet = GetIntrinsic$1('%WeakSet%', true);
|
|
3328
3373
|
|
|
@@ -3592,12 +3637,12 @@ var availableTypedArrays$1 = function availableTypedArrays() {
|
|
|
3592
3637
|
var forEach = forEach$1;
|
|
3593
3638
|
var availableTypedArrays = availableTypedArrays$1;
|
|
3594
3639
|
var callBind = callBindExports;
|
|
3595
|
-
var callBound$2 = callBound$
|
|
3640
|
+
var callBound$2 = callBound$h;
|
|
3596
3641
|
var gOPD = gopd$1;
|
|
3597
|
-
var getProto =
|
|
3642
|
+
var getProto = requireGetProto();
|
|
3598
3643
|
|
|
3599
3644
|
var $toString = callBound$2('Object.prototype.toString');
|
|
3600
|
-
var hasToStringTag =
|
|
3645
|
+
var hasToStringTag = requireShams()();
|
|
3601
3646
|
|
|
3602
3647
|
var g = typeof globalThis === 'undefined' ? commonjsGlobal : globalThis;
|
|
3603
3648
|
var typedArrays = availableTypedArrays();
|
|
@@ -3705,7 +3750,7 @@ var whichTypedArray$1 = function whichTypedArray(value) {
|
|
|
3705
3750
|
return tryTypedArrays(value);
|
|
3706
3751
|
};
|
|
3707
3752
|
|
|
3708
|
-
var callBound$1 = callBound$
|
|
3753
|
+
var callBound$1 = callBound$h;
|
|
3709
3754
|
var $byteLength = callBound$1('ArrayBuffer.prototype.byteLength', true);
|
|
3710
3755
|
|
|
3711
3756
|
var isArrayBuffer$1 = isArrayBuffer$2;
|
|
@@ -3719,7 +3764,7 @@ var arrayBufferByteLength = function byteLength(ab) {
|
|
|
3719
3764
|
}; // in node < 0.11, byteLength is an own nonconfigurable property
|
|
3720
3765
|
|
|
3721
3766
|
var assign = object_assign;
|
|
3722
|
-
var callBound = callBound$
|
|
3767
|
+
var callBound = callBound$f;
|
|
3723
3768
|
var flags = regexp_prototype_flags;
|
|
3724
3769
|
var GetIntrinsic = getIntrinsic;
|
|
3725
3770
|
var getIterator = esGetIteratorExports;
|
|
@@ -5344,7 +5389,7 @@ var ChannelTypes;
|
|
|
5344
5389
|
})(ChannelTypes || (ChannelTypes = {}));
|
|
5345
5390
|
const defaultChannelsProps = ["id", "type", "broadcast", "addContextListener", "getCurrentContext"];
|
|
5346
5391
|
const defaultContextProps = ["type"];
|
|
5347
|
-
const defaultGlue42APIs = ["contexts", "channels", "interop", "intents", "
|
|
5392
|
+
const defaultGlue42APIs = ["contexts", "channels", "interop", "intents", "windows"];
|
|
5348
5393
|
const glueChannelNamePrefix = "___channel___";
|
|
5349
5394
|
const fdc3NothingContextType = "fdc3.nothing";
|
|
5350
5395
|
const RaiseTimeoutMs = 75 * 1000;
|
|
@@ -6261,22 +6306,50 @@ class GlueController {
|
|
|
6261
6306
|
if (missingApis.length) {
|
|
6262
6307
|
return { isValid: false, error: { message: `Fdc3 cannot initialize correctly - Glue is missing the following ${missingApis.length > 1 ? "properties" : "property"}: ${missingApis.join(", ")}` } };
|
|
6263
6308
|
}
|
|
6309
|
+
if (typeof glue.apps !== "object" && typeof glue.appManager !== "object") {
|
|
6310
|
+
return { isValid: false, error: { message: "Glue should be initialized with either 'apps' or 'appManager' API" } };
|
|
6311
|
+
}
|
|
6264
6312
|
return { isValid: true };
|
|
6265
6313
|
}
|
|
6266
6314
|
interopInstance() {
|
|
6267
6315
|
return this.glue.interop.instance;
|
|
6268
6316
|
}
|
|
6269
|
-
getApplication(name) {
|
|
6270
|
-
|
|
6317
|
+
async getApplication(name) {
|
|
6318
|
+
const isAppsAPIAvailable = this.isAppsAPIAvailable();
|
|
6319
|
+
if (!isAppsAPIAvailable) {
|
|
6320
|
+
return this.glue.appManager.application(name);
|
|
6321
|
+
}
|
|
6322
|
+
const app = await this.glue.apps.registry.get({ name });
|
|
6323
|
+
return app ?? undefined;
|
|
6271
6324
|
}
|
|
6272
|
-
|
|
6273
|
-
|
|
6325
|
+
async getApplicationInstances(appName) {
|
|
6326
|
+
const isAppsAPIAvailable = this.isAppsAPIAvailable();
|
|
6327
|
+
if (!isAppsAPIAvailable) {
|
|
6328
|
+
return this.glue.appManager.instances().filter(inst => inst.application.name === appName);
|
|
6329
|
+
}
|
|
6330
|
+
const appInstances = await this.glue.apps.instances.getMany({ appNames: [appName] });
|
|
6331
|
+
return appInstances;
|
|
6274
6332
|
}
|
|
6275
|
-
|
|
6276
|
-
|
|
6333
|
+
async getAppInstanceById(id) {
|
|
6334
|
+
const isAppsAPIAvailable = this.isAppsAPIAvailable();
|
|
6335
|
+
if (!isAppsAPIAvailable) {
|
|
6336
|
+
return this.glue.appManager.instances().find(inst => inst.id === id);
|
|
6337
|
+
}
|
|
6338
|
+
const appInstance = await this.glue.apps.instances.get({ id });
|
|
6339
|
+
return appInstance ?? undefined;
|
|
6277
6340
|
}
|
|
6278
|
-
|
|
6279
|
-
|
|
6341
|
+
async startApplication({ app, context, waitForInstanceReady }) {
|
|
6342
|
+
const isAppsAPIAvailable = this.isAppsAPIAvailable();
|
|
6343
|
+
if (!isAppsAPIAvailable) {
|
|
6344
|
+
const glueInst = await app.start(context, { waitForAGMReady: waitForInstanceReady });
|
|
6345
|
+
return glueInst;
|
|
6346
|
+
}
|
|
6347
|
+
const glueInstance = await this.glue.apps.instances.start({ name: app.name, context });
|
|
6348
|
+
if (!waitForInstanceReady) {
|
|
6349
|
+
return glueInstance;
|
|
6350
|
+
}
|
|
6351
|
+
await this.glue.apps?.instances.waitForReady({ id: glueInstance.id });
|
|
6352
|
+
return glueInstance;
|
|
6280
6353
|
}
|
|
6281
6354
|
async findIntents(intentFilter) {
|
|
6282
6355
|
return this.glue.intents.find(intentFilter);
|
|
@@ -6400,8 +6473,15 @@ class GlueController {
|
|
|
6400
6473
|
getGlueVersion() {
|
|
6401
6474
|
return this.glue?.version;
|
|
6402
6475
|
}
|
|
6403
|
-
registerOnInstanceStopped(
|
|
6404
|
-
|
|
6476
|
+
async registerOnInstanceStopped(callback) {
|
|
6477
|
+
const isAppsAPIAvailable = this.isAppsAPIAvailable();
|
|
6478
|
+
if (!isAppsAPIAvailable) {
|
|
6479
|
+
return this.glue.appManager.onInstanceStopped((inst) => callback(inst.id));
|
|
6480
|
+
}
|
|
6481
|
+
const unsub = await this.glue.apps.instances.onStopped((event) => {
|
|
6482
|
+
callback(event.instance.id);
|
|
6483
|
+
});
|
|
6484
|
+
return unsub;
|
|
6405
6485
|
}
|
|
6406
6486
|
async unregisterMethod(methodName) {
|
|
6407
6487
|
return this.glue.interop.unregister(methodName);
|
|
@@ -6563,6 +6643,9 @@ class GlueController {
|
|
|
6563
6643
|
async contextsSetPaths(name, paths) {
|
|
6564
6644
|
await this.glue.contexts.setPaths(name, paths);
|
|
6565
6645
|
}
|
|
6646
|
+
isAppsAPIAvailable() {
|
|
6647
|
+
return typeof this.glue.apps === "object";
|
|
6648
|
+
}
|
|
6566
6649
|
}
|
|
6567
6650
|
|
|
6568
6651
|
const GLUE42_EVENT_NAME = "Glue42";
|
|
@@ -8596,10 +8679,11 @@ class IntentsController {
|
|
|
8596
8679
|
throw new Error(ResolveError.NoAppsFound);
|
|
8597
8680
|
}
|
|
8598
8681
|
this.logger?.info(`[${commandId}] - parsing glue intents to fdc3 intents and returning`);
|
|
8599
|
-
|
|
8682
|
+
const appIntents = await Promise.all(glueIntents.map((glueIntent) => {
|
|
8600
8683
|
const intentWithFilteredHandlers = this.getGlueIntentWithFilteredHandlers(glueIntent, { contextType: context.type, resultType });
|
|
8601
8684
|
return this.convertGlue42IntentToFDC3Intent(intentWithFilteredHandlers);
|
|
8602
|
-
});
|
|
8685
|
+
}));
|
|
8686
|
+
return appIntents;
|
|
8603
8687
|
}
|
|
8604
8688
|
async raiseIntent({ commandId, intent, context, target }) {
|
|
8605
8689
|
await this.glueController.gluePromise;
|
|
@@ -8611,7 +8695,7 @@ class IntentsController {
|
|
|
8611
8695
|
throw new Error(ResolveError.NoAppsFound);
|
|
8612
8696
|
}
|
|
8613
8697
|
if (!target) {
|
|
8614
|
-
const filteredGlueIntent = this.filterGlueIntentHandlers({ commandId, intent: searchedGlueIntent, context, target });
|
|
8698
|
+
const filteredGlueIntent = await this.filterGlueIntentHandlers({ commandId, intent: searchedGlueIntent, context, target });
|
|
8615
8699
|
this.logger?.info(`[${commandId}] - raising intent ${intent} with contextType ${context.type} and handlers ${filteredGlueIntent.handlers.map(h => h.applicationName && h.instanceId)}`);
|
|
8616
8700
|
return this.invokeRaiseIntent(commandId, { intent, context: glueContext, handlers: filteredGlueIntent.handlers });
|
|
8617
8701
|
}
|
|
@@ -8717,7 +8801,7 @@ class IntentsController {
|
|
|
8717
8801
|
handler: rememberedHandlerWithFilter.handler
|
|
8718
8802
|
};
|
|
8719
8803
|
}
|
|
8720
|
-
filterGlueIntentHandlers({ commandId, intent, context, target }) {
|
|
8804
|
+
async filterGlueIntentHandlers({ commandId, intent, context, target }) {
|
|
8721
8805
|
let filteredGlueIntent;
|
|
8722
8806
|
filteredGlueIntent = this.filterIntentHandlersByContext(intent, context);
|
|
8723
8807
|
if (!target) {
|
|
@@ -8725,14 +8809,14 @@ class IntentsController {
|
|
|
8725
8809
|
return filteredGlueIntent;
|
|
8726
8810
|
}
|
|
8727
8811
|
this.logger?.log(`[${commandId}] - filtering handlers by target (${JSON.stringify(target)}) for intent ${intent.name}`);
|
|
8728
|
-
filteredGlueIntent = this.filterIntentHandlersByTarget({ intent, target, commandId });
|
|
8812
|
+
filteredGlueIntent = await this.filterIntentHandlersByTarget({ intent, target, commandId });
|
|
8729
8813
|
return filteredGlueIntent;
|
|
8730
8814
|
}
|
|
8731
|
-
filterIntentHandlersByTarget({ intent, target, commandId }) {
|
|
8815
|
+
async filterIntentHandlersByTarget({ intent, target, commandId }) {
|
|
8732
8816
|
const appName = typeof target === "string" ? target : target.appId;
|
|
8733
8817
|
const instanceId = typeof target === "string" ? undefined : target.instanceId;
|
|
8734
8818
|
this.logger?.info(`[${commandId}] - Checking if application with name ${appName} exists`);
|
|
8735
|
-
const app = this.glueController.getApplication(appName);
|
|
8819
|
+
const app = await this.glueController.getApplication(appName);
|
|
8736
8820
|
const serverInstances = this.serverInstanceAsIntentHandler(intent.name);
|
|
8737
8821
|
if (!app && (typeof target === "string" || !target.instanceId || !serverInstances.length)) {
|
|
8738
8822
|
throw new Error(ResolveError.TargetAppUnavailable);
|
|
@@ -8812,27 +8896,28 @@ class IntentsController {
|
|
|
8812
8896
|
this.logger?.info(`[${commandId}] - returning private channel`);
|
|
8813
8897
|
return channel.toApi();
|
|
8814
8898
|
}
|
|
8815
|
-
convertGlue42IntentToFDC3Intent(glueIntent) {
|
|
8899
|
+
async convertGlue42IntentToFDC3Intent(glueIntent) {
|
|
8816
8900
|
const { name, handlers } = glueIntent;
|
|
8901
|
+
const apps = await Promise.all(handlers.map(async (handler) => {
|
|
8902
|
+
const appName = handler.applicationName;
|
|
8903
|
+
const app = await this.glueController.getApplication(appName);
|
|
8904
|
+
const icons = (handler.applicationIcon ? [handler.applicationIcon, ...(app?.userProperties.icons ?? [])] : (app?.userProperties.icons ?? [])).filter((icon) => !!icon).map((icon) => ({ src: icon }));
|
|
8905
|
+
const images = (app?.userProperties.images ?? []).filter((image) => !!image).map((image) => ({ src: image }));
|
|
8906
|
+
return {
|
|
8907
|
+
appId: appName,
|
|
8908
|
+
instanceId: handler.instanceId,
|
|
8909
|
+
name: appName,
|
|
8910
|
+
title: handler.applicationTitle || handler.instanceTitle || appName,
|
|
8911
|
+
tooltip: app?.userProperties.tooltip ?? `${appName} (${handler.type})`,
|
|
8912
|
+
description: handler.applicationDescription,
|
|
8913
|
+
icons,
|
|
8914
|
+
images,
|
|
8915
|
+
resultType: handler.resultType
|
|
8916
|
+
};
|
|
8917
|
+
}));
|
|
8817
8918
|
const appIntent = {
|
|
8818
8919
|
intent: { name, displayName: handlers[0].displayName || "" },
|
|
8819
|
-
apps
|
|
8820
|
-
const appName = handler.applicationName;
|
|
8821
|
-
const app = this.glueController.getApplication(appName);
|
|
8822
|
-
const icons = (handler.applicationIcon ? [handler.applicationIcon, ...(app?.userProperties.icons ?? [])] : (app?.userProperties.icons ?? [])).filter((icon) => !!icon).map((icon) => ({ src: icon }));
|
|
8823
|
-
const images = (app?.userProperties.images ?? []).filter((image) => !!image).map((image) => ({ src: image }));
|
|
8824
|
-
return {
|
|
8825
|
-
appId: appName,
|
|
8826
|
-
instanceId: handler.instanceId,
|
|
8827
|
-
name: appName,
|
|
8828
|
-
title: handler.applicationTitle || handler.instanceTitle || appName,
|
|
8829
|
-
tooltip: app?.userProperties.tooltip ?? `${appName} (${handler.type})`,
|
|
8830
|
-
description: handler.applicationDescription,
|
|
8831
|
-
icons,
|
|
8832
|
-
images,
|
|
8833
|
-
resultType: handler.resultType
|
|
8834
|
-
};
|
|
8835
|
-
})
|
|
8920
|
+
apps
|
|
8836
8921
|
};
|
|
8837
8922
|
return appIntent;
|
|
8838
8923
|
}
|
|
@@ -8945,7 +9030,7 @@ class ApplicationsController {
|
|
|
8945
9030
|
await this.glueController.gluePromise;
|
|
8946
9031
|
this.logger?.log(`[${commandId}] - open() invoked with target ${JSON.stringify(target)} ${context ? `and contextType ${context.type}` : ""}`);
|
|
8947
9032
|
const name = typeof target === "object" ? target.appId : target;
|
|
8948
|
-
const app = this.glueController.getApplication(name);
|
|
9033
|
+
const app = await this.glueController.getApplication(name);
|
|
8949
9034
|
if (!app) {
|
|
8950
9035
|
throw new Error(OpenError.AppNotFound);
|
|
8951
9036
|
}
|
|
@@ -8956,8 +9041,7 @@ class ApplicationsController {
|
|
|
8956
9041
|
}
|
|
8957
9042
|
try {
|
|
8958
9043
|
this.logger?.info(`[${commandId}] - opening app '${app.name}' without context`);
|
|
8959
|
-
const
|
|
8960
|
-
const glueInst = await app.start(undefined, { waitForAGMReady: !inBrowser });
|
|
9044
|
+
const glueInst = await this.glueController.startApplication({ app, waitForInstanceReady: !this.glueController.isRunningInBrowser() });
|
|
8961
9045
|
this.logger?.info(`[${commandId}] - instance with id ${glueInst.id} started`);
|
|
8962
9046
|
return this.parseGlueInstToAppIdentifier(glueInst);
|
|
8963
9047
|
}
|
|
@@ -8969,11 +9053,11 @@ class ApplicationsController {
|
|
|
8969
9053
|
await this.glueController.gluePromise;
|
|
8970
9054
|
this.logger?.info(`[${commandId}] - findInstances() invoked with appIdentifier ${JSON.stringify(appIdentifier)}`);
|
|
8971
9055
|
const { appId } = appIdentifier;
|
|
8972
|
-
const app = this.glueController.getApplication(appId);
|
|
9056
|
+
const app = await this.glueController.getApplication(appId);
|
|
8973
9057
|
if (!app) {
|
|
8974
9058
|
throw new Error(ResolveError.NoAppsFound);
|
|
8975
9059
|
}
|
|
8976
|
-
const glueInstances = this.glueController.getApplicationInstances(appId);
|
|
9060
|
+
const glueInstances = await this.glueController.getApplicationInstances(appId);
|
|
8977
9061
|
const fdc3Instances = glueInstances.map(glueInst => this.parseGlueInstToAppIdentifier(glueInst));
|
|
8978
9062
|
this.logger?.info(`[${commandId}] - ids of opened instances for appIdentifier ${JSON.stringify(appIdentifier)}: ${JSON.stringify(fdc3Instances.map(inst => inst.instanceId))}`);
|
|
8979
9063
|
return fdc3Instances;
|
|
@@ -8982,7 +9066,7 @@ class ApplicationsController {
|
|
|
8982
9066
|
await this.glueController.gluePromise;
|
|
8983
9067
|
this.logger?.info(`[${commandId}] - getAppMetadata() invoked with appIdentifier ${JSON.stringify(appIdentifier)}`);
|
|
8984
9068
|
const { appId, instanceId } = appIdentifier;
|
|
8985
|
-
const app = this.glueController.getApplication(appId);
|
|
9069
|
+
const app = await this.glueController.getApplication(appId);
|
|
8986
9070
|
if (!app) {
|
|
8987
9071
|
throw new Error(OpenError.AppNotFound);
|
|
8988
9072
|
}
|
|
@@ -8990,7 +9074,7 @@ class ApplicationsController {
|
|
|
8990
9074
|
this.logger?.info(`[${commandId}] - no opened instances found. Parsing app ${app.name}`);
|
|
8991
9075
|
return this.parseGlueAppToAppMetadata(app);
|
|
8992
9076
|
}
|
|
8993
|
-
const instance = this.glueController.getAppInstanceById(instanceId);
|
|
9077
|
+
const instance = await this.glueController.getAppInstanceById(instanceId);
|
|
8994
9078
|
const appMetadata = this.parseGlueAppToAppMetadata(app, instance);
|
|
8995
9079
|
this.logger?.info(`[${commandId}] - found app metadata: ${appMetadata}`);
|
|
8996
9080
|
return appMetadata;
|
|
@@ -8998,9 +9082,9 @@ class ApplicationsController {
|
|
|
8998
9082
|
async getInfo({ commandId }) {
|
|
8999
9083
|
await this.glueController.gluePromise;
|
|
9000
9084
|
this.logger?.info(`${commandId} - getInfo() invoked`);
|
|
9001
|
-
const appMetadata = this.getCurrentAppMetadata();
|
|
9085
|
+
const appMetadata = await this.getCurrentAppMetadata();
|
|
9002
9086
|
const globalScope = typeof process !== "undefined" ? process : window;
|
|
9003
|
-
const { provider, providerVersion, standardVersion } = globalScope.fdc3Info;
|
|
9087
|
+
const { provider, providerVersion, standardVersion } = globalScope.fdc3Info ?? {};
|
|
9004
9088
|
return {
|
|
9005
9089
|
provider,
|
|
9006
9090
|
providerVersion,
|
|
@@ -9013,10 +9097,10 @@ class ApplicationsController {
|
|
|
9013
9097
|
appMetadata
|
|
9014
9098
|
};
|
|
9015
9099
|
}
|
|
9016
|
-
getCurrentAppMetadata() {
|
|
9100
|
+
async getCurrentAppMetadata() {
|
|
9017
9101
|
const myInstance = this.glueController.interopInstance();
|
|
9018
9102
|
const myInstanceApplicationName = myInstance.application ?? myInstance.applicationName;
|
|
9019
|
-
const myApp = this.glueController.getApplication(myInstanceApplicationName);
|
|
9103
|
+
const myApp = await this.glueController.getApplication(myInstanceApplicationName);
|
|
9020
9104
|
if (myApp) {
|
|
9021
9105
|
return { appId: myApp.name, instanceId: myInstance.instance };
|
|
9022
9106
|
}
|
|
@@ -9025,7 +9109,7 @@ class ApplicationsController {
|
|
|
9025
9109
|
}
|
|
9026
9110
|
parseGlueInstToAppIdentifier(glueInst) {
|
|
9027
9111
|
return {
|
|
9028
|
-
appId: glueInst.application.name,
|
|
9112
|
+
appId: this.isApplicationInstance(glueInst) ? glueInst.appName : glueInst.application.name,
|
|
9029
9113
|
instanceId: glueInst.id
|
|
9030
9114
|
};
|
|
9031
9115
|
}
|
|
@@ -9044,6 +9128,10 @@ class ApplicationsController {
|
|
|
9044
9128
|
const icon = inBrowserNamespace
|
|
9045
9129
|
? app.icon
|
|
9046
9130
|
: (await app.getConfiguration()).icon;
|
|
9131
|
+
const desktopScreenshots = appConfiguration.customProperties?.screenshots ?? appConfiguration.userProperties?.screenshots;
|
|
9132
|
+
const screenshots = inBrowserNamespace
|
|
9133
|
+
? appConfiguration.screenshots
|
|
9134
|
+
: desktopScreenshots;
|
|
9047
9135
|
return {
|
|
9048
9136
|
appId: app.name,
|
|
9049
9137
|
name: app.name,
|
|
@@ -9052,22 +9140,30 @@ class ApplicationsController {
|
|
|
9052
9140
|
title: app.title,
|
|
9053
9141
|
icons: icon ? [{ src: icon }] : [],
|
|
9054
9142
|
tooltip: appConfiguration.tooltip,
|
|
9055
|
-
screenshots
|
|
9056
|
-
? appConfiguration.screenshots
|
|
9057
|
-
: appConfiguration.customProperties.screenshots
|
|
9143
|
+
screenshots
|
|
9058
9144
|
};
|
|
9059
9145
|
}
|
|
9060
9146
|
addInstanceMetadataToAppMetadata(appMetadata, instance) {
|
|
9061
|
-
return {
|
|
9147
|
+
return {
|
|
9148
|
+
...appMetadata,
|
|
9149
|
+
instanceId: instance.id,
|
|
9150
|
+
instanceMetadata: this.isApplicationInstance(instance) ? instance.interopInstance : instance.agm
|
|
9151
|
+
};
|
|
9152
|
+
}
|
|
9153
|
+
isApplicationInstance(instance) {
|
|
9154
|
+
return "appName" in instance;
|
|
9062
9155
|
}
|
|
9063
9156
|
async openAppWithContext(app, context) {
|
|
9064
9157
|
const guid = nanoid();
|
|
9065
9158
|
const startContext = this.buildStartContext(context, guid);
|
|
9066
9159
|
const wrappedPromise = this.createContextListenerWrappedPromise(app);
|
|
9067
9160
|
this.appsStateStore.addOpenAppPromise(guid, wrappedPromise);
|
|
9068
|
-
const inBrowser = this.glueController.isRunningInBrowser();
|
|
9069
9161
|
try {
|
|
9070
|
-
const glueInst = await
|
|
9162
|
+
const glueInst = await this.glueController.startApplication({
|
|
9163
|
+
app,
|
|
9164
|
+
context: startContext,
|
|
9165
|
+
waitForInstanceReady: !this.glueController.isRunningInBrowser()
|
|
9166
|
+
});
|
|
9071
9167
|
await wrappedPromise.promise;
|
|
9072
9168
|
this.appsStateStore.removeOpenAppPromise(guid);
|
|
9073
9169
|
return this.parseGlueInstToAppIdentifier(glueInst);
|
|
@@ -9529,9 +9625,12 @@ class PrivateChannel {
|
|
|
9529
9625
|
this.channelsController.removePrivateChannelFromStoreById(this.id);
|
|
9530
9626
|
await this.sendCollaborateMessage({ action: "disconnectedFromPrivateChannel" });
|
|
9531
9627
|
this.logger?.trace(`[${commandId}] - collaborator received action ${"disconnectedFromPrivateChannel"}`);
|
|
9532
|
-
if (this.unsubFromInstanceStopped) {
|
|
9533
|
-
|
|
9628
|
+
if (!this.unsubFromInstanceStopped) {
|
|
9629
|
+
return;
|
|
9534
9630
|
}
|
|
9631
|
+
const unsub = this.unsubFromInstanceStopped instanceof Promise ? await this.unsubFromInstanceStopped : this.unsubFromInstanceStopped;
|
|
9632
|
+
unsub();
|
|
9633
|
+
this.unsubFromInstanceStopped = undefined;
|
|
9535
9634
|
}
|
|
9536
9635
|
ensureAlive(commandId) {
|
|
9537
9636
|
if (!this.disconnected) {
|
|
@@ -9550,8 +9649,8 @@ class PrivateChannel {
|
|
|
9550
9649
|
throw new Error(ChannelError.AccessDenied);
|
|
9551
9650
|
}
|
|
9552
9651
|
subscribeForCollaboratorInstanceStop(commandId) {
|
|
9553
|
-
const handler = (
|
|
9554
|
-
if (
|
|
9652
|
+
const handler = (id) => {
|
|
9653
|
+
if (id !== this.collaborator?.instanceId) {
|
|
9555
9654
|
return;
|
|
9556
9655
|
}
|
|
9557
9656
|
this.handleCollaboratorDisconnect();
|
|
@@ -10436,7 +10535,7 @@ const fdc3Factory = () => {
|
|
|
10436
10535
|
return ioc.fdc3;
|
|
10437
10536
|
};
|
|
10438
10537
|
|
|
10439
|
-
var version = "2.7.
|
|
10538
|
+
var version = "2.7.1";
|
|
10440
10539
|
|
|
10441
10540
|
const globalScope = typeof process !== "undefined" ? process : window;
|
|
10442
10541
|
globalScope.fdc3Info = {
|