add namespace to package version
authorJustin Wind <justin.wind+git@gmail.com>
Sat, 9 Oct 2021 19:19:33 +0000 (12:19 -0700)
committerJustin Wind <justin.wind+git@gmail.com>
Sat, 9 Oct 2021 19:19:33 +0000 (12:19 -0700)
package.json
src/communication.js

index 893bb20ea0234c903aebcc048bba44a8eff1c64e..7ec14c546b45a0cc651fbe00a9ac48f141e4821a 100644 (file)
@@ -1,5 +1,5 @@
 {
-  "name": "websub-hub",
+  "name": "@squeep/websub-hub",
   "version": "1.2.2",
   "description": "A WebSub Hub server implementation.",
   "main": "server.js",
index b11237794b7b340da470c7b2740bf3d2b5087c25..03cc670dd7154ccc64a50b87f4d7bb1d5eddafb3 100644 (file)
@@ -57,7 +57,7 @@ class Communication {
   static userAgentString(userAgentConfig) {
     // eslint-disable-next-line security/detect-object-injection
     const _conf = (field, def) => (userAgentConfig && field in userAgentConfig) ? userAgentConfig[field] : def;
-    const product = _conf('product', packageName);
+    const product = _conf('product', packageName).split('/').pop();
     const version = _conf('version', packageVersion);
     let implementation = _conf('implementation', Enum.Specification);
     if (implementation) {