atriusmaps-node-sdk 3.3.873 → 3.3.875

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.
@@ -33,11 +33,11 @@ const ts = () => {
33
33
  return `${d.getHours()}:${pad2(d.getMinutes())}:${pad2(d.getSeconds())}.${d.getMilliseconds()}`;
34
34
  };
35
35
  const logPre = () => `AtriusMaps Node SDK (${ts()}): `;
36
- const log = function () {
36
+ const log = function (...logArgs) {
37
37
  if (sdkLogging) {
38
38
  let msg =
39
39
  logPre() +
40
- Array.from(arguments)
40
+ Array.from(logArgs)
41
41
  .map(arg => (typeof arg === 'object' ? JSON.stringify(arg) : arg))
42
42
  .join(' ');
43
43
  const lines = msg.split('\n');
@@ -53,10 +53,10 @@ const log = function () {
53
53
  // this iterates through available commands and makes them member functions of map
54
54
  function addCommands(map, commands) {
55
55
  commands.forEach(sig => {
56
- map[sig.command] = function () {
56
+ map[sig.command] = function (...args) {
57
57
  const cob = { command: sig.command };
58
- for (let i = 0; i < arguments.length; i++) {
59
- cob[sig.args[i].name] = arguments[i];
58
+ for (let i = 0; i < args.length; i++) {
59
+ cob[sig.args[i].name] = args[i];
60
60
  }
61
61
  return map(cob);
62
62
  };
@@ -64,7 +64,7 @@ function addCommands(map, commands) {
64
64
  }
65
65
 
66
66
  async function newMap(sdkConfig) {
67
- return new Promise((resolve, reject) => {
67
+ return new Promise(resolve => {
68
68
  sdkConfig.headless = true;
69
69
 
70
70
  setupFetch(sdkConfig); // This installs the fetch function globally (overriding native if exists)
@@ -92,8 +92,8 @@ async function newMap(sdkConfig) {
92
92
  // map._app = app
93
93
 
94
94
  observable(map); // make map handle events pub/sub
95
- app.eventListener.observe(function () {
96
- map.fire.apply(map, arguments);
95
+ app.eventListener.observe(function (...args) {
96
+ map.fire(...args);
97
97
  }); // pass it on...
98
98
 
99
99
  map.on('ready', (eName, data) => {
@@ -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.873";
6
+ var version = "3.3.875";
7
7
  var license = "UNLICENSED";
8
8
  var type = "module";
9
9
  var main = "src/main.js";
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var clientAPI = require('./clientAPI.js');
4
+
5
+
6
+
7
+ exports.create = clientAPI.create;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var dynamicPois = require('./dynamicPois.js');
4
+
5
+
6
+
7
+ exports.create = dynamicPois.create;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var flightStatus = require('./flightStatus.js');
4
+
5
+
6
+
7
+ exports.create = flightStatus.create;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var poiDataManager = require('./poiDataManager.js');
4
+
5
+
6
+
7
+ exports.create = poiDataManager.create;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var sdkServer = require('./sdkServer.js');
4
+
5
+
6
+
7
+ exports.create = sdkServer.create;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var searchService = require('./searchService.js');
4
+
5
+
6
+
7
+ exports.create = searchService.create;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var venueDataLoader = require('./venueDataLoader.js');
4
+
5
+
6
+
7
+ exports.create = venueDataLoader.create;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ var wayfinder = require('./wayfinder.js');
4
+
5
+
6
+
7
+ exports.create = wayfinder.create;
@@ -21,12 +21,6 @@ async function setupPlugin(app, id, config) {
21
21
  return null;
22
22
  }
23
23
 
24
- let name = id;
25
- if (name.includes('/')) {
26
- const split = name.split('/');
27
- name = split[split.length - 1];
28
- }
29
-
30
24
  if (config.active !== undefined) {
31
25
  if (config.active === false || (config.active === 'notLocalhost' && app.env.isLocalhost())) {
32
26
  app.log.info(`Plugin ${id} explicitly deativated`);
@@ -34,12 +28,10 @@ async function setupPlugin(app, id, config) {
34
28
  }
35
29
  }
36
30
 
37
- return import(`../plugins/${id}/src/${name}.js`)
38
- .catch(() => import(`../plugins/${id}/src/${name}.js`))
39
- .then(pluginModule => {
40
- app.log.info(`Creating plugin ${id}`);
41
- return pluginModule.create(app, config);
42
- });
31
+ return import(`../plugins/${id}/src/index.js`).then(pluginModule => {
32
+ app.log.info(`Creating plugin ${id}`);
33
+ return pluginModule.create(app, config);
34
+ });
43
35
  }
44
36
 
45
37
  // takes the `lang` query parameter and returns the most specific supported language
@@ -117,7 +109,7 @@ async function create(rawConfig) {
117
109
 
118
110
  // this handles error reporting, so we want it activated ASAP
119
111
  if (config.plugins.monitoring) {
120
- await Promise.resolve().then(function () { return require('../plugins/monitoring/src/monitoring.js'); }).then(mon => mon.activate(config.plugins.monitoring));
112
+ await Promise.resolve().then(function () { return /*#__PURE__*/_interopNamespaceDefaultOnly(require('../_virtual/_empty_module_placeholder.js')); }).then(mon => mon.activate(config.plugins.monitoring));
121
113
  }
122
114
 
123
115
  config = await handleConfigPostProcess(config);
@@ -1 +1 @@
1
- import e from"node:http";import t from"node:https";import{HttpsProxyAgent as n}from"https-proxy-agent";import o from"node-fetch";import r from"../package.json.js";import s from"../plugins/sdkServer/src/prepareSDKConfig.js";import{create as i}from"../src/controller.js";import c from"../src/utils/observable.js";const g=r.version;let a=!1;const l=e=>e.toString().length<2?"0"+e:e,m=()=>`AtriusMaps Node SDK (${(()=>{const e=new Date;return`${e.getHours()}:${l(e.getMinutes())}:${l(e.getSeconds())}.${e.getMilliseconds()}`})()}): `,p=function(){if(a){let e=m()+Array.from(arguments).map(e=>"object"==typeof e?JSON.stringify(e):e).join(" ");const t=e.split("\n");t.length>1?e=t[0]+`… (+ ${t.length-1} lines)`:e.length>256&&(e=e.substring(0,255)+`… (length: ${e.length} chars)`),console.log(e)}};async function f(r){return new Promise((g,a)=>{r.headless=!0,function(r){const s=new e.Agent({keepAlive:!0}),i=new t.Agent({keepAlive:!0}),c=r.proxy?new n(`http://${r.proxy.host}:${r.proxy.port}`):null,g=r.agent||c||(e=>"http:"===e.protocol?s:i);global.fetch=async(e,t)=>o(e,{...t,agent:g})}(r);const l=s(r);l.plugins.monitoring=null,i(l).then(e=>{const t=(t,n)=>("string"==typeof t&&(t={...n,command:t}),p("Sending command object: ",t),e.bus.get("clientAPI/execute",t).then(e=>(p("Received Message: ",e),e)).catch(e=>{throw p("Error: ",e.message),e}));c(t),e.eventListener.observe(function(){t.fire.apply(t,arguments)}),t.on("ready",(e,n)=>{const{commands:o}=n.commandJSON;!function(e,t){t.forEach(t=>{e[t.command]=function(){const n={command:t.command};for(let e=0;e<arguments.length;e++)n[t.args[e].name]=arguments[e];return e(n)}})}(t,o),g(t),p("map ready")})})})}const h={getVersion:()=>g,newMap:e=>f(e),setLogging:e=>{a=e,e&&p(`Atrius Maps JS SDK Client v${g} Logging enabled.`)}};export{h as default};
1
+ import e from"node:http";import t from"node:https";import{HttpsProxyAgent as n}from"https-proxy-agent";import o from"node-fetch";import r from"../package.json.js";import s from"../plugins/sdkServer/src/prepareSDKConfig.js";import{create as i}from"../src/controller.js";import c from"../src/utils/observable.js";const g=r.version;let a=!1;const m=e=>e.toString().length<2?"0"+e:e,l=()=>`AtriusMaps Node SDK (${(()=>{const e=new Date;return`${e.getHours()}:${m(e.getMinutes())}:${m(e.getSeconds())}.${e.getMilliseconds()}`})()}): `,p=function(...e){if(a){let t=l()+Array.from(e).map(e=>"object"==typeof e?JSON.stringify(e):e).join(" ");const n=t.split("\n");n.length>1?t=n[0]+`… (+ ${n.length-1} lines)`:t.length>256&&(t=t.substring(0,255)+`… (length: ${t.length} chars)`),console.log(t)}};async function f(r){return new Promise(g=>{r.headless=!0,function(r){const s=new e.Agent({keepAlive:!0}),i=new t.Agent({keepAlive:!0}),c=r.proxy?new n(`http://${r.proxy.host}:${r.proxy.port}`):null,g=r.agent||c||(e=>"http:"===e.protocol?s:i);global.fetch=async(e,t)=>o(e,{...t,agent:g})}(r);const a=s(r);a.plugins.monitoring=null,i(a).then(e=>{const t=(t,n)=>("string"==typeof t&&(t={...n,command:t}),p("Sending command object: ",t),e.bus.get("clientAPI/execute",t).then(e=>(p("Received Message: ",e),e)).catch(e=>{throw p("Error: ",e.message),e}));c(t),e.eventListener.observe(function(...e){t.fire(...e)}),t.on("ready",(e,n)=>{const{commands:o}=n.commandJSON;!function(e,t){t.forEach(t=>{e[t.command]=function(...n){const o={command:t.command};for(let e=0;e<n.length;e++)o[t.args[e].name]=n[e];return e(o)}})}(t,o),g(t),p("map ready")})})})}const h={getVersion:()=>g,newMap:e=>f(e),setLogging:e=>{a=e,e&&p(`Atrius Maps JS SDK Client v${g} Logging enabled.`)}};export{h as default};
@@ -1 +1 @@
1
- var e="web-engine",t="3.3.873",s="UNLICENSED",r="module",o="src/main.js",i=["demo","deploy","nodesdk","src/extModules/flexapi","services/*","libraries/*"],a={"build-storybook":"storybook build",colors:"cat utils/colors1.txt && node utils/processColors.js | pbcopy && cat utils/colors2.txt",demo:"cd demo/ && yarn start",dev:"yarn mol e2e","format:check":"yarn prettier . --check","format:fix":"yarn prettier . --write",goProd:"cd deploy && scripts/goProd.sh",goStaging:"deploy/scripts/goStaging.sh","icons:convert":"node scripts/convertSvgToJsx.mjs",lint:"eslint . --ext .js,.jsx,.ts,.tsx",mod:"demo/startMod.sh",mol:"demo/startMol.sh","mol:build":"demo/startMolBuild.sh",molProd:"cd deploy && yarn buildAndRunMol","playwright:ci":"yarn playwright test --grep-invert sdk","playwright:ci:failed":"yarn playwright test --last-failed --grep-invert sdk","playwright:sdk":"yarn start-server-and-test 'cd ./deploy && yarn buildDev && yarn serveLocal' 8085 'cd ./test/sdk && npx http-server' 8080 'yarn playwright test sdk --ui'","playwright:ui":"yarn playwright test --ui --grep-invert sdk",prepare:"husky",storybook:"storybook dev -p 6006",test:"vitest run --project unit","test-watch":"vitest --watch","test:comp":"vitest run --project browser","test:comp:ci":"vitest run --project browser --reporter=dot","test:comp:ui":"VITE_COMP_UI=1 vitest --project browser --ui --browser.headless=false","test:all":"yarn lint && yarn format:check && yarn test && yarn playwright:ci","test:mod":"playwright test --config=playwright.mod.config.ts",typecheck:"tsc -p tsconfig.checkjs.json"},l=["defaults"],n={"@azure/event-hubs":"^5.12.2","@csstools/normalize.css":"^11.0.1","@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@locus-labs/mod-badge":"^0.1.102","@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","@mapbox/mapbox-gl-draw":"^1.5.0","@mapbox/mapbox-gl-draw-static-mode":"^1.0.1","@microsoft/applicationinsights-web":"^3.3.6","@turf/area":"^7.2.0","@turf/bbox-clip":"^7.2.0","@turf/bbox-polygon":"^7.2.0","@turf/bearing":"^7.2.0","@turf/circle":"^7.2.0","@turf/helpers":"^7.2.0","@turf/point-to-line-distance":"^7.2.0","@vitejs/plugin-react":"^5.2.0","@zumer/snapdom":"^2.9.0","axe-core":"^4.10.3",browserslist:"^4.27.0","crypto-browserify":"^3.12.1",dompurify:"^3.3.3","file-loader":"^6.2.0",flexsearch:"^0.7.43","h3-js":"^4.1.0",i18next:"^26.0.0","i18next-browser-languagedetector":"^6.1.1",jsdom:"^25.0.1",jsonschema:"^1.5.0",luxon:"^3.5.0","maplibre-gl":"^4.7.1","mini-css-extract-plugin":"^2.9.2","node-polyfill-webpack-plugin":"^4.1.0","path-browserify":"^1.0.1",pmtiles:"^4.4.0","prop-types":"^15.8.1","qrcode.react":"^4.2.0",ramda:"^0.30.1",react:"^19.2.4","react-compound-slider":"^3.4.0","react-dom":"^19.2.4","react-json-editor-ajrm":"^2.5.14","react-svg":"^16.3.0","react-virtualized-auto-sizer":"^1.0.25","react-window":"^1.8.11","smoothscroll-polyfill":"^0.4.4","styled-components":"^6.1.15","styled-normalize":"^8.1.1","throttle-debounce":"^5.0.2",trackjs:"^3.10.4","ua-parser-js":"^0.7.40",uuid:"^11.1.0",zousan:"^3.0.1","zousan-plus":"^4.0.1"},c={"@applitools/eyes-playwright":"^1.46.8","@axe-core/playwright":"^4.10.2","@azure/identity":"^4.13.0","@azure/playwright":"^1.0.0","@percy/cli":"^1.31.11","@percy/playwright":"^1.1.0","@playwright/test":"^1.59.1","@storybook/addon-essentials":"^8.6.15","@storybook/blocks":"^8.6.15","@storybook/react":"^8.6.15","@storybook/react-vite":"^8.6.15","@testing-library/dom":"^10.4.1","@testing-library/jest-dom":"^6.6.3","@testing-library/react":"^16.3.0","@testing-library/user-event":"^14.5.2","@types/react":"^19.0.10","@types/react-dom":"^19.0.4","@typescript-eslint/eslint-plugin":"^8.26.1","@typescript-eslint/parser":"^8.26.1","@vitest/browser":"4.1.6","@vitest/browser-playwright":"4.1.6","@vitest/ui":"4.1.6","chai-colors":"^1.0.1","css-loader":"^7.1.2",eslint:"^8.57.1","eslint-config-prettier":"^10.1.8","eslint-config-standard":"^17.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-n":"^17.16.2","eslint-plugin-node":"^11.1.0","eslint-plugin-playwright":"^2.2.2","eslint-plugin-promise":"^5.2.0","eslint-plugin-react":"^7.37.4","eslint-plugin-standard":"^5.0.0","eslint-plugin-vitest":"^0.5.4","fetch-mock":"^12.6.0",glob:"^11.0.1",husky:"^9.1.7","lint-staged":"^16.4.0","node-fetch":"^2.7.0","null-loader":"^4.0.1",nx:"19.8.14","nx-remotecache-azure":"^19.0.0","os-browserify":"^0.3.0",prettier:"^3.8.3","start-server-and-test":"^2.0.11",storybook:"^8.6.15",typescript:"^5.8.2",vite:"^7.3.2",vitest:"^4.1.8","webpack-merge":"^6.0.1"},d="yarn@4.13.0",p={node:"24.x"},y={},u={name:e,version:t,private:!0,license:s,type:r,main:o,workspaces:i,scripts:a,"lint-staged":{"*.js":["eslint --fix","prettier --check"],"*.{json,md,css,ts,tsx,jsx}":["prettier --check"],"src/i18n/**/*.json":["node utils/sort-json.js","prettier --write"]},browserslist:l,dependencies:n,devDependencies:c,packageManager:d,engines:p,nx:y};export{l as browserslist,u as default,n as dependencies,c as devDependencies,p as engines,s as license,o as main,e as name,y as nx,d as packageManager,a as scripts,r as type,t as version,i as workspaces};
1
+ var e="web-engine",t="3.3.875",s="UNLICENSED",r="module",o="src/main.js",i=["demo","deploy","nodesdk","src/extModules/flexapi","services/*","libraries/*"],a={"build-storybook":"storybook build",colors:"cat utils/colors1.txt && node utils/processColors.js | pbcopy && cat utils/colors2.txt",demo:"cd demo/ && yarn start",dev:"yarn mol e2e","format:check":"yarn prettier . --check","format:fix":"yarn prettier . --write",goProd:"cd deploy && scripts/goProd.sh",goStaging:"deploy/scripts/goStaging.sh","icons:convert":"node scripts/convertSvgToJsx.mjs",lint:"eslint . --ext .js,.jsx,.ts,.tsx",mod:"demo/startMod.sh",mol:"demo/startMol.sh","mol:build":"demo/startMolBuild.sh",molProd:"cd deploy && yarn buildAndRunMol","playwright:ci":"yarn playwright test --grep-invert sdk","playwright:ci:failed":"yarn playwright test --last-failed --grep-invert sdk","playwright:sdk":"yarn start-server-and-test 'cd ./deploy && yarn buildDev && yarn serveLocal' 8085 'cd ./test/sdk && npx http-server' 8080 'yarn playwright test sdk --ui'","playwright:ui":"yarn playwright test --ui --grep-invert sdk",prepare:"husky",storybook:"storybook dev -p 6006",test:"vitest run --project unit","test-watch":"vitest --watch","test:comp":"vitest run --project browser","test:comp:ci":"vitest run --project browser --reporter=dot","test:comp:ui":"VITE_COMP_UI=1 vitest --project browser --ui --browser.headless=false","test:all":"yarn lint && yarn format:check && yarn test && yarn playwright:ci","test:mod":"playwright test --config=playwright.mod.config.ts",typecheck:"tsc -p tsconfig.checkjs.json"},l=["defaults"],n={"@azure/event-hubs":"^5.12.2","@csstools/normalize.css":"^11.0.1","@dnd-kit/core":"^6.3.1","@dnd-kit/modifiers":"^9.0.0","@dnd-kit/sortable":"^10.0.0","@dnd-kit/utilities":"^3.2.2","@locus-labs/mod-badge":"^0.1.102","@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","@mapbox/mapbox-gl-draw":"^1.5.0","@mapbox/mapbox-gl-draw-static-mode":"^1.0.1","@microsoft/applicationinsights-web":"^3.3.6","@turf/area":"^7.2.0","@turf/bbox-clip":"^7.2.0","@turf/bbox-polygon":"^7.2.0","@turf/bearing":"^7.2.0","@turf/circle":"^7.2.0","@turf/helpers":"^7.2.0","@turf/point-to-line-distance":"^7.2.0","@vitejs/plugin-react":"^5.2.0","@zumer/snapdom":"^2.9.0","axe-core":"^4.10.3",browserslist:"^4.27.0","crypto-browserify":"^3.12.1",dompurify:"^3.3.3","file-loader":"^6.2.0",flexsearch:"^0.7.43","h3-js":"^4.1.0",i18next:"^26.0.0","i18next-browser-languagedetector":"^6.1.1",jsdom:"^25.0.1",jsonschema:"^1.5.0",luxon:"^3.5.0","maplibre-gl":"^4.7.1","mini-css-extract-plugin":"^2.9.2","node-polyfill-webpack-plugin":"^4.1.0","path-browserify":"^1.0.1",pmtiles:"^4.4.0","prop-types":"^15.8.1","qrcode.react":"^4.2.0",ramda:"^0.30.1",react:"^19.2.4","react-compound-slider":"^3.4.0","react-dom":"^19.2.4","react-json-editor-ajrm":"^2.5.14","react-svg":"^16.3.0","react-virtualized-auto-sizer":"^1.0.25","react-window":"^1.8.11","smoothscroll-polyfill":"^0.4.4","styled-components":"^6.1.15","styled-normalize":"^8.1.1","throttle-debounce":"^5.0.2",trackjs:"^3.10.4","ua-parser-js":"^0.7.40",uuid:"^11.1.0",zousan:"^3.0.1","zousan-plus":"^4.0.1"},c={"@applitools/eyes-playwright":"^1.46.8","@axe-core/playwright":"^4.10.2","@azure/identity":"^4.13.0","@azure/playwright":"^1.0.0","@percy/cli":"^1.31.11","@percy/playwright":"^1.1.0","@playwright/test":"^1.59.1","@storybook/addon-essentials":"^8.6.15","@storybook/blocks":"^8.6.15","@storybook/react":"^8.6.15","@storybook/react-vite":"^8.6.15","@testing-library/dom":"^10.4.1","@testing-library/jest-dom":"^6.6.3","@testing-library/react":"^16.3.0","@testing-library/user-event":"^14.5.2","@types/react":"^19.0.10","@types/react-dom":"^19.0.4","@typescript-eslint/eslint-plugin":"^8.26.1","@typescript-eslint/parser":"^8.26.1","@vitest/browser":"4.1.6","@vitest/browser-playwright":"4.1.6","@vitest/ui":"4.1.6","chai-colors":"^1.0.1","css-loader":"^7.1.2",eslint:"^8.57.1","eslint-config-prettier":"^10.1.8","eslint-config-standard":"^17.1.0","eslint-import-resolver-alias":"^1.1.2","eslint-plugin-n":"^17.16.2","eslint-plugin-node":"^11.1.0","eslint-plugin-playwright":"^2.2.2","eslint-plugin-promise":"^5.2.0","eslint-plugin-react":"^7.37.4","eslint-plugin-standard":"^5.0.0","eslint-plugin-vitest":"^0.5.4","fetch-mock":"^12.6.0",glob:"^11.0.1",husky:"^9.1.7","lint-staged":"^16.4.0","node-fetch":"^2.7.0","null-loader":"^4.0.1",nx:"19.8.14","nx-remotecache-azure":"^19.0.0","os-browserify":"^0.3.0",prettier:"^3.8.3","start-server-and-test":"^2.0.11",storybook:"^8.6.15",typescript:"^5.8.2",vite:"^7.3.2",vitest:"^4.1.8","webpack-merge":"^6.0.1"},d="yarn@4.13.0",p={node:"24.x"},y={},u={name:e,version:t,private:!0,license:s,type:r,main:o,workspaces:i,scripts:a,"lint-staged":{"*.js":["eslint --fix","prettier --check"],"*.{json,md,css,ts,tsx,jsx}":["prettier --check"],"src/i18n/**/*.json":["node utils/sort-json.js","prettier --write"]},browserslist:l,dependencies:n,devDependencies:c,packageManager:d,engines:p,nx:y};export{l as browserslist,u as default,n as dependencies,c as devDependencies,p as engines,s as license,o as main,e as name,y as nx,d as packageManager,a as scripts,r as type,t as version,i as workspaces};
@@ -0,0 +1 @@
1
+ export{create}from"./clientAPI.js";
@@ -0,0 +1 @@
1
+ export{create}from"./dynamicPois.js";
@@ -0,0 +1 @@
1
+ export{create}from"./flightStatus.js";
@@ -0,0 +1 @@
1
+ export{create}from"./poiDataManager.js";
@@ -0,0 +1 @@
1
+ export{create}from"./sdkServer.js";
@@ -0,0 +1 @@
1
+ export{create}from"./searchService.js";
@@ -0,0 +1 @@
1
+ export{create}from"./venueDataLoader.js";
@@ -0,0 +1 @@
1
+ export{create}from"./wayfinder.js";
package/dist/src/app.js CHANGED
@@ -1 +1 @@
1
- import{map as e,mergeDeepRight as t}from"ramda";import n from"zousan-plus";import i from"./utils/i18n.js";import{startInitialStateListener as o}from"./utils/isInitialState.js";import a from"../package.json.js";import r 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";const c="undefined"!=typeof window;async function g(e,t,n){if(!n)return e.log.info(`Plugin ${t} explicitly disabled`),null;let i=t;if(i.includes("/")){const e=i.split("/");i=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/${i}.js`).catch(()=>import(`../plugins/${t}/src/${i}.js`)).then(i=>(e.log.info(`Creating plugin ${t}`),i.create(e,n)))}async function p(e){return c?import(`./configs/${e}.json`):import(`./configs/${e}.json.js`)}async function d(e,n){let i={};const o=await Promise.all(n.map(p));for(const e of o){let n=e.default;n=n.extends?await d(n,n.extends):n,i=t(i,n)}return i=t(i,e),i}const m=e=>t=>import(`./configs/postproc-${e}.ts`).then(e=>e.process(t));async function f(t){const p=Object.create(null);let f=t.extends?await d(t,t.extends):t;f.plugins.monitoring&&await import("../plugins/monitoring/src/monitoring.js").then(e=>e.activate(f.plugins.monitoring)),f=await(async e=>e.configPostProc?n.series(e,...e.configPostProc.map(m)):e)(f);const h=(e=>{const t=e.supportedLanguages||["am","ar","de","el-GR","en","es","fr","hi","is","it","ja","ko","nl","pl","pt","ru","so","th","zh-Hans","zh-Hant"];if("undefined"!=typeof window){let e=new URLSearchParams(location.search).get("lang")||navigator.language;for(;e;){if(e&&t.includes(e))return e;e=e.substring(0,e.lastIndexOf("-"))}}return e.defaultLanguage||"en"})(f),w=await i(h,{debug:f.debug});p.i18n=()=>w,p.gt=()=>w.t.bind(w),p.config=f,p.plugins={};const y=u("web-engine",{enabled:!!f.debug,isBrowser:c,color:"cyan",logFilter:f.logFilter,truncateObjects:!c,trace:false});if(p.log=y.sublog(f.name),p.bus=l({showEvents:!0,reportAllErrors:!0,log:y}),p.info={wePkg:a},"undefined"!=typeof window&&(f.debug?(p.debug=e(e=>e.bind(p),r),r.dndGo.call(p)):p.debug={},window._app=p,window.document&&window.document.title&&f.setWindowTitle&&(document.title=f.name)),p.env=s(p),f.theme?await n.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 i=n.initThemeManager(p);p.themePack=await i.buildTheme(f.theme,f.defaultTheme),o(),e.initLayerManager(p),t.initHistoryManager(p),p.destroy=()=>e.destroy(p)}):p.destroy=()=>{},f.plugins){for(const e in f.plugins)try{const t=f.plugins[e];if(p.plugins[e])throw Error(`Duplicate plugin name "${e}"`);const n=await g(p,e,t);n&&(p.plugins[e]=n)}catch(t){y.error("Error instantiating plugin "+e),y.error(t)}for(const e in p.plugins)p.plugins[e].init()}return p}export{f as create};
1
+ import{map as e,mergeDeepRight as t}from"ramda";import n from"zousan-plus";import o from"./utils/i18n.js";import{startInitialStateListener as i}from"./utils/isInitialState.js";import a from"../package.json.js";import r 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";const c="undefined"!=typeof window;async function g(e,t,n){return n?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/index.js`).then(o=>(e.log.info(`Creating plugin ${t}`),o.create(e,n))):(e.log.info(`Plugin ${t} explicitly disabled`),null)}async function d(e){return c?import(`./configs/${e}.json`):import(`./configs/${e}.json.js`)}async function p(e,n){let o={};const i=await Promise.all(n.map(d));for(const e of i){let n=e.default;n=n.extends?await p(n,n.extends):n,o=t(o,n)}return o=t(o,e),o}const m=e=>t=>import(`./configs/postproc-${e}.ts`).then(e=>e.process(t));async function f(t){const d=Object.create(null);let f=t.extends?await p(t,t.extends):t;f.plugins.monitoring&&await import("../_virtual/_empty_module_placeholder.js").then(e=>e.activate(f.plugins.monitoring)),f=await(async e=>e.configPostProc?n.series(e,...e.configPostProc.map(m)):e)(f);const w=(e=>{const t=e.supportedLanguages||["am","ar","de","el-GR","en","es","fr","hi","is","it","ja","ko","nl","pl","pt","ru","so","th","zh-Hans","zh-Hant"];if("undefined"!=typeof window){let e=new URLSearchParams(location.search).get("lang")||navigator.language;for(;e;){if(e&&t.includes(e))return e;e=e.substring(0,e.lastIndexOf("-"))}}return e.defaultLanguage||"en"})(f),h=await o(w,{debug:f.debug});d.i18n=()=>h,d.gt=()=>h.t.bind(h),d.config=f,d.plugins={};const y=u("web-engine",{enabled:!!f.debug,isBrowser:c,color:"cyan",logFilter:f.logFilter,truncateObjects:!c,trace:false});if(d.log=y.sublog(f.name),d.bus=l({showEvents:!0,reportAllErrors:!0,log:y}),d.info={wePkg:a},"undefined"!=typeof window&&(f.debug?(d.debug=e(e=>e.bind(d),r),r.dndGo.call(d)):d.debug={},window._app=d,window.document&&window.document.title&&f.setWindowTitle&&(document.title=f.name)),d.env=s(d),f.theme?await n.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(f.theme,f.defaultTheme),i(),e.initLayerManager(d),t.initHistoryManager(d),d.destroy=()=>e.destroy(d)}):d.destroy=()=>{},f.plugins){for(const e in f.plugins)try{const t=f.plugins[e];if(d.plugins[e])throw Error(`Duplicate plugin name "${e}"`);const n=await g(d,e,t);n&&(d.plugins[e]=n)}catch(t){y.error("Error instantiating plugin "+e),y.error(t)}for(const e in d.plugins)d.plugins[e].init()}return d}export{f as create};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atriusmaps-node-sdk",
3
- "version": "3.3.873",
3
+ "version": "3.3.875",
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",
@@ -1,164 +0,0 @@
1
- 'use strict';
2
-
3
- var trackjs = require('trackjs');
4
- var UAParser = require('ua-parser-js');
5
- var _package = require('../../../package.json.js');
6
-
7
- // import { ApplicationInsights } from '@microsoft/applicationinsights-web'
8
-
9
-
10
- /*
11
- Example configuration for monitoring plugin
12
-
13
- "monitoring": {
14
- "active": true, // this is the default, so not needed but here for clarification
15
- "monitorLocalhost": true, // this is false by default
16
- "trackjs": {
17
- "token": "a15a776ef76c4b91bd40a8d34c2bf30a",
18
- "application": "locusmol"
19
- },
20
- "applicationInsights": {
21
- // nothing here for now - do we want to include connectionString, disableAjaxTracking and disableFetchTracking ?
22
- }
23
- }
24
- */
25
-
26
- const PKG_VERSION = _package.default.version;
27
-
28
- /**
29
- * This is a non-standard plugin lifecycle function - created just for the monitoring so that we could "activate" (load) 3rd party monitoring
30
- * libraries as early in the application setup as possible - so this activate function is called from within app.js before the usual looping
31
- * through the plugin list and calling create.
32
- *
33
- * For both the current monitoring options (trackjs / applictaionInsights) there are bus messages to listen for, and that can't happen until
34
- * the create method - so that is why setup for these monitors is spread between activate (happens first) and create (happens later).
35
- *
36
- * @param {object} config The monitoring configuration object (see above for an example)
37
- */
38
- async function activate(config) {
39
- if (
40
- location.host.includes('localhost') &&
41
- !config.monitorLocalhost
42
- ) // we don't usually want to include TrackJS in local development
43
- {
44
- return;
45
- }
46
-
47
- if (
48
- config.active !== undefined &&
49
- !config.active
50
- ) // standard webEngine plugin config allows us to de-activate by setting active: false
51
- {
52
- return;
53
- }
54
-
55
- if (config.trackjs) {
56
- await activateTrackJS(config.trackjs);
57
- }
58
-
59
- if (config.applicationInsights) {
60
- await activateApplicationInsights();
61
- }
62
- }
63
-
64
- const activateTrackJS = async config => {
65
- trackjs.TrackJS.install({ ...config, version: PKG_VERSION });
66
- };
67
-
68
- let appInsights; // this gets defined here, but used later in finalizeSetupApplicationInsights
69
- const activateApplicationInsights = async () => {
70
- // See https://ablcode.visualstudio.com/Atrius/_wiki/wikis/Wayfinder%20Webengine/86142/application-insights
71
- return process.env.APP_INSIGHTS
72
- ? import('@microsoft/applicationinsights-web').then(({ ApplicationInsights }) => {
73
- appInsights = new ApplicationInsights({
74
- config: {
75
- connectionString: process.env.APP_INSIGHTS,
76
- disableAjaxTracking: true,
77
- disableFetchTracking: true,
78
- disableCookiesUsage: true, // older versions of app insights used to have this option, but it is now deprecated
79
- cookieCfg: {
80
- enabled: false, // disable cookie usage per EU GDPR requirements
81
- },
82
- },
83
- });
84
- appInsights.loadAppInsights();
85
- })
86
- : null;
87
- };
88
-
89
- function create(app, config) {
90
- if (
91
- location.host.includes('localhost') &&
92
- !config.monitorLocalhost
93
- ) // we don't usually want to include monitoring in local development
94
- {
95
- return;
96
- }
97
-
98
- if (config.trackjs) {
99
- finalizeSetupTrackjs(app);
100
- }
101
-
102
- if (config.applicationInsights) {
103
- finalizeSetupApplicationInsights(app);
104
- }
105
-
106
- return {
107
- init: () => {}, // noop
108
- };
109
- }
110
-
111
- function finalizeSetupTrackjs(app) {
112
- // set environment metadata
113
- if (location.host.includes('apps.locuslabs')) {
114
- if (location.pathname.includes('Commit')) {
115
- trackjs.TrackJS.addMetadata('env', 'commit');
116
- } else {
117
- trackjs.TrackJS.addMetadata('env', 'staging');
118
- }
119
- } else {
120
- trackjs.TrackJS.addMetadata('env', 'production');
121
- }
122
-
123
- app.bus.on('venueData/venueDataLoaded', ({ venueData }) => {
124
- trackjs.TrackJS.addMetadata('venueId', venueData.id);
125
- trackjs.TrackJS.addMetadata('assetStage', venueData.assetStage);
126
- trackjs.TrackJS.addMetadata('venueAssetVersion', venueData.version);
127
- });
128
-
129
- app.bus.on('kioskAdmin/kioskLocationChanged', ({ kioskLocation }) => {
130
- trackjs.TrackJS.addMetadata('kioskLocation', kioskLocation);
131
- });
132
- }
133
-
134
- function finalizeSetupApplicationInsights(app) {
135
- if (process.env.APP_INSIGHTS) {
136
- app.bus.on('appInsights/log', async log => {
137
- const shortAccountId = await app.bus.get('venueData/getAccountId');
138
- const parsedUserAgent = new UAParser().getResult();
139
-
140
- appInsights.trackEvent({
141
- ...log,
142
- properties: {
143
- url: window.location.href,
144
- instanceName: app.config.name,
145
- shortAccountId,
146
- productVersion: app.info.wePkg.version,
147
- deviceTimezone: Intl.DateTimeFormat().resolvedOptions().timeZone,
148
- deviceOSName: parsedUserAgent.os.name,
149
- deviceOSVersion: parsedUserAgent.os.version,
150
- uiLocale: app.i18n().language,
151
- browserName: parsedUserAgent.browser.name,
152
- browserVersion: parsedUserAgent.browser.version,
153
- webConfigId: app.config.uuid,
154
- location: typeof window !== 'undefined' ? window.location.origin : 'server',
155
- ...log.properties,
156
- },
157
- });
158
- appInsights.flush();
159
- });
160
- }
161
- }
162
-
163
- exports.activate = activate;
164
- exports.create = create;
@@ -1 +0,0 @@
1
- import{TrackJS as o}from"trackjs";import e from"ua-parser-js";import a from"../../../package.json.js";const n=a.version;async function t(o){location.host.includes("localhost")&&!o.monitorLocalhost||(void 0===o.active||o.active)&&(o.trackjs&&await i(o.trackjs),o.applicationInsights&&await c())}const i=async e=>{o.install({...e,version:n})};let s;const c=async()=>process.env.APP_INSIGHTS?import("@microsoft/applicationinsights-web").then(({ApplicationInsights:o})=>{s=new o({config:{connectionString:process.env.APP_INSIGHTS,disableAjaxTracking:!0,disableFetchTracking:!0,disableCookiesUsage:!0,cookieCfg:{enabled:!1}}}),s.loadAppInsights()}):null;function r(a,n){if(!location.host.includes("localhost")||n.monitorLocalhost)return n.trackjs&&function(e){location.host.includes("apps.locuslabs")?location.pathname.includes("Commit")?o.addMetadata("env","commit"):o.addMetadata("env","staging"):o.addMetadata("env","production");e.bus.on("venueData/venueDataLoaded",({venueData:e})=>{o.addMetadata("venueId",e.id),o.addMetadata("assetStage",e.assetStage),o.addMetadata("venueAssetVersion",e.version)}),e.bus.on("kioskAdmin/kioskLocationChanged",({kioskLocation:e})=>{o.addMetadata("kioskLocation",e)})}(a),n.applicationInsights&&function(o){process.env.APP_INSIGHTS&&o.bus.on("appInsights/log",async a=>{const n=await o.bus.get("venueData/getAccountId"),t=(new e).getResult();s.trackEvent({...a,properties:{url:window.location.href,instanceName:o.config.name,shortAccountId:n,productVersion:o.info.wePkg.version,deviceTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,deviceOSName:t.os.name,deviceOSVersion:t.os.version,uiLocale:o.i18n().language,browserName:t.browser.name,browserVersion:t.browser.version,webConfigId:o.config.uuid,location:"undefined"!=typeof window?window.location.origin:"server",...a.properties}}),s.flush()})}(a),{init:()=>{}}}export{t as activate,r as create};