@ms-cloudpack/overlay 0.19.87 → 0.19.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- export const __webpack_esm_id__=475;export const __webpack_esm_ids__=[475];export const __webpack_esm_modules__={475(e,r,t){t.d(r,{ErrorDialog:()=>p,default:()=>m}),t.r(r);var o=t(970),n=t(967),s=t(608),i=t(938),a=t(725);const d=e=>{const{packageName:r,importPath:t,issuerUrl:n,fixable:d,isValidPackage:c}=e,l=(0,i.useCloudpack)(),h=(0,o.jsxs)("code",{children:[r,"."===t?"":`/${t.replace(/^\.\//,"")}`]}),p=(0,o.jsx)("code",{children:r}),m=t.endsWith("/");return(0,o.jsx)(a.ResultsAccordion,{name:h,index:e.index,result:"error",headerCommands:d&&(0,o.jsx)(s.Button,{onClick:()=>{l.addPackageOverride.mutate({packageName:r,importPath:t,issuerUrl:n,initiatedBy:"user"})},children:"Add override"}),getContent:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.ResultsAccordionContent,{itemName:"Problem",itemValue:(0,o.jsxs)(o.Fragment,{children:[c?(0,o.jsxs)(o.Fragment,{children:[h," was imported, but ",(0,o.jsx)("code",{children:t})," is not listed in ",p,"'s exports map",d?"":" and does not appear to exist on disk","."]}):(0,o.jsxs)(o.Fragment,{children:["An unrecognized package ",p," was imported."]}),n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("br",{}),"The bad import request came from:"," ",(0,o.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:n})]})]})}),(0,o.jsx)(a.ResultsAccordionContent,{itemName:"Possible solutions",itemValue:d?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("p",{children:["Click ",(0,o.jsx)("strong",{children:"Add override"})," above to add an exports map entry for this path in your ","app's ",(0,o.jsx)("code",{children:"cloudpack.generated.json"}),"."]}),(0,o.jsxs)("p",{children:["To automatically make updates like this in the future, add the following to your ","app's ",(0,o.jsx)("code",{children:"cloudpack.config.json"}),":",(0,o.jsx)("br",{}),(0,o.jsx)("code",{children:'{ "features": { "autoUpdateEntries": true } }'})]})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("strong",{children:n?"Check the requesting URL above":"Search for this import in your repo"})," to determine whether the problematic import comes from your own code, or a dependency's code.",!n&&" (You can also try opening this page in Firefox and checking the console to see which package's bundle imported the bad path$; this isn't properly logged in Chromium due to a bug.)",(0,o.jsxs)("ul",{children:[(0,o.jsxs)("li",{children:[(0,o.jsx)("strong",{children:"If from your repo:"})," ",m?"Remove the trailing slash from the import path.":c?(0,o.jsxs)(o.Fragment,{children:["Import from the package root or a valid sub-path. (If you think the path is valid, verify that the correct version of ",p," is listed as a dependency.)"]}):"Make sure the package name is correct and listed as a dependency of the importing package."]}),(0,o.jsxs)("li",{children:[(0,o.jsx)("strong",{children:"If from a dependency:"}),m?"Ask the owners to remove the trailing slash, or create a temporary patch in your repo.":(0,o.jsxs)("ul",{children:[(0,o.jsxs)("li",{children:["Verify that your local installation is up to date (run ",(0,o.jsx)("code",{children:"yarn"})," or your repo's package manager)."]}),(0,o.jsxs)("li",{children:["Verify whether ",p," is listed in the importing package's dependencies. If not, ask the owners to add it (or temporarily add the dependency in one of your own packages and run ",(0,o.jsx)("code",{children:"cloudpack init"}),")."]}),(0,o.jsxs)("li",{children:["If the dependency is listed, check whether any ",(0,o.jsx)("code",{children:"resolutions"})," exist for"," ",p," which might be forcing it to an incompatible version. If so, talk to your eng sys team about removing or scoping the resolution."]}),(0,o.jsxs)("li",{children:["If ",p," is in ",(0,o.jsx)("code",{children:"peerDependencies"})," of the importing package, the peer may be incorrectly satisfied in your dependency tree. Talk to your eng sys team for help."]})]})]})]})]})})]})})};var c=t(477),l=t(405),h=t(309);const p=({unsupported:e})=>{const r=(0,i.useCloudpack)();return(0,o.jsx)(c.Dialog,{title:"Cloudpack: Unrecognized imports found in project",id:l.elementIds.errorDialogRoot,style:"error",commands:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(s.Button,{variant:"primary",onClick:()=>{r.restartAllTasks.mutate()},children:[(0,o.jsx)(h.Refresh20,{})," Retry bundling"]}),(0,o.jsx)(s.Button,{onClick:()=>{r.openConfigEditor.mutate()},children:"Edit Cloudpack config"})]}),children:e.map((e,r)=>(0,n.createElement)(d,{...e,index:r,key:r}))})},m=p}};
1
+ export const __webpack_esm_id__=475;export const __webpack_esm_ids__=[475];export const __webpack_esm_modules__={856(e,r,t){t.d(r,{ErrorDialog:()=>p,default:()=>m}),t.r(r);var o=t(272),n=t(985),s=t(608),i=t(938),a=t(725);const d=e=>{const{packageName:r,importPath:t,issuerUrl:n,fixable:d,isValidPackage:c}=e,l=(0,i.useCloudpack)(),h=(0,o.jsxs)("code",{children:[r,"."===t?"":`/${t.replace(/^\.\//,"")}`]}),p=(0,o.jsx)("code",{children:r}),m=t.endsWith("/");return(0,o.jsx)(a.ResultsAccordion,{name:h,index:e.index,result:"error",headerCommands:d&&(0,o.jsx)(s.Button,{onClick:()=>{l.addPackageOverride.mutate({packageName:r,importPath:t,issuerUrl:n,initiatedBy:"user"})},children:"Add override"}),getContent:()=>(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(a.ResultsAccordionContent,{itemName:"Problem",itemValue:(0,o.jsxs)(o.Fragment,{children:[c?(0,o.jsxs)(o.Fragment,{children:[h," was imported, but ",(0,o.jsx)("code",{children:t})," is not listed in ",p,"'s exports map",d?"":" and does not appear to exist on disk","."]}):(0,o.jsxs)(o.Fragment,{children:["An unrecognized package ",p," was imported."]}),n&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("br",{}),"The bad import request came from:"," ",(0,o.jsx)("a",{href:n,target:"_blank",rel:"noopener noreferrer",children:n})]})]})}),(0,o.jsx)(a.ResultsAccordionContent,{itemName:"Possible solutions",itemValue:d?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("p",{children:["Click ",(0,o.jsx)("strong",{children:"Add override"})," above to add an exports map entry for this path in your ","app's ",(0,o.jsx)("code",{children:"cloudpack.generated.json"}),"."]}),(0,o.jsxs)("p",{children:["To automatically make updates like this in the future, add the following to your ","app's ",(0,o.jsx)("code",{children:"cloudpack.config.json"}),":",(0,o.jsx)("br",{}),(0,o.jsx)("code",{children:'{ "features": { "autoUpdateEntries": true } }'})]})]}):(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("strong",{children:n?"Check the requesting URL above":"Search for this import in your repo"})," to determine whether the problematic import comes from your own code, or a dependency's code.",!n&&" (You can also try opening this page in Firefox and checking the console to see which package's bundle imported the bad path$; this isn't properly logged in Chromium due to a bug.)",(0,o.jsxs)("ul",{children:[(0,o.jsxs)("li",{children:[(0,o.jsx)("strong",{children:"If from your repo:"})," ",m?"Remove the trailing slash from the import path.":c?(0,o.jsxs)(o.Fragment,{children:["Import from the package root or a valid sub-path. (If you think the path is valid, verify that the correct version of ",p," is listed as a dependency.)"]}):"Make sure the package name is correct and listed as a dependency of the importing package."]}),(0,o.jsxs)("li",{children:[(0,o.jsx)("strong",{children:"If from a dependency:"}),m?"Ask the owners to remove the trailing slash, or create a temporary patch in your repo.":(0,o.jsxs)("ul",{children:[(0,o.jsxs)("li",{children:["Verify that your local installation is up to date (run ",(0,o.jsx)("code",{children:"yarn"})," or your repo's package manager)."]}),(0,o.jsxs)("li",{children:["Verify whether ",p," is listed in the importing package's dependencies. If not, ask the owners to add it (or temporarily add the dependency in one of your own packages and run ",(0,o.jsx)("code",{children:"cloudpack init"}),")."]}),(0,o.jsxs)("li",{children:["If the dependency is listed, check whether any ",(0,o.jsx)("code",{children:"resolutions"})," exist for"," ",p," which might be forcing it to an incompatible version. If so, talk to your eng sys team about removing or scoping the resolution."]}),(0,o.jsxs)("li",{children:["If ",p," is in ",(0,o.jsx)("code",{children:"peerDependencies"})," of the importing package, the peer may be incorrectly satisfied in your dependency tree. Talk to your eng sys team for help."]})]})]})]})]})})]})})};var c=t(283),l=t(405),h=t(309);const p=({unsupported:e})=>{const r=(0,i.useCloudpack)();return(0,o.jsx)(c.Dialog,{title:"Cloudpack: Unrecognized imports found in project",id:l.elementIds.errorDialogRoot,style:"error",commands:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(s.Button,{variant:"primary",onClick:()=>{r.restartAllTasks.mutate()},children:[(0,o.jsx)(h.Refresh20,{})," Retry bundling"]}),(0,o.jsx)(s.Button,{onClick:()=>{r.openConfigEditor.mutate()},children:"Edit Cloudpack config"})]}),children:e.map((e,r)=>(0,n.createElement)(d,{...e,index:r,key:r}))})},m=p}};
2
2
  //# sourceMappingURL=475.chunk.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"475.chunk.js","mappings":"6NAaO,MAAMA,EAA8FC,IACzG,MAAM,YAAEC,EAAW,WAAEC,EAAU,UAAEC,EAAS,QAAEC,EAAO,eAAEC,GAAmBL,EAClEM,GAAYC,EAAAA,EAAAA,gBACZC,GACJ,UAACC,OAAAA,C,UACER,EACe,MAAfC,EAAqB,GAAK,IAAIA,EAAWQ,QAAQ,QAAS,SAGzDC,GAAgB,SAACF,OAAAA,C,SAAMR,IACvBW,EAAkBV,EAAWW,SAAS,KA8G5C,OACE,SAACC,EAAAA,iBAAgBA,CACfC,KAAMP,EACNQ,MAAOhB,EAAMgB,MACbC,OAAO,QACPC,eAAgBd,IAAW,SAACe,EAAAA,OAAMA,CAACC,QAjHnB,KACbd,EAAUe,mBAAmBC,OAAO,CAAErB,cAAaC,aAAYC,YAAWoB,YAAa,U,SAgHjC,iBACzDC,WA9Ge,KAEf,sB,WACE,SAACC,EAAAA,wBAAuBA,CACtBC,SAAS,UACTC,WACE,sB,UACGtB,GACC,sB,UACGG,EAAa,uBAAmB,SAACC,OAAAA,C,SAAMP,IAAkB,qBAAmBS,EAAc,iBAC/EP,EAAU,GAAK,wCAAwC,QAGrE,sB,UAAE,2BAAyBO,EAAc,oBAE1CR,IACC,sB,WACE,SAACyB,KAAAA,CAAAA,GAAK,oCAC4B,KAClC,SAACC,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AWd,EAAUyC,gBAAgBzB,U,WAW1C,SAAC0B,EAAAA,UAASA,CAAAA,GAAG,sBAEf,SAAC7B,EAAAA,OAAMA,CAACC,QAZG,KAAWd,EAAU2C,iBAAiB3B,U,SAYpB,6B,SAIhCgB,EAAYY,IAAI,CAACC,EAAMnC,KACtB,mBAACjB,EAASA,IAAKoD,EAAMnC,MAAOA,EAAOoC,IAAKpC,QAMhD,G","sources":["webpack://@ms-cloudpack/overlay/./src/components/ErrorDialog/PathError.tsx","webpack://@ms-cloudpack/overlay/./src/components/ErrorDialog/ErrorDialog.tsx"],"sourcesContent":["import type { FunctionComponent } from 'preact';\nimport type { UnsupportedErrorEvent } from './useErrorEvents.js';\nimport { Button } from '../Button/Button.js';\nimport { useCloudpack } from '../CloudpackProvider/CloudpackProvider.js';\nimport {\n ResultsAccordion,\n ResultsAccordionContent,\n type ResultsAccordionProps,\n} from '../ResultsAccordion/ResultsAccordion.js';\n\n/**\n * Item (collapsible section) in the list of path errors in the ErrorDialog.\n */\nexport const PathError: FunctionComponent<UnsupportedErrorEvent & Pick<ResultsAccordionProps, 'index'>> = (props) => {\n const { packageName, importPath, issuerUrl, fixable, isValidPackage } = props;\n const cloudpack = useCloudpack();\n const prettyImport = (\n <code>\n {packageName}\n {importPath === '.' ? '' : `/${importPath.replace(/^\\.\\//, '')}`}\n </code>\n );\n const prettyPackage = <code>{packageName}</code>;\n const isTrailingSlash = importPath.endsWith('/');\n\n const addOverride = () => {\n void cloudpack.addPackageOverride.mutate({ packageName, importPath, issuerUrl, initiatedBy: 'user' });\n };\n\n const getContent = () => {\n return (\n <>\n <ResultsAccordionContent\n itemName=\"Problem\"\n itemValue={\n <>\n {isValidPackage ? (\n <>\n {prettyImport} was imported, but <code>{importPath}</code> is not listed in {prettyPackage}&apos;s\n exports map{fixable ? '' : ' and does not appear to exist on disk'}.\n </>\n ) : (\n <>An unrecognized package {prettyPackage} was imported.</>\n )}\n {issuerUrl && (\n <>\n <br />\n The bad import request came from:{' '}\n <a href={issuerUrl} target=\"_blank\" rel=\"noopener noreferrer\">\n {issuerUrl}\n </a>\n </>\n )}\n </>\n }\n />\n <ResultsAccordionContent\n itemName=\"Possible solutions\"\n itemValue={\n fixable ? (\n <>\n <p>\n Click <strong>Add override</strong> above to add an exports map entry for this path in your {\"app's \"}\n <code>cloudpack.generated.json</code>.\n </p>\n <p>\n To automatically make updates like this in the future, add the following to your {\"app's \"}\n <code>cloudpack.config.json</code>:\n <br />\n <code>{'{ \"features\": { \"autoUpdateEntries\": true } }'}</code>\n </p>\n </>\n ) : (\n <>\n <strong>{issuerUrl ? 'Check the requesting URL above' : 'Search for this import in your repo'}</strong>\n {` to determine whether the problematic import comes from your own code, or a dependency's code.`}\n {!issuerUrl &&\n // chromium bug closed as wontfix: https://issues.chromium.org/issues/40241413\n \" (You can also try opening this page in Firefox and checking the console to see which package's \" +\n `bundle imported the bad path$; this isn't properly logged in Chromium due to a bug.)`}\n <ul>\n <li>\n <strong>If from your repo:</strong>{' '}\n {isTrailingSlash ? (\n 'Remove the trailing slash from the import path.'\n ) : isValidPackage ? (\n <>\n Import from the package root or a valid sub-path. (If you think the path is valid, verify that\n the correct version of {prettyPackage} is listed as a dependency.)\n </>\n ) : (\n 'Make sure the package name is correct and listed as a dependency of the importing package.'\n )}\n </li>\n <li>\n <strong>If from a dependency:</strong>\n {isTrailingSlash ? (\n 'Ask the owners to remove the trailing slash, or create a temporary patch in your repo.'\n ) : (\n <ul>\n <li>\n Verify that your local installation is up to date (run <code>yarn</code> or your repo&apos;s\n package manager).\n </li>\n {/* If isValidPackage is false, obviously a dependency is missing. But also show this message\n if the package is found in the repo, because there could be an implicit dependency resulting in\n the wrong version being picked up. */}\n <li>\n Verify whether {prettyPackage} is listed in the importing package&apos;s dependencies. If not,\n ask the owners to add it (or temporarily add the dependency in one of your own packages and\n run <code>cloudpack init</code>).\n </li>\n <li>\n If the dependency is listed, check whether any <code>resolutions</code> exist for{' '}\n {prettyPackage} which might be forcing it to an incompatible version. If so, talk to your eng\n sys team about removing or scoping the resolution.\n </li>\n <li>\n If {prettyPackage} is in <code>peerDependencies</code> of the importing package, the peer may\n be incorrectly satisfied in your dependency tree. Talk to your eng sys team for help.\n </li>\n </ul>\n )}\n </li>\n </ul>\n </>\n )\n }\n />\n </>\n );\n };\n\n return (\n <ResultsAccordion\n name={prettyImport}\n index={props.index}\n result=\"error\"\n headerCommands={fixable && <Button onClick={addOverride}>Add override</Button>}\n getContent={getContent}\n />\n );\n};\n","import type { FunctionComponent } from 'preact';\nimport { Button } from '../Button/Button.js';\nimport { useCloudpack } from '../CloudpackProvider/CloudpackProvider.js';\nimport { PathError } from './PathError.js';\nimport type { UnsupportedErrorEvent } from './useErrorEvents.js';\nimport { Dialog } from '../Dialog/Dialog.js';\nimport { elementIds } from '../../constants.js';\nimport { Refresh20 } from '../icons/Refresh20.js';\n\nexport interface ErrorDialogProps {\n unsupported: UnsupportedErrorEvent[];\n}\n\nexport const ErrorDialog: FunctionComponent<ErrorDialogProps> = ({ unsupported }) => {\n const cloudpack = useCloudpack();\n\n const reload = () => void cloudpack.restartAllTasks.mutate();\n const editConfig = () => void cloudpack.openConfigEditor.mutate();\n\n return (\n <Dialog\n title=\"Cloudpack: Unrecognized imports found in project\"\n id={elementIds.errorDialogRoot}\n style=\"error\"\n commands={\n <>\n <Button variant=\"primary\" onClick={reload}>\n <Refresh20 /> Retry bundling\n </Button>\n <Button onClick={editConfig}>Edit Cloudpack config</Button>\n </>\n }\n >\n {unsupported.map((data, index) => (\n <PathError {...data} index={index} key={index} />\n ))}\n </Dialog>\n );\n};\n\nexport default ErrorDialog;\n"],"names":["PathError","props","packageName","importPath","issuerUrl","fixable","isValidPackage","cloudpack","useCloudpack","prettyImport","code","replace","prettyPackage","isTrailingSlash","endsWith","ResultsAccordion","name","index","result","headerCommands","Button","onClick","addPackageOverride","mutate","initiatedBy","getContent","ResultsAccordionContent","itemName","itemValue","br","a","href","target","rel","p","strong","ul","li","ErrorDialog","unsupported","Dialog","title","id","elementIds","errorDialogRoot","style","commands","variant","restartAllTasks","Refresh20","openConfigEditor","map","data","key"],"sourceRoot":""}
1
+ {"version":3,"file":"475.chunk.js","mappings":"6NAaO,MAAMA,EAA8FC,IACzG,MAAMC,YAAEA,EAAWC,WAAEA,EAAUC,UAAEA,EAASC,QAAEA,EAAOC,eAAEA,GAAmBL,EAClEM,GAAYC,EAAAA,EAAAA,gBACZC,GACJ,EAAAC,EAAAC,MAACC,OAAAA,WACEV,EACe,MAAfC,EAAqB,GAAK,IAAIA,EAAWU,QAAQ,QAAS,SAGzDC,GAAgB,EAAAJ,EAAAK,KAACH,OAAAA,UAAMV,IACvBc,EAAkBb,EAAWc,SAAS,KA8G5C,OACE,EAAAP,EAAAK,KAACG,EAAAA,iBAAgBA,CACfC,KAAMV,EACNW,MAAOnB,EAAMmB,MACbC,OAAO,QACPC,eAAgBjB,IAAW,EAAAK,EAAAK,KAACQ,EAAAA,OAAMA,CAACC,QAjHnB,KACbjB,EAAUkB,mBAAmBC,OAAO,CAAExB,cAAaC,aAAYC,YAAWuB,YAAa,mBAgHjC,iBACzDC,WA9Ge,KAEf,EAAAlB,EAAAC,MAAAD,EAAAmB,SAAA,YACE,EAAAnB,EAAAK,KAACe,EAAAA,wBAAuBA,CACtBC,SAAS,UACTC,WACE,EAAAtB,EAAAC,MAAAD,EAAAmB,SAAA,WACGvB,GACC,EAAAI,EAAAC,MAAAD,EAAAmB,SAAA,WACGpB,EAAa,uBAAmB,EAAAC,EAAAK,KAACH,OAAAA,UAAMT,IAAkB,qBAAmBW,EAAc,iBAC/ET,EAAU,GAAK,wCAAwC,QAGrE,EAAAK,EAAAC,MAAAD,EAAAmB,SAAA,WAAE,2BAAyBf,EAAc,oBAE1CV,IACC,EAAAM,EAAAC,MAAAD,EAAAmB,SAAA,YACE,EAAAnB,EAAAK,KAACkB,KAAAA,CAAAA,GAAK,oCAC4B,KAClC,EAAAvB,EAAAK,KAACmB,IAAAA,CAAEC,KAAM/B,EAAWg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AkB,aAAW,IACjFE,EAAc,wIAGjB,EAAAJ,EAAAC,MAAC8B,KAAAA,WAAG,MACE3B,EAAc,WAAO,EAAAJ,EAAAK,KAACH,OAAAA,UAAK,qBAAuB,sLCzGzE,MAAM8B,EAAmD,EAAGC,kBACjE,MAAMpC,GAAYC,EAAAA,EAAAA,gBAKlB,OACE,EAAAE,EAAAK,KAAC6B,EAAAA,OAAMA,CACLC,MAAM,mDACNC,GAAIC,EAAAA,WAAWC,gBACfC,MAAM,QACNC,UACE,EAAAxC,EAAAC,MAAAD,EAAAmB,SAAA,YACE,EAAAnB,EAAAC,MAACY,EAAAA,OAAMA,CAAC4B,QAAQ,UAAU3B,QAVnB,KAAWjB,EAAU6C,gBAAgB1B,qBAW1C,EAAAhB,EAAAK,KAACsC,EAAAA,UAASA,CAAAA,GAAG,sBAEf,EAAA3C,EAAAK,KAACQ,EAAAA,OAAMA,CAACC,QAZG,KAAWjB,EAAU+C,iBAAiB5B,mBAYpB,sCAIhCiB,EAAYY,IAAI,CAACC,EAAMpC,KACtB,EAAAqC,EAAAC,eAAC1D,EAASA,IAAKwD,EAAMpC,MAAOA,EAAOuC,IAAKvC,QAMhDwC,EAAA","sources":["webpack://@ms-cloudpack/overlay/./src/components/ErrorDialog/PathError.tsx","webpack://@ms-cloudpack/overlay/./src/components/ErrorDialog/ErrorDialog.tsx"],"sourcesContent":["import type { FunctionComponent } from 'preact';\nimport type { UnsupportedErrorEvent } from './useErrorEvents.js';\nimport { Button } from '../Button/Button.js';\nimport { useCloudpack } from '../CloudpackProvider/CloudpackProvider.js';\nimport {\n ResultsAccordion,\n ResultsAccordionContent,\n type ResultsAccordionProps,\n} from '../ResultsAccordion/ResultsAccordion.js';\n\n/**\n * Item (collapsible section) in the list of path errors in the ErrorDialog.\n */\nexport const PathError: FunctionComponent<UnsupportedErrorEvent & Pick<ResultsAccordionProps, 'index'>> = (props) => {\n const { packageName, importPath, issuerUrl, fixable, isValidPackage } = props;\n const cloudpack = useCloudpack();\n const prettyImport = (\n <code>\n {packageName}\n {importPath === '.' ? '' : `/${importPath.replace(/^\\.\\//, '')}`}\n </code>\n );\n const prettyPackage = <code>{packageName}</code>;\n const isTrailingSlash = importPath.endsWith('/');\n\n const addOverride = () => {\n void cloudpack.addPackageOverride.mutate({ packageName, importPath, issuerUrl, initiatedBy: 'user' });\n };\n\n const getContent = () => {\n return (\n <>\n <ResultsAccordionContent\n itemName=\"Problem\"\n itemValue={\n <>\n {isValidPackage ? (\n <>\n {prettyImport} was imported, but <code>{importPath}</code> is not listed in {prettyPackage}&apos;s\n exports map{fixable ? '' : ' and does not appear to exist on disk'}.\n </>\n ) : (\n <>An unrecognized package {prettyPackage} was imported.</>\n )}\n {issuerUrl && (\n <>\n <br />\n The bad import request came from:{' '}\n <a href={issuerUrl} target=\"_blank\" rel=\"noopener noreferrer\">\n {issuerUrl}\n </a>\n </>\n )}\n </>\n }\n />\n <ResultsAccordionContent\n itemName=\"Possible solutions\"\n itemValue={\n fixable ? (\n <>\n <p>\n Click <strong>Add override</strong> above to add an exports map entry for this path in your {\"app's \"}\n <code>cloudpack.generated.json</code>.\n </p>\n <p>\n To automatically make updates like this in the future, add the following to your {\"app's \"}\n <code>cloudpack.config.json</code>:\n <br />\n <code>{'{ \"features\": { \"autoUpdateEntries\": true } }'}</code>\n </p>\n </>\n ) : (\n <>\n <strong>{issuerUrl ? 'Check the requesting URL above' : 'Search for this import in your repo'}</strong>\n {` to determine whether the problematic import comes from your own code, or a dependency's code.`}\n {!issuerUrl &&\n // chromium bug closed as wontfix: https://issues.chromium.org/issues/40241413\n \" (You can also try opening this page in Firefox and checking the console to see which package's \" +\n `bundle imported the bad path$; this isn't properly logged in Chromium due to a bug.)`}\n <ul>\n <li>\n <strong>If from your repo:</strong>{' '}\n {isTrailingSlash ? (\n 'Remove the trailing slash from the import path.'\n ) : isValidPackage ? (\n <>\n Import from the package root or a valid sub-path. (If you think the path is valid, verify that\n the correct version of {prettyPackage} is listed as a dependency.)\n </>\n ) : (\n 'Make sure the package name is correct and listed as a dependency of the importing package.'\n )}\n </li>\n <li>\n <strong>If from a dependency:</strong>\n {isTrailingSlash ? (\n 'Ask the owners to remove the trailing slash, or create a temporary patch in your repo.'\n ) : (\n <ul>\n <li>\n Verify that your local installation is up to date (run <code>yarn</code> or your repo&apos;s\n package manager).\n </li>\n {/* If isValidPackage is false, obviously a dependency is missing. But also show this message\n if the package is found in the repo, because there could be an implicit dependency resulting in\n the wrong version being picked up. */}\n <li>\n Verify whether {prettyPackage} is listed in the importing package&apos;s dependencies. If not,\n ask the owners to add it (or temporarily add the dependency in one of your own packages and\n run <code>cloudpack init</code>).\n </li>\n <li>\n If the dependency is listed, check whether any <code>resolutions</code> exist for{' '}\n {prettyPackage} which might be forcing it to an incompatible version. If so, talk to your eng\n sys team about removing or scoping the resolution.\n </li>\n <li>\n If {prettyPackage} is in <code>peerDependencies</code> of the importing package, the peer may\n be incorrectly satisfied in your dependency tree. Talk to your eng sys team for help.\n </li>\n </ul>\n )}\n </li>\n </ul>\n </>\n )\n }\n />\n </>\n );\n };\n\n return (\n <ResultsAccordion\n name={prettyImport}\n index={props.index}\n result=\"error\"\n headerCommands={fixable && <Button onClick={addOverride}>Add override</Button>}\n getContent={getContent}\n />\n );\n};\n","import type { FunctionComponent } from 'preact';\nimport { Button } from '../Button/Button.js';\nimport { useCloudpack } from '../CloudpackProvider/CloudpackProvider.js';\nimport { PathError } from './PathError.js';\nimport type { UnsupportedErrorEvent } from './useErrorEvents.js';\nimport { Dialog } from '../Dialog/Dialog.js';\nimport { elementIds } from '../../constants.js';\nimport { Refresh20 } from '../icons/Refresh20.js';\n\nexport interface ErrorDialogProps {\n unsupported: UnsupportedErrorEvent[];\n}\n\nexport const ErrorDialog: FunctionComponent<ErrorDialogProps> = ({ unsupported }) => {\n const cloudpack = useCloudpack();\n\n const reload = () => void cloudpack.restartAllTasks.mutate();\n const editConfig = () => void cloudpack.openConfigEditor.mutate();\n\n return (\n <Dialog\n title=\"Cloudpack: Unrecognized imports found in project\"\n id={elementIds.errorDialogRoot}\n style=\"error\"\n commands={\n <>\n <Button variant=\"primary\" onClick={reload}>\n <Refresh20 /> Retry bundling\n </Button>\n <Button onClick={editConfig}>Edit Cloudpack config</Button>\n </>\n }\n >\n {unsupported.map((data, index) => (\n <PathError {...data} index={index} key={index} />\n ))}\n </Dialog>\n );\n};\n\nexport default ErrorDialog;\n"],"names":["PathError","props","packageName","importPath","issuerUrl","fixable","isValidPackage","cloudpack","useCloudpack","prettyImport","jsxRuntime_module","jsxs","code","replace","prettyPackage","jsx","isTrailingSlash","endsWith","ResultsAccordion","name","index","result","headerCommands","Button","onClick","addPackageOverride","mutate","initiatedBy","getContent","Fragment","ResultsAccordionContent","itemName","itemValue","br","a","href","target","rel","p","strong","ul","li","ErrorDialog","unsupported","Dialog","title","id","elementIds","errorDialogRoot","style","commands","variant","restartAllTasks","Refresh20","openConfigEditor","map","data","preact_module","createElement","key","ErrorDialog_ErrorDialog"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ export const __webpack_esm_id__=754;export const __webpack_esm_ids__=[754];export const __webpack_esm_modules__={754(e){e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}}};
2
+ //# sourceMappingURL=754.chunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"754.chunk.js","mappings":"wHAEAA,EAAAC,QAAA,WACA,UAAAC,MACA,wFAGA","sources":["webpack://@ms-cloudpack/overlay/../node_modules/.store/ws-virtual-892aa8863b/package/browser.js"],"sourcesContent":["'use strict';\n\nmodule.exports = function () {\n throw new Error(\n 'ws does not work in the browser. Browser clients must use the native ' +\n 'WebSocket object'\n );\n};\n"],"names":["module","exports","Error"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"lib/constants.js","mappings":"AACA,IAAIA,EAAsB,CCA1BA,EAAwB,CAACC,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXF,EAAoBI,EAAEF,EAAYC,KAASH,EAAoBI,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,MCJ3EH,EAAwB,CAACS,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,I,+BCG3E,MAAMI,EAAa,CAIxBC,KAAM,yBAINC,gBAAiB,iCAIjBC,iBAAkB,kCAIlBC,YAAa,iCAIbC,gBAAiB,kC","sources":["webpack://@ms-cloudpack/overlay/webpack/bootstrap","webpack://@ms-cloudpack/overlay/webpack/runtime/define property getters","webpack://@ms-cloudpack/overlay/webpack/runtime/hasOwnProperty shorthand","webpack://@ms-cloudpack/overlay/./src/constants.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// This file serves as a separate entry point which can be imported without rendering the overlay\n// as a side effect.\n\nexport const elementIds = {\n /**\n * ID for the root element of the overlay.\n */\n root: 'cloudpack-overlay-root',\n /**\n * ID for the root element of the error dialog.\n */\n errorDialogRoot: 'cloudpack-overlay-error-dialog',\n /**\n * ID for the root element of the status dialog.\n */\n statusDialogRoot: 'cloudpack-overlay-status-dialog',\n /**\n * ID for the title element of any dialog.\n */\n dialogTitle: 'cloudpack-overlay-dialog-title',\n /**\n * ID for the root element of the status badge.\n */\n statusBadgeRoot: 'cloudpack-overlay-status-badge',\n} as const;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","elementIds","root","errorDialogRoot","statusDialogRoot","dialogTitle","statusBadgeRoot"],"sourceRoot":""}
1
+ {"version":3,"file":"lib/constants.js","mappings":"AACA,IAAAA,EAAA,CCAAA,EAAA,CAAAC,EAAAC,KACA,QAAAC,KAAAD,EACAF,EAAAI,EAAAF,EAAAC,KAAAH,EAAAI,EAAAH,EAAAE,IACAE,OAAAC,eAAAL,EAAAE,EAAA,CAAyCI,YAAA,EAAAC,IAAAN,EAAAC,MCJzCH,EAAA,CAAAS,EAAAC,IAAAL,OAAAM,UAAAC,eAAAC,KAAAJ,EAAAC,mCCGO,MAAMI,EAAa,CAIxBC,KAAM,yBAINC,gBAAiB,iCAIjBC,iBAAkB,kCAIlBC,YAAa,iCAIbC,gBAAiB","sources":["webpack://@ms-cloudpack/overlay/webpack/bootstrap","webpack://@ms-cloudpack/overlay/webpack/runtime/define property getters","webpack://@ms-cloudpack/overlay/webpack/runtime/hasOwnProperty shorthand","webpack://@ms-cloudpack/overlay/./src/constants.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// This file serves as a separate entry point which can be imported without rendering the overlay\n// as a side effect.\n\nexport const elementIds = {\n /**\n * ID for the root element of the overlay.\n */\n root: 'cloudpack-overlay-root',\n /**\n * ID for the root element of the error dialog.\n */\n errorDialogRoot: 'cloudpack-overlay-error-dialog',\n /**\n * ID for the root element of the status dialog.\n */\n statusDialogRoot: 'cloudpack-overlay-status-dialog',\n /**\n * ID for the title element of any dialog.\n */\n dialogTitle: 'cloudpack-overlay-dialog-title',\n /**\n * ID for the root element of the status badge.\n */\n statusBadgeRoot: 'cloudpack-overlay-status-badge',\n} as const;\n"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","elementIds","root","errorDialogRoot","statusDialogRoot","dialogTitle","statusBadgeRoot"],"sourceRoot":""}