@pendo/agent 2.270.0 → 2.271.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/pendo.module.js +24 -4
- package/dist/pendo.module.min.js +1 -1
- package/package.json +1 -1
- package/setup.js +3 -2
package/package.json
CHANGED
package/setup.js
CHANGED
|
@@ -24,7 +24,8 @@ export async function getServerConfig(options) {
|
|
|
24
24
|
if (!options.env) exit('Missing option "env", please specify an environment for your Pendo subscription.');
|
|
25
25
|
let config;
|
|
26
26
|
if (!options.config || !Object.keys(options.config).length) {
|
|
27
|
-
const
|
|
27
|
+
const baseConfig = generateBaseAgentConfig(options.env);
|
|
28
|
+
const configUrl = new URL(`agent/static/${options.apiKey}/config.json`, `https://${baseConfig.assetHost}`).toString();
|
|
28
29
|
const serverConfig = await fetch(configUrl)
|
|
29
30
|
.then(response => {
|
|
30
31
|
if (!response.ok) exit('could not load config.json');
|
|
@@ -32,7 +33,7 @@ export async function getServerConfig(options) {
|
|
|
32
33
|
});
|
|
33
34
|
config = {
|
|
34
35
|
...serverConfig,
|
|
35
|
-
...
|
|
36
|
+
...baseConfig
|
|
36
37
|
};
|
|
37
38
|
} else {
|
|
38
39
|
config = {
|