Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@goodgamestudios/cxf-announcements

Package Overview
Dependencies
Maintainers
15
Versions
339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@goodgamestudios/cxf-announcements - npm Package Compare versions

Comparing version 0.3.0-qa.1 to 0.5.0-qa.0

dist/templates/announcement-bf.26f04625.css

82

CHANGELOG.md

@@ -5,4 +5,4 @@ # Change Log

<a name="0.3.0-qa.1"></a>
# [0.3.0-qa.1](https://gitlab.goodgamestudios.com/cxf/announcements/compare/v0.3.0-qa.0...v0.3.0-qa.1) (2018-12-14)
<a name="0.5.0-qa.0"></a>
# [0.5.0-qa.0](https://gitlab.goodgamestudios.com/cxf/announcements/compare/v0.2.0-qa.0...v0.5.0-qa.0) (2019-02-08)

@@ -12,34 +12,78 @@

* change firefox flash bg ([0d59099](https://gitlab.goodgamestudios.com/cxf/announcements/commit/0d59099))
* no need for em ([93375d0](https://gitlab.goodgamestudios.com/cxf/announcements/commit/93375d0))
* added rejection of Promise by throwing Error ([7947fd0](https://gitlab.goodgamestudios.com/cxf/announcements/commit/7947fd0))
* package.version is below version num already published ([af8bada](https://gitlab.goodgamestudios.com/cxf/announcements/commit/af8bada))
* remove the commented code ([aad61c8](https://gitlab.goodgamestudios.com/cxf/announcements/commit/aad61c8))
### Features
<a name="0.3.0-qa.0"></a>
# [0.3.0-qa.0](https://gitlab.goodgamestudios.com/cxf/announcements/compare/v0.3.0-dev.0...v0.3.0-qa.0) (2018-12-12)
* adjusted behaviour of the announcement during message preview ([22430ec](https://gitlab.goodgamestudios.com/cxf/announcements/commit/22430ec))
<a name="0.3.0-dev.0"></a>
# 0.3.0-dev.0 (2018-12-12)
<a name="0.3.0-dev.12"></a>
# [0.3.0-dev.12](https://gitlab.goodgamestudios.com/cxf/announcements/compare/v0.3.0-dev.11...v0.3.0-dev.12) (2019-02-08)
### Bug Fixes
### Features
* broken path for empire bkg ([f0b333e](https://gitlab.goodgamestudios.com/cxf/announcements/commit/f0b333e))
* broken property path. get value of element id ([07022e6](https://gitlab.goodgamestudios.com/cxf/announcements/commit/07022e6))
* RA-41181 fix firefox flash integration page announcement not show ([92afbb0](https://gitlab.goodgamestudios.com/cxf/announcements/commit/92afbb0))
* restored fix from STP-409 that was lost after mergeconflicts ([ccb9f86](https://gitlab.goodgamestudios.com/cxf/announcements/commit/ccb9f86))
* use postMessage to avoid crossscripting issue when closing iframe ([98e5eb6](https://gitlab.goodgamestudios.com/cxf/announcements/commit/98e5eb6))
* vertical text layout ([7244715](https://gitlab.goodgamestudios.com/cxf/announcements/commit/7244715))
* adjusted behaviour of the announcement during message preview ([22430ec](https://gitlab.goodgamestudios.com/cxf/announcements/commit/22430ec))
### Features
* add adapters for each game to handle logic of parsing commands ([306f65f](https://gitlab.goodgamestudios.com/cxf/announcements/commit/306f65f))
* add e4k template ([1ea1a5c](https://gitlab.goodgamestudios.com/cxf/announcements/commit/1ea1a5c))
* added ava sinon and xo for unit tests stubbing and linting - xo still disabled because of missing configuration ([c525e4b](https://gitlab.goodgamestudios.com/cxf/announcements/commit/c525e4b))
<a name="0.3.0-dev.11"></a>
# [0.3.0-dev.11](https://gitlab.goodgamestudios.com/cxf/announcements/compare/v0.3.0-dev.10...v0.3.0-dev.11) (2019-02-08)
<a name="0.3.0-dev.10"></a>
# [0.3.0-dev.10](https://gitlab.goodgamestudios.com/cxf/announcements/compare/v0.3.0-dev.9...v0.3.0-dev.10) (2019-02-08)
<a name="0.3.0-dev.9"></a>
# [0.3.0-dev.9](https://gitlab.goodgamestudios.com/cxf/announcements/compare/v0.3.0-dev.8...v0.3.0-dev.9) (2019-02-07)
<a name="0.3.0-dev.8"></a>
# [0.3.0-dev.8](https://gitlab.goodgamestudios.com/cxf/announcements/compare/v0.3.0-dev.7...v0.3.0-dev.8) (2019-02-07)
<a name="0.3.0-dev.7"></a>
# [0.3.0-dev.7](https://gitlab.goodgamestudios.com/cxf/announcements/compare/v0.3.0-dev.6...v0.3.0-dev.7) (2019-02-07)
<a name="0.3.0-dev.6"></a>
# [0.3.0-dev.6](https://gitlab.goodgamestudios.com/cxf/announcements/compare/v0.3.0-dev.5...v0.3.0-dev.6) (2019-02-07)
<a name="0.3.0-dev.5"></a>
# [0.3.0-dev.5](https://gitlab.goodgamestudios.com/cxf/announcements/compare/v0.3.0-dev.4...v0.3.0-dev.5) (2019-02-07)
<a name="0.3.0-dev.4"></a>
# [0.3.0-dev.4](https://gitlab.goodgamestudios.com/cxf/announcements/compare/v0.3.0-dev.3...v0.3.0-dev.4) (2019-02-07)
<a name="0.3.0-dev.3"></a>
# [0.3.0-dev.3](https://gitlab.goodgamestudios.com/cxf/announcements/compare/v0.3.0-dev.2...v0.3.0-dev.3) (2019-02-07)
<a name="0.3.0-dev.2"></a>
# [0.3.0-dev.2](https://gitlab.goodgamestudios.com/cxf/announcements/compare/v0.2.0-qa.0...v0.3.0-dev.2) (2019-02-07)
<a name="0.2.0-dev.0"></a>
# [0.2.0-dev.0](https://gitlab.goodgamestudios.com/cxf/announcements/compare/v0.2.0-qa.0...v0.2.0-dev.0) (2019-02-06)
<a name="0.2.0-qa.0"></a>

@@ -46,0 +90,0 @@ # [0.2.0-qa.0](https://gitlab.goodgamestudios.com/cxf/announcements/compare/v0.2.0-dev.0...v0.2.0-qa.0) (2018-12-11)

@@ -32,3 +32,3 @@ parcelRequire=function(e,r,n,t){var i="function"==typeof parcelRequire&&parcelRequire,o="function"==typeof require&&require;function u(n,t){if(!r[n]){if(!e[n]){var f="function"==typeof parcelRequire&&parcelRequire;if(!t&&f)return f(n,!0);if(i)return i(n,!0);if(o&&"string"==typeof n)return o(n);var c=new Error("Cannot find module '"+n+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[n][1][r]||r},p.cache={};var l=r[n]=new u.Module(n);e[n][0].call(l.exports,p,l,l.exports,this)}return r[n].exports;function p(e){return u(p.resolve(e))}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=r,u.parent=i,u.register=function(r,n){e[r]=[function(e,r){r.exports=n},{}]};for(var f=0;f<n.length;f++)u(n[f]);if(n.length){var c=u(n[n.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd?define(function(){return c}):t&&(this[t]=c)}return u}({"OUZ9":[function(require,module,exports) {

},{"./utils":"FO+Z"}],"hRFt":[function(require,module,exports) {
"use strict";var e=a(require("@babel/runtime/regenerator")),n=a(require("@babel/runtime/helpers/slicedToArray")),t=a(require("@babel/runtime/helpers/asyncToGenerator"));function a(e){return e&&e.__esModule?e:{default:e}}require("url-search-params-polyfill");var r=require("./utils"),o=r.appendLoginParams,s=require("./window-handlers"),i=function(e,n,t,a){var r=[e,n,t,a].join("_");return"ggs.cxf.announcements.".concat(r,".lastMessageHash")},l=function(e,n){var t=n.game,a=n.appendHtmlTagFor;return function(n,r){var o=r.network,s=r.instance,l=r.lang,u=r.playername;if(n.message&&n.message[l]){var c=i(t,u,o,s),g=n.message_hash;if(g!==localStorage.getItem(c)){var m=JSON.stringify({key:c,currentMessageHash:g}),f=new URLSearchParams({game:t,lang:l,network:o,instance:s,hash:m}),d="";if(/firefox|iceweasel|fxios/i.test(window.navigator.userAgent)){var h=document.querySelector("object#flashcontent>param[name=wmode]");h&&"direct"===h.getAttribute("value")&&(d+="&noAlpha=1")}var p="".concat(e).concat(t,"_announcement.html?").concat(f.toString()+d),w=a(p);return console.log("shown message ",w),w}console.warn("ignoring message since it was already displayed once. to re-enable it, please delete ggs.cxf.announcements local storage")}else console.warn("ignoring message since there is no translation for the current language: ",l)}};function u(e,n,t){return c.apply(this,arguments)}function c(){return(c=(0,t.default)(e.default.mark(function n(t,a,r){return e.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=o(t,r),e.abrupt("return",fetch(t).then(function(e){return e.json()}).then(function(e){e.message&&0!==Object.keys(e.message).length&&(console.log("Loaded and found a message for this lang | channel(network+instance)"),a(e,r))}).catch(function(e){return console.log("failed loading ".concat(t,": ").concat(e))}));case 2:case"end":return e.stop()}},n,this)}))).apply(this,arguments)}module.exports=function(e,t,a){var r=l("https://s3-eu-west-1.amazonaws.com/com.ggs.client-notification-runtime/test/announcements/templates/",e);return{initAnnouncements:function(o){Object.assign(o,t.getPlayerInfo(o.userdata));var i=function(){!function(n){u("https://evf0700w70.execute-api.eu-west-1.amazonaws.com/test/messages/"+e.game,r,n)}(o),a.subscribe(r,o),s()};if(o.level>t.lastTutorialLevel)return i();var l,c,g;console.warn(" still during tutorial, need to wait until tutorial finishes"),e.off(t.levelUpCmd,module.exports.placeholder),e.on(t.levelUpCmd,(c=(l=t).getLevel,g=l.lastTutorialLevel,function(e){var t=(0,n.default)(e,1)[0],a=c(t),r=g+1;console.log("NEW LEVEL ",a," minimum required is ",r),a>r||(a!==r?console.warn(" still during tutorial, need to wait until tutorial finishes"):i())}))},placeholder:function(){return console.log("do nothing")}}},module.exports.tests={loadCurrentMessages:u,handleAnnouncementMessage:l,getHashKey:i};
"use strict";var e=a(require("@babel/runtime/regenerator")),n=a(require("@babel/runtime/helpers/slicedToArray")),t=a(require("@babel/runtime/helpers/asyncToGenerator"));function a(e){return e&&e.__esModule?e:{default:e}}require("url-search-params-polyfill");var r=require("./utils"),s=r.appendLoginParams,o=require("./window-handlers"),i=function(e,n,t,a){var r=[e,n,t,a].join("_");return"ggs.cxf.announcements.".concat(r,".lastMessageHash")},l=function(e,n){var t=n.game,a=n.appendHtmlTagFor;return function(n,r){var s=r.network,o=r.instance,l=r.lang,u=r.playername;if(n.message&&n.message[l]){var c=i(t,u,s,o),g=n.message_hash;if(g!==localStorage.getItem(c)){var m=JSON.stringify({key:c,currentMessageHash:g}),f=new URLSearchParams({game:t,lang:l,network:s,instance:o,hash:m}),d="".concat(e).concat(t,"_announcement.html?").concat(f.toString()),h=a(d);return console.log("shown message ",h),h}console.warn("ignoring message since it was already displayed once. to re-enable it, please delete ggs.cxf.announcements local storage")}else console.warn("ignoring message since there is no translation for the current language: ",l)}};function u(e,n,t){return c.apply(this,arguments)}function c(){return(c=(0,t.default)(e.default.mark(function n(t,a,r){return e.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=s(t,r),e.abrupt("return",fetch(t).then(function(e){return e.json()}).then(function(e){e.message&&0!==Object.keys(e.message).length&&(console.log("Loaded and found a message for this lang | channel(network+instance)"),a(e,r))}).catch(function(e){return console.log("failed loading ".concat(t,": ").concat(e))}));case 2:case"end":return e.stop()}},n,this)}))).apply(this,arguments)}module.exports=function(e,t,a){var r=l("https://s3-eu-west-1.amazonaws.com/com.ggs.client-notification-runtime/test/announcements/templates/",e);return{initAnnouncements:function(s){Object.assign(s,t.getPlayerInfo(s.userdata));var i=function(){!function(n){u("https://evf0700w70.execute-api.eu-west-1.amazonaws.com/test/messages/"+e.game,r,n)}(s),a.subscribe(r,s),o()};if(s.level>t.lastTutorialLevel)return i();var l,c,g;console.warn(" still during tutorial, need to wait until tutorial finishes"),e.off(t.levelUpCmd,module.exports.placeholder),e.on(t.levelUpCmd,(c=(l=t).getLevel,g=l.lastTutorialLevel,function(e){var t=(0,n.default)(e,1)[0],a=c(t),r=g+1;console.log("NEW LEVEL ",a," minimum required is ",r),a>r||(a!==r?console.warn(" still during tutorial, need to wait until tutorial finishes"):i())}))},placeholder:function(){return console.log("do nothing")}}},module.exports.tests={loadCurrentMessages:u,handleAnnouncementMessage:l,getHashKey:i};
},{"@babel/runtime/regenerator":"PMvg","@babel/runtime/helpers/slicedToArray":"69HE","@babel/runtime/helpers/asyncToGenerator":"agGE","url-search-params-polyfill":"L8PX","./utils":"FO+Z","./window-handlers":"T61a"}],"+uO6":[function(require,module,exports) {

@@ -35,0 +35,0 @@ "use strict";var e=n(require("@babel/runtime/helpers/slicedToArray"));function n(e){return e&&e.__esModule?e:{default:e}}function r(n){console.log("announcements initialized successfully - waiting for player login",n.game);var r=require("./pubnubsubscriber")(n.pubnub),a="empire"===n.game?require("./game-adapters/empire"):require("./game-adapters/bigfarm"),i=require("./announcements-private")(n,a,r),u=function(r){var a=(0,e.default)(r,4),u=a[0],o=a[1],l=a[2],t=a[3];i.initAnnouncements({userdata:u,lang:o,network:l,instance:t,game:n.game})};n.once(a.loginCmd,u),n.once(a.levelUpCmd,i.placeholder),n.once(3,u),n.once(24,i.placeholder)}r(window.CXF);

{
"name": "@goodgamestudios/cxf-announcements",
"version": "0.3.0-qa.1",
"version": "0.5.0-qa.0",
"main": "dist/announcements.js",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc