@@ -489,6 +489,62 @@ Interpreter("node", {id: -1, format: "buffer"}).run(\`process.stdout.write(\\\`N
489489}
490490` ;
491491
492+ exports [` transpiles ojs imports of mutables 1` ] = `
493+ {
494+ " autodisplay" : false ,
495+ " body" : " async (__variable) => {
496+ const {foo , mutable$foo } = await (import (" https://api.observablehq.com/d/2d6bf7be248d66f3.js?v=4" ).then ((_ ) => {
497+ const module = __variable ._module ._runtime .module (_ .default );
498+ const outputs = new Map (Array .from (__variable ._outputs , (v ) => [v ._name , v ]));
499+ outputs .get (" foo" )? .import (" foo" , module );
500+ outputs .get (" mutable$foo" )? .import (" mutable foo" , " mutable$foo" , module );
501+ return {};
502+ }));
503+
504+ return {foo ,mutable$foo };
505+ }" ,
506+ " databases" : Set {},
507+ " files" : Set {},
508+ " inputs" : [
509+ " @variable" ,
510+ ],
511+ " output" : undefined ,
512+ " outputs" : [
513+ " foo" ,
514+ " mutable$foo" ,
515+ ],
516+ " secrets" : Set {},
517+ }
518+ ` ;
519+
520+ exports[` transpiles ojs imports of mutables 2 ` ] = `
521+ {
522+ " autodisplay" : false ,
523+ " body" : " async (__variable) => {
524+ const {foo: bar , mutable$foo: mutable$bar } = await (import (" https://api.observablehq.com/d/2d6bf7be248d66f3.js?v=4" ).then ((_ ) => {
525+ const module = __variable ._module ._runtime .module (_ .default );
526+ const outputs = new Map (Array .from (__variable ._outputs , (v ) => [v ._name , v ]));
527+ outputs .get (" bar" )? .import (" foo" , " bar" , module );
528+ outputs .get (" mutable$bar" )? .import (" mutable foo" , " mutable$bar" , module );
529+ return {};
530+ }));
531+
532+ return {bar ,mutable$bar };
533+ }" ,
534+ " databases" : Set {},
535+ " files" : Set {},
536+ " inputs" : [
537+ " @variable" ,
538+ ],
539+ " output" : undefined ,
540+ " outputs" : [
541+ " bar" ,
542+ " mutable$bar" ,
543+ ],
544+ " secrets" : Set {},
545+ }
546+ ` ;
547+
492548exports[` transpiles static imports with {type: ' observable' } 1 ` ] = `
493549{
494550 " autodisplay" : false ,
0 commit comments