@shakerquiz/utilities 0.3.5 → 0.3.6
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/package.json +1 -1
- package/source/functions/origin.js +29 -29
package/package.json
CHANGED
|
@@ -28,40 +28,40 @@ export var setServiceNetworkOrigins = origins => {
|
|
|
28
28
|
`Network '${network}' must be listed in 'Networks'.`,
|
|
29
29
|
)
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
var origin = origins[service][network]
|
|
32
|
+
|
|
33
|
+
ServiceNetworkOrigins
|
|
34
|
+
.get(service)
|
|
35
|
+
.set(network, origin)
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
for (var feature of ServiceFeatures[service]) {
|
|
38
|
+
if (!(feature in Features))
|
|
39
|
+
throw TypeError(
|
|
40
|
+
`Feature '${feature}' must be listed in 'Features'.`,
|
|
41
|
+
)
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
43
|
+
if (!(feature in FeaturePathnames))
|
|
44
|
+
throw TypeError(
|
|
45
|
+
`Feature '${feature}' must be listed in 'FeaturePathnames'.`,
|
|
46
|
+
)
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
48
|
+
if (!ServiceFeatureNetworkURLs.has(service))
|
|
49
|
+
throw TypeError(
|
|
50
|
+
`Service '${service}' must be listed in 'ServiceFeatureNetworkURLs'.`,
|
|
51
|
+
)
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
if (!ServiceFeatureNetworkURLs.get(service).has(feature))
|
|
54
|
+
throw TypeError(
|
|
55
|
+
`Feature '${feature}' must be listed in 'ServiceFeatureNetworkURLs[${service}]'.`,
|
|
56
|
+
)
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
58
|
+
ServiceFeatureNetworkURLs
|
|
59
|
+
.get(service)
|
|
60
|
+
.get(feature)
|
|
61
|
+
.set(
|
|
62
|
+
network,
|
|
63
|
+
url.bind(undefined, origin, FeaturePathnames[feature]),
|
|
64
|
+
)
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
}
|