Skip to content

Commit

Permalink
add some debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
frontendphil committed Jan 10, 2025
1 parent 4f07bb4 commit b9d5eb5
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
13 changes: 5 additions & 8 deletions deployables/extension/manifest-util.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { invariant } from '@epic-web/invariant'
import chalk from 'chalk'
import { config } from 'dotenv'
import fs from 'fs'
import { parseArgs } from 'node:util'
Expand All @@ -17,10 +18,8 @@ const updateManifest = (templateFileName, outFileName, version) => {
invariant(iframeUrl != null, 'CONNECT_IFRAME_URL is missing')

try {
console.log(
'Reading manifest from:',
new URL(templateFileName, import.meta.url).toString(),
)
console.log(chalk.white.bold('Manifest template file:'))
console.log(new URL(templateFileName, import.meta.url).pathname)

const data = fs
.readFileSync(templateFileName)
Expand All @@ -30,10 +29,8 @@ const updateManifest = (templateFileName, outFileName, version) => {
const manifest = JSON.parse(data)
manifest['version'] = version.replace('v', '')

console.log(
'Writing manifest to:',
new URL(outFileName, import.meta.url).toString(),
)
console.log(chalk.white.bold('\nWriting manifest to:'))
console.log(new URL(outFileName, import.meta.url).pathname)

fs.writeFileSync(outFileName, JSON.stringify(manifest, undefined, 2))
} catch (error) {
Expand Down
1 change: 1 addition & 0 deletions deployables/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"@zodiac/test-utils": "workspace:*",
"@zodiac/typescript-config": "workspace:*",
"autoprefixer": "^10.4.20",
"chalk": "^5.4.1",
"classnames": "^2.3.1",
"copy-to-clipboard": "^3.3.1",
"dotenv": "^16.0.1",
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit b9d5eb5

Please sign in to comment.