@gasboost/console 0.3.0 → 0.4.1
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/README.md +1 -1
- package/dist/appsScript/appsScriptOperations.d.ts +2 -1
- package/dist/appsScript/appsScriptOperations.d.ts.map +1 -1
- package/dist/appsScript/appsScriptOperations.js +6 -5
- package/dist/appsScript/appsScriptOperations.js.map +1 -1
- package/dist/development/developmentOperations.d.ts +18 -0
- package/dist/development/developmentOperations.d.ts.map +1 -0
- package/dist/development/developmentOperations.js +226 -0
- package/dist/development/developmentOperations.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/openBrowser.d.ts +2 -0
- package/dist/openBrowser.d.ts.map +1 -0
- package/dist/openBrowser.js +20 -0
- package/dist/openBrowser.js.map +1 -0
- package/dist/startGasboostConsole.d.ts.map +1 -1
- package/dist/startGasboostConsole.js +11 -1
- package/dist/startGasboostConsole.js.map +1 -1
- package/dist/ui/assets/index-B6Dn-OF9.css +1 -0
- package/dist/ui/assets/index-BGK5B9RA.js +6 -0
- package/dist/ui/gasboost-logo.png +0 -0
- package/dist/ui/index.html +23 -10
- package/package.json +3 -3
- package/dist/ui/assets/index-ClzuMWwT.css +0 -1
- package/dist/ui/assets/index-DSY49jCs.js +0 -6
package/README.md
CHANGED
|
@@ -11,10 +11,11 @@ export type AppsScriptStatus = {
|
|
|
11
11
|
readonly deploymentId?: string;
|
|
12
12
|
};
|
|
13
13
|
type AppsScriptOperation = OperationDefinition<any, unknown>;
|
|
14
|
-
export declare function createAppsScriptOperations({ projectRoot, config, clasp, }: {
|
|
14
|
+
export declare function createAppsScriptOperations({ projectRoot, config, clasp, browserOpener, }: {
|
|
15
15
|
readonly projectRoot: string;
|
|
16
16
|
readonly config?: GasboostAppsScriptConfig;
|
|
17
17
|
readonly clasp: ClaspRunner;
|
|
18
|
+
readonly browserOpener?: (url: string) => Promise<void>;
|
|
18
19
|
}): readonly AppsScriptOperation[];
|
|
19
20
|
export {};
|
|
20
21
|
//# sourceMappingURL=appsScriptOperations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appsScriptOperations.d.ts","sourceRoot":"","sources":["../../src/appsScript/appsScriptOperations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"appsScriptOperations.d.ts","sourceRoot":"","sources":["../../src/appsScript/appsScriptOperations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAKrE,OAAO,KAAK,EAAe,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEjE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,KAAK,mBAAmB,GAAG,mBAAmB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AA2B7D,wBAAgB,0BAA0B,CAAC,EACzC,WAAW,EACX,MAAM,EACN,KAAK,EACL,aAA2B,GAC5B,EAAE;IACD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,wBAAwB,CAAC;IAC3C,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD,GAAG,SAAS,mBAAmB,EAAE,CAiJjC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { EnvFileRepository } from "../env/EnvFileRepository.js";
|
|
3
|
+
import { openBrowser } from "../openBrowser.js";
|
|
3
4
|
import { AppsScriptProjectRepository } from "./AppsScriptProjectRepository.js";
|
|
4
5
|
const emptyInput = z.object({}).strict();
|
|
5
6
|
const createInput = z
|
|
@@ -25,7 +26,7 @@ const updateDeploymentInput = z
|
|
|
25
26
|
})
|
|
26
27
|
.strict();
|
|
27
28
|
const defaultAppsScriptConfig = { type: "webapp" };
|
|
28
|
-
export function createAppsScriptOperations({ projectRoot, config, clasp, }) {
|
|
29
|
+
export function createAppsScriptOperations({ projectRoot, config, clasp, browserOpener = openBrowser, }) {
|
|
29
30
|
const effectiveConfig = config ?? defaultAppsScriptConfig;
|
|
30
31
|
const projectRepository = new AppsScriptProjectRepository({
|
|
31
32
|
projectRoot,
|
|
@@ -100,9 +101,9 @@ export function createAppsScriptOperations({ projectRoot, config, clasp, }) {
|
|
|
100
101
|
id: "apps.open",
|
|
101
102
|
input: emptyInput,
|
|
102
103
|
async handler(_input, context) {
|
|
103
|
-
await assertProjectConfigured(projectRepository);
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
const project = await assertProjectConfigured(projectRepository);
|
|
105
|
+
context.log(`Opening Apps Script editor for ${project.scriptId}`);
|
|
106
|
+
await browserOpener(`https://script.google.com/home/projects/${encodeURIComponent(project.scriptId)}/edit`);
|
|
106
107
|
return { opened: true };
|
|
107
108
|
},
|
|
108
109
|
},
|
|
@@ -156,7 +157,7 @@ export function createAppsScriptOperations({ projectRoot, config, clasp, }) {
|
|
|
156
157
|
if (deploymentId === undefined || deploymentId.length === 0) {
|
|
157
158
|
throw new Error("Select or create a deployment first.");
|
|
158
159
|
}
|
|
159
|
-
const args = ["update-deployment",
|
|
160
|
+
const args = ["update-deployment", deploymentId];
|
|
160
161
|
if (input.description !== undefined && input.description.length > 0) {
|
|
161
162
|
args.push("--description", input.description);
|
|
162
163
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appsScriptOperations.js","sourceRoot":"","sources":["../../src/appsScript/appsScriptOperations.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAe/E,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AACzC,MAAM,WAAW,GAAG,CAAC;KAClB,MAAM,CAAC;IACN,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;CACzC,CAAC;KACD,MAAM,EAAE,CAAC;AACZ,MAAM,YAAY,GAAG,CAAC;KACnB,MAAM,CAAC;IACN,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;CAC5C,CAAC;KACD,MAAM,EAAE,CAAC;AACZ,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AACpE,MAAM,qBAAqB,GAAG,CAAC;KAC5B,MAAM,CAAC;IACN,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,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AI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAClF,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { OperationDefinition } from "@gasboost/console-runtime";
|
|
2
|
+
export type DevelopmentStatus = {
|
|
3
|
+
readonly running: boolean;
|
|
4
|
+
readonly localUrl?: string;
|
|
5
|
+
readonly command?: readonly string[];
|
|
6
|
+
readonly log: readonly string[];
|
|
7
|
+
};
|
|
8
|
+
type DevelopmentOperation = OperationDefinition<Record<string, never>, DevelopmentStatus>;
|
|
9
|
+
export declare function createDevelopmentOperations({ projectRoot, browserOpener, urlDetectionTimeoutMs, }: {
|
|
10
|
+
readonly projectRoot: string;
|
|
11
|
+
readonly browserOpener?: (url: string) => Promise<void>;
|
|
12
|
+
readonly urlDetectionTimeoutMs?: number;
|
|
13
|
+
}): {
|
|
14
|
+
readonly operations: readonly DevelopmentOperation[];
|
|
15
|
+
readonly cleanup: () => Promise<void>;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=developmentOperations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"developmentOperations.d.ts","sourceRoot":"","sources":["../../src/development/developmentOperations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAOrE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,QAAQ,CAAC,GAAG,EAAE,SAAS,MAAM,EAAE,CAAC;CACjC,CAAC;AAEF,KAAK,oBAAoB,GAAG,mBAAmB,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,iBAAiB,CAAC,CAAC;AAM1F,wBAAgB,2BAA2B,CAAC,EAC1C,WAAW,EACX,aAA2B,EAC3B,qBAA4B,GAC7B,EAAE;IACD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;CACzC,GAAG;IACF,QAAQ,CAAC,UAAU,EAAE,SAAS,oBAAoB,EAAE,CAAC;IACrD,QAAQ,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC,CAmEA"}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { openBrowser } from "../openBrowser.js";
|
|
6
|
+
const emptyInput = z.object({}).strict();
|
|
7
|
+
const MAX_LOG_LINES = 200;
|
|
8
|
+
const LOCAL_URL_PATTERN = /https?:\/\/(?:localhost|127\.0\.0\.1|\[::1\])(?::\d+)?[^\s"'<>)]*/;
|
|
9
|
+
export function createDevelopmentOperations({ projectRoot, browserOpener = openBrowser, urlDetectionTimeoutMs = 5000, }) {
|
|
10
|
+
const manager = new DevelopmentProcessManager(projectRoot, browserOpener, urlDetectionTimeoutMs);
|
|
11
|
+
return {
|
|
12
|
+
cleanup: async () => {
|
|
13
|
+
await manager.stop();
|
|
14
|
+
},
|
|
15
|
+
operations: [
|
|
16
|
+
{
|
|
17
|
+
id: "development.status",
|
|
18
|
+
input: emptyInput,
|
|
19
|
+
async handler() {
|
|
20
|
+
return manager.status();
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "development.start",
|
|
25
|
+
input: emptyInput,
|
|
26
|
+
async handler(_input, context) {
|
|
27
|
+
context.progress({ message: "Starting local application", percentage: 20 });
|
|
28
|
+
const status = await manager.start(context.log);
|
|
29
|
+
context.progress({ message: status.running ? "Local application running" : "Local application stopped", percentage: 100 });
|
|
30
|
+
return status;
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "development.stop",
|
|
35
|
+
input: emptyInput,
|
|
36
|
+
async handler(_input, context) {
|
|
37
|
+
context.progress({ message: "Stopping local application", percentage: 30 });
|
|
38
|
+
const status = await manager.stop();
|
|
39
|
+
context.progress({ message: "Local application stopped", percentage: 100 });
|
|
40
|
+
return status;
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: "development.restart",
|
|
45
|
+
input: emptyInput,
|
|
46
|
+
async handler(_input, context) {
|
|
47
|
+
context.progress({ message: "Restarting local application", percentage: 20 });
|
|
48
|
+
await manager.stop();
|
|
49
|
+
const status = await manager.start(context.log);
|
|
50
|
+
context.progress({ message: "Local application restarted", percentage: 100 });
|
|
51
|
+
return status;
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: "development.open",
|
|
56
|
+
input: emptyInput,
|
|
57
|
+
async handler() {
|
|
58
|
+
const status = manager.status();
|
|
59
|
+
if (!status.running) {
|
|
60
|
+
throw new Error("Start the local application first.");
|
|
61
|
+
}
|
|
62
|
+
if (status.localUrl === undefined) {
|
|
63
|
+
throw new Error("Local application URL is not available yet.");
|
|
64
|
+
}
|
|
65
|
+
await manager.open(status.localUrl);
|
|
66
|
+
return status;
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
class DevelopmentProcessManager {
|
|
73
|
+
projectRoot;
|
|
74
|
+
browserOpener;
|
|
75
|
+
urlDetectionTimeoutMs;
|
|
76
|
+
child;
|
|
77
|
+
command;
|
|
78
|
+
localUrl;
|
|
79
|
+
logLines = [];
|
|
80
|
+
statusWaiters = new Set();
|
|
81
|
+
constructor(projectRoot, browserOpener, urlDetectionTimeoutMs) {
|
|
82
|
+
this.projectRoot = projectRoot;
|
|
83
|
+
this.browserOpener = browserOpener;
|
|
84
|
+
this.urlDetectionTimeoutMs = urlDetectionTimeoutMs;
|
|
85
|
+
}
|
|
86
|
+
status() {
|
|
87
|
+
return {
|
|
88
|
+
running: this.child !== undefined,
|
|
89
|
+
...(this.localUrl === undefined ? {} : { localUrl: this.localUrl }),
|
|
90
|
+
...(this.command === undefined ? {} : { command: this.command }),
|
|
91
|
+
log: this.logLines,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
async start(log) {
|
|
95
|
+
if (this.child !== undefined) {
|
|
96
|
+
const message = "Development server is already running.";
|
|
97
|
+
this.record(message);
|
|
98
|
+
log(message);
|
|
99
|
+
return this.status();
|
|
100
|
+
}
|
|
101
|
+
const command = await resolveDevCommand(this.projectRoot);
|
|
102
|
+
this.command = [command.executable, ...command.args];
|
|
103
|
+
this.localUrl = undefined;
|
|
104
|
+
this.record(`$ ${this.command.join(" ")}`);
|
|
105
|
+
const child = spawn(command.executable, command.args, {
|
|
106
|
+
cwd: this.projectRoot,
|
|
107
|
+
env: {
|
|
108
|
+
...process.env,
|
|
109
|
+
BROWSER: "none",
|
|
110
|
+
FORCE_COLOR: "1",
|
|
111
|
+
},
|
|
112
|
+
shell: process.platform === "win32",
|
|
113
|
+
});
|
|
114
|
+
this.child = child;
|
|
115
|
+
const handleOutput = (chunk) => {
|
|
116
|
+
const text = stripAnsi(chunk.toString("utf8"));
|
|
117
|
+
const url = LOCAL_URL_PATTERN.exec(text)?.[0];
|
|
118
|
+
if (url !== undefined) {
|
|
119
|
+
this.localUrl = normalizeLocalUrl(url);
|
|
120
|
+
this.notifyStatusWaiters();
|
|
121
|
+
}
|
|
122
|
+
for (const line of text.split(/\r?\n/)) {
|
|
123
|
+
const trimmed = line.trimEnd();
|
|
124
|
+
if (trimmed.length === 0)
|
|
125
|
+
continue;
|
|
126
|
+
this.record(trimmed);
|
|
127
|
+
log(trimmed);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
child.stdout.on("data", handleOutput);
|
|
131
|
+
child.stderr.on("data", handleOutput);
|
|
132
|
+
child.once("exit", (code, signal) => {
|
|
133
|
+
this.record(`Development server exited${signal === null ? ` with code ${code ?? 0}` : ` by ${signal}`}.`);
|
|
134
|
+
if (this.child === child) {
|
|
135
|
+
this.child = undefined;
|
|
136
|
+
this.localUrl = undefined;
|
|
137
|
+
this.notifyStatusWaiters();
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
child.once("error", (error) => {
|
|
141
|
+
this.record(error.message);
|
|
142
|
+
if (this.child === child) {
|
|
143
|
+
this.child = undefined;
|
|
144
|
+
this.localUrl = undefined;
|
|
145
|
+
this.notifyStatusWaiters();
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
await this.waitForLocalUrlOrStop(child);
|
|
149
|
+
return this.status();
|
|
150
|
+
}
|
|
151
|
+
async stop() {
|
|
152
|
+
const child = this.child;
|
|
153
|
+
if (child === undefined)
|
|
154
|
+
return this.status();
|
|
155
|
+
this.child = undefined;
|
|
156
|
+
this.localUrl = undefined;
|
|
157
|
+
this.notifyStatusWaiters();
|
|
158
|
+
let exited = false;
|
|
159
|
+
child.once("exit", () => {
|
|
160
|
+
exited = true;
|
|
161
|
+
});
|
|
162
|
+
child.kill("SIGTERM");
|
|
163
|
+
await Promise.race([
|
|
164
|
+
new Promise((resolve) => child.once("exit", () => resolve())),
|
|
165
|
+
new Promise((resolve) => {
|
|
166
|
+
setTimeout(() => {
|
|
167
|
+
if (!exited)
|
|
168
|
+
child.kill("SIGKILL");
|
|
169
|
+
resolve();
|
|
170
|
+
}, 5000);
|
|
171
|
+
}),
|
|
172
|
+
]);
|
|
173
|
+
this.record("Development server stopped.");
|
|
174
|
+
return this.status();
|
|
175
|
+
}
|
|
176
|
+
async open(url) {
|
|
177
|
+
await this.browserOpener(url);
|
|
178
|
+
}
|
|
179
|
+
record(message) {
|
|
180
|
+
this.logLines.push(message);
|
|
181
|
+
if (this.logLines.length > MAX_LOG_LINES) {
|
|
182
|
+
this.logLines.splice(0, this.logLines.length - MAX_LOG_LINES);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
async waitForLocalUrlOrStop(child) {
|
|
186
|
+
if (this.localUrl !== undefined || this.child !== child)
|
|
187
|
+
return;
|
|
188
|
+
await new Promise((resolve) => {
|
|
189
|
+
const waiter = () => {
|
|
190
|
+
clearTimeout(timeout);
|
|
191
|
+
this.statusWaiters.delete(waiter);
|
|
192
|
+
resolve();
|
|
193
|
+
};
|
|
194
|
+
const timeout = setTimeout(waiter, this.urlDetectionTimeoutMs);
|
|
195
|
+
this.statusWaiters.add(waiter);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
notifyStatusWaiters() {
|
|
199
|
+
const waiters = [...this.statusWaiters];
|
|
200
|
+
this.statusWaiters.clear();
|
|
201
|
+
for (const waiter of waiters)
|
|
202
|
+
waiter();
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
async function resolveDevCommand(projectRoot) {
|
|
206
|
+
const packageJson = JSON.parse(await readFile(join(projectRoot, "package.json"), "utf8"));
|
|
207
|
+
if (typeof packageJson.scripts?.dev !== "string") {
|
|
208
|
+
throw new Error("No package.json dev script was found.");
|
|
209
|
+
}
|
|
210
|
+
const packageManager = packageJson.packageManager?.split("@", 1)[0] ?? "npm";
|
|
211
|
+
if (packageManager === "pnpm")
|
|
212
|
+
return { executable: "pnpm", args: ["run", "dev"] };
|
|
213
|
+
if (packageManager === "yarn")
|
|
214
|
+
return { executable: "yarn", args: ["dev"] };
|
|
215
|
+
if (packageManager === "bun")
|
|
216
|
+
return { executable: "bun", args: ["run", "dev"] };
|
|
217
|
+
return { executable: "npm", args: ["run", "dev"] };
|
|
218
|
+
}
|
|
219
|
+
function normalizeLocalUrl(url) {
|
|
220
|
+
const parsed = new URL(url.replace("http://localhost", "http://127.0.0.1"));
|
|
221
|
+
return parsed.toString();
|
|
222
|
+
}
|
|
223
|
+
function stripAnsi(value) {
|
|
224
|
+
return value.replace(/\u001b\[[0-9;]*m/g, "");
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=developmentOperations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"developmentOperations.js","sourceRoot":"","sources":["../../src/development/developmentOperations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAuC,MAAM,oBAAoB,CAAC;AAChF,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAWhD,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;AACzC,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,iBAAiB,GAAG,mEAAmE,CAAC;AAE9F,MAAM,UAAU,2BAA2B,CAAC,EAC1C,WAAW,EACX,aAAa,GAAG,WAAW,EAC3B,qBAAqB,GAAG,IAAI,GAK7B;IAIC,MAAM,OAAO,GAAG,IAAI,yBAAyB,CAC3C,WAAW,EACX,aAAa,EACb,qBAAqB,CACtB,CAAC;IAEF,OAAO;QACL,OAAO,EAAE,KAAK,IAAI,EAAE;YAClB,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;QACvB,CAAC;QACD,UAAU,EAAE;YACV;gBACE,EAAE,EAAE,oBAAoB;gBACxB,KAAK,EAAE,UAAU;gBACjB,KAAK,CAAC,OAAO;oBACX,OAAO,OAAO,CAAC,MAAM,EAAE,CAAC;gBAC1B,CAAC;aACF;YACD;gBACE,EAAE,EAAE,mBAAmB;gBACvB,KAAK,EAAE,UAAU;gBACjB,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO;oBAC3B,OAAO,C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GasboostConsole.js";
|
|
3
3
|
export { createAppsScriptOperations, type AppsScriptStatus, } from "./appsScript/appsScriptOperations.js";
|
|
4
4
|
export { createClaspRunner, type ClaspResult, type ClaspRunner, } from "./appsScript/ClaspRunner.js";
|
|
5
|
+
export { createDevelopmentOperations, type DevelopmentStatus, } from "./development/developmentOperations.js";
|
|
5
6
|
export { createFirebaseRunner, type FirebaseResult, type FirebaseRunner, } from "./firebase/FirebaseRunner.js";
|
|
6
7
|
export { createFirebaseOperations, type FirebaseStatus, } from "./firebase/firebaseOperations.js";
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,KAAK,YAAY,GAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EACL,0BAA0B,EAC1B,KAAK,gBAAgB,GACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,WAAW,GACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,wBAAwB,EACxB,KAAK,cAAc,GACpB,MAAM,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,EAC7B,KAAK,YAAY,GAClB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EACL,0BAA0B,EAC1B,KAAK,gBAAgB,GACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,WAAW,GACjB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,2BAA2B,EAC3B,KAAK,iBAAiB,GACvB,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,oBAAoB,EACpB,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,wBAAwB,EACxB,KAAK,cAAc,GACpB,MAAM,kCAAkC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { createProjectInspectOperation, } from "./projectInspectOperation.js";
|
|
|
2
2
|
export { startGasboostConsole } from "./startGasboostConsole.js";
|
|
3
3
|
export { createAppsScriptOperations, } from "./appsScript/appsScriptOperations.js";
|
|
4
4
|
export { createClaspRunner, } from "./appsScript/ClaspRunner.js";
|
|
5
|
+
export { createDevelopmentOperations, } from "./development/developmentOperations.js";
|
|
5
6
|
export { createFirebaseRunner, } from "./firebase/FirebaseRunner.js";
|
|
6
7
|
export { createFirebaseOperations, } from "./firebase/firebaseOperations.js";
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,GAE9B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EACL,0BAA0B,GAE3B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,iBAAiB,GAGlB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,oBAAoB,GAGrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,wBAAwB,GAEzB,MAAM,kCAAkC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,6BAA6B,GAE9B,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EACL,0BAA0B,GAE3B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,iBAAiB,GAGlB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,2BAA2B,GAE5B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EACL,oBAAoB,GAGrB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,wBAAwB,GAEzB,MAAM,kCAAkC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openBrowser.d.ts","sourceRoot":"","sources":["../src/openBrowser.ts"],"names":[],"mappings":"AAEA,wBAAsB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAoB5D"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
export async function openBrowser(url) {
|
|
3
|
+
const command = process.platform === "darwin"
|
|
4
|
+
? { executable: "open", args: [url] }
|
|
5
|
+
: process.platform === "win32"
|
|
6
|
+
? { executable: "cmd", args: ["/c", "start", "", url] }
|
|
7
|
+
: { executable: "xdg-open", args: [url] };
|
|
8
|
+
await new Promise((resolve, reject) => {
|
|
9
|
+
const child = spawn(command.executable, command.args, {
|
|
10
|
+
detached: true,
|
|
11
|
+
stdio: "ignore",
|
|
12
|
+
});
|
|
13
|
+
child.once("error", reject);
|
|
14
|
+
child.once("spawn", () => {
|
|
15
|
+
child.unref();
|
|
16
|
+
resolve();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=openBrowser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openBrowser.js","sourceRoot":"","sources":["../src/openBrowser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,GAAW;IAC3C,MAAM,OAAO,GACX,OAAO,CAAC,QAAQ,KAAK,QAAQ;QAC3B,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE;QACrC,CAAC,CAAC,OAAO,CAAC,QAAQ,KAAK,OAAO;YAC5B,CAAC,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,CAAC,EAAE;YACvD,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;IAEhD,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAC1C,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,UAAU,EAAE,OAAO,CAAC,IAAI,EAAE;YACpD,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,QAAQ;SAChB,CAAC,CAAC;QAEH,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;QAC5B,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,EAAE;YACvB,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startGasboostConsole.d.ts","sourceRoot":"","sources":["../src/startGasboostConsole.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAInC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"startGasboostConsole.d.ts","sourceRoot":"","sources":["../src/startGasboostConsole.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAC;AAInC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAI/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAInE,wBAAsB,oBAAoB,CAAC,EACzC,WAAW,EACX,WAAkB,EAClB,KAAsC,EACtC,QAA4C,GAC7C,EAAE;IACD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC;CACpC,GAAG,OAAO,CAAC,cAAc,CAAC,CAgC1B"}
|
|
@@ -2,6 +2,7 @@ import { startConsoleRuntime, } from "@gasboost/console-runtime";
|
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
3
|
import { createAppsScriptOperations } from "./appsScript/appsScriptOperations.js";
|
|
4
4
|
import { createClaspRunner } from "./appsScript/ClaspRunner.js";
|
|
5
|
+
import { createDevelopmentOperations } from "./development/developmentOperations.js";
|
|
5
6
|
import { createFirebaseOperations } from "./firebase/firebaseOperations.js";
|
|
6
7
|
import { createFirebaseRunner } from "./firebase/FirebaseRunner.js";
|
|
7
8
|
import { createProjectInspectOperation } from "./projectInspectOperation.js";
|
|
@@ -18,14 +19,23 @@ export async function startGasboostConsole({ projectRoot, openBrowser = true, cl
|
|
|
18
19
|
config,
|
|
19
20
|
firebase,
|
|
20
21
|
});
|
|
21
|
-
|
|
22
|
+
const development = createDevelopmentOperations({ projectRoot });
|
|
23
|
+
const runtime = await startConsoleRuntime({
|
|
22
24
|
uiDirectory: fileURLToPath(new URL("./ui", import.meta.url)),
|
|
23
25
|
operations: [
|
|
24
26
|
createProjectInspectOperation(projectRoot),
|
|
27
|
+
...development.operations,
|
|
25
28
|
...appsScriptOperations,
|
|
26
29
|
...firebaseOperations,
|
|
27
30
|
],
|
|
28
31
|
openBrowser,
|
|
29
32
|
});
|
|
33
|
+
return {
|
|
34
|
+
url: runtime.url,
|
|
35
|
+
close: async () => {
|
|
36
|
+
await development.cleanup();
|
|
37
|
+
await runtime.close();
|
|
38
|
+
},
|
|
39
|
+
};
|
|
30
40
|
}
|
|
31
41
|
//# sourceMappingURL=startGasboostConsole.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startGasboostConsole.js","sourceRoot":"","sources":["../src/startGasboostConsole.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,GAEpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,0BAA0B,EAAE,MAAM,sCAAsC,CAAC;AAClF,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,EACzC,WAAW,EACX,WAAW,GAAG,IAAI,EAClB,KAAK,GAAG,iBAAiB,CAAC,WAAW,CAAC,EACtC,QAAQ,GAAG,oBAAoB,CAAC,WAAW,CAAC,GAM7C;IACC,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;IACzD,MAAM,oBAAoB,GAAG,0BAA0B,CAAC;QACtD,WAAW;QACX,GAAG,CAAC,MAAM,CAAC,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,CAAC;QACzE,KAAK;KACN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H,MAAM,WAAW,GAAG,2BAA2B,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;IAEjE,MAAM,OAAO,GAAG,MAAM,mBAAmB,CAAC;QACxC,WAAW,EAAE,aAAa,CAAC,IAAI,GAAG,CAAC,MAAM,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;QAC5D,UAAU,EAAE;YACV,6BAA6B,CAAC,WAAW,CAAC;YAC1C,GAAG,WAAW,CAAC,UAAU;YACzB,GAAG,oBAAoB;YACvB,GAAG,kBAAkB;SACtB;QACD,WAAW;KACZ,CAAC,CAAC;IAEH,OAAO;QACL,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,KAAK,EAAE,KAAK,IAAI,EAAE;YAChB,MAAM,WAAW,CAAC,OAAO,EAAE,CAAC;YAC5B,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;QACxB,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--gb-background:#0f131b;--gb-surface:#181c23;--gb-surface-lowest:#0a0e15;--gb-surface-high:#262a32;--gb-surface-highest:#31353d;--gb-border:#1e293b;--gb-text:#dfe2ed;--gb-muted:#93a19a;--gb-outline:#64716a;--gb-primary:#4edea3;--gb-primary-hover:#6ffbbe;--gb-primary-dark:#003824;--gb-cyan:#06b6d4;--gb-orange:#f97316;--gb-healthy:#10b981;--gb-code:#040711;--gb-danger:#f87171;--gb-font:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--gb-mono:"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;font-family:var(--gb-font);color:var(--gb-text);background:var(--gb-background);font-synthesis:none}*{box-sizing:border-box}[hidden]{display:none!important}body{background:var(--gb-background);-webkit-font-smoothing:antialiased;min-width:320px;min-height:100vh;margin:0}button,input,textarea{font:inherit}button{cursor:pointer}.topbar{height:60px;color:var(--gb-text);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);background:#0a0e15eb;border-bottom:1px solid #1e293bcc;align-items:center;gap:12px;padding:0 24px;display:flex}.brand-mark{object-fit:contain;background:var(--gb-primary);border-radius:6px;width:32px;height:32px}.product-name{font-size:15px;font-weight:700}.project-path{text-overflow:ellipsis;white-space:nowrap;max-width:min(60vw,680px);color:var(--gb-muted);font:11px var(--gb-mono);overflow:hidden}.icon-button{border:1px solid var(--gb-border);width:36px;height:36px;color:var(--gb-muted);background:var(--gb-surface);cursor:pointer;border-radius:6px;place-items:center;margin-left:auto;display:grid}.icon-button:hover{color:var(--gb-primary);background:var(--gb-surface-high)}.icon-button:disabled{opacity:.5;cursor:wait}.icon-button svg{width:17px;height:17px}.icon-button.light{color:var(--gb-muted);border-color:var(--gb-border);background:var(--gb-surface-high);margin-left:0}.icon-button.light:hover{background:var(--gb-surface-highest)}.status-band{background:var(--gb-background);border-bottom:1px solid var(--gb-border);justify-content:space-between;align-items:center;gap:24px;min-height:118px;padding:30px clamp(24px,5vw,72px);display:flex}.eyebrow{color:var(--gb-primary);font-family:var(--gb-mono);letter-spacing:.08em;font-size:11px;font-weight:800}h1,h2,h3,p{letter-spacing:0;margin:0}h1{margin-top:5px;font-size:28px;line-height:1.2}.runtime-status{color:var(--gb-muted);font-family:var(--gb-mono);align-items:center;font-size:12px;font-weight:650;display:flex}.runtime-status span{background:var(--gb-orange);border-radius:50%;width:8px;height:8px}.runtime-status.ready span{background:var(--gb-healthy)}.runtime-status.error span{background:var(--gb-danger)}.workspace{grid-template-columns:220px minmax(0,1fr);min-height:calc(100vh - 176px);display:grid}.sidebar{background:var(--gb-surface);border-right:1px solid var(--gb-border);padding:16px 12px}.nav-item{color:#93a19abf;text-align:left;width:100%;height:40px;font-family:var(--gb-mono);background:0 0;border:1px solid #0000;border-radius:8px;align-items:center;gap:10px;padding:0 12px;font-size:11px;display:flex}.nav-item svg{width:17px;height:17px}.nav-item:hover{background:#262a32a6}.nav-item.active{color:var(--gb-text);background:#4edea314;border-color:#4edea366;font-weight:700;box-shadow:0 0 0 1px #4edea359}.nav-item:disabled{opacity:.55}.content{width:min(980px,100%);padding:32px clamp(24px,5vw,64px) 56px}.section-heading{justify-content:space-between;align-items:end;margin-bottom:18px;display:flex}h2{margin-top:4px;font-size:20px;line-height:1.3}.capability-list,.status-list{background:var(--gb-surface);border:1px solid var(--gb-border);border-radius:8px;overflow:hidden;box-shadow:0 16px 48px #0003}.capability-row,.status-row{border-bottom:1px solid var(--gb-border);grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:15px;min-height:82px;padding:16px 18px;display:grid}.capability-row:last-child,.status-row:last-child{border-bottom:0}.capability-icon{border:1px solid var(--gb-border);background:var(--gb-surface-high);border-radius:8px;place-items:center;width:40px;height:40px;display:grid}.capability-icon svg{width:19px;height:19px}.capability-icon.apps{color:var(--gb-cyan)}.capability-icon.firebase{color:var(--gb-orange)}.capability-icon.account,.capability-icon.development{color:var(--gb-primary)}h3{font-size:14px}.capability-row p,.status-row p{color:var(--gb-muted);margin-top:4px;font-size:12px}.badge{border:1px solid var(--gb-border);min-width:94px;color:var(--gb-muted);background:var(--gb-surface-high);font-family:var(--gb-mono);text-align:center;border-radius:4px;padding:5px 8px;font-size:10px;font-weight:700}.badge.configured{color:var(--gb-primary);background:#4edea314;border-color:#4edea373}.badge.inactive{color:var(--gb-muted)}.mono-detail{text-overflow:ellipsis;white-space:nowrap;font-family:var(--gb-mono);overflow:hidden}.action-bar{flex-wrap:wrap;gap:8px;margin-top:18px;display:flex}.command-button,.secondary-button{border:1px solid var(--gb-border);min-height:36px;color:var(--gb-muted);background:var(--gb-surface-high);cursor:pointer;font-family:var(--gb-mono);border-radius:6px;justify-content:center;align-items:center;gap:7px;padding:0 13px;font-size:11px;font-weight:700;display:inline-flex}.button{cursor:pointer;border:0;border-radius:5px;justify-content:center;align-items:center;gap:7px;min-height:39px;padding:0 17px;font-size:12px;font-weight:700;display:inline-flex}.button svg{width:15px;height:15px}.button--primary{color:var(--gb-primary-dark);background:var(--gb-primary)}.button--primary:hover:not(:disabled){background:var(--gb-primary-hover)}.button:disabled{opacity:.4;cursor:not-allowed}.command-button svg,.secondary-button svg{width:15px;height:15px}.command-button:hover,.secondary-button:hover{color:var(--gb-text);background:var(--gb-surface-highest)}.command-button.primary{color:var(--gb-primary-dark);border-color:var(--gb-primary);background:var(--gb-primary)}.command-button.danger{color:#190707;border-color:var(--gb-danger);background:var(--gb-danger)}.command-button:disabled{opacity:.45;cursor:not-allowed}.setup-mode{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:22px;display:grid}.setup-mode__button{border:1px solid var(--gb-border);min-height:96px;color:var(--gb-text);background:var(--gb-surface);text-align:left;cursor:pointer;border-radius:8px;flex-direction:column;gap:7px;padding:16px;display:flex}.setup-mode__button:hover{background:var(--gb-surface-high)}.setup-mode__button--active{background:#4edea314;border-color:#4edea373;box-shadow:0 0 0 1px #4edea359}.setup-mode__button strong{font-size:13px}.setup-mode__button span{color:var(--gb-muted);font-size:11px;line-height:1.55}.panel{border:1px solid var(--gb-border);background:#1c202799;border-radius:8px;flex-direction:column;gap:14px;margin-top:14px;padding:16px;display:flex}.info-box{color:var(--gb-muted);background:#1c202799;border:1px solid #1e293bd9;border-radius:8px;align-items:flex-start;gap:11px;margin-top:16px;padding:14px;font-size:12px;line-height:1.6;display:flex}.info-box__icon{border:1px solid var(--gb-cyan);width:18px;height:18px;color:var(--gb-cyan);border-radius:999px;flex:none;place-items:center;font-family:serif;font-size:12px;font-weight:700;display:grid}.field{flex-direction:column;gap:8px;margin-top:18px;display:flex}.panel .field{margin-top:0}.field__label{color:var(--gb-text);font-family:var(--gb-mono);font-size:12px;font-weight:500}.field input{border:1px solid var(--gb-border);width:100%;height:43px;color:var(--gb-text);background:var(--gb-code);font:12px var(--gb-mono);border-radius:8px;outline:none;padding:0 13px}.field input::placeholder{color:#46534d}.field input:focus{border-color:var(--gb-primary);box-shadow:0 0 0 2px #4edea314}.field__help{color:#93a19ab3;font-family:var(--gb-mono);margin:0;font-size:10px;line-height:1.55}.required{color:#ffb4ab}.activity{margin-top:30px}.activity-heading{justify-content:space-between;align-items:center;margin-bottom:12px;display:flex}.text-button{color:var(--gb-muted);cursor:pointer;font-family:var(--gb-mono);background:0 0;border:0;font-size:11px;font-weight:700}.text-button:hover{color:var(--gb-primary)}.log{height:190px;color:var(--gb-primary);background:var(--gb-code);border:1px solid var(--gb-border);font:12px/1.6 var(--gb-mono);border-radius:8px;padding:8px 0;overflow:auto}.log-row{grid-template-columns:84px 1fr;gap:10px;padding:4px 14px;display:grid}.log-row time{color:var(--gb-outline)}.log-row.progress span{color:var(--gb-cyan)}.log-row.error span{color:var(--gb-danger)}dialog{border:1px solid var(--gb-border);width:min(440px,100vw - 32px);color:var(--gb-text);background:var(--gb-surface);border-radius:8px;padding:0;box-shadow:0 24px 70px #00000059}dialog::backdrop{background:#040711b8}dialog form{padding:20px}.dialog-heading{justify-content:space-between;align-items:center;margin-bottom:20px;display:flex}.dialog-close{width:32px;height:32px;color:var(--gb-muted);cursor:pointer;background:0 0;border:0;place-items:center;display:grid}.dialog-close:hover{color:var(--gb-primary)}.dialog-close svg{width:18px;height:18px}dialog label{color:var(--gb-text);font-family:var(--gb-mono);margin-bottom:7px;font-size:12px;font-weight:500;display:block}dialog input{border:1px solid var(--gb-border);width:100%;height:43px;color:var(--gb-text);background:var(--gb-code);font:12px var(--gb-mono);border-radius:8px;padding:0 13px}dialog input:focus{border-color:var(--gb-primary);outline:0;box-shadow:0 0 0 2px #4edea314}.dialog-copy{color:var(--gb-muted);font-size:13px;line-height:1.6}.dialog-actions{justify-content:flex-end;gap:8px;margin-top:24px;display:flex}@media (width<=700px){.topbar{padding:0 16px}.status-band{min-height:104px;padding:20px}h1{font-size:23px}.workspace{grid-template-columns:1fr}.sidebar{border-bottom:1px solid #d5ddd7;border-right:0;padding:8px;display:flex;overflow-x:auto}.nav-item{width:auto;min-width:max-content}.content{padding:24px 16px 40px}.capability-row,.status-row{grid-template-columns:40px minmax(0,1fr)}.badge{grid-column:2;justify-self:start}.action-bar{grid-template-columns:1fr 1fr;display:grid}}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},t=([e,n,r])=>{let i=document.createElementNS(`http://www.w3.org/2000/svg`,e);return Object.keys(n).forEach(e=>{i.setAttribute(e,String(n[e]))}),r?.length&&r.forEach(e=>{let n=t(e);i.appendChild(n)}),i},n=(n,r={})=>t([`svg`,{...e,...r},n]),r=e=>Array.from(e.attributes).reduce((e,t)=>(e[t.name]=t.value,e),{}),i=e=>typeof e==`string`?e:!e||!e.class?``:e.class&&typeof e.class==`string`?e.class.split(` `):e.class&&Array.isArray(e.class)?e.class:``,a=e=>e.flatMap(i).map(e=>e.trim()).filter(Boolean).filter((e,t,n)=>n.indexOf(e)===t).join(` `),ee=e=>e.replace(/(\w)(\w*)(_|-|\s*)/g,(e,t,n)=>t.toUpperCase()+n.toLowerCase()),o=(t,{nameAttr:i,icons:o,attrs:s})=>{let c=t.getAttribute(i);if(c==null)return;let l=o[ee(c)];if(!l)return console.warn(`${t.outerHTML} icon name was not found in the provided icons object.`);let u=r(t),d={...e,"data-lucide":c,...s,...u},f=a([`lucide`,`lucide-${c}`,u,s]);f&&Object.assign(d,{class:f});let te=n(l,d);return t.parentNode?.replaceChild(te,t)},s=[[`path`,{d:`m18 16 4-4-4-4`}],[`path`,{d:`m6 8-4 4 4 4`}],[`path`,{d:`m14.5 4-5 16`}]],c=[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`}]],l=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`M10 14 21 3`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}]],u=[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`}],[`path`,{d:`m5 12-3 3 3 3`}],[`path`,{d:`m9 18 3-3-3-3`}]],d=[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`}]],f=[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`}]],te=[[`path`,{d:`m10 17 5-5-5-5`}],[`path`,{d:`M15 12H3`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`}]],ne=[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`}]],re=[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]],ie=[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}],[`path`,{d:`M8 16H3v5`}]],ae=[[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z`}],[`path`,{d:`m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0`}],[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`}]],oe=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}]],se=[[`path`,{d:`M12 3v12`}],[`path`,{d:`m17 8-5-5-5 5`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}]],ce=[[`circle`,{cx:`12`,cy:`8`,r:`5`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`}]],le=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]],ue=({icons:e={},nameAttr:t=`data-lucide`,attrs:n={},root:r=document}={})=>{if(!Object.values(e).length)throw Error(`Please provide an icons object.
|
|
2
|
+
If you want to use all the icons you can import it like:
|
|
3
|
+
\`import { createIcons, icons } from 'lucide';
|
|
4
|
+
lucide.createIcons({icons});\``);if(r===void 0)throw Error("`createIcons()` only works in a browser environment.");let i=r.querySelectorAll(`[${t}]`);if(Array.from(i).forEach(r=>o(r,{nameAttr:t,icons:e,attrs:n})),t===`data-lucide`){let t=r.querySelectorAll(`[icon-name]`);t.length>0&&(console.warn(`[Lucide] Some icons were found with the now deprecated icon-name attribute. These will still be replaced for backwards compatibility, but will no longer be supported in v1.0 and you should switch to data-lucide`),Array.from(t).forEach(t=>o(t,{nameAttr:`icon-name`,icons:e,attrs:n})))}};function de(e=document){for(let t of e.querySelectorAll(`[data-close-dialog]`))t.addEventListener(`click`,()=>{let n=t.dataset.closeDialog;if(n===void 0)return;let r=e.getElementById(n);fe(r)&&r.close()})}function fe(e){return typeof e==`object`&&!!e&&`close`in e&&typeof e.close==`function`}var pe=Ae(),me,p,m,h,g=`existing`;ue({icons:{Code2:s,Database:c,ExternalLink:l,FileCode2:u,KeyRound:d,LayoutDashboard:f,LogIn:te,Play:ne,Plus:re,RefreshCw:ie,Rocket:ae,Square:oe,Upload:se,UserRound:ce,X:le}});var _=$(`refresh`),v=$(`log`),y=$(`apps-log`),b=$(`deployment-log`),x=$(`firebase-log`),S=$(`development-log`),C={overview:$(`overview-nav`),development:$(`development-nav`),"apps-script":$(`apps-script-nav`),deployment:$(`deployment-nav`),firebase:$(`firebase-nav`)},w=$(`apps-login`),T=$(`apps-create`),E=$(`apps-connect`),he=$(`apps-user-settings`),D=$(`apps-open`),O=$(`apps-push`),k=$(`apps-pull`),ge=$(`credential-service-account`),_e=$(`credential-script-properties`),A=$(`deployment-list`),j=$(`deployment-create`),M=$(`deployment-update`),N=$(`deployment-open`),P=$(`development-start`),F=$(`development-stop`),I=$(`development-restart`),L=$(`development-open`),R=$(`firebase-enable`),z=$(`firebase-login`),B=$(`firebase-connect`),V=$(`firebase-rules-deploy`),ve=$(`firebase-open`);_.addEventListener(`click`,()=>void ye()),$(`clear-log`).addEventListener(`click`,()=>v.replaceChildren()),$(`apps-clear-log`).addEventListener(`click`,()=>y.replaceChildren()),$(`deployment-clear-log`).addEventListener(`click`,()=>b.replaceChildren()),$(`firebase-clear-log`).addEventListener(`click`,()=>x.replaceChildren()),$(`development-clear-log`).addEventListener(`click`,()=>S.replaceChildren());for(let[e,t]of Object.entries(C))t.addEventListener(`click`,()=>{Ee(e),e===`development`&&W(),e===`apps-script`&&H(),e===`deployment`&&H(),e===`firebase`&&U()});$(`apps-refresh`).addEventListener(`click`,()=>void H()),$(`development-refresh`).addEventListener(`click`,()=>void W()),$(`deployment-refresh`).addEventListener(`click`,()=>void H()),$(`firebase-refresh`).addEventListener(`click`,()=>void U());for(let e of document.querySelectorAll(`[data-setup-mode]`))e.addEventListener(`click`,()=>{g=e.dataset.setupMode===`new`?`new`:`existing`,Te()});w.addEventListener(`click`,()=>void G(`apps.login`,{},y,K,[w])),he.addEventListener(`click`,()=>window.open(`https://script.google.com/home/usersettings`,`_blank`,`noopener`)),T.addEventListener(`click`,()=>{let e=$(`script-title`);e.value=me?.name??``,$(`create-dialog`).showModal(),e.focus()}),E.addEventListener(`click`,()=>{G(`apps.connect`,{scriptId:$(`script-id`).value.trim()},y,K,[E])}),D.addEventListener(`click`,()=>void G(`apps.open`,{},y,()=>void 0,[D])),O.addEventListener(`click`,()=>$(`push-dialog`).showModal()),k.addEventListener(`click`,()=>Q(y,`Pull is reserved for a follow-up operation.`,`info`)),ge.addEventListener(`click`,()=>{let e=m?.projectId;e!==void 0&&window.open(`https://console.firebase.google.com/project/${encodeURIComponent(e)}/settings/serviceaccounts/adminsdk`,`_blank`,`noopener`)}),_e.addEventListener(`click`,()=>{let e=p?.scriptId;e!==void 0&&window.open(`https://script.google.com/home/projects/${encodeURIComponent(e)}/settings`,`_blank`,`noopener`)}),A.addEventListener(`click`,()=>void G(`apps.deployments`,{},b,e=>{Q(b,e.deployments.length===0?`No deployments returned`:e.deployments.map(e=>`${e.deploymentId}${e.description===void 0?``:` (${e.description})`}`).join(`, `),`info`)},[A])),j.addEventListener(`click`,()=>$(`deployment-dialog`).showModal()),M.addEventListener(`click`,()=>void G(`apps.deployment.update`,{deploymentId:$(`deployment-id`).value.trim()||void 0},b,()=>void H(),[M])),N.addEventListener(`click`,()=>{let e=p?.deploymentId??$(`deployment-id`).value.trim();e.length>0&&window.open(`https://script.google.com/macros/s/${e}/exec`,`_blank`,`noopener`)}),R.addEventListener(`click`,()=>void G(`firebase.enable`,{},x,q,[R])),z.addEventListener(`click`,()=>void G(`firebase.login`,{},x,q,[z])),B.addEventListener(`click`,()=>{G(`firebase.connect`,{projectId:$(`firebase-project-id`).value.trim()},x,q,[B])}),V.addEventListener(`click`,()=>void G(`firebase.rules.deploy`,{},x,()=>void U(),[V])),ve.addEventListener(`click`,()=>window.open(`https://console.firebase.google.com/`,`_blank`,`noopener`)),$(`create-form`).addEventListener(`submit`,e=>{e.preventDefault();let t=$(`create-dialog`),n=$(`script-title`).value;t.close(),G(`apps.create`,{title:n},y,K,[T])}),$(`push-form`).addEventListener(`submit`,e=>{e.preventDefault(),$(`push-dialog`).close(),G(`apps.push`,{confirmed:!0},y,()=>void H(),[O])}),$(`deployment-form`).addEventListener(`submit`,e=>{e.preventDefault(),$(`deployment-dialog`).close(),G(`apps.deployment.create`,{description:$(`deployment-description`).value.trim()||void 0},b,()=>void H(),[j])}),de(),P.addEventListener(`click`,()=>void G(`development.start`,{},S,J,[P,I])),F.addEventListener(`click`,()=>void G(`development.stop`,{},S,J,[F,I])),I.addEventListener(`click`,()=>void G(`development.restart`,{},S,J,[P,F,I])),L.addEventListener(`click`,()=>void G(`development.open`,{},S,J,[L])),ye();async function ye(){await be(),await Promise.all([W(),H(),U()])}async function be(){_.disabled=!0,Z(`running`,`Inspecting`),Q(v,`Inspecting project definition`,`info`);try{await Se(`project.inspect`,{},xe(v,e=>{me=e,we(e)})),Z(`ready`,`Ready`)}catch(e){Z(`error`,`Error`),ke(v,e)}finally{_.disabled=!1}}async function H(){await G(`apps.status`,{},y,K,[$(`apps-refresh`)])}async function U(){await G(`firebase.status`,{},x,q,[$(`firebase-refresh`)])}async function W(){await G(`development.status`,{},S,J,[$(`development-refresh`)])}async function G(e,t,n,r,i=[]){De(i,!0),Z(`running`,`Working`);try{await Se(e,t,xe(n,r)),Z(`ready`,`Ready`)}catch(e){Z(`error`,`Error`),ke(n,e)}finally{De(i,!1),Y()}}function xe(e,t){return{log:t=>Q(e,t,`info`),progress:(t,n)=>Q(e,n===void 0?t:`${t} (${n}%)`,`progress`),result:t}}async function Se(e,t,n){let r=await fetch(`/api/operations/${encodeURIComponent(e)}`,{method:`POST`,headers:{"Content-Type":`application/json`,"X-Gasboost-Session":pe},body:JSON.stringify(t)});if(!r.ok||r.body===null){let e=await r.json().catch(()=>null);throw Error(e?.error??`Operation failed with status ${r.status}`)}let i=r.body.pipeThrough(new TextDecoderStream).getReader(),a=``;for(;;){let{done:e,value:t}=await i.read();a+=t??``;let r=a.split(`
|
|
5
|
+
|
|
6
|
+
`);a=r.pop()??``;for(let e of r)Ce(e,n);if(e)break}}function Ce(e,t){let n=/^event: (.+)$/m.exec(e)?.[1],r=/^data: (.+)$/m.exec(e)?.[1];if(n===void 0||r===void 0)return;let i=JSON.parse(r);if(n===`log`&&typeof i.message==`string`)t.log(i.message);else if(n===`progress`&&typeof i.message==`string`)t.progress(i.message,typeof i.percentage==`number`?i.percentage:void 0);else if(n===`result`)t.result(i);else if(n===`error`)throw Error(typeof i.message==`string`?i.message:`Operation failed`)}function we(e){$(`project-title`).textContent=e.name,$(`project-path`).textContent=e.root,Oe(`apps-script-status`,e.capabilities.appsScript),Oe(`firebase-status`,e.capabilities.firebaseRealtimeDatabase)}function K(e){p=e,X(`apps-auth-status`,e.authenticated,`Authorized`,`Sign in required`),X(`apps-project-status`,e.configured,`Connected`,`Not initialized`),X(`apps-manifest-status`,e.manifestExists,`Found`,`Missing`),X(`deployment-project-status`,e.configured,`Ready`,`Prerequisite`),$(`apps-account-detail`).textContent=e.authenticated?`clasp authorization available`:`No clasp authorization found`,$(`apps-project-detail`).textContent=e.configured?`${e.scriptId??`Connected`} · ${e.rootDir}`:`Local source: ${e.rootDir}`,$(`apps-manifest-detail`).textContent=e.manifestExists?`appsscript.json exists in project root`:`Manifest was not detected at project root`,$(`deployment-project-detail`).textContent=e.configured?`Script ID: ${e.scriptId??`connected`}`:`Create or connect an Apps Script project first`,$(`deployment-id`).value=e.deploymentId??``,X(`deployment-id-status`,e.deploymentId!==void 0,`Selected`,`Not selected`),$(`deployment-id-detail`).textContent=e.deploymentId===void 0?`No deployment synced to .env`:e.deploymentId,Te(),Y()}function q(e){m=e,X(`firebase-enabled-status`,e.enabled,`Enabled`,`Not enabled`),X(`firebase-auth-status`,e.authenticated,`Authorized`,`Sign in required`),X(`firebase-project-status`,e.configured,`Connected`,`Not connected`),$(`firebase-enabled-detail`).textContent=e.enabled?`Local Firebase configuration detected`:`Enable Firebase to create local configuration`,$(`firebase-auth-detail`).textContent=e.authenticated?`Firebase CLI authorization available`:`No Firebase CLI authorization found`,$(`firebase-project-detail`).textContent=e.projectId===void 0?`No project ID synced to .env`:e.projectId,$(`firebase-project-id`).value=e.projectId??``,Y()}function J(e){h=e,X(`development-state-status`,e.running,`Running`,`Stopped`),$(`development-state-detail`).textContent=e.command===void 0?`No dev process launched by console`:e.command.join(` `),X(`development-url-status`,e.localUrl!==void 0,`Available`,`Pending`),$(`development-url-detail`).textContent=e.localUrl??`Start the local application to detect a URL`,S.replaceChildren();for(let t of e.log)Q(S,t,`info`);Y()}function Te(){for(let e of document.querySelectorAll(`[data-setup-mode]`))e.classList.toggle(`setup-mode__button--active`,e.dataset.setupMode===g);$(`apps-create-panel`).hidden=g!==`new`,$(`apps-connect-panel`).hidden=g!==`existing`}function Ee(e){for(let t of Object.keys(C))$(`${t}-view`).hidden=t!==e,C[t].classList.toggle(`active`,t===e)}function De(e,t){for(let n of e)n.disabled=t}function Y(){let e=p?.authenticated===!0,t=p?.configured===!0;w.disabled=e,T.disabled=!e||t,E.disabled=!e||t,D.disabled=!e||!t,O.disabled=!e||!t,k.disabled=!e||!t,ge.disabled=m?.projectId===void 0,_e.disabled=p?.scriptId===void 0,A.disabled=!e||!t,j.disabled=!e||!t,M.disabled=!e||!t,N.disabled=(p?.deploymentId??$(`deployment-id`).value).length===0,P.disabled=h?.running===!0,F.disabled=h?.running!==!0,I.disabled=h?.running!==!0,L.disabled=h?.running!==!0||h.localUrl===void 0,z.disabled=m?.authenticated===!0,R.disabled=m?.enabled===!0,B.disabled=!1,V.disabled=m?.configured!==!0,ve.disabled=!1,_.disabled=!1;for(let e of Object.values(C))e.disabled=!1}function Oe(e,t){X(e,t,`Configured`,`Not configured`)}function X(e,t,n,r){let i=$(e);i.textContent=t?n:r,i.className=`badge ${t?`configured`:`inactive`}`}function Z(e,t){let n=$(`runtime-status`);n.className=`runtime-status ${e}`,n.innerHTML=``;let r=document.createElement(`span`);n.append(r,document.createTextNode(` ${t}`))}function Q(e,t,n){let r=document.createElement(`div`);r.className=`log-row ${n}`;let i=document.createElement(`time`);i.textContent=new Date().toLocaleTimeString();let a=document.createElement(`span`);a.textContent=t,r.append(i,a),e.append(r),e.scrollTop=e.scrollHeight}function ke(e,t){Q(e,t instanceof Error?t.message:`Operation failed`,`error`)}function $(e){let t=document.getElementById(e);if(t===null)throw Error(`Missing UI element: ${e}`);return t}function Ae(){let e=document.querySelector(`meta[name="gasboost-session"]`)?.content;if(e===void 0||e.length===0)throw Error(`Console session was not initialized`);return e}
|
|
Binary file
|
package/dist/ui/index.html
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<meta name="gasboost-session" content="__GASBOOST_SESSION_TOKEN__" />
|
|
7
|
-
<title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
7
|
+
<title>gasboost console</title>
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-BGK5B9RA.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-B6Dn-OF9.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<header class="topbar">
|
|
13
|
-
<
|
|
13
|
+
<img class="brand-mark" src="/gasboost-logo.png" alt="" />
|
|
14
14
|
<div>
|
|
15
|
-
<div class="product-name">
|
|
15
|
+
<div class="product-name">gasboost console</div>
|
|
16
16
|
<div class="project-path" id="project-path">Loading project...</div>
|
|
17
17
|
</div>
|
|
18
18
|
<button class="icon-button" id="refresh" type="button" title="Refresh project state" aria-label="Refresh project state">
|
|
@@ -68,13 +68,26 @@
|
|
|
68
68
|
<div class="content" id="development-view" hidden>
|
|
69
69
|
<div class="section-heading">
|
|
70
70
|
<div><div class="eyebrow">DEVELOPMENT</div><h2>Local application</h2></div>
|
|
71
|
+
<button class="icon-button light" id="development-refresh" type="button" title="Refresh development status" aria-label="Refresh development status"><i data-lucide="refresh-cw"></i></button>
|
|
71
72
|
</div>
|
|
72
|
-
<div class="
|
|
73
|
+
<div class="status-list">
|
|
74
|
+
<div class="status-row">
|
|
75
|
+
<div class="capability-icon development"><i data-lucide="code-2"></i></div>
|
|
76
|
+
<div><h3>Process</h3><p class="mono-detail" id="development-state-detail">Checking local process</p></div>
|
|
77
|
+
<div class="badge" id="development-state-status">Checking</div>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="status-row">
|
|
80
|
+
<div class="capability-icon development"><i data-lucide="external-link"></i></div>
|
|
81
|
+
<div><h3>Local URL</h3><p class="mono-detail" id="development-url-detail">Checking local URL</p></div>
|
|
82
|
+
<div class="badge" id="development-url-status">Checking</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
<div class="info-box"><span class="info-box__icon">i</span><div>Development uses the project package.json dev script through registered operations only.</div></div>
|
|
73
86
|
<div class="action-bar">
|
|
74
|
-
<button class="command-button" type="button"
|
|
75
|
-
<button class="command-button" type="button"
|
|
76
|
-
<button class="command-button" type="button"
|
|
77
|
-
<button class="command-button" type="button"
|
|
87
|
+
<button class="command-button primary" id="development-start" type="button"><i data-lucide="play"></i>Start</button>
|
|
88
|
+
<button class="command-button" id="development-stop" type="button"><i data-lucide="square"></i>Stop</button>
|
|
89
|
+
<button class="command-button" id="development-restart" type="button"><i data-lucide="refresh-cw"></i>Restart</button>
|
|
90
|
+
<button class="command-button" id="development-open" type="button"><i data-lucide="external-link"></i>Open local app</button>
|
|
78
91
|
</div>
|
|
79
92
|
<section class="activity" aria-labelledby="development-activity-title">
|
|
80
93
|
<div class="activity-heading"><h2 id="development-activity-title">Activity</h2><button id="development-clear-log" class="text-button" type="button">Clear</button></div>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gasboost/console",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.4.1",
|
|
4
|
+
"description": "gasboost project lifecycle console",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"lucide": "^0.544.0",
|
|
22
22
|
"zod": "^4.1.12",
|
|
23
23
|
"@gasboost/config": "0.1.1",
|
|
24
|
-
"@gasboost/console-runtime": "0.1.
|
|
24
|
+
"@gasboost/console-runtime": "0.1.1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "^24.13.4",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
:root{color:#17211b;font-synthesis:none;background:#f4f6f4;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}[hidden]{display:none!important}body{min-width:320px;min-height:100vh;margin:0}button,input,textarea{font:inherit}.topbar{color:#fff;background:#15271e;border-bottom:1px solid #294235;align-items:center;gap:12px;height:64px;padding:0 24px;display:flex}.brand-mark{color:#15271e;background:#e8ff6a;border-radius:6px;place-items:center;width:34px;height:34px;font-weight:800;display:grid}.product-name{font-size:14px;font-weight:700}.project-path{text-overflow:ellipsis;white-space:nowrap;color:#aabbb1;max-width:min(60vw,680px);font:12px ui-monospace,SFMono-Regular,Menlo,monospace;overflow:hidden}.icon-button{color:#fff;cursor:pointer;background:0 0;border:1px solid #496052;border-radius:6px;place-items:center;width:36px;height:36px;margin-left:auto;display:grid}.icon-button:hover{background:#294235}.icon-button:disabled{opacity:.5;cursor:wait}.icon-button svg{width:17px;height:17px}.icon-button.light{color:#26352c;background:#fff;border-color:#cbd5ce;margin-left:0}.icon-button.light:hover{background:#edf2ee}.status-band{background:#fff;border-bottom:1px solid #dce2de;justify-content:space-between;align-items:center;gap:24px;min-height:112px;padding:24px clamp(24px,5vw,72px);display:flex}.eyebrow{color:#668071;font-size:11px;font-weight:800}h1,h2,h3,p{letter-spacing:0;margin:0}h1{margin-top:5px;font-size:28px;line-height:1.2}.runtime-status{color:#526158;align-items:center;font-size:13px;font-weight:650;display:flex}.runtime-status span{background:#e0a526;border-radius:50%;width:8px;height:8px}.runtime-status.ready span{background:#28a264}.runtime-status.error span{background:#d54c4c}.workspace{grid-template-columns:220px minmax(0,1fr);min-height:calc(100vh - 176px);display:grid}.sidebar{background:#e9eeea;border-right:1px solid #d5ddd7;padding:18px 12px}.nav-item{color:#46554c;text-align:left;background:0 0;border:0;border-radius:5px;align-items:center;gap:10px;width:100%;height:40px;padding:0 12px;display:flex}.nav-item svg{width:17px;height:17px}.nav-item.active{color:#17211b;background:#fff;font-weight:700;box-shadow:0 1px 2px #11231914}.nav-item:disabled{opacity:.55}.content{width:min(960px,100%);padding:32px clamp(24px,5vw,64px) 56px}.section-heading{justify-content:space-between;align-items:end;margin-bottom:18px;display:flex}h2{margin-top:4px;font-size:20px;line-height:1.3}.capability-list,.status-list{background:#fff;border:1px solid #d8dfda;border-radius:7px;overflow:hidden}.capability-row,.status-row{border-bottom:1px solid #e4e9e5;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:15px;min-height:82px;padding:16px 18px;display:grid}.capability-row:last-child,.status-row:last-child{border-bottom:0}.capability-icon{border-radius:6px;place-items:center;width:40px;height:40px;display:grid}.capability-icon svg{width:19px;height:19px}.capability-icon.apps{color:#2659a8;background:#e7f0ff}.capability-icon.firebase{color:#9a5c00;background:#fff1d6}.capability-icon.account{color:#16705c;background:#e3f5ef}h3{font-size:14px}.capability-row p{color:#6c7971;margin-top:4px;font-size:12px}.badge{color:#66736b;text-align:center;background:#f6f8f6;border:1px solid #d7ded9;border-radius:4px;min-width:94px;padding:5px 8px;font-size:11px;font-weight:700}.badge.configured{color:#137145;background:#e9f8f0;border-color:#a9dbc1}.badge.inactive{color:#68736c}.mono-detail{text-overflow:ellipsis;white-space:nowrap;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;overflow:hidden}.action-bar{flex-wrap:wrap;gap:8px;margin-top:18px;display:flex}.command-button,.secondary-button{color:#26352c;cursor:pointer;background:#fff;border:1px solid #c9d3cc;border-radius:5px;justify-content:center;align-items:center;gap:7px;min-height:36px;padding:0 13px;font-size:12px;font-weight:700;display:inline-flex}.button{cursor:pointer;border:0;border-radius:5px;justify-content:center;align-items:center;gap:7px;min-height:39px;padding:0 17px;font-size:12px;font-weight:700;display:inline-flex}.button svg{width:15px;height:15px}.button--primary{color:#17211b;background:#e8ff6a}.button--primary:hover:not(:disabled){background:#efff91}.button:disabled{opacity:.4;cursor:not-allowed}.command-button svg,.secondary-button svg{width:15px;height:15px}.command-button:hover,.secondary-button:hover{background:#edf2ee}.command-button.primary{color:#17211b;background:#e8ff6a;border-color:#d0e54d}.command-button.danger{color:#fff;background:#bd4141;border-color:#ae3737}.command-button:disabled{opacity:.45;cursor:not-allowed}.setup-mode{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:22px;display:grid}.setup-mode__button{color:#17211b;text-align:left;cursor:pointer;background:#fff;border:1px solid #d8dfda;border-radius:7px;flex-direction:column;gap:7px;min-height:96px;padding:16px;display:flex}.setup-mode__button:hover{background:#f8faf8}.setup-mode__button--active{background:#f8ffe5;border-color:#adc238;box-shadow:0 0 0 1px #adc23829}.setup-mode__button strong{font-size:13px}.setup-mode__button span{color:#6c7971;font-size:11px;line-height:1.55}.panel{background:#fff;border:1px solid #d8dfda;border-radius:7px;flex-direction:column;gap:14px;margin-top:14px;padding:16px;display:flex}.info-box{color:#5d6b62;background:#f7faf8;border:1px solid #d8dfda;border-radius:7px;align-items:flex-start;gap:11px;padding:14px;font-size:12px;line-height:1.6;display:flex}.info-box__icon{color:#3c7c9d;border:1px solid #3c7c9d;border-radius:999px;flex:none;place-items:center;width:18px;height:18px;font-family:serif;font-size:12px;font-weight:700;display:grid}.field{flex-direction:column;gap:8px;margin-top:18px;display:flex}.panel .field{margin-top:0}.field__label{color:#526158;font-size:12px;font-weight:700}.field input{color:#17211b;background:#fff;border:1px solid #bfcac2;border-radius:5px;width:100%;height:40px;padding:0 11px;font:13px ui-monospace,SFMono-Regular,Menlo,monospace}.field input:focus{outline-offset:1px;outline:2px solid #bdd43f}.field__help{color:#6c7971;margin:0;font-size:11px;line-height:1.55}.required{color:#bd4141}.activity{margin-top:30px}.activity-heading{justify-content:space-between;align-items:center;margin-bottom:12px;display:flex}.text-button{color:#446052;cursor:pointer;background:0 0;border:0;font-size:12px;font-weight:700}.log{color:#dce8e0;background:#18241d;border-radius:6px;height:180px;padding:8px 0;font:12px/1.6 ui-monospace,SFMono-Regular,Menlo,monospace;overflow:auto}.log-row{grid-template-columns:84px 1fr;gap:10px;padding:4px 14px;display:grid}.log-row time{color:#789083}.log-row.progress span{color:#e8ff6a}.log-row.error span{color:#ff9b9b}dialog{color:#17211b;border:1px solid #ccd6cf;border-radius:7px;width:min(440px,100vw - 32px);padding:0;box-shadow:0 20px 60px #12221938}dialog::backdrop{background:#0f1c147a}dialog form{padding:20px}.dialog-heading{justify-content:space-between;align-items:center;margin-bottom:20px;display:flex}.dialog-close{color:#536158;cursor:pointer;background:0 0;border:0;place-items:center;width:32px;height:32px;display:grid}.dialog-close svg{width:18px;height:18px}dialog label{color:#526158;margin-bottom:7px;font-size:12px;font-weight:700;display:block}dialog input{color:#17211b;width:100%;height:40px;font:inherit;border:1px solid #bfcac2;border-radius:5px;padding:0 11px}dialog input:focus{outline-offset:1px;outline:2px solid #bdd43f}.dialog-copy{color:#5d6b62;font-size:13px;line-height:1.6}.dialog-actions{justify-content:flex-end;gap:8px;margin-top:24px;display:flex}@media (width<=700px){.topbar{padding:0 16px}.status-band{min-height:104px;padding:20px}h1{font-size:23px}.workspace{grid-template-columns:1fr}.sidebar{border-bottom:1px solid #d5ddd7;border-right:0;padding:8px;display:flex;overflow-x:auto}.nav-item{width:auto;min-width:max-content}.content{padding:24px 16px 40px}.capability-row,.status-row{grid-template-columns:40px minmax(0,1fr)}.badge{grid-column:2;justify-self:start}.action-bar{grid-template-columns:1fr 1fr;display:grid}}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},t=([e,n,r])=>{let i=document.createElementNS(`http://www.w3.org/2000/svg`,e);return Object.keys(n).forEach(e=>{i.setAttribute(e,String(n[e]))}),r?.length&&r.forEach(e=>{let n=t(e);i.appendChild(n)}),i},n=(n,r={})=>t([`svg`,{...e,...r},n]),r=e=>Array.from(e.attributes).reduce((e,t)=>(e[t.name]=t.value,e),{}),i=e=>typeof e==`string`?e:!e||!e.class?``:e.class&&typeof e.class==`string`?e.class.split(` `):e.class&&Array.isArray(e.class)?e.class:``,a=e=>e.flatMap(i).map(e=>e.trim()).filter(Boolean).filter((e,t,n)=>n.indexOf(e)===t).join(` `),ee=e=>e.replace(/(\w)(\w*)(_|-|\s*)/g,(e,t,n)=>t.toUpperCase()+n.toLowerCase()),o=(t,{nameAttr:i,icons:o,attrs:s})=>{let c=t.getAttribute(i);if(c==null)return;let l=o[ee(c)];if(!l)return console.warn(`${t.outerHTML} icon name was not found in the provided icons object.`);let u=r(t),d={...e,"data-lucide":c,...s,...u},f=a([`lucide`,`lucide-${c}`,u,s]);f&&Object.assign(d,{class:f});let te=n(l,d);return t.parentNode?.replaceChild(te,t)},s=[[`path`,{d:`m18 16 4-4-4-4`}],[`path`,{d:`m6 8-4 4 4 4`}],[`path`,{d:`m14.5 4-5 16`}]],c=[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`}]],l=[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`M10 14 21 3`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}]],u=[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`}],[`path`,{d:`m5 12-3 3 3 3`}],[`path`,{d:`m9 18 3-3-3-3`}]],d=[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`}]],f=[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`}]],te=[[`path`,{d:`m10 17 5-5-5-5`}],[`path`,{d:`M15 12H3`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`}]],ne=[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`}]],re=[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]],ie=[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}],[`path`,{d:`M8 16H3v5`}]],ae=[[`path`,{d:`M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z`}],[`path`,{d:`m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z`}],[`path`,{d:`M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0`}],[`path`,{d:`M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5`}]],oe=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}]],se=[[`path`,{d:`M12 3v12`}],[`path`,{d:`m17 8-5-5-5 5`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}]],ce=[[`circle`,{cx:`12`,cy:`8`,r:`5`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`}]],le=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]],ue=({icons:e={},nameAttr:t=`data-lucide`,attrs:n={},root:r=document}={})=>{if(!Object.values(e).length)throw Error(`Please provide an icons object.
|
|
2
|
-
If you want to use all the icons you can import it like:
|
|
3
|
-
\`import { createIcons, icons } from 'lucide';
|
|
4
|
-
lucide.createIcons({icons});\``);if(r===void 0)throw Error("`createIcons()` only works in a browser environment.");let i=r.querySelectorAll(`[${t}]`);if(Array.from(i).forEach(r=>o(r,{nameAttr:t,icons:e,attrs:n})),t===`data-lucide`){let t=r.querySelectorAll(`[icon-name]`);t.length>0&&(console.warn(`[Lucide] Some icons were found with the now deprecated icon-name attribute. These will still be replaced for backwards compatibility, but will no longer be supported in v1.0 and you should switch to data-lucide`),Array.from(t).forEach(t=>o(t,{nameAttr:`icon-name`,icons:e,attrs:n})))}},de=xe(),p,m,h,g=`existing`;ue({icons:{Code2:s,Database:c,ExternalLink:l,FileCode2:u,KeyRound:d,LayoutDashboard:f,LogIn:te,Play:ne,Plus:re,RefreshCw:ie,Rocket:ae,Square:oe,Upload:se,UserRound:ce,X:le}});var _=$(`refresh`),v=$(`log`),y=$(`apps-log`),b=$(`deployment-log`),x=$(`firebase-log`),fe=$(`development-log`),S={overview:$(`overview-nav`),development:$(`development-nav`),"apps-script":$(`apps-script-nav`),deployment:$(`deployment-nav`),firebase:$(`firebase-nav`)},C=$(`apps-login`),w=$(`apps-create`),T=$(`apps-connect`),pe=$(`apps-user-settings`),E=$(`apps-open`),D=$(`apps-push`),O=$(`apps-pull`),k=$(`credential-service-account`),A=$(`credential-script-properties`),j=$(`deployment-list`),M=$(`deployment-create`),N=$(`deployment-update`),P=$(`deployment-open`),F=$(`firebase-enable`),I=$(`firebase-login`),L=$(`firebase-connect`),R=$(`firebase-rules-deploy`),z=$(`firebase-open`);_.addEventListener(`click`,()=>void B()),$(`clear-log`).addEventListener(`click`,()=>v.replaceChildren()),$(`apps-clear-log`).addEventListener(`click`,()=>y.replaceChildren()),$(`deployment-clear-log`).addEventListener(`click`,()=>b.replaceChildren()),$(`firebase-clear-log`).addEventListener(`click`,()=>x.replaceChildren()),$(`development-clear-log`).addEventListener(`click`,()=>fe.replaceChildren());for(let[e,t]of Object.entries(S))t.addEventListener(`click`,()=>{ve(e),e===`apps-script`&&V(),e===`deployment`&&V(),e===`firebase`&&H()});$(`apps-refresh`).addEventListener(`click`,()=>void V()),$(`deployment-refresh`).addEventListener(`click`,()=>void V()),$(`firebase-refresh`).addEventListener(`click`,()=>void H());for(let e of document.querySelectorAll(`[data-setup-mode]`))e.addEventListener(`click`,()=>{g=e.dataset.setupMode===`new`?`new`:`existing`,_e()});C.addEventListener(`click`,()=>void U(`apps.login`,{},y,K)),pe.addEventListener(`click`,()=>window.open(`https://script.google.com/home/usersettings`,`_blank`,`noopener`)),w.addEventListener(`click`,()=>{let e=$(`script-title`);e.value=p?.name??``,$(`create-dialog`).showModal(),e.focus()}),T.addEventListener(`click`,()=>{U(`apps.connect`,{scriptId:$(`script-id`).value.trim()},y,K)}),E.addEventListener(`click`,()=>void U(`apps.open`,{},y,()=>void 0)),D.addEventListener(`click`,()=>$(`push-dialog`).showModal()),O.addEventListener(`click`,()=>Z(y,`Pull is reserved for a follow-up operation.`,`info`)),k.addEventListener(`click`,()=>{let e=h?.projectId;e!==void 0&&window.open(`https://console.firebase.google.com/project/${encodeURIComponent(e)}/settings/serviceaccounts/adminsdk`,`_blank`,`noopener`)}),A.addEventListener(`click`,()=>{let e=m?.scriptId;e!==void 0&&window.open(`https://script.google.com/home/projects/${encodeURIComponent(e)}/settings`,`_blank`,`noopener`)}),j.addEventListener(`click`,()=>void U(`apps.deployments`,{},b,e=>{Z(b,e.deployments.length===0?`No deployments returned`:e.deployments.map(e=>`${e.deploymentId}${e.description===void 0?``:` (${e.description})`}`).join(`, `),`info`)})),M.addEventListener(`click`,()=>$(`deployment-dialog`).showModal()),N.addEventListener(`click`,()=>void U(`apps.deployment.update`,{deploymentId:$(`deployment-id`).value.trim()||void 0},b,()=>void V())),P.addEventListener(`click`,()=>{let e=m?.deploymentId??$(`deployment-id`).value.trim();e.length>0&&window.open(`https://script.google.com/macros/s/${e}/exec`,`_blank`,`noopener`)}),F.addEventListener(`click`,()=>void U(`firebase.enable`,{},x,q)),I.addEventListener(`click`,()=>void U(`firebase.login`,{},x,q)),L.addEventListener(`click`,()=>{U(`firebase.connect`,{projectId:$(`firebase-project-id`).value.trim()},x,q)}),R.addEventListener(`click`,()=>void U(`firebase.rules.deploy`,{},x,()=>void H())),z.addEventListener(`click`,()=>window.open(`https://console.firebase.google.com/`,`_blank`,`noopener`)),$(`create-form`).addEventListener(`submit`,e=>{e.preventDefault();let t=$(`create-dialog`),n=$(`script-title`).value;t.close(),U(`apps.create`,{title:n},y,K)}),$(`push-form`).addEventListener(`submit`,e=>{e.preventDefault(),$(`push-dialog`).close(),U(`apps.push`,{confirmed:!0},y,()=>void V())}),$(`deployment-form`).addEventListener(`submit`,e=>{e.preventDefault(),$(`deployment-dialog`).close(),U(`apps.deployment.create`,{description:$(`deployment-description`).value.trim()||void 0},b,()=>void V())});for(let e of document.querySelectorAll(`[data-close-dialog]`))e.addEventListener(`click`,()=>{let t=e.dataset.closeDialog;t!==void 0&&$(t).close()});B();async function B(){await me(),await Promise.all([V(),H()])}async function me(){_.disabled=!0,X(`running`,`Inspecting`),Z(v,`Inspecting project definition`,`info`);try{await G(`project.inspect`,{},W(v,e=>{p=e,ge(e)})),X(`ready`,`Ready`)}catch(e){X(`error`,`Error`),Q(v,e)}finally{_.disabled=!1}}async function V(){await U(`apps.status`,{},y,K)}async function H(){await U(`firebase.status`,{},x,q)}async function U(e,t,n,r){ye(!0),X(`running`,`Working`);try{await G(e,t,W(n,r)),X(`ready`,`Ready`)}catch(e){X(`error`,`Error`),Q(n,e)}finally{ye(!1)}}function W(e,t){return{log:t=>Z(e,t,`info`),progress:(t,n)=>Z(e,n===void 0?t:`${t} (${n}%)`,`progress`),result:t}}async function G(e,t,n){let r=await fetch(`/api/operations/${encodeURIComponent(e)}`,{method:`POST`,headers:{"Content-Type":`application/json`,"X-Gasboost-Session":de},body:JSON.stringify(t)});if(!r.ok||r.body===null){let e=await r.json().catch(()=>null);throw Error(e?.error??`Operation failed with status ${r.status}`)}let i=r.body.pipeThrough(new TextDecoderStream).getReader(),a=``;for(;;){let{done:e,value:t}=await i.read();a+=t??``;let r=a.split(`
|
|
5
|
-
|
|
6
|
-
`);a=r.pop()??``;for(let e of r)he(e,n);if(e)break}}function he(e,t){let n=/^event: (.+)$/m.exec(e)?.[1],r=/^data: (.+)$/m.exec(e)?.[1];if(n===void 0||r===void 0)return;let i=JSON.parse(r);if(n===`log`&&typeof i.message==`string`)t.log(i.message);else if(n===`progress`&&typeof i.message==`string`)t.progress(i.message,typeof i.percentage==`number`?i.percentage:void 0);else if(n===`result`)t.result(i);else if(n===`error`)throw Error(typeof i.message==`string`?i.message:`Operation failed`)}function ge(e){$(`project-title`).textContent=e.name,$(`project-path`).textContent=e.root,be(`apps-script-status`,e.capabilities.appsScript),be(`firebase-status`,e.capabilities.firebaseRealtimeDatabase)}function K(e){m=e,Y(`apps-auth-status`,e.authenticated,`Authorized`,`Sign in required`),Y(`apps-project-status`,e.configured,`Connected`,`Not initialized`),Y(`apps-manifest-status`,e.manifestExists,`Found`,`Missing`),Y(`deployment-project-status`,e.configured,`Ready`,`Prerequisite`),$(`apps-account-detail`).textContent=e.authenticated?`clasp authorization available`:`No clasp authorization found`,$(`apps-project-detail`).textContent=e.configured?`${e.scriptId??`Connected`} · ${e.rootDir}`:`Local source: ${e.rootDir}`,$(`apps-manifest-detail`).textContent=e.manifestExists?`appsscript.json exists in project root`:`Manifest was not detected at project root`,$(`deployment-project-detail`).textContent=e.configured?`Script ID: ${e.scriptId??`connected`}`:`Create or connect an Apps Script project first`,$(`deployment-id`).value=e.deploymentId??``,Y(`deployment-id-status`,e.deploymentId!==void 0,`Selected`,`Not selected`),$(`deployment-id-detail`).textContent=e.deploymentId===void 0?`No deployment synced to .env`:e.deploymentId,_e(),J()}function q(e){h=e,Y(`firebase-enabled-status`,e.enabled,`Enabled`,`Not enabled`),Y(`firebase-auth-status`,e.authenticated,`Authorized`,`Sign in required`),Y(`firebase-project-status`,e.configured,`Connected`,`Not connected`),$(`firebase-enabled-detail`).textContent=e.enabled?`Local Firebase configuration detected`:`Enable Firebase to create local configuration`,$(`firebase-auth-detail`).textContent=e.authenticated?`Firebase CLI authorization available`:`No Firebase CLI authorization found`,$(`firebase-project-detail`).textContent=e.projectId===void 0?`No project ID synced to .env`:e.projectId,$(`firebase-project-id`).value=e.projectId??``,J()}function _e(){for(let e of document.querySelectorAll(`[data-setup-mode]`))e.classList.toggle(`setup-mode__button--active`,e.dataset.setupMode===g);$(`apps-create-panel`).hidden=g!==`new`,$(`apps-connect-panel`).hidden=g!==`existing`}function ve(e){for(let t of Object.keys(S))$(`${t}-view`).hidden=t!==e,S[t].classList.toggle(`active`,t===e)}function ye(e){if(e)for(let e of document.querySelectorAll(`button`))e.classList.contains(`nav-item`)||(e.disabled=!0);else J()}function J(){let e=m?.authenticated===!0,t=m?.configured===!0;C.disabled=e,w.disabled=!e||t,T.disabled=!e||t,E.disabled=!e||!t,D.disabled=!e||!t,O.disabled=!e||!t,k.disabled=h?.projectId===void 0,A.disabled=m?.scriptId===void 0,j.disabled=!e||!t,M.disabled=!e||!t,N.disabled=!e||!t,P.disabled=(m?.deploymentId??$(`deployment-id`).value).length===0,I.disabled=h?.authenticated===!0,F.disabled=h?.enabled===!0,L.disabled=!1,R.disabled=h?.configured!==!0,z.disabled=!1,_.disabled=!1;for(let e of Object.values(S))e.disabled=!1}function be(e,t){Y(e,t,`Configured`,`Not configured`)}function Y(e,t,n,r){let i=$(e);i.textContent=t?n:r,i.className=`badge ${t?`configured`:`inactive`}`}function X(e,t){let n=$(`runtime-status`);n.className=`runtime-status ${e}`,n.innerHTML=``;let r=document.createElement(`span`);n.append(r,document.createTextNode(` ${t}`))}function Z(e,t,n){let r=document.createElement(`div`);r.className=`log-row ${n}`;let i=document.createElement(`time`);i.textContent=new Date().toLocaleTimeString();let a=document.createElement(`span`);a.textContent=t,r.append(i,a),e.append(r),e.scrollTop=e.scrollHeight}function Q(e,t){Z(e,t instanceof Error?t.message:`Operation failed`,`error`)}function $(e){let t=document.getElementById(e);if(t===null)throw Error(`Missing UI element: ${e}`);return t}function xe(){let e=document.querySelector(`meta[name="gasboost-session"]`)?.content;if(e===void 0||e.length===0)throw Error(`Console session was not initialized`);return e}
|