Skip to content

Commit

Permalink
feat: add "publish"
Browse files Browse the repository at this point in the history
  • Loading branch information
kricsleo committed Nov 5, 2022
1 parent 8776a94 commit 6fd5a04
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions src/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ function mergeSentryOptions(options: Options, bundlerConfig: Partial<Options> &
urlPrefix?: string
env?: string
}) {
options.publish = !!options.publish
options.release ||= bundlerConfig.release
options.deploy ||= {}
options.deploy.env ||= bundlerConfig.env || process.env.NODE_ENV
Expand Down
9 changes: 5 additions & 4 deletions src/runtime.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
declare module 'virtual-unplugin-sentry-runtime' {
export const ORG: string
export const PROJECT: string
export const ENV: string
export const RELEASE: string
export const ORG: string | undefined
export const PROJECT: string | undefined
export const ENV: string | undefined
export const RELEASE: string | undefined
export const PUBLISH: boolean | undefined
}
1 change: 1 addition & 0 deletions src/virtual-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ export function getVirtualContent(options: Options): string {
export const PROJECT = ${JSON.stringify(options.project)};
export const ENV = ${JSON.stringify(options.deploy?.env)};
export const RELEASE = ${JSON.stringify(options.release)};
export const PUBLISH = ${JSON.stringify(options.publish)};
`
}

0 comments on commit 6fd5a04

Please sign in to comment.