atriusmaps-node-sdk 3.3.378 → 3.3.380

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.378";
6
+ var version = "3.3.380";
7
7
  var license = "UNLICENSED";
8
8
  var type = "module";
9
9
  var main = "src/main.js";
@@ -79,7 +79,6 @@ var dependencies = {
79
79
  "@turf/helpers": "^6.5.0",
80
80
  "@turf/point-to-line-distance": "^6.5.0",
81
81
  "@vitejs/plugin-react": "^4.0.1",
82
- IObject: "^0.7.2",
83
82
  "axe-core": "^4.9.0",
84
83
  browserslist: "^4.24.2",
85
84
  "crypto-browserify": "^3.12.0",
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var IObject = require('IObject');
4
3
  var queryString = require('query-string');
5
4
  var R = require('ramda');
6
5
  var Zousan = require('zousan-plus');
@@ -104,7 +103,7 @@ async function create (rawConfig) {
104
103
  appInstance.gt = () => i18n$1.t.bind(i18n$1); // get translation function - don't hold this, it is bound to current lang
105
104
  appInstance.config = config;
106
105
 
107
- appInstance.plugins = new IObject();
106
+ appInstance.plugins = {};
108
107
  const appLog = log.initLog('web-engine', { enabled: !!config.debug, isBrowser, color: 'cyan', logFilter: config.logFilter, truncateObjects: !isBrowser, trace: TRACE });
109
108
 
110
109
  appInstance.log = appLog.sublog(config.name);
@@ -150,7 +149,7 @@ async function create (rawConfig) {
150
149
  if (appInstance.plugins[id]) { throw Error(`Duplicate plugin name "${id}"`) }
151
150
  const plugin = await setupPlugin(appInstance, id, pluginConfig);
152
151
  if (plugin)
153
- appInstance.plugins = appInstance.plugins.set(id, plugin);
152
+ appInstance.plugins[id] = plugin;
154
153
  } catch (e) {
155
154
  appLog.error('Error instantiating plugin ' + id);
156
155
  appLog.error(e);
@@ -1,6 +1,5 @@
1
1
  'use strict';
2
2
 
3
- var IObject = require('IObject');
4
3
  var app = require('./app.js');
5
4
 
6
5
  /**
@@ -10,15 +9,12 @@ var app = require('./app.js');
10
9
  */
11
10
 
12
11
 
12
+ // Note, we are no longer using IOBject - but we can freeze apps via Object.freeze(apps)
13
13
  // IObject.freeze = 'DEEP'
14
14
 
15
15
  // This is a list of "instances" of your full app stack. Often this will be only one.
16
16
  // If you wish to give it a name, use the appName property. Else one will be assigned.
17
- let apps = new IObject();
18
-
19
- // The configuration template is used as the base configurationx for all app
20
- // instances. It can be set with setConfigTemplate
21
- const configTemplate = new IObject();
17
+ const apps = { };
22
18
 
23
19
  const sendAlert = msg => typeof window !== 'undefined' && window.alert ? window.alert(msg) : console.error(msg);
24
20
 
@@ -30,17 +26,13 @@ const sendAlert = msg => typeof window !== 'undefined' && window.alert ? window.
30
26
  async function create (config) {
31
27
  if (!config) { throw Error('Attempt to create App instance with no configuration') }
32
28
 
33
- // Create a new immutable configuration based on the configuration template
34
- let myConfig = new IObject(Object.assign({}, configTemplate, config));
35
-
36
29
  // If no name was defined for this instance, create one.
37
- const appName = myConfig.appName || 'Instance' + (Object.keys(apps).length + 1);
38
- myConfig = myConfig.set('appName', appName);
30
+ const appName = config.appName || 'Instance' + (Object.keys(apps).length + 1);
31
+ config.appName = appName;
39
32
 
40
33
  try {
41
- const app$1 = await app.create(myConfig);
42
- // console.log('Got appInstance: ', app)
43
- apps = apps.set(appName, app$1);
34
+ const app$1 = await app.create(config);
35
+ apps[appName] = app$1;
44
36
  return app$1
45
37
  } catch (e) { console.error(e); e.message ? sendAlert(e.message) : sendAlert('Error creating map. Please try again later.'); }
46
38
  }
@@ -1 +1 @@
1
- var e="web-engine",s="3.3.378",o="UNLICENSED",r="module",t="src/main.js",l=["demo","deploy","nodesdk","src/extModules/flexapi","services/*","libraries/*"],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:comp":"cypress run --component","e2e:record":"yarn cypress run --env RECORD_MODE=true",e2eSDKTest:"yarn start-server-and-test 'cd ./deploy && yarn buildDev && yarn serveLocal' 8085 'cd ./cypress/e2e/sdk && npx http-server' 8080 'yarn cypress run --spec cypress/e2e/sdk/**'",e2eTest:"cypress run --browser chrome",goProd:"cd deploy && scripts/goProd.sh",goStaging:"deploy/scripts/goStaging.sh",i18nOverrides:"yarn node utils/i18nOverrideCli src/i18n src/i18n-overrides",lint:"eslint .",mod:"demo/startMod.sh",mol:"demo/startMol.sh","mol:build":"demo/startMolBuild.sh",molProd:"cd deploy && yarn buildAndRunMol",prepare:"husky install",test:"jest --no-cache --verbose","test-watch":"jest --verbose --watch","test:e2e:video":"cypress run","test:vitest":"vitest"},i=["defaults"],n={"@azure/event-hubs":"^5.12.2","@dnd-kit/core":"^6.1.0","@dnd-kit/modifiers":"^7.0.0","@dnd-kit/sortable":"^8.0.0","@dnd-kit/utilities":"^3.2.2","@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.119","@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-tooltip":"^0.3.102","@locus-labs/mol-desktop-zoom-control":"^0.1.141","@locus-labs/mol-mobile-box":"^0.1.115","@locus-labs/mol-mobile-floating-action-button":"^0.0.117","@locus-labs/mol-mobile-icon":"^0.1.118","@locus-labs/mol-mobile-text":"^0.1.116","@locus-labs/mol-mobile-toast":"^0.1.102","@mapbox/mapbox-gl-draw":"^1.4.3","@mapbox/mapbox-gl-draw-static-mode":"^1.0.1","@microsoft/applicationinsights-web":"^3.3.4","@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",browserslist:"^4.24.2","crypto-browserify":"^3.12.0","cypress-axe":"^1.5.0","cypress-multi-reporters":"^1.6.4","file-loader":"^6.2.0",flexsearch:"^0.7.43","h3-js":"^4.1.0",i18next:"^20.3.4","i18next-browser-languagedetector":"^6.1.1","jest-transform-css":"6.0.1",jsdom:"^25.0.1",jsonschema:"^1.2.6",luxon:"^3.3.0","maplibre-gl":"^4.7.1","mini-css-extract-plugin":"^1.6.0","mocha-junit-reporter":"^2.2.1",mochawesome:"^7.1.3","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.30.1",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","react-window":"^1.8.11","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"},c={"@applitools/eyes-cypress":"^3.47.0","@babel/core":"^7.26.0","@babel/eslint-parser":"^7.25.9","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-import-assertions":"^7.26.0","@babel/plugin-transform-modules-commonjs":"^7.25.9","@babel/plugin-transform-runtime":"^7.25.9","@babel/preset-env":"^7.26.0","@babel/preset-react":"^7.25.9","@testing-library/jest-dom":"^6.6.3","@typescript-eslint/eslint-plugin":"^7.13.0","@typescript-eslint/parser":"^7.13.0","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:"^8.57.0","eslint-config-standard":"^16.0.3","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-cypress":"^2.11.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jest":"^28.6.0","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:"29.7.0","jest-environment-jsdom":"^29.7.0","lint-staged":"^11.0.1","node-fetch":"^2.6.0","null-loader":"^4.0.1",nx:"19.4.2","nx-remotecache-azure":"^19.0.0","start-server-and-test":"^2.0.0",typescript:"^5.4.5",vite:"^4.3.9",vitest:"^2.1.5",webpack:"^5.96.1","webpack-merge":"^6.0.1"},p="yarn@4.3.1",d={node:"20.x"},m={},u={name:e,version:s,private:!0,license:o,type:r,main:t,workspaces:l,scripts:a,"lint-staged":{"*.js":["eslint --fix"]},browserslist:i,dependencies:n,devDependencies:c,packageManager:p,engines:d,nx:m};export{i as browserslist,u as default,n as dependencies,c as devDependencies,d as engines,o as license,t as main,e as name,m as nx,p as packageManager,a as scripts,r as type,s as version,l as workspaces};
1
+ var e="web-engine",s="3.3.380",o="UNLICENSED",r="module",t="src/main.js",l=["demo","deploy","nodesdk","src/extModules/flexapi","services/*","libraries/*"],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:comp":"cypress run --component","e2e:record":"yarn cypress run --env RECORD_MODE=true",e2eSDKTest:"yarn start-server-and-test 'cd ./deploy && yarn buildDev && yarn serveLocal' 8085 'cd ./cypress/e2e/sdk && npx http-server' 8080 'yarn cypress run --spec cypress/e2e/sdk/**'",e2eTest:"cypress run --browser chrome",goProd:"cd deploy && scripts/goProd.sh",goStaging:"deploy/scripts/goStaging.sh",i18nOverrides:"yarn node utils/i18nOverrideCli src/i18n src/i18n-overrides",lint:"eslint .",mod:"demo/startMod.sh",mol:"demo/startMol.sh","mol:build":"demo/startMolBuild.sh",molProd:"cd deploy && yarn buildAndRunMol",prepare:"husky install",test:"jest --no-cache --verbose","test-watch":"jest --verbose --watch","test:e2e:video":"cypress run","test:vitest":"vitest"},i=["defaults"],n={"@azure/event-hubs":"^5.12.2","@dnd-kit/core":"^6.1.0","@dnd-kit/modifiers":"^7.0.0","@dnd-kit/sortable":"^8.0.0","@dnd-kit/utilities":"^3.2.2","@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.119","@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-tooltip":"^0.3.102","@locus-labs/mol-desktop-zoom-control":"^0.1.141","@locus-labs/mol-mobile-box":"^0.1.115","@locus-labs/mol-mobile-floating-action-button":"^0.0.117","@locus-labs/mol-mobile-icon":"^0.1.118","@locus-labs/mol-mobile-text":"^0.1.116","@locus-labs/mol-mobile-toast":"^0.1.102","@mapbox/mapbox-gl-draw":"^1.4.3","@mapbox/mapbox-gl-draw-static-mode":"^1.0.1","@microsoft/applicationinsights-web":"^3.3.4","@turf/circle":"^6.5.0","@turf/helpers":"^6.5.0","@turf/point-to-line-distance":"^6.5.0","@vitejs/plugin-react":"^4.0.1","axe-core":"^4.9.0",browserslist:"^4.24.2","crypto-browserify":"^3.12.0","cypress-axe":"^1.5.0","cypress-multi-reporters":"^1.6.4","file-loader":"^6.2.0",flexsearch:"^0.7.43","h3-js":"^4.1.0",i18next:"^20.3.4","i18next-browser-languagedetector":"^6.1.1","jest-transform-css":"6.0.1",jsdom:"^25.0.1",jsonschema:"^1.2.6",luxon:"^3.3.0","maplibre-gl":"^4.7.1","mini-css-extract-plugin":"^1.6.0","mocha-junit-reporter":"^2.2.1",mochawesome:"^7.1.3","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.30.1",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","react-window":"^1.8.11","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"},c={"@applitools/eyes-cypress":"^3.47.0","@babel/core":"^7.26.0","@babel/eslint-parser":"^7.25.9","@babel/plugin-proposal-class-properties":"^7.18.6","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/plugin-syntax-import-assertions":"^7.26.0","@babel/plugin-transform-modules-commonjs":"^7.25.9","@babel/plugin-transform-runtime":"^7.25.9","@babel/preset-env":"^7.26.0","@babel/preset-react":"^7.25.9","@testing-library/jest-dom":"^6.6.3","@typescript-eslint/eslint-plugin":"^7.13.0","@typescript-eslint/parser":"^7.13.0","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:"^8.57.0","eslint-config-standard":"^16.0.3","eslint-import-resolver-typescript":"^3.6.1","eslint-plugin-cypress":"^2.11.1","eslint-plugin-import":"^2.16.0","eslint-plugin-jest":"^28.6.0","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:"29.7.0","jest-environment-jsdom":"^29.7.0","lint-staged":"^11.0.1","node-fetch":"^2.6.0","null-loader":"^4.0.1",nx:"19.4.2","nx-remotecache-azure":"^19.0.0","start-server-and-test":"^2.0.0",typescript:"^5.4.5",vite:"^4.3.9",vitest:"^2.1.5",webpack:"^5.96.1","webpack-merge":"^6.0.1"},p="yarn@4.3.1",d={node:"20.x"},m={},u={name:e,version:s,private:!0,license:o,type:r,main:t,workspaces:l,scripts:a,"lint-staged":{"*.js":["eslint --fix"]},browserslist:i,dependencies:n,devDependencies:c,packageManager:p,engines:d,nx:m};export{i as browserslist,u as default,n as dependencies,c as devDependencies,d as engines,o as license,t as main,e as name,m as nx,p as packageManager,a as scripts,r as type,s as version,l as workspaces};
package/dist/src/app.js CHANGED
@@ -1 +1 @@
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 h=(e=>{const n=e.supportedLanguages||["ar","de","en","es","fr","hi","is","it","ja","ko","pl","pt","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),y=await c(h,{debug:w.debug});d.i18n=()=>y,d.gt=()=>y.t.bind(y),d.config=w,d.plugins=new e;const j=u("web-engine",{enabled:!!w.debug,isBrowser:g,color:"cyan",logFilter:w.logFilter,truncateObjects:!g,trace:false});if(d.log=j.sublog(w.name),d.bus=l({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};
1
+ import e from"query-string";import{map as t,mergeDeepRight as n}from"ramda";import o from"zousan-plus";import i from"../package.json.js";import r from"./debugTools.js";import{buildEnv as a}from"./env.js";import{create as s}from"./extModules/bustle.js";import{initLog as l}from"./extModules/log.js";import u from"./utils/i18n.js";const c="undefined"!=typeof window;async function g(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 p(e){return c?import(`./configs/${e}.json`):import(`./configs/${e}.json.js`)}async function d(e,t){let o={};const i=await Promise.all(t.map(p));for(const e of i){let t=e.default;t=t.extends?await d(t,t.extends):t,o=n(o,t)}return o=n(o,e),o}const m=e=>t=>import(`./configs/postproc-${e}.js`).then((e=>e.process(t)));async function f(n){const p=Object.create(null);let f=n.extends?await d(n,n.extends):n;f.plugins.monitoring&&import("../_virtual/_empty_module_placeholder.js").then((e=>e.activate(f.plugins.monitoring))),f=await(async e=>e.configPostProc?o.series(e,...e.configPostProc.map(m)):e)(f);const h=(t=>{const n=t.supportedLanguages||["ar","de","en","es","fr","hi","is","it","ja","ko","pl","pt","zh-Hans","zh-Hant"];if("undefined"!=typeof window){let t=e.parse(location.search).lang||navigator.language;for(;t;){if(t&&n.includes(t))return t;t=t.substring(0,t.lastIndexOf("-"))}}return t.defaultLanguage||"en"})(f),w=await u(h,{debug:f.debug});p.i18n=()=>w,p.gt=()=>w.t.bind(w),p.config=f,p.plugins={};const y=l("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=s({showEvents:!0,reportAllErrors:!0,log:y}),p.info={wePkg:i},"undefined"!=typeof window&&(f.debug?(p.debug=t((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=a(p),f.theme?await o.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(p);p.themePack=await o.buildTheme(f.theme,f.defaultTheme),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 +1 @@
1
- import e from"IObject";import{create as t}from"./app.js";let r=new e;const n=new e,a=e=>"undefined"!=typeof window&&window.alert?window.alert(e):console.error(e);async function o(o){if(!o)throw Error("Attempt to create App instance with no configuration");let s=new e(Object.assign({},n,o));const c=s.appName||"Instance"+(Object.keys(r).length+1);s=s.set("appName",c);try{const e=await t(s);return r=r.set(c,e),e}catch(e){console.error(e),e.message?a(e.message):a("Error creating map. Please try again later.")}}export{o as create};
1
+ import{create as e}from"./app.js";const t={},r=e=>"undefined"!=typeof window&&window.alert?window.alert(e):console.error(e);async function a(a){if(!a)throw Error("Attempt to create App instance with no configuration");const n=a.appName||"Instance"+(Object.keys(t).length+1);a.appName=n;try{const r=await e(a);return t[n]=r,r}catch(e){console.error(e),e.message?r(e.message):r("Error creating map. Please try again later.")}}export{a as create};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atriusmaps-node-sdk",
3
- "version": "3.3.378",
3
+ "version": "3.3.380",
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",
@@ -33,14 +33,12 @@
33
33
  ],
34
34
  "scripts": {
35
35
  "build": "rollup -c rollup.config.js && cp package-cjs.json dist/cjs/package.json",
36
- "install": "yarn build",
37
- "test": "vitest test"
36
+ "test": "yarn build && vitest test"
38
37
  },
39
38
  "dependencies": {
40
39
  "@turf/circle": "^6.5.0",
41
40
  "@turf/helpers": "^6.5.0",
42
41
  "@turf/point-to-line-distance": "^6.5.0",
43
- "IObject": "^0.6.2",
44
42
  "flexsearch": "^0.7.43",
45
43
  "https-proxy-agent": "^7.0.4",
46
44
  "i18next": "^20.3.4",