@webex/internal-plugin-scheduler 3.10.0-next.1 → 3.10.0-next.11
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 +1 -2
- package/dist/index.js.map +1 -1
- package/dist/payloadTransformer/index.js.map +1 -1
- package/dist/payloadTransformer/predicates.js.map +1 -1
- package/dist/payloadTransformer/transformers.js.map +1 -1
- package/dist/scheduler/index.js.map +1 -1
- package/dist/scheduler/scheduler.config.js.map +1 -1
- package/dist/scheduler/scheduler.constants.js.map +1 -1
- package/dist/scheduler/scheduler.js +7 -10
- package/dist/scheduler/scheduler.js.map +1 -1
- package/package.json +13 -13
package/dist/index.js
CHANGED
|
@@ -13,8 +13,7 @@ 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
|
|
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; }
|
|
16
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof _WeakMap) var r = new _WeakMap(), n = new _WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = _Object$defineProperty) && _Object$getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
18
17
|
// Import all plugins used within this plugin here, as they are singletons
|
|
19
18
|
// and must be mounted prior to any other mounting logic within this plugin.
|
|
20
19
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["require","_webexCore","_scheduler","_interopRequireWildcard","_payloadTransformer","_interopRequireDefault","
|
|
1
|
+
{"version":3,"names":["require","_webexCore","_scheduler","_interopRequireWildcard","_payloadTransformer","_interopRequireDefault","e","t","_WeakMap","r","n","__esModule","o","i","f","__proto__","default","_typeof","has","get","set","_t","hasOwnProperty","call","_Object$defineProperty","_Object$getOwnPropertyDescriptor","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;AAEA,IAAAE,UAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAC,sBAAA,CAAAL,OAAA;AAAsD,SAAAG,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,QAAA,MAAAC,CAAA,OAAAD,QAAA,IAAAE,CAAA,OAAAF,QAAA,YAAAL,uBAAA,YAAAA,wBAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,gBAAAW,OAAA,CAAAX,CAAA,0BAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAM,GAAA,CAAAZ,CAAA,UAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,GAAAM,CAAA,CAAAQ,GAAA,CAAAd,CAAA,EAAAQ,CAAA,cAAAO,EAAA,IAAAf,CAAA,gBAAAe,EAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAjB,CAAA,EAAAe,EAAA,OAAAR,CAAA,IAAAD,CAAA,GAAAY,sBAAA,KAAAC,gCAAA,CAAAnB,CAAA,EAAAe,EAAA,OAAAR,CAAA,CAAAM,GAAA,IAAAN,CAAA,CAAAO,GAAA,IAAAR,CAAA,CAAAE,CAAA,EAAAO,EAAA,EAAAR,CAAA,IAAAC,CAAA,CAAAO,EAAA,IAAAf,CAAA,CAAAe,EAAA,WAAAP,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAPtD;AACA;;AAQA;AACA,IAAAmB,iCAAsB,EAACC,oBAAS,CAACC,SAAS,EAAEC,kBAAS,EAAE;EACrDC,kBAAkB,EAAlBA,2BAAkB;EAClBC,MAAM,EAANA;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAjB,OAAA,GAEYa,kBAAS","ignoreList":[]}
|
|
@@ -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,GAAAC,OAAA,CAAAJ,OAAA,GAEaH,kBAAkB"}
|
|
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","ignoreList":[]}
|
|
@@ -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,
|
|
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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BE,wBAAwB,EAAxBA;AACF,CAAC;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAV,OAAA,GAEaQ,UAAU","ignoreList":[]}
|
|
@@ -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,
|
|
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,SAAJA,EAAEA,CAAGC,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,SAAJA,EAAEA,CAAGC,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,SAAJA,EAAEA,CAAGC,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","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
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
|
+
{"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","ignoreList":[]}
|
|
@@ -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,GAAAC,OAAA,CAAAC,OAAA,GAEaZ,MAAM"}
|
|
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","ignoreList":[]}
|
|
@@ -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,GAAAC,OAAA,CAAAC,OAAA,GAEaH,SAAS"}
|
|
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","ignoreList":[]}
|
|
@@ -9,21 +9,18 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
9
9
|
exports.default = void 0;
|
|
10
10
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
11
11
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
12
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
|
|
13
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
14
12
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
15
13
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
14
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
|
16
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
17
16
|
var _webexCore = require("@webex/webex-core");
|
|
18
17
|
var _scheduler = _interopRequireDefault(require("./scheduler.constants"));
|
|
19
|
-
function
|
|
20
|
-
function _isNativeReflectConstruct() {
|
|
18
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
19
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
21
20
|
/**
|
|
22
21
|
* Scheduler WebexPlugin class.
|
|
23
22
|
*/
|
|
24
23
|
var Scheduler = /*#__PURE__*/function (_WebexPlugin) {
|
|
25
|
-
(0, _inherits2.default)(Scheduler, _WebexPlugin);
|
|
26
|
-
var _super = _createSuper(Scheduler);
|
|
27
24
|
/**
|
|
28
25
|
* @param {Object} args Arguments for constructing a new Scheduler instance.
|
|
29
26
|
*/
|
|
@@ -33,7 +30,7 @@ var Scheduler = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
33
30
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
34
31
|
args[_key] = arguments[_key];
|
|
35
32
|
}
|
|
36
|
-
_this =
|
|
33
|
+
_this = _callSuper(this, Scheduler, [].concat(args)); // Required to properly mount the singleton class instance.
|
|
37
34
|
|
|
38
35
|
/**
|
|
39
36
|
* The `this.request` method should now be available for usage.
|
|
@@ -53,7 +50,7 @@ var Scheduler = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
53
50
|
* `webex.internal` object. Note that only one instance of this class can be
|
|
54
51
|
* used against a single `webex` class instance.
|
|
55
52
|
*/
|
|
56
|
-
(0, _defineProperty2.default)(
|
|
53
|
+
(0, _defineProperty2.default)(_this, "namespace", _scheduler.default.NAMESPACE);
|
|
57
54
|
_this.logger.log('plugin example constructed'); // example, remove this.
|
|
58
55
|
return _this;
|
|
59
56
|
}
|
|
@@ -66,7 +63,8 @@ var Scheduler = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
66
63
|
* `initialize()` method instead of the `constructor()` method.
|
|
67
64
|
* @returns {void}
|
|
68
65
|
*/
|
|
69
|
-
(0,
|
|
66
|
+
(0, _inherits2.default)(Scheduler, _WebexPlugin);
|
|
67
|
+
return (0, _createClass2.default)(Scheduler, [{
|
|
70
68
|
key: "initialize",
|
|
71
69
|
value: function initialize() {
|
|
72
70
|
// Used to perform actions based on the provided configuration object once
|
|
@@ -188,7 +186,6 @@ var Scheduler = /*#__PURE__*/function (_WebexPlugin) {
|
|
|
188
186
|
});
|
|
189
187
|
}
|
|
190
188
|
}]);
|
|
191
|
-
return Scheduler;
|
|
192
189
|
}(_webexCore.WebexPlugin);
|
|
193
190
|
var _default = exports.default = Scheduler;
|
|
194
191
|
//# 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,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,GAAA1B,YAAA,CAAAuB,SAAA;EAQb;AACF;AACA;EACE,SAAAA,UAAA,EAAqB;IAAA,IAAAI,KAAA;IAAA,IAAAC,gBAAA,CAAArB,OAAA,QAAAgB,SAAA;IAAA,SAAAM,IAAA,GAAAjB,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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"}
|
|
1
|
+
{"version":3,"names":["_webexCore","require","_scheduler","_interopRequireDefault","_callSuper","t","o","e","_getPrototypeOf2","default","_possibleConstructorReturn2","_isNativeReflectConstruct","_Reflect$construct","constructor","apply","Boolean","prototype","valueOf","call","Scheduler","_WebexPlugin","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","concat","_defineProperty2","CONSTANTS","NAMESPACE","logger","log","_inherits2","_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,WAAAC,CAAA,EAAAC,CA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CAACtB,KAAK,CAACgB,QAAQ,CAACO,OAAO,EAAE,aAAa,EAAED,MAAI,CAACI,OAAO,CAAC;MAC9E,CAAC,CAAC;IACJ;EAAC;AAAA,EAjJqBE,sBAAW;AAAA,IAAAC,QAAA,GAAAC,OAAA,CAAA9D,OAAA,GAoJpBU,SAAS","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"@webex/eslint-config-legacy": "0.0.0",
|
|
25
25
|
"@webex/jest-config-legacy": "0.0.0",
|
|
26
26
|
"@webex/legacy-tools": "0.0.0",
|
|
27
|
-
"@webex/test-helper-chai": "3.
|
|
28
|
-
"@webex/test-helper-mocha": "3.
|
|
29
|
-
"@webex/test-helper-mock-webex": "3.
|
|
30
|
-
"@webex/test-helper-test-users": "3.
|
|
27
|
+
"@webex/test-helper-chai": "3.10.0-next.1",
|
|
28
|
+
"@webex/test-helper-mocha": "3.10.0-next.1",
|
|
29
|
+
"@webex/test-helper-mock-webex": "3.10.0-next.1",
|
|
30
|
+
"@webex/test-helper-test-users": "3.10.0-next.1",
|
|
31
31
|
"chai": "^4.3.4",
|
|
32
32
|
"chai-as-promised": "^7.1.1",
|
|
33
33
|
"eslint": "^8.24.0",
|
|
@@ -35,14 +35,14 @@
|
|
|
35
35
|
"sinon": "^9.2.4"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@webex/common": "3.
|
|
39
|
-
"@webex/common-timers": "3.
|
|
40
|
-
"@webex/http-core": "3.
|
|
41
|
-
"@webex/internal-plugin-device": "3.10.0-next.
|
|
42
|
-
"@webex/internal-plugin-encryption": "3.10.0-next.
|
|
43
|
-
"@webex/internal-plugin-mercury": "3.10.0-next.
|
|
44
|
-
"@webex/internal-plugin-metrics": "3.10.0-next.
|
|
45
|
-
"@webex/webex-core": "3.10.0-next.
|
|
38
|
+
"@webex/common": "3.10.0-next.1",
|
|
39
|
+
"@webex/common-timers": "3.10.0-next.1",
|
|
40
|
+
"@webex/http-core": "3.10.0-next.1",
|
|
41
|
+
"@webex/internal-plugin-device": "3.10.0-next.11",
|
|
42
|
+
"@webex/internal-plugin-encryption": "3.10.0-next.11",
|
|
43
|
+
"@webex/internal-plugin-mercury": "3.10.0-next.11",
|
|
44
|
+
"@webex/internal-plugin-metrics": "3.10.0-next.11",
|
|
45
|
+
"@webex/webex-core": "3.10.0-next.11",
|
|
46
46
|
"ampersand-collection": "^2.0.2",
|
|
47
47
|
"ampersand-state": "^5.0.3",
|
|
48
48
|
"lodash": "^4.17.21"
|
|
@@ -56,5 +56,5 @@
|
|
|
56
56
|
"test:style": "eslint ./src/**/*.*",
|
|
57
57
|
"test:unit": "webex-legacy-tools test --unit --runner jest"
|
|
58
58
|
},
|
|
59
|
-
"version": "3.10.0-next.
|
|
59
|
+
"version": "3.10.0-next.11"
|
|
60
60
|
}
|