Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

makecode

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

makecode - npm Package Compare versions

Comparing version 0.24.0 to 0.25.0

39

built/cli.js

@@ -186,2 +186,6 @@ "use strict";

}
if (opts.serveBinaries) {
const port = parseInt(opts.binariesPort) || 7001;
startBuiltServer(port);
}
if (opts.watch) {

@@ -197,2 +201,24 @@ startWatch(opts);

}
function startBuiltServer(port) {
const handler = require('serve-handler');
const http = require('http');
const server = http.createServer((request, response) => {
return handler(request, response, {
public: "./built/",
cleanUrls: true,
headers: [
{
"source": "**/*.@(hex|uf2)",
"headers": [{
"key": "Content-Disposition",
"value": "attachment"
}]
}
]
});
});
server.listen(port, () => {
info(`start serving binaries at http://localhost:${port}`);
});
}
function startWatch(opts) {

@@ -435,2 +461,11 @@ const watcher = (0, node_watch_1.default)('./', {

}
const prettierrc = ".prettierrc";
if (!fs.existsSync(prettierrc)) {
msg(`saving ${prettierrc}`);
fs.writeFileSync(prettierrc, JSON.stringify({
"arrowParens": "avoid",
"semi": false,
"tabWidth": 4
}));
}
opts.pxtModules = true;

@@ -652,2 +687,4 @@ const prj = yield resolveProject(opts);

.option("-r, --mono-repo", "also build all subfolders with 'pxt.json' in them")
.option("-sb, --serve-binaries", "serve built binary folder to allow easy download in codespaces")
.option("-bp, --binaries-port <number>", "port to listen at, default to 7001")
.option("--always-built", "always generate files in built/ folder (and not built/hw-variant/)")

@@ -658,3 +695,3 @@ .action(buildCommand);

.option("--no-watch", "do not watch source files")
.option("-p, --port <number>", "port to listen at")
.option("-p, --port <number>", "port to listen at, default to 7000")
.option("-u, --update", "check for web-app updates")

@@ -661,0 +698,0 @@ .option("-c, --config-path <file>", "set configuration file path (default: \"mkc.json\")")

7

package.json
{
"name": "makecode",
"version": "0.24.0",
"version": "0.25.0",
"description": "MakeCode (PXT) - web-cached build tool",

@@ -45,4 +45,4 @@ "keywords": [

"@semantic-release/release-notes-generator": "^10.0.2",
"@types/glob": "^7.1.4",
"@types/node": "^16.10.3",
"@types/glob": "^7.1.4",
"semantic-release": "^18.0.0",

@@ -56,3 +56,4 @@ "typescript": "^4.4.3"

"node-fetch": "^2.0.0",
"node-watch": "^0.7.2"
"node-watch": "^0.7.2",
"serve-handler": "^6.1.3"
},

@@ -59,0 +60,0 @@ "release": {

@@ -85,2 +85,11 @@ # MKC - command line tool for MakeCode editors

### Serve built files in Codespaces
In codespaces, you can launch a local web server for the built folder so that you can retreive the built files using port forwarding.
Use `--serve-binaries`, or `-s` with `mkc build`. Defaults to http://localhost:7001
```
mkc -w -sb
```
### mkc serve

@@ -87,0 +96,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc