Skip to content

Commit

Permalink
fix: APPS-3009 Increase heapsize for production build (#54)
Browse files Browse the repository at this point in the history
* fix: update heapsize

* comment out/disable console.log statements

---------

Co-authored-by: tinuola <[email protected]>
  • Loading branch information
tinuola and tinuola authored Oct 16, 2024
1 parent 2e5861c commit fdf4a7f
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 19 deletions.
4 changes: 2 additions & 2 deletions composables/useHeader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ export const useHeader = () => {
const header = useState('header', () => {})

const setHeader = (store) => {
console.log('set header', import.meta.server)
console.log('setHeader', store, header.value || 'None!')
// console.log('set header', import.meta.server)
// console.log('setHeader', store, header.value || 'None!')
if (!header.value) {
header.value = store.header
}
Expand Down
2 changes: 1 addition & 1 deletion modules/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default defineNuxtModule({
})
const body = await response.text()
const testJson = JSON.parse(body)
console.log('Index created:' + JSON.stringify(testJson))
// console.log('Index created:' + JSON.stringify(testJson))
console.log('Elastic Search index created succesfully!')
} catch (err) {
console.error('Error:', err)
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"scripts": {
"build": "nuxt build",
"dev": "nuxt dev",
"generate": "node --max-old-space-size=8096 node_modules/nuxi/bin/nuxi.mjs generate",
"prerender": "node --max-old-space-size=8096 node_modules/nuxi/bin/nuxi.mjs build --prerender --log-level verbose",
"generate": "node --max-old-space-size=12288 node_modules/nuxi/bin/nuxi.mjs generate",
"prerender": "node --max-old-space-size=12288 node_modules/nuxi/bin/nuxi.mjs build --prerender --log-level verbose",
"start": "pnpm dlx serve .output/public",
"preview": "nuxt preview",
"postinstall": "nuxt prepare",
Expand Down Expand Up @@ -41,4 +41,4 @@
"ucla-library-design-tokens": "^5.27.0",
"ucla-library-website-components": "3.29.1"
}
}
}
2 changes: 1 addition & 1 deletion pages/collections/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if (!data.value.ftvaCollection) {
const page = ref(_get(data.value, 'ftvaCollection', {}))
watch(data, (newVal, oldVal) => {
console.log('In watch preview enabled, newVal, oldVal', newVal, oldVal)
// console.log('In watch preview enabled, newVal, oldVal', newVal, oldVal)
page.value = _get(newVal, 'ftvaCollection', {})
})
Expand Down
2 changes: 1 addition & 1 deletion pages/events/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const page = ref(_get(data.value, 'ftvaEvent', {}))
const series = ref(_get(data.value, 'ftvaEventSeries', {}))
watch(data, (newVal, oldVal) => {
console.log('In watch preview enabled, newVal, oldVal', newVal, oldVal)
// console.log('In watch preview enabled, newVal, oldVal', newVal, oldVal)
page.value = _get(newVal, 'ftvaEvent', {})
series.value = _get(newVal, 'ftvaEventSeries', {})
})
Expand Down
2 changes: 1 addition & 1 deletion pages/series/[slug].vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const otherSeriesOngoing = ref(_get(data.value, 'otherSeriesOngoing', {}))
const otherSeriesUpcoming = ref(_get(data.value, 'otherSeriesUpcoming', {}))
watch(data, (newVal, oldVal) => {
console.log('In watch preview enabled, newVal, oldVal', newVal, oldVal)
// console.log('In watch preview enabled, newVal, oldVal', newVal, oldVal)
page.value = _get(newVal, 'ftvaEventSeries', {})
upcomingEvents.value = _get(newVal, 'upcomingEvents', {})
pastEvents.value = _get(newVal, 'pastEvents', {})
Expand Down
2 changes: 1 addition & 1 deletion plugins/craft-layout-data.client.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default defineNuxtPlugin((nuxtApp) => { //
]
}

console.log('globalStore.footerPrimary', JSON.stringify(globalStore.footerPrimary))
// console.log('globalStore.footerPrimary', JSON.stringify(globalStore.footerPrimary))
}
}
return {
Expand Down
8 changes: 4 additions & 4 deletions plugins/data-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ async function keywordSearchWithFilters(
config.public.esAlias === ''
)
return
console.log('keyword:' + keyword)
console.log('filters:' + filters)
console.log('sort:' + sort)
// console.log('keyword:' + keyword)
// console.log('filters:' + filters)
// console.log('sort:' + sort)

const testquery = JSON.stringify({
_source: [...source],
Expand All @@ -100,7 +100,7 @@ async function keywordSearchWithFilters(
...parseFieldNames(aggFields),
},
})
console.log('this is the query: ' + testquery)
// console.log('this is the query: ' + testquery)

const response = await fetch(
`${config.public.esURL}/${config.public.esAlias}/_search`, // replace alias with indexname
Expand Down
8 changes: 4 additions & 4 deletions plugins/indexer.server.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ export default defineNuxtPlugin((nuxtApp) => {
// console.log('Existing data in ES', docExistsResponseValue)

if (docExistsResponseValue && docExistsResponseValue._source) {
console.log('GET-RESPONSE: ' + slug)
// console.log('GET-RESPONSE: ' + slug)
const updateUrl = `${esURL}/${esIndex}/_update/${slug}`
console.log('ES update url', updateUrl)
// console.log('ES update url', updateUrl)
const postBody = {
doc: data
}
console.log('postBody', JSON.stringify(postBody))
// console.log('postBody', JSON.stringify(postBody))
const updateResponse = await fetch(
`${esURL}/${esIndex}/_update/${slug}`,
{
Expand Down Expand Up @@ -61,7 +61,7 @@ export default defineNuxtPlugin((nuxtApp) => {
}
)

console.log('Create a new document in ES:', await response.text())
// console.log('Create a new document in ES:', await response.text())
}
} else {
console.warn('not indexing anything')
Expand Down
2 changes: 1 addition & 1 deletion utils/arrayOfArrays.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function arrayOfArrays(arr, chunkSize) {
const group = []
for (let i = 0; i < arr.length; i += chunkSize) {
const chunk = arr.slice(i, i + chunkSize)
console.log('Chunk' + i + chunk)
// console.log('Chunk' + i + chunk)
group.push(chunk)
}
return group
Expand Down

1 comment on commit fdf4a7f

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.