@ciderjs/gasbombe 0.3.1 → 0.4.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/catalog.json +32 -0
- package/dist/cli.cjs +23 -10
- package/dist/cli.mjs +23 -10
- package/dist/index.cjs +14 -3
- package/dist/index.d.cts +2 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.mjs +14 -4
- package/dist/templates/{react-ciderjs → common}/biome.json.ejs +14 -2
- package/dist/templates/html-js/.clasp.json.ejs +5 -0
- package/dist/templates/html-js/.env.ejs +1 -0
- package/dist/templates/html-js/README.md.ejs +1 -0
- package/dist/templates/html-js/package.json.ejs +11 -12
- package/dist/templates/html-js/rolldown.config.mjs.ejs +7 -23
- package/dist/templates/react/package.json.ejs +19 -20
- package/dist/templates/react/rolldown.config.ts.ejs +1 -13
- package/dist/templates/react/vite.config.ts.ejs +1 -1
- package/dist/templates/react-ciderjs/gasnuki.config.ts.ejs +7 -0
- package/dist/templates/react-ciderjs/package.json.ejs +23 -23
- package/dist/templates/react-ciderjs/rolldown.config.ts.ejs +1 -13
- package/dist/templates/react-ciderjs/server/modules/hello.ts.ejs +10 -0
- package/dist/templates/react-ciderjs/src/generated/router.d.ts.ejs +19 -0
- package/dist/templates/react-ciderjs/src/generated/routes.ts.ejs +34 -0
- package/dist/templates/react-ciderjs/src/index.css.ejs +43 -0
- package/dist/templates/react-ciderjs/src/lib/server.ts.ejs +14 -2
- package/dist/templates/react-ciderjs/src/main.tsx.ejs +12 -8
- package/dist/templates/react-ciderjs/src/{App.tsx.ejs → pages/_root.tsx.ejs} +9 -16
- package/dist/templates/react-ciderjs/src/pages/about.tsx.ejs +1 -0
- package/dist/templates/react-ciderjs/src/pages/detail/user.tsx.ejs +6 -4
- package/dist/templates/react-ciderjs/src/pages/index.tsx.ejs +13 -2
- package/dist/templates/react-ciderjs/types/appsscript/client.ts.ejs +65 -0
- package/dist/templates/react-ciderjs/vite.config.ts.ejs +2 -6
- package/dist/templates/server-js/.clasp.json.ejs +5 -0
- package/dist/templates/server-js/package.json.ejs +10 -11
- package/dist/templates/server-js/rolldown.config.mjs.ejs +7 -23
- package/dist/templates/server-js/tests/{main.test.js.ejs → app.test.js.ejs} +1 -1
- package/dist/templates/server-ts/package.json.ejs +11 -12
- package/dist/templates/server-ts/rolldown.config.ts.ejs +3 -19
- package/dist/templates/server-ts/tests/{main.test.ts.ejs → app.test.ts.ejs} +1 -1
- package/dist/templates/vue/package.json.ejs +16 -17
- package/dist/templates/vue/rolldown.config.ts.ejs +1 -13
- package/dist/templates/vue/vite.config.ts.ejs +1 -1
- package/dist/templates/vue-ciderjs/.github/workflows/appsscript.yml.ejs +45 -0
- package/dist/templates/vue-ciderjs/gasnuki.config.ts.ejs +7 -0
- package/dist/templates/vue-ciderjs/package.json.ejs +20 -20
- package/dist/templates/vue-ciderjs/rolldown.config.ts.ejs +1 -13
- package/dist/templates/vue-ciderjs/server/modules/hello.ts.ejs +10 -0
- package/dist/templates/vue-ciderjs/src/components/HelloWorld.vue.ejs +11 -2
- package/dist/templates/vue-ciderjs/src/generated/router.d.ts.ejs +19 -0
- package/dist/templates/vue-ciderjs/src/generated/routes.ts.ejs +34 -0
- package/dist/templates/vue-ciderjs/src/lib/server.ts.ejs +14 -2
- package/dist/templates/vue-ciderjs/src/main.ts.ejs +6 -8
- package/dist/templates/vue-ciderjs/src/pages/detail/user.vue.ejs +3 -2
- package/dist/templates/vue-ciderjs/types/appsscript/client.ts.ejs +65 -0
- package/dist/templates/vue-ciderjs/vite.config.ts.ejs +1 -1
- package/package.json +21 -12
- package/dist/templates/html-js/biome.json.ejs +0 -36
- package/dist/templates/react/biome.json.ejs +0 -43
- package/dist/templates/server-js/biome.json.ejs +0 -36
- package/dist/templates/server-ts/biome.json.ejs +0 -36
- package/dist/templates/vue/biome.json.ejs +0 -35
- package/dist/templates/vue-ciderjs/biome.json.ejs +0 -35
- package/dist/templates/vue-ciderjs/src/App.vue.ejs +0 -7
- /package/dist/templates/server-js/src/{main.js.ejs → app.js.ejs} +0 -0
- /package/dist/templates/server-ts/src/{main.ts.ejs → app.ts.ejs} +0 -0
|
@@ -66,3 +66,46 @@ button:focus-visible {
|
|
|
66
66
|
background-color: #f9f9f9;
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
+
|
|
70
|
+
#root {
|
|
71
|
+
max-width: 1280px;
|
|
72
|
+
margin: 0 auto;
|
|
73
|
+
padding: 2rem;
|
|
74
|
+
text-align: center;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.logo {
|
|
78
|
+
height: 6em;
|
|
79
|
+
padding: 1.5em;
|
|
80
|
+
will-change: filter;
|
|
81
|
+
transition: filter 300ms;
|
|
82
|
+
}
|
|
83
|
+
.logo:hover {
|
|
84
|
+
filter: drop-shadow(0 0 2em #646cffaa);
|
|
85
|
+
}
|
|
86
|
+
.logo.react:hover {
|
|
87
|
+
filter: drop-shadow(0 0 2em #61dafbaa);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@keyframes logo-spin {
|
|
91
|
+
from {
|
|
92
|
+
transform: rotate(0deg);
|
|
93
|
+
}
|
|
94
|
+
to {
|
|
95
|
+
transform: rotate(360deg);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
100
|
+
a:nth-of-type(2) .logo {
|
|
101
|
+
animation: logo-spin infinite 20s linear;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.card {
|
|
106
|
+
padding: 2em;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.read-the-docs {
|
|
110
|
+
color: #888;
|
|
111
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { serialize } from "@ciderjs/gasnuki/json";
|
|
1
2
|
import {
|
|
2
3
|
getPromisedServerScripts,
|
|
3
4
|
type PartialScriptType,
|
|
@@ -8,11 +9,22 @@ import type { ServerScripts } from "~/types/appsscript/client";
|
|
|
8
9
|
export const sleep = (ms: number) =>
|
|
9
10
|
new Promise((resolve) => setTimeout(resolve, ms));
|
|
10
11
|
|
|
11
|
-
const
|
|
12
|
+
const mockupFunctions: PartialScriptType<ServerScripts> = {
|
|
12
13
|
sayHello: async (name) => {
|
|
13
14
|
await sleep(1000);
|
|
14
15
|
return `Hello, ${name}!`;
|
|
15
16
|
},
|
|
17
|
+
getHelloMember: async () => {
|
|
18
|
+
await sleep(1000);
|
|
19
|
+
return serialize({
|
|
20
|
+
name: "John Doe",
|
|
21
|
+
age: 30,
|
|
22
|
+
isMember: true,
|
|
23
|
+
});
|
|
24
|
+
},
|
|
16
25
|
};
|
|
17
26
|
|
|
18
|
-
export const serverScripts = getPromisedServerScripts<ServerScripts>(
|
|
27
|
+
export const serverScripts = getPromisedServerScripts<ServerScripts>({
|
|
28
|
+
mockupFunctions,
|
|
29
|
+
parseJson: true,
|
|
30
|
+
});
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { createRouter } from "@ciderjs/city-gas";
|
|
2
|
+
import { RouterProvider } from "@ciderjs/city-gas/react";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import ReactDOM from "react-dom/client";
|
|
5
|
+
import { dynamicRoutes, pages, specialPages } from "./generated/routes";
|
|
3
6
|
import "./index.css";
|
|
4
|
-
import App from "./App.tsx";
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
const router = createRouter(pages, { specialPages, dynamicRoutes });
|
|
9
|
+
|
|
10
|
+
// biome-ignore lint/style/noNonNullAssertion: root element is always present
|
|
11
|
+
ReactDOM.createRoot(document.getElementById("root")!).render(
|
|
12
|
+
<React.StrictMode>
|
|
13
|
+
<RouterProvider router={router} />
|
|
14
|
+
</React.StrictMode>,
|
|
11
15
|
);
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
RouterOutlet,
|
|
4
|
-
RouterProvider,
|
|
5
|
-
useNavigate,
|
|
6
|
-
} from "@ciderjs/city-gas/react";
|
|
7
|
-
import { pages } from "@/generated/routes";
|
|
8
|
-
import "@/App.css";
|
|
1
|
+
import { useNavigate } from "@ciderjs/city-gas/react";
|
|
9
2
|
|
|
10
3
|
function Navigation() {
|
|
11
4
|
const navigate = useNavigate();
|
|
@@ -35,15 +28,15 @@ function Navigation() {
|
|
|
35
28
|
);
|
|
36
29
|
}
|
|
37
30
|
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
|
|
31
|
+
export default function RootLayout({
|
|
32
|
+
children,
|
|
33
|
+
}: {
|
|
34
|
+
children: React.ReactNode;
|
|
35
|
+
}) {
|
|
41
36
|
return (
|
|
42
|
-
<
|
|
37
|
+
<div>
|
|
43
38
|
<Navigation />
|
|
44
|
-
<
|
|
45
|
-
</
|
|
39
|
+
<main>{children}</main>
|
|
40
|
+
</div>
|
|
46
41
|
);
|
|
47
42
|
}
|
|
48
|
-
|
|
49
|
-
export default App;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { useParams } from "@ciderjs/city-gas/react";
|
|
2
|
+
import { z } from "zod";
|
|
2
3
|
|
|
3
|
-
export const
|
|
4
|
-
id:
|
|
5
|
-
};
|
|
4
|
+
export const schema = z.object({
|
|
5
|
+
id: z.string(),
|
|
6
|
+
});
|
|
6
7
|
|
|
7
8
|
export default function Page() {
|
|
8
|
-
const { id } = useParams
|
|
9
|
+
const { id } = useParams("/detail/user");
|
|
9
10
|
return (
|
|
10
11
|
<>
|
|
11
12
|
<h1>
|
|
12
13
|
Detail of User <code>{id}</code>
|
|
13
14
|
</h1>
|
|
15
|
+
<p>Enjoy your code life!</p>
|
|
14
16
|
</>
|
|
15
17
|
);
|
|
16
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useState } from "react";
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
2
|
import reactLogo from "@/assets/react.svg";
|
|
3
3
|
import { parameters } from "@/lib/parameters";
|
|
4
4
|
import { serverScripts } from "@/lib/server";
|
|
@@ -6,6 +6,11 @@ import viteLogo from "/vite.svg";
|
|
|
6
6
|
|
|
7
7
|
export default function Page() {
|
|
8
8
|
const [count, setCount] = useState(0);
|
|
9
|
+
const [member, setMember] = useState<{
|
|
10
|
+
name: string;
|
|
11
|
+
age: number;
|
|
12
|
+
isMember: boolean;
|
|
13
|
+
} | null>(null);
|
|
9
14
|
const [message, setMessage] = useState("Click to say hello");
|
|
10
15
|
|
|
11
16
|
const { userAddress } = parameters;
|
|
@@ -21,6 +26,12 @@ export default function Page() {
|
|
|
21
26
|
}
|
|
22
27
|
};
|
|
23
28
|
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
serverScripts.getHelloMember().then((result) => {
|
|
31
|
+
setMember(result);
|
|
32
|
+
});
|
|
33
|
+
}, []);
|
|
34
|
+
|
|
24
35
|
return (
|
|
25
36
|
<>
|
|
26
37
|
<div>
|
|
@@ -34,7 +45,7 @@ export default function Page() {
|
|
|
34
45
|
<h1>Vite + React</h1>
|
|
35
46
|
<div className="card">
|
|
36
47
|
<button type="button" onClick={() => setCount((count) => count + 1)}>
|
|
37
|
-
count is {count}
|
|
48
|
+
count is {count} by {member?.name ?? "guest"}
|
|
38
49
|
</button>
|
|
39
50
|
<button
|
|
40
51
|
type="button"
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
// Auto-generated by gasnuki
|
|
2
|
+
// Do NOT edit this file manually.
|
|
3
|
+
|
|
4
|
+
import type { JsonString } from "../../../../../gasnuki/dist/json";
|
|
5
|
+
|
|
6
|
+
export type ServerScripts = {
|
|
7
|
+
sayHello(name: string): string;
|
|
8
|
+
|
|
9
|
+
getHelloMember(): JsonString<{
|
|
10
|
+
name: string;
|
|
11
|
+
age: number;
|
|
12
|
+
isMember: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
// Auto-generated Types for GoogleAppsScript in client-side code
|
|
17
|
+
|
|
18
|
+
export type RemoveReturnType<T> = {
|
|
19
|
+
[P in keyof T]: T[P] extends (...args: infer A) => any
|
|
20
|
+
? (...args: A) => void
|
|
21
|
+
: T[P];
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
type _AppsScriptRun = RemoveReturnType<ServerScripts> & {
|
|
25
|
+
[key: string]: (...args: any[]) => any;
|
|
26
|
+
withSuccessHandler: <T = string | number | boolean | undefined, U = any>(
|
|
27
|
+
callback: (returnValues: T, userObject?: U) => void,
|
|
28
|
+
) => _AppsScriptRun;
|
|
29
|
+
withFailureHandler: <U = any>(
|
|
30
|
+
callback: (error: Error, userObject?: U) => void,
|
|
31
|
+
) => _AppsScriptRun;
|
|
32
|
+
withUserObject: <U = any>(userObject: U) => _AppsScriptRun;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
type _AppsScriptHistoryFunction = (
|
|
36
|
+
stateObject: object,
|
|
37
|
+
params: object,
|
|
38
|
+
hash: string,
|
|
39
|
+
) => void;
|
|
40
|
+
|
|
41
|
+
interface _WebAppLocationType {
|
|
42
|
+
hash: string;
|
|
43
|
+
parameter: Record<string, string>;
|
|
44
|
+
parameters: Record<string, string[]>;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export declare interface GoogleClientSideApi {
|
|
48
|
+
script: {
|
|
49
|
+
run: _AppsScriptRun;
|
|
50
|
+
url: {
|
|
51
|
+
getLocation: (callback: (location: _WebAppLocationType) => void) => void;
|
|
52
|
+
};
|
|
53
|
+
history: {
|
|
54
|
+
push: _AppsScriptHistoryFunction;
|
|
55
|
+
replace: _AppsScriptHistoryFunction;
|
|
56
|
+
setChangeHandler: (
|
|
57
|
+
callback: (e: { state: object; location: _WebAppLocationType }) => void,
|
|
58
|
+
) => void;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare global {
|
|
64
|
+
const google: GoogleClientSideApi;
|
|
65
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="vitest" />
|
|
1
|
+
/// <reference types="vitest/config" />
|
|
2
2
|
|
|
3
3
|
import { cityGasRouter } from "@ciderjs/city-gas/plugin";
|
|
4
4
|
import { gasnuki } from "@ciderjs/gasnuki/vite";
|
|
@@ -22,11 +22,7 @@ export default defineConfig({
|
|
|
22
22
|
react(),
|
|
23
23
|
tsconfigPaths(),
|
|
24
24
|
cityGasRouter(),
|
|
25
|
-
gasnuki(
|
|
26
|
-
srcDir: "server",
|
|
27
|
-
outDir: "types/appsscript",
|
|
28
|
-
outputFile: "client.ts",
|
|
29
|
-
}),
|
|
25
|
+
gasnuki(),
|
|
30
26
|
gas(),
|
|
31
27
|
viteSingleFile(),
|
|
32
28
|
],
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"private": true,
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./dist/
|
|
6
|
+
"main": "./dist/app.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"check": "biome check --write",
|
|
9
9
|
"build": "tsc && rolldown -c && cpy src/*.json dist/",
|
|
@@ -11,16 +11,15 @@
|
|
|
11
11
|
"push": "clasp push"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@biomejs/biome": "^2.3.
|
|
15
|
-
"@google/clasp": "^3.1.
|
|
16
|
-
"@
|
|
17
|
-
"@types/
|
|
18
|
-
"@
|
|
19
|
-
"@vitest/coverage-v8": "4.0.8",
|
|
14
|
+
"@biomejs/biome": "^2.3.13",
|
|
15
|
+
"@google/clasp": "^3.1.3",
|
|
16
|
+
"@types/google-apps-script": "^2.0.8",
|
|
17
|
+
"@types/node": "^25.1.0",
|
|
18
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
20
19
|
"cpy-cli": "^6.0.0",
|
|
21
|
-
"rolldown": "1.0.0-
|
|
20
|
+
"rolldown": "1.0.0-rc.2",
|
|
22
21
|
"rolldown-plugin-remove-export": "^0.1.3",
|
|
23
|
-
"vite-tsconfig-paths": "^
|
|
24
|
-
"vitest": "^4.0.
|
|
22
|
+
"vite-tsconfig-paths": "^6.0.5",
|
|
23
|
+
"vitest": "^4.0.18"
|
|
25
24
|
}
|
|
26
|
-
}
|
|
25
|
+
}
|
|
@@ -1,29 +1,13 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import alias from "@rollup/plugin-alias";
|
|
3
1
|
import { defineConfig } from "rolldown";
|
|
4
2
|
import { removeExportPlugin } from "rolldown-plugin-remove-export";
|
|
5
3
|
|
|
6
|
-
const outputFile = "
|
|
4
|
+
const outputFile = "app.js";
|
|
7
5
|
|
|
8
6
|
export default defineConfig({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
alias({
|
|
16
|
-
entries: [
|
|
17
|
-
{
|
|
18
|
-
find: "@",
|
|
19
|
-
replacement: path.resolve(import.meta.dirname, "src"),
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
find: "~",
|
|
23
|
-
replacement: path.resolve(import.meta.dirname),
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
}),
|
|
27
|
-
removeExportPlugin(outputFile),
|
|
28
|
-
],
|
|
7
|
+
input: "src/app.js",
|
|
8
|
+
output: {
|
|
9
|
+
format: "esm",
|
|
10
|
+
file: `dist/${outputFile}`,
|
|
11
|
+
},
|
|
12
|
+
plugins: [removeExportPlugin(outputFile)],
|
|
29
13
|
});
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"private": true,
|
|
4
4
|
"version": "0.0.0",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./dist/
|
|
6
|
+
"main": "./dist/app.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"check": "biome check --write",
|
|
9
9
|
"build": "tsc && rolldown -c && cpy src/*.json dist/",
|
|
@@ -11,17 +11,16 @@
|
|
|
11
11
|
"push": "clasp push"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@biomejs/biome": "^2.3.
|
|
15
|
-
"@google/clasp": "^3.1.
|
|
16
|
-
"@
|
|
17
|
-
"@types/
|
|
18
|
-
"@
|
|
19
|
-
"@vitest/coverage-v8": "4.0.8",
|
|
14
|
+
"@biomejs/biome": "^2.3.13",
|
|
15
|
+
"@google/clasp": "^3.1.3",
|
|
16
|
+
"@types/google-apps-script": "^2.0.8",
|
|
17
|
+
"@types/node": "^25.1.0",
|
|
18
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
20
19
|
"cpy-cli": "^6.0.0",
|
|
21
|
-
"rolldown": "1.0.0-
|
|
20
|
+
"rolldown": "1.0.0-rc.2",
|
|
22
21
|
"rolldown-plugin-remove-export": "^0.1.3",
|
|
23
|
-
"typescript": "
|
|
24
|
-
"vite-tsconfig-paths": "^
|
|
25
|
-
"vitest": "^4.0.
|
|
22
|
+
"typescript": "^5.9.3",
|
|
23
|
+
"vite-tsconfig-paths": "^6.0.5",
|
|
24
|
+
"vitest": "^4.0.18"
|
|
26
25
|
}
|
|
27
|
-
}
|
|
26
|
+
}
|
|
@@ -1,29 +1,13 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import alias from "@rollup/plugin-alias";
|
|
3
1
|
import { defineConfig } from "rolldown";
|
|
4
2
|
import { removeExportPlugin } from "rolldown-plugin-remove-export";
|
|
5
3
|
|
|
6
|
-
const outputFile = "
|
|
4
|
+
const outputFile = "app.js";
|
|
7
5
|
|
|
8
6
|
export default defineConfig({
|
|
9
|
-
input: "src/
|
|
7
|
+
input: "src/app.ts",
|
|
10
8
|
output: {
|
|
11
9
|
format: "esm",
|
|
12
10
|
file: `dist/${outputFile}`,
|
|
13
11
|
},
|
|
14
|
-
plugins: [
|
|
15
|
-
alias({
|
|
16
|
-
entries: [
|
|
17
|
-
{
|
|
18
|
-
find: "@",
|
|
19
|
-
replacement: path.resolve(__dirname, "src"),
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
find: "~",
|
|
23
|
-
replacement: path.resolve(__dirname),
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
}),
|
|
27
|
-
removeExportPlugin(outputFile),
|
|
28
|
-
],
|
|
12
|
+
plugins: [removeExportPlugin(outputFile)],
|
|
29
13
|
});
|
|
@@ -17,29 +17,28 @@
|
|
|
17
17
|
"preview:web": "clasp open-web-app"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"vue": "^3.5.
|
|
20
|
+
"vue": "^3.5.27"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@biomejs/biome": "^2.3.
|
|
24
|
-
"@google/clasp": "^3.1.
|
|
25
|
-
"@
|
|
26
|
-
"@types/
|
|
27
|
-
"@
|
|
28
|
-
"@
|
|
29
|
-
"@vitest/coverage-v8": "^4.0.8",
|
|
23
|
+
"@biomejs/biome": "^2.3.13",
|
|
24
|
+
"@google/clasp": "^3.1.3",
|
|
25
|
+
"@types/google-apps-script": "^2.0.8",
|
|
26
|
+
"@types/node": "^25.1.0",
|
|
27
|
+
"@vitejs/plugin-vue": "^6.0.3",
|
|
28
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
30
29
|
"@vue/tsconfig": "^0.8.1",
|
|
31
30
|
"cpy-cli": "^6.0.0",
|
|
32
31
|
"cross-var": "^1.1.0",
|
|
33
32
|
"dotenv-cli": "^11.0.0",
|
|
34
|
-
"rimraf": "^6.1.
|
|
35
|
-
"rolldown": "1.0.0-
|
|
33
|
+
"rimraf": "^6.1.2",
|
|
34
|
+
"rolldown": "1.0.0-rc.2",
|
|
36
35
|
"rolldown-plugin-remove-export": "^0.1.3",
|
|
37
|
-
"typescript": "
|
|
38
|
-
"vite": "^7.1
|
|
39
|
-
"vite-plugin-google-apps-script": "^0.4.
|
|
36
|
+
"typescript": "^5.9.3",
|
|
37
|
+
"vite": "^7.3.1",
|
|
38
|
+
"vite-plugin-google-apps-script": "^0.4.1",
|
|
40
39
|
"vite-plugin-singlefile": "^2.3.0",
|
|
41
|
-
"vite-tsconfig-paths": "^
|
|
42
|
-
"vitest": "^4.0.
|
|
43
|
-
"vue-tsc": "^3.
|
|
40
|
+
"vite-tsconfig-paths": "^6.0.5",
|
|
41
|
+
"vitest": "^4.0.18",
|
|
42
|
+
"vue-tsc": "^3.2.4"
|
|
44
43
|
}
|
|
45
|
-
}
|
|
44
|
+
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import alias from "@rollup/plugin-alias";
|
|
3
1
|
import { defineConfig } from "rolldown";
|
|
4
2
|
import { removeExportPlugin } from "rolldown-plugin-remove-export";
|
|
5
3
|
|
|
@@ -11,15 +9,5 @@ export default defineConfig({
|
|
|
11
9
|
format: "esm",
|
|
12
10
|
file: `dist/${outputFile}`,
|
|
13
11
|
},
|
|
14
|
-
plugins: [
|
|
15
|
-
alias({
|
|
16
|
-
entries: [
|
|
17
|
-
{
|
|
18
|
-
find: "~",
|
|
19
|
-
replacement: path.resolve(__dirname),
|
|
20
|
-
},
|
|
21
|
-
],
|
|
22
|
-
}),
|
|
23
|
-
removeExportPlugin(outputFile),
|
|
24
|
-
],
|
|
12
|
+
plugins: [removeExportPlugin(outputFile)],
|
|
25
13
|
});
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: Publish to GoogleAppsScript
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*' # Trigger on tags like v1.0.0, v0.1.2, etc.
|
|
7
|
+
workflow_dispatch: # Trigger manually
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build-and-publish:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
steps:
|
|
16
|
+
- name: Checkout repository
|
|
17
|
+
uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Setup Node.js
|
|
20
|
+
uses: actions/setup-node@v4
|
|
21
|
+
with:
|
|
22
|
+
node-version: '20.x'
|
|
23
|
+
registry-url: 'https://registry.npmjs.org'
|
|
24
|
+
|
|
25
|
+
- name: Install pnpm
|
|
26
|
+
uses: pnpm/action-setup@v4
|
|
27
|
+
with:
|
|
28
|
+
version: 10
|
|
29
|
+
|
|
30
|
+
- name: Install dependencies
|
|
31
|
+
run: pnpm install
|
|
32
|
+
|
|
33
|
+
- name: Prebuild
|
|
34
|
+
run: pnpm run check && pnpm run test
|
|
35
|
+
|
|
36
|
+
- name: Build package
|
|
37
|
+
run: pnpm run build
|
|
38
|
+
|
|
39
|
+
- name: Restore clasp credentials
|
|
40
|
+
uses: ciderjs/clasp-auth@v0.1.3
|
|
41
|
+
with:
|
|
42
|
+
json: {{ secrets.CLASPRC_JSON }}
|
|
43
|
+
|
|
44
|
+
- name: Publish to AppsScript
|
|
45
|
+
run: pnpm run push
|
|
@@ -19,32 +19,32 @@
|
|
|
19
19
|
"preview:web": "clasp open-web-app"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@ciderjs/city-gas": "^
|
|
23
|
-
"@ciderjs/gasnuki": "^0.
|
|
24
|
-
"vue": "^3.5.
|
|
22
|
+
"@ciderjs/city-gas": "^1.1.0",
|
|
23
|
+
"@ciderjs/gasnuki": "^0.5.5",
|
|
24
|
+
"vue": "^3.5.27",
|
|
25
|
+
"zod": "^4.3.6"
|
|
25
26
|
},
|
|
26
27
|
"devDependencies": {
|
|
27
|
-
"@biomejs/biome": "^2.3.
|
|
28
|
-
"@ciderjs/clasp-auth": "^0.
|
|
29
|
-
"@google/clasp": "^3.1.
|
|
30
|
-
"@
|
|
31
|
-
"@types/
|
|
32
|
-
"@
|
|
33
|
-
"@
|
|
34
|
-
"@vitest/coverage-v8": "^4.0.8",
|
|
28
|
+
"@biomejs/biome": "^2.3.13",
|
|
29
|
+
"@ciderjs/clasp-auth": "^0.2.0",
|
|
30
|
+
"@google/clasp": "^3.1.3",
|
|
31
|
+
"@types/google-apps-script": "^2.0.8",
|
|
32
|
+
"@types/node": "^25.1.0",
|
|
33
|
+
"@vitejs/plugin-vue": "^6.0.3",
|
|
34
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
35
35
|
"@vue/tsconfig": "^0.8.1",
|
|
36
36
|
"cpy-cli": "^6.0.0",
|
|
37
37
|
"cross-var": "^1.1.0",
|
|
38
38
|
"dotenv-cli": "^11.0.0",
|
|
39
|
-
"rimraf": "^6.1.
|
|
40
|
-
"rolldown": "1.0.0-
|
|
39
|
+
"rimraf": "^6.1.2",
|
|
40
|
+
"rolldown": "1.0.0-rc.2",
|
|
41
41
|
"rolldown-plugin-remove-export": "^0.1.3",
|
|
42
|
-
"typescript": "
|
|
43
|
-
"vite": "^7.1
|
|
44
|
-
"vite-plugin-google-apps-script": "^0.4.
|
|
42
|
+
"typescript": "^5.9.3",
|
|
43
|
+
"vite": "^7.3.1",
|
|
44
|
+
"vite-plugin-google-apps-script": "^0.4.1",
|
|
45
45
|
"vite-plugin-singlefile": "^2.3.0",
|
|
46
|
-
"vite-tsconfig-paths": "^
|
|
47
|
-
"vitest": "^4.0.
|
|
48
|
-
"vue-tsc": "^3.
|
|
46
|
+
"vite-tsconfig-paths": "^6.0.5",
|
|
47
|
+
"vitest": "^4.0.18",
|
|
48
|
+
"vue-tsc": "^3.2.4"
|
|
49
49
|
}
|
|
50
|
-
}
|
|
50
|
+
}
|