@worca/ui 0.40.0 → 0.41.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worca/ui",
3
- "version": "0.40.0",
3
+ "version": "0.41.0",
4
4
  "description": "Pipeline monitoring UI for worca-cc",
5
5
  "license": "MIT",
6
6
  "author": "Sinisha Djukic",
@@ -117,7 +117,15 @@ async function run() {
117
117
 
118
118
  try {
119
119
  const esbuild = await import('esbuild');
120
- await esbuild.build({
120
+ // Optional build-time override of the docs base URL used by
121
+ // worca-ui/app/utils/help-links.js. Production / npm-published
122
+ // builds leave WORCA_DOCS_BASE unset and fall through to the
123
+ // 'https://docs.worca.dev' default baked into the module.
124
+ // Local + staging previews can retarget the badges:
125
+ // WORCA_DOCS_BASE=http://localhost:4321 npm run build
126
+ // WORCA_DOCS_BASE=http://staging.docs.example npm run build
127
+ const docsBase = process.env.WORCA_DOCS_BASE;
128
+ const buildOpts = {
121
129
  entryPoints: [entry],
122
130
  bundle: true,
123
131
  format: 'esm',
@@ -127,7 +135,12 @@ async function run() {
127
135
  sourcemap: true,
128
136
  minify: true,
129
137
  legalComments: 'none',
130
- });
138
+ };
139
+ if (docsBase) {
140
+ buildOpts.define = { WORCA_DOCS_BASE: JSON.stringify(docsBase) };
141
+ console.log('help-links DOCS_BASE override:', docsBase);
142
+ }
143
+ await esbuild.build(buildOpts);
131
144
  console.log('built', path.relative(repoRoot, outfile));
132
145
  } catch (err) {
133
146
  console.error('bundle error', err);