@webex/internal-plugin-scheduler 2.60.1 → 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.
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/payloadTransformer/index.js +1 -2
- package/dist/payloadTransformer/index.js.map +1 -1
- package/dist/payloadTransformer/predicates.js +1 -2
- package/dist/payloadTransformer/predicates.js.map +1 -1
- package/dist/payloadTransformer/transformers.js +1 -2
- package/dist/payloadTransformer/transformers.js.map +1 -1
- package/dist/scheduler/index.js +1 -2
- package/dist/scheduler/index.js.map +1 -1
- package/dist/scheduler/scheduler.config.js +1 -2
- package/dist/scheduler/scheduler.config.js.map +1 -1
- package/dist/scheduler/scheduler.constants.js +1 -2
- package/dist/scheduler/scheduler.constants.js.map +1 -1
- package/dist/scheduler/scheduler.js +6 -8
- package/dist/scheduler/scheduler.js.map +1 -1
- package/package.json +21 -21
package/dist/index.js
CHANGED
|
@@ -13,8 +13,8 @@ require("@webex/internal-plugin-encryption");
|
|
|
13
13
|
var _webexCore = require("@webex/webex-core");
|
|
14
14
|
var _scheduler = _interopRequireWildcard(require("./scheduler"));
|
|
15
15
|
var _payloadTransformer = _interopRequireDefault(require("./payloadTransformer"));
|
|
16
|
-
function _getRequireWildcardCache(
|
|
17
|
-
function _interopRequireWildcard(
|
|
16
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
17
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? _Object$defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
18
|
// Import all plugins used within this plugin here, as they are singletons
|
|
19
19
|
// and must be mounted prior to any other mounting logic within this plugin.
|
|
20
20
|
|
|
@@ -23,6 +23,5 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
23
23
|
payloadTransformer: _payloadTransformer.default,
|
|
24
24
|
config: _scheduler.config
|
|
25
25
|
});
|
|
26
|
-
var _default = _scheduler.default;
|
|
27
|
-
exports.default = _default;
|
|
26
|
+
var _default = exports.default = _scheduler.default;
|
|
28
27
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["require","_webexCore","_scheduler","_interopRequireWildcard","_payloadTransformer","_interopRequireDefault","_getRequireWildcardCache","
|
|
1
|
+
{"version":3,"names":["require","_webexCore","_scheduler","_interopRequireWildcard","_payloadTransformer","_interopRequireDefault","_getRequireWildcardCache","e","_WeakMap","r","t","__esModule","_typeof","default","has","get","n","__proto__","a","_Object$defineProperty","_Object$getOwnPropertyDescriptor","u","Object","prototype","hasOwnProperty","call","i","set","registerInternalPlugin","CONSTANTS","NAMESPACE","Scheduler","payloadTransformer","config","_default","exports"],"sources":["index.js"],"sourcesContent":["// Import all plugins used within this plugin here, as they are singletons\n// and must be mounted prior to any other mounting logic within this plugin.\nimport '@webex/internal-plugin-encryption';\n\nimport {registerInternalPlugin} from '@webex/webex-core';\n\nimport Scheduler, {config, CONSTANTS} from './scheduler';\nimport payloadTransformer from './payloadTransformer';\n\n// Mounts the plugin to `webex.internal.{NAMESPACE}` and begins initialization.\nregisterInternalPlugin(CONSTANTS.NAMESPACE, Scheduler, {\n payloadTransformer,\n config,\n});\n\nexport default Scheduler;\n"],"mappings":";;;;;;;;;;;AAEAA,OAAA;AAEA,IAAAC,UAAA,GAAAD,OAAA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BAAS,EAAE;EACrDC,kBAAkB,EAAlBA,2BAAkB;EAClBC,MAAM,EAANA;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAtB,OAAA,GAEYkB,kBAAS"}
|
|
@@ -13,6 +13,5 @@ var payloadTransformer = {
|
|
|
13
13
|
predicates: (0, _values.default)(_predicates.default),
|
|
14
14
|
transforms: (0, _values.default)(_transformers.default)
|
|
15
15
|
};
|
|
16
|
-
var _default = payloadTransformer;
|
|
17
|
-
exports.default = _default;
|
|
16
|
+
var _default = exports.default = payloadTransformer;
|
|
18
17
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_predicates","_interopRequireDefault","require","_transformers","payloadTransformer","predicates","_values","default","transforms","transformers","_default","exports"],"sources":["index.js"],"sourcesContent":["import predicates from './predicates';\nimport transformers from './transformers';\n\nconst payloadTransformer = {\n predicates: Object.values(predicates),\n transforms: Object.values(transformers),\n};\n\nexport default payloadTransformer;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAME,kBAAkB,GAAG;EACzBC,UAAU,EAAE,IAAAC,OAAA,CAAAC,OAAA,EAAcF,mBAAU,CAAC;EACrCG,UAAU,EAAE,IAAAF,OAAA,CAAAC,OAAA,EAAcE,qBAAY;AACxC,CAAC;AAAC,IAAAC,QAAA,
|
|
1
|
+
{"version":3,"names":["_predicates","_interopRequireDefault","require","_transformers","payloadTransformer","predicates","_values","default","transforms","transformers","_default","exports"],"sources":["index.js"],"sourcesContent":["import predicates from './predicates';\nimport transformers from './transformers';\n\nconst payloadTransformer = {\n predicates: Object.values(predicates),\n transforms: Object.values(transformers),\n};\n\nexport default payloadTransformer;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAME,kBAAkB,GAAG;EACzBC,UAAU,EAAE,IAAAC,OAAA,CAAAC,OAAA,EAAcF,mBAAU,CAAC;EACrCG,UAAU,EAAE,IAAAF,OAAA,CAAAC,OAAA,EAAcE,qBAAY;AACxC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAJ,OAAA,GAEaH,kBAAkB"}
|
|
@@ -81,6 +81,5 @@ var predicates = {
|
|
|
81
81
|
exampleInboundPredicate: exampleInboundPredicate,
|
|
82
82
|
exampleOutboundPredicate: exampleOutboundPredicate
|
|
83
83
|
};
|
|
84
|
-
var _default = predicates;
|
|
85
|
-
exports.default = _default;
|
|
84
|
+
var _default = exports.default = predicates;
|
|
86
85
|
//# sourceMappingURL=predicates.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["exampleGeneralPredicate","name","direction","undefined","test","ctx","data","_promise","default","resolve","value","extract","exampleInboundPredicate","inboundValue","exampleOutboundPredicate","outboundValue","predicates","_default","exports"],"sources":["predicates.js"],"sourcesContent":["/**\n * Predicates are used to validate whether or not a transformer should be\n * triggered, and with what data.\n */\nconst exampleGeneralPredicate = {\n /**\n * Name of the transformer to be called.\n *\n * A predicate will `test()` if the payload is valid for the transform, and\n * then `extract()` the necessary data to be passed into the transformer.\n *\n * @type {string}\n */\n name: 'exampleGeneralTransformer',\n\n /**\n * Direction this predicate should process on. This allows for different\n * predicates to be used for inbound and outbound transforms.\n *\n * @type {'inbound' | 'outbound' | undefined}\n */\n direction: undefined,\n\n /**\n * Test is used to validate if the `extract()` method should be called to be\n * processed by the associated `name` transformer.\n *\n * @param {Record<'webex' | 'transform', any>} ctx - An Object containing a webex instance and transform prop\n * @param {Object} data - Data from the event or request\n * @returns {boolean} - Whether to process the `extract()` method.\n */\n test: (ctx, data) => Promise.resolve(!!data.value),\n\n /**\n * Extract a given set of data from a request or event to be processed by the\n * associated `name` transform.\n *\n * @param {Object} data - Data from the event or request\n * @returns {any} - Data to send to the named transform.\n */\n extract: (data) => Promise.resolve(data.value),\n};\n\n// NOTE - additional predicate examples [start]\n\nconst exampleInboundPredicate = {\n name: 'exampleInboundTransformer',\n direction: 'inbound',\n test: (ctx, data) => Promise.resolve(!!data.inboundValue),\n extract: (data) => Promise.resolve(data.inboundValue),\n};\n\nconst exampleOutboundPredicate = {\n name: 'exampleOutboundTransformer',\n direction: 'outbound',\n test: (ctx, data) => Promise.resolve(!!data.outboundValue),\n extract: (data) => Promise.resolve(data.outboundValue),\n};\n\n// NOTE - additional predicate examples [end]\n\nconst predicates = {\n exampleGeneralPredicate,\n exampleInboundPredicate,\n exampleOutboundPredicate,\n};\n\nexport default predicates;\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA,IAAMA,uBAAuB,GAAG;EAC9B;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,IAAI,EAAE,2BAA2B;EAEjC;AACF;AACA;AACA;AACA;AACA;EACEC,SAAS,EAAEC,SAAS;EAEpB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,IAAI,EAAE,SAAAA,KAACC,GAAG,EAAEC,IAAI;IAAA,OAAKC,QAAA,CAAAC,OAAA,CAAQC,OAAO,CAAC,CAAC,CAACH,IAAI,CAACI,KAAK,CAAC;EAAA;EAElD;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,OAAO,EAAE,SAAAA,QAACL,IAAI;IAAA,OAAKC,QAAA,CAAAC,OAAA,CAAQC,OAAO,CAACH,IAAI,CAACI,KAAK,CAAC;EAAA;AAChD,CAAC;;AAED;;AAEA,IAAME,uBAAuB,GAAG;EAC9BX,IAAI,EAAE,2BAA2B;EACjCC,SAAS,EAAE,SAAS;EACpBE,IAAI,EAAE,SAAAA,KAACC,GAAG,EAAEC,IAAI;IAAA,OAAKC,QAAA,CAAAC,OAAA,CAAQC,OAAO,CAAC,CAAC,CAACH,IAAI,CAACO,YAAY,CAAC;EAAA;EACzDF,OAAO,EAAE,SAAAA,QAACL,IAAI;IAAA,OAAKC,QAAA,CAAAC,OAAA,CAAQC,OAAO,CAACH,IAAI,CAACO,YAAY,CAAC;EAAA;AACvD,CAAC;AAED,IAAMC,wBAAwB,GAAG;EAC/Bb,IAAI,EAAE,4BAA4B;EAClCC,SAAS,EAAE,UAAU;EACrBE,IAAI,EAAE,SAAAA,KAACC,GAAG,EAAEC,IAAI;IAAA,OAAKC,QAAA,CAAAC,OAAA,CAAQC,OAAO,CAAC,CAAC,CAACH,IAAI,CAACS,aAAa,CAAC;EAAA;EAC1DJ,OAAO,EAAE,SAAAA,QAACL,IAAI;IAAA,OAAKC,QAAA,CAAAC,OAAA,CAAQC,OAAO,CAACH,IAAI,CAACS,aAAa,CAAC;EAAA;AACxD,CAAC;;AAED;;AAEA,IAAMC,UAAU,GAAG;EACjBhB,uBAAuB,EAAvBA,uBAAuB;EACvBY,uBAAuB,EAAvBA,uBAAuB;EACvBE,wBAAwB,EAAxBA;AACF,CAAC;AAAC,IAAAG,QAAA,
|
|
1
|
+
{"version":3,"names":["exampleGeneralPredicate","name","direction","undefined","test","ctx","data","_promise","default","resolve","value","extract","exampleInboundPredicate","inboundValue","exampleOutboundPredicate","outboundValue","predicates","_default","exports"],"sources":["predicates.js"],"sourcesContent":["/**\n * Predicates are used to validate whether or not a transformer should be\n * triggered, and with what data.\n */\nconst exampleGeneralPredicate = {\n /**\n * Name of the transformer to be called.\n *\n * A predicate will `test()` if the payload is valid for the transform, and\n * then `extract()` the necessary data to be passed into the transformer.\n *\n * @type {string}\n */\n name: 'exampleGeneralTransformer',\n\n /**\n * Direction this predicate should process on. This allows for different\n * predicates to be used for inbound and outbound transforms.\n *\n * @type {'inbound' | 'outbound' | undefined}\n */\n direction: undefined,\n\n /**\n * Test is used to validate if the `extract()` method should be called to be\n * processed by the associated `name` transformer.\n *\n * @param {Record<'webex' | 'transform', any>} ctx - An Object containing a webex instance and transform prop\n * @param {Object} data - Data from the event or request\n * @returns {boolean} - Whether to process the `extract()` method.\n */\n test: (ctx, data) => Promise.resolve(!!data.value),\n\n /**\n * Extract a given set of data from a request or event to be processed by the\n * associated `name` transform.\n *\n * @param {Object} data - Data from the event or request\n * @returns {any} - Data to send to the named transform.\n */\n extract: (data) => Promise.resolve(data.value),\n};\n\n// NOTE - additional predicate examples [start]\n\nconst exampleInboundPredicate = {\n name: 'exampleInboundTransformer',\n direction: 'inbound',\n test: (ctx, data) => Promise.resolve(!!data.inboundValue),\n extract: (data) => Promise.resolve(data.inboundValue),\n};\n\nconst exampleOutboundPredicate = {\n name: 'exampleOutboundTransformer',\n direction: 'outbound',\n test: (ctx, data) => Promise.resolve(!!data.outboundValue),\n extract: (data) => Promise.resolve(data.outboundValue),\n};\n\n// NOTE - additional predicate examples [end]\n\nconst predicates = {\n exampleGeneralPredicate,\n exampleInboundPredicate,\n exampleOutboundPredicate,\n};\n\nexport default predicates;\n"],"mappings":";;;;;;;;;AAAA;AACA;AACA;AACA;AACA,IAAMA,uBAAuB,GAAG;EAC9B;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,IAAI,EAAE,2BAA2B;EAEjC;AACF;AACA;AACA;AACA;AACA;EACEC,SAAS,EAAEC,SAAS;EAEpB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,IAAI,EAAE,SAAAA,KAACC,GAAG,EAAEC,IAAI;IAAA,OAAKC,QAAA,CAAAC,OAAA,CAAQC,OAAO,CAAC,CAAC,CAACH,IAAI,CAACI,KAAK,CAAC;EAAA;EAElD;AACF;AACA;AACA;AACA;AACA;AACA;EACEC,OAAO,EAAE,SAAAA,QAACL,IAAI;IAAA,OAAKC,QAAA,CAAAC,OAAA,CAAQC,OAAO,CAACH,IAAI,CAACI,KAAK,CAAC;EAAA;AAChD,CAAC;;AAED;;AAEA,IAAME,uBAAuB,GAAG;EAC9BX,IAAI,EAAE,2BAA2B;EACjCC,SAAS,EAAE,SAAS;EACpBE,IAAI,EAAE,SAAAA,KAACC,GAAG,EAAEC,IAAI;IAAA,OAAKC,QAAA,CAAAC,OAAA,CAAQC,OAAO,CAAC,CAAC,CAACH,IAAI,CAACO,YAAY,CAAC;EAAA;EACzDF,OAAO,EAAE,SAAAA,QAACL,IAAI;IAAA,OAAKC,QAAA,CAAAC,OAAA,CAAQC,OAAO,CAACH,IAAI,CAACO,YAAY,CAAC;EAAA;AACvD,CAAC;AAED,IAAMC,wBAAwB,GAAG;EAC/Bb,IAAI,EAAE,4BAA4B;EAClCC,SAAS,EAAE,UAAU;EACrBE,IAAI,EAAE,SAAAA,KAACC,GAAG,EAAEC,IAAI;IAAA,OAAKC,QAAA,CAAAC,OAAA,CAAQC,OAAO,CAAC,CAAC,CAACH,IAAI,CAACS,aAAa,CAAC;EAAA;EAC1DJ,OAAO,EAAE,SAAAA,QAACL,IAAI;IAAA,OAAKC,QAAA,CAAAC,OAAA,CAAQC,OAAO,CAACH,IAAI,CAACS,aAAa,CAAC;EAAA;AACxD,CAAC;;AAED;;AAEA,IAAMC,UAAU,GAAG;EACjBhB,uBAAuB,EAAvBA,uBAAuB;EACvBY,uBAAuB,EAAvBA,uBAAuB;EACvBE,wBAAwB,EAAxBA;AACF,CAAC;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAV,OAAA,GAEaQ,UAAU"}
|
|
@@ -68,6 +68,5 @@ var transformers = {
|
|
|
68
68
|
exampleInboundTransformer: exampleInboundTransformer,
|
|
69
69
|
exampleOutboundTransformer: exampleOutboundTransformer
|
|
70
70
|
};
|
|
71
|
-
var _default = transformers;
|
|
72
|
-
exports.default = _default;
|
|
71
|
+
var _default = exports.default = transformers;
|
|
73
72
|
//# sourceMappingURL=transformers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["exampleGeneralTransformer","name","direction","undefined","fn","ctx","data","transform","then","transformed","webex","internal","encryption","example","exampleInboundTransformer","exampleOutboundTransformer","transformers","_default","exports","default"],"sources":["transformers.js"],"sourcesContent":["/**\n * Transformers are used to process data from requests and events, performing\n * actions prior to the resolution of a `request` or `event` within the calling\n * stack.\n */\nconst exampleGeneralTransformer = {\n /**\n * Name of this transformer.\n *\n * The usage of this transformer can be validated via a predicate. See the\n * `predicates.js` file for more details.\n *\n * @type {string}\n */\n name: 'exampleGeneralTransformer',\n\n /**\n * Direction this transformer should process on. This allows for different\n * directions to be handled differently when sending/receiving data.\n *\n * @type {'inbound' | 'outbound' | undefined}\n */\n direction: undefined,\n\n /**\n * The main transformation function\n * @param {Record<'webex' | 'transform', any>} ctx - An Object containing a webex instance and transform prop.\n * @param {any} data - Data from the event or request.\n * @returns {Promise<any>} - Data after transformation.\n */\n fn: (ctx, data) =>\n ctx\n .transform('exampleInboundTransformer', ctx, data)\n .then((transformed) => ctx.webex.internal.encryption.example(transformed)),\n};\n\n// NOTE - additional predicate examples [start]\n\nconst exampleInboundTransformer = {\n name: 'exampleInboundTransformer',\n direction: 'inbound',\n fn: (ctx, data) =>\n ctx\n .transform('exampleGeneralTransformer', ctx, data)\n .then((transformed) => ctx.webex.internal.encryption.example(transformed)),\n};\n\nconst exampleOutboundTransformer = {\n name: 'exampleOutboundTransformer',\n direction: 'outbound',\n fn: (ctx, data) =>\n ctx\n .transform('exampleGeneralTransformer', ctx, data)\n .then((transformed) => ctx.webex.internal.encryption.example(transformed)),\n};\n\n// NOTE - additional predicate examples [end]\n\nconst transformers = {\n exampleGeneralTransformer,\n exampleInboundTransformer,\n exampleOutboundTransformer,\n};\n\nexport default transformers;\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA,IAAMA,yBAAyB,GAAG;EAChC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,IAAI,EAAE,2BAA2B;EAEjC;AACF;AACA;AACA;AACA;AACA;EACEC,SAAS,EAAEC,SAAS;EAEpB;AACF;AACA;AACA;AACA;AACA;EACEC,EAAE,EAAE,SAAAA,GAACC,GAAG,EAAEC,IAAI;IAAA,OACZD,GAAG,CACAE,SAAS,CAAC,2BAA2B,EAAEF,GAAG,EAAEC,IAAI,CAAC,CACjDE,IAAI,CAAC,UAACC,WAAW;MAAA,OAAKJ,GAAG,CAACK,KAAK,CAACC,QAAQ,CAACC,UAAU,CAACC,OAAO,CAACJ,WAAW,CAAC;IAAA,EAAC;EAAA;AAChF,CAAC;;AAED;;AAEA,IAAMK,yBAAyB,GAAG;EAChCb,IAAI,EAAE,2BAA2B;EACjCC,SAAS,EAAE,SAAS;EACpBE,EAAE,EAAE,SAAAA,GAACC,GAAG,EAAEC,IAAI;IAAA,OACZD,GAAG,CACAE,SAAS,CAAC,2BAA2B,EAAEF,GAAG,EAAEC,IAAI,CAAC,CACjDE,IAAI,CAAC,UAACC,WAAW;MAAA,OAAKJ,GAAG,CAACK,KAAK,CAACC,QAAQ,CAACC,UAAU,CAACC,OAAO,CAACJ,WAAW,CAAC;IAAA,EAAC;EAAA;AAChF,CAAC;AAED,IAAMM,0BAA0B,GAAG;EACjCd,IAAI,EAAE,4BAA4B;EAClCC,SAAS,EAAE,UAAU;EACrBE,EAAE,EAAE,SAAAA,GAACC,GAAG,EAAEC,IAAI;IAAA,OACZD,GAAG,CACAE,SAAS,CAAC,2BAA2B,EAAEF,GAAG,EAAEC,IAAI,CAAC,CACjDE,IAAI,CAAC,UAACC,WAAW;MAAA,OAAKJ,GAAG,CAACK,KAAK,CAACC,QAAQ,CAACC,UAAU,CAACC,OAAO,CAACJ,WAAW,CAAC;IAAA,EAAC;EAAA;AAChF,CAAC;;AAED;;AAEA,IAAMO,YAAY,GAAG;EACnBhB,yBAAyB,EAAzBA,yBAAyB;EACzBc,yBAAyB,EAAzBA,yBAAyB;EACzBC,0BAA0B,EAA1BA;AACF,CAAC;AAAC,IAAAE,QAAA,
|
|
1
|
+
{"version":3,"names":["exampleGeneralTransformer","name","direction","undefined","fn","ctx","data","transform","then","transformed","webex","internal","encryption","example","exampleInboundTransformer","exampleOutboundTransformer","transformers","_default","exports","default"],"sources":["transformers.js"],"sourcesContent":["/**\n * Transformers are used to process data from requests and events, performing\n * actions prior to the resolution of a `request` or `event` within the calling\n * stack.\n */\nconst exampleGeneralTransformer = {\n /**\n * Name of this transformer.\n *\n * The usage of this transformer can be validated via a predicate. See the\n * `predicates.js` file for more details.\n *\n * @type {string}\n */\n name: 'exampleGeneralTransformer',\n\n /**\n * Direction this transformer should process on. This allows for different\n * directions to be handled differently when sending/receiving data.\n *\n * @type {'inbound' | 'outbound' | undefined}\n */\n direction: undefined,\n\n /**\n * The main transformation function\n * @param {Record<'webex' | 'transform', any>} ctx - An Object containing a webex instance and transform prop.\n * @param {any} data - Data from the event or request.\n * @returns {Promise<any>} - Data after transformation.\n */\n fn: (ctx, data) =>\n ctx\n .transform('exampleInboundTransformer', ctx, data)\n .then((transformed) => ctx.webex.internal.encryption.example(transformed)),\n};\n\n// NOTE - additional predicate examples [start]\n\nconst exampleInboundTransformer = {\n name: 'exampleInboundTransformer',\n direction: 'inbound',\n fn: (ctx, data) =>\n ctx\n .transform('exampleGeneralTransformer', ctx, data)\n .then((transformed) => ctx.webex.internal.encryption.example(transformed)),\n};\n\nconst exampleOutboundTransformer = {\n name: 'exampleOutboundTransformer',\n direction: 'outbound',\n fn: (ctx, data) =>\n ctx\n .transform('exampleGeneralTransformer', ctx, data)\n .then((transformed) => ctx.webex.internal.encryption.example(transformed)),\n};\n\n// NOTE - additional predicate examples [end]\n\nconst transformers = {\n exampleGeneralTransformer,\n exampleInboundTransformer,\n exampleOutboundTransformer,\n};\n\nexport default transformers;\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA,IAAMA,yBAAyB,GAAG;EAChC;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACEC,IAAI,EAAE,2BAA2B;EAEjC;AACF;AACA;AACA;AACA;AACA;EACEC,SAAS,EAAEC,SAAS;EAEpB;AACF;AACA;AACA;AACA;AACA;EACEC,EAAE,EAAE,SAAAA,GAACC,GAAG,EAAEC,IAAI;IAAA,OACZD,GAAG,CACAE,SAAS,CAAC,2BAA2B,EAAEF,GAAG,EAAEC,IAAI,CAAC,CACjDE,IAAI,CAAC,UAACC,WAAW;MAAA,OAAKJ,GAAG,CAACK,KAAK,CAACC,QAAQ,CAACC,UAAU,CAACC,OAAO,CAACJ,WAAW,CAAC;IAAA,EAAC;EAAA;AAChF,CAAC;;AAED;;AAEA,IAAMK,yBAAyB,GAAG;EAChCb,IAAI,EAAE,2BAA2B;EACjCC,SAAS,EAAE,SAAS;EACpBE,EAAE,EAAE,SAAAA,GAACC,GAAG,EAAEC,IAAI;IAAA,OACZD,GAAG,CACAE,SAAS,CAAC,2BAA2B,EAAEF,GAAG,EAAEC,IAAI,CAAC,CACjDE,IAAI,CAAC,UAACC,WAAW;MAAA,OAAKJ,GAAG,CAACK,KAAK,CAACC,QAAQ,CAACC,UAAU,CAACC,OAAO,CAACJ,WAAW,CAAC;IAAA,EAAC;EAAA;AAChF,CAAC;AAED,IAAMM,0BAA0B,GAAG;EACjCd,IAAI,EAAE,4BAA4B;EAClCC,SAAS,EAAE,UAAU;EACrBE,EAAE,EAAE,SAAAA,GAACC,GAAG,EAAEC,IAAI;IAAA,OACZD,GAAG,CACAE,SAAS,CAAC,2BAA2B,EAAEF,GAAG,EAAEC,IAAI,CAAC,CACjDE,IAAI,CAAC,UAACC,WAAW;MAAA,OAAKJ,GAAG,CAACK,KAAK,CAACC,QAAQ,CAACC,UAAU,CAACC,OAAO,CAACJ,WAAW,CAAC;IAAA,EAAC;EAAA;AAChF,CAAC;;AAED;;AAEA,IAAMO,YAAY,GAAG;EACnBhB,yBAAyB,EAAzBA,yBAAyB;EACzBc,yBAAyB,EAAzBA,yBAAyB;EACzBC,0BAA0B,EAA1BA;AACF,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaH,YAAY"}
|
package/dist/scheduler/index.js
CHANGED
|
@@ -21,6 +21,5 @@ exports.default = void 0;
|
|
|
21
21
|
var _scheduler = _interopRequireDefault(require("./scheduler"));
|
|
22
22
|
var _scheduler2 = _interopRequireDefault(require("./scheduler.config"));
|
|
23
23
|
var _scheduler3 = _interopRequireDefault(require("./scheduler.constants"));
|
|
24
|
-
var _default = _scheduler.default;
|
|
25
|
-
exports.default = _default;
|
|
24
|
+
var _default = exports.default = _scheduler.default;
|
|
26
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_scheduler","_interopRequireDefault","require","_scheduler2","_scheduler3","_default","
|
|
1
|
+
{"version":3,"names":["_scheduler","_interopRequireDefault","require","_scheduler2","_scheduler3","_default","exports","default","Scheduler"],"sources":["index.js"],"sourcesContent":["import Scheduler from './scheduler';\nimport config from './scheduler.config';\nimport CONSTANTS from './scheduler.constants';\n\nexport {config, CONSTANTS};\n\nexport default Scheduler;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,WAAA,GAAAH,sBAAA,CAAAC,OAAA;AAA8C,IAAAG,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAI/BC,kBAAS"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["config","scheduler","configurationBoolean","configurationString","configurationNumber","configurationArray","configurationObject","a","b","c","_default","exports","default"],"sources":["scheduler.config.js"],"sourcesContent":["/**\n * The configuration object for this plugin.\n *\n * Each of the values can be retreived from `this.webex.config.scheduler.{property}.\n * When these properties mount/update, `this.webex` object emits `change:config`.\n */\nconst config = {\n scheduler: {\n configurationBoolean: true,\n configurationString: 'hello',\n configurationNumber: 1234,\n configurationArray: [1, 2, 3, 4],\n configurationObject: {a: 1, b: 2, c: 3},\n },\n};\n\nexport default config;\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,MAAM,GAAG;EACbC,SAAS,EAAE;IACTC,oBAAoB,EAAE,IAAI;IAC1BC,mBAAmB,EAAE,OAAO;IAC5BC,mBAAmB,EAAE,IAAI;IACzBC,kBAAkB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAChCC,mBAAmB,EAAE;MAACC,CAAC,EAAE,CAAC;MAAEC,CAAC,EAAE,CAAC;MAAEC,CAAC,EAAE;IAAC;EACxC;AACF,CAAC;AAAC,IAAAC,QAAA,
|
|
1
|
+
{"version":3,"names":["config","scheduler","configurationBoolean","configurationString","configurationNumber","configurationArray","configurationObject","a","b","c","_default","exports","default"],"sources":["scheduler.config.js"],"sourcesContent":["/**\n * The configuration object for this plugin.\n *\n * Each of the values can be retreived from `this.webex.config.scheduler.{property}.\n * When these properties mount/update, `this.webex` object emits `change:config`.\n */\nconst config = {\n scheduler: {\n configurationBoolean: true,\n configurationString: 'hello',\n configurationNumber: 1234,\n configurationArray: [1, 2, 3, 4],\n configurationObject: {a: 1, b: 2, c: 3},\n },\n};\n\nexport default config;\n"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA,IAAMA,MAAM,GAAG;EACbC,SAAS,EAAE;IACTC,oBAAoB,EAAE,IAAI;IAC1BC,mBAAmB,EAAE,OAAO;IAC5BC,mBAAmB,EAAE,IAAI;IACzBC,kBAAkB,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;IAChCC,mBAAmB,EAAE;MAACC,CAAC,EAAE,CAAC;MAAEC,CAAC,EAAE,CAAC;MAAEC,CAAC,EAAE;IAAC;EACxC;AACF,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaZ,MAAM"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NAMESPACE","CONSTANTS","_default","exports","default"],"sources":["scheduler.constants.js"],"sourcesContent":["// Namespace to store this plugin under within `webex` or `webex.internal`.\nconst NAMESPACE = 'scheduler';\n\nconst CONSTANTS = {\n NAMESPACE,\n};\n\nexport default CONSTANTS;\n"],"mappings":";;;;;;;AAAA;AACA,IAAMA,SAAS,GAAG,WAAW;AAE7B,IAAMC,SAAS,GAAG;EAChBD,SAAS,EAATA;AACF,CAAC;AAAC,IAAAE,QAAA,
|
|
1
|
+
{"version":3,"names":["NAMESPACE","CONSTANTS","_default","exports","default"],"sources":["scheduler.constants.js"],"sourcesContent":["// Namespace to store this plugin under within `webex` or `webex.internal`.\nconst NAMESPACE = 'scheduler';\n\nconst CONSTANTS = {\n NAMESPACE,\n};\n\nexport default CONSTANTS;\n"],"mappings":";;;;;;;AAAA;AACA,IAAMA,SAAS,GAAG,WAAW;AAE7B,IAAMC,SAAS,GAAG;EAChBD,SAAS,EAATA;AACF,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaH,SAAS"}
|
|
@@ -24,12 +24,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
|
|
|
24
24
|
var Scheduler = /*#__PURE__*/function (_WebexPlugin) {
|
|
25
25
|
(0, _inherits2.default)(Scheduler, _WebexPlugin);
|
|
26
26
|
var _super = _createSuper(Scheduler);
|
|
27
|
-
/**
|
|
28
|
-
* Namespace, or key, to register a `Scheduler` class object to within the
|
|
29
|
-
* `webex.internal` object. Note that only one instance of this class can be
|
|
30
|
-
* used against a single `webex` class instance.
|
|
31
|
-
*/
|
|
32
|
-
|
|
33
27
|
/**
|
|
34
28
|
* @param {Object} args Arguments for constructing a new Scheduler instance.
|
|
35
29
|
*/
|
|
@@ -54,6 +48,11 @@ var Scheduler = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
54
48
|
* The `this.logger` object should now be available for usage.
|
|
55
49
|
* `this.logger.log()`, `this.logger.error()`, `this.logger.warn()`, etc.
|
|
56
50
|
*/
|
|
51
|
+
/**
|
|
52
|
+
* Namespace, or key, to register a `Scheduler` class object to within the
|
|
53
|
+
* `webex.internal` object. Note that only one instance of this class can be
|
|
54
|
+
* used against a single `webex` class instance.
|
|
55
|
+
*/
|
|
57
56
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "namespace", _scheduler.default.NAMESPACE);
|
|
58
57
|
_this.logger.log('plugin example constructed'); // example, remove this.
|
|
59
58
|
return _this;
|
|
@@ -191,6 +190,5 @@ var Scheduler = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
191
190
|
}]);
|
|
192
191
|
return Scheduler;
|
|
193
192
|
}(_webexCore.WebexPlugin);
|
|
194
|
-
var _default = Scheduler;
|
|
195
|
-
exports.default = _default;
|
|
193
|
+
var _default = exports.default = Scheduler;
|
|
196
194
|
//# sourceMappingURL=scheduler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_webexCore","require","_scheduler","_interopRequireDefault","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","Scheduler","_WebexPlugin","_inherits2","_super","_this","_classCallCheck2","_len","length","args","Array","_key","concat","_defineProperty2","_assertThisInitialized2","CONSTANTS","NAMESPACE","logger","log","_createClass2","key","value","initialize","listenToOnce","webex","exampleRequestUsage","request","method","service","resource","uri","headers","accept","authorization","body","exampleEventUsage","_this2","on","event","off","internal","scheduler","listenTo","pluginName","stopListening","exampleMercuryConnection","_this3","mercury","connect","then","handler","trigger","WebexPlugin","_default","exports"],"sources":["scheduler.js"],"sourcesContent":["import {WebexPlugin} from '@webex/webex-core';\n\nimport CONSTANTS from './scheduler.constants';\n\n/**\n * Scheduler WebexPlugin class.\n */\nclass Scheduler extends WebexPlugin {\n /**\n * Namespace, or key, to register a `Scheduler` class object to within the\n * `webex.internal` object. Note that only one instance of this class can be\n * used against a single `webex` class instance.\n */\n namespace = CONSTANTS.NAMESPACE;\n\n /**\n * @param {Object} args Arguments for constructing a new Scheduler instance.\n */\n constructor(...args) {\n super(...args); // Required to properly mount the singleton class instance.\n\n /**\n * The `this.request` method should now be available for usage.\n * See `http-core` for this tooling.\n */\n\n /**\n * The mercury connection is available for initialization\n */\n\n /**\n * The `this.logger` object should now be available for usage.\n * `this.logger.log()`, `this.logger.error()`, `this.logger.warn()`, etc.\n */\n this.logger.log('plugin example constructed'); // example, remove this.\n }\n\n /**\n * WebexPlugin initialize method. This triggers once Webex has completed its\n * initialization workflow.\n *\n * If the plugin is meant to perform startup actions, place them in this\n * `initialize()` method instead of the `constructor()` method.\n * @returns {void}\n */\n initialize() {\n // Used to perform actions based on the provided configuration object once\n // the configuration object is ready.\n this.listenToOnce(this.webex, 'change:config', () => {\n /* ...perform actions once the configuration object is mounted... */\n });\n\n // Used to perform actions after webex is fully qualified and ready for\n // operation.\n this.listenToOnce(this.webex, 'ready', () => {\n /* ...perform actions once the webex object is fully qualified... */\n });\n }\n\n /**\n * Example request usage. `this.request` returns a promise using XHR. and the\n * `request` npm package.\n * @returns {void}\n */\n exampleRequestUsage() {\n // Simple example\n this.request({\n method: 'GET', // method to use for this request\n service: 'example-service', // `service` is federated from U2C. See `this.webex.services.list()` at runtime.\n resource: 'example/resource/path', // full resource path,\n });\n\n // Complex example\n return this.request({\n uri: 'https://www.example.com', // a URI can be used in place of service/resource.\n method: 'POST',\n headers: {\n accept: 'application/json',\n authorization: 'example-token',\n 'x-custom-header': 'x-custom-header-example-value',\n },\n body: {\n 'example-param-a': 'example-param-a-value',\n 'example-param-b': 'example-param-b-value',\n 'example-param-c': 'example-param-c-value',\n },\n });\n }\n\n /**\n * Example event usage. Note that an event engine is mapped to `this`\n * upon extending the `WebexPlugin` class constructor. This includes\n * the following methods:\n * `this.listenTo()`, `this.stopListening()`, `this.trigger()`, `this.on()`, etc.\n *\n * Note that all methods provided as event handlers should be associated with\n * a namespace so that they can be referenced/destroyed if/when necessary.\n *\n * @returns {void}\n */\n exampleEventUsage() {\n // listen for locally scoped events [using on, internal]\n this.on('event:scope', (event) => {\n this.logger.log(event);\n });\n\n // stop listening for locally scoped events.\n this.off('event:scope', () => {\n /* use previous `on` method param namespace instead of arrow function */\n });\n\n // listen for scoped events [using on, external], replace `this.webex` with `webex` namespace.\n this.webex.internal.scheduler.on('event:scope', (event) => {\n this.logger.log(event);\n });\n\n // stop listening for scoped events [using on, external], replace `this.webex` with `webex` namespace.\n this.webex.internal.scheduler.off('event:scope', () => {\n /* use previous `on` method param namespace instead of arrow function */\n });\n\n // listen for scoped events [using listenTo(), plugin-to-plugin].\n this.listenTo(this.webex.pluginName, 'event:scope', (event) => {\n this.logger.log(event);\n });\n\n // stop listening for scoped events [using listenTo(), plugin-to-plugin].\n this.stopListening(this.webex.pluginName, 'event:scope', () => {\n /* use previous `listenTo` method param namespace instead of arrow function */\n });\n }\n\n /**\n * Example mercury connection setup. See the above `exampleEventUsage()` for\n * event usage definition.\n *\n * @returns {void}\n */\n exampleMercuryConnection() {\n this.webex.internal.mercury.connect().then(() => {\n // Scope this listener to a trackable namespace\n this.handler = (event) => {\n this.logger.log(event);\n this.trigger('event:scope', event);\n };\n\n // Start handling events.\n this.listenTo(this.webex.internal.mercury, 'event:scope', this.handler);\n\n // Stop handling events.\n this.stopListening(this.webex.internal.mercury, 'event:scope', this.handler);\n });\n }\n}\n\nexport default Scheduler;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA8C,SAAAG,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG,WAAA,EAAAF,MAAA,GAAAG,kBAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAH,SAAA,YAAAD,MAAA,GAAAH,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,CAAAP,OAAA,QAAA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AA,GAoJpBpD,SAAS;AAAAqD,OAAA,CAAArE,OAAA,GAAAoE,QAAA"}
|
|
1
|
+
{"version":3,"names":["_webexCore","require","_scheduler","_interopRequireDefault","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","Scheduler","_WebexPlugin","_inherits2","_super","_this","_classCallCheck2","_len","length","args","Array","_key","concat","_defineProperty2","_assertThisInitialized2","CONSTANTS","NAMESPACE","logger","log","_createClass2","key","value","initialize","listenToOnce","webex","exampleRequestUsage","request","method","service","resource","uri","headers","accept","authorization","body","exampleEventUsage","_this2","on","event","off","internal","scheduler","listenTo","pluginName","stopListening","exampleMercuryConnection","_this3","mercury","connect","then","handler","trigger","WebexPlugin","_default","exports"],"sources":["scheduler.js"],"sourcesContent":["import {WebexPlugin} from '@webex/webex-core';\n\nimport CONSTANTS from './scheduler.constants';\n\n/**\n * Scheduler WebexPlugin class.\n */\nclass Scheduler extends WebexPlugin {\n /**\n * Namespace, or key, to register a `Scheduler` class object to within the\n * `webex.internal` object. Note that only one instance of this class can be\n * used against a single `webex` class instance.\n */\n namespace = CONSTANTS.NAMESPACE;\n\n /**\n * @param {Object} args Arguments for constructing a new Scheduler instance.\n */\n constructor(...args) {\n super(...args); // Required to properly mount the singleton class instance.\n\n /**\n * The `this.request` method should now be available for usage.\n * See `http-core` for this tooling.\n */\n\n /**\n * The mercury connection is available for initialization\n */\n\n /**\n * The `this.logger` object should now be available for usage.\n * `this.logger.log()`, `this.logger.error()`, `this.logger.warn()`, etc.\n */\n this.logger.log('plugin example constructed'); // example, remove this.\n }\n\n /**\n * WebexPlugin initialize method. This triggers once Webex has completed its\n * initialization workflow.\n *\n * If the plugin is meant to perform startup actions, place them in this\n * `initialize()` method instead of the `constructor()` method.\n * @returns {void}\n */\n initialize() {\n // Used to perform actions based on the provided configuration object once\n // the configuration object is ready.\n this.listenToOnce(this.webex, 'change:config', () => {\n /* ...perform actions once the configuration object is mounted... */\n });\n\n // Used to perform actions after webex is fully qualified and ready for\n // operation.\n this.listenToOnce(this.webex, 'ready', () => {\n /* ...perform actions once the webex object is fully qualified... */\n });\n }\n\n /**\n * Example request usage. `this.request` returns a promise using XHR. and the\n * `request` npm package.\n * @returns {void}\n */\n exampleRequestUsage() {\n // Simple example\n this.request({\n method: 'GET', // method to use for this request\n service: 'example-service', // `service` is federated from U2C. See `this.webex.services.list()` at runtime.\n resource: 'example/resource/path', // full resource path,\n });\n\n // Complex example\n return this.request({\n uri: 'https://www.example.com', // a URI can be used in place of service/resource.\n method: 'POST',\n headers: {\n accept: 'application/json',\n authorization: 'example-token',\n 'x-custom-header': 'x-custom-header-example-value',\n },\n body: {\n 'example-param-a': 'example-param-a-value',\n 'example-param-b': 'example-param-b-value',\n 'example-param-c': 'example-param-c-value',\n },\n });\n }\n\n /**\n * Example event usage. Note that an event engine is mapped to `this`\n * upon extending the `WebexPlugin` class constructor. This includes\n * the following methods:\n * `this.listenTo()`, `this.stopListening()`, `this.trigger()`, `this.on()`, etc.\n *\n * Note that all methods provided as event handlers should be associated with\n * a namespace so that they can be referenced/destroyed if/when necessary.\n *\n * @returns {void}\n */\n exampleEventUsage() {\n // listen for locally scoped events [using on, internal]\n this.on('event:scope', (event) => {\n this.logger.log(event);\n });\n\n // stop listening for locally scoped events.\n this.off('event:scope', () => {\n /* use previous `on` method param namespace instead of arrow function */\n });\n\n // listen for scoped events [using on, external], replace `this.webex` with `webex` namespace.\n this.webex.internal.scheduler.on('event:scope', (event) => {\n this.logger.log(event);\n });\n\n // stop listening for scoped events [using on, external], replace `this.webex` with `webex` namespace.\n this.webex.internal.scheduler.off('event:scope', () => {\n /* use previous `on` method param namespace instead of arrow function */\n });\n\n // listen for scoped events [using listenTo(), plugin-to-plugin].\n this.listenTo(this.webex.pluginName, 'event:scope', (event) => {\n this.logger.log(event);\n });\n\n // stop listening for scoped events [using listenTo(), plugin-to-plugin].\n this.stopListening(this.webex.pluginName, 'event:scope', () => {\n /* use previous `listenTo` method param namespace instead of arrow function */\n });\n }\n\n /**\n * Example mercury connection setup. See the above `exampleEventUsage()` for\n * event usage definition.\n *\n * @returns {void}\n */\n exampleMercuryConnection() {\n this.webex.internal.mercury.connect().then(() => {\n // Scope this listener to a trackable namespace\n this.handler = (event) => {\n this.logger.log(event);\n this.trigger('event:scope', event);\n };\n\n // Start handling events.\n this.listenTo(this.webex.internal.mercury, 'event:scope', this.handler);\n\n // Stop handling events.\n this.stopListening(this.webex.internal.mercury, 'event:scope', this.handler);\n });\n }\n}\n\nexport default Scheduler;\n"],"mappings":";;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AAA8C,SAAAG,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG,WAAA,EAAAF,MAAA,GAAAG,kBAAA,CAAAN,KAAA,EAAAO,SAAA,EAAAH,SAAA,YAAAD,MAAA,GAAAH,KAAA,CAAAQ,KAAA,OAAAD,SAAA,gBAAAE,2BAAA,CAAAP,OAAA,QAAAC,MAAA;AAAA,SAAAL,0BAAA,eAAAY,OAAA,qBAAAJ,kBAAA,oBAAAA,kBAAA,CAAAK,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAAC,SAAA,CAAAC,OAAA,CAAAC,IAAA,CAAAV,kBAAA,CAAAO,OAAA,8CAAAI,CAAA;AAE9C;AACA;AACA;AAFA,IAGMC,SAAS,0BAAAC,YAAA;EAAA,IAAAC,UAAA,CAAAlB,OAAA,EAAAgB,SAAA,EAAAC,YAAA;EAAA,IAAAE,MAAA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AAG,CAACoB,KAAK,CAAC;MACxB,CAAC,CAAC;;MAEF;MACA,IAAI,CAACM,aAAa,CAAC,IAAI,CAACpB,KAAK,CAACmB,UAAU,EAAE,aAAa,EAAE,YAAM;QAC7D;MAAA,CACD,CAAC;IACJ;;IAEA;AACF;AACA;AACA;AACA;AACA;EALE;IAAAvB,GAAA;IAAAC,KAAA,EAMA,SAAAwB,yBAAA,EAA2B;MAAA,IAAAC,MAAA;MACzB,IAAI,CAACtB,KAAK,CAACgB,QAAQ,CAACO,OAAO,CAACC,OAAO,CAAC,CAAC,CAACC,IAAI,CAAC,YAAM;QAC/C;QACAH,MAAI,CAACI,OAAO,GAAG,UAACZ,KAAK,EAAK;UACxBQ,MAAI,CAAC7B,MAAM,CAACC,GAAG,CAACoB,KAAK,CAAC;UACtBQ,MAAI,CAACK,OAAO,CAAC,aAAa,EAAEb,KAAK,CAAC;QACpC,CAAC;;QAED;QACAQ,MAAI,CAACJ,QAAQ,CAACI,MAAI,CAACtB,KAAK,CAACgB,QAAQ,CAACO,OAAO,EAAE,aAAa,EAAED,MAAI,CAACI,OAAO,CAAC;;QAEvE;QACAJ,MAAI,CAACF,aAAa,CAACE,MAAI,CAACtB,KAAK,CAACgB,QAAQ,CAACO,OAAO,EAAE,aAAa,EAAED,MAAI,CAACI,OAAO,CAAC;MAC9E,CAAC,CAAC;IACJ;EAAC;EAAA,OAAAjD,SAAA;AAAA,EAjJqBmD,sBAAW;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAArE,OAAA,GAoJpBgB,SAAS"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/internal-plugin-scheduler",
|
|
3
|
-
"version": "2.60.1",
|
|
4
3
|
"description": "",
|
|
5
4
|
"license": "MIT",
|
|
6
5
|
"main": "dist/index.js",
|
|
@@ -21,14 +20,14 @@
|
|
|
21
20
|
},
|
|
22
21
|
"devDependencies": {
|
|
23
22
|
"@babel/core": "^7.17.10",
|
|
24
|
-
"@webex/babel-config-legacy": "
|
|
25
|
-
"@webex/eslint-config-legacy": "
|
|
26
|
-
"@webex/jest-config-legacy": "
|
|
27
|
-
"@webex/legacy-tools": "
|
|
28
|
-
"@webex/test-helper-chai": "
|
|
29
|
-
"@webex/test-helper-mocha": "
|
|
30
|
-
"@webex/test-helper-mock-webex": "
|
|
31
|
-
"@webex/test-helper-test-users": "
|
|
23
|
+
"@webex/babel-config-legacy": "0.0.0",
|
|
24
|
+
"@webex/eslint-config-legacy": "0.0.0",
|
|
25
|
+
"@webex/jest-config-legacy": "0.0.0",
|
|
26
|
+
"@webex/legacy-tools": "0.0.0",
|
|
27
|
+
"@webex/test-helper-chai": "3.0.0",
|
|
28
|
+
"@webex/test-helper-mocha": "3.0.0",
|
|
29
|
+
"@webex/test-helper-mock-webex": "3.0.0",
|
|
30
|
+
"@webex/test-helper-test-users": "3.0.0",
|
|
32
31
|
"chai": "^4.3.4",
|
|
33
32
|
"chai-as-promised": "^7.1.1",
|
|
34
33
|
"eslint": "^8.24.0",
|
|
@@ -36,14 +35,14 @@
|
|
|
36
35
|
"sinon": "^9.2.4"
|
|
37
36
|
},
|
|
38
37
|
"dependencies": {
|
|
39
|
-
"@webex/common": "
|
|
40
|
-
"@webex/common-timers": "
|
|
41
|
-
"@webex/http-core": "
|
|
42
|
-
"@webex/internal-plugin-device": "
|
|
43
|
-
"@webex/internal-plugin-encryption": "
|
|
44
|
-
"@webex/internal-plugin-mercury": "
|
|
45
|
-
"@webex/internal-plugin-metrics": "
|
|
46
|
-
"@webex/webex-core": "
|
|
38
|
+
"@webex/common": "3.0.0",
|
|
39
|
+
"@webex/common-timers": "3.0.0",
|
|
40
|
+
"@webex/http-core": "3.0.0",
|
|
41
|
+
"@webex/internal-plugin-device": "3.0.0",
|
|
42
|
+
"@webex/internal-plugin-encryption": "3.0.0",
|
|
43
|
+
"@webex/internal-plugin-mercury": "3.0.0",
|
|
44
|
+
"@webex/internal-plugin-metrics": "3.0.0",
|
|
45
|
+
"@webex/webex-core": "3.0.0",
|
|
47
46
|
"ampersand-collection": "^2.0.2",
|
|
48
47
|
"ampersand-state": "^5.0.3",
|
|
49
48
|
"lodash": "^4.17.21"
|
|
@@ -51,10 +50,11 @@
|
|
|
51
50
|
"scripts": {
|
|
52
51
|
"build": "yarn build:src",
|
|
53
52
|
"build:src": "webex-legacy-tools build -dest \"./dist\" -src \"./src\" -js -ts -maps",
|
|
53
|
+
"deploy:npm": "yarn npm publish",
|
|
54
54
|
"test": "yarn test:style && yarn test:unit && yarn test:integration && yarn test:browser",
|
|
55
|
-
"test:browser
|
|
56
|
-
"test:integration": "webex-legacy-tools test --integration --runner mocha",
|
|
55
|
+
"test:browser": "webex-legacy-tools test --integration --runner karma",
|
|
57
56
|
"test:style": "eslint ./src/**/*.*",
|
|
58
57
|
"test:unit": "webex-legacy-tools test --unit --runner jest"
|
|
59
|
-
}
|
|
60
|
-
|
|
58
|
+
},
|
|
59
|
+
"version": "3.0.0"
|
|
60
|
+
}
|