@hmcts/opal-frontend-common-node 0.0.5 → 0.0.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/app-insights/index.d.ts.map +1 -1
- package/app-insights/index.js +1 -4
- package/app-insights/index.js.map +1 -1
- package/package.json +1 -1
- package/app-insights/app-insights-configuration.d.ts +0 -5
- package/app-insights/app-insights-configuration.d.ts.map +0 -1
- package/app-insights/app-insights-configuration.js +0 -15
- package/app-insights/app-insights-configuration.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app-insights/index.ts"],"names":[],"mappings":"AAEA,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/app-insights/index.ts"],"names":[],"mappings":"AAEA,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AAMjE,qBAAa,WAAW;IACtB,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,gBAAgB;CAyB1G"}
|
package/app-insights/index.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
process.env['APPLICATIONINSIGHTS_CONFIGURATION_CONTENT'] = '{}';
|
|
2
2
|
import * as appInsights from 'applicationinsights';
|
|
3
|
-
import AppInsightsConfiguration from './app-insights-configuration';
|
|
4
3
|
// As of 2.9.0 issue reading bundled applicationinsights.json
|
|
5
4
|
// https://github.com/microsoft/ApplicationInsights-node.js/issues/1226
|
|
6
5
|
// Define config below...
|
|
7
6
|
export class AppInsights {
|
|
8
7
|
enable(enabled, connectionString, cloudRoleName) {
|
|
9
|
-
const appInsightsConfigInstance = new AppInsightsConfiguration();
|
|
10
|
-
const appInsightsConfig = appInsightsConfigInstance.enableFor(enabled, connectionString, cloudRoleName);
|
|
11
8
|
if (enabled && connectionString) {
|
|
12
9
|
appInsights
|
|
13
10
|
.setup(connectionString)
|
|
@@ -28,7 +25,7 @@ export class AppInsights {
|
|
|
28
25
|
message: 'App insights activated',
|
|
29
26
|
});
|
|
30
27
|
}
|
|
31
|
-
return
|
|
28
|
+
return { enabled, connectionString, cloudRoleName };
|
|
32
29
|
}
|
|
33
30
|
}
|
|
34
31
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/app-insights/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,GAAG,IAAI,CAAC;AAChE,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/app-insights/index.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,GAAG,CAAC,2CAA2C,CAAC,GAAG,IAAI,CAAC;AAChE,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAC;AAGnD,6DAA6D;AAC7D,uEAAuE;AACvE,yBAAyB;AAEzB,MAAM,OAAO,WAAW;IACtB,MAAM,CAAC,OAAgB,EAAE,gBAA+B,EAAE,aAA4B;QACpF,IAAI,OAAO,IAAI,gBAAgB,EAAE,CAAC;YAChC,WAAW;iBACR,KAAK,CAAC,gBAAgB,CAAC;iBACvB,sBAAsB,CAAC,IAAI,CAAC;iBAC5B,yBAAyB,CAAC,IAAI,EAAE,IAAI,CAAC;iBACrC,wBAAwB,CAAC,IAAI,CAAC;iBAC9B,0BAA0B,CAAC,IAAI,CAAC;iBAChC,qBAAqB,CAAC,IAAI,EAAE,KAAK,CAAC;iBAClC,kCAAkC,CAAC,IAAI,CAAC;iBACxC,kBAAkB,CAAC,IAAI,CAAC;iBACxB,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC;iBAC/B,wBAAwB,CAAC,KAAK,CAAC;iBAC/B,KAAK,EAAE,CAAC;YAEX,IAAI,aAAa,EAAE,CAAC;gBAClB,WAAW,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,aAAa,CAAC;YAC3G,CAAC;YACD,WAAW,CAAC,aAAa,CAAC,UAAU,CAAC;gBACnC,OAAO,EAAE,wBAAwB;aAClC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,CAAC;IACtD,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import AppInsightConfig from '../interfaces/app-insights-config';
|
|
2
|
-
export default class AppInsightsConfiguration {
|
|
3
|
-
enableFor(enabled: boolean, connectionString: string | null, cloudRoleName: string | null): AppInsightConfig;
|
|
4
|
-
}
|
|
5
|
-
//# sourceMappingURL=app-insights-configuration.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-insights-configuration.d.ts","sourceRoot":"","sources":["../../src/app-insights/app-insights-configuration.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,mCAAmC,CAAC;AAEjE,MAAM,CAAC,OAAO,OAAO,wBAAwB;IACpC,SAAS,CAAC,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,GAAG,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,gBAAgB;CAcpH"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export default class AppInsightsConfiguration {
|
|
2
|
-
enableFor(enabled, connectionString, cloudRoleName) {
|
|
3
|
-
const appInsightsConfig = {
|
|
4
|
-
enabled: enabled,
|
|
5
|
-
connectionString: null,
|
|
6
|
-
cloudRoleName: null,
|
|
7
|
-
};
|
|
8
|
-
if (enabled && connectionString && cloudRoleName) {
|
|
9
|
-
appInsightsConfig.connectionString = connectionString;
|
|
10
|
-
appInsightsConfig.cloudRoleName = cloudRoleName;
|
|
11
|
-
}
|
|
12
|
-
return appInsightsConfig;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=app-insights-configuration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-insights-configuration.js","sourceRoot":"","sources":["../../src/app-insights/app-insights-configuration.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,OAAO,wBAAwB;IACpC,SAAS,CAAC,OAAgB,EAAE,gBAA+B,EAAE,aAA4B;QAC9F,MAAM,iBAAiB,GAAqB;YAC1C,OAAO,EAAE,OAAO;YAChB,gBAAgB,EAAE,IAAI;YACtB,aAAa,EAAE,IAAI;SACpB,CAAC;QAEF,IAAI,OAAO,IAAI,gBAAgB,IAAI,aAAa,EAAE,CAAC;YACjD,iBAAiB,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;YACtD,iBAAiB,CAAC,aAAa,GAAG,aAAa,CAAC;QAClD,CAAC;QAED,OAAO,iBAAiB,CAAC;IAC3B,CAAC;CACF"}
|