@stlite/desktop 0.19.1 → 0.20.0
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/bin/dump_artifacts.js +1 -1
- package/build/asset-manifest.json +4 -4
- package/build/index.html +1 -1
- package/build/static/js/{main.3f15f5c7.chunk.js → main.d0b308e0.chunk.js} +3 -3
- package/build/static/js/{main.3f15f5c7.chunk.js.LICENSE.txt → main.d0b308e0.chunk.js.LICENSE.txt} +0 -0
- package/build/static/js/{main.3f15f5c7.chunk.js.map → main.d0b308e0.chunk.js.map} +1 -1
- package/package.json +3 -3
package/bin/dump_artifacts.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
var D=Object.create;var m=Object.defineProperty;var T=Object.getOwnPropertyDescriptor;var S=Object.getOwnPropertyNames;var O=Object.getPrototypeOf,q=Object.prototype.hasOwnProperty;var f=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var P=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of S(t))!q.call(e,o)&&o!==r&&m(e,o,{get:()=>t[o],enumerable:!(i=T(t,o))||i.enumerable});return e};var s=(e,t,r)=>(r=e!=null?D(O(e)):{},P(t||!e||!e.__esModule?m(r,"default",{value:e,enumerable:!0}):r,e));var h=f(d=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0});d.parseRequirementsTxt=void 0;function $(e){return e.split(`
|
|
3
|
-
`).filter(t=>!t.startsWith("#")).map(t=>t.trim()).filter(t=>t!=="")}d.parseRequirementsTxt=$});var g=f(c=>{"use strict";var j=c&&c.__createBinding||(Object.create?function(e,t,r,i){i===void 0&&(i=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,o)}:function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]}),x=c&&c.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&j(t,e,r)};Object.defineProperty(c,"__esModule",{value:!0});x(h(),c)});var w=s(require("yargs")),v=require("yargs/helpers"),a=s(require("path")),n=s(require("fs/promises")),y=s(require("fs-extra")),b=s(require("node-fetch")),_=require("pyodide"),k=s(g());global.fetch=b.default;async function C(e){console.info("Copy the build directory (the bare built app files) to this directory...");let t=a.default.resolve(__dirname,"../build");if(!(await n.default.stat(t)).isDirectory())throw new Error(`The source ${t} does not exist.`);if(t===e.copyTo){console.warn(`sourceDir == destDir (${t}). Are you in the development environment? Skip copying the directory.`);return}if(e.keepOld)try{await n.default.access(e.copyTo),console.info(`${e.copyTo} already exists. Use it and skip copying.`);return}catch{throw new Error(`${e.copyTo} does not exist even though the \`keepOld\` option is specified`)}console.log(`Copy ${t} to ${e.copyTo}`),await n.default.rm(e.copyTo,{recursive:!0,force:!0}),await y.default.copy(t,e.copyTo)}async function u(e,t){console.log(`Install the local wheel ${t}`);let r=await n.default.readFile(t),i="/tmp/"+a.default.basename(t);e.FS.writeFile(i,r);let o=e.pyimport("micropip"),l=`emfs:${i}`;console.log(`Install ${l}`),await o.install.callKwargs(l,{keep_going:!0})}async function K(e){console.info("Create the site-packages snapshot file...");let t=await(0,_.loadPyodide)();if(await t.loadPackage(["micropip"]),e.useLocalKernelWheels){let l=a.default.dirname(require.resolve("@stlite/kernel")),p=a.default.resolve(l,"../py");await u(t,a.default.join(p,"tornado/dist/tornado-6.2-py3-none-any.whl")),await u(t,a.default.join(p,"stlite-pyarrow/dist/stlite_pyarrow-0.1.0-py3-none-any.whl")),await u(t,a.default.join(p,"streamlit/lib/dist/streamlit-1.13.0-py2.py3-none-any.whl"))}else{let l=t.pyimport("micropip"),p=["https://cdn.jsdelivr.net/npm/@stlite/kernel@0.
|
|
3
|
+
`).filter(t=>!t.startsWith("#")).map(t=>t.trim()).filter(t=>t!=="")}d.parseRequirementsTxt=$});var g=f(c=>{"use strict";var j=c&&c.__createBinding||(Object.create?function(e,t,r,i){i===void 0&&(i=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,i,o)}:function(e,t,r,i){i===void 0&&(i=r),e[i]=t[r]}),x=c&&c.__exportStar||function(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&j(t,e,r)};Object.defineProperty(c,"__esModule",{value:!0});x(h(),c)});var w=s(require("yargs")),v=require("yargs/helpers"),a=s(require("path")),n=s(require("fs/promises")),y=s(require("fs-extra")),b=s(require("node-fetch")),_=require("pyodide"),k=s(g());global.fetch=b.default;async function C(e){console.info("Copy the build directory (the bare built app files) to this directory...");let t=a.default.resolve(__dirname,"../build");if(!(await n.default.stat(t)).isDirectory())throw new Error(`The source ${t} does not exist.`);if(t===e.copyTo){console.warn(`sourceDir == destDir (${t}). Are you in the development environment? Skip copying the directory.`);return}if(e.keepOld)try{await n.default.access(e.copyTo),console.info(`${e.copyTo} already exists. Use it and skip copying.`);return}catch{throw new Error(`${e.copyTo} does not exist even though the \`keepOld\` option is specified`)}console.log(`Copy ${t} to ${e.copyTo}`),await n.default.rm(e.copyTo,{recursive:!0,force:!0}),await y.default.copy(t,e.copyTo)}async function u(e,t){console.log(`Install the local wheel ${t}`);let r=await n.default.readFile(t),i="/tmp/"+a.default.basename(t);e.FS.writeFile(i,r);let o=e.pyimport("micropip"),l=`emfs:${i}`;console.log(`Install ${l}`),await o.install.callKwargs(l,{keep_going:!0})}async function K(e){console.info("Create the site-packages snapshot file...");let t=await(0,_.loadPyodide)();if(await t.loadPackage(["micropip"]),e.useLocalKernelWheels){let l=a.default.dirname(require.resolve("@stlite/kernel")),p=a.default.resolve(l,"../py");await u(t,a.default.join(p,"tornado/dist/tornado-6.2-py3-none-any.whl")),await u(t,a.default.join(p,"stlite-pyarrow/dist/stlite_pyarrow-0.1.0-py3-none-any.whl")),await u(t,a.default.join(p,"streamlit/lib/dist/streamlit-1.13.0-py2.py3-none-any.whl"))}else{let l=t.pyimport("micropip"),p=["https://cdn.jsdelivr.net/npm/@stlite/kernel@0.19.1/py/tornado/dist/tornado-6.2-py3-none-any.whl","https://cdn.jsdelivr.net/npm/@stlite/kernel@0.19.1/py/stlite-pyarrow/dist/stlite_pyarrow-0.1.0-py3-none-any.whl","https://cdn.jsdelivr.net/npm/@stlite/kernel@0.19.1/py/streamlit/lib/dist/streamlit-1.13.0-py2.py3-none-any.whl"];console.log("Install",p),await l.install.callKwargs(p,{keep_going:!0})}console.log(`Install the requirements ${JSON.stringify(e.requirements)}`),await t.pyimport("micropip").install.callKwargs(e.requirements,{keep_going:!0}),console.log("Archive the site-packages director(y|ies)");let i="/tmp/site-packages-snapshot.tar.gz";await t.runPythonAsync(`
|
|
4
4
|
import tarfile
|
|
5
5
|
import site
|
|
6
6
|
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"static/js/3.82223a8f.chunk.js": "/static/js/3.82223a8f.chunk.js",
|
|
10
10
|
"static/js/3.82223a8f.chunk.js.map": "/static/js/3.82223a8f.chunk.js.map",
|
|
11
11
|
"main.css": "/static/css/main.c32b24ed.chunk.css",
|
|
12
|
-
"main.js": "/static/js/main.
|
|
13
|
-
"main.js.map": "/static/js/main.
|
|
12
|
+
"main.js": "/static/js/main.d0b308e0.chunk.js",
|
|
13
|
+
"main.js.map": "/static/js/main.d0b308e0.chunk.js.map",
|
|
14
14
|
"runtime-main.js": "/static/js/runtime-main.a2d5419b.js",
|
|
15
15
|
"runtime-main.js.map": "/static/js/runtime-main.a2d5419b.js.map",
|
|
16
16
|
"static/css/6.f98a571e.chunk.css": "/static/css/6.f98a571e.chunk.css",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"static/js/6.cfeb0558.chunk.js.LICENSE.txt": "/static/js/6.cfeb0558.chunk.js.LICENSE.txt",
|
|
146
146
|
"static/js/7.e179a232.chunk.js.LICENSE.txt": "/static/js/7.e179a232.chunk.js.LICENSE.txt",
|
|
147
147
|
"static/js/8.89ddb52f.chunk.js.LICENSE.txt": "/static/js/8.89ddb52f.chunk.js.LICENSE.txt",
|
|
148
|
-
"static/js/main.
|
|
148
|
+
"static/js/main.d0b308e0.chunk.js.LICENSE.txt": "/static/js/main.d0b308e0.chunk.js.LICENSE.txt",
|
|
149
149
|
"static/media/katex.min.css": "/static/media/KaTeX_Typewriter-Regular.c5c02d76.ttf",
|
|
150
150
|
"static/media/theme.scss": "/static/media/SourceSerifPro-SemiBoldItalic.1266f2c1.ttf",
|
|
151
151
|
"static/media/balloon-0.0e6e96ec.png": "/static/media/balloon-0.0e6e96ec.png",
|
|
@@ -164,6 +164,6 @@
|
|
|
164
164
|
"static/css/6.f98a571e.chunk.css",
|
|
165
165
|
"static/js/6.cfeb0558.chunk.js",
|
|
166
166
|
"static/css/main.c32b24ed.chunk.css",
|
|
167
|
-
"static/js/main.
|
|
167
|
+
"static/js/main.d0b308e0.chunk.js"
|
|
168
168
|
]
|
|
169
169
|
}
|
package/build/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>stlite</title><meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'wasm-unsafe-eval' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; worker-src blob:; script-src-elem 'self' 'unsafe-inline' https:; style-src-elem 'self' 'unsafe-inline' https:; font-src 'self' data: https:; connect-src https://data.streamlit.io/ https://*.mapbox.com/ 'self' https:; img-src https: blob: data: file:; media-src https: blob:; frame-src https:"><link href="/static/css/6.f98a571e.chunk.css" rel="stylesheet"><link href="/static/css/main.c32b24ed.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="/static/js/runtime-main.a2d5419b.js"></script><script src="/static/js/6.cfeb0558.chunk.js"></script><script src="/static/js/main.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>stlite</title><meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'wasm-unsafe-eval' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; worker-src blob:; script-src-elem 'self' 'unsafe-inline' https:; style-src-elem 'self' 'unsafe-inline' https:; font-src 'self' data: https:; connect-src https://data.streamlit.io/ https://*.mapbox.com/ 'self' https:; img-src https: blob: data: file:; media-src https: blob:; frame-src https:"><link href="/static/css/6.f98a571e.chunk.css" rel="stylesheet"><link href="/static/css/main.c32b24ed.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script src="/static/js/runtime-main.a2d5419b.js"></script><script src="/static/js/6.cfeb0558.chunk.js"></script><script src="/static/js/main.d0b308e0.chunk.js"></script></body></html>
|