Repository: codesandbox/nodebox-runtime Branch: main Commit: 65a4ccf5507e Files: 625 Total size: 52.0 MB Directory structure: gitextract_k7rtrazz/ ├── .codesandbox/ │ └── tasks.json ├── .editorconfig ├── .env.example ├── .env.test ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── .prettierignore ├── .prettierrc ├── .release-please-manifest.json ├── ATTRIBUTIONS.md ├── LICENSE ├── README.md ├── dnsmasq.conf ├── internals/ │ ├── esbuild-plugins/ │ │ ├── inline-file.ts │ │ └── inline-worker.ts │ └── servers/ │ ├── consumer/ │ │ ├── build.ts │ │ ├── dist/ │ │ │ └── index.html │ │ └── serve.ts │ ├── main-server.ts │ ├── preview-server.ts │ ├── test/ │ │ ├── index.html │ │ └── test-server.ts │ └── utils.ts ├── package.json ├── packages/ │ ├── nodebox/ │ │ ├── .npmignore │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── api.md │ │ ├── build.ts │ │ ├── package.json │ │ ├── src/ │ │ │ ├── Nodebox.ts │ │ │ ├── index.ts │ │ │ ├── logger.ts │ │ │ ├── messages.ts │ │ │ ├── modules/ │ │ │ │ ├── fs.ts │ │ │ │ ├── preview.ts │ │ │ │ └── shell.ts │ │ │ └── runtime-protocol.types.ts │ │ ├── tsconfig.build.json │ │ └── tsconfig.json │ └── utils/ │ ├── jest.config.js │ ├── package.json │ ├── withTimeout.test.ts │ └── withTimeout.ts ├── playwright.config.ts ├── pnpm-workspace.yaml ├── public/ │ └── ws-test.pack ├── release-please-config.json ├── req.conf ├── sync-repo.js ├── tests/ │ ├── cdn-proxy/ │ │ └── v2/ │ │ ├── deps/ │ │ │ ├── QGFwb2xsby9zZXJ2ZXJANC4xLjE7Z3JhcGhxbEAxNi42LjA= │ │ │ ├── QHN2ZWx0ZWpzL3ZpdGUtcGx1Z2luLXN2ZWx0ZUAyLjAuMztlc2J1aWxkLXdhc21AMC4xNy4xMjtzdmVsdGVAMy41Ny4wO3ZpdGVANC4yLjA= │ │ │ ├── QHZpdGVqcy9wbHVnaW4tcmVhY3RAMy4xLjA7ZXNidWlsZC13YXNtQDAuMTcuMTI7cmVhY3QtZG9tQF4xOC4yLjA7cmVhY3RAXjE4LjIuMDt2aXRlQDQuMi4w │ │ │ ├── QHZpdGVqcy9wbHVnaW4tdnVlQDQuMS4wO2VzYnVpbGQtd2FzbUAwLjE3LjEyO3ZpdGVANC4yLjA7dnVlQGxhdGVzdA== │ │ │ ├── ZXNidWlsZC13YXNtQDAuMTUuMTI7dnVlcHJlc3NAMi4wLjAtYmV0YS41Mw== │ │ │ ├── ZXNidWlsZC13YXNtQDAuMTcuMTI7dml0ZUA0LjIuMA== │ │ │ ├── ZXNsaW50QF44LjAuMQ== │ │ │ ├── ZXhwcmVzc0A0LjE4LjI= │ │ │ ├── ZmFzdGlmeUBsYXRlc3Q= │ │ │ └── bm9kZS1mZXRjaEAzLjMuMA== │ │ └── mod/ │ │ ├── QG1kaXQtdnVlL3BsdWdpbi10aXRsZUAwLjExLjI= │ │ ├── QG1kaXQtdnVlL3BsdWdpbi10b2NAMC4xMS4y │ │ ├── QG1kaXQtdnVlL3BsdWdpbi1jb21wb25lbnRAMC4xMS4y │ │ ├── QG1kaXQtdnVlL3BsdWdpbi1mcm9udG1hdHRlckAwLjExLjE= │ │ ├── QG1kaXQtdnVlL3BsdWdpbi1oZWFkZXJzQDAuMTEuMg== │ │ ├── QG1kaXQtdnVlL3BsdWdpbi1zZmNAMC4xMS4x │ │ ├── QG1kaXQtdnVlL3NoYXJlZEAwLjExLjI= │ │ ├── QG1kaXQtdnVlL3R5cGVzQDAuMTEuMA== │ │ ├── QG5vZGVsaWIvZnMuc2NhbmRpckAyLjEuNQ== │ │ ├── QG5vZGVsaWIvZnMuc3RhdEAyLjAuNQ== │ │ ├── QG5vZGVsaWIvZnMud2Fsa0AxLjIuOA== │ │ ├── QGFtcHByb2plY3QvcmVtYXBwaW5nQDIuMi4w │ │ ├── QGFwb2xsby91c2FnZS1yZXBvcnRpbmctcHJvdG9idWZANC4xLjA= │ │ ├── QGFwb2xsby91dGlscy51c2FnZXJlcG9ydGluZ0AxLjAuMQ== │ │ ├── QGFwb2xsby91dGlscy53aXRocmVxdWlyZWRAMS4wLjE= │ │ ├── QGFwb2xsby91dGlscy5jcmVhdGVoYXNoQDEuMS4w │ │ ├── QGFwb2xsby91dGlscy5kcm9wdW51c2VkZGVmaW5pdGlvbnNAMS4xLjA= │ │ ├── QGFwb2xsby91dGlscy5mZXRjaGVyQDEuMS4x │ │ ├── QGFwb2xsby91dGlscy5mZXRjaGVyQDIuMC4w │ │ ├── QGFwb2xsby91dGlscy5pc25vZGVsaWtlQDEuMS4w │ │ ├── QGFwb2xsby91dGlscy5rZXl2YWx1ZWNhY2hlQDEuMC4y │ │ ├── QGFwb2xsby91dGlscy5rZXl2YWx1ZWNhY2hlQDIuMS4w │ │ ├── QGFwb2xsby91dGlscy5sb2dnZXJAMS4wLjE= │ │ ├── QGFwb2xsby91dGlscy5sb2dnZXJAMi4wLjA= │ │ ├── QGFwb2xsby91dGlscy5wcmludHdpdGhyZWR1Y2Vkd2hpdGVzcGFjZUAxLjEuMA== │ │ ├── QGFwb2xsby91dGlscy5yZW1vdmVhbGlhc2VzQDEuMC4w │ │ ├── QGFwb2xsby91dGlscy5zb3J0YXN0QDEuMS4w │ │ ├── QGFwb2xsby91dGlscy5zdHJpcHNlbnNpdGl2ZWxpdGVyYWxzQDEuMi4w │ │ ├── QGFwb2xsby9jYWNoZS1jb250cm9sLXR5cGVzQDEuMC4y │ │ ├── QGFwb2xsby9wcm90b2J1ZmpzQDEuMi43 │ │ ├── QGFwb2xsby9zZXJ2ZXItZ2F0ZXdheS1pbnRlcmZhY2VAMS4xLjA= │ │ ├── QGFwb2xsby9zZXJ2ZXJANC4xLjE= │ │ ├── QGJhYmVsL2NvZGUtZnJhbWVANy4xOC42 │ │ ├── QGJhYmVsL2NvbXBhdC1kYXRhQDcuMjEuMA== │ │ ├── QGJhYmVsL2NvcmVANy4yMS4z │ │ ├── QGJhYmVsL2dlbmVyYXRvckA3LjIxLjM= │ │ ├── QGJhYmVsL2hlbHBlci12YWxpZGF0b3ItaWRlbnRpZmllckA3LjE5LjE= │ │ ├── QGJhYmVsL2hlbHBlci12YWxpZGF0b3Itb3B0aW9uQDcuMjEuMA== │ │ ├── QGJhYmVsL2hlbHBlci1jb21waWxhdGlvbi10YXJnZXRzQDcuMjAuNw== │ │ ├── QGJhYmVsL2hlbHBlci1lbnZpcm9ubWVudC12aXNpdG9yQDcuMTguOQ== │ │ ├── QGJhYmVsL2hlbHBlci1mdW5jdGlvbi1uYW1lQDcuMjEuMA== │ │ ├── QGJhYmVsL2hlbHBlci1ob2lzdC12YXJpYWJsZXNANy4xOC42 │ │ ├── QGJhYmVsL2hlbHBlci1tb2R1bGUtaW1wb3J0c0A3LjE4LjY= │ │ ├── QGJhYmVsL2hlbHBlci1tb2R1bGUtdHJhbnNmb3Jtc0A3LjIxLjI= │ │ ├── QGJhYmVsL2hlbHBlci1wbHVnaW4tdXRpbHNANy4yMC4y │ │ ├── QGJhYmVsL2hlbHBlci1zaW1wbGUtYWNjZXNzQDcuMjAuMg== │ │ ├── QGJhYmVsL2hlbHBlci1zcGxpdC1leHBvcnQtZGVjbGFyYXRpb25ANy4xOC42 │ │ ├── QGJhYmVsL2hlbHBlci1zdHJpbmctcGFyc2VyQDcuMTkuNA== │ │ ├── QGJhYmVsL2hlbHBlcnNANy4yMS4w │ │ ├── QGJhYmVsL2hpZ2hsaWdodEA3LjE4LjY= │ │ ├── QGJhYmVsL3BhcnNlckA3LjIxLjM= │ │ ├── QGJhYmVsL3BsdWdpbi10cmFuc2Zvcm0tcmVhY3QtanN4LXNlbGZANy4yMS4w │ │ ├── QGJhYmVsL3BsdWdpbi10cmFuc2Zvcm0tcmVhY3QtanN4LXNvdXJjZUA3LjE5LjY= │ │ ├── QGJhYmVsL3R5cGVzQDcuMjEuMw== │ │ ├── QGJhYmVsL3RlbXBsYXRlQDcuMjAuNw== │ │ ├── QGJhYmVsL3RyYXZlcnNlQDcuMjEuMw== │ │ ├── QGVzbGludC9lc2xpbnRyY0AxLjQuMQ== │ │ ├── QGZhc3RpZnkvYWp2LWNvbXBpbGVyQDMuNS4w │ │ ├── QGZhc3RpZnkvZGVlcG1lcmdlQDEuMy4w │ │ ├── QGZhc3RpZnkvZXJyb3JAMy4yLjA= │ │ ├── QGZhc3RpZnkvZmFzdC1qc29uLXN0cmluZ2lmeS1jb21waWxlckA0LjIuMA== │ │ ├── QGdyYXBocWwtdG9vbHMvbWVyZ2VAOC4zLjEx │ │ ├── QGdyYXBocWwtdG9vbHMvc2NoZW1hQDkuMC45 │ │ ├── QGdyYXBocWwtdG9vbHMvdXRpbHNAOS4xLjA= │ │ ├── QGh1bWFud2hvY29kZXMvY29uZmlnLWFycmF5QDAuOS41 │ │ ├── QGh1bWFud2hvY29kZXMvb2JqZWN0LXNjaGVtYUAxLjIuMQ== │ │ ├── QGpvc2VwaGcvcmVzb2x2YWJsZUAxLjAuMQ== │ │ ├── QGpyaWRnZXdlbGwvZ2VuLW1hcHBpbmdAMC4zLjI= │ │ ├── QGpyaWRnZXdlbGwvc291cmNlbWFwLWNvZGVjQDEuNC4xNA== │ │ ├── QGpyaWRnZXdlbGwvc2V0LWFycmF5QDEuMS4y │ │ ├── QGpyaWRnZXdlbGwvcmVzb2x2ZS11cmlAMy4xLjA= │ │ ├── QGpyaWRnZXdlbGwvdHJhY2UtbWFwcGluZ0AwLjMuMTc= │ │ ├── QHByb3RvYnVmanMvY29kZWdlbkAyLjAuNA== │ │ ├── QHByb3RvYnVmanMvYXNwcm9taXNlQDEuMS4y │ │ ├── QHByb3RvYnVmanMvYmFzZTY0QDEuMS4y │ │ ├── QHByb3RvYnVmanMvZXZlbnRlbWl0dGVyQDEuMS4w │ │ ├── QHByb3RvYnVmanMvZmV0Y2hAMS4xLjA= │ │ ├── QHByb3RvYnVmanMvZmxvYXRAMS4wLjI= │ │ ├── QHByb3RvYnVmanMvaW5xdWlyZUAxLjEuMA== │ │ ├── QHByb3RvYnVmanMvcG9vbEAxLjEuMA== │ │ ├── QHByb3RvYnVmanMvcGF0aEAxLjEuMg== │ │ ├── QHByb3RvYnVmanMvdXRmOEAxLjEuMA== │ │ ├── QHN2ZWx0ZWpzL3ZpdGUtcGx1Z2luLXN2ZWx0ZUAyLjAuMw== │ │ ├── QHR5cGVzL21hcmtkb3duLWl0LWVtb2ppQDIuMC4y │ │ ├── QHR5cGVzL21hcmtkb3duLWl0QDEyLjIuMw== │ │ ├── QHR5cGVzL21kdXJsQDEuMC4y │ │ ├── QHR5cGVzL21pbWVAMy4wLjE= │ │ ├── QHR5cGVzL21zQDAuNy4zMQ== │ │ ├── QHR5cGVzL25vZGUtZmV0Y2hAMi42LjI= │ │ ├── QHR5cGVzL25vZGVAOS42Ljk= │ │ ├── QHR5cGVzL2JvZHktcGFyc2VyQDEuMTkuMg== │ │ ├── QHR5cGVzL2Nvbm5lY3RAMy40LjM1 │ │ ├── QHR5cGVzL2RlYnVnQDQuMS43 │ │ ├── QHR5cGVzL2V4cHJlc3Mtc2VydmUtc3RhdGljLWNvcmVANC4xNy4zMw== │ │ ├── QHR5cGVzL2V4cHJlc3NANC4xNy4xNw== │ │ ├── QHR5cGVzL2ZzLWV4dHJhQDkuMC4xMw== │ │ ├── QHR5cGVzL2hhc2gtc3VtQDEuMC4w │ │ ├── QHR5cGVzL2xpbmtpZnktaXRAMy4wLjI= │ │ ├── QHR5cGVzL2xvbmdANC4wLjI= │ │ ├── QHR5cGVzL3FzQDYuOS43 │ │ ├── QHR5cGVzL3JhbmdlLXBhcnNlckAxLjIuNA== │ │ ├── QHR5cGVzL3NlcnZlLXN0YXRpY0AxLjcuMzI= │ │ ├── QHR5cGVzL3dlYi1ibHVldG9vdGhAMC4wLjE2 │ │ ├── QHZ1ZS9jb21waWxlci1jb3JlQDMuMi40Nw== │ │ ├── QHZ1ZS9jb21waWxlci1kb21AMy4yLjQ3 │ │ ├── QHZ1ZS9jb21waWxlci1zZmNAMy4yLjQ3 │ │ ├── QHZ1ZS9jb21waWxlci1zc3JAMy4yLjQ3 │ │ ├── QHZ1ZS9kZXZ0b29scy1hcGlANi41LjA= │ │ ├── QHZ1ZS9yZWFjdGl2aXR5LXRyYW5zZm9ybUAzLjIuNDc= │ │ ├── QHZ1ZS9yZWFjdGl2aXR5QDMuMi40Nw== │ │ ├── QHZ1ZS9ydW50aW1lLWNvcmVAMy4yLjQ3 │ │ ├── QHZ1ZS9ydW50aW1lLWRvbUAzLjIuNDc= │ │ ├── QHZ1ZS9zZXJ2ZXItcmVuZGVyZXJAMy4yLjQ3 │ │ ├── QHZ1ZS9zaGFyZWRAMy4yLjQ3 │ │ ├── QHZ1ZXByZXNzL21hcmtkb3duQDIuMC4wLWJldGEuNTM= │ │ ├── QHZ1ZXByZXNzL2J1bmRsZXItdml0ZUAyLjAuMC1iZXRhLjUz │ │ ├── QHZ1ZXByZXNzL2NsaUAyLjAuMC1iZXRhLjUz │ │ ├── QHZ1ZXByZXNzL2NsaWVudEAyLjAuMC1iZXRhLjUz │ │ ├── QHZ1ZXByZXNzL2NvcmVAMi4wLjAtYmV0YS41Mw== │ │ ├── QHZ1ZXByZXNzL3BsdWdpbi10aGVtZS1kYXRhQDIuMC4wLWJldGEuNTM= │ │ ├── QHZ1ZXByZXNzL3BsdWdpbi1hY3RpdmUtaGVhZGVyLWxpbmtzQDIuMC4wLWJldGEuNTM= │ │ ├── QHZ1ZXByZXNzL3BsdWdpbi1iYWNrLXRvLXRvcEAyLjAuMC1iZXRhLjUz │ │ ├── QHZ1ZXByZXNzL3BsdWdpbi1jb250YWluZXJAMi4wLjAtYmV0YS41Mw== │ │ ├── QHZ1ZXByZXNzL3BsdWdpbi1leHRlcm5hbC1saW5rLWljb25AMi4wLjAtYmV0YS41Mw== │ │ ├── QHZ1ZXByZXNzL3BsdWdpbi1naXRAMi4wLjAtYmV0YS41Mw== │ │ ├── QHZ1ZXByZXNzL3BsdWdpbi1tZWRpdW0tem9vbUAyLjAuMC1iZXRhLjUz │ │ ├── QHZ1ZXByZXNzL3BsdWdpbi1ucHJvZ3Jlc3NAMi4wLjAtYmV0YS41Mw== │ │ ├── QHZ1ZXByZXNzL3BsdWdpbi1wYWxldHRlQDIuMC4wLWJldGEuNTM= │ │ ├── QHZ1ZXByZXNzL3BsdWdpbi1wcmlzbWpzQDIuMC4wLWJldGEuNTM= │ │ ├── QHZ1ZXByZXNzL3NoYXJlZEAyLjAuMC1iZXRhLjUz │ │ ├── QHZ1ZXByZXNzL3RoZW1lLWRlZmF1bHRAMi4wLjAtYmV0YS41Mw== │ │ ├── QHZ1ZXByZXNzL3V0aWxzQDIuMC4wLWJldGEuNTM= │ │ ├── QHZ1ZXVzZS9jb3JlQDkuOS4w │ │ ├── QHZ1ZXVzZS9tZXRhZGF0YUA5LjkuMA== │ │ ├── QHZ1ZXVzZS9zaGFyZWRAOS45LjA= │ │ ├── QHZpdGVqcy9wbHVnaW4tcmVhY3RAMy4xLjA= │ │ ├── QHZpdGVqcy9wbHVnaW4tdnVlQDMuMi4w │ │ ├── QHZpdGVqcy9wbHVnaW4tdnVlQDQuMS4w │ │ ├── Y29sb3ItY29udmVydEAxLjkuMw== │ │ ├── Y29sb3ItY29udmVydEAyLjAuMQ== │ │ ├── Y29sb3ItbmFtZUAxLjEuMw== │ │ ├── Y29sb3ItbmFtZUAxLjEuNA== │ │ ├── Y29tYmluZWQtc3RyZWFtQDEuMC44 │ │ ├── Y29uY2F0LW1hcEAwLjAuMQ== │ │ ├── Y29ubmVjdC1oaXN0b3J5LWFwaS1mYWxsYmFja0AyLjAuMA== │ │ ├── Y29udGVudC10eXBlQDEuMC41 │ │ ├── Y29udGVudC1kaXNwb3NpdGlvbkAwLjUuNA== │ │ ├── Y29udmVydC1zb3VyY2UtbWFwQDEuOS4w │ │ ├── Y29va2llLXNpZ25hdHVyZUAxLjAuNg== │ │ ├── Y29va2llQDAuNS4w │ │ ├── Y29yc0AyLjguNQ== │ │ ├── Y2FjQDYuNy4xNA== │ │ ├── Y2FsbC1iaW5kQDEuMC4y │ │ ├── Y2FsbHNpdGVzQDMuMS4w │ │ ├── Y2FuaXVzZS1saXRlQDEuMC4zMDAwMTQ2OA== │ │ ├── Y2hhbGtAMi40LjI= │ │ ├── Y2hhbGtANC4xLjI= │ │ ├── Y2hhbGtANS4yLjA= │ │ ├── Y2hva2lkYXJAMy41LjM= │ │ ├── Y2xpLWN1cnNvckA0LjAuMA== │ │ ├── Y2xpLXNwaW5uZXJzQDIuNy4w │ │ ├── Y2xvbmVAMS4wLjQ= │ │ ├── Y3Jvc3Mtc3Bhd25ANy4wLjM= │ │ ├── Y3NzdHlwZUAyLjYuOQ== │ │ ├── YW55bWF0Y2hAMy4xLjM= │ │ ├── YW5zaS1yZWdleEA1LjAuMQ== │ │ ├── YW5zaS1yZWdleEA2LjAuMQ== │ │ ├── YW5zaS1zdHlsZXNAMy4yLjE= │ │ ├── YW5zaS1zdHlsZXNANC4zLjA= │ │ ├── YWJvcnQtY29udHJvbGxlckAzLjAuMA== │ │ ├── YWJzdHJhY3QtbG9nZ2luZ0AyLjAuMQ== │ │ ├── YWNjZXB0c0AxLjMuOA== │ │ ├── YWNvcm4tanN4QDUuMy4y │ │ ├── YWNvcm5AOC44LjI= │ │ ├── YWp2LWZvcm1hdHNAMi4xLjE= │ │ ├── YWp2QDYuMTIuNg== │ │ ├── YWp2QDguMTIuMA== │ │ ├── YXJjaHlAMS4wLjA= │ │ ├── YXJncGFyc2VAMS4wLjk= │ │ ├── YXJncGFyc2VAMi4wLjE= │ │ ├── YXJyYXktZmxhdHRlbkAxLjEuMQ== │ │ ├── YXN5bmMtcmV0cnlAMS4zLjM= │ │ ├── YXN5bmNraXRAMC40LjA= │ │ ├── YXRvbWljLXNsZWVwQDEuMC4w │ │ ├── YXV0b3ByZWZpeGVyQDEwLjQuMTQ= │ │ ├── YXZ2aW9AOC4yLjE= │ │ ├── Ym9keS1wYXJzZXJAMS4yMC4x │ │ ├── Ym9keS1wYXJzZXJAMS4yMC4y │ │ ├── YmFsYW5jZWQtbWF0Y2hAMS4wLjI= │ │ ├── YmFzZTY0LWpzQDEuNS4x │ │ ├── YmluYXJ5LWV4dGVuc2lvbnNAMi4yLjA= │ │ ├── YmxANS4xLjA= │ │ ├── YnJhY2UtZXhwYW5zaW9uQDEuMS45 │ │ ├── YnJhY2VzQDMuMC4y │ │ ├── YnJvd3NlcnNsaXN0QDQuMjEuNQ== │ │ ├── YnVmZmVyQDYuMC4z │ │ ├── Ynl0ZXNAMy4xLjI= │ │ ├── Z2V0LWludHJpbnNpY0AxLjIuMA== │ │ ├── Z2V0LXN0cmVhbUA2LjAuMQ== │ │ ├── Z2Vuc3luY0AxLjAuMC1iZXRhLjI= │ │ ├── Z2xvYi1wYXJlbnRANS4xLjI= │ │ ├── Z2xvYi1wYXJlbnRANi4wLjI= │ │ ├── Z2xvYkA3LjIuMw== │ │ ├── Z2xvYmFsc0AxMS45LjA= │ │ ├── Z2xvYmFsc0AxMy4yMC4w │ │ ├── Z2xvYmJ5QDEzLjEuMw== │ │ ├── Z3JhY2VmdWwtZnNANC4yLjk= │ │ ├── Z3JhcGhxbEAxNi42LjA= │ │ ├── Z3JheS1tYXR0ZXJANC4wLjM= │ │ ├── ZG9jdHJpbmVAMy4wLjA= │ │ ├── ZGF0YS11cmktdG8tYnVmZmVyQDQuMC4x │ │ ├── ZGVidWdAMi42Ljk= │ │ ├── ZGVidWdANC4zLjQ= │ │ ├── ZGVlcC1pc0AwLjEuNA== │ │ ├── ZGVlcG1lcmdlQDQuMy4x │ │ ├── ZGVmYXVsdHNAMS4wLjQ= │ │ ├── ZGVsYXllZC1zdHJlYW1AMS4wLjA= │ │ ├── ZGVwZEAyLjAuMA== │ │ ├── ZGVzdHJveUAxLjIuMA== │ │ ├── ZGlyLWdsb2JAMy4wLjE= │ │ ├── ZW50aXRpZXNAMy4wLjE= │ │ ├── ZW52aW5mb0A3LjguMQ== │ │ ├── ZW5jb2RldXJsQDEuMC4y │ │ ├── ZWUtZmlyc3RAMS4xLjE= │ │ ├── ZWxlY3Ryb24tdG8tY2hyb21pdW1AMS40LjMzMw== │ │ ├── ZXN0cmF2ZXJzZUA1LjMuMA== │ │ ├── ZXN0cmVlLXdhbGtlckAyLjAuMg== │ │ ├── ZXN1dGlsc0AyLjAuMw== │ │ ├── ZXNidWlsZC13YXNtQDAuMTUuMTI= │ │ ├── ZXNidWlsZC13YXNtQDAuMTcuMTI= │ │ ├── ZXNidWlsZEAwLjE1LjE4 │ │ ├── ZXNidWlsZEAwLjE3Ljk= │ │ ├── ZXNjYWxhZGVAMy4xLjE= │ │ ├── ZXNjYXBlLWh0bWxAMS4wLjM= │ │ ├── ZXNjYXBlLXN0cmluZy1yZWdleHBAMS4wLjU= │ │ ├── ZXNjYXBlLXN0cmluZy1yZWdleHBANC4wLjA= │ │ ├── ZXNsaW50LXNjb3BlQDcuMS4x │ │ ├── ZXNsaW50LXV0aWxzQDMuMC4w │ │ ├── ZXNsaW50LXZpc2l0b3Ita2V5c0AyLjEuMA== │ │ ├── ZXNsaW50LXZpc2l0b3Ita2V5c0AzLjMuMA== │ │ ├── ZXNsaW50QDguOS4w │ │ ├── ZXNwcmVlQDkuNS4w │ │ ├── ZXNwcmltYUA0LjAuMQ== │ │ ├── ZXNxdWVyeUAxLjUuMA== │ │ ├── ZXNyZWN1cnNlQDQuMy4w │ │ ├── ZXRhZ0AxLjguMQ== │ │ ├── ZXZlbnQtdGFyZ2V0LXNoaW1ANS4wLjE= │ │ ├── ZXZlbnRzQDMuMy4w │ │ ├── ZXh0ZW5kLXNoYWxsb3dAMi4wLjE= │ │ ├── ZXhlY2FANi4xLjA= │ │ ├── ZXhwcmVzc0A0LjE4LjI= │ │ ├── Zm9ybS1kYXRhQDMuMC4x │ │ ├── Zm9ybWRhdGEtcG9seWZpbGxANC4wLjEw │ │ ├── Zm9yd2FyZGVkQDAuMi4w │ │ ├── ZmFzdC11cmlAMi4yLjA= │ │ ├── ZmFzdC1jb250ZW50LXR5cGUtcGFyc2VAMS4wLjA= │ │ ├── ZmFzdC1kZWNvZGUtdXJpLWNvbXBvbmVudEAxLjAuMQ== │ │ ├── ZmFzdC1kZWVwLWVxdWFsQDMuMS4z │ │ ├── ZmFzdC1nbG9iQDMuMi4xMg== │ │ ├── ZmFzdC1qc29uLXN0YWJsZS1zdHJpbmdpZnlAMi4xLjA= │ │ ├── ZmFzdC1qc29uLXN0cmluZ2lmeUA1LjYuMg== │ │ ├── ZmFzdC1sZXZlbnNodGVpbkAyLjAuNg== │ │ ├── ZmFzdC1xdWVyeXN0cmluZ0AxLjEuMQ== │ │ ├── ZmFzdC1yZWRhY3RAMy4xLjI= │ │ ├── ZmFzdGlmeUA0LjE0LjE= │ │ ├── ZmFzdHFAMS45LjA= │ │ ├── ZmV0Y2gtYmxvYkAzLjIuMA== │ │ ├── ZmlsZS1lbnRyeS1jYWNoZUA2LjAuMQ== │ │ ├── ZmlsbC1yYW5nZUA3LjAuMQ== │ │ ├── ZmluYWxoYW5kbGVyQDEuMi4w │ │ ├── ZmluZC1teS13YXlANy42LjA= │ │ ├── ZmxhdC1jYWNoZUAzLjAuNA== │ │ ├── ZmxhdHRlZEAzLjIuNw== │ │ ├── ZnJhY3Rpb24uanNANC4yLjA= │ │ ├── ZnJlc2hAMC41LjI= │ │ ├── ZnMtZXh0cmFAMTAuMS4w │ │ ├── ZnMucmVhbHBhdGhAMS4wLjA= │ │ ├── ZnVuY3Rpb24tYmluZEAxLjEuMQ== │ │ ├── ZnVuY3Rpb25hbC1yZWQtYmxhY2stdHJlZUAxLjAuMQ== │ │ ├── a2luZC1vZkA2LjAuMw== │ │ ├── a2xldXJANC4xLjU= │ │ ├── aGFzLWZsYWdAMy4wLjA= │ │ ├── aGFzLWZsYWdANC4wLjA= │ │ ├── aGFzLXN5bWJvbHNAMS4wLjM= │ │ ├── aGFzQDEuMC4z │ │ ├── aGFzaC1zdW1AMi4wLjA= │ │ ├── aHR0cC1lcnJvcnNAMi4wLjA= │ │ ├── aHVtYW4tc2lnbmFsc0AzLjAuMQ== │ │ ├── aW11cm11cmhhc2hAMC4xLjQ= │ │ ├── aW1tdXRhYmxlQDQuMy4w │ │ ├── aW1wb3J0LWZyZXNoQDMuMy4w │ │ ├── aW5mbGlnaHRAMS4wLjY= │ │ ├── aW5oZXJpdHNAMi4wLjQ= │ │ ├── aWNvbnYtbGl0ZUAwLjQuMjQ= │ │ ├── aWVlZTc1NEAxLjIuMQ== │ │ ├── aWdub3JlQDUuMi40 │ │ ├── aXBhZGRyLmpzQDEuOS4x │ │ ├── aXMtY29yZS1tb2R1bGVAMi45LjA= │ │ ├── aXMtYmluYXJ5LXBhdGhAMi4xLjA= │ │ ├── aXMtZ2xvYkA0LjAuMw== │ │ ├── aXMtZXh0Z2xvYkAyLjEuMQ== │ │ ├── aXMtZXh0ZW5kYWJsZUAwLjEuMQ== │ │ ├── aXMtaW50ZXJhY3RpdmVAMi4wLjA= │ │ ├── aXMtbnVtYmVyQDcuMC4w │ │ ├── aXMtc3RyZWFtQDMuMC4w │ │ ├── aXMtdW5pY29kZS1zdXBwb3J0ZWRAMS4zLjA= │ │ ├── aXNleGVAMi4wLjA= │ │ ├── anMtdG9rZW5zQDQuMC4w │ │ ├── anMteWFtbEA0LjEuMA== │ │ ├── anMteWFtbEAzLjE0LjE= │ │ ├── anNlc2NAMi41LjI= │ │ ├── anNvbi1zY2hlbWEtdHJhdmVyc2VAMC40LjE= │ │ ├── anNvbi1zY2hlbWEtdHJhdmVyc2VAMS4wLjA= │ │ ├── anNvbi1zdGFibGUtc3RyaW5naWZ5LXdpdGhvdXQtanNvbmlmeUAxLjAuMQ== │ │ ├── anNvbjVAMi4yLjM= │ │ ├── anNvbmZpbGVANi4xLjA= │ │ ├── b24tZXhpdC1sZWFrLWZyZWVAMi4xLjA= │ │ ├── b24tZmluaXNoZWRAMi40LjE= │ │ ├── b25jZUAxLjQuMA== │ │ ├── b25ldGltZUA1LjEuMg== │ │ ├── b25ldGltZUA2LjAuMA== │ │ ├── b2JqZWN0LWFzc2lnbkA0LjEuMQ== │ │ ├── b2JqZWN0LWluc3BlY3RAMS45LjA= │ │ ├── b3B0aW9uYXRvckAwLjkuMQ== │ │ ├── b3JhQDYuMi4w │ │ ├── bG9kYXNoLm1lcmdlQDQuNi4y │ │ ├── bG9kYXNoLnNvcnRieUA0LjcuMA== │ │ ├── bG9nLXN5bWJvbHNANS4xLjA= │ │ ├── bG9nbGV2ZWxAMS44LjE= │ │ ├── bG9uZ0A0LjAuMA== │ │ ├── bG9vc2UtZW52aWZ5QDEuNC4w │ │ ├── bGV2bkAwLjQuMQ== │ │ ├── bGlnaHQtbXktcmVxdWVzdEA1LjkuMQ== │ │ ├── bGlsY29uZmlnQDIuMS4w │ │ ├── bGlua2lmeS1pdEA0LjAuMQ== │ │ ├── bHJ1LWNhY2hlQDUuMS4x │ │ ├── bHJ1LWNhY2hlQDYuMC4w │ │ ├── bHJ1LWNhY2hlQDcuMTguMw== │ │ ├── bWFnaWMtc3RyaW5nQDAuMjUuOQ== │ │ ├── bWFnaWMtc3RyaW5nQDAuMjcuMA== │ │ ├── bWFnaWMtc3RyaW5nQDAuMjkuMA== │ │ ├── bWFya2Rvd24taXQtY29udGFpbmVyQDMuMC4w │ │ ├── bWFya2Rvd24taXQtYW5jaG9yQDguNi43 │ │ ├── bWFya2Rvd24taXQtZW1vamlAMi4wLjI= │ │ ├── bWFya2Rvd24taXRAMTMuMC4x │ │ ├── bWR1cmxAMS4wLjE= │ │ ├── bWV0aG9kc0AxLjEuMg== │ │ ├── bWVkaWEtdHlwZXJAMC4zLjA= │ │ ├── bWVkaXVtLXpvb21AMS4wLjg= │ │ ├── bWVyZ2UtZGVzY3JpcHRvcnNAMS4wLjE= │ │ ├── bWVyZ2Utc3RyZWFtQDIuMC4w │ │ ├── bWVyZ2UyQDEuNC4x │ │ ├── bWljcm9tYXRjaEA0LjAuNQ== │ │ ├── bWltZS10eXBlc0AyLjEuMzU= │ │ ├── bWltZS1kYkAxLjUyLjA= │ │ ├── bWltZUAxLjYuMA== │ │ ├── bWltaWMtZm5AMi4xLjA= │ │ ├── bWltaWMtZm5ANC4wLjA= │ │ ├── bWluaW1hdGNoQDMuMS4y │ │ ├── bXNAMi4xLjI= │ │ ├── bXNAMi4xLjM= │ │ ├── bm9kZS1hYm9ydC1jb250cm9sbGVyQDMuMS4x │ │ ├── bm9kZS1kb21leGNlcHRpb25AMS4wLjA= │ │ ├── bm9kZS1mZXRjaEAyLjYuOQ== │ │ ├── bm9kZS1mZXRjaEAzLjMuMA== │ │ ├── bm9kZS1yZWxlYXNlc0AyLjAuOQ== │ │ ├── bm9ybWFsaXplLXBhdGhAMy4wLjA= │ │ ├── bm9ybWFsaXplLXJhbmdlQDAuMS4y │ │ ├── bmF0dXJhbC1jb21wYXJlQDEuNC4w │ │ ├── bmFub2lkQDMuMy40 │ │ ├── bmVnb3RpYXRvckAwLjYuMw== │ │ ├── bnBtLXJ1bi1wYXRoQDUuMS4w │ │ ├── c291cmNlLW1hcC1qc0AxLjAuMg== │ │ ├── c291cmNlLW1hcEAwLjYuMQ== │ │ ├── c291cmNlbWFwLWNvZGVjQDEuNC44 │ │ ├── c29uaWMtYm9vbUAzLjIuMQ== │ │ ├── c2FmZS1idWZmZXJANS4yLjE= │ │ ├── c2FmZS1yZWdleDJAMi4wLjA= │ │ ├── c2FmZS1zdGFibGUtc3RyaW5naWZ5QDIuNC4z │ │ ├── c2FmZXItYnVmZmVyQDIuMS4y │ │ ├── c2Fzc0AxLjU5LjM= │ │ ├── c2NoZWR1bGVyQDAuMjMuMA== │ │ ├── c2V0LWNvb2tpZS1wYXJzZXJAMi42LjA= │ │ ├── c2V0cHJvdG90eXBlb2ZAMS4yLjA= │ │ ├── c2VjdGlvbi1tYXR0ZXJAMS4wLjA= │ │ ├── c2VjdXJlLWpzb24tcGFyc2VAMi43LjA= │ │ ├── c2VtdmVyQDYuMy4w │ │ ├── c2VtdmVyQDcuMy44 │ │ ├── c2VuZEAwLjE4LjA= │ │ ├── c2VydmUtc3RhdGljQDEuMTUuMA== │ │ ├── c2hhLmpzQDIuNC4xMQ== │ │ ├── c2hlYmFuZy1jb21tYW5kQDIuMC4w │ │ ├── c2hlYmFuZy1yZWdleEAzLjAuMA== │ │ ├── c2lkZS1jaGFubmVsQDEuMC40 │ │ ├── c2lnbmFsLWV4aXRAMy4wLjc= │ │ ├── c2xhc2hANC4wLjA= │ │ ├── c3BsaXQyQDQuMS4w │ │ ├── c3ByaW50Zi1qc0AxLjAuMw== │ │ ├── c3RhdHVzZXNAMi4wLjE= │ │ ├── c3RkaW4tZGlzY2FyZGVyQDAuMS4w │ │ ├── c3RyaW5nX2RlY29kZXJAMS4zLjA= │ │ ├── c3RyaXAtYW5zaUA2LjAuMQ== │ │ ├── c3RyaXAtYW5zaUA3LjAuMQ== │ │ ├── c3RyaXAtYm9tLXN0cmluZ0AxLjAuMA== │ │ ├── c3RyaXAtZmluYWwtbmV3bGluZUAzLjAuMA== │ │ ├── c3RyaXAtanNvbi1jb21tZW50c0AzLjEuMQ== │ │ ├── c3VwcG9ydHMtY29sb3JANS41LjA= │ │ ├── c3VwcG9ydHMtY29sb3JANy4yLjA= │ │ ├── c3VwcG9ydHMtcHJlc2VydmUtc3ltbGlua3MtZmxhZ0AxLjAuMA== │ │ ├── c3ZlbHRlLWhtckAwLjE1LjE= │ │ ├── c3ZlbHRlQDMuNTcuMA== │ │ ├── cG9zdGNzc0A4LjQuMjE= │ │ ├── cG9zdGNzcy12YWx1ZS1wYXJzZXJANC4yLjA= │ │ ├── cG9zdGNzcy1sb2FkLWNvbmZpZ0A0LjAuMQ== │ │ ├── cGF0aC10by1yZWdleHBAMC4xLjc= │ │ ├── cGF0aC10eXBlQDQuMC4w │ │ ├── cGF0aC1pcy1hYnNvbHV0ZUAxLjAuMQ== │ │ ├── cGF0aC1rZXlAMy4xLjE= │ │ ├── cGF0aC1rZXlANC4wLjA= │ │ ├── cGF0aC1wYXJzZUAxLjAuNw== │ │ ├── cGFyZW50LW1vZHVsZUAxLjAuMQ== │ │ ├── cGFyc2V1cmxAMS4zLjM= │ │ ├── cGljb21hdGNoQDIuMy4x │ │ ├── cGljb2NvbG9yc0AxLjAuMA== │ │ ├── cGlub0A4LjkuMA== │ │ ├── cGluby1hYnN0cmFjdC10cmFuc3BvcnRAMS4wLjA= │ │ ├── cGluby1zdGQtc2VyaWFsaXplcnNANi4xLjA= │ │ ├── cHJlbHVkZS1sc0AxLjIuMQ== │ │ ├── cHJpc21qc0AxLjI5LjA= │ │ ├── cHJvY2Vzc0AwLjExLjEw │ │ ├── cHJvY2Vzcy13YXJuaW5nQDIuMS4w │ │ ├── cHJveHktYWRkckAyLjAuNw== │ │ ├── cHVueWNvZGVAMi4zLjA= │ │ ├── cXNANi4xMS4w │ │ ├── cXVldWUtbWljcm90YXNrQDEuMi4z │ │ ├── cXVpY2stZm9ybWF0LXVuZXNjYXBlZEA0LjAuNA== │ │ ├── cm9sbHVwQDIuNzkuMQ== │ │ ├── cm9sbHVwQDMuMjAuMA== │ │ ├── cmF3LWJvZHlAMi41LjE= │ │ ├── cmF3LWJvZHlAMi41LjI= │ │ ├── cmFuZ2UtcGFyc2VyQDEuMi4x │ │ ├── cmV0QDAuMi4y │ │ ├── cmV0cnlAMC4xMy4x │ │ ├── cmV1c2lmeUAxLjAuNA== │ │ ├── cmVhY3QtZG9tQDE4LjIuMA== │ │ ├── cmVhY3QtcmVmcmVzaEAwLjE0LjA= │ │ ├── cmVhY3RAMTguMi4w │ │ ├── cmVhZGFibGUtc3RyZWFtQDMuNi4y │ │ ├── cmVhZGFibGUtc3RyZWFtQDQuMy4w │ │ ├── cmVhZGRpcnBAMy42LjA= │ │ ├── cmVhbC1yZXF1aXJlQDAuMi4w │ │ ├── cmVnZXhwcEAzLjIuMA== │ │ ├── cmVxdWlyZS1mcm9tLXN0cmluZ0AyLjAuMg== │ │ ├── cmVzb2x2ZS1mcm9tQDQuMC4w │ │ ├── cmVzb2x2ZUAxLjIyLjE= │ │ ├── cmVzdG9yZS1jdXJzb3JANC4wLjA= │ │ ├── cmZkY0AxLjMuMA== │ │ ├── cmltcmFmQDMuMC4y │ │ ├── cnVuLXBhcmFsbGVsQDEuMi4w │ │ ├── d29yZC13cmFwQDEuMi4z │ │ ├── d2N3aWR0aEAxLjAuMQ== │ │ ├── d2ViLXN0cmVhbXMtcG9seWZpbGxAMy4yLjE= │ │ ├── d2ViaWRsLWNvbnZlcnNpb25zQDMuMC4x │ │ ├── d2hhdHdnLW1pbWV0eXBlQDMuMC4w │ │ ├── d2hhdHdnLXVybEA1LjAuMA== │ │ ├── d2hpY2hAMi4wLjI= │ │ ├── d3JhcHB5QDEuMC4y │ │ ├── dG8tZmFzdC1wcm9wZXJ0aWVzQDIuMC4w │ │ ├── dG8tcmVnZXgtcmFuZ2VANS4wLjE= │ │ ├── dG9pZGVudGlmaWVyQDEuMC4x │ │ ├── dGV4dC10YWJsZUAwLjIuMA== │ │ ├── dGhyZWFkLXN0cmVhbUAyLjMuMA== │ │ ├── dGlueS1scnVAMTAuMi4y │ │ ├── dHI0NkAwLjAuMw== │ │ ├── dHMtZGVib3VuY2VANC4wLjA= │ │ ├── dHNsaWJAMi41LjA= │ │ ├── dHlwZS1jaGVja0AwLjQuMA== │ │ ├── dHlwZS1mZXN0QDAuMjAuMg== │ │ ├── dHlwZS1pc0AxLjYuMTg= │ │ ├── dW5pdmVyc2FsaWZ5QDIuMC4w │ │ ├── dW5waXBlQDEuMC4w │ │ ├── dWMubWljcm9AMS4wLjY= │ │ ├── dXBhdGhAMi4wLjE= │ │ ├── dXBkYXRlLWJyb3dzZXJzbGlzdC1kYkAxLjAuMTA= │ │ ├── dXJpLWpzQDQuNC4x │ │ ├── dXRpbC1kZXByZWNhdGVAMS4wLjI= │ │ ├── dXRpbHMtbWVyZ2VAMS4wLjE= │ │ ├── dXVpZEA5LjAuMA== │ │ ├── djgtY29tcGlsZS1jYWNoZUAyLjMuMA== │ │ ├── dmFsdWUtb3ItcHJvbWlzZUAxLjAuMTE= │ │ ├── dmFyeUAxLjEuMg== │ │ ├── dml0ZUA0LjIuMA== │ │ ├── dml0ZUAzLjEuOA== │ │ ├── dml0ZWZ1QDAuMi40 │ │ ├── dnVlLWRlbWlAMC45LjE= │ │ ├── dnVlLXJvdXRlckA0LjEuNg== │ │ ├── dnVlQDMuMi40Nw== │ │ ├── dnVlcHJlc3Mtdml0ZUAyLjAuMC1iZXRhLjUz │ │ ├── dnVlcHJlc3NAMi4wLjAtYmV0YS41Mw== │ │ ├── eWFsbGlzdEA0LjAuMA== │ │ ├── eWFsbGlzdEAzLjEuMQ== │ │ └── eWFtbEAyLjIuMQ== │ ├── compatibility/ │ │ ├── circular-esm.test.ts │ │ ├── process.binding.test.ts │ │ └── uv.test.ts │ ├── examples/ │ │ ├── apollo-server.example.js │ │ ├── astro.example.js │ │ ├── console.example.js │ │ ├── eslint.example.js │ │ ├── exec.example.js │ │ ├── express.example.js │ │ ├── fastify.example.js │ │ ├── fs-symlinks.example.js │ │ ├── fs-watch-file.example.js │ │ ├── http-server.example.js │ │ ├── multiple.example.js │ │ ├── next-13-app-simple.example.js │ │ ├── next-13-app.example.js │ │ ├── next-13.example.js │ │ ├── next-api.example.js │ │ ├── next.example.js │ │ ├── nodemon.example.js │ │ ├── nuxt.example.js │ │ ├── shell-output.example.js │ │ ├── sveltekit.example.js │ │ ├── terminal.example.js │ │ ├── timers.example.js │ │ ├── vite-react.example.js │ │ ├── vite-solid.example.js │ │ ├── vite-svelte.example.js │ │ ├── vite-vue.example.js │ │ ├── vite.example.js │ │ ├── vuepress.example.js │ │ └── yarn.example.js │ ├── features/ │ │ ├── child_process.test.ts │ │ ├── console.test.ts │ │ ├── files.start.test.ts │ │ ├── multiple.test.ts │ │ ├── package-manager/ │ │ │ └── hoist-pattern.test.ts │ │ ├── shell.start.test.ts │ │ └── worker_threads.test.ts │ ├── frameworks/ │ │ ├── astro.start.test.ts │ │ ├── express.test.ts │ │ ├── fastify.test.ts │ │ ├── http-server.start.test.ts │ │ ├── next.start.test.ts │ │ ├── vite.start.test.ts │ │ └── vuepress.start.test.ts │ ├── global.d.ts │ ├── index.ts │ ├── node-packages/ │ │ ├── apollo-server.test.ts │ │ ├── eslint.test.ts │ │ ├── node-fetch.test.ts │ │ └── nodemon.test.ts │ ├── setup/ │ │ ├── MockCdn.ts │ │ ├── globalSetup.ts │ │ ├── runSandpackCDNProxy.ts │ │ ├── runTestServer.ts │ │ └── server/ │ │ └── index.html │ └── tsconfig.json ├── tsconfig.json ├── turbo.json └── vercel.json ================================================ FILE CONTENTS ================================================ ================================================ FILE: .codesandbox/tasks.json ================================================ { // These tasks will run in order when initializing your CodeSandbox project. "setupTasks": [ { "name": "Install PNPM", "command": "npm i -g pnpm@~7.4.0 --force" }, { "name": "Install Dependencies", "command": "pnpm install" }, { "name": "Build Dependencies", "command": "pnpm build" } ], // These tasks can be run from CodeSandbox. Running one will open a log in the app. "tasks": { "install": { "name": "Install Dependencies", "command": "pnpm install" }, "build": { "name": "Build", "command": "pnpm build" }, "build:prod": { "name": "Build:prod", "command": "IS_PROD_BUILD=1 pnpm build" }, "start": { "name": "Start", "command": "pnpm start", "runAtStart": true }, "watch:consumer": { "name": "Watch consumer", "command": "pnpm watch:consumer", "runAtStart": true }, "test:unit": { "name": "Unit tests", "command": "pnpm run test:unit" }, "Lint": { "name": "Lint", "command": "pnpm lint" }, "Format:write": { "name": "Format:write", "command": "pnpm format:write" } } } ================================================ FILE: .editorconfig ================================================ root = true [*] end_of_line = lf [*.{js,ts,json}] indent_style = space indent_size = 2 [Makefile] indent_style = tab ================================================ FILE: .env.example ================================================ PREVIEW_HOST=csb.test:3000 ================================================ FILE: .env.test ================================================ EMULATOR_HOST=localhost:4000 PREVIEW_HOST=csb.test:3000 SANDPACK_CDN_ROOT=https://localhost:3500 ================================================ FILE: .eslintignore ================================================ .turbo build internals/servers/consumer/dist/consumer.js /packages/runtime/preview/**/*.js /preview tmp ================================================ FILE: .eslintrc.js ================================================ module.exports = { env: { browser: true, es2021: true }, parser: '@typescript-eslint/parser', parserOptions: { ecmaVersion: 'latest', sourceType: 'module' }, plugins: ['@typescript-eslint'], rules: { 'no-console': ['error', { allow: ['warn', 'error'] }] }, }; ================================================ FILE: .gitignore ================================================ node_modules .DS_Store .turbo build internals/servers/consumer/dist/consumer.js internals/servers/consumer/bin .env* !.env.test !.env.example certificates /packages/runtime/preview/**/*.js *-error.log *.log /preview tmp test-results ================================================ FILE: .prettierignore ================================================ fixture fixtures build internals/servers/consumer/dist/consumer.js /packages/runtime/preview/**/*.js /preview tmp ================================================ FILE: .prettierrc ================================================ { "semi": true, "singleQuote": true, "bracketSpacing": true, "printWidth": 120, "tabWidth": 2, "overrides": [ { "files": "*.(scss|css)", "options": { "singleQuote": false } } ] } ================================================ FILE: .release-please-manifest.json ================================================ {"packages/nodebox":"0.1.9"} ================================================ FILE: ATTRIBUTIONS.md ================================================ # Open Source License Attribution Nodebox uses various components from existing open source projects. You can find the source code of their open source projects along with license information below. We acknowledge and are grateful to these developers for their contributions to open source. - [Node.js](https://github.com/nodejs/node): MIT - Node.js contributors - [bun](https://github.com/oven-sh/bun): MIT - Oven.sh - [browserify](https://github.com/browserify/browserify): MIT - James Halliday - [os-browserify](https://github.com/CoderPuppy/os-browserify): MIT - CoderPuppy - [node-process](https://github.com/defunctzombie/node-process): MIT - Roman Shtylman - [deno_std](https://github.com/denoland/deno_std): MIT - Deno authors ================================================ FILE: LICENSE ================================================ Sustainable Use License Version 1.0 Acceptance By using the software, you agree to all of the terms and conditions below. Copyright License The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations below. Limitations You may use or modify the software only for your own internal business purposes or for non-commercial or personal use. You may distribute the software or provide it to others only if you do so free of charge for non-commercial purposes. You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor's trademarks is subject to applicable law. Patents The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company. Notices You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms. If you modify the software, you must include in any modified copies of the software a prominent notice stating that you have modified the software. No Other Rights These terms do not imply any licenses other than those expressly granted in these terms. Termination If you use the software in violation of these terms, such use is not licensed, and your license will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your license will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your license to terminate automatically and permanently. No Liability As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim. Definitions The "licensor" is CodeSandBox B.V. The "software" is the software the licensor makes available under these terms, including any portion of it. "You" refers to the individual or entity agreeing to these terms. "Your company" is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. Control means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect. "Your license" is the license granted to you for the software under these terms. "Use" means anything you do with the software requiring your license. "Trademark" means trademarks, service marks, and similar rights. ================================================ FILE: README.md ================================================ # Nodebox Nodebox is a runtime for executing Node.js modules in the browser. ## Why we built Nodebox With `sandpack-bundler`, we allowed any developer anywhere to instantly create a fast, local, shareable playground inside their browser, without having to wait forever to install dependencies and fight with devtools. This improves the learning, experimentation and sharing experience of client-side JavaScript code. However, server-side JavaScript remained a challenge. At CodeSandbox we have solved this by using [Firecracker VMs](https://codesandbox.io/blog/how-we-clone-a-running-vm-in-2-seconds), allowing us to bring your entire development environment to the cloud regardless of the programming language or tooling you might be using. Unfortunately, as VMs live in the cloud, they require infrastructure and a network connection, resulting in a higher cost compared to our client-side sandboxes. To solve this problem, we built Nodebox, a runtime that runs entirely in the browser, eliminating the need for a network connection and infrastructure. Nodebox gives you the same user experience you have come to expect from Sandpack, which means a near-instant server-side JavaScript environment at the click of a button—built for experimentation, examples and documentation. ## The differences between a VM and Nodebox As mentioned in the previous section, we solved server-side sandboxes in CodeSandbox by using Firecracker VMs. In this section, we'll explain the advantages and disadvantages of each approach. ### Advantages of VMs over Nodebox - You get dedicated resources, with no resource limits enforced by the browser - You have an entire Unix OS available - You can run any language, database, command - You can use network sockets - You can run large and complex projects - A perfect 1:1 environment as compared to your local setup (at least, if you're using a Unix-based system) - No emulation, so Node.js would run exactly the same way as locally ### Advantages of Nodebox - No need for any infrastructure - No need for a network connection - Instant feedback to any change - Easy to get started - Easy and instant reset - simply refresh the page/iframe - Every page visitor gets their own Nodebox instance automatically ## What makes it different Nodebox is currently the only cross-browser Node.js runtime supporting all the latest browsers: - Chrome; - Firefox; - Safari \* > - Support for iOS Safari is in beta Nodebox does not emulate Node.js but is, instead, a Node.js-compatible runtime. This means that it implements as much of the Node.js API as possible while keeping a minimal performance imprint, using browser API where applicable and, in some cases, leaving out certain parts of Node.js due to browser [limitations](#Limitations) or complexity. Nodebox uses an internal dependency manager that is fine-tuned to deliver optimal initial load time by utilizing dependency caching via [Sandpack CDN](https://github.com/codesandbox/sandpack-cdn). That CDN is an open-source Rust package manager that runs in the cloud and can be self-hosted pretty easily as well. While there are alternatives to Nodebox, they are closer to mimicking a container-based environment, running commands step-by-step, or even the entire Linux distributive in your browser. That makes them slower and harder to use compared to Nodebox, which is optimized to run sandboxes fast and with as little friction as possible. ## Limitations Unfortunately, any type of runtime that does not have access to operating system-level APIs will come with certain limitations. For Nodebox, those are the following: - N-API modules - net#Sockets pointing to external IPs - Synchronous exec/spawn - async_hooks (planned for implementation) - Automatic process exiting - users now need to manually call `process.exit` before the process is exited (planned for implementation) As we implement every module manually one by one, it is possible that some will not behave correctly. If this happens, feel free to open an issue here on GitHub and we'll make sure to fix it. ## Documentation - [**Getting started**](#getting-started) - [API documentation](https://github.com/codesandbox/nodebox-runtime/blob/main/packages/nodebox/api.md) --- ## Getting started Nodebox is meant for usage in your client-side applications, granting them the capability of running actual Node.js code directly in the browser. Here are a couple of examples of when Nodebox can be used: - Building interactive examples for server-side code in your documentation; - Showcasing a UI component library in the actual framework it's built for; - Generally any evaluation of Node.js code and previewing it in the browser. In the context of this tutorial, we will be working on a documentation website that illustrates different examples of using a Next.js application. Bear in mind that our documentation itself can be written in any framework of our choosing. ### Install Nodebox can be installed from NPM just like any other dependency: ```sh npm install @codesandbox/nodebox ``` ### Setup Nodebox consists of two main parts: - A runtime environment evaluating the code; - A preview environment serving the result of the evaluation. Corresponding to these two parts, let's create two iframes in our application: ```html ``` Although the runtime environment can be self-hosted, we will use the default one pointing to the deployed Nodebox instance on CodeSandbox servers. We do need, however, to specify an `iframe` reference in our application where Nodebox should render its preview. ```js import { Nodebox } from '@codesandbox/nodebox'; const runtime = new Nodebox({ // Provide a reference to the
================================================ FILE: internals/servers/consumer/serve.ts ================================================ import 'dotenv/config'; import { setupApp } from '../utils'; import fastifyStatic from '@fastify/static'; import path from 'path'; const PORT = 5000; const app = setupApp(); app.register(fastifyStatic, { root: path.join(__dirname, './dist'), index: ['index.html'], setHeaders: (res) => { res.setHeader('x-csb-no-sw-proxy', '1'); }, decorateReply: false, }); app.listen({ port: PORT }, function (err, address) { if (err) { app.log.error(err); process.exit(1); } /* eslint-disable-next-line no-console */ console.log(`Server is now listening on ${address}`); }); ================================================ FILE: internals/servers/main-server.ts ================================================ import path from 'path'; import 'dotenv/config'; import { setupApp } from './utils'; import fastifyStatic from '@fastify/static'; const PORT = +(process.env.PORT || '4000'); const app = setupApp(); const NODE_EMULATOR_RUNTIME_BUILD_DIR = path.join(__dirname, '../../packages/runtime/build'); app.register(fastifyStatic, { root: NODE_EMULATOR_RUNTIME_BUILD_DIR, index: ['index.html'], setHeaders: (res) => { res.setHeader('x-csb-no-sw-proxy', '1'); }, decorateReply: false, }); app.register(fastifyStatic, { prefix: '/public/', root: path.join(__dirname, '../public'), index: ['index.html'], setHeaders: (res, filePath) => { const parsedPath = path.parse(filePath); if (parsedPath.ext === '.gz') { res.setHeader('Content-Encoding', 'gzip'); } else if (parsedPath.ext === '.br') { res.setHeader('Content-Encoding', 'br'); } }, decorateReply: false, }); // Run the server! app.listen({ port: PORT }, function (err, address) { if (err) { app.log.error(err); process.exit(1); } console.log(`Server is now listening on ${address}`); }); ================================================ FILE: internals/servers/preview-server.ts ================================================ import 'dotenv/config'; import { setupApp } from './utils'; import fastifyStatic from '@fastify/static'; import path from 'path'; const PORT = +(process.env.PORT || '3000'); const app = setupApp(); const PREVIEW_BUILD_DIR = path.join(__dirname, '../../packages/runtime/preview'); app.register(fastifyStatic, { root: PREVIEW_BUILD_DIR, index: ['index.html'], setHeaders: (res) => { res.setHeader('x-csb-no-sw-proxy', '1'); }, decorateReply: false, }); // Run the server! app.listen({ port: PORT }, function (err, address) { if (err) { app.log.error(err); process.exit(1); } console.log(`Server is now listening on ${address}`); }); ================================================ FILE: internals/servers/test/index.html ================================================ Test Server

Test server

================================================ FILE: internals/servers/test/test-server.ts ================================================ import 'dotenv/config'; import { setupApp } from '../utils'; import fastifyStatic from '@fastify/static'; import path from 'path'; const PORT = 4007; const app = setupApp(); app.register(fastifyStatic, { root: path.join(__dirname), index: ['index.html'], decorateReply: false, }); app.register(fastifyStatic, { root: path.join(__dirname, '../../..', 'packages/nodebox/build'), prefix: '/nodebox/', decorateReply: false, }); app.listen({ port: PORT }, function (err, address) { if (err) { app.log.error(err); process.exit(1); } console.log(`Server is now listening on ${address}`); }); ================================================ FILE: internals/servers/utils.ts ================================================ import fastify, { FastifyInstance } from 'fastify'; import fs from 'fs'; import path from 'path'; export function setupApp(): FastifyInstance { if (process.env.CSB) { return fastify({ logger: true, }); } const app = fastify({ logger: true, https: { key: fs.readFileSync(path.join(__dirname, '../../certificates/cert.key')), cert: fs.readFileSync(path.join(__dirname, '../../certificates/cert.crt')), }, }); app.log.level = process.env.NODE_ENV === 'test' ? 'error' : 'debug'; return app; } ================================================ FILE: package.json ================================================ { "private": true, "name": "nodebox", "version": "0.0.0", "scripts": { "build": "turbo run build --no-cache && pnpm build:consumer", "build:runtime": "turbo run build --filter runtime --no-cache", "build:api": "turbo run build --filter @codesandbox/nodebox --no-cache", "build:consumer": "node -r esbuild-register ./internals/servers/consumer/build.ts", "---": "---", "watch:consumer": "onchange 'tests/**/**.example.js' -- pnpm build:consumer", "----": "----", "start:preview": "node -r esbuild-register ./internals/servers/preview-server.ts", "start:runtime": "node -r esbuild-register ./internals/servers/main-server.ts", "start:consumer": "node -r esbuild-register ./internals/servers/consumer/serve.ts", "start:test-server": "node -r esbuild-register ./internals/servers/test/test-server.ts", "-----": "-----", "start": "concurrently \"pnpm start:runtime\" \"pnpm start:consumer\" \"pnpm start:preview\"", "cert": "mkdir -p certificates && openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout certificates/cert.key -out certificates/cert.crt -config req.conf -extensions v3_req", "cert:trust": "sudo security add-trusted-cert -d -r trustRoot -k \"/Library/Keychains/System.keychain\" ./certificates/cert.crt", "test:unit": "turbo run test:unit", "test:e2e": "pnpm playwright test", "test:e2e:debug": "PWDEBUG=1 pnpm run test:e2e", "------": "------", "lint": "eslint packages/**/*.{ts,js}", "format:check": "prettier --check packages/**/*.{ts,js}", "format:write": "prettier --write packages/**/*.{ts,js}" }, "dependencies": { "@open-draft/deferred-promise": "^2.1.0", "@swc/helpers": "^0.4.2", "@typescript-eslint/eslint-plugin": "^5.43.0", "@typescript-eslint/parser": "^5.43.0", "base-x": "^4.0.0", "concurrently": "^7.5.0", "cuid": "^2.1.8", "dotenv": "^16.0.1", "esbuild-plugin-alias": "^0.2.1", "esbuild-register": "^3.4.1", "eslint": "^8.28.0", "node-fetch": "^2.6.7", "vite": "^2.9.12" }, "devDependencies": { "@fastify/static": "^6.4.0", "@msgpack/msgpack": "^2.7.2", "@playwright/test": "^1.25.1", "@swc/core": "^1.2.204", "@swc/register": "^0.1.10", "@types/fs-extra": "^9.0.13", "@types/glob": "8.0.0", "@types/jest": "^29.2.0", "@types/node": "^18.0.0", "@types/node-fetch": "^2.6.2", "esbuild": "^0.14.46", "fastify": "^4.1.0", "fs-extra": "^10.1.0", "glob": "8.0.3", "glob-promise": "5.0.0", "jest": "^29.2.1", "onchange": "7.1.0", "outvariant": "^1.4.0", "playwright": "^1.25.1", "playwright-testing-library": "^4.3.1", "prettier": "^2.7.1", "rimraf": "^3.0.2", "ts-jest": "^29.0.3", "turbo": "^1.5.5", "typescript": "^4.8.4", "wait-for-expect": "^3.0.2" } } ================================================ FILE: packages/nodebox/.npmignore ================================================ src build.ts CHANGELOG.md ================================================ FILE: packages/nodebox/CHANGELOG.md ================================================ # Changelog ## [0.1.9](https://github.com/Sandpack/nodebox-internal/compare/nodebox-v0.1.8...nodebox-v0.1.9) (2023-11-29) ### Bug Fixes * force a new release ([5b50af9](https://github.com/Sandpack/nodebox-internal/commit/5b50af93a58a3ddf6bcc9ce001f92cc7711e4702)) ## [0.1.8](https://github.com/codesandbox/nodebox-internal/compare/nodebox-v0.1.7...nodebox-v0.1.8) (2023-05-19) ### Bug Fixes * **package.json:** update outvariant dependency to 1.4.0 in all packages ([#378](https://github.com/codesandbox/nodebox-internal/issues/378)) ([1e2658f](https://github.com/codesandbox/nodebox-internal/commit/1e2658f68764373e95b3ee90973a68886d708139)) ## [0.1.7](https://github.com/codesandbox/nodebox-internal/compare/nodebox-v0.1.6...nodebox-v0.1.7) (2023-03-30) ### Features * Add `INTERNAL_NODEBOX_DEV` to improve debugging experience ([#372](https://github.com/codesandbox/nodebox-internal/issues/372)) ([f78ebd3](https://github.com/codesandbox/nodebox-internal/commit/f78ebd377a3d8de35bf3a4fafc12fc4c6c83b255)) * **console:** Implement Console class ([#370](https://github.com/codesandbox/nodebox-internal/issues/370)) ([265e194](https://github.com/codesandbox/nodebox-internal/commit/265e1942ee97a159b1fb3c238f19f0f6725c42f5)) ## [0.1.6](https://github.com/codesandbox/nodebox-internal/compare/nodebox-v0.1.5...nodebox-v0.1.6) (2023-03-07) ### Features * **nodebox:** Implement fs.rm api ([#360](https://github.com/codesandbox/nodebox-internal/issues/360)) ([52d7dc3](https://github.com/codesandbox/nodebox-internal/commit/52d7dc3d589dddffb3ca6d0ccd342f9e409022c9)) ### Bug Fixes * **nodebox:** add repo url for npm find the package homepage ([#361](https://github.com/codesandbox/nodebox-internal/issues/361)) ([70057b7](https://github.com/codesandbox/nodebox-internal/commit/70057b7da7d97d6c5409c62fd329ba3f16824515)) ## [0.1.5](https://github.com/codesandbox/nodebox-internal/compare/nodebox-v0.1.4...nodebox-v0.1.5) (2023-03-05) ### Bug Fixes * API page link ([#355](https://github.com/codesandbox/nodebox-internal/issues/355)) ([2c6970c](https://github.com/codesandbox/nodebox-internal/commit/2c6970c72d237258e10434c6f0b6f2232891be3d)) ## [0.1.4](https://github.com/codesandbox/nodebox-internal/compare/nodebox-v0.1.3...nodebox-v0.1.4) (2023-03-02) ### Bug Fixes * **preview:** increase timeout message ([#349](https://github.com/codesandbox/nodebox-internal/issues/349)) ([3aba917](https://github.com/codesandbox/nodebox-internal/commit/3aba91788df1e5eb44f82f022c5298c11ecb2bf8)) ## [0.1.3](https://github.com/codesandbox/nodebox-internal/compare/nodebox-v0.1.2...nodebox-v0.1.3) (2023-03-01) ### Features * **shell:** introduce stdin api on shell ([#338](https://github.com/codesandbox/nodebox-internal/issues/338)) ([7630ca2](https://github.com/codesandbox/nodebox-internal/commit/7630ca295107e3a25cdd0d553f97240b79fa6b10)) ### Bug Fixes * **fs-writeFile:** content can be string or Uint8Array ([#346](https://github.com/codesandbox/nodebox-internal/issues/346)) ([8309deb](https://github.com/codesandbox/nodebox-internal/commit/8309deb35776b1a1dfee786bdf9b534ef08d99ee)) ## [0.1.2](https://github.com/codesandbox/nodebox-internal/compare/nodebox-v0.1.1...nodebox-v0.1.2) (2023-02-23) ### Features * accept custom "cdnUrl" ([#273](https://github.com/codesandbox/nodebox-internal/issues/273)) ([21cca7a](https://github.com/codesandbox/nodebox-internal/commit/21cca7a298c64d355bc125ff12339e3c82d8e00f)) * **nodebox:** Add more fs methods to the public API ([#332](https://github.com/codesandbox/nodebox-internal/issues/332)) ([38c1abc](https://github.com/codesandbox/nodebox-internal/commit/38c1abc29b25d85665f67414042489131fb8637d)) * **nodebox:** make runtime URL optional and imply the default value ([#299](https://github.com/codesandbox/nodebox-internal/issues/299)) ([bb65224](https://github.com/codesandbox/nodebox-internal/commit/bb6522498fe8529ac74c79ab1bb238727127bdb0)) * remove picomatch for simple glob util ([#236](https://github.com/codesandbox/nodebox-internal/issues/236)) ([0d10685](https://github.com/codesandbox/nodebox-internal/commit/0d10685a5b733155a50fc928872a90eb966e975a)) * **shell:** implement stdout/stderr emitters ([#227](https://github.com/codesandbox/nodebox-internal/issues/227)) ([cd7cd9a](https://github.com/codesandbox/nodebox-internal/commit/cd7cd9a63a1c515a04e4d713c9a324773a2fb72a)) * **shell:** replace ".exit()" with ".kill()" ([#226](https://github.com/codesandbox/nodebox-internal/issues/226)) ([43b6e78](https://github.com/codesandbox/nodebox-internal/commit/43b6e78b67ace366ade9fab96e37e79ee66fa6db)) ### Bug Fixes * improve error handling, support operation rejections ([#251](https://github.com/codesandbox/nodebox-internal/issues/251)) ([78ce271](https://github.com/codesandbox/nodebox-internal/commit/78ce2714e5c29839e93a655e250042aac57ff36d)) * incorrect cdnUrl typings on runtime iframe protocol ([b68abb2](https://github.com/codesandbox/nodebox-internal/commit/b68abb272265b96086ac904f232583e933238b92)) * **nodebox:** check url argument, improve error messages ([#218](https://github.com/codesandbox/nodebox-internal/issues/218)) ([f9ec17c](https://github.com/codesandbox/nodebox-internal/commit/f9ec17c33d674ccb73f1b15dbb4f442ae2b39c15)) * **nodebox:** publish version ([#334](https://github.com/codesandbox/nodebox-internal/issues/334)) ([18ad452](https://github.com/codesandbox/nodebox-internal/commit/18ad452635f0b82d036f3693ec4fd6a202ea6557)) * package export for nodebox ([#321](https://github.com/codesandbox/nodebox-internal/issues/321)) ([a486b44](https://github.com/codesandbox/nodebox-internal/commit/a486b44d0dfc86e10fb54c346cb294f5f3e8c215)) * **progress message:** drop `progress` key in favor of `totalPending` ([#292](https://github.com/codesandbox/nodebox-internal/issues/292)) ([9856a15](https://github.com/codesandbox/nodebox-internal/commit/9856a155e536ae24072c818e8b68986bd27702bc)) * readme links ([#306](https://github.com/codesandbox/nodebox-internal/issues/306)) ([d83bbbc](https://github.com/codesandbox/nodebox-internal/commit/d83bbbcd0e0d33931a7cafd419252bf68d84b093)) * **readme:** remove sentence about VMs ([#312](https://github.com/codesandbox/nodebox-internal/issues/312)) ([6c9260f](https://github.com/codesandbox/nodebox-internal/commit/6c9260f1f6cb806351327a69fef316982b0f94af)) * rename publish script and folder name ([#239](https://github.com/codesandbox/nodebox-internal/issues/239)) ([2dac1db](https://github.com/codesandbox/nodebox-internal/commit/2dac1dba061a1ff42adb29d6265ff88ebc4993ff)) * **shell:** emit "exit" when shell exits ([#287](https://github.com/codesandbox/nodebox-internal/issues/287)) ([3b25008](https://github.com/codesandbox/nodebox-internal/commit/3b25008cb386ef45b58b0672b16a86a86ced2593)) * **shell:** replace "shell.listen()" with "shell.on()" ([#234](https://github.com/codesandbox/nodebox-internal/issues/234)) ([1774241](https://github.com/codesandbox/nodebox-internal/commit/17742414bc938707d9142e1895b64f522c5366a0)) * update configuration steps ([#310](https://github.com/codesandbox/nodebox-internal/issues/310)) ([9d7df79](https://github.com/codesandbox/nodebox-internal/commit/9d7df79ffb90b67632e3e20ba2c2ef5125e0df4d)) ## [0.0.41](https://github.com/codesandbox/nodebox-internal/compare/nodebox-v0.0.40...nodebox-v0.0.41) (2023-02-23) ### Features * **nodebox:** Add more fs methods to the public API ([#332](https://github.com/codesandbox/nodebox-internal/issues/332)) ([38c1abc](https://github.com/codesandbox/nodebox-internal/commit/38c1abc29b25d85665f67414042489131fb8637d)) ## [0.0.40](https://github.com/codesandbox/nodebox-internal/compare/nodebox-v0.0.39...nodebox-v0.0.40) (2023-02-21) ### Bug Fixes * package export for nodebox ([#321](https://github.com/codesandbox/nodebox-internal/issues/321)) ([a486b44](https://github.com/codesandbox/nodebox-internal/commit/a486b44d0dfc86e10fb54c346cb294f5f3e8c215)) ## [0.0.39](https://github.com/codesandbox/nodebox-internal/compare/nodebox-v0.0.38...nodebox-v0.0.39) (2023-02-16) ### Bug Fixes * readme links ([#306](https://github.com/codesandbox/nodebox-internal/issues/306)) ([d83bbbc](https://github.com/codesandbox/nodebox-internal/commit/d83bbbcd0e0d33931a7cafd419252bf68d84b093)) * **readme:** remove sentence about VMs ([#312](https://github.com/codesandbox/nodebox-internal/issues/312)) ([6c9260f](https://github.com/codesandbox/nodebox-internal/commit/6c9260f1f6cb806351327a69fef316982b0f94af)) * update configuration steps ([#310](https://github.com/codesandbox/nodebox-internal/issues/310)) ([9d7df79](https://github.com/codesandbox/nodebox-internal/commit/9d7df79ffb90b67632e3e20ba2c2ef5125e0df4d)) ## [0.0.38](https://github.com/codesandbox/nodebox/compare/nodebox-v0.0.37...nodebox-v0.0.38) (2023-02-15) ### Features * **nodebox:** make runtime URL optional and imply the default value ([#299](https://github.com/codesandbox/nodebox/issues/299)) ([bb65224](https://github.com/codesandbox/nodebox/commit/bb6522498fe8529ac74c79ab1bb238727127bdb0)) ## [0.0.37](https://github.com/codesandbox/nodebox/compare/nodebox-v0.0.36...nodebox-v0.0.37) (2023-02-08) ### Bug Fixes * **progress message:** drop `progress` key in favor of `totalPending` ([#292](https://github.com/codesandbox/nodebox/issues/292)) ([9856a15](https://github.com/codesandbox/nodebox/commit/9856a155e536ae24072c818e8b68986bd27702bc)) * **shell:** emit "exit" when shell exits ([#287](https://github.com/codesandbox/nodebox/issues/287)) ([3b25008](https://github.com/codesandbox/nodebox/commit/3b25008cb386ef45b58b0672b16a86a86ced2593)) ## [0.0.36](https://github.com/codesandbox/nodebox/compare/nodebox-v0.0.35...nodebox-v0.0.36) (2023-02-02) ### Bug Fixes * incorrect cdnUrl typings on runtime iframe protocol ([b68abb2](https://github.com/codesandbox/nodebox/commit/b68abb272265b96086ac904f232583e933238b92)) ## [0.0.35](https://github.com/codesandbox/nodebox/compare/nodebox-v0.0.34...nodebox-v0.0.35) (2023-01-26) ### Features * accept custom "cdnUrl" ([#273](https://github.com/codesandbox/nodebox/issues/273)) ([21cca7a](https://github.com/codesandbox/nodebox/commit/21cca7a298c64d355bc125ff12339e3c82d8e00f)) ## [0.0.34](https://github.com/codesandbox/nodebox/compare/nodebox-v0.0.33...nodebox-v0.0.34) (2023-01-17) ### Bug Fixes * improve error handling, support operation rejections ([#251](https://github.com/codesandbox/nodebox/issues/251)) ([78ce271](https://github.com/codesandbox/nodebox/commit/78ce2714e5c29839e93a655e250042aac57ff36d)) ## [0.0.33](https://github.com/codesandbox/nodebox/compare/nodebox-v0.0.32...nodebox-v0.0.33) (2023-01-10) ### Bug Fixes * rename publish script and folder name ([#239](https://github.com/codesandbox/nodebox/issues/239)) ([2dac1db](https://github.com/codesandbox/nodebox/commit/2dac1dba061a1ff42adb29d6265ff88ebc4993ff)) ## [0.0.32](https://github.com/codesandbox/nodebox/compare/nodebox-v0.0.31...nodebox-v0.0.32) (2023-01-10) ### Features * remove picomatch for simple glob util ([#236](https://github.com/codesandbox/nodebox/issues/236)) ([0d10685](https://github.com/codesandbox/nodebox/commit/0d10685a5b733155a50fc928872a90eb966e975a)) * **shell:** implement stdout/stderr emitters ([#227](https://github.com/codesandbox/nodebox/issues/227)) ([cd7cd9a](https://github.com/codesandbox/nodebox/commit/cd7cd9a63a1c515a04e4d713c9a324773a2fb72a)) ### Bug Fixes * **shell:** replace "shell.listen()" with "shell.on()" ([#234](https://github.com/codesandbox/nodebox/issues/234)) ([1774241](https://github.com/codesandbox/nodebox/commit/17742414bc938707d9142e1895b64f522c5366a0)) ## [0.0.31](https://github.com/codesandbox/nodebox/compare/nodebox-v0.0.30...nodebox-v0.0.31) (2022-12-20) ### Features * **shell:** replace ".exit()" with ".kill()" ([#226](https://github.com/codesandbox/nodebox/issues/226)) ([43b6e78](https://github.com/codesandbox/nodebox/commit/43b6e78b67ace366ade9fab96e37e79ee66fa6db)) ### Bug Fixes * **nodebox:** check url argument, improve error messages ([#218](https://github.com/codesandbox/nodebox/issues/218)) ([f9ec17c](https://github.com/codesandbox/nodebox/commit/f9ec17c33d674ccb73f1b15dbb4f442ae2b39c15)) ## [0.0.30](https://github.com/codesandbox/nodebox/compare/nodebox-v0.0.29...nodebox-v0.0.30) (2022-12-14) ### Features * Refactor node worker spawning to use MessageChannel ([#205](https://github.com/codesandbox/nodebox/issues/205)) ([6896135](https://github.com/codesandbox/nodebox/commit/6896135706bf2bd847c34ab9d289eb67de76a2f7)) ## [0.0.29](https://github.com/codesandbox/nodebox/compare/nodebox-v0.0.28...nodebox-v0.0.29) (2022-12-08) ### Bug Fixes * update deferred promises ([#200](https://github.com/codesandbox/nodebox/issues/200)) ([d11066e](https://github.com/codesandbox/nodebox/commit/d11066eb2852b51717f237b918b8eb8f4c878274)) ## [0.0.28](https://github.com/codesandbox/browser-node-emulator/compare/nodebox-v0.0.27...nodebox-v0.0.28) (2022-11-29) ### Features * **bridge:** improve worker handling, use MessageChannel for worker ([#162](https://github.com/codesandbox/browser-node-emulator/issues/162)) ([bbe1e11](https://github.com/codesandbox/browser-node-emulator/commit/bbe1e11679daed2b28ff8eec1d5e6aad39373976)) * fs refactor ([#100](https://github.com/codesandbox/browser-node-emulator/issues/100)) ([5797d19](https://github.com/codesandbox/browser-node-emulator/commit/5797d19528defb2724abbd1d2cf0cb03d05b2b60)) * **fs:** FSWatcher ([#75](https://github.com/codesandbox/browser-node-emulator/issues/75)) ([b378b76](https://github.com/codesandbox/browser-node-emulator/commit/b378b763e85ec24b117a3ac962ee22ef39f22738)) * **fs:** read / write files ([#60](https://github.com/codesandbox/browser-node-emulator/issues/60)) ([05c032d](https://github.com/codesandbox/browser-node-emulator/commit/05c032dbe33916faa563a858c67e464c9b03a9f6)) * **node emulator:** preview interface ([#41](https://github.com/codesandbox/browser-node-emulator/issues/41)) ([e7e66bb](https://github.com/codesandbox/browser-node-emulator/commit/e7e66bbaced7cf5eb20d14b58816e11737f9c3ed)) * **public fs:** implement fs watch ([#90](https://github.com/codesandbox/browser-node-emulator/issues/90)) ([fe9b0b6](https://github.com/codesandbox/browser-node-emulator/commit/fe9b0b68ef61532483a326e3d3ea0b9e565bc273)) * **runtime:** runtime protocols ([#131](https://github.com/codesandbox/browser-node-emulator/issues/131)) ([18a92b9](https://github.com/codesandbox/browser-node-emulator/commit/18a92b993d3d21475a903708ff565bb3cf586583)) * **shell:** Allow custom commands ([#61](https://github.com/codesandbox/browser-node-emulator/issues/61)) ([c90890d](https://github.com/codesandbox/browser-node-emulator/commit/c90890db2e0f1c143221772ab76eacb3cafbe23f)) * **shellProcess:** consume stdout ([#94](https://github.com/codesandbox/browser-node-emulator/issues/94)) ([7e5667e](https://github.com/codesandbox/browser-node-emulator/commit/7e5667ebaecf2afb968a1ceb6cf57a90df1a9575)) * **shellProcess:** on exit ([#108](https://github.com/codesandbox/browser-node-emulator/issues/108)) ([dcbd2c5](https://github.com/codesandbox/browser-node-emulator/commit/dcbd2c59aec2479617a37972507081b90bc88fbb)) * **shell:** ShellProcess interface ([#72](https://github.com/codesandbox/browser-node-emulator/issues/72)) ([cdc0cf7](https://github.com/codesandbox/browser-node-emulator/commit/cdc0cf759f016ac5c923bb957caefd555ccaafab)) * Worker progress messages ([#122](https://github.com/codesandbox/browser-node-emulator/issues/122)) ([084eb2f](https://github.com/codesandbox/browser-node-emulator/commit/084eb2f9cfe63d205894e7dd5f89016a40b0b200)) ### Bug Fixes * **emulator:** get rid of internal dependency ([#173](https://github.com/codesandbox/browser-node-emulator/issues/173)) ([b0db69a](https://github.com/codesandbox/browser-node-emulator/commit/b0db69adb70cb4619169dc6a56c1423f17307217)) * **emulator:** get rid of internal dependency ([#173](https://github.com/codesandbox/browser-node-emulator/issues/173)) ([d4c9b8f](https://github.com/codesandbox/browser-node-emulator/commit/d4c9b8f94bfb310949ed90005bb615b9ecf88f4a)) * **node-emulator:** set build target to es2020 ([#38](https://github.com/codesandbox/browser-node-emulator/issues/38)) ([5ff50fc](https://github.com/codesandbox/browser-node-emulator/commit/5ff50fca586101b6270f5f587900a031466c024a)) * **node-emulator:** trigger a new publish ([4b42c8f](https://github.com/codesandbox/browser-node-emulator/commit/4b42c8f43c8dea0491b48af067b07eb74922848f)) * **node-emulator:** trigger a new publish ([baef111](https://github.com/codesandbox/browser-node-emulator/commit/baef111bc1bd3bd34b5ff82fbeaa0a141372c417)) * **node-emulator:** trigger a new publish ([#171](https://github.com/codesandbox/browser-node-emulator/issues/171)) ([8485b15](https://github.com/codesandbox/browser-node-emulator/commit/8485b151f3cbfd88692183a48a263ef070da08b3)) * **NodeEmulator.ts:** export FilesMap type to consumer ([#57](https://github.com/codesandbox/browser-node-emulator/issues/57)) ([d676be5](https://github.com/codesandbox/browser-node-emulator/commit/d676be50f20f6d88bd7bbd6fa9edf3047e5fa8f2)) * Potential race condition with public api ([#111](https://github.com/codesandbox/browser-node-emulator/issues/111)) ([e5e0492](https://github.com/codesandbox/browser-node-emulator/commit/e5e04929c2f2b1dc28a22970bd1e796ed2119236)) * **preview:** remove conditional over listener ([#53](https://github.com/codesandbox/browser-node-emulator/issues/53)) ([5c6e8c0](https://github.com/codesandbox/browser-node-emulator/commit/5c6e8c0a0600a3b408f734a17b13a8f37ef8e09d)) * public watch api and public message bus refactor ([#117](https://github.com/codesandbox/browser-node-emulator/issues/117)) ([2d23b09](https://github.com/codesandbox/browser-node-emulator/commit/2d23b0969652d9c1ff17a9fac79d512f53c332f8)) * remove handshake timeout log ([49413a6](https://github.com/codesandbox/browser-node-emulator/commit/49413a6dde5d8300e626298553fb09a9ce32cf4c)) * **runtime protocol:** remove promise ([#139](https://github.com/codesandbox/browser-node-emulator/issues/139)) ([51a996e](https://github.com/codesandbox/browser-node-emulator/commit/51a996e64ba105bc2a1164bf09000a13f9076936)) * **runtime-protocol.types.ts:** export `InjectMessage` type ([#133](https://github.com/codesandbox/browser-node-emulator/issues/133)) ([b47387a](https://github.com/codesandbox/browser-node-emulator/commit/b47387adbb303552fdc1dd8f0a3aab93704a7550)) * **shell stdout:** fix types ([#105](https://github.com/codesandbox/browser-node-emulator/issues/105)) ([e77d244](https://github.com/codesandbox/browser-node-emulator/commit/e77d244ce2d9ca45ff6a28d0b60dc51b3c512eb7)) * **ShellProcess:** drop restart ([#88](https://github.com/codesandbox/browser-node-emulator/issues/88)) ([5371e4b](https://github.com/codesandbox/browser-node-emulator/commit/5371e4b681c4806112873e1c58a9fafea418ddb6)) * **shellprocess:** reassign internal state to running after restart ([#77](https://github.com/codesandbox/browser-node-emulator/issues/77)) ([13ae624](https://github.com/codesandbox/browser-node-emulator/commit/13ae6242aded1e8896256bb6a78edeb764aecf81)) * **shellprocess:** returning id on restart ([#78](https://github.com/codesandbox/browser-node-emulator/issues/78)) ([23f1230](https://github.com/codesandbox/browser-node-emulator/commit/23f1230c33b8c84911eede9d03d3b9e9bb2ac62f)) * UI tweak on fallback page and improve conditional on FS module ([#102](https://github.com/codesandbox/browser-node-emulator/issues/102)) ([bdfb9cc](https://github.com/codesandbox/browser-node-emulator/commit/bdfb9cc7e89992017bf257133500261fbe7eb933)) * Use picomatch-browser and fix build script ([#125](https://github.com/codesandbox/browser-node-emulator/issues/125)) ([521a432](https://github.com/codesandbox/browser-node-emulator/commit/521a432e22f6b11cc119af19c06ed29fdaad218f)) * **worker controller:** fix exit/restart worker ([#114](https://github.com/codesandbox/browser-node-emulator/issues/114)) ([fbb9ad5](https://github.com/codesandbox/browser-node-emulator/commit/fbb9ad5f890c8e188f9cd7c3b39f71de0e9a3c7e)) ## [0.0.27](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.26...node-emulator-v0.0.27) (2022-11-24) ### Features * **bridge:** improve worker handling, use MessageChannel for worker ([#162](https://github.com/codesandbox/browser-node-emulator/issues/162)) ([bbe1e11](https://github.com/codesandbox/browser-node-emulator/commit/bbe1e11679daed2b28ff8eec1d5e6aad39373976)) ## [0.0.26](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.25...node-emulator-v0.0.26) (2022-11-22) ### Bug Fixes * **emulator:** get rid of internal dependency ([#173](https://github.com/codesandbox/browser-node-emulator/issues/173)) ([d4c9b8f](https://github.com/codesandbox/browser-node-emulator/commit/d4c9b8f94bfb310949ed90005bb615b9ecf88f4a)) ## [0.0.25](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.24...node-emulator-v0.0.25) (2022-11-22) ### Bug Fixes * **node-emulator:** trigger a new publish ([#171](https://github.com/codesandbox/browser-node-emulator/issues/171)) ([8485b15](https://github.com/codesandbox/browser-node-emulator/commit/8485b151f3cbfd88692183a48a263ef070da08b3)) ## [0.0.24](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.23...node-emulator-v0.0.24) (2022-11-10) ### Bug Fixes * **runtime protocol:** remove promise ([#139](https://github.com/codesandbox/browser-node-emulator/issues/139)) ([51a996e](https://github.com/codesandbox/browser-node-emulator/commit/51a996e64ba105bc2a1164bf09000a13f9076936)) ## [0.0.23](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.22...node-emulator-v0.0.23) (2022-11-10) ### Bug Fixes * **runtime-protocol.types.ts:** export `InjectMessage` type ([#133](https://github.com/codesandbox/browser-node-emulator/issues/133)) ([b47387a](https://github.com/codesandbox/browser-node-emulator/commit/b47387adbb303552fdc1dd8f0a3aab93704a7550)) ## [0.0.22](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.21...node-emulator-v0.0.22) (2022-11-10) ### Features * **runtime:** runtime protocols ([#131](https://github.com/codesandbox/browser-node-emulator/issues/131)) ([18a92b9](https://github.com/codesandbox/browser-node-emulator/commit/18a92b993d3d21475a903708ff565bb3cf586583)) ## [0.0.21](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.20...node-emulator-v0.0.21) (2022-11-01) ### Bug Fixes * Use picomatch-browser and fix build script ([#125](https://github.com/codesandbox/browser-node-emulator/issues/125)) ([521a432](https://github.com/codesandbox/browser-node-emulator/commit/521a432e22f6b11cc119af19c06ed29fdaad218f)) ## [0.0.20](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.19...node-emulator-v0.0.20) (2022-11-01) ### Features * Worker progress messages ([#122](https://github.com/codesandbox/browser-node-emulator/issues/122)) ([084eb2f](https://github.com/codesandbox/browser-node-emulator/commit/084eb2f9cfe63d205894e7dd5f89016a40b0b200)) ## [0.0.19](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.18...node-emulator-v0.0.19) (2022-10-31) ### Bug Fixes * public watch api and public message bus refactor ([#117](https://github.com/codesandbox/browser-node-emulator/issues/117)) ([2d23b09](https://github.com/codesandbox/browser-node-emulator/commit/2d23b0969652d9c1ff17a9fac79d512f53c332f8)) ## [0.0.18](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.17...node-emulator-v0.0.18) (2022-10-28) ### Bug Fixes * **worker controller:** fix exit/restart worker ([#114](https://github.com/codesandbox/browser-node-emulator/issues/114)) ([fbb9ad5](https://github.com/codesandbox/browser-node-emulator/commit/fbb9ad5f890c8e188f9cd7c3b39f71de0e9a3c7e)) ## [0.0.17](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.16...node-emulator-v0.0.17) (2022-10-28) ### Features * **shellProcess:** on exit ([#108](https://github.com/codesandbox/browser-node-emulator/issues/108)) ([dcbd2c5](https://github.com/codesandbox/browser-node-emulator/commit/dcbd2c59aec2479617a37972507081b90bc88fbb)) ### Bug Fixes * Potential race condition with public api ([#111](https://github.com/codesandbox/browser-node-emulator/issues/111)) ([e5e0492](https://github.com/codesandbox/browser-node-emulator/commit/e5e04929c2f2b1dc28a22970bd1e796ed2119236)) ## [0.0.16](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.15...node-emulator-v0.0.16) (2022-10-28) ### Features * fs refactor ([#100](https://github.com/codesandbox/browser-node-emulator/issues/100)) ([5797d19](https://github.com/codesandbox/browser-node-emulator/commit/5797d19528defb2724abbd1d2cf0cb03d05b2b60)) ### Bug Fixes * **shell stdout:** fix types ([#105](https://github.com/codesandbox/browser-node-emulator/issues/105)) ([e77d244](https://github.com/codesandbox/browser-node-emulator/commit/e77d244ce2d9ca45ff6a28d0b60dc51b3c512eb7)) ## [0.0.15](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.14...node-emulator-v0.0.15) (2022-10-28) ### Features * **shellProcess:** consume stdout ([#94](https://github.com/codesandbox/browser-node-emulator/issues/94)) ([7e5667e](https://github.com/codesandbox/browser-node-emulator/commit/7e5667ebaecf2afb968a1ceb6cf57a90df1a9575)) ## [0.0.14](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.13...node-emulator-v0.0.14) (2022-10-27) ### Bug Fixes * UI tweak on fallback page and improve conditional on FS module ([#102](https://github.com/codesandbox/browser-node-emulator/issues/102)) ([bdfb9cc](https://github.com/codesandbox/browser-node-emulator/commit/bdfb9cc7e89992017bf257133500261fbe7eb933)) ## [0.0.13](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.12...node-emulator-v0.0.13) (2022-10-27) ### Features * **public fs:** implement fs watch ([#90](https://github.com/codesandbox/browser-node-emulator/issues/90)) ([fe9b0b6](https://github.com/codesandbox/browser-node-emulator/commit/fe9b0b68ef61532483a326e3d3ea0b9e565bc273)) ## [0.0.12](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.11...node-emulator-v0.0.12) (2022-10-25) ### Features * **fs:** FSWatcher ([#75](https://github.com/codesandbox/browser-node-emulator/issues/75)) ([b378b76](https://github.com/codesandbox/browser-node-emulator/commit/b378b763e85ec24b117a3ac962ee22ef39f22738)) ### Bug Fixes * **ShellProcess:** drop restart ([#88](https://github.com/codesandbox/browser-node-emulator/issues/88)) ([5371e4b](https://github.com/codesandbox/browser-node-emulator/commit/5371e4b681c4806112873e1c58a9fafea418ddb6)) * **shellprocess:** reassign internal state to running after restart ([#77](https://github.com/codesandbox/browser-node-emulator/issues/77)) ([13ae624](https://github.com/codesandbox/browser-node-emulator/commit/13ae6242aded1e8896256bb6a78edeb764aecf81)) ## [0.0.11](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.10...node-emulator-v0.0.11) (2022-10-21) ### Bug Fixes * **shellprocess:** returning id on restart ([#78](https://github.com/codesandbox/browser-node-emulator/issues/78)) ([23f1230](https://github.com/codesandbox/browser-node-emulator/commit/23f1230c33b8c84911eede9d03d3b9e9bb2ac62f)) ## [0.0.10](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.9...node-emulator-v0.0.10) (2022-10-20) ### Features * **shell:** ShellProcess interface ([#72](https://github.com/codesandbox/browser-node-emulator/issues/72)) ([cdc0cf7](https://github.com/codesandbox/browser-node-emulator/commit/cdc0cf759f016ac5c923bb957caefd555ccaafab)) ## [0.0.9](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.8...node-emulator-v0.0.9) (2022-10-18) ### Features * **fs:** read / write files ([#60](https://github.com/codesandbox/browser-node-emulator/issues/60)) ([05c032d](https://github.com/codesandbox/browser-node-emulator/commit/05c032dbe33916faa563a858c67e464c9b03a9f6)) * **shell:** Allow custom commands ([#61](https://github.com/codesandbox/browser-node-emulator/issues/61)) ([c90890d](https://github.com/codesandbox/browser-node-emulator/commit/c90890db2e0f1c143221772ab76eacb3cafbe23f)) ## [0.0.8](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.7...node-emulator-v0.0.8) (2022-10-17) ### Bug Fixes * **NodeEmulator.ts:** export FilesMap type to consumer ([#57](https://github.com/codesandbox/browser-node-emulator/issues/57)) ([d676be5](https://github.com/codesandbox/browser-node-emulator/commit/d676be50f20f6d88bd7bbd6fa9edf3047e5fa8f2)) ## [0.0.7](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.6...node-emulator-v0.0.7) (2022-10-14) ### Bug Fixes * **preview:** remove conditional over listener ([#53](https://github.com/codesandbox/browser-node-emulator/issues/53)) ([5c6e8c0](https://github.com/codesandbox/browser-node-emulator/commit/5c6e8c0a0600a3b408f734a17b13a8f37ef8e09d)) ## [0.0.6](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.5...node-emulator-v0.0.6) (2022-10-14) ### Bug Fixes * **node-emulator:** trigger a new publish ([4b42c8f](https://github.com/codesandbox/browser-node-emulator/commit/4b42c8f43c8dea0491b48af067b07eb74922848f)) ## [0.0.5](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.4...node-emulator-v0.0.5) (2022-10-14) ### Features * **node emulator:** preview interface ([#41](https://github.com/codesandbox/browser-node-emulator/issues/41)) ([e7e66bb](https://github.com/codesandbox/browser-node-emulator/commit/e7e66bbaced7cf5eb20d14b58816e11737f9c3ed)) ## [0.0.4](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.3...node-emulator-v0.0.4) (2022-10-11) ### Bug Fixes * **node-emulator:** set build target to es2020 ([#38](https://github.com/codesandbox/browser-node-emulator/issues/38)) ([5ff50fc](https://github.com/codesandbox/browser-node-emulator/commit/5ff50fca586101b6270f5f587900a031466c024a)) ## [0.0.3](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.2...node-emulator-v0.0.3) (2022-10-11) ### Bug Fixes * **node-emulator:** trigger a new publish ([baef111](https://github.com/codesandbox/browser-node-emulator/commit/baef111bc1bd3bd34b5ff82fbeaa0a141372c417)) ## [0.0.2](https://github.com/codesandbox/browser-node-emulator/compare/node-emulator-v0.0.1...node-emulator-v0.0.2) (2022-10-10) ### Bug Fixes * remove handshake timeout log ([49413a6](https://github.com/codesandbox/browser-node-emulator/commit/49413a6dde5d8300e626298553fb09a9ce32cf4c)) ================================================ FILE: packages/nodebox/LICENSE ================================================ Sustainable Use License Version 1.0 Acceptance By using the software, you agree to all of the terms and conditions below. Copyright License The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations below. Limitations You may use or modify the software only for your own internal business purposes or for non-commercial or personal use. You may distribute the software or provide it to others only if you do so free of charge for non-commercial purposes. You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor's trademarks is subject to applicable law. Patents The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company. Notices You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms. If you modify the software, you must include in any modified copies of the software a prominent notice stating that you have modified the software. No Other Rights These terms do not imply any licenses other than those expressly granted in these terms. Termination If you use the software in violation of these terms, such use is not licensed, and your license will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your license will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your license to terminate automatically and permanently. No Liability As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim. Definitions The "licensor" is CodeSandBox B.V. The "software" is the software the licensor makes available under these terms, including any portion of it. "You" refers to the individual or entity agreeing to these terms. "Your company" is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. Control means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect. "Your license" is the license granted to you for the software under these terms. "Use" means anything you do with the software requiring your license. "Trademark" means trademarks, service marks, and similar rights. ================================================ FILE: packages/nodebox/README.md ================================================ # Nodebox Nodebox is a runtime for executing Node.js modules in the browser. ## Why we built Nodebox With `sandpack-bundler`, we allowed any developer anywhere to instantly create a fast, local, shareable playground inside their browser, without having to wait forever to install dependencies and fight with devtools. This improves the learning, experimentation and sharing experience of client-side JavaScript code. However, server-side JavaScript remained a challenge. At CodeSandbox we have solved this by using [Firecracker VMs](https://codesandbox.io/blog/how-we-clone-a-running-vm-in-2-seconds), allowing us to bring your entire development environment to the cloud regardless of the programming language or tooling you might be using. Unfortunately, as VMs live in the cloud, they require infrastructure and a network connection, resulting in a higher cost compared to our client-side sandboxes. To solve this problem, we built Nodebox, a runtime that runs entirely in the browser, eliminating the need for a network connection and infrastructure. Nodebox gives you the same user experience you have come to expect from Sandpack, which means a near-instant server-side JavaScript environment at the click of a button—built for experimentation, examples and documentation. ## The differences between a VM and Nodebox As mentioned in the previous section, we solved server-side sandboxes in CodeSandbox by using Firecracker VMs. In this section, we'll explain the advantages and disadvantages of each approach. ### Advantages of VMs over Nodebox - You get dedicated resources, with no resource limits enforced by the browser - You have an entire Unix OS available - You can run any language, database, command - You can use network sockets - You can run large and complex projects - A perfect 1:1 environment as compared to your local setup (at least, if you're using a Unix-based system) - No emulation, so Node.js would run exactly the same way as locally ### Advantages of Nodebox - No need for any infrastructure - No need for a network connection - Instant feedback to any change - Easy to get started - Easy and instant reset - simply refresh the page/iframe - Every page visitor gets their own Nodebox instance automatically ## What makes it different Nodebox is currently the only cross-browser Node.js runtime supporting all the latest browsers: - Chrome; - Firefox; - Safari \* > - Support for iOS Safari is in beta Nodebox does not emulate Node.js but is, instead, a Node.js-compatible runtime. This means that it implements as much of the Node.js API as possible while keeping a minimal performance imprint, using browser API where applicable and, in some cases, leaving out certain parts of Node.js due to browser [limitations](#Limitations) or complexity. Nodebox uses an internal dependency manager that is fine-tuned to deliver optimal initial load time by utilizing dependency caching via [Sandpack CDN](https://github.com/codesandbox/sandpack-cdn). That CDN is an open-source Rust package manager that runs in the cloud and can be self-hosted pretty easily as well. While there are alternatives to Nodebox, they are closer to mimicking a container-based environment, running commands step-by-step, or even the entire Linux distributive in your browser. That makes them slower and harder to use compared to Nodebox, which is optimized to run sandboxes fast and with as little friction as possible. ## Limitations Unfortunately, any type of runtime that does not have access to operating system-level APIs will come with certain limitations. For Nodebox, those are the following: - N-API modules - net#Sockets pointing to external IPs - Synchronous exec/spawn - async_hooks (planned for implementation) - Automatic process exiting - users now need to manually call `process.exit` before the process is exited (planned for implementation) As we implement every module manually one by one, it is possible that some will not behave correctly. If this happens, feel free to open an issue here on GitHub and we'll make sure to fix it. ## Documentation - [**Getting started**](#getting-started) - [API documentation](https://github.com/codesandbox/nodebox-runtime/blob/main/packages/nodebox/api.md) --- ## Getting started Nodebox is meant for usage in your client-side applications, granting them the capability of running actual Node.js code directly in the browser. Here are a couple of examples of when Nodebox can be used: - Building interactive examples for server-side code in your documentation; - Showcasing a UI component library in the actual framework it's built for; - Generally any evaluation of Node.js code and previewing it in the browser. In the context of this tutorial, we will be working on a documentation website that illustrates different examples of using a Next.js application. Bear in mind that our documentation itself can be written in any framework of our choosing. ### Install Nodebox can be installed from NPM just like any other dependency: ```sh npm install @codesandbox/nodebox ``` ### Setup Nodebox consists of two main parts: - A runtime environment evaluating the code; - A preview environment serving the result of the evaluation. Corresponding to these two parts, let's create two iframes in our application: ```html ``` Although the runtime environment can be self-hosted, we will use the default one pointing to the deployed Nodebox instance on CodeSandbox servers. We do need, however, to specify an `iframe` reference in our application where Nodebox should render its preview. ```js import { Nodebox } from '@codesandbox/nodebox'; const runtime = new Nodebox({ // Provide a reference to the ================================================ FILE: tests/tsconfig.json ================================================ { "extends": "../tsconfig", "compilerOptions": { "target": "esnext", "noEmit": true, "baseUrl": "../", "paths": { "tests": ["./tests"], "@codesandbox/nodebox": ["./packages/nodebox/src"] } }, "include": ["**/*"] } ================================================ FILE: tsconfig.json ================================================ { "compilerOptions": { "strict": true, "noImplicitAny": true, "allowSyntheticDefaultImports": true, "moduleResolution": "node", "esModuleInterop": true, "inlineSourceMap": true, "useUnknownInCatchVariables": false, "resolveJsonModule": true }, "exclude": ["node_modules", "build"] } ================================================ FILE: turbo.json ================================================ { "$schema": "https://turborepo.org/schema.json", "pipeline": { "build": { "dependsOn": ["^build"], "outputs": ["build/**"] }, "test:unit": { "dependsOn": [], "outputs": [] } } } ================================================ FILE: vercel.json ================================================ { "headers": [ { "source": "/(.*).(js|map|wasm)", "headers": [ { "key": "Cache-Control", "value": "public,max-age=31536000,immutable" } ] }, { "source": "/(.*)", "headers": [ { "key": "Cross-Origin-Resource-Policy", "value": "cross-origin" } ] } ] }