diff --git a/bin/combined_workflow_files.ts b/bin/combined_workflow_files.ts index 3cdd9b0e6..0735131f8 100644 --- a/bin/combined_workflow_files.ts +++ b/bin/combined_workflow_files.ts @@ -11,6 +11,7 @@ interface Surface { interface Workflow { package: string + packageId?: string surfaces: Surface[] } @@ -66,7 +67,7 @@ Object.entries(surfaces).forEach(([surfaceName, surfaceWorkflows]) => { fs.writeFileSync(`${surfaceRoot}/index.json`, JSON.stringify(surfaceWorkflows, null, 2)) surfaceWorkflows.forEach((surfaceWorkflow) => { - const normalizedPackage = surfaceWorkflow.package.toLowerCase() + const normalizedPackage = (surfaceWorkflow.packageId || surfaceWorkflow.package).toLowerCase() const surfacePackageRoot = `${surfaceRoot}/${normalizedPackage}` if (!fs.existsSync(surfacePackageRoot)) { diff --git a/bin/publish_workflow_ui.sh b/bin/publish_workflow_ui.sh index fa478eec0..a94ca2b6b 100755 --- a/bin/publish_workflow_ui.sh +++ b/bin/publish_workflow_ui.sh @@ -17,18 +17,21 @@ do if [ -f package/workflow-ui.json ]; then echo "Copying workflow-ui.json for $PACKAGE" - mkdir -p site/$PACKAGE - cp package/workflow-ui.json site/$PACKAGE/workflow-ui.json + PACKAGE_ID=$(cat package/workflow-ui.json | jq -r ".packageId // .package") + DEST="site/$PACKAGE_ID" - cat site/$PACKAGE/workflow-ui.json | jq ".surfaces | .[] | .surfaceScripts | .[]?" | while read SCRIPT + mkdir -p $DEST + cp package/workflow-ui.json $DEST/workflow-ui.json + + cat $DEST/workflow-ui.json | jq ".surfaces | .[] | .surfaceScripts | .[]?" | while read SCRIPT do # strip quotes and leading ./ from script path SCRIPT=$(echo $SCRIPT | tr -d '"' | sed 's/^\.\///') echo "Copying $SCRIPT for $PACKAGE" - cp package/$SCRIPT site/$PACKAGE/$SCRIPT + cp package/$SCRIPT $DEST/$SCRIPT done - ls site/$PACKAGE + ls $DEST fi diff --git a/site/@netlify/feature-package-pilot/site-settings.js b/site/feature-pilot/site-settings.js similarity index 100% rename from site/@netlify/feature-package-pilot/site-settings.js rename to site/feature-pilot/site-settings.js diff --git a/site/@netlify/feature-package-pilot/workflow-ui.json b/site/feature-pilot/workflow-ui.json similarity index 100% rename from site/@netlify/feature-package-pilot/workflow-ui.json rename to site/feature-pilot/workflow-ui.json diff --git a/site/surfaces/site-settings/@netlify/feature-package-pilot/index.json b/site/surfaces/site-settings/feature-pilot/index.json similarity index 100% rename from site/surfaces/site-settings/@netlify/feature-package-pilot/index.json rename to site/surfaces/site-settings/feature-pilot/index.json