@gasboost/console 0.1.0 → 0.2.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/README.md +4 -0
- package/dist/appsScript/ClaspRunner.d.ts +10 -0
- package/dist/appsScript/ClaspRunner.d.ts.map +1 -0
- package/dist/appsScript/ClaspRunner.js +56 -0
- package/dist/appsScript/ClaspRunner.js.map +1 -0
- package/dist/appsScript/appsScriptOperations.d.ts +17 -0
- package/dist/appsScript/appsScriptOperations.d.ts.map +1 -0
- package/dist/appsScript/appsScriptOperations.js +131 -0
- package/dist/appsScript/appsScriptOperations.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/startGasboostConsole.d.ts +3 -1
- package/dist/startGasboostConsole.d.ts.map +1 -1
- package/dist/startGasboostConsole.js +16 -2
- package/dist/startGasboostConsole.js.map +1 -1
- package/dist/ui/assets/index-B2QLlRZv.css +1 -0
- package/dist/ui/assets/index-Bv7Miq39.js +6 -0
- package/dist/ui/index.html +54 -5
- package/package.json +3 -2
- package/dist/ui/assets/index-BSvEhLfS.css +0 -1
- package/dist/ui/assets/index-OcWauX8w.js +0 -6
package/README.md
CHANGED
|
@@ -7,3 +7,7 @@ gasboost console open
|
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
The UI is prebuilt and bundled with this package. Projects do not need a Vite configuration for the Console.
|
|
10
|
+
|
|
11
|
+
When `appsScript` is configured, the Console provides authorization status,
|
|
12
|
+
project creation, editor opening, and confirmed file pushes through registered
|
|
13
|
+
operations backed by `@google/clasp`.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ClaspResult = {
|
|
2
|
+
readonly exitCode: number;
|
|
3
|
+
readonly stdout: string;
|
|
4
|
+
readonly stderr: string;
|
|
5
|
+
};
|
|
6
|
+
export type ClaspRunner = {
|
|
7
|
+
readonly run: (args: readonly string[], onOutput?: (line: string) => void) => Promise<ClaspResult>;
|
|
8
|
+
};
|
|
9
|
+
export declare function createClaspRunner(projectRoot: string): ClaspRunner;
|
|
10
|
+
//# sourceMappingURL=ClaspRunner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClaspRunner.d.ts","sourceRoot":"","sources":["../../src/appsScript/ClaspRunner.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,QAAQ,CAAC,GAAG,EAAE,CACZ,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,KAC9B,OAAO,CAAC,WAAW,CAAC,CAAC;CAC3B,CAAC;AAEF,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,CAkClE"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
export function createClaspRunner(projectRoot) {
|
|
4
|
+
const claspEntry = fileURLToPath(import.meta.resolve("@google/clasp"));
|
|
5
|
+
return {
|
|
6
|
+
run: (args, onOutput) => new Promise((resolve, reject) => {
|
|
7
|
+
const child = spawn(process.execPath, [claspEntry, ...args], {
|
|
8
|
+
cwd: projectRoot,
|
|
9
|
+
env: { ...process.env, NO_COLOR: "1" },
|
|
10
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
11
|
+
});
|
|
12
|
+
let stdout = "";
|
|
13
|
+
let stderr = "";
|
|
14
|
+
const stdoutLines = createLineEmitter(onOutput);
|
|
15
|
+
const stderrLines = createLineEmitter(onOutput);
|
|
16
|
+
child.stdout.setEncoding("utf8");
|
|
17
|
+
child.stderr.setEncoding("utf8");
|
|
18
|
+
child.stdout.on("data", (chunk) => {
|
|
19
|
+
stdout += chunk;
|
|
20
|
+
stdoutLines.write(chunk);
|
|
21
|
+
});
|
|
22
|
+
child.stderr.on("data", (chunk) => {
|
|
23
|
+
stderr += chunk;
|
|
24
|
+
stderrLines.write(chunk);
|
|
25
|
+
});
|
|
26
|
+
child.once("error", reject);
|
|
27
|
+
child.once("close", (exitCode) => {
|
|
28
|
+
stdoutLines.flush();
|
|
29
|
+
stderrLines.flush();
|
|
30
|
+
resolve({ exitCode: exitCode ?? 1, stdout, stderr });
|
|
31
|
+
});
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
function createLineEmitter(onOutput) {
|
|
36
|
+
let buffer = "";
|
|
37
|
+
const emit = (line) => {
|
|
38
|
+
const message = line.trim();
|
|
39
|
+
if (message.length > 0)
|
|
40
|
+
onOutput?.(message);
|
|
41
|
+
};
|
|
42
|
+
return {
|
|
43
|
+
write(chunk) {
|
|
44
|
+
buffer += chunk;
|
|
45
|
+
const lines = buffer.split(/\r?\n/);
|
|
46
|
+
buffer = lines.pop() ?? "";
|
|
47
|
+
for (const line of lines)
|
|
48
|
+
emit(line);
|
|
49
|
+
},
|
|
50
|
+
flush() {
|
|
51
|
+
emit(buffer);
|
|
52
|
+
buffer = "";
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=ClaspRunner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClaspRunner.js","sourceRoot":"","sources":["../../src/appsScript/ClaspRunner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAezC,MAAM,UAAU,iBAAiB,CAAC,WAAmB;IACnD,MAAM,UAAU,GAAG,aAAa,CA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AAI,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,EAAE;gBAC/B,WAAW,CAAC,KAAK,EAAE,CAAC;gBACpB,WAAW,CAAC,KAAK,EAAE,CAAC;gBACpB,OAAO,CAAC,EAAE,QAAQ,EAAE,QAAQ,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;YACvD,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;KACL,CAAC;AACJ,CAAC;AAED,SAAS,iBAAiB,CACxB,QAA8C;IAE9C,IAAI,MAAM,GAAG,EAAE,CAAC;IAChB,MAAM,IAAI,GAAG,CAAC,IAAY,EAAQ,EAAE;QAClC,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5B,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;YAAE,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC;IAC9C,CAAC,CAAC;IAEF,OAAO;QACL,KAAK,CAAC,KAAK;YACT,MAAM,IAAI,KAAK,CAAC;YAChB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACpC,MAAM,GAAG,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC;YAC3B,KAAK,MAAM,IAAI,IAAI,KAAK;gBAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACvC,CAAC;QACD,KAAK;YACH,IAAI,CAAC,MAAM,CAAC,CAAC;YACb,MAAM,GAAG,EAAE,CAAC;QACd,CAAC;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { GasboostAppsScriptConfig } from "@gasboost/config";
|
|
2
|
+
import type { OperationDefinition } from "@gasboost/console-runtime";
|
|
3
|
+
import type { ClaspRunner } from "./ClaspRunner.js";
|
|
4
|
+
export type AppsScriptStatus = {
|
|
5
|
+
readonly authenticated: boolean;
|
|
6
|
+
readonly configured: boolean;
|
|
7
|
+
readonly scriptId?: string;
|
|
8
|
+
readonly rootDir: string;
|
|
9
|
+
};
|
|
10
|
+
type AppsScriptOperation = OperationDefinition<any, unknown>;
|
|
11
|
+
export declare function createAppsScriptOperations({ projectRoot, config, clasp, }: {
|
|
12
|
+
readonly projectRoot: string;
|
|
13
|
+
readonly config: GasboostAppsScriptConfig;
|
|
14
|
+
readonly clasp: ClaspRunner;
|
|
15
|
+
}): readonly AppsScriptOperation[];
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=appsScriptOperations.d.ts.map
|
|
@@ -0,0 +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,EAEV,mBAAmB,EACpB,MAAM,2BAA2B,CAAC;AAInC,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;CAC1B,CAAC;AAEF,KAAK,mBAAmB,GAAG,mBAAmB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;AAU7D,wBAAgB,0BAA0B,CAAC,EACzC,WAAW,EACX,MAAM,EACN,KAAK,GACN,EAAE;IACD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;CAC7B,GAAG,SAAS,mBAAmB,EAAE,CA0EjC"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
const emptyInput = z.object({}).strict();
|
|
5
|
+
const createInput = z
|
|
6
|
+
.object({
|
|
7
|
+
title: z.string().trim().min(1).max(100),
|
|
8
|
+
})
|
|
9
|
+
.strict();
|
|
10
|
+
const pushInput = z.object({ confirmed: z.literal(true) }).strict();
|
|
11
|
+
export function createAppsScriptOperations({ projectRoot, config, clasp, }) {
|
|
12
|
+
const status = async () => getAppsScriptStatus({ projectRoot, config, clasp });
|
|
13
|
+
return [
|
|
14
|
+
{
|
|
15
|
+
id: "apps.status",
|
|
16
|
+
input: emptyInput,
|
|
17
|
+
async handler(_input, context) {
|
|
18
|
+
context.progress({ message: "Checking Apps Script", percentage: 25 });
|
|
19
|
+
const result = await status();
|
|
20
|
+
context.progress({ message: "Apps Script ready", percentage: 100 });
|
|
21
|
+
return result;
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: "apps.login",
|
|
26
|
+
input: emptyInput,
|
|
27
|
+
async handler(_input, context) {
|
|
28
|
+
context.progress({ message: "Starting Google authorization" });
|
|
29
|
+
const result = await clasp.run(["login"], context.log);
|
|
30
|
+
assertClaspSuccess("Apps Script authorization", result);
|
|
31
|
+
context.progress({ message: "Authorization complete", percentage: 100 });
|
|
32
|
+
return status();
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: "apps.create",
|
|
37
|
+
input: createInput,
|
|
38
|
+
async handler(input, context) {
|
|
39
|
+
const current = await readProjectSettings(projectRoot, config);
|
|
40
|
+
if (current.configured) {
|
|
41
|
+
throw new Error("An Apps Script project is already configured.");
|
|
42
|
+
}
|
|
43
|
+
context.progress({ message: "Creating Apps Script project", percentage: 20 });
|
|
44
|
+
const args = [
|
|
45
|
+
"create-script",
|
|
46
|
+
"--type",
|
|
47
|
+
config.type,
|
|
48
|
+
"--title",
|
|
49
|
+
input.title,
|
|
50
|
+
"--rootDir",
|
|
51
|
+
config.rootDir ?? ".",
|
|
52
|
+
];
|
|
53
|
+
const result = await clasp.run(args, context.log);
|
|
54
|
+
assertClaspSuccess("Apps Script project creation", result);
|
|
55
|
+
context.progress({ message: "Apps Script project created", percentage: 100 });
|
|
56
|
+
return status();
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: "apps.open",
|
|
61
|
+
input: emptyInput,
|
|
62
|
+
async handler(_input, context) {
|
|
63
|
+
await assertProjectConfigured(projectRoot, config);
|
|
64
|
+
const result = await clasp.run(["open-script"], context.log);
|
|
65
|
+
assertClaspSuccess("Opening Apps Script editor", result);
|
|
66
|
+
return { opened: true };
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
id: "apps.push",
|
|
71
|
+
input: pushInput,
|
|
72
|
+
async handler(_input, context) {
|
|
73
|
+
await assertProjectConfigured(projectRoot, config);
|
|
74
|
+
context.progress({ message: "Pushing local files", percentage: 20 });
|
|
75
|
+
const result = await clasp.run(["push", "--force"], context.log);
|
|
76
|
+
assertClaspSuccess("Apps Script push", result);
|
|
77
|
+
context.progress({ message: "Push complete", percentage: 100 });
|
|
78
|
+
return { pushed: true };
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
];
|
|
82
|
+
}
|
|
83
|
+
async function getAppsScriptStatus({ projectRoot, config, clasp, }) {
|
|
84
|
+
const [project, authorization] = await Promise.all([
|
|
85
|
+
readProjectSettings(projectRoot, config),
|
|
86
|
+
clasp.run(["show-authorized-user", "--json"]),
|
|
87
|
+
]);
|
|
88
|
+
return {
|
|
89
|
+
authenticated: authorization.exitCode === 0,
|
|
90
|
+
configured: project.configured,
|
|
91
|
+
...(project.scriptId === undefined ? {} : { scriptId: project.scriptId }),
|
|
92
|
+
rootDir: project.rootDir,
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
async function readProjectSettings(projectRoot, config) {
|
|
96
|
+
const fallback = { configured: false, rootDir: config.rootDir ?? "." };
|
|
97
|
+
try {
|
|
98
|
+
const value = JSON.parse(await readFile(join(projectRoot, ".clasp.json"), "utf8"));
|
|
99
|
+
if (typeof value.scriptId !== "string" || value.scriptId.length === 0) {
|
|
100
|
+
return fallback;
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
configured: true,
|
|
104
|
+
scriptId: value.scriptId,
|
|
105
|
+
rootDir: typeof value.rootDir === "string"
|
|
106
|
+
? value.rootDir
|
|
107
|
+
: (config.rootDir ?? "."),
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
if (typeof error === "object" &&
|
|
112
|
+
error !== null &&
|
|
113
|
+
"code" in error &&
|
|
114
|
+
error.code === "ENOENT") {
|
|
115
|
+
return fallback;
|
|
116
|
+
}
|
|
117
|
+
throw new Error(".clasp.json exists but does not contain valid project settings.", { cause: error });
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
async function assertProjectConfigured(projectRoot, config) {
|
|
121
|
+
if (!(await readProjectSettings(projectRoot, config)).configured) {
|
|
122
|
+
throw new Error("Create or connect an Apps Script project first.");
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function assertClaspSuccess(action, result) {
|
|
126
|
+
if (result.exitCode === 0)
|
|
127
|
+
return;
|
|
128
|
+
const diagnostic = result.stderr.trim() || result.stdout.trim();
|
|
129
|
+
throw new Error(diagnostic.length === 0 ? `${action} failed.` : `${action} failed: ${diagnostic}`);
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=appsScriptOperations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appsScriptOperations.js","sourceRoot":"","sources":["../../src/appsScript/appsScriptOperations.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAYx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KAAK,EAAE,KAAK,EAAE,CACjB,CAAC;IACJ,CAAC;AACH,CAAC;AAED,KAAK,UAAU,uBAAuB,CACpC,WAAmB,EACnB,MAAgC;IAEhC,IAAI,CAAC,CAAC,MAAM,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;QACjE,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;IACrE,CAAC;AACH,CAAC;AAED,SAAS,kBAAkB,CAAC,MAAc,EAAE,MAAmB;IAC7D,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC;QAAE,OAAO;IAClC,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IAChE,MAAM,IAAI,KAAK,CACb,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,MAAM,UAAU,CAAC,CAAC,CAAC,GAAG,MAAM,YAAY,UAAU,EAAE,CAClF,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { createProjectInspectOperation, type ProjectState, } from "./projectInspectOperation.js";
|
|
2
2
|
export { startGasboostConsole } from "./startGasboostConsole.js";
|
|
3
|
+
export { createAppsScriptOperations, type AppsScriptStatus, } from "./appsScript/appsScriptOperations.js";
|
|
4
|
+
export { createClaspRunner, type ClaspResult, type ClaspRunner, } from "./appsScript/ClaspRunner.js";
|
|
3
5
|
//# 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"}
|
|
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"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { createProjectInspectOperation, } from "./projectInspectOperation.js";
|
|
2
2
|
export { startGasboostConsole } from "./startGasboostConsole.js";
|
|
3
|
+
export { createAppsScriptOperations, } from "./appsScript/appsScriptOperations.js";
|
|
4
|
+
export { createClaspRunner, } from "./appsScript/ClaspRunner.js";
|
|
3
5
|
//# 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"}
|
|
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"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type ConsoleRuntime } from "@gasboost/console-runtime";
|
|
2
|
-
|
|
2
|
+
import type { ClaspRunner } from "./appsScript/ClaspRunner.js";
|
|
3
|
+
export declare function startGasboostConsole({ projectRoot, openBrowser, clasp, }: {
|
|
3
4
|
readonly projectRoot: string;
|
|
4
5
|
readonly openBrowser?: boolean;
|
|
6
|
+
readonly clasp?: ClaspRunner;
|
|
5
7
|
}): Promise<ConsoleRuntime>;
|
|
6
8
|
//# sourceMappingURL=startGasboostConsole.d.ts.map
|
|
@@ -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,wBAAsB,oBAAoB,CAAC,EACzC,WAAW,EACX,WAAkB,
|
|
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;AAG/D,wBAAsB,oBAAoB,CAAC,EACzC,WAAW,EACX,WAAkB,EAClB,KAAsC,GACvC,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;CAC9B,GAAG,OAAO,CAAC,cAAc,CAAC,CAmB1B"}
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import { startConsoleRuntime, } from "@gasboost/console-runtime";
|
|
2
2
|
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { createAppsScriptOperations } from "./appsScript/appsScriptOperations.js";
|
|
4
|
+
import { createClaspRunner } from "./appsScript/ClaspRunner.js";
|
|
3
5
|
import { createProjectInspectOperation } from "./projectInspectOperation.js";
|
|
4
|
-
export async function startGasboostConsole({ projectRoot, openBrowser = true, }) {
|
|
6
|
+
export async function startGasboostConsole({ projectRoot, openBrowser = true, clasp = createClaspRunner(projectRoot), }) {
|
|
7
|
+
const config = await loadGasboostConfig({ projectRoot });
|
|
8
|
+
const appsScriptOperations = config.appsScript === undefined
|
|
9
|
+
? []
|
|
10
|
+
: createAppsScriptOperations({
|
|
11
|
+
projectRoot,
|
|
12
|
+
config: config.appsScript,
|
|
13
|
+
clasp,
|
|
14
|
+
});
|
|
5
15
|
return startConsoleRuntime({
|
|
6
16
|
uiDirectory: fileURLToPath(new URL("./ui", import.meta.url)),
|
|
7
|
-
operations: [
|
|
17
|
+
operations: [
|
|
18
|
+
createProjectInspectOperation(projectRoot),
|
|
19
|
+
...appsScriptOperations,
|
|
20
|
+
],
|
|
8
21
|
openBrowser,
|
|
9
22
|
});
|
|
10
23
|
}
|
|
24
|
+
import { loadGasboostConfig } from "@gasboost/config";
|
|
11
25
|
//# 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,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAE7E,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,EACzC,WAAW,EACX,WAAW,GAAG,IAAI,
|
|
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,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAE7E,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,EACzC,WAAW,EACX,WAAW,GAAG,IAAI,EAClB,KAAK,GAAG,iBAAiB,CAAC,WAAW,CAAC,GAKvC;IACC,MAAM,MAAM,GAAG,MAAM,kBAAkB,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC;IACzD,MAAM,oBAAoB,GACxB,MAAM,CAAC,UAAU,KAAK,SAAS;QAC7B,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,0BAA0B,CAAC;YACzB,WAAW;YACX,MAAM,EAAE,MAAM,CAAC,UAAU;YACzB,KAAK;SACN,CAAC,CAAC;IAET,OAAO,mBAAmB,CAAC;QACzB,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,oBAAoB;SACxB;QACD,WAAW;KACZ,CAAC,CAAC;AACL,CAAC;AACD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
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{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}.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}.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}}
|
|
@@ -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(` `),o=e=>e.replace(/(\w)(\w*)(_|-|\s*)/g,(e,t,n)=>t.toUpperCase()+n.toLowerCase()),s=(t,{nameAttr:i,icons:s,attrs:c})=>{let l=t.getAttribute(i);if(l==null)return;let u=s[o(l)];if(!u)return console.warn(`${t.outerHTML} icon name was not found in the provided icons object.`);let d=r(t),f={...e,"data-lucide":l,...c,...d},p=a([`lucide`,`lucide-${l}`,d,c]);p&&Object.assign(f,{class:p});let m=n(u,f);return t.parentNode?.replaceChild(m,t)},c=[[`path`,{d:`m18 16 4-4-4-4`}],[`path`,{d:`m6 8-4 4 4 4`}],[`path`,{d:`m14.5 4-5 16`}]],l=[[`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`}]],u=[[`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`}]],d=[[`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`}]],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`}]],p=[[`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`}]],m=[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]],h=[[`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`}]],g=[[`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`}]],_=[[`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`}]],v=[[`circle`,{cx:`12`,cy:`8`,r:`5`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`}]],y=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]],b=({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=>s(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=>s(t,{nameAttr:`icon-name`,icons:e,attrs:n})))}},x=X(),S,C;b({icons:{Code2:c,Database:l,ExternalLink:u,FileCode2:d,LayoutDashboard:f,LogIn:p,Plus:m,RefreshCw:h,Rocket:g,Upload:_,UserRound:v,X:y}});var w=Y(`refresh`),T=Y(`overview-nav`),E=Y(`apps-script-nav`),D=Y(`log`),O=Y(`apps-log`),k=Y(`apps-login`),A=Y(`apps-create`),j=Y(`apps-open`),M=Y(`apps-push`);w.addEventListener(`click`,()=>void N()),Y(`clear-log`).addEventListener(`click`,()=>D.replaceChildren()),Y(`apps-clear-log`).addEventListener(`click`,()=>O.replaceChildren()),T.addEventListener(`click`,()=>V(`overview`)),E.addEventListener(`click`,()=>{V(`apps-script`),P()}),Y(`apps-refresh`).addEventListener(`click`,()=>void P()),k.addEventListener(`click`,()=>void F(`apps.login`,{},B)),A.addEventListener(`click`,()=>{let e=Y(`script-title`);e.value=S?.name??``,Y(`create-dialog`).showModal(),e.focus()}),j.addEventListener(`click`,()=>void F(`apps.open`,{},()=>void 0)),M.addEventListener(`click`,()=>Y(`push-dialog`).showModal()),Y(`create-form`).addEventListener(`submit`,e=>{e.preventDefault();let t=Y(`create-dialog`),n=Y(`script-title`).value;t.close(),F(`apps.create`,{title:n},B)}),Y(`push-form`).addEventListener(`submit`,e=>{e.preventDefault(),Y(`push-dialog`).close(),F(`apps.push`,{confirmed:!0},()=>void P())});for(let e of document.querySelectorAll(`[data-close-dialog]`))e.addEventListener(`click`,()=>{let t=e.dataset.closeDialog;t!==void 0&&Y(t).close()});N();async function N(){w.disabled=!0,K(`running`,`Inspecting`),q(D,`Inspecting project definition`,`info`);try{await L(`project.inspect`,{},I(D,e=>{S=e,z(e)})),K(`ready`,`Ready`)}catch(e){K(`error`,`Error`),J(D,e)}finally{w.disabled=!1}}async function P(){await F(`apps.status`,{},B)}async function F(e,t,n){H(!0),K(`running`,`Working`);try{await L(e,t,I(O,n)),K(`ready`,`Ready`)}catch(e){K(`error`,`Error`),J(O,e)}finally{H(!1)}}function I(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 L(e,t,n){let r=await fetch(`/api/operations/${encodeURIComponent(e)}`,{method:`POST`,headers:{"Content-Type":`application/json`,"X-Gasboost-Session":x},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)R(e,n);if(e)break}}function R(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 z(e){Y(`project-title`).textContent=e.name,Y(`project-path`).textContent=e.root,W(`apps-script-status`,e.capabilities.appsScript),W(`firebase-status`,e.capabilities.firebaseRealtimeDatabase),E.disabled=!e.capabilities.appsScript}function B(e){C=e,G(`apps-auth-status`,e.authenticated,`Authorized`,`Sign in required`),G(`apps-project-status`,e.configured,`Connected`,`Not created`),Y(`apps-account-detail`).textContent=e.authenticated?`clasp authorization available`:`No clasp authorization found`,Y(`apps-project-detail`).textContent=e.configured?`${e.scriptId??`Connected`} · ${e.rootDir}`:`Local source: ${e.rootDir}`,U()}function V(e){Y(`overview-view`).hidden=e!==`overview`,Y(`apps-script-view`).hidden=e!==`apps-script`,T.classList.toggle(`active`,e===`overview`),E.classList.toggle(`active`,e===`apps-script`)}function H(e){if(e)for(let e of[k,A,j,M])e.disabled=!0;else U()}function U(){let e=C?.authenticated===!0,t=C?.configured===!0;k.disabled=e,A.disabled=!e||t,j.disabled=!e||!t,M.disabled=!e||!t}function W(e,t){G(e,t,`Configured`,`Not configured`)}function G(e,t,n,r){let i=Y(e);i.textContent=t?n:r,i.className=`badge ${t?`configured`:`inactive`}`}function K(e,t){let n=Y(`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 J(e,t){q(e,t instanceof Error?t.message:`Operation failed`,`error`)}function Y(e){let t=document.getElementById(e);if(t===null)throw Error(`Missing UI element: ${e}`);return t}function X(){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}
|
package/dist/ui/index.html
CHANGED
|
@@ -5,8 +5,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
7
|
<title>Gasboost Console</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Bv7Miq39.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-B2QLlRZv.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<header class="topbar">
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
|
|
32
32
|
<section class="workspace" aria-label="Project lifecycle">
|
|
33
33
|
<nav class="sidebar" aria-label="Console sections">
|
|
34
|
-
<button class="nav-item active" type="button"><i data-lucide="layout-dashboard"></i>Overview</button>
|
|
34
|
+
<button class="nav-item active" id="overview-nav" type="button"><i data-lucide="layout-dashboard"></i>Overview</button>
|
|
35
35
|
<button class="nav-item" type="button" disabled><i data-lucide="code-2"></i>Development</button>
|
|
36
|
-
<button class="nav-item" type="button" disabled><i data-lucide="file-code-2"></i>Apps Script</button>
|
|
36
|
+
<button class="nav-item" id="apps-script-nav" type="button" disabled><i data-lucide="file-code-2"></i>Apps Script</button>
|
|
37
37
|
<button class="nav-item" type="button" disabled><i data-lucide="rocket"></i>Deployment</button>
|
|
38
38
|
<button class="nav-item" type="button" disabled><i data-lucide="database"></i>Firebase</button>
|
|
39
39
|
</nav>
|
|
40
40
|
|
|
41
|
-
<div class="content">
|
|
41
|
+
<div class="content" id="overview-view">
|
|
42
42
|
<div class="section-heading">
|
|
43
43
|
<div>
|
|
44
44
|
<div class="eyebrow">OVERVIEW</div>
|
|
@@ -64,7 +64,56 @@
|
|
|
64
64
|
<div class="log" id="log" role="log" aria-live="polite"></div>
|
|
65
65
|
</section>
|
|
66
66
|
</div>
|
|
67
|
+
|
|
68
|
+
<div class="content" id="apps-script-view" hidden>
|
|
69
|
+
<div class="section-heading">
|
|
70
|
+
<div><div class="eyebrow">APPS SCRIPT</div><h2>Project lifecycle</h2></div>
|
|
71
|
+
<button class="icon-button light" id="apps-refresh" type="button" title="Refresh Apps Script status" aria-label="Refresh Apps Script status"><i data-lucide="refresh-cw"></i></button>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<div class="status-list">
|
|
75
|
+
<div class="status-row">
|
|
76
|
+
<div class="capability-icon account"><i data-lucide="user-round"></i></div>
|
|
77
|
+
<div><h3>Google account</h3><p id="apps-account-detail">Checking authorization</p></div>
|
|
78
|
+
<div class="badge" id="apps-auth-status">Checking</div>
|
|
79
|
+
</div>
|
|
80
|
+
<div class="status-row">
|
|
81
|
+
<div class="capability-icon apps"><i data-lucide="file-code-2"></i></div>
|
|
82
|
+
<div><h3>Script project</h3><p class="mono-detail" id="apps-project-detail">Checking project</p></div>
|
|
83
|
+
<div class="badge" id="apps-project-status">Checking</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div class="action-bar" aria-label="Apps Script actions">
|
|
88
|
+
<button class="command-button" id="apps-login" type="button"><i data-lucide="log-in"></i>Sign in</button>
|
|
89
|
+
<button class="command-button" id="apps-create" type="button"><i data-lucide="plus"></i>Create project</button>
|
|
90
|
+
<button class="command-button" id="apps-open" type="button"><i data-lucide="external-link"></i>Open editor</button>
|
|
91
|
+
<button class="command-button primary" id="apps-push" type="button"><i data-lucide="upload"></i>Push files</button>
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<section class="activity" aria-labelledby="apps-activity-title">
|
|
95
|
+
<div class="activity-heading"><h2 id="apps-activity-title">Activity</h2><button id="apps-clear-log" class="text-button" type="button">Clear</button></div>
|
|
96
|
+
<div class="log" id="apps-log" role="log" aria-live="polite"></div>
|
|
97
|
+
</section>
|
|
98
|
+
</div>
|
|
67
99
|
</section>
|
|
68
100
|
</main>
|
|
101
|
+
|
|
102
|
+
<dialog id="create-dialog">
|
|
103
|
+
<form id="create-form">
|
|
104
|
+
<div class="dialog-heading"><h2>Create Apps Script project</h2><button class="dialog-close" type="button" data-close-dialog="create-dialog" aria-label="Close"><i data-lucide="x"></i></button></div>
|
|
105
|
+
<label for="script-title">Project title</label>
|
|
106
|
+
<input id="script-title" name="title" maxlength="100" required />
|
|
107
|
+
<div class="dialog-actions"><button class="secondary-button" type="button" data-close-dialog="create-dialog">Cancel</button><button class="command-button primary" type="submit"><i data-lucide="plus"></i>Create</button></div>
|
|
108
|
+
</form>
|
|
109
|
+
</dialog>
|
|
110
|
+
|
|
111
|
+
<dialog id="push-dialog">
|
|
112
|
+
<form id="push-form">
|
|
113
|
+
<div class="dialog-heading"><h2>Push local files?</h2><button class="dialog-close" type="button" data-close-dialog="push-dialog" aria-label="Close"><i data-lucide="x"></i></button></div>
|
|
114
|
+
<p class="dialog-copy">Remote Apps Script content will be replaced by the local project files.</p>
|
|
115
|
+
<div class="dialog-actions"><button class="secondary-button" type="button" data-close-dialog="push-dialog">Cancel</button><button class="command-button danger" type="submit"><i data-lucide="upload"></i>Push and replace</button></div>
|
|
116
|
+
</form>
|
|
117
|
+
</dialog>
|
|
69
118
|
</body>
|
|
70
119
|
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gasboost/console",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Gasboost project lifecycle console",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -17,9 +17,10 @@
|
|
|
17
17
|
"node": ">=24"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
+
"@google/clasp": "^3.4.1",
|
|
20
21
|
"lucide": "^0.544.0",
|
|
21
22
|
"zod": "^4.1.12",
|
|
22
|
-
"@gasboost/config": "0.1.
|
|
23
|
+
"@gasboost/config": "0.1.1",
|
|
23
24
|
"@gasboost/console-runtime": "0.1.0"
|
|
24
25
|
},
|
|
25
26
|
"devDependencies": {
|
|
@@ -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}body{min-width:320px;min-height:100vh;margin:0}button{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}.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{background:#fff;border:1px solid #d8dfda;border-radius:7px;overflow:hidden}.capability-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{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}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}.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}@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{grid-template-columns:40px minmax(0,1fr)}.badge{grid-column:2;justify-self:start}}
|
|
@@ -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(` `),o=e=>e.replace(/(\w)(\w*)(_|-|\s*)/g,(e,t,n)=>t.toUpperCase()+n.toLowerCase()),s=(t,{nameAttr:i,icons:s,attrs:c})=>{let l=t.getAttribute(i);if(l==null)return;let u=s[o(l)];if(!u)return console.warn(`${t.outerHTML} icon name was not found in the provided icons object.`);let d=r(t),f={...e,"data-lucide":l,...c,...d},p=a([`lucide`,`lucide-${l}`,d,c]);p&&Object.assign(f,{class:p});let m=n(u,f);return t.parentNode?.replaceChild(m,t)},c=[[`path`,{d:`m18 16 4-4-4-4`}],[`path`,{d:`m6 8-4 4 4 4`}],[`path`,{d:`m14.5 4-5 16`}]],l=[[`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`}]],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=[[`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`}]],f=[[`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`}]],p=[[`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`}]],m=({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=>s(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=>s(t,{nameAttr:`icon-name`,icons:e,attrs:n})))}},h=D();m({icons:{Code2:c,Database:l,FileCode2:u,LayoutDashboard:d,RefreshCw:f,Rocket:p}});var g=E(`refresh`),_=E(`clear-log`),v=E(`log`);g.addEventListener(`click`,()=>void y()),_.addEventListener(`click`,()=>{v.replaceChildren()}),y();async function y(){g.disabled=!0,w(`running`,`Inspecting`),T(`Inspecting project definition`,`info`);try{await b(`project.inspect`,{},{log:e=>T(e,`info`),progress:(e,t)=>T(t===void 0?e:`${e} (${t}%)`,`progress`),result:S}),w(`ready`,`Ready`)}catch(e){w(`error`,`Error`),T(e instanceof Error?e.message:`Operation failed`,`error`)}finally{g.disabled=!1}}async function b(e,t,n){let r=await fetch(`/api/operations/${encodeURIComponent(e)}`,{method:`POST`,headers:{"Content-Type":`application/json`,"X-Gasboost-Session":h},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)x(e,n);if(e)break}}function x(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 S(e){E(`project-title`).textContent=e.name,E(`project-path`).textContent=e.root,C(`apps-script-status`,e.capabilities.appsScript),C(`firebase-status`,e.capabilities.firebaseRealtimeDatabase)}function C(e,t){let n=E(e);n.textContent=t?`Configured`:`Not configured`,n.className=`badge ${t?`configured`:`inactive`}`}function w(e,t){let n=E(`runtime-status`);n.className=`runtime-status ${e}`,n.innerHTML=``;let r=document.createElement(`span`);n.append(r,document.createTextNode(` ${t}`))}function T(e,t){let n=document.createElement(`div`);n.className=`log-row ${t}`;let r=document.createElement(`time`);r.textContent=new Date().toLocaleTimeString();let i=document.createElement(`span`);i.textContent=e,n.append(r,i),v.append(n),v.scrollTop=v.scrollHeight}function E(e){let t=document.getElementById(e);if(t===null)throw Error(`Missing UI element: ${e}`);return t}function D(){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}
|