@mountainpass/addressr 1.0.269 → 1.1.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/README.md CHANGED
@@ -165,6 +165,12 @@ Or for peace of mind for your mission critical solutions, get commercial support
165
165
  | ELASTIC_PASSWORD | _blank_ | Connect to open search without authentication | ✅ |
166
166
  | ELASTIC_PASSWORD | _non-blank_ | Connect to open search with the specified password | |
167
167
  | PAGE_SIZE | 8 | Number or records to return in a search | ✅ |
168
+ | ADDRESSR_ACCESS_CONTROL_ALLOW_ORIGIN | _blank_ | An `Access-Control-Allow-Origin` response header is **not** returned | ✅ |
169
+ | ADDRESSR_ACCESS_CONTROL_ALLOW_ORIGIN | _non-blank_ | An `Access-Control-Allow-Origin` response header is returned with the value in the environment variable | |
170
+ | ADDRESSR_ACCESS_CONTROL_EXPOSE_HEADERS | _blank_ | An `Access-Control-Expose-Headers` response header is **not** returned | ✅ |
171
+ | ADDRESSR_ACCESS_CONTROL_EXPOSE_HEADERS | _non-blank_ | An `Access-Control-Expose-Headers` response header is returned with the value in the environment variable | |
172
+ | ADDRESSR_ACCESS_CONTROL_ALLOW_HEADERS | _blank_ | An `Access-Control-Allow-Headers` response header is **not** returned | ✅ |
173
+ | ADDRESSR_ACCESS_CONTROL_ALLOW_HEADERS | _non-blank_ | An `Access-Control-Allow-Headers` response header is returned with the value in the environment variable | |
168
174
 
169
175
  NOTE: When adjusting PAGE_SIZE, you should take into account how quickly you want the initial results returned to the user. In many use cases, you want this to be as fast as possible. If you need show more results to the user, you are often better off leaving it a 8 and using the paging links to get more results while you are displaying the first 8.
170
176
 
@@ -50,6 +50,10 @@ function startRest2Server() {
50
50
  response.append('Access-Control-Expose-Headers', process.env.ADDRESSR_ACCESS_CONTROL_EXPOSE_HEADERS);
51
51
  }
52
52
 
53
+ if (process.env.ADDRESSR_ACCESS_CONTROL_ALLOW_HEADERS !== undefined) {
54
+ response.append('Access-Control-Allow-Headers', process.env.ADDRESSR_ACCESS_CONTROL_ALLOW_HEADERS);
55
+ }
56
+
53
57
  next();
54
58
  });
55
59
  const waycharter = new _waycharter.WayCharter();
package/lib/swagger.js CHANGED
@@ -112,6 +112,10 @@ function startServer() {
112
112
  response.append('Access-Control-Expose-Headers', process.env.ADDRESSR_ACCESS_CONTROL_EXPOSE_HEADERS);
113
113
  }
114
114
 
115
+ if (process.env.ADDRESSR_ACCESS_CONTROL_ALLOW_HEADERS !== undefined) {
116
+ response.append('Access-Control-Allow-Headers', process.env.ADDRESSR_ACCESS_CONTROL_ALLOW_HEADERS);
117
+ }
118
+
115
119
  next();
116
120
  });
117
121
  return swaggerInit().then(({
package/lib/version.js CHANGED
@@ -4,4 +4,4 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  // generated by genversion
7
- const version = exports.version = '1.0.269';
7
+ const version = exports.version = '1.1.0';
package/package.json CHANGED
@@ -1,11 +1,17 @@
1
1
  {
2
2
  "name": "@mountainpass/addressr",
3
- "version": "1.0.269",
3
+ "version": "1.1.0",
4
4
  "description": "Australian Address Validation, Search and Autocomplete",
5
- "author": "Mountain Pass <addressr@mountain-pass.com.au>",
5
+ "author": {
6
+ "name": "Mountain Pass",
7
+ "url": "https://mountain-pass.com.au"
8
+ },
6
9
  "contributors": [
7
10
  "Tom Howard <tom@mountain-pass.com.au>"
8
11
  ],
12
+ "publishConfig": {
13
+ "access": "public"
14
+ },
9
15
  "engines": {
10
16
  "node": ">=14.21.2"
11
17
  },
@@ -14,6 +20,9 @@
14
20
  "SEARCH_IMAGE": "opensearchproject/opensearch:1.2.4"
15
21
  },
16
22
  "scripts": {
23
+ "turbo:build": "turbo run build",
24
+ "turbo:ci:version": "turbo run ci:version",
25
+ "turbo:ci:publish": "turbo run ci:publish",
17
26
  "pull:open-search": "docker pull ${npm_package_config_SEARCH_IMAGE}",
18
27
  "start:open-search": "docker run -p 9200:9200 -p 9300:9300 -e \"ES_JAVA_OPTS=-Xms1g -Xmx1g\" -e \"discovery.type=single-node\" -e \"plugins.security.disabled=true\" \"${npm_package_config_SEARCH_IMAGE}\"",
19
28
  "hmm": "echo mountainpass-addressr-${npm_package_version}.tgz",
@@ -105,7 +114,10 @@
105
114
  "postdocker:push": "docker push \"mountainpass/addressr:latest\"",
106
115
  "check-licenses": "license-checker --production --onlyAllow 'MIT;Apache-2.0;ISC;Custom: http://github.com/substack/node-bufferlist;Unlicense;BSD-2-Clause;BSD-3-Clause;WTFPL;0BSD;MIT*' --summary",
107
116
  "pre-commit": "lint-staged && npm run check-licenses",
108
- "test:performance": "k6 run --out csv=target/stress.csv test/k6/script.js"
117
+ "test:performance": "k6 run --out csv=target/stress.csv test/k6/script.js",
118
+ "add-changeset": "changeset add --open",
119
+ "ci:version": "[ \"$CI\" = true ] && changeset version || echo \"Dry run: changeset version\"",
120
+ "ci:publish": "[ \"$CI\" = true ] && changeset publish || echo \"Dry run: changeset publish\""
109
121
  },
110
122
  "bin": {
111
123
  "addressr-loader": "lib/bin/addressr-loader.js",
@@ -135,6 +147,7 @@
135
147
  "license": "Apache-2.0",
136
148
  "private": false,
137
149
  "dependencies": {
150
+ "@changesets/cli": "^2.26.2",
138
151
  "@mountainpass/waycharter": "^1.0.68",
139
152
  "@opensearch-project/opensearch": "^2.0.0",
140
153
  "debug": "^4.1.1",
@@ -154,6 +167,7 @@
154
167
  "progress": "^2.0.3",
155
168
  "semver": "^7.3.2",
156
169
  "swagger-tools": "^0.10.4",
170
+ "turbo": "^1.10.15",
157
171
  "unzip-stream": "^0.3.0",
158
172
  "uri-template-lite": "^20.5.0",
159
173
  "wait-port": "^0.2.2"
@@ -234,4 +248,4 @@
234
248
  "pre-commit": "npm run pre-commit"
235
249
  }
236
250
  }
237
- }
251
+ }