Skip to content

Manage the surge.sh domains of the Process Analytics project

License

Notifications You must be signed in to change notification settings

process-analytics/surge.sh-pa-admin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

surge.sh-pa-admin

Manage the surge.sh domains of the Process Analytics project.

Available workflows

Workflows are used to manage surge.sh domains specific to the Process Analytics project.

Patching the "surge" CLI

surge is patched using patch-package to integrate bug fixes not available in a released version:

The patch has been initiated and is updated by running npx patch-package surge to integrate local changes done in node_modules/surge/lib

To benefit from the patches, run the following commands from the root of this repository:

  • npm install
  • then run npx surge ...

Troubleshoot domains list errors

Because of surge#307, the surge-teardown-old-domains workflow may fail with the following error:

 /home/runner/.npm/_npx/23158936acd5c32d/node_modules/surge/lib/middleware/list.js:44
          project.timeAgoInWords.grey,
                                 ^
TypeError: Cannot read properties of undefined (reading 'grey')
    at /home/runner/.npm/_npx/23158936acd5c32d/node_modules/surge/lib/middleware/list.js:44:34
    at Array.forEach (<anonymous>)

The token may also be considered invalid by the surge-preview-tools action for the same reason as it performs a surge --list to validate the token.

In this case, the patch can help

  • run the "surge list" command locally or with the surge-list-domains workflow
  • detect the domain with missing information. In the following example, the first domain has issue
Run npx surge --token *** list
   process-analytics-process-analytics-dev-site_preview-pr-1038.surge.sh                    N/A           N/A     N/A        Standard 
   1688564549686 process-analytics-process-analytics-dev-site_preview-pr-1013.surge.sh      6 days ago    surge   surge.sh   Standard 
   1688562584180 process-analytics-bpmn-visualization-js-demo_preview-pr-2748.surge.sh      6 days ago    surge   surge.sh   Standard 
  • teardown the domains that cause issue
  • relaunch the previously failing commands. They should succeed now.

About

Manage the surge.sh domains of the Process Analytics project

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks