scenri 0.9.2 → 0.9.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/CHANGELOG.md +62 -0
- package/README.md +3 -1
- package/dist/{chunk-SDVL5OJF.js → chunk-3BGDI4HI.js} +54 -16
- package/dist/{chunk-OJAG3FRX.js → chunk-Y5L3KLX5.js} +98 -9
- package/dist/{cli-FYWM4HBN.js → cli-SX46UQO6.js} +15 -7
- package/dist/index.js +2 -2
- package/dist/install-VXJPLYWM.js +4 -0
- package/dist/offer-W6NJXMWT.js +71 -0
- package/dist/{refresh-FKQABJOC.js → refresh-5HBDLLLB.js} +3 -3
- package/dist/serve.js +2571 -621
- package/dist/{src-CSR34EBZ.js → src-F3KJZNZT.js} +3 -3
- package/package.json +1 -1
- package/studio-dist/assets/{index-DfAHZRYM.css → index-BGts89lc.css} +1 -1
- package/studio-dist/assets/index-eKmAemHO.js +104 -0
- package/studio-dist/index.html +2 -2
- package/dist/install-4W6AARK6.js +0 -4
- package/dist/offer-IVTNHIDJ.js +0 -47
- package/studio-dist/assets/index-CqJgKSNM.js +0 -104
package/studio-dist/index.html
CHANGED
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
<style>html,body,#root{height:100%;margin:0}html[data-theme=dark]{background:#0d0d0d}html[data-theme=light]{background:#ffffff}</style>
|
|
25
25
|
<!-- bt-theme is the pre-rename key. Read only: ThemeProvider owns the move. -->
|
|
26
26
|
<script>try{const t=localStorage.getItem('sc-theme')??localStorage.getItem('bt-theme');document.documentElement.dataset.theme=(t==='light'||t==='dark')?t:(matchMedia('(prefers-color-scheme: light)').matches?'light':'dark')}catch(_e){document.documentElement.dataset.theme='dark'}</script>
|
|
27
|
-
<script type="module" crossorigin src="/assets/index-
|
|
28
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
27
|
+
<script type="module" crossorigin src="/assets/index-eKmAemHO.js"></script>
|
|
28
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BGts89lc.css">
|
|
29
29
|
</head>
|
|
30
30
|
<body>
|
|
31
31
|
<div id="root"></div>
|
package/dist/install-4W6AARK6.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export { UNSUPPORTED, desktopStatus, installDesktop, removeDesktop, runningNodeMajor, stableExecPath, writeSupportFiles } from './chunk-SDVL5OJF.js';
|
|
2
|
-
import './chunk-2IGINCPU.js';
|
|
3
|
-
//# sourceMappingURL=install-4W6AARK6.js.map
|
|
4
|
-
//# sourceMappingURL=install-4W6AARK6.js.map
|
package/dist/offer-IVTNHIDJ.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { createInterface } from 'readline';
|
|
2
|
-
|
|
3
|
-
// src/desktop/offer.ts
|
|
4
|
-
function shouldOfferDesktop(i) {
|
|
5
|
-
if (i.env.SCENRI_NO_DESKTOP === "1") return false;
|
|
6
|
-
if (!i.stdinTTY || !i.stdoutTTY) return false;
|
|
7
|
-
if (i.env.CI) return false;
|
|
8
|
-
if (i.env.SSH_TTY) return false;
|
|
9
|
-
if (i.platform !== "darwin" && i.platform !== "win32") return false;
|
|
10
|
-
if (i.installKind === "dev") return false;
|
|
11
|
-
if (i.launcherInstalled) return false;
|
|
12
|
-
if (i.declined) return false;
|
|
13
|
-
return true;
|
|
14
|
-
}
|
|
15
|
-
var OFFER_QUESTION = " Add Scenri to your desktop? Then you can open it without a terminal. [Y/n] ";
|
|
16
|
-
async function offerDesktop(deps) {
|
|
17
|
-
let answer;
|
|
18
|
-
try {
|
|
19
|
-
answer = (await deps.ask(OFFER_QUESTION)).trim().toLowerCase();
|
|
20
|
-
} catch {
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
if (answer === "" || answer.startsWith("y")) {
|
|
24
|
-
await deps.add();
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
deps.decline();
|
|
28
|
-
deps.say(" Not now. Add it later with: npx scenri desktop, or from Settings > About.");
|
|
29
|
-
}
|
|
30
|
-
function askOnTerminal(question) {
|
|
31
|
-
return new Promise((resolve, reject) => {
|
|
32
|
-
const rl = createInterface({ input: process.stdin, output: process.stdout, terminal: false });
|
|
33
|
-
let done = false;
|
|
34
|
-
rl.question(question, (answer) => {
|
|
35
|
-
done = true;
|
|
36
|
-
rl.close();
|
|
37
|
-
resolve(answer);
|
|
38
|
-
});
|
|
39
|
-
rl.once("close", () => {
|
|
40
|
-
if (!done) reject(new Error("stdin closed"));
|
|
41
|
-
});
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export { OFFER_QUESTION, askOnTerminal, offerDesktop, shouldOfferDesktop };
|
|
46
|
-
//# sourceMappingURL=offer-IVTNHIDJ.js.map
|
|
47
|
-
//# sourceMappingURL=offer-IVTNHIDJ.js.map
|