bunki 0.14.0 → 0.14.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.
- package/dist/cli.js +30 -24
- package/dist/index.js +30 -24
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -33105,33 +33105,39 @@ async function parseMarkdownFile(filePath) {
|
|
|
33105
33105
|
excerpt: data.excerpt || extractExcerpt(content),
|
|
33106
33106
|
html: sanitizedHtml,
|
|
33107
33107
|
...data.location && {
|
|
33108
|
-
location: {
|
|
33109
|
-
|
|
33110
|
-
|
|
33111
|
-
|
|
33112
|
-
|
|
33113
|
-
|
|
33108
|
+
location: (() => {
|
|
33109
|
+
const loc = Array.isArray(data.location) ? data.location[0] : data.location;
|
|
33110
|
+
return {
|
|
33111
|
+
name: loc.name,
|
|
33112
|
+
address: loc.address,
|
|
33113
|
+
lat: loc.lat || loc.latitude,
|
|
33114
|
+
lng: loc.lng || loc.longitude
|
|
33115
|
+
};
|
|
33116
|
+
})()
|
|
33114
33117
|
},
|
|
33115
33118
|
...data.category && { category: data.category },
|
|
33116
33119
|
...data.business && {
|
|
33117
|
-
business: {
|
|
33118
|
-
|
|
33119
|
-
|
|
33120
|
-
|
|
33121
|
-
|
|
33122
|
-
|
|
33123
|
-
|
|
33124
|
-
|
|
33125
|
-
|
|
33126
|
-
|
|
33127
|
-
|
|
33128
|
-
|
|
33129
|
-
|
|
33130
|
-
|
|
33131
|
-
|
|
33132
|
-
|
|
33133
|
-
|
|
33134
|
-
|
|
33120
|
+
business: (() => {
|
|
33121
|
+
const biz = Array.isArray(data.business) ? data.business[0] : data.business;
|
|
33122
|
+
return {
|
|
33123
|
+
type: biz.type,
|
|
33124
|
+
name: biz.name,
|
|
33125
|
+
address: biz.address,
|
|
33126
|
+
lat: biz.lat || biz.latitude,
|
|
33127
|
+
lng: biz.lng || biz.longitude,
|
|
33128
|
+
...biz.cuisine && { cuisine: biz.cuisine },
|
|
33129
|
+
...biz.priceRange && {
|
|
33130
|
+
priceRange: biz.priceRange
|
|
33131
|
+
},
|
|
33132
|
+
...biz.telephone && {
|
|
33133
|
+
telephone: biz.telephone
|
|
33134
|
+
},
|
|
33135
|
+
...biz.url && { url: biz.url },
|
|
33136
|
+
...biz.openingHours && {
|
|
33137
|
+
openingHours: biz.openingHours
|
|
33138
|
+
}
|
|
33139
|
+
};
|
|
33140
|
+
})()
|
|
33135
33141
|
}
|
|
33136
33142
|
};
|
|
33137
33143
|
return { post, error: null };
|
package/dist/index.js
CHANGED
|
@@ -30723,33 +30723,39 @@ async function parseMarkdownFile(filePath) {
|
|
|
30723
30723
|
excerpt: data.excerpt || extractExcerpt(content),
|
|
30724
30724
|
html: sanitizedHtml,
|
|
30725
30725
|
...data.location && {
|
|
30726
|
-
location: {
|
|
30727
|
-
|
|
30728
|
-
|
|
30729
|
-
|
|
30730
|
-
|
|
30731
|
-
|
|
30726
|
+
location: (() => {
|
|
30727
|
+
const loc = Array.isArray(data.location) ? data.location[0] : data.location;
|
|
30728
|
+
return {
|
|
30729
|
+
name: loc.name,
|
|
30730
|
+
address: loc.address,
|
|
30731
|
+
lat: loc.lat || loc.latitude,
|
|
30732
|
+
lng: loc.lng || loc.longitude
|
|
30733
|
+
};
|
|
30734
|
+
})()
|
|
30732
30735
|
},
|
|
30733
30736
|
...data.category && { category: data.category },
|
|
30734
30737
|
...data.business && {
|
|
30735
|
-
business: {
|
|
30736
|
-
|
|
30737
|
-
|
|
30738
|
-
|
|
30739
|
-
|
|
30740
|
-
|
|
30741
|
-
|
|
30742
|
-
|
|
30743
|
-
|
|
30744
|
-
|
|
30745
|
-
|
|
30746
|
-
|
|
30747
|
-
|
|
30748
|
-
|
|
30749
|
-
|
|
30750
|
-
|
|
30751
|
-
|
|
30752
|
-
|
|
30738
|
+
business: (() => {
|
|
30739
|
+
const biz = Array.isArray(data.business) ? data.business[0] : data.business;
|
|
30740
|
+
return {
|
|
30741
|
+
type: biz.type,
|
|
30742
|
+
name: biz.name,
|
|
30743
|
+
address: biz.address,
|
|
30744
|
+
lat: biz.lat || biz.latitude,
|
|
30745
|
+
lng: biz.lng || biz.longitude,
|
|
30746
|
+
...biz.cuisine && { cuisine: biz.cuisine },
|
|
30747
|
+
...biz.priceRange && {
|
|
30748
|
+
priceRange: biz.priceRange
|
|
30749
|
+
},
|
|
30750
|
+
...biz.telephone && {
|
|
30751
|
+
telephone: biz.telephone
|
|
30752
|
+
},
|
|
30753
|
+
...biz.url && { url: biz.url },
|
|
30754
|
+
...biz.openingHours && {
|
|
30755
|
+
openingHours: biz.openingHours
|
|
30756
|
+
}
|
|
30757
|
+
};
|
|
30758
|
+
})()
|
|
30753
30759
|
}
|
|
30754
30760
|
};
|
|
30755
30761
|
return { post, error: null };
|
package/package.json
CHANGED