Skip to content

Commit

Permalink
Merge pull request #1115 from dpc-sdp/feature/fix-api-exports
Browse files Browse the repository at this point in the history
fix undefined process error in client side code
  • Loading branch information
dylankelly authored Apr 18, 2024
2 parents 5c9248f + 20033df commit 919e6ad
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</template>

<script setup lang="ts">
import { stripSiteId } from '@dpc-sdp/ripple-tide-api'
import { stripSiteId } from '@dpc-sdp/ripple-tide-api/helpers'
interface Props {
feature: any
Expand Down
2 changes: 1 addition & 1 deletion examples/nuxt-app/mock-routes.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
},
{
"path": "/publication-page",
"fixture": "publication-page/sample-publication-page.json"
"fixture": "publication/sample-publication-page.json"
},
{
"path": "/",
Expand Down
1 change: 1 addition & 0 deletions examples/nuxt-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"dependencies": {
"@dpc-sdp/nuxt-ripple": "workspace:*",
"@dpc-sdp/nuxt-ripple-analytics": "workspace:*",
"@dpc-sdp/nuxt-ripple-cli": "workspace:*",
"@dpc-sdp/nuxt-ripple-preview": "workspace:*",
"@dpc-sdp/ripple-tide-event": "workspace:*",
"@dpc-sdp/ripple-tide-topic": "workspace:*",
Expand Down
1 change: 0 additions & 1 deletion packages/nuxt-ripple-cli/src/commands/favicon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export default function rplFaviconCommand() {
'Absolute path to public directory',
`${process.cwd()}/public`
)
.parse(process.argv)
.action(() => favicon(rplFaviconCommand.opts()))

return rplFaviconCommand
Expand Down
2 changes: 1 addition & 1 deletion packages/nuxt-ripple/utils/breadcrumbs.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { stripSiteId } from '@dpc-sdp/ripple-tide-api'
import { stripSiteId } from '@dpc-sdp/ripple-tide-api/helpers'

// Private helpers
function getActivePath(branch, path) {
Expand Down
1 change: 1 addition & 0 deletions packages/ripple-tide-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"exports": {
".": "./dist/index.js",
"./utils": "./dist/utils.js",
"./helpers": "./dist/helpers.js",
"./types": "./types.d.ts",
"./errors": "./dist/errors/errors.js",
"./components": "./dist/nuxt/components",
Expand Down
6 changes: 6 additions & 0 deletions packages/ripple-tide-api/src/helpers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export * from './utils/mapping-utils.js'
export { stripSiteId } from './utils/stripSiteId.js'
export {
addAnchorLinksToHTML,
getAnchorLinksFromHTML
} from './utils/anchorLinks.js'
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ import {
IContentCollectionSort
} from '../../../mapping/components/content-collection/content-collection-mapping'
import type { IRplFeatureFlags } from '@dpc-sdp/ripple-tide-api/types'
import { stripSiteId } from '@dpc-sdp/ripple-tide-api'
import { stripSiteId } from '@dpc-sdp/ripple-tide-api/helpers'
const { public: config } = useRuntimeConfig()
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-search/components/TideSearchPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { FormKit } from '@formkit/vue'
import { SearchDriverOptions } from '@elastic/search-ui'
import { useRippleEvent } from '@dpc-sdp/ripple-ui-core'
import type { rplEventPayload } from '@dpc-sdp/ripple-ui-core'
import { stripSiteId } from '@dpc-sdp/ripple-tide-api'
import { stripSiteId } from '@dpc-sdp/ripple-tide-api/helpers'
interface Props {
id: string
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-search/composables/useSearchResult.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { computed } from 'vue'
import { getSearchResultValue, truncateText } from '#imports'
import { stripSiteId } from '@dpc-sdp/ripple-tide-api'
import { stripSiteId } from '@dpc-sdp/ripple-tide-api/helpers'

interface ResultOptions {
summaryMaxLength: number | null
Expand Down
2 changes: 1 addition & 1 deletion packages/ripple-tide-search/pages/search.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { stripSiteId } from '@dpc-sdp/ripple-tide-api'
import { stripSiteId } from '@dpc-sdp/ripple-tide-api/helpers'
import { AppSearchFilterConfigItem, MappedSearchResult } from '../types'
import { formatDate, useRuntimeConfig, useAppConfig } from '#imports'
Expand Down
9 changes: 6 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
],
"paths": {
"@dpc-sdp/ripple-tide-api/errors": ["ripple-tide-api/src/errors/errors"],
"@dpc-sdp/ripple-tide-api/helpers": ["ripple-tide-api/src/helpers"],
"@dpc-sdp/ripple-tide-api": ["ripple-tide-api/src"],
"@dpc-sdp/ripple-ui-core": ["ripple-ui-core/src"],
"@dpc-sdp/ripple-tide-event": ["ripple-tide-event/src"],
Expand Down

0 comments on commit 919e6ad

Please sign in to comment.