@gasboost/console 0.5.1 → 0.6.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/dist/appsScript/AppsScriptManifestRepository.d.ts +26 -0
- package/dist/appsScript/AppsScriptManifestRepository.d.ts.map +1 -0
- package/dist/appsScript/AppsScriptManifestRepository.js +112 -0
- package/dist/appsScript/AppsScriptManifestRepository.js.map +1 -0
- package/dist/appsScript/AppsScriptProjectRepository.js +1 -1
- package/dist/appsScript/AppsScriptProjectRepository.js.map +1 -1
- package/dist/appsScript/appsScriptOperations.d.ts +9 -2
- package/dist/appsScript/appsScriptOperations.d.ts.map +1 -1
- package/dist/appsScript/appsScriptOperations.js +123 -6
- package/dist/appsScript/appsScriptOperations.js.map +1 -1
- 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/ui/assets/index-D7HaxSO6.js +6 -0
- package/dist/ui/assets/index-DYh1QN-t.css +1 -0
- package/dist/ui/index.html +46 -2
- package/package.json +1 -1
- package/dist/ui/assets/index-B6Dn-OF9.css +0 -1
- package/dist/ui/assets/index-H_m8-YrC.js +0 -6
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const deploymentTypes: readonly ["webapp", "executionApi"];
|
|
2
|
+
export declare const deploymentAccessValues: readonly ["MYSELF", "DOMAIN", "ANYONE", "ANYONE_ANONYMOUS"];
|
|
3
|
+
export declare const webAppExecuteAsValues: readonly ["USER_ACCESSING", "USER_DEPLOYING"];
|
|
4
|
+
export type DeploymentType = (typeof deploymentTypes)[number];
|
|
5
|
+
export type DeploymentAccess = (typeof deploymentAccessValues)[number];
|
|
6
|
+
export type WebAppExecuteAs = (typeof webAppExecuteAsValues)[number];
|
|
7
|
+
export type DeploymentConfiguration = {
|
|
8
|
+
readonly type: "webapp";
|
|
9
|
+
readonly access: DeploymentAccess;
|
|
10
|
+
readonly executeAs: WebAppExecuteAs;
|
|
11
|
+
} | {
|
|
12
|
+
readonly type: "executionApi";
|
|
13
|
+
readonly access: DeploymentAccess;
|
|
14
|
+
};
|
|
15
|
+
export declare class AppsScriptManifestRepository {
|
|
16
|
+
private readonly path;
|
|
17
|
+
constructor(projectRoot: string);
|
|
18
|
+
readDeploymentConfiguration(fallbackType?: DeploymentType): Promise<{
|
|
19
|
+
readonly exists: boolean;
|
|
20
|
+
readonly configuration: DeploymentConfiguration;
|
|
21
|
+
readonly source: "manifest" | "default";
|
|
22
|
+
}>;
|
|
23
|
+
updateDeploymentConfiguration(configuration: DeploymentConfiguration): Promise<DeploymentConfiguration>;
|
|
24
|
+
private read;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=AppsScriptManifestRepository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppsScriptManifestRepository.d.ts","sourceRoot":"","sources":["../../src/appsScript/AppsScriptManifestRepository.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,eAAe,YAAI,QAAQ,EAAE,cAAc,CAAU,CAAC;AACnE,eAAO,MAAM,sBAAsB,YACjC,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,kBAAkB,CACV,CAAC;AACX,eAAO,MAAM,qBAAqB,YAChC,gBAAgB,EAChB,gBAAgB,CACR,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAC9D,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AACvE,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAErE,MAAM,MAAM,uBAAuB,GAC/B;IACE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;IAClC,QAAQ,CAAC,SAAS,EAAE,eAAe,CAAC;CACrC,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAC;IAC9B,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAC;CACnC,CAAC;AAqBN,qBAAa,4BAA4B;IACvC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAS;IAE9B,YAAmB,WAAW,EAAE,MAAM,EAErC;IAEY,2BAA2B,CACtC,YAAY,GAAE,cAAyB,GACtC,OAAO,CAAC;QACT,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;QACzB,QAAQ,CAAC,aAAa,EAAE,uBAAuB,CAAC;QAChD,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,SAAS,CAAC;KACzC,CAAC,CAgBD;IAEY,6BAA6B,CACxC,aAAa,EAAE,uBAAuB,GACrC,OAAO,CAAC,uBAAuB,CAAC,CAiBlC;YAEa,IAAI;CAuBnB"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
export const deploymentTypes = ["webapp", "executionApi"];
|
|
4
|
+
export const deploymentAccessValues = [
|
|
5
|
+
"MYSELF",
|
|
6
|
+
"DOMAIN",
|
|
7
|
+
"ANYONE",
|
|
8
|
+
"ANYONE_ANONYMOUS",
|
|
9
|
+
];
|
|
10
|
+
export const webAppExecuteAsValues = [
|
|
11
|
+
"USER_ACCESSING",
|
|
12
|
+
"USER_DEPLOYING",
|
|
13
|
+
];
|
|
14
|
+
const defaultWebAppConfiguration = {
|
|
15
|
+
type: "webapp",
|
|
16
|
+
access: "ANYONE",
|
|
17
|
+
executeAs: "USER_DEPLOYING",
|
|
18
|
+
};
|
|
19
|
+
const defaultExecutionApiConfiguration = {
|
|
20
|
+
type: "executionApi",
|
|
21
|
+
access: "ANYONE",
|
|
22
|
+
};
|
|
23
|
+
export class AppsScriptManifestRepository {
|
|
24
|
+
path;
|
|
25
|
+
constructor(projectRoot) {
|
|
26
|
+
this.path = join(projectRoot, "appsscript.json");
|
|
27
|
+
}
|
|
28
|
+
async readDeploymentConfiguration(fallbackType = "webapp") {
|
|
29
|
+
const manifest = await this.read();
|
|
30
|
+
if (manifest === undefined) {
|
|
31
|
+
return {
|
|
32
|
+
exists: false,
|
|
33
|
+
configuration: defaultConfiguration(fallbackType),
|
|
34
|
+
source: "default",
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
const configuration = parseDeploymentConfiguration(manifest);
|
|
38
|
+
return {
|
|
39
|
+
exists: true,
|
|
40
|
+
configuration: configuration ?? defaultConfiguration(fallbackType),
|
|
41
|
+
source: configuration === undefined ? "default" : "manifest",
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
async updateDeploymentConfiguration(configuration) {
|
|
45
|
+
const manifest = (await this.read()) ?? {};
|
|
46
|
+
if (configuration.type === "webapp") {
|
|
47
|
+
manifest.webapp = {
|
|
48
|
+
access: configuration.access,
|
|
49
|
+
executeAs: configuration.executeAs,
|
|
50
|
+
};
|
|
51
|
+
delete manifest.executionApi;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
manifest.executionApi = {
|
|
55
|
+
access: configuration.access,
|
|
56
|
+
};
|
|
57
|
+
delete manifest.webapp;
|
|
58
|
+
}
|
|
59
|
+
await writeFile(this.path, `${JSON.stringify(manifest, null, 2)}\n`, "utf8");
|
|
60
|
+
return configuration;
|
|
61
|
+
}
|
|
62
|
+
async read() {
|
|
63
|
+
try {
|
|
64
|
+
const value = JSON.parse(await readFile(this.path, "utf8"));
|
|
65
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) {
|
|
66
|
+
throw new Error("Expected a JSON object.");
|
|
67
|
+
}
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
if (typeof error === "object" &&
|
|
72
|
+
error !== null &&
|
|
73
|
+
"code" in error &&
|
|
74
|
+
error.code === "ENOENT") {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
throw new Error("appsscript.json exists but does not contain a valid manifest object.", { cause: error });
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function parseDeploymentConfiguration(manifest) {
|
|
82
|
+
if (isRecord(manifest.webapp)) {
|
|
83
|
+
return {
|
|
84
|
+
type: "webapp",
|
|
85
|
+
access: parseAccess(manifest.webapp.access) ?? defaultWebAppConfiguration.access,
|
|
86
|
+
executeAs: parseExecuteAs(manifest.webapp.executeAs) ?? defaultWebAppConfiguration.executeAs,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
if (isRecord(manifest.executionApi)) {
|
|
90
|
+
return {
|
|
91
|
+
type: "executionApi",
|
|
92
|
+
access: parseAccess(manifest.executionApi.access) ??
|
|
93
|
+
defaultExecutionApiConfiguration.access,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
return undefined;
|
|
97
|
+
}
|
|
98
|
+
function defaultConfiguration(type) {
|
|
99
|
+
return type === "executionApi"
|
|
100
|
+
? defaultExecutionApiConfiguration
|
|
101
|
+
: defaultWebAppConfiguration;
|
|
102
|
+
}
|
|
103
|
+
function parseAccess(value) {
|
|
104
|
+
return deploymentAccessValues.find((candidate) => candidate === value);
|
|
105
|
+
}
|
|
106
|
+
function parseExecuteAs(value) {
|
|
107
|
+
return webAppExecuteAsValues.find((candidate) => candidate === value);
|
|
108
|
+
}
|
|
109
|
+
function isRecord(value) {
|
|
110
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=AppsScriptManifestRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppsScriptManifestRepository.js","sourceRoot":"","sources":["../../src/appsScript/AppsScriptManifestRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,M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 @@ export class AppsScriptProjectRepository {
|
|
|
9
9
|
}
|
|
10
10
|
async read() {
|
|
11
11
|
const settings = await this.readClaspSettings();
|
|
12
|
-
const manifestExists = await this.exists(join(this.projectRoot,
|
|
12
|
+
const manifestExists = await this.exists(join(this.projectRoot, "appsscript.json"));
|
|
13
13
|
return { ...settings, manifestExists };
|
|
14
14
|
}
|
|
15
15
|
async connect(scriptId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppsScriptProjectRepository.js","sourceRoot":"","sources":["../../src/appsScript/AppsScriptProjectRepository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AASjC,MAAM,OAAO,2BAA2B;IACrB,WAAW,CAAS;IACpB,MAAM,CAA2B;IAElD,YAAmB,EACjB,WAAW,EACX,MAAM,GAIP;QACC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAEM,KAAK,CAAC,IAAI;QACf,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,iBAAiB,EAAE,CAAC;QAChD,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,MAAM,CACtC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"AppsScriptProjectRepository.js","sourceRoot":"","sources":["../../src/appsScript/AppsScriptProjectRepository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AASjC,MAAM,OAAO,2BAA2B;IACrB,WAAW,CAAS;IACpB,MAAM,CAA2B;IAElD,YAAmB,EACjB,WAAW,EACX,MAAM,GAIP;QACC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;QAC/B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AAI;gBACd,MAAM,IAAI,KAAK;gBACf,KAAK,CAAC,IAAI,KAAK,QAAQ,EACvB,CAAC;gBACD,OAAO,KAAK,CAAC;YACf,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;CACF"}
|
|
@@ -1,20 +1,27 @@
|
|
|
1
1
|
import type { GasboostAppsScriptConfig } from "@gasboost/config";
|
|
2
2
|
import type { OperationDefinition } from "@gasboost/console-runtime";
|
|
3
|
-
import type
|
|
3
|
+
import { type DeploymentConfiguration } from "./AppsScriptManifestRepository.js";
|
|
4
|
+
import type { ClaspResult, ClaspRunner } from "./ClaspRunner.js";
|
|
4
5
|
export type AppsScriptStatus = {
|
|
5
6
|
readonly authenticated: boolean;
|
|
6
7
|
readonly configured: boolean;
|
|
7
8
|
readonly scriptId?: string;
|
|
8
9
|
readonly rootDir: string;
|
|
9
10
|
readonly manifestExists: boolean;
|
|
11
|
+
readonly deploymentConfiguration: DeploymentConfiguration;
|
|
12
|
+
readonly deploymentConfigurationSource: "manifest" | "default";
|
|
10
13
|
readonly desired: boolean;
|
|
11
14
|
readonly deploymentId?: string;
|
|
12
15
|
};
|
|
13
16
|
type AppsScriptOperation = OperationDefinition<any, unknown>;
|
|
14
|
-
|
|
17
|
+
type BuildRunner = {
|
|
18
|
+
readonly run: (onOutput?: (line: string) => void) => Promise<ClaspResult>;
|
|
19
|
+
};
|
|
20
|
+
export declare function createAppsScriptOperations({ projectRoot, config, clasp, build, browserOpener, }: {
|
|
15
21
|
readonly projectRoot: string;
|
|
16
22
|
readonly config?: GasboostAppsScriptConfig;
|
|
17
23
|
readonly clasp: ClaspRunner;
|
|
24
|
+
readonly build?: BuildRunner;
|
|
18
25
|
readonly browserOpener?: (url: string) => Promise<void>;
|
|
19
26
|
}): readonly AppsScriptOperation[];
|
|
20
27
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appsScriptOperations.d.ts","sourceRoot":"","sources":["../../src/appsScript/appsScriptOper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C,WAAW,EACX,MAAM,EACN,KAAK,EACL,KAAsC,EACtC,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,KAAK,CAAC,EAAE,WAAW,CAAC;IAC7B,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACzD,GAAG,SAAS,mBAAmB,EAAE,CAoKjC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { spawn } from "node:child_process";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { join } from "node:path";
|
|
1
4
|
import { z } from "zod";
|
|
2
5
|
import { EnvFileRepository } from "../env/EnvFileRepository.js";
|
|
3
6
|
import { openBrowser } from "../openBrowser.js";
|
|
7
|
+
import { AppsScriptManifestRepository, deploymentAccessValues, webAppExecuteAsValues, } from "./AppsScriptManifestRepository.js";
|
|
4
8
|
import { AppsScriptProjectRepository } from "./AppsScriptProjectRepository.js";
|
|
5
9
|
const emptyInput = z.object({}).strict();
|
|
6
10
|
const createInput = z
|
|
@@ -25,19 +29,37 @@ const updateDeploymentInput = z
|
|
|
25
29
|
description: z.string().trim().max(120).optional(),
|
|
26
30
|
})
|
|
27
31
|
.strict();
|
|
32
|
+
const deploymentConfigurationInput = z.discriminatedUnion("type", [
|
|
33
|
+
z
|
|
34
|
+
.object({
|
|
35
|
+
type: z.literal("webapp"),
|
|
36
|
+
access: z.enum(deploymentAccessValues),
|
|
37
|
+
executeAs: z.enum(webAppExecuteAsValues),
|
|
38
|
+
})
|
|
39
|
+
.strict(),
|
|
40
|
+
z
|
|
41
|
+
.object({
|
|
42
|
+
type: z.literal("executionApi"),
|
|
43
|
+
access: z.enum(deploymentAccessValues),
|
|
44
|
+
})
|
|
45
|
+
.strict(),
|
|
46
|
+
]);
|
|
28
47
|
const defaultAppsScriptConfig = { type: "webapp" };
|
|
29
|
-
export function createAppsScriptOperations({ projectRoot, config, clasp, browserOpener = openBrowser, }) {
|
|
48
|
+
export function createAppsScriptOperations({ projectRoot, config, clasp, build = createBuildRunner(projectRoot), browserOpener = openBrowser, }) {
|
|
30
49
|
const effectiveConfig = config ?? defaultAppsScriptConfig;
|
|
31
50
|
const projectRepository = new AppsScriptProjectRepository({
|
|
32
51
|
projectRoot,
|
|
33
52
|
config: effectiveConfig,
|
|
34
53
|
});
|
|
54
|
+
const manifestRepository = new AppsScriptManifestRepository(projectRoot);
|
|
35
55
|
const envRepository = new EnvFileRepository(projectRoot);
|
|
36
56
|
const status = async () => getAppsScriptStatus({
|
|
37
57
|
configDesired: config !== undefined,
|
|
38
58
|
projectRepository,
|
|
59
|
+
manifestRepository,
|
|
39
60
|
envRepository,
|
|
40
61
|
clasp,
|
|
62
|
+
fallbackDeploymentType: effectiveConfig.type,
|
|
41
63
|
});
|
|
42
64
|
return [
|
|
43
65
|
{
|
|
@@ -112,9 +134,12 @@ export function createAppsScriptOperations({ projectRoot, config, clasp, browser
|
|
|
112
134
|
input: pushInput,
|
|
113
135
|
async handler(_input, context) {
|
|
114
136
|
await assertProjectConfigured(projectRepository);
|
|
115
|
-
context.progress({ message: "
|
|
137
|
+
context.progress({ message: "Building deployment artifact", percentage: 20 });
|
|
138
|
+
const buildResult = await build.run(context.log);
|
|
139
|
+
assertCommandSuccess("Build", buildResult);
|
|
140
|
+
context.progress({ message: "Pushing built files", percentage: 70 });
|
|
116
141
|
const result = await clasp.run(["push", "--force"], context.log);
|
|
117
|
-
|
|
142
|
+
assertCommandSuccess("Apps Script push", result);
|
|
118
143
|
context.progress({ message: "Push complete", percentage: 100 });
|
|
119
144
|
return { pushed: true };
|
|
120
145
|
},
|
|
@@ -129,6 +154,19 @@ export function createAppsScriptOperations({ projectRoot, config, clasp, browser
|
|
|
129
154
|
return parseDeployments(result.stdout);
|
|
130
155
|
},
|
|
131
156
|
},
|
|
157
|
+
{
|
|
158
|
+
id: "apps.deployment.configuration.update",
|
|
159
|
+
input: deploymentConfigurationInput,
|
|
160
|
+
async handler(input, context) {
|
|
161
|
+
context.progress({ message: "Saving deployment manifest", percentage: 40 });
|
|
162
|
+
const configuration = await manifestRepository.updateDeploymentConfiguration(input);
|
|
163
|
+
context.progress({ message: "Deployment manifest saved", percentage: 100 });
|
|
164
|
+
return {
|
|
165
|
+
configuration,
|
|
166
|
+
status: await status(),
|
|
167
|
+
};
|
|
168
|
+
},
|
|
169
|
+
},
|
|
132
170
|
{
|
|
133
171
|
id: "apps.deployment.create",
|
|
134
172
|
input: createDeploymentInput,
|
|
@@ -169,10 +207,11 @@ export function createAppsScriptOperations({ projectRoot, config, clasp, browser
|
|
|
169
207
|
},
|
|
170
208
|
];
|
|
171
209
|
}
|
|
172
|
-
async function getAppsScriptStatus({ configDesired, projectRepository, envRepository, clasp, }) {
|
|
173
|
-
const [project, authorization] = await Promise.all([
|
|
210
|
+
async function getAppsScriptStatus({ configDesired, projectRepository, manifestRepository, envRepository, clasp, fallbackDeploymentType, }) {
|
|
211
|
+
const [project, authorization, deploymentManifest] = await Promise.all([
|
|
174
212
|
projectRepository.read(),
|
|
175
213
|
clasp.run(["show-authorized-user", "--json"]),
|
|
214
|
+
manifestRepository.readDeploymentConfiguration(fallbackDeploymentType),
|
|
176
215
|
]);
|
|
177
216
|
if (project.scriptId !== undefined) {
|
|
178
217
|
await envRepository.update({ GAS_SCRIPT_ID: project.scriptId });
|
|
@@ -183,7 +222,9 @@ async function getAppsScriptStatus({ configDesired, projectRepository, envReposi
|
|
|
183
222
|
configured: project.configured,
|
|
184
223
|
...(project.scriptId === undefined ? {} : { scriptId: project.scriptId }),
|
|
185
224
|
rootDir: project.rootDir,
|
|
186
|
-
manifestExists:
|
|
225
|
+
manifestExists: deploymentManifest.exists,
|
|
226
|
+
deploymentConfiguration: deploymentManifest.configuration,
|
|
227
|
+
deploymentConfigurationSource: deploymentManifest.source,
|
|
187
228
|
desired: configDesired,
|
|
188
229
|
...(runtime.DEPLOYMENT_ID === undefined
|
|
189
230
|
? {}
|
|
@@ -198,6 +239,9 @@ async function assertProjectConfigured(projectRepository) {
|
|
|
198
239
|
return { scriptId: project.scriptId };
|
|
199
240
|
}
|
|
200
241
|
function assertClaspSuccess(action, result) {
|
|
242
|
+
assertCommandSuccess(action, result);
|
|
243
|
+
}
|
|
244
|
+
function assertCommandSuccess(action, result) {
|
|
201
245
|
if (result.exitCode === 0)
|
|
202
246
|
return;
|
|
203
247
|
const diagnostic = result.stderr.trim() || result.stdout.trim();
|
|
@@ -238,4 +282,77 @@ function parseDeployments(stdout) {
|
|
|
238
282
|
function extractDeploymentId(stdout) {
|
|
239
283
|
return /(?:Deployment ID|deploymentId)[:\s]+([A-Za-z0-9_-]+)/.exec(stdout)?.[1];
|
|
240
284
|
}
|
|
285
|
+
function createBuildRunner(projectRoot) {
|
|
286
|
+
return {
|
|
287
|
+
async run(onOutput) {
|
|
288
|
+
const command = await resolveBuildCommand(projectRoot);
|
|
289
|
+
return runCommand(command.executable, command.args, projectRoot, onOutput);
|
|
290
|
+
},
|
|
291
|
+
};
|
|
292
|
+
}
|
|
293
|
+
async function resolveBuildCommand(projectRoot) {
|
|
294
|
+
const packageJson = JSON.parse(await readFile(join(projectRoot, "package.json"), "utf8"));
|
|
295
|
+
if (typeof packageJson.scripts?.build !== "string") {
|
|
296
|
+
throw new Error("No package.json build script was found.");
|
|
297
|
+
}
|
|
298
|
+
const packageManager = packageJson.packageManager?.split("@", 1)[0] ?? "npm";
|
|
299
|
+
if (packageManager === "pnpm")
|
|
300
|
+
return { executable: "pnpm", args: ["run", "build"] };
|
|
301
|
+
if (packageManager === "yarn")
|
|
302
|
+
return { executable: "yarn", args: ["build"] };
|
|
303
|
+
if (packageManager === "bun")
|
|
304
|
+
return { executable: "bun", args: ["run", "build"] };
|
|
305
|
+
return { executable: "npm", args: ["run", "build"] };
|
|
306
|
+
}
|
|
307
|
+
function runCommand(executable, args, cwd, onOutput) {
|
|
308
|
+
return new Promise((resolve, reject) => {
|
|
309
|
+
const child = spawn(executable, args, {
|
|
310
|
+
cwd,
|
|
311
|
+
env: { ...process.env, NO_COLOR: "1" },
|
|
312
|
+
shell: process.platform === "win32",
|
|
313
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
314
|
+
});
|
|
315
|
+
let stdout = "";
|
|
316
|
+
let stderr = "";
|
|
317
|
+
const stdoutLines = createLineEmitter(onOutput);
|
|
318
|
+
const stderrLines = createLineEmitter(onOutput);
|
|
319
|
+
child.stdout.setEncoding("utf8");
|
|
320
|
+
child.stderr.setEncoding("utf8");
|
|
321
|
+
child.stdout.on("data", (chunk) => {
|
|
322
|
+
stdout += chunk;
|
|
323
|
+
stdoutLines.write(chunk);
|
|
324
|
+
});
|
|
325
|
+
child.stderr.on("data", (chunk) => {
|
|
326
|
+
stderr += chunk;
|
|
327
|
+
stderrLines.write(chunk);
|
|
328
|
+
});
|
|
329
|
+
child.once("error", reject);
|
|
330
|
+
child.once("close", (exitCode) => {
|
|
331
|
+
stdoutLines.flush();
|
|
332
|
+
stderrLines.flush();
|
|
333
|
+
resolve({ exitCode: exitCode ?? 1, stdout, stderr });
|
|
334
|
+
});
|
|
335
|
+
});
|
|
336
|
+
}
|
|
337
|
+
function createLineEmitter(onOutput) {
|
|
338
|
+
let buffer = "";
|
|
339
|
+
const emit = (line) => {
|
|
340
|
+
const message = line.trim();
|
|
341
|
+
if (message.length > 0)
|
|
342
|
+
onOutput?.(message);
|
|
343
|
+
};
|
|
344
|
+
return {
|
|
345
|
+
write(chunk) {
|
|
346
|
+
buffer += chunk;
|
|
347
|
+
const lines = buffer.split(/\r?\n/);
|
|
348
|
+
buffer = lines.pop() ?? "";
|
|
349
|
+
for (const line of lines)
|
|
350
|
+
emit(line);
|
|
351
|
+
},
|
|
352
|
+
flush() {
|
|
353
|
+
emit(buffer);
|
|
354
|
+
buffer = "";
|
|
355
|
+
},
|
|
356
|
+
};
|
|
357
|
+
}
|
|
241
358
|
//# sourceMappingURL=appsScriptOperations.js.map
|
|
@@ -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,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,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,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CACnD,CAAC;KACD,MAAM,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9C,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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { createProjectInspectOperation, type ProjectState, } from "./projectInspectOperation.js";
|
|
2
2
|
export { startGasboostConsole } from "./startGasboostConsole.js";
|
|
3
3
|
export { createAppsScriptOperations, type AppsScriptStatus, } from "./appsScript/appsScriptOperations.js";
|
|
4
|
+
export { type DeploymentAccess, type DeploymentConfiguration, type DeploymentType, type WebAppExecuteAs, } from "./appsScript/AppsScriptManifestRepository.js";
|
|
4
5
|
export { createClaspRunner, type ClaspResult, type ClaspRunner, } from "./appsScript/ClaspRunner.js";
|
|
5
6
|
export { createDevelopmentOperations, type DevelopmentStatus, } from "./development/developmentOperations.js";
|
|
6
7
|
export { createFirebaseRunner, type FirebaseResult, type FirebaseRunner, } from "./firebase/FirebaseRunner.js";
|
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,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"}
|
|
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,KAAK,gBAAgB,EACrB,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACnB,KAAK,eAAe,GACrB,MAAM,8CAA8C,CAAC;AACtD,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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { createProjectInspectOperation, } from "./projectInspectOperation.js";
|
|
2
2
|
export { startGasboostConsole } from "./startGasboostConsole.js";
|
|
3
3
|
export { createAppsScriptOperations, } from "./appsScript/appsScriptOperations.js";
|
|
4
|
+
export {} from "./appsScript/AppsScriptManifestRepository.js";
|
|
4
5
|
export { createClaspRunner, } from "./appsScript/ClaspRunner.js";
|
|
5
6
|
export { createDevelopmentOperations, } from "./development/developmentOperations.js";
|
|
6
7
|
export { createFirebaseRunner, } from "./firebase/FirebaseRunner.js";
|
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,2BAA2B,GAE5B,MAAM,wCAAwC,CAAC;AAChD,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,EAKN,MAAM,8CAA8C,CAAC;AACtD,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,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()),te=(t,{nameAttr:i,icons:te,attrs:ne})=>{let o=t.getAttribute(i);if(o==null)return;let re=te[ee(o)];if(!re)return console.warn(`${t.outerHTML} icon name was not found in the provided icons object.`);let ie=r(t),ae={...e,"data-lucide":o,...ne,...ie},s=a([`lucide`,`lucide-${o}`,ie,ne]);s&&Object.assign(ae,{class:s});let oe=n(re,ae);return t.parentNode?.replaceChild(oe,t)},ne=[[`path`,{d:`m18 16 4-4-4-4`}],[`path`,{d:`m6 8-4 4 4 4`}],[`path`,{d:`m14.5 4-5 16`}]],o=[[`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`}]],re=[[`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`}]],ie=[[`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`}]],ae=[[`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`}]],s=[[`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`}]],oe=[[`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`}]],se=[[`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`}]],ce=[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]],le=[[`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`}]],ue=[[`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`}]],de=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}]],fe=[[`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`}]],pe=[[`circle`,{cx:`12`,cy:`8`,r:`5`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`}]],me=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]],he=({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=>te(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=>te(t,{nameAttr:`icon-name`,icons:e,attrs:n})))}};function ge(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);_e(r)&&r.close()})}function _e(e){return typeof e==`object`&&!!e&&`close`in e&&typeof e.close==`function`}function ve(e,t){let n=t.trim();return e===`webapp`&&n.length>0?`https://script.google.com/macros/s/${n}/exec`:void 0}function ye(e,t,n){n.disabled=ve(e,t)===void 0}function be(e,t){e.addEventListener(`input`,t)}function xe(e,t,n,r){let i=e?.authenticated===!0,a=t.value.trim();n.disabled=!i||a.length===0,r.disabled=!i||a.length===0}var Se=Xe(),Ce,c,l,u,d=`existing`;he({icons:{Code2:ne,Database:o,ExternalLink:re,FileCode2:ie,KeyRound:ae,LayoutDashboard:s,LogIn:oe,Play:se,Plus:ce,RefreshCw:le,Rocket:ue,Square:de,Upload:fe,UserRound:pe,X:me}});var f=$(`refresh`),p=$(`log`),m=$(`apps-log`),h=$(`deployment-log`),g=$(`firebase-log`),_=$(`development-log`),v={overview:$(`overview-nav`),development:$(`development-nav`),"apps-script":$(`apps-script-nav`),deployment:$(`deployment-nav`),firebase:$(`firebase-nav`)},y=$(`apps-login`),b=$(`apps-create`),x=$(`apps-connect`),we=$(`apps-user-settings`),S=$(`apps-open`),C=$(`apps-push`),Te=$(`apps-pull`),Ee=$(`credential-service-account`),De=$(`credential-script-properties`),Oe=$(`credential-copy-email`),ke=$(`credential-copy-private-key`),w=$(`deployment-list`),T=$(`deployment-create`),E=$(`deployment-update`),Ae=$(`deployment-open`),D=$(`deployment-type`),O=$(`deployment-access`),k=$(`deployment-execute-as`),je=$(`deployment-execute-as-field`),A=$(`development-start`),j=$(`development-stop`),M=$(`development-restart`),N=$(`development-open`),P=$(`firebase-enable`),F=$(`firebase-login`),I=$(`firebase-project-id`),L=$(`firebase-project-create`),R=$(`firebase-connect`),z=$(`firebase-webapp-create`),B=$(`firebase-webapp-config`),V=$(`firebase-rtdb-initialize`),H=$(`firebase-rules-generate`),Me=$(`firebase-rules-deploy`),Ne=$(`firebase-open`);f.addEventListener(`click`,()=>void Pe()),$(`clear-log`).addEventListener(`click`,()=>p.replaceChildren()),$(`apps-clear-log`).addEventListener(`click`,()=>m.replaceChildren()),$(`deployment-clear-log`).addEventListener(`click`,()=>h.replaceChildren()),$(`firebase-clear-log`).addEventListener(`click`,()=>g.replaceChildren()),$(`development-clear-log`).addEventListener(`click`,()=>_.replaceChildren());for(let[e,t]of Object.entries(v))t.addEventListener(`click`,()=>{He(e),e===`development`&&Ie(),e===`apps-script`&&U(),e===`deployment`&&U(),e===`firebase`&&W()});$(`apps-refresh`).addEventListener(`click`,()=>void U()),$(`development-refresh`).addEventListener(`click`,()=>void Ie()),$(`deployment-refresh`).addEventListener(`click`,()=>void U()),$(`firebase-refresh`).addEventListener(`click`,()=>void W());for(let e of document.querySelectorAll(`[data-setup-mode]`))e.addEventListener(`click`,()=>{d=e.dataset.setupMode===`new`?`new`:`existing`,Ve()});y.addEventListener(`click`,()=>void G(`apps.login`,{},m,K,[y])),we.addEventListener(`click`,()=>window.open(`https://script.google.com/home/usersettings`,`_blank`,`noopener`)),b.addEventListener(`click`,()=>{let e=$(`script-title`);e.value=Ce?.name??``,$(`create-dialog`).showModal(),e.focus()}),x.addEventListener(`click`,()=>{G(`apps.connect`,{scriptId:$(`script-id`).value.trim()},m,K,[x])}),S.addEventListener(`click`,()=>void G(`apps.open`,{},m,()=>void 0,[S])),C.addEventListener(`click`,()=>$(`push-dialog`).showModal()),Te.addEventListener(`click`,()=>Q(m,`Pull is reserved for a follow-up operation.`,`info`)),Ee.addEventListener(`click`,()=>{let e=l?.projectId;e!==void 0&&window.open(`https://console.firebase.google.com/project/${encodeURIComponent(e)}/settings/serviceaccounts/adminsdk`,`_blank`,`noopener`)}),De.addEventListener(`click`,()=>{let e=c?.scriptId;e!==void 0&&window.open(`https://script.google.com/home/projects/${encodeURIComponent(e)}/settings`,`_blank`,`noopener`)}),Oe.addEventListener(`click`,()=>void qe(`FIREBASE_SERVICE_ACCOUNT_EMAIL`)),ke.addEventListener(`click`,()=>void qe(`FIREBASE_PRIVATE_KEY`)),w.addEventListener(`click`,()=>void G(`apps.deployments`,{},h,e=>{Q(h,e.deployments.length===0?`No deployments returned`:e.deployments.map(e=>`${e.deploymentId}${e.description===void 0?``:` (${e.description})`}`).join(`, `),`info`)},[w])),T.addEventListener(`click`,()=>$(`deployment-dialog`).showModal()),E.addEventListener(`click`,()=>void G(`apps.deployment.update`,{deploymentId:$(`deployment-id`).value.trim()||void 0},h,()=>void U(),[E])),Ae.addEventListener(`click`,()=>{let e=c?.deploymentId??$(`deployment-id`).value.trim(),t=ve(We(),e);t!==void 0&&window.open(t,`_blank`,`noopener`)}),D.addEventListener(`change`,()=>{Y(),Ke()}),O.addEventListener(`change`,()=>void Ke()),k.addEventListener(`change`,()=>void Ke()),P.addEventListener(`click`,()=>void G(`firebase.enable`,{},g,q,[P])),F.addEventListener(`click`,()=>void G(`firebase.login`,{},g,q,[F])),be(I,Y),L.addEventListener(`click`,()=>{G(`firebase.project.create`,{projectId:I.value.trim()},g,q,[L])}),R.addEventListener(`click`,()=>{G(`firebase.project.connect`,{projectId:I.value.trim()},g,q,[R])}),z.addEventListener(`click`,()=>{G(`firebase.webapp.create`,{displayName:$(`firebase-webapp-name`).value.trim()||void 0},g,q,[z])}),B.addEventListener(`click`,()=>void G(`firebase.webapp.config`,{},g,()=>void W(),[B])),V.addEventListener(`click`,()=>{G(`firebase.rtdb.initialize`,{location:$(`firebase-rtdb-location`).value.trim()||`us-central1`},g,q,[V])}),H.addEventListener(`click`,()=>void G(`firebase.rules.generate`,{},g,()=>void W(),[H])),Me.addEventListener(`click`,()=>void G(`firebase.rules.deploy`,{},g,()=>void W(),[Me])),Ne.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},m,K,[b])}),$(`push-form`).addEventListener(`submit`,e=>{e.preventDefault(),$(`push-dialog`).close(),G(`apps.push`,{confirmed:!0},m,()=>void U(),[C])}),$(`deployment-form`).addEventListener(`submit`,e=>{e.preventDefault(),$(`deployment-dialog`).close(),G(`apps.deployment.create`,{description:$(`deployment-description`).value.trim()||void 0},h,()=>void U(),[T])}),ge(),A.addEventListener(`click`,()=>void G(`development.start`,{},_,J,[A,M])),j.addEventListener(`click`,()=>void G(`development.stop`,{},_,J,[j,M])),M.addEventListener(`click`,()=>void G(`development.restart`,{},_,J,[A,j,M])),N.addEventListener(`click`,()=>void G(`development.open`,{},_,J,[N])),Pe();async function Pe(){await Fe(),await Promise.all([Ie(),U(),W()])}async function Fe(){f.disabled=!0,Z(`running`,`Inspecting`),Q(p,`Inspecting project definition`,`info`);try{await Re(`project.inspect`,{},Le(p,e=>{Ce=e,Be(e)})),Z(`ready`,`Ready`)}catch(e){Z(`error`,`Error`),Ye(p,e)}finally{f.disabled=!1}}async function U(){await G(`apps.status`,{},m,K,[$(`apps-refresh`)])}async function W(){await G(`firebase.status`,{},g,q,[$(`firebase-refresh`)])}async function Ie(){await G(`development.status`,{},_,J,[$(`development-refresh`)])}async function G(e,t,n,r,i=[]){Ue(i,!0),Z(`running`,`Working`);try{await Re(e,t,Le(n,r)),Z(`ready`,`Ready`)}catch(e){Z(`error`,`Error`),Ye(n,e)}finally{Ue(i,!1),Y()}}function Le(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 Re(e,t,n){let r=await fetch(`/api/operations/${encodeURIComponent(e)}`,{method:`POST`,headers:{"Content-Type":`application/json`,"X-Gasboost-Session":Se},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)ze(e,n);if(e)break}}function ze(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 Be(e){$(`project-title`).textContent=e.name,$(`project-path`).textContent=e.root,Je(`apps-script-status`,e.capabilities.appsScript),Je(`firebase-status`,e.capabilities.firebaseRealtimeDatabase)}function K(e){c=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`),X(`deployment-manifest-status`,e.deploymentConfigurationSource===`manifest`,`Saved`,`Default`),$(`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-manifest-detail`).textContent=e.deploymentConfigurationSource===`manifest`?`Deployment configuration is loaded from appsscript.json`:`Using initial defaults until saved to appsscript.json`,$(`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,Ge(e.deploymentConfiguration),Ve(),Y()}function q(e){l=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.remoteProjectVerified,`Verified`,`Not verified`),X(`firebase-webapp-status`,e.webApp.configured,`Configured`,`Not configured`),X(`firebase-rtdb-status`,e.realtimeDatabase.initialized,`Initialized`,`Not initialized`),X(`firebase-rules-status`,e.rulesGenerated,`Generated`,`Not generated`),$(`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}${e.remoteProjectVerified?``:` · remote verification pending`}`,$(`firebase-webapp-detail`).textContent=e.webApp.appId??(e.webApp.sdkConfigAvailable?`SDK config synced to .env`:`No Web App detected`),$(`firebase-rtdb-detail`).textContent=e.realtimeDatabase.databaseUrl??(e.realtimeDatabase.desired?`Realtime capability desired`:`Realtime capability not configured`),$(`firebase-rules-detail`).textContent=e.rulesSourceConfigured?e.rulesGenerated?`database.rules.json is ready`:`Generate rules before deploy`:`No RTDB rules source configured`,I.value=e.projectId??``,$(`firebase-webapp-name`).value=e.webApp.displayName??``,Y()}function J(e){u=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`,_.replaceChildren();for(let t of e.log)Q(_,t,`info`);Y()}function Ve(){for(let e of document.querySelectorAll(`[data-setup-mode]`))e.classList.toggle(`setup-mode__button--active`,e.dataset.setupMode===d);$(`apps-create-panel`).hidden=d!==`new`,$(`apps-connect-panel`).hidden=d!==`existing`}function He(e){for(let t of Object.keys(v))$(`${t}-view`).hidden=t!==e,v[t].classList.toggle(`active`,t===e)}function Ue(e,t){for(let n of e)n.disabled=t}function Y(){let e=c?.authenticated===!0,t=c?.configured===!0;y.disabled=e,b.disabled=!e||t,x.disabled=!e||t,S.disabled=!e||!t,C.disabled=!e||!t,Te.disabled=!e||!t,Ee.disabled=l?.projectId===void 0,De.disabled=c?.scriptId===void 0,w.disabled=!e||!t,T.disabled=!e||!t,E.disabled=!e||!t,ye(We(),c?.deploymentId??$(`deployment-id`).value,Ae),D.disabled=c===void 0,O.disabled=c===void 0,k.disabled=c===void 0||D.value!==`webapp`,A.disabled=u?.running===!0,j.disabled=u?.running!==!0,M.disabled=u?.running!==!0,N.disabled=u?.running!==!0||u.localUrl===void 0,F.disabled=l?.authenticated===!0,P.disabled=l?.enabled===!0;let n=l?.remoteProjectVerified===!0;xe(l,I,L,R),z.disabled=!n||l?.webApp.configured===!0,B.disabled=!n||l?.webApp.configured!==!0,V.disabled=!n||l?.realtimeDatabase.desired!==!0||l?.realtimeDatabase.initialized===!0,H.disabled=l?.rulesSourceConfigured!==!0,Me.disabled=!n||l?.rulesGenerated!==!0,Ne.disabled=!1,f.disabled=!1;for(let e of Object.values(v))e.disabled=!1}function We(){return D.value===`webapp`&&c?.deploymentConfiguration.type===`webapp`?`webapp`:`executionApi`}function Ge(e){D.value=e.type,O.value=e.access,je.hidden=e.type!==`webapp`,k.value=e.type===`webapp`?e.executeAs:`USER_DEPLOYING`}async function Ke(){let e=D.value===`executionApi`?{type:`executionApi`,access:O.value}:{type:`webapp`,access:O.value,executeAs:k.value};Ge(e),await G(`apps.deployment.configuration.update`,e,h,e=>{K(e.status),Q(h,`Saved deployment configuration to appsscript.json`,`info`)},[D,O,k])}async function qe(e){await navigator.clipboard.writeText(e),Q(m,`Copied ${e}`,`info`)}function Je(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 Ye(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 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}
|
|
@@ -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,select{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}.credential-map{border:1px solid var(--gb-border);background:var(--gb-code);border-radius:8px;overflow:hidden}.credential-map__header{color:var(--gb-muted);border-bottom:1px solid var(--gb-border);font:10px/1.4 var(--gb-mono);text-transform:uppercase;padding:10px 12px;font-weight:700}.credential-map__row{border-bottom:1px solid var(--gb-border);grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr) 36px;align-items:center;gap:10px;min-height:42px;padding:7px 10px 7px 12px;display:grid}.credential-map__row:last-child{border-bottom:0}.credential-map code{overflow-wrap:anywhere;color:var(--gb-text);font:11px/1.45 var(--gb-mono)}.credential-map span{overflow-wrap:anywhere;color:var(--gb-muted);font:11px/1.45 var(--gb-mono)}.copy-key{width:30px;height:30px}.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}.deployment-config{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:18px;display:grid}.deployment-config .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 select{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 36px 0 13px}.field input::placeholder{color:#46534d}.field input:focus,.field select: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}.deployment-config{grid-template-columns:1fr}}
|
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-D7HaxSO6.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-DYh1QN-t.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
|
12
12
|
<header class="topbar">
|
|
@@ -157,6 +157,19 @@
|
|
|
157
157
|
<h3>Firebase credentials</h3>
|
|
158
158
|
<p class="field__help">Create a service account key in Firebase, then add its values to Script Properties in Apps Script. Credentials stay in those provider interfaces and never pass through Console.</p>
|
|
159
159
|
</div>
|
|
160
|
+
<div class="credential-map" aria-label="Required Script Properties">
|
|
161
|
+
<div class="credential-map__header">Add these values to Apps Script Script Properties</div>
|
|
162
|
+
<div class="credential-map__row">
|
|
163
|
+
<code>FIREBASE_SERVICE_ACCOUNT_EMAIL</code>
|
|
164
|
+
<span>client_email</span>
|
|
165
|
+
<button class="icon-button light copy-key" id="credential-copy-email" type="button" title="Copy key" aria-label="Copy FIREBASE_SERVICE_ACCOUNT_EMAIL"><i data-lucide="copy"></i></button>
|
|
166
|
+
</div>
|
|
167
|
+
<div class="credential-map__row">
|
|
168
|
+
<code>FIREBASE_PRIVATE_KEY</code>
|
|
169
|
+
<span>private_key</span>
|
|
170
|
+
<button class="icon-button light copy-key" id="credential-copy-private-key" type="button" title="Copy key" aria-label="Copy FIREBASE_PRIVATE_KEY"><i data-lucide="copy"></i></button>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
160
173
|
<div class="action-bar">
|
|
161
174
|
<button class="command-button" id="credential-service-account" type="button"><i data-lucide="key-round"></i>1. Open Service Accounts</button>
|
|
162
175
|
<button class="command-button" id="credential-script-properties" type="button"><i data-lucide="external-link"></i>2. Open Script Properties</button>
|
|
@@ -185,6 +198,37 @@
|
|
|
185
198
|
<div><h3>Deployment ID</h3><p class="mono-detail" id="deployment-id-detail">Checking .env</p></div>
|
|
186
199
|
<div class="badge" id="deployment-id-status">Checking</div>
|
|
187
200
|
</div>
|
|
201
|
+
<div class="status-row">
|
|
202
|
+
<div class="capability-icon apps"><i data-lucide="file-code-2"></i></div>
|
|
203
|
+
<div><h3>Manifest status</h3><p class="mono-detail" id="deployment-manifest-detail">Checking appsscript.json</p></div>
|
|
204
|
+
<div class="badge" id="deployment-manifest-status">Checking</div>
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
<div class="deployment-config">
|
|
208
|
+
<div class="field">
|
|
209
|
+
<label for="deployment-type" class="field__label">Deployment type</label>
|
|
210
|
+
<select id="deployment-type">
|
|
211
|
+
<option value="webapp">Web App</option>
|
|
212
|
+
<option value="executionApi">API Executable</option>
|
|
213
|
+
</select>
|
|
214
|
+
</div>
|
|
215
|
+
<div class="field" id="deployment-execute-as-field">
|
|
216
|
+
<label for="deployment-execute-as" class="field__label">Execute as</label>
|
|
217
|
+
<select id="deployment-execute-as">
|
|
218
|
+
<option value="USER_DEPLOYING">Me</option>
|
|
219
|
+
<option value="USER_ACCESSING">User accessing the web app</option>
|
|
220
|
+
</select>
|
|
221
|
+
</div>
|
|
222
|
+
<div class="field">
|
|
223
|
+
<label for="deployment-access" class="field__label">Access</label>
|
|
224
|
+
<select id="deployment-access">
|
|
225
|
+
<option value="MYSELF">Only myself</option>
|
|
226
|
+
<option value="DOMAIN">Same domain</option>
|
|
227
|
+
<option value="ANYONE">Anyone</option>
|
|
228
|
+
<option value="ANYONE_ANONYMOUS">Anyone, even anonymous</option>
|
|
229
|
+
</select>
|
|
230
|
+
<p class="field__help" id="deployment-config-help">Changes are saved to appsscript.json. Push publishes the manifest to Apps Script.</p>
|
|
231
|
+
</div>
|
|
188
232
|
</div>
|
|
189
233
|
<div class="field">
|
|
190
234
|
<label for="deployment-id" class="field__label">Deployment ID</label>
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
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}}
|
|
@@ -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})))}};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`}function pe(e,t){e.addEventListener(`input`,t)}function me(e,t,n,r){let i=e?.authenticated===!0,a=t.value.trim();n.disabled=!i||a.length===0,r.disabled=!i||a.length===0}var he=Re(),ge,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`)},_e=$(`apps-login`),ve=$(`apps-create`),ye=$(`apps-connect`),be=$(`apps-user-settings`),xe=$(`apps-open`),w=$(`apps-push`),Se=$(`apps-pull`),Ce=$(`credential-service-account`),we=$(`credential-script-properties`),T=$(`deployment-list`),E=$(`deployment-create`),D=$(`deployment-update`),Te=$(`deployment-open`),O=$(`development-start`),k=$(`development-stop`),A=$(`development-restart`),j=$(`development-open`),M=$(`firebase-enable`),N=$(`firebase-login`),P=$(`firebase-project-id`),F=$(`firebase-project-create`),I=$(`firebase-connect`),L=$(`firebase-webapp-create`),R=$(`firebase-webapp-config`),z=$(`firebase-rtdb-initialize`),B=$(`firebase-rules-generate`),V=$(`firebase-rules-deploy`),Ee=$(`firebase-open`);_.addEventListener(`click`,()=>void De()),$(`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`,()=>{Pe(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`,Ne()});_e.addEventListener(`click`,()=>void G(`apps.login`,{},y,K,[_e])),be.addEventListener(`click`,()=>window.open(`https://script.google.com/home/usersettings`,`_blank`,`noopener`)),ve.addEventListener(`click`,()=>{let e=$(`script-title`);e.value=ge?.name??``,$(`create-dialog`).showModal(),e.focus()}),ye.addEventListener(`click`,()=>{G(`apps.connect`,{scriptId:$(`script-id`).value.trim()},y,K,[ye])}),xe.addEventListener(`click`,()=>void G(`apps.open`,{},y,()=>void 0,[xe])),w.addEventListener(`click`,()=>$(`push-dialog`).showModal()),Se.addEventListener(`click`,()=>Q(y,`Pull is reserved for a follow-up operation.`,`info`)),Ce.addEventListener(`click`,()=>{let e=m?.projectId;e!==void 0&&window.open(`https://console.firebase.google.com/project/${encodeURIComponent(e)}/settings/serviceaccounts/adminsdk`,`_blank`,`noopener`)}),we.addEventListener(`click`,()=>{let e=p?.scriptId;e!==void 0&&window.open(`https://script.google.com/home/projects/${encodeURIComponent(e)}/settings`,`_blank`,`noopener`)}),T.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`)},[T])),E.addEventListener(`click`,()=>$(`deployment-dialog`).showModal()),D.addEventListener(`click`,()=>void G(`apps.deployment.update`,{deploymentId:$(`deployment-id`).value.trim()||void 0},b,()=>void H(),[D])),Te.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`)}),M.addEventListener(`click`,()=>void G(`firebase.enable`,{},x,q,[M])),N.addEventListener(`click`,()=>void G(`firebase.login`,{},x,q,[N])),pe(P,Y),F.addEventListener(`click`,()=>{G(`firebase.project.create`,{projectId:P.value.trim()},x,q,[F])}),I.addEventListener(`click`,()=>{G(`firebase.project.connect`,{projectId:P.value.trim()},x,q,[I])}),L.addEventListener(`click`,()=>{G(`firebase.webapp.create`,{displayName:$(`firebase-webapp-name`).value.trim()||void 0},x,q,[L])}),R.addEventListener(`click`,()=>void G(`firebase.webapp.config`,{},x,()=>void U(),[R])),z.addEventListener(`click`,()=>{G(`firebase.rtdb.initialize`,{location:$(`firebase-rtdb-location`).value.trim()||`us-central1`},x,q,[z])}),B.addEventListener(`click`,()=>void G(`firebase.rules.generate`,{},x,()=>void U(),[B])),V.addEventListener(`click`,()=>void G(`firebase.rules.deploy`,{},x,()=>void U(),[V])),Ee.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,[ve])}),$(`push-form`).addEventListener(`submit`,e=>{e.preventDefault(),$(`push-dialog`).close(),G(`apps.push`,{confirmed:!0},y,()=>void H(),[w])}),$(`deployment-form`).addEventListener(`submit`,e=>{e.preventDefault(),$(`deployment-dialog`).close(),G(`apps.deployment.create`,{description:$(`deployment-description`).value.trim()||void 0},b,()=>void H(),[E])}),de(),O.addEventListener(`click`,()=>void G(`development.start`,{},S,J,[O,A])),k.addEventListener(`click`,()=>void G(`development.stop`,{},S,J,[k,A])),A.addEventListener(`click`,()=>void G(`development.restart`,{},S,J,[O,k,A])),j.addEventListener(`click`,()=>void G(`development.open`,{},S,J,[j])),De();async function De(){await Oe(),await Promise.all([W(),H(),U()])}async function Oe(){_.disabled=!0,Z(`running`,`Inspecting`),Q(v,`Inspecting project definition`,`info`);try{await Ae(`project.inspect`,{},ke(v,e=>{ge=e,Me(e)})),Z(`ready`,`Ready`)}catch(e){Z(`error`,`Error`),Le(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=[]){Fe(i,!0),Z(`running`,`Working`);try{await Ae(e,t,ke(n,r)),Z(`ready`,`Ready`)}catch(e){Z(`error`,`Error`),Le(n,e)}finally{Fe(i,!1),Y()}}function ke(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 Ae(e,t,n){let r=await fetch(`/api/operations/${encodeURIComponent(e)}`,{method:`POST`,headers:{"Content-Type":`application/json`,"X-Gasboost-Session":he},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)je(e,n);if(e)break}}function je(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 Me(e){$(`project-title`).textContent=e.name,$(`project-path`).textContent=e.root,Ie(`apps-script-status`,e.capabilities.appsScript),Ie(`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,Ne(),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.remoteProjectVerified,`Verified`,`Not verified`),X(`firebase-webapp-status`,e.webApp.configured,`Configured`,`Not configured`),X(`firebase-rtdb-status`,e.realtimeDatabase.initialized,`Initialized`,`Not initialized`),X(`firebase-rules-status`,e.rulesGenerated,`Generated`,`Not generated`),$(`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}${e.remoteProjectVerified?``:` · remote verification pending`}`,$(`firebase-webapp-detail`).textContent=e.webApp.appId??(e.webApp.sdkConfigAvailable?`SDK config synced to .env`:`No Web App detected`),$(`firebase-rtdb-detail`).textContent=e.realtimeDatabase.databaseUrl??(e.realtimeDatabase.desired?`Realtime capability desired`:`Realtime capability not configured`),$(`firebase-rules-detail`).textContent=e.rulesSourceConfigured?e.rulesGenerated?`database.rules.json is ready`:`Generate rules before deploy`:`No RTDB rules source configured`,P.value=e.projectId??``,$(`firebase-webapp-name`).value=e.webApp.displayName??``,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 Ne(){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 Pe(e){for(let t of Object.keys(C))$(`${t}-view`).hidden=t!==e,C[t].classList.toggle(`active`,t===e)}function Fe(e,t){for(let n of e)n.disabled=t}function Y(){let e=p?.authenticated===!0,t=p?.configured===!0;_e.disabled=e,ve.disabled=!e||t,ye.disabled=!e||t,xe.disabled=!e||!t,w.disabled=!e||!t,Se.disabled=!e||!t,Ce.disabled=m?.projectId===void 0,we.disabled=p?.scriptId===void 0,T.disabled=!e||!t,E.disabled=!e||!t,D.disabled=!e||!t,Te.disabled=(p?.deploymentId??$(`deployment-id`).value).length===0,O.disabled=h?.running===!0,k.disabled=h?.running!==!0,A.disabled=h?.running!==!0,j.disabled=h?.running!==!0||h.localUrl===void 0,N.disabled=m?.authenticated===!0,M.disabled=m?.enabled===!0;let n=m?.remoteProjectVerified===!0;me(m,P,F,I),L.disabled=!n||m?.webApp.configured===!0,R.disabled=!n||m?.webApp.configured!==!0,z.disabled=!n||m?.realtimeDatabase.desired!==!0||m?.realtimeDatabase.initialized===!0,B.disabled=m?.rulesSourceConfigured!==!0,V.disabled=!n||m?.rulesGenerated!==!0,Ee.disabled=!1,_.disabled=!1;for(let e of Object.values(C))e.disabled=!1}function Ie(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 Le(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 Re(){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}
|