atriusmaps-node-sdk 3.3.230 → 3.3.231

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.
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var name = "web-engine";
6
- var version = "3.3.230";
6
+ var version = "3.3.231";
7
7
  var license = "UNLICENSED";
8
8
  var type = "module";
9
9
  var main = "src/main.js";
@@ -2,7 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var applicationinsightsWeb = require('@microsoft/applicationinsights-web');
6
5
  var IObject = require('IObject');
7
6
  var queryString = require('query-string');
8
7
  var R = require('ramda');
@@ -118,8 +117,9 @@ async function create (rawConfig) {
118
117
 
119
118
  let config = rawConfig.extends ? await extendConfig(rawConfig, rawConfig.extends) : rawConfig;
120
119
 
120
+ // this handles error reporting, so we want it activated ASAP
121
121
  if (config.plugins.monitoring)
122
- Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespaceDefaultOnly(require('../_virtual/_empty_module_placeholder.js')); }).then(mon => mon.activate(config));
122
+ Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespaceDefaultOnly(require('../_virtual/_empty_module_placeholder.js')); }).then(mon => mon.activate(config.plugins.monitoring));
123
123
 
124
124
  config = await handleConfigPostProcess(config);
125
125
 
@@ -137,23 +137,6 @@ async function create (rawConfig) {
137
137
 
138
138
  appInstance.info = { wePkg: _package["default"] }; // web-engine package
139
139
 
140
- if (process.env.APP_INSIGHTS) {
141
- const appInsights = new applicationinsightsWeb.ApplicationInsights({
142
- config: {
143
- connectionString: process.env.APP_INSIGHTS,
144
- disableAjaxTracking: true,
145
- disableFetchTracking: true
146
- }
147
- });
148
- appInsights.loadAppInsights();
149
-
150
- appInstance.bus.on('appInsights/log', (log) => {
151
- log.properties.location = window.location.origin;
152
- appInsights.trackEvent({ ...log });
153
- appInsights.flush();
154
- });
155
- }
156
-
157
140
  if (typeof window !== 'undefined') { // Prepare for non-browser environments
158
141
  if (config.debug) {
159
142
  appInstance.debug = R.map(fn => fn.bind(appInstance), debugTools);
@@ -1 +1 @@
1
- var e="web-engine",s="3.3.230",o="UNLICENSED",l="module",t="src/main.js",r=["demo","deploy","nodesdk","pagesSrc","src/extModules/flexapi"],a={colors:"cat utils/colors1.txt && node utils/processColors.js | pbcopy && cat utils/colors2.txt","cypress:a11y":"APPLITOOLS_IS_DISABLED=true && cypress open --browser chrome --env INPUT_MODALITY='keyboard'","cypress:comp":"APPLITOOLS_IS_DISABLED=true && cypress open --component --browser chrome","cypress:e2e":"APPLITOOLS_IS_DISABLED=true && cypress open --e2e --browser chrome",demo:"cd demo/ && yarn start","e2e:record":"yarn cypress run --env RECORD_MODE=true",e2eTest:"percy exec -- cypress run --browser chrome",goProd:"cd deploy && scripts/goProd.sh",goStaging:"deploy/scripts/goStaging.sh",lint:"eslint . --max-warnings=0",mod:"demo/startMod.sh",mol:"demo/startMol.sh",molProd:"cd deploy && yarn buildAndRunMol",mos:"demo/startMos.sh",prepare:"husky install",test:"jest --no-cache --verbose","test-watch":"jest --verbose --watch","test:e2e:video":"cypress run"},n=["defaults"],c={"@azure/event-hubs":"^5.6.0","@dnd-kit/core":"^6.0.8","@dnd-kit/sortable":"^7.0.2","@dnd-kit/utilities":"^3.2.1","@john-osullivan/react-window-dynamic-fork":"^1.9.0-alpha.1","@locus-labs/mod-badge":"^0.1.102","@locus-labs/mod-default-theme":"^0.0.113","@locus-labs/mod-footer":"^0.0.111","@locus-labs/mod-header":"^0.0.105","@locus-labs/mod-location-marker":"^0.0.104","@locus-labs/mod-map-legend":"^0.0.104","@locus-labs/mod-offscreen-indicator":"^0.0.104","@locus-labs/mod-pin":"^0.0.104","@locus-labs/mod-qr-code-card":"^0.0.104","@locus-labs/mod-qr-code-window":"^0.0.105","@locus-labs/mod-walk-time-matrix":"^0.0.103","@locus-labs/mol-desktop-building-level-selector":"^0.1.108","@locus-labs/mol-desktop-compass":"^0.1.120","@locus-labs/mol-desktop-default-theme":"^0.2.105","@locus-labs/mol-desktop-icon":"^0.1.131","@locus-labs/mol-desktop-logo":"^0.1.101","@locus-labs/mol-desktop-map-nav-button":"^0.1.130","@locus-labs/mol-desktop-submenu":"^0.1.124","@locus-labs/mol-desktop-tooltip":"^0.3.102","@locus-labs/mol-desktop-zoom-control":"^0.1.134","@locus-labs/mol-mobile-floating-action-button":"^0.0.106","@locus-labs/mol-mobile-toast":"^0.1.102","@mapbox/mapbox-gl-draw":"^1.3.0","@mapbox/mapbox-gl-draw-static-mode":"^1.0.1","@microsoft/applicationinsights-web":"^3.1.2","@turf/circle":"^6.5.0","@turf/helpers":"^6.5.0","@turf/point-to-line-distance":"^6.5.0","@vitejs/plugin-react":"^4.0.1",IObject:"^0.7.2","axe-core":"^4.9.0","crypto-browserify":"^3.12.0","cypress-axe":"^1.5.0","file-loader":"^6.2.0",flexsearch:"^0.7.31","h3-js":"^4.1.0",i18next:"^20.3.4","i18next-browser-languagedetector":"^6.1.1","jest-transform-css":"4.0.1",jsonschema:"^1.2.6",luxon:"^3.3.0","maplibre-gl":"~2.1.9","mini-css-extract-plugin":"^1.6.0","node-polyfill-webpack-plugin":"^1.1.4","path-browserify":"^1.0.1",polished:"^4.0.2","prop-types":"^15.7.2","query-string":"^8.1.0",ramda:"^0.28.0",react:"^17.0.2","react-compound-slider":"^3.3.1","react-dom":"^17.0.2","react-json-editor-ajrm":"^2.5.13","react-qr-svg":"^2.2.1","react-svg":"^16.1.29","react-tageditor":"^0.2.3","react-virtualized-auto-sizer":"^1.0.2","smoothscroll-polyfill":"^0.4.4","styled-components":"5.1.0","styled-normalize":"^8.0.6","throttle-debounce":"^3.0.1",trackjs:"^3.7.4","ua-parser-js":"^0.7.23",uuid:"3.3.2",zousan:"^3.0.1","zousan-plus":"^4.0.1"},i={"@applitools/eyes-cypress":"^3.44.0","@babel/core":"^7.14.8","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-import-assertions":"^7.20.0","@babel/plugin-transform-modules-commonjs":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.14.8","@babel/preset-react":"^7.8.3","@percy/cli":"^1.0.0-beta.60","@percy/cypress":"^3.1.0","babel-eslint":"^10.0.1","babel-jest":"^27.0.6","babel-loader":"^8.2.2","babel-plugin-inline-json-import":"^0.3.2","babel-plugin-module-resolver":"^5.0.0","babel-polyfill":"^6.26.0","chai-colors":"^1.0.1","css-loader":"^5.2.4",cypress:"^12.17.2","cypress-browser-permissions":"^1.1.0","cypress-real-events":"^1.11.0","cypress-wait-until":"^1.7.1",eslint:"^7.4.0","eslint-config-standard":"^16.0.3","eslint-plugin-cypress":"^2.11.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jest":"^24.3.6","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-react":"^7.12.4","eslint-plugin-standard":"^5.0.0","fetch-mock-jest":"^1.3.0",glob:"^10.3.3",husky:"^6.0.0",jest:"27.5.1","lint-staged":"^11.0.1","node-fetch":"^2.6.0","null-loader":"^4.0.1","start-server-and-test":"^2.0.0",vite:"^4.3.9",webpack:"^5.84.1","webpack-merge":"^5.8.0"},p="yarn@4.0.2",d={node:">=20"},m={name:e,version:s,private:!0,license:o,type:l,main:t,workspaces:r,scripts:a,"lint-staged":{"*.js":["eslint --fix"]},browserslist:n,dependencies:c,devDependencies:i,packageManager:p,engines:d};export{n as browserslist,m as default,c as dependencies,i as devDependencies,d as engines,o as license,t as main,e as name,p as packageManager,a as scripts,l as type,s as version,r as workspaces};
1
+ var e="web-engine",s="3.3.231",o="UNLICENSED",l="module",t="src/main.js",r=["demo","deploy","nodesdk","pagesSrc","src/extModules/flexapi"],a={colors:"cat utils/colors1.txt && node utils/processColors.js | pbcopy && cat utils/colors2.txt","cypress:a11y":"APPLITOOLS_IS_DISABLED=true && cypress open --browser chrome --env INPUT_MODALITY='keyboard'","cypress:comp":"APPLITOOLS_IS_DISABLED=true && cypress open --component --browser chrome","cypress:e2e":"APPLITOOLS_IS_DISABLED=true && cypress open --e2e --browser chrome",demo:"cd demo/ && yarn start","e2e:record":"yarn cypress run --env RECORD_MODE=true",e2eTest:"percy exec -- cypress run --browser chrome",goProd:"cd deploy && scripts/goProd.sh",goStaging:"deploy/scripts/goStaging.sh",lint:"eslint . --max-warnings=0",mod:"demo/startMod.sh",mol:"demo/startMol.sh",molProd:"cd deploy && yarn buildAndRunMol",mos:"demo/startMos.sh",prepare:"husky install",test:"jest --no-cache --verbose","test-watch":"jest --verbose --watch","test:e2e:video":"cypress run"},n=["defaults"],c={"@azure/event-hubs":"^5.6.0","@dnd-kit/core":"^6.0.8","@dnd-kit/sortable":"^7.0.2","@dnd-kit/utilities":"^3.2.1","@john-osullivan/react-window-dynamic-fork":"^1.9.0-alpha.1","@locus-labs/mod-badge":"^0.1.102","@locus-labs/mod-default-theme":"^0.0.113","@locus-labs/mod-footer":"^0.0.111","@locus-labs/mod-header":"^0.0.105","@locus-labs/mod-location-marker":"^0.0.104","@locus-labs/mod-map-legend":"^0.0.104","@locus-labs/mod-offscreen-indicator":"^0.0.104","@locus-labs/mod-pin":"^0.0.104","@locus-labs/mod-qr-code-card":"^0.0.104","@locus-labs/mod-qr-code-window":"^0.0.105","@locus-labs/mod-walk-time-matrix":"^0.0.103","@locus-labs/mol-desktop-building-level-selector":"^0.1.108","@locus-labs/mol-desktop-compass":"^0.1.120","@locus-labs/mol-desktop-default-theme":"^0.2.105","@locus-labs/mol-desktop-icon":"^0.1.131","@locus-labs/mol-desktop-logo":"^0.1.101","@locus-labs/mol-desktop-map-nav-button":"^0.1.130","@locus-labs/mol-desktop-submenu":"^0.1.124","@locus-labs/mol-desktop-tooltip":"^0.3.102","@locus-labs/mol-desktop-zoom-control":"^0.1.134","@locus-labs/mol-mobile-floating-action-button":"^0.0.106","@locus-labs/mol-mobile-toast":"^0.1.102","@mapbox/mapbox-gl-draw":"^1.3.0","@mapbox/mapbox-gl-draw-static-mode":"^1.0.1","@microsoft/applicationinsights-web":"^3.1.2","@turf/circle":"^6.5.0","@turf/helpers":"^6.5.0","@turf/point-to-line-distance":"^6.5.0","@vitejs/plugin-react":"^4.0.1",IObject:"^0.7.2","axe-core":"^4.9.0","crypto-browserify":"^3.12.0","cypress-axe":"^1.5.0","file-loader":"^6.2.0",flexsearch:"^0.7.31","h3-js":"^4.1.0",i18next:"^20.3.4","i18next-browser-languagedetector":"^6.1.1","jest-transform-css":"4.0.1",jsonschema:"^1.2.6",luxon:"^3.3.0","maplibre-gl":"~2.1.9","mini-css-extract-plugin":"^1.6.0","node-polyfill-webpack-plugin":"^1.1.4","path-browserify":"^1.0.1",polished:"^4.0.2","prop-types":"^15.7.2","query-string":"^8.1.0",ramda:"^0.28.0",react:"^17.0.2","react-compound-slider":"^3.3.1","react-dom":"^17.0.2","react-json-editor-ajrm":"^2.5.13","react-qr-svg":"^2.2.1","react-svg":"^16.1.29","react-tageditor":"^0.2.3","react-virtualized-auto-sizer":"^1.0.2","smoothscroll-polyfill":"^0.4.4","styled-components":"5.1.0","styled-normalize":"^8.0.6","throttle-debounce":"^3.0.1",trackjs:"^3.7.4","ua-parser-js":"^0.7.23",uuid:"3.3.2",zousan:"^3.0.1","zousan-plus":"^4.0.1"},i={"@applitools/eyes-cypress":"^3.44.0","@babel/core":"^7.14.8","@babel/plugin-proposal-class-properties":"^7.8.3","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-import-assertions":"^7.20.0","@babel/plugin-transform-modules-commonjs":"^7.8.3","@babel/plugin-transform-runtime":"^7.8.3","@babel/preset-env":"^7.14.8","@babel/preset-react":"^7.8.3","@percy/cli":"^1.0.0-beta.60","@percy/cypress":"^3.1.0","babel-eslint":"^10.0.1","babel-jest":"^27.0.6","babel-loader":"^8.2.2","babel-plugin-inline-json-import":"^0.3.2","babel-plugin-module-resolver":"^5.0.0","babel-polyfill":"^6.26.0","chai-colors":"^1.0.1","css-loader":"^5.2.4",cypress:"^12.17.2","cypress-browser-permissions":"^1.1.0","cypress-real-events":"^1.11.0","cypress-wait-until":"^1.7.1",eslint:"^7.4.0","eslint-config-standard":"^16.0.3","eslint-plugin-cypress":"^2.11.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jest":"^24.3.6","eslint-plugin-node":"^11.1.0","eslint-plugin-promise":"^5.1.0","eslint-plugin-react":"^7.12.4","eslint-plugin-standard":"^5.0.0","fetch-mock-jest":"^1.3.0",glob:"^10.3.3",husky:"^6.0.0",jest:"27.5.1","lint-staged":"^11.0.1","node-fetch":"^2.6.0","null-loader":"^4.0.1","start-server-and-test":"^2.0.0",vite:"^4.3.9",webpack:"^5.84.1","webpack-merge":"^5.8.0"},p="yarn@4.0.2",d={node:">=20"},m={name:e,version:s,private:!0,license:o,type:l,main:t,workspaces:r,scripts:a,"lint-staged":{"*.js":["eslint --fix"]},browserslist:n,dependencies:c,devDependencies:i,packageManager:p,engines:d};export{n as browserslist,m as default,c as dependencies,i as devDependencies,d as engines,o as license,t as main,e as name,p as packageManager,a as scripts,l as type,s as version,r as workspaces};
package/dist/src/app.js CHANGED
@@ -1 +1 @@
1
- import{ApplicationInsights as e}from"@microsoft/applicationinsights-web";import n from"IObject";import t from"query-string";import{map as o,mergeDeepRight as i}from"ramda";import r from"zousan-plus";import a from"../package.json.js";import s from"./debugTools.js";import{buildEnv as l}from"./env.js";import{create as c}from"./extModules/bustle.js";import{initLog as u}from"./extModules/log.js";import g from"./utils/i18n.js";const p="undefined"!=typeof window;async function d(e,n,t){let o=n;if(o.includes("/")){const e=o.split("/");o=e[e.length-1]}return void 0!==t.active&&(!1===t.active||"notLocalhost"===t.active&&e.env.isLocalhost())?(e.log.info(`Plugin ${n} explicitly deativated`),null):import(`../plugins/${n}/src/${o}.js`).then((o=>(e.log.info(`Creating plugin ${n}`),o.create(e,t))))}async function m(e){return p?import(`./configs/${e}.json`):import(`./configs/${e}.json.js`)}async function f(e,n){let t={};const o=await Promise.all(n.map(m));for(const e of o){let n=e.default;n=n.extends?await f(n,n.extends):n,t=i(t,n)}return t=i(t,e),t}const w=e=>n=>import(`./configs/postproc-${e}.js`).then((e=>e.process(n)));async function h(i){const m=Object.create(null);let h=i.extends?await f(i,i.extends):i;h.plugins.monitoring&&import("../_virtual/_empty_module_placeholder.js").then((e=>e.activate(h))),h=await(async e=>e.configPostProc?r.series(e,...e.configPostProc.map(w)):e)(h);const y=(e=>{const n=e.supportedLanguages||["ar","en","es","fr","ja","ko","zh-Hans","zh-Hant"];if("undefined"!=typeof window){let e=t.parse(location.search).lang||navigator.language;for(;e;){if(e&&n.includes(e))return e;e=e.substring(0,e.lastIndexOf("-"))}}return e.defaultLanguage||"en"})(h),b=await g(y,{debug:h.debug});m.i18n=()=>b,m.gt=()=>b.t.bind(b),m.config=h,m.plugins=new n;const j=u("web-engine",{enabled:!!h.debug,isBrowser:p,color:"cyan",logFilter:h.logFilter,truncateObjects:!p});if(m.log=j.sublog(h.name),m.bus=c({trace:!1,showEvents:!0,reportAllErrors:!0,log:j}),m.info={wePkg:a},process.env.APP_INSIGHTS){const n=new e({config:{connectionString:process.env.APP_INSIGHTS,disableAjaxTracking:!0,disableFetchTracking:!0}});n.loadAppInsights(),m.bus.on("appInsights/log",(e=>{e.properties.location=window.location.origin,n.trackEvent({...e}),n.flush()}))}if("undefined"!=typeof window&&(h.debug?(m.debug=o((e=>e.bind(m)),s),s.dndGo.call(m)):m.debug={},window._app=m,window.document&&window.document.title&&h.setWindowTitle&&(document.title=h.name)),m.env=l(m),h.theme?await r.evaluate({name:"ThemeManagerModule",value:import("../_virtual/_empty_module_placeholder.js")},{name:"HistoryManager",value:import("./historyManager.js")},{name:"LayerManager",value:import("../_virtual/_empty_module_placeholder.js")}).then((async({LayerManager:e,HistoryManager:n,ThemeManagerModule:t})=>{const o=t.initThemeManager(m);m.themePack=await o.buildTheme(h.theme,h.defaultTheme),e.initLayerManager(m),n.initHistoryManager(m),m.destroy=()=>e.destroy(m)})):m.destroy=()=>{},h.plugins){for(const e in h.plugins)try{const n=h.plugins[e];if(m.plugins[e])throw Error(`Duplicate plugin name "${e}"`);const t=await d(m,e,n);t&&(m.plugins=m.plugins.set(e,t))}catch(n){j.error("Error instantiating plugin "+e),j.error(n)}for(const e in m.plugins)m.plugins[e].init()}return m}export{h as create};
1
+ import e from"IObject";import t from"query-string";import{map as n,mergeDeepRight as o}from"ramda";import i from"zousan-plus";import r from"../package.json.js";import a from"./debugTools.js";import{buildEnv as s}from"./env.js";import{create as l}from"./extModules/bustle.js";import{initLog as u}from"./extModules/log.js";import c from"./utils/i18n.js";const g="undefined"!=typeof window;async function p(e,t,n){let o=t;if(o.includes("/")){const e=o.split("/");o=e[e.length-1]}return void 0!==n.active&&(!1===n.active||"notLocalhost"===n.active&&e.env.isLocalhost())?(e.log.info(`Plugin ${t} explicitly deativated`),null):import(`../plugins/${t}/src/${o}.js`).then((o=>(e.log.info(`Creating plugin ${t}`),o.create(e,n))))}async function d(e){return g?import(`./configs/${e}.json`):import(`./configs/${e}.json.js`)}async function m(e,t){let n={};const i=await Promise.all(t.map(d));for(const e of i){let t=e.default;t=t.extends?await m(t,t.extends):t,n=o(n,t)}return n=o(n,e),n}const f=e=>t=>import(`./configs/postproc-${e}.js`).then((e=>e.process(t)));async function w(o){const d=Object.create(null);let w=o.extends?await m(o,o.extends):o;w.plugins.monitoring&&import("../_virtual/_empty_module_placeholder.js").then((e=>e.activate(w.plugins.monitoring))),w=await(async e=>e.configPostProc?i.series(e,...e.configPostProc.map(f)):e)(w);const y=(e=>{const n=e.supportedLanguages||["ar","en","es","fr","ja","ko","zh-Hans","zh-Hant"];if("undefined"!=typeof window){let e=t.parse(location.search).lang||navigator.language;for(;e;){if(e&&n.includes(e))return e;e=e.substring(0,e.lastIndexOf("-"))}}return e.defaultLanguage||"en"})(w),h=await c(y,{debug:w.debug});d.i18n=()=>h,d.gt=()=>h.t.bind(h),d.config=w,d.plugins=new e;const j=u("web-engine",{enabled:!!w.debug,isBrowser:g,color:"cyan",logFilter:w.logFilter,truncateObjects:!g});if(d.log=j.sublog(w.name),d.bus=l({trace:!1,showEvents:!0,reportAllErrors:!0,log:j}),d.info={wePkg:r},"undefined"!=typeof window&&(w.debug?(d.debug=n((e=>e.bind(d)),a),a.dndGo.call(d)):d.debug={},window._app=d,window.document&&window.document.title&&w.setWindowTitle&&(document.title=w.name)),d.env=s(d),w.theme?await i.evaluate({name:"ThemeManagerModule",value:import("../_virtual/_empty_module_placeholder.js")},{name:"HistoryManager",value:import("./historyManager.js")},{name:"LayerManager",value:import("../_virtual/_empty_module_placeholder.js")}).then((async({LayerManager:e,HistoryManager:t,ThemeManagerModule:n})=>{const o=n.initThemeManager(d);d.themePack=await o.buildTheme(w.theme,w.defaultTheme),e.initLayerManager(d),t.initHistoryManager(d),d.destroy=()=>e.destroy(d)})):d.destroy=()=>{},w.plugins){for(const e in w.plugins)try{const t=w.plugins[e];if(d.plugins[e])throw Error(`Duplicate plugin name "${e}"`);const n=await p(d,e,t);n&&(d.plugins=d.plugins.set(e,n))}catch(t){j.error("Error instantiating plugin "+e),j.error(t)}for(const e in d.plugins)d.plugins[e].init()}return d}export{w as create};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atriusmaps-node-sdk",
3
- "version": "3.3.230",
3
+ "version": "3.3.231",
4
4
  "description": "This project provides an API to Atrius Personal Wayfinder maps within a Node environment. See the README.md for more information",
5
5
  "keywords": [
6
6
  "map",