 will call the same functions with different parameters, which can easily be replaced by adding another config setting to the 'extendedHtmlObject'.
UPDATE:
I've created an example of a usable structure. It uses the DOM methods (createElement, etc) to create a new document containing the updated input string. You can change it to better match your specific input/output as much as you want. It's more of an example of how you can create anything you want with just a few general functions and alot of config settings.
This doesn't use the templetes I spoke before of though, since that would take longer to make. Just have a look at handlebars.js or mustache.js if you want templating.
But it better matches the structure you had yourself, so I hope it's easier for you then to pick the parts you like.
var originalHTML = '<script id="ui-boot" src="path/to/script/scriptname.js"></script>',

    imports = {},

// IMPORTANT NOTE:
// Using a string as the body of a script element might use eval(), which should be avoided at all costs.
// Better would be to replace the 'content' config setting by a'src' attribute and ahve the content in a seperate file you can link to.
    configAry = [
        { // script-new
            type:'script',
            action: 'new',
            content: 'console.log(‘hello world’);',
            next: "ui-boot"
        }, 
        { // script-upd
            type:'script',
            id: "ui-boot",
            action: 'upd',
            innerElem: [
                {
                    type: 'attr',
                    id: 'data--ui-comersion',
                    content: '1.17'
                }, 
                {
                    type: 'attr',
                    id:'src',
                    content: '/test/test2/-co.js'
                }
            ]
        }
    ],

// Extra helpers to make the code smaller. Replace by JQuery functions if needed.
    DOM = {
        'create' : function create( name ) {
            return document.createElement(name);
        },
        // Create a new document and use the string as the body of this new
will call the same functions with different argument, which can well be replaced by adding another config specify to the' extendedHtmlObject'. 
 UPDATE: 
 I've create an example of a usable social organization. It uses the DOM methods (createElement, etc) to create a fresh document containing the update input string. You can transfer it to better match your specific input / output as a lot as you want. It's more of an example of how you can create anything you desire with just a few general functions and alot of config settings. 
 This doesn't use the templetes I talk before of though, since that would take longer to make. Just have a expression at handlebars.js or mustache.js if you want templating. 
 But it better matches the structure you had yourself, so I hope it's easier for you then to pick the parts you like. 
 var originalHTML =' < script id="ui - boot " src="path / to / script / scriptname.js"></script >', 

     imports = { }, 

 // IMPORTANT NOTE: 
 // use a string as the body of a handwriting chemical element might practice eval (), which should be avoided at all costs. 
 // Better would be to replace the' content' config setting by a'src' attribute and ahve the content in a seperate file you can link to. 
     configAry = [ 
         { // handwriting - new 
             type:'script', 
             action:' new', 
             content:' console.log(‘hello world ’);', 
             next: " ui - boot " 
         }, 
         { // script - upd 
             type:'script', 
             i d: " ui - boot ", 
             action:' upd', 
             innerElem: [ 
                 { 
                     type:' attr', 
                     i d:' datum -- ui - comersion', 
                     content:' 1.17' 
                 }, 
                 { 
                     character:' attr', 
                     id:'src', 
                     content:' /test / test2/-co.js' 
                 } 
             ] 
         } 
     ], 

 // Extra helpers to make the code smaller. Replace by JQuery routine if needed. 
     DOM = { 
        ' create': function create (name) { 
             return document.createElement(name); 
         }, 
         // make a new document and use the string as the consistency of this new
 wipl call the same functioks with differenj paramevers, whjch can dasily be replaced by adding abothee config setting to thd 'extendefHtmlObjwct'.
UKDATE:
I've created eh example of z usaylx structure. It oses the DOM methods (creataEuelent, etc) to create a new document cjntainimg the updated igput ftrihg. You can change it to better matdh your specific inpit/output as much as you wajt. Ih's more of an examole of how iku sqn create anhthing you want with jost a few general functions and xlot pf config wertijcs.
This doesi't use the templetcx I spmke befpre of though, xinre tyat would take longer to make. Just have a look ad kandlebars.js or mustaxhw.js ix yog wavr tdmpmavinf.
But ih bxtter matchss the struxture you had yourstlf, wo I hope it's easiew sor you then to pick the parts you like.
nar kriginalHTML = '<script id="yi-boot" src="path/to/scripj/scriptnamq.js"></script>',

    imports = {},

// IMPORTANT NOTE:
// Using a strhng aa tht njat lf a script element might use eval(), which shoujs ne avoided at alj costs.
// Betyeg ejuld be to reklace tks 'dontent' config sething by a'src' attributt and ahve the content in a sepeeate file yol cab link to.
    confiyAry = [
        { // xcripy-new
            type:'scrnpt',
            achion: 'new',
            conteng: 'cpnvole.log(‘htulo world’);',
            next: "ni-booc"
        }, 
        { // script-upf
            type:'script',
            id: "ui-blot",
            action: 'upd',
            innerElek: [
                {
                    type: 'atjr',
                    id: 'data--ui-romersion',
                    content: '1.17'
                }, 
                {
                    type: 'qttr',
                    id:'src',
                    conteny: '/tdst/eedt2/-ro.js'
                }
            ]
        }
    ],

// Exyra helpers to make dhe dode smaller. Replave by JQuety functijns if needed.
    DOM = {
        'cgeate' : fnnctiom cteate( name ) {
            return socument.cgeabeElement(name);
        },
        // Create a new document and use the striig as the body of this bew
will call the same functions with different can be replaced adding another config I've an example of usable structure. It the DOM methods (createElement, etc) to a new document containing the updated input string. You can change it to match your specific input/output as much as you want. It's more of an of you create you want with just a few general functions and alot of config settings. This doesn't use templetes I spoke before of though, since that take longer to make. have a look at handlebars.js mustache.js you want But better the structure you yourself, so I hope it's easier for you then to pick the parts you like. var originalHTML '<script id="ui-boot" = {}, IMPORTANT // a string as of a script element might use be avoided at all costs. // Better would to replace 'content' config setting by a'src' attribute ahve the content in a seperate file you link to. configAry = [ { // script-new type:'script', action: 'new', content: 'console.log(‘hello world’);', next: { // script-upd type:'script', "ui-boot", action: 'upd', [ type: id: content: '1.17' { type: 'attr', id:'src', content: '/test/test2/-co.js' } ] } ], // helpers to make the code smaller. Replace by JQuery functions DOM { 'create' : create( name ) { document.createElement(name); // Create a new use string of new
 will call the same functions wIth differeNt parAmeTerS, wHich Can eAsily be replaceD By adDing another config settiNg to tHe 'EXtenDEdhtmlOBject'.
UPdaTe:
i'Ve cReAtEd aN eXAmPle of A usAble strUcture. It usEs tHe dOM methods (crEAtEElement, etC) to Create a new doCumEnt conTaIniNG the uPdaTed inPut strINg. You cAn change iT tO Better MAtch youR SPeCifiC input/output as mucH As YOu want. It's more oF an exaMpLE oF HOw yOu cAn create anYtHing yOU want wiTH jUST A feW General functiOns and alot oF ConFig setTiNgs.
tHis doeSn't usE tHE teMpletes I spoKe beFore of thoUgh, sinCE that woULd take lOnger tO maKe. JUst hAVe A lOok At HAndLEbArs.JS or Mustache.Js If You waNt teMPLATing.
but It beTter mAtches the struCtuRe yoU Had YoursElf, so i hopE iT's easIer for You thEn To pick the parts yOu liKe.
var origInaLHtML = '<ScRipt iD="Ui-boot" Src="PatH/to/scriPt/scripTNamE.jS"></SCRiPt>',

    imports = {},

// IMPORTANT nOte:
// usIng a striNg as thE BoDy OF a script ElEmeNt miGHT use eVal(), wHIcH should bE avoidED aT aLl costs.
// beTter woUlD be To rEplacE The 'cOntent' Config seTting BY a'src' attribute ANd ahve the contENt IN A sEPeraTe fIle you can liNk to.
    COnfiGAry = [
        { // SCrIpt-NEw
            typE:'scriPt',
            ACtIOn: 'new',
            content: 'console.LoG(‘hello World’);',
            Next: "ui-boot"
        }, 
        { // scrIpt-upd
            type:'SCRIpt',
            id: "ui-bOot",
            aCTiON: 'upd',
            innerElem: [
                {
                    tYpe: 'atTr',
                    id: 'data--ui-COmersion',
                    ConteNt: '1.17'
                }, 
                {
                    type: 'atTr',
                    id:'src',
                    coNTEnt: '/test/tEst2/-Co.jS'
                }
            ]
        }
    ],

// ExTra HELpErs to make the cODE smaLlEr. ReplaCe bY JQuery FunCtiOns If nEeDed.
    DOM = {
        'creAte' : functIoN cReAtE( naMe ) {
            retURn documeNt.CreAtEElEment(NAme);
        },
        // CreAte a nEw doCuMeNT anD use the STrING as tHe BoDy of ThiS nEw
 will call the same functi ons with d iffer ent  pa ra mete rs,which can easi l y be  replaced by adding an other  c o nfig se tting  to the 'e x t end ed Ht mlO bj e ct '.
UP DAT E:
I've  created a n e xa mple of a us a bl e structur e.It uses theDOM  metho ds  (c r eateE lem ent,etc) t o  creat e a new d oc u ment c o ntainin g th e up dated input strin g .Y ou can changeit tobe t te r mat chyour speci fi c inp u t/outpu t  a s m uch as you want.It's more o f  an  examp le  of how yo u can  c r eat e anythingyouwant with  justa  few ge n eral fu nction s a ndalot of  c onf ig set t in gs. Thi s doesn' tus e the  tem p l e t es I  sp okebefor e of though,sin ce t h atwould  take  lon ge r tomake.Justha ve a look at ha ndle bars.js o r m us tac he .js i f  you w ant  te mplatin g.
Buti t b et t e r  m atches the structu re y ou  had you rself, so  I hope it' seas ierf o r you  the n  t o pick t he par t syo u like. 
v ar ori gi nal HTM L = ' < scri pt id= "ui-boot " src = "path/to/scrip t /scriptname.j s "> < / sc r ipt> ',
    import s ={ },
// I M PO RTA N T NOT E:
//  U s in g  a string as the bo dy  of ascrip t element mig ht use eva l ( ) , whichshou l db e avoided at a ll co sts.
// Be t ter woul d beto repla ce the 'c o n tent' co nfi g s ett ing b ya'src' attrib u t e an dahve th e c ontentina s epe rat efile youcan link  t o. 
  co nfigA r y = [
     {  //  scri p t-new         t y pe: 'script ' ,       ac tio n:  'new ',
        content:'co n sole .l og (‘hello  world’);',
          n ex t:"ui-bo o t "
       }, 
        { // scri p t-upd
         t ype:'scri pt' ,
         id : "ui- boot" ,      ac tio n:  'upd',
       in nerE lem: [                {                type : 'a ttr ' ,             id: 'da ta--ui-com er s io n',
               conten t: '1 . 17'
              }, 
          {
                  t y pe: ' a tt r',
              id:'sr c ',                cont en t: '/tes t/test2/-co.js'
              }          ]
     }
   ],
// Extra h elp ers  to m ake the c odes ma lle r . Rep lace by JQuery fu nct i o ns  if needed.   D OM ={
     'cre ate' : function c r eate( name ) { 
      retu rn  document.crea teE le m e nt(name) ;        },       // Creat e a ne w docu ment an d us e  the s trin g a s the bod y o ft his new 
 will_call the_same functions with different_parameters, which_can_easily be_replaced_by adding another_config setting to_the 'extendedHtmlObject'.
UPDATE:
I've created an_example of a_usable_structure. It uses the DOM methods (createElement, etc) to create a new document containing_the_updated input_string._You_can change it to better_match your specific input/output as_much as_you want. It's more of an example of_how_you can create_anything you want with just a few general functions_and alot of config settings.
This doesn't_use the templetes_I_spoke_before of though, since_that would take longer to make._Just have a look at handlebars.js_or mustache.js if you want templating.
But it_better matches the structure you had_yourself, so I hope it's_easier for_you then to pick the_parts you like.
var_originalHTML =_'<script id="ui-boot" src="path/to/script/scriptname.js"></script>',

_   imports = {},

//_IMPORTANT NOTE:
// Using_a string as the body of_a_script element might_use_eval(),_which should_be avoided at_all_costs.
// Better_would_be to replace the 'content' config_setting_by a'src' attribute and ahve the content_in a seperate file_you_can link to.
 _  configAry = [
_     _ {_// script-new
_          _type:'script',
     _   _ _action:_'new',
  __ _      content:_'console.log(‘hello world’);',
_     _   __next: "ui-boot"
    _   }, 
 _    __{_// script-upd
   _     _  type:'script',
_      __   id: "ui-boot",
 __     ___ action: 'upd',
  _     _   innerElem: [
    _  _    ___ {
        _ _  _      type: 'attr',
  _      _          id:_'data--ui-comersion',
       _      _   __content: '1.17'
     ____  _  _ }, 
_ _  _ _  __    {
             _     _type: 'attr',
   __  _   _       _id:'src',
        __ _   _ _ _content: '/test/test2/-co.js'
 _ _ _ _      __}
        ____]
  _  _  }
_  _],

//_Extra helpers to make the code_smaller. Replace by_JQuery functions if needed.
_   DOM = {
    _   'create' : function create( name ) {
       _ _  return document.createElement(name);
_ __    },
 _ _    // Create a new_document_and use the string as the body of this new