fix(core): update
This commit is contained in:
parent
321ce99338
commit
c021a84788
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@design.estate/dees-catalog',
|
name: '@design.estate/dees-catalog',
|
||||||
version: '1.0.275',
|
version: '1.0.276',
|
||||||
description: 'website for lossless.com'
|
description: 'website for lossless.com'
|
||||||
}
|
}
|
||||||
|
@ -39,10 +39,6 @@ export class DeesSimpleAppDash extends DeesElement {
|
|||||||
@property()
|
@property()
|
||||||
public viewTabs: IView[] = [];
|
public viewTabs: IView[] = [];
|
||||||
|
|
||||||
@property()
|
|
||||||
public views: Array<{ name: string; icon: string; viewFunction: () => Promise<TemplateResult> }> =
|
|
||||||
[];
|
|
||||||
|
|
||||||
public static styles = [
|
public static styles = [
|
||||||
cssManager.defaultStyles,
|
cssManager.defaultStyles,
|
||||||
css`
|
css`
|
||||||
|
@ -27,6 +27,9 @@ export class DeesTerminal extends DeesElement {
|
|||||||
// INSTANCE
|
// INSTANCE
|
||||||
private resizeObserver: ResizeObserver;
|
private resizeObserver: ResizeObserver;
|
||||||
|
|
||||||
|
@property()
|
||||||
|
public setupCommand = `pnpm install @git.zone/tsbuild && clear && echo 'welcome'`;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.resizeObserver = new ResizeObserver((entries) => {
|
this.resizeObserver = new ResizeObserver((entries) => {
|
||||||
@ -278,8 +281,9 @@ export class DeesTerminal extends DeesElement {
|
|||||||
term.onData((data) => {
|
term.onData((data) => {
|
||||||
input.write(data);
|
input.write(data);
|
||||||
});
|
});
|
||||||
await domtools.convenience.smartdelay.delayFor(5000);
|
await this.waitForPrompt(term, '~/');
|
||||||
input.write(`pnpm add isomorphic-git @git.zone/tsbuild\n`);
|
input.write(this.setupCommand);
|
||||||
|
input.write(`\n`);
|
||||||
}
|
}
|
||||||
|
|
||||||
async connectedCallback(): Promise<void> {
|
async connectedCallback(): Promise<void> {
|
||||||
@ -295,4 +299,22 @@ export class DeesTerminal extends DeesElement {
|
|||||||
handleResize() {
|
handleResize() {
|
||||||
this.fitAddon.fit();
|
this.fitAddon.fit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async waitForPrompt(term: Terminal, prompt: string): Promise<void> {
|
||||||
|
return new Promise<void>((resolve) => {
|
||||||
|
const checkPrompt = () => {
|
||||||
|
const lines = term.buffer.active;
|
||||||
|
for (let i = 0; i < lines.length; i++) {
|
||||||
|
const line = lines.getLine(i);
|
||||||
|
if (line && line.translateToString().includes(prompt)) {
|
||||||
|
resolve();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setTimeout(checkPrompt, 100); // check every 100 ms
|
||||||
|
};
|
||||||
|
|
||||||
|
checkPrompt();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user