pxt-core 8.6.4 → 8.6.6

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 CHANGED
@@ -1861,6 +1861,11 @@ function buildReactAppAsync(app, parsed, opts) {
1861
1861
  else {
1862
1862
  nodeutil.cp("built/target.js", `${appRoot}/public/blb`);
1863
1863
  }
1864
+ // This will be missing when serving without a cloned / linked repo
1865
+ if (opts.includePdfLib
1866
+ && fs.existsSync("node_modules/pxt-core/webapp/public/pdf-lib/pdf-lib.min.js")) {
1867
+ nodeutil.cp("node_modules/pxt-core/webapp/public/pdf-lib/pdf-lib.min.js", `${appRoot}/public/blb/pdf-lib`);
1868
+ }
1864
1869
  nodeutil.cp("targetconfig.json", `${appRoot}/public/blb`);
1865
1870
  nodeutil.cp("node_modules/pxt-core/built/pxtlib.js", `${appRoot}/public/blb`);
1866
1871
  if (opts.includePxtSim) {
@@ -1889,7 +1894,10 @@ function buildReactAppAsync(app, parsed, opts) {
1889
1894
  });
1890
1895
  }
1891
1896
  function buildSkillMapAsync(parsed) {
1892
- return buildReactAppAsync("skillmap", parsed);
1897
+ return buildReactAppAsync("skillmap", parsed, {
1898
+ includePdfLib: true,
1899
+ copyAssets: true
1900
+ });
1893
1901
  }
1894
1902
  function buildAuthcodeAsync(parsed) {
1895
1903
  return buildReactAppAsync("authcode", parsed, { copyAssets: false });
@@ -4127,10 +4135,11 @@ async function testSnippetsAsync(snippets, re, pyStrictSyntaxCheck) {
4127
4135
  }
4128
4136
  function setBuildEngine() {
4129
4137
  const cs = pxt.appTarget.compileService;
4130
- if (cs && cs.buildEngine) {
4131
- build.setThisBuild(build.buildEngines[cs.buildEngine]);
4138
+ if (cs) {
4139
+ const engine = cs.buildEngine || "yotta";
4140
+ build.setThisBuild(build.buildEngines[engine]);
4132
4141
  if (!build.thisBuild)
4133
- U.userError("cannot find build engine: " + cs.buildEngine);
4142
+ U.userError("cannot find build engine: " + engine);
4134
4143
  }
4135
4144
  }
4136
4145
  function prepBuildOptionsAsync(mode, quick = false, ignoreTests = false) {