@stlite/desktop 0.49.1 → 0.49.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stlite/desktop",
3
- "version": "0.49.1",
3
+ "version": "0.49.3",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "/",
6
6
  "main": "./build/electron/main.js",
@@ -18,13 +18,13 @@
18
18
  "build:web": "craco build && rimraf 'build/**/*.whl' && rimraf 'build/pypi'",
19
19
  "test": "craco test",
20
20
  "eject": "craco eject",
21
- "start:electron": "tsc -p electron -w",
22
- "build:electron": "tsc -p electron",
21
+ "start:electron": "tsc -p electron && cross-env NODE_ENV=development concurrently \"./scripts/build_electron.js --watch\" \"electron .\"",
22
+ "build:electron": "tsc -p electron && cross-env NODE_ENV=production ./scripts/build_electron.js",
23
23
  "build:pyodide": "curl -L https://github.com/pyodide/pyodide/releases/download/0.25.0/pyodide-core-0.25.0.tar.bz2 | tar xj -C ./build --files-from=./pyodide-files.txt",
24
- "build:bin": "./scripts/build_bin.js",
24
+ "build:bin": "tsc -p bin-src && ./scripts/build_bin.js",
25
25
  "build:wheels": "./scripts/copy_wheels.js",
26
26
  "typecheck": "yarn tsc --noEmit -p electron",
27
- "start": "concurrently \"cross-env BROWSER=none yarn start:web\" \"wait-on http://localhost:3000 && yarn start:electron\" \"wait-on http://localhost:3000 && tsc -p electron && cross-env NODE_ENV=\"development\" electron .\"",
27
+ "start": "concurrently \"cross-env BROWSER=none yarn start:web\" \"wait-on http://localhost:3000 && yarn start:electron\"",
28
28
  "build:app": "yarn build:web && yarn build:electron && yarn build:pyodide",
29
29
  "build": "yarn build:app && yarn build:wheels && yarn build:bin",
30
30
  "dump:dev": "ts-node ./bin-src/dump_artifacts/index.ts",
@@ -60,9 +60,9 @@
60
60
  },
61
61
  "devDependencies": {
62
62
  "@craco/craco": "^7.0.0",
63
- "@stlite/common": "^0.49.1",
64
- "@stlite/common-react": "^0.49.1",
65
- "@stlite/kernel": "^0.49.1",
63
+ "@stlite/common": "^0.49.3",
64
+ "@stlite/common-react": "^0.49.3",
65
+ "@stlite/kernel": "^0.49.3",
66
66
  "@streamlit/app": "1.32.2",
67
67
  "@testing-library/react": "^14.1.2",
68
68
  "@testing-library/user-event": "^14.0.0",
@@ -1,38 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.walkRead = void 0;
4
- const fsPromises = require("fs/promises");
5
- const path = require("path");
6
- /**
7
- * Returns an object whose keys are absolute paths of the files and values are the file contents.
8
- * Note that the paths are OS-specific, "/" for POSIX and "\" for Windows,
9
- * so this function is only expected to be called from `walkRead()` that converts the paths to be POSIX.
10
- */
11
- async function walkReadAbsPath(dirPath) {
12
- const fileContents = {};
13
- const childNames = await fsPromises.readdir(dirPath);
14
- await Promise.all(childNames.map(async (childName) => {
15
- const childPath = path.join(dirPath, childName);
16
- const stat = await fsPromises.stat(childPath);
17
- if (stat.isDirectory()) {
18
- const childFileContents = await walkReadAbsPath(childPath);
19
- Object.assign(fileContents, childFileContents);
20
- }
21
- else {
22
- const fileBin = await fsPromises.readFile(childPath);
23
- fileContents[childPath] = fileBin;
24
- }
25
- }));
26
- return fileContents;
27
- }
28
- async function walkRead(dirPath) {
29
- const fileContents = await walkReadAbsPath(dirPath);
30
- const relPathFileContents = {};
31
- Object.keys(fileContents).forEach((absPath) => {
32
- const relPath = path.relative(dirPath, absPath);
33
- const posixRelPath = relPath.split(path.sep).join(path.posix.sep); // Convert the path separators on Windows to POSIX ones.
34
- relPathFileContents[posixRelPath] = fileContents[absPath];
35
- });
36
- return relPathFileContents;
37
- }
38
- exports.walkRead = walkRead;