@basemaps/server 6.28.1 → 6.29.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/build/cli.d.ts CHANGED
@@ -4,6 +4,7 @@ export declare class BasemapsServerCommand extends BaseCommandLine {
4
4
  config: import("@rushstack/ts-command-line").CommandLineStringParameter;
5
5
  ignoreConfig: import("@rushstack/ts-command-line").CommandLineFlagParameter;
6
6
  bundle: import("@rushstack/ts-command-line").CommandLineStringParameter;
7
+ assets: import("@rushstack/ts-command-line").CommandLineStringParameter;
7
8
  port: import("@rushstack/ts-command-line").CommandLineIntegerParameter;
8
9
  constructor();
9
10
  static args: never[];
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAW,MAAM,oCAAoC,CAAC;AAoB9E,qBAAa,qBAAsB,SAAQ,eAAe;IACxD,MAAM,kEAIH;IACH,YAAY,gEAGT;IACH,MAAM,kEAIH;IACH,IAAI,mEAKD;;IASH,MAAM,CAAC,IAAI,UAAM;IAEX,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IA0B9E,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;CAkDjC"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAGA,OAAO,EAAsC,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,eAAe,EAAW,MAAM,oCAAoC,CAAC;AAoB9E,qBAAa,qBAAsB,SAAQ,eAAe;IACxD,MAAM,kEAIH;IACH,YAAY,gEAGT;IACH,MAAM,kEAIH;IACH,MAAM,kEAIH;IACH,IAAI,mEAKD;;IASH,MAAM,CAAC,IAAI,UAAM;IAEX,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IA0B9E,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;CAwDjC"}
package/build/cli.js CHANGED
@@ -38,6 +38,11 @@ export class BasemapsServerCommand extends BaseCommandLine {
38
38
  parameterLongName: '--bundle',
39
39
  description: 'Compile the configuration into a bundle and output path',
40
40
  });
41
+ this.assets = this.defineStringParameter({
42
+ argumentName: 'ASSETS',
43
+ parameterLongName: '--assets',
44
+ description: 'Where the assets (sprites, fonts) are located',
45
+ });
41
46
  this.port = this.defineIntegerParameter({
42
47
  argumentName: 'PORT',
43
48
  parameterLongName: '--port',
@@ -108,6 +113,12 @@ export class BasemapsServerCommand extends BaseCommandLine {
108
113
  mem.createVirtualTileSets();
109
114
  Config.setConfigProvider(mem);
110
115
  }
116
+ if (this.assets.value) {
117
+ const isExists = await fsa.exists(this.assets.value);
118
+ if (!isExists)
119
+ throw new Error('--asset path is missing');
120
+ process.env[Env.AssetLocation] = this.assets.value;
121
+ }
111
122
  if (this.bundle.value != null) {
112
123
  throw new Error('--bundle path provided without providing a configuration path');
113
124
  }
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,OAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAuBnD,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,eAAe,CAwC7D"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAI3C,OAAgB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA2BnD,wBAAgB,YAAY,CAAC,MAAM,EAAE,OAAO,GAAG,eAAe,CAwC7D"}
package/build/server.js CHANGED
@@ -15,12 +15,17 @@ function isAlbResult(r) {
15
15
  }
16
16
  const instanceId = ulid.ulid();
17
17
  function getLandingLocation() {
18
- if (typeof require !== 'undefined' && typeof require.resolve === 'function') {
19
- return require.resolve('@basemaps/landing/dist');
18
+ try {
19
+ if (typeof require !== 'undefined' && typeof require.resolve === 'function') {
20
+ return require.resolve('@basemaps/landing/dist');
21
+ }
22
+ else {
23
+ const require = createRequire(import.meta.url);
24
+ return require.resolve('@basemaps/landing/dist');
25
+ }
20
26
  }
21
- else {
22
- const require = createRequire(import.meta.url);
23
- return require.resolve('@basemaps/landing/dist');
27
+ catch (e) {
28
+ return null;
24
29
  }
25
30
  }
26
31
  export function createServer(logger) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basemaps/server",
3
- "version": "6.28.1",
3
+ "version": "6.29.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/linz/basemaps.git",
@@ -44,20 +44,20 @@
44
44
  "bin/"
45
45
  ],
46
46
  "optionalDependencies": {
47
- "@basemaps/landing": "^6.28.1"
47
+ "@basemaps/landing": "^6.29.0"
48
48
  },
49
49
  "dependencies": {
50
- "sharp": "^0.30.2"
50
+ "sharp": "^0.30.7"
51
51
  },
52
52
  "devDependencies": {
53
- "@basemaps/config": "^6.28.1",
53
+ "@basemaps/config": "^6.29.0",
54
54
  "@basemaps/geo": "^6.28.1",
55
- "@basemaps/lambda-tiler": "^6.28.1",
55
+ "@basemaps/lambda-tiler": "^6.29.0",
56
56
  "@basemaps/landing": "^6.27.0",
57
- "@basemaps/shared": "^6.28.1",
57
+ "@basemaps/shared": "^6.29.0",
58
58
  "@fastify/static": "^5.0.2",
59
59
  "fastify": "^3.27.4",
60
60
  "pretty-json-log": "^1.0.0"
61
61
  },
62
- "gitHead": "f387e0365bcfc7391fd8d0665195b246c93532cf"
62
+ "gitHead": "9097d2f045d734d0d5acd968f026fe29ab6afcda"
63
63
  }