import path from 'path';
import execa from 'execa';

export const inputRoot = path.resolve(__dirname, '..');

export const outputSharedRoot = `${inputRoot}/public`;
const outputVersion = process.env.NODE_ENV === 'production'
    ? (process.env.SHARPLAB_WEBAPP_BUILD_VERSION ?? (() => { throw 'SHARPLAB_WEBAPP_BUILD_VERSION was not provided.'; })())
    : Date.now();
export const outputVersionRoot = `${outputSharedRoot}/${outputVersion}`;

// TODO: expose in oldowan
export const exec2 = (command: string, args: ReadonlyArray<string>, options?: {
    env?: NodeJS.ProcessEnv;
}) => execa(command, args, {
    preferLocal: true,
    stdout: process.stdout,
    stderr: process.stderr,
    env: options?.env
});
import path from 'path';
import execa from 'execa';

export const inputRoot = path.resolve(__dirname, '..');

export const outputSharedRoot = `${inputRoot}/public`;
const outputVersion = process.env.NODE_ENV === 'ci'
    ? (process.env.SHARPLAB_WEBAPP_BUILD_VERSION ?? (() => { throw 'SHARPLAB_WEBAPP_BUILD_VERSION was not provided.'; })())
    : Date.now();
export const outputVersionRoot = `${outputSharedRoot}/${outputVersion}`;

// TODO: expose in oldowan
export const exec2 = (command: string, args: ReadonlyArray<string>, options?: {
    env?: NodeJS.ProcessEnv;
}) => execa(command, args, {
    preferLocal: true,
    stdout: process.stdout,
    stderr: process.stderr,
    env: options?.env
});
--- 
+++ 
@@ -4,7 +4,7 @@
 export const inputRoot = path.resolve(__dirname, '..');
 
 export const outputSharedRoot = `${inputRoot}/public`;
-const outputVersion = process.env.NODE_ENV === 'ci'
+const outputVersion = process.env.NODE_ENV === 'production'
     ? (process.env.SHARPLAB_WEBAPP_BUILD_VERSION ?? (() => { throw 'SHARPLAB_WEBAPP_BUILD_VERSION was not provided.'; })())
     : Date.now();
 export const outputVersionRoot = `${outputSharedRoot}/${outputVersion}`;
Fix WebApp version folder name
