pxt-core 10.1.3 → 10.1.4
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.
- package/built/cli.js +14 -3
- package/built/prepYotta.js +2 -2
- package/built/pxt.js +16 -3
- package/built/pxtlib.d.ts +1 -0
- package/built/pxtlib.js +2 -0
- package/built/target.js +1 -1
- package/built/tests/blocksrunner.js +48 -29
- package/built/tests/blockssetup.js +48 -29
- package/built/web/main.js +1 -1
- package/built/web/pxtapp.js +1 -1
- package/built/web/pxtasseteditor.js +1 -1
- package/built/web/pxtembed.js +1 -1
- package/built/web/pxtlib.js +1 -1
- package/built/web/pxtworker.js +1 -1
- package/built/web/runnerembed.js +1 -1
- package/built/web/teachertool/css/main.7ed51987.css +1 -0
- package/built/web/teachertool/js/{main.a8296247.js → main.a73ee823.js} +2 -2
- package/localtypings/pxteditor.d.ts +1 -0
- package/package.json +1 -1
- package/webapp/public/teachertool.html +1 -1
- package/built/web/teachertool/css/main.1dcea34b.css +0 -1
package/built/cli.js
CHANGED
|
@@ -2682,6 +2682,7 @@ class SnippetHost {
|
|
|
2682
2682
|
class Host {
|
|
2683
2683
|
constructor() {
|
|
2684
2684
|
this.fileOverrides = {};
|
|
2685
|
+
this.queue = new pxt.Util.PromiseQueue();
|
|
2685
2686
|
}
|
|
2686
2687
|
resolve(module, filename) {
|
|
2687
2688
|
//pxt.debug(`resolving ${module.level}:${module.id} -- ${filename} in ${path.resolve(".")}`)
|
|
@@ -2813,9 +2814,19 @@ class Host {
|
|
|
2813
2814
|
if (useCompileServiceDocker) {
|
|
2814
2815
|
return build.compileWithLocalCompileService(extInfo);
|
|
2815
2816
|
}
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
.
|
|
2817
|
+
return this.queue.enqueue("getHexInfoAsync", async () => {
|
|
2818
|
+
const prevVariant = pxt.appTargetVariant;
|
|
2819
|
+
if (extInfo.appVariant && extInfo.appVariant !== prevVariant) {
|
|
2820
|
+
pxt.setAppTargetVariant(extInfo.appVariant, { temporary: true });
|
|
2821
|
+
}
|
|
2822
|
+
setBuildEngine();
|
|
2823
|
+
await build.buildHexAsync(build.thisBuild, mainPkg, extInfo, forceBuild);
|
|
2824
|
+
const res = build.thisBuild.patchHexInfo(extInfo);
|
|
2825
|
+
if (extInfo.appVariant && extInfo.appVariant !== prevVariant) {
|
|
2826
|
+
pxt.setAppTargetVariant(prevVariant);
|
|
2827
|
+
}
|
|
2828
|
+
return res;
|
|
2829
|
+
});
|
|
2819
2830
|
}
|
|
2820
2831
|
cacheStoreAsync(id, val) {
|
|
2821
2832
|
mkHomeDirs();
|
package/built/prepYotta.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
const os = require("os");
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const fs = require("fs");
|
|
7
|
-
const token = process.env["
|
|
8
|
-
if (process.env["
|
|
7
|
+
const token = process.env["GITHUB_ACCESS_TOKEN"];
|
|
8
|
+
if (process.env["GITHUB_ACCESS_TOKEN"]) {
|
|
9
9
|
console.log("Writing .netrc and .yotta/config.json");
|
|
10
10
|
const home = os.homedir();
|
|
11
11
|
const yottaDir = path.join(home, ".yotta");
|
package/built/pxt.js
CHANGED
|
@@ -103853,6 +103853,7 @@ var pxt;
|
|
|
103853
103853
|
commands.notifyProjectCompiled = undefined;
|
|
103854
103854
|
commands.notifyProjectSaved = undefined;
|
|
103855
103855
|
commands.onDownloadButtonClick = undefined;
|
|
103856
|
+
commands.getDefaultProjectName = undefined;
|
|
103856
103857
|
})(commands = pxt.commands || (pxt.commands = {}));
|
|
103857
103858
|
})(pxt || (pxt = {}));
|
|
103858
103859
|
var pxt;
|
|
@@ -114013,6 +114014,7 @@ var pxt;
|
|
|
114013
114014
|
pxt.setAppTargetVariant(prevVariant, { temporary: true });
|
|
114014
114015
|
}
|
|
114015
114016
|
}
|
|
114017
|
+
einfo.appVariant = variant;
|
|
114016
114018
|
const inf = target.isNative ? await this.host().getHexInfoAsync(einfo) : null;
|
|
114017
114019
|
einfo = pxt.U.flatClone(einfo);
|
|
114018
114020
|
if (!target.keepCppFiles) {
|
|
@@ -163455,6 +163457,7 @@ class SnippetHost {
|
|
|
163455
163457
|
class Host {
|
|
163456
163458
|
constructor() {
|
|
163457
163459
|
this.fileOverrides = {};
|
|
163460
|
+
this.queue = new pxt.Util.PromiseQueue();
|
|
163458
163461
|
}
|
|
163459
163462
|
resolve(module, filename) {
|
|
163460
163463
|
//pxt.debug(`resolving ${module.level}:${module.id} -- ${filename} in ${path.resolve(".")}`)
|
|
@@ -163586,9 +163589,19 @@ class Host {
|
|
|
163586
163589
|
if (useCompileServiceDocker) {
|
|
163587
163590
|
return build.compileWithLocalCompileService(extInfo);
|
|
163588
163591
|
}
|
|
163589
|
-
|
|
163590
|
-
|
|
163591
|
-
.
|
|
163592
|
+
return this.queue.enqueue("getHexInfoAsync", async () => {
|
|
163593
|
+
const prevVariant = pxt.appTargetVariant;
|
|
163594
|
+
if (extInfo.appVariant && extInfo.appVariant !== prevVariant) {
|
|
163595
|
+
pxt.setAppTargetVariant(extInfo.appVariant, { temporary: true });
|
|
163596
|
+
}
|
|
163597
|
+
setBuildEngine();
|
|
163598
|
+
await build.buildHexAsync(build.thisBuild, mainPkg, extInfo, forceBuild);
|
|
163599
|
+
const res = build.thisBuild.patchHexInfo(extInfo);
|
|
163600
|
+
if (extInfo.appVariant && extInfo.appVariant !== prevVariant) {
|
|
163601
|
+
pxt.setAppTargetVariant(prevVariant);
|
|
163602
|
+
}
|
|
163603
|
+
return res;
|
|
163604
|
+
});
|
|
163592
163605
|
}
|
|
163593
163606
|
cacheStoreAsync(id, val) {
|
|
163594
163607
|
mkHomeDirs();
|
package/built/pxtlib.d.ts
CHANGED
|
@@ -975,6 +975,7 @@ declare namespace pxt.commands {
|
|
|
975
975
|
let notifyProjectCompiled: (headerId: string, compileResult: pxtc.CompileResult) => void;
|
|
976
976
|
let notifyProjectSaved: (header: pxt.workspace.Header) => void;
|
|
977
977
|
let onDownloadButtonClick: () => Promise<void>;
|
|
978
|
+
let getDefaultProjectName: () => string;
|
|
978
979
|
}
|
|
979
980
|
declare namespace pxt {
|
|
980
981
|
function getWhiteContrastingBackground(color: string): string;
|
package/built/pxtlib.js
CHANGED
|
@@ -6167,6 +6167,7 @@ var pxt;
|
|
|
6167
6167
|
commands.notifyProjectCompiled = undefined;
|
|
6168
6168
|
commands.notifyProjectSaved = undefined;
|
|
6169
6169
|
commands.onDownloadButtonClick = undefined;
|
|
6170
|
+
commands.getDefaultProjectName = undefined;
|
|
6170
6171
|
})(commands = pxt.commands || (pxt.commands = {}));
|
|
6171
6172
|
})(pxt || (pxt = {}));
|
|
6172
6173
|
var pxt;
|
|
@@ -16327,6 +16328,7 @@ var pxt;
|
|
|
16327
16328
|
pxt.setAppTargetVariant(prevVariant, { temporary: true });
|
|
16328
16329
|
}
|
|
16329
16330
|
}
|
|
16331
|
+
einfo.appVariant = variant;
|
|
16330
16332
|
const inf = target.isNative ? await this.host().getHexInfoAsync(einfo) : null;
|
|
16331
16333
|
einfo = pxt.U.flatClone(einfo);
|
|
16332
16334
|
if (!target.keepCppFiles) {
|