jsfe 1.53.0 → 1.53.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../src/helpers/address.js"],"names":[],"mappings":"AAEA;;;;;EAQC;AACD;;;;;
|
|
1
|
+
{"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../src/helpers/address.js"],"names":[],"mappings":"AAEA;;;;;EAQC;AACD;;;;;SAWC;AACD,gDAEC;AACD;;;;;EASC;AACD;;;;;;;;EAIC"}
|
package/dist/helpers/address.js
CHANGED
|
@@ -13,7 +13,9 @@ export function addressDraft(raw) {
|
|
|
13
13
|
export function zipLocation(result) {
|
|
14
14
|
const components = result?.components || result?.results?.[0]?.address_components || [];
|
|
15
15
|
const part = (kind, short = false) => { const row = components.find(c => (c.types || []).includes(kind)); return row ? String(short ? row.short_name || row.long_name : row.long_name || row.short_name) : ''; };
|
|
16
|
-
|
|
16
|
+
// The place name its mail carries: the locality, else (inside a city Google splits into named areas, such as Los Angeles's
|
|
17
|
+
// Canoga Park and West Hills, where it returns no locality) the sublocality or neighborhood.
|
|
18
|
+
const city = part('locality') || part('postal_town') || part('sublocality') || part('sublocality_level_1') || part('neighborhood'), state = part('administrative_area_level_1', true);
|
|
17
19
|
// A ZIP code can belong to several places (90023: Commerce, East Los Angeles, Los Angeles, Vernon); each is a name its
|
|
18
20
|
// mail may carry, so the caller picks one. Google lists them as postcode_localities; at most 7 (8 is a reserved key).
|
|
19
21
|
const listed = [].concat(result?.localities || result?.results?.[0]?.postcode_localities || []).map(String).filter(Boolean);
|
|
@@ -30,7 +32,7 @@ export function streetLocation(result, said, zip) {
|
|
|
30
32
|
const exact = result?.status === 'OK' && row.partial_match !== true && types.includes('street_address') && locationType === 'ROOFTOP' && part('street_number') && part('route') && (!part('postal_code') || part('postal_code') === zip);
|
|
31
33
|
// An exact street match names the place its mail carries; it corrects a city read from the ZIP code alone (90805 is
|
|
32
34
|
// Lakewood to the ZIP lookup, while its streets are Long Beach and Lakewood)
|
|
33
|
-
const city = exact ? part('locality') || part('postal_town') || part('sublocality') : '';
|
|
35
|
+
const city = exact ? part('locality') || part('postal_town') || part('sublocality') || part('sublocality_level_1') || part('neighborhood') : '';
|
|
34
36
|
return { street: exact ? part('street_number') + ' ' + part('route') : String(said).trim(), said: String(said).trim(), verified: !!exact, city };
|
|
35
37
|
}
|
|
36
38
|
export function resolvedAddress(values, data) {
|
package/dist/runtime-identity.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const JSFE_RUNTIME_FINGERPRINT = "sha256:
|
|
1
|
+
export const JSFE_RUNTIME_FINGERPRINT = "sha256:8c20b9455024dec07f49227a0774f24c296eeef219a95007dcf4801340d0f140";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsfe",
|
|
3
|
-
"version": "1.53.
|
|
3
|
+
"version": "1.53.1",
|
|
4
4
|
"description": "TypeScript workflow engine for conversational/automation apps: multi-flow orchestration, interrupt/resume, stack-based control, robust errors, and flexible tool/REST integration.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ron Pinkas",
|