@ciderjs/gasbombe 0.3.2 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalog.json +32 -0
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +12 -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 +12 -4
- package/dist/templates/{react-ciderjs → common}/biome.json.ejs +14 -2
- package/dist/templates/html-js/package.json.ejs +10 -11
- 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/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/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 +24 -15
- 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
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"@biomejs/biome": "^2.3.13",
|
|
3
|
+
"@ciderjs/city-gas": "^1.1.0",
|
|
4
|
+
"@ciderjs/clasp-auth": "^0.2.0",
|
|
5
|
+
"@ciderjs/gasnuki": "^0.5.5",
|
|
6
|
+
"@google/clasp": "^3.1.3",
|
|
7
|
+
"@types/google-apps-script": "^2.0.8",
|
|
8
|
+
"@types/node": "^25.1.0",
|
|
9
|
+
"@types/react": "^19.2.10",
|
|
10
|
+
"@types/react-dom": "^19.2.3",
|
|
11
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
12
|
+
"@vitejs/plugin-vue": "^6.0.3",
|
|
13
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
14
|
+
"@vue/tsconfig": "^0.8.1",
|
|
15
|
+
"cpy-cli": "^6.0.0",
|
|
16
|
+
"cross-var": "^1.1.0",
|
|
17
|
+
"dotenv-cli": "^11.0.0",
|
|
18
|
+
"react": "^19.2.4",
|
|
19
|
+
"react-dom": "^19.2.4",
|
|
20
|
+
"rimraf": "^6.1.2",
|
|
21
|
+
"rolldown": "1.0.0-rc.2",
|
|
22
|
+
"rolldown-plugin-remove-export": "^0.1.3",
|
|
23
|
+
"typescript": "^5.9.3",
|
|
24
|
+
"vite": "^7.3.1",
|
|
25
|
+
"vite-plugin-google-apps-script": "^0.4.1",
|
|
26
|
+
"vite-plugin-singlefile": "^2.3.0",
|
|
27
|
+
"vite-tsconfig-paths": "^6.0.5",
|
|
28
|
+
"vitest": "^4.0.18",
|
|
29
|
+
"vue": "^3.5.27",
|
|
30
|
+
"vue-tsc": "^3.2.4",
|
|
31
|
+
"zod": "^4.3.6"
|
|
32
|
+
}
|
package/dist/cli.cjs
CHANGED
package/dist/cli.mjs
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -14,13 +14,15 @@ const fs__default = /*#__PURE__*/_interopDefaultCompat(fs);
|
|
|
14
14
|
const path__default = /*#__PURE__*/_interopDefaultCompat(path);
|
|
15
15
|
const ejs__default = /*#__PURE__*/_interopDefaultCompat(ejs);
|
|
16
16
|
|
|
17
|
+
function isWindows() {
|
|
18
|
+
return process.platform === "win32";
|
|
19
|
+
}
|
|
17
20
|
async function runCommand(command, args, cwd, capture = false) {
|
|
18
21
|
return new Promise((resolve, reject) => {
|
|
19
|
-
const isWindows = process.platform === "win32";
|
|
20
22
|
const child = node_child_process.spawn(command, args, {
|
|
21
23
|
cwd,
|
|
22
24
|
stdio: capture ? "pipe" : "inherit",
|
|
23
|
-
shell: isWindows
|
|
25
|
+
shell: isWindows()
|
|
24
26
|
});
|
|
25
27
|
let stdout = "";
|
|
26
28
|
let stderr = "";
|
|
@@ -177,6 +179,9 @@ async function generateProject({
|
|
|
177
179
|
const templateBaseDir = path__default.resolve(__dirname, "..", "dist", "templates");
|
|
178
180
|
const commonTemplateDir = path__default.resolve(templateBaseDir, "common");
|
|
179
181
|
const specificTemplateDir = path__default.resolve(templateBaseDir, templateType);
|
|
182
|
+
const catalogPath = path__default.resolve(__dirname, "..", "dist", "catalog.json");
|
|
183
|
+
const catalogJson = await fs__default.readFile(catalogPath, "utf-8");
|
|
184
|
+
const catalog = JSON.parse(catalogJson);
|
|
180
185
|
consola.consola.start(
|
|
181
186
|
`Creating a new Project for GoogleAppsScript in ${outputDir}...`
|
|
182
187
|
);
|
|
@@ -205,7 +210,10 @@ async function generateProject({
|
|
|
205
210
|
}
|
|
206
211
|
await fs__default.mkdir(outputDir, { recursive: true });
|
|
207
212
|
consola.consola.info(`Generating project files from template '${templateType}'...`);
|
|
208
|
-
const ejsData = {
|
|
213
|
+
const ejsData = {
|
|
214
|
+
projectName,
|
|
215
|
+
biomeVersion: catalog["@biomejs/biome"]?.replace("^", "") || "2.0.0"
|
|
216
|
+
};
|
|
209
217
|
const templateDirs = [commonTemplateDir, specificTemplateDir];
|
|
210
218
|
for (const dir of templateDirs) {
|
|
211
219
|
const files = await glob.glob("./**/*", {
|
|
@@ -277,4 +285,5 @@ To get started, write your GAS code in \`src/\`!`);
|
|
|
277
285
|
}
|
|
278
286
|
|
|
279
287
|
exports.generateProject = generateProject;
|
|
288
|
+
exports.isWindows = isWindows;
|
|
280
289
|
exports.runCommand = runCommand;
|
package/dist/index.d.cts
CHANGED
|
@@ -10,7 +10,8 @@ interface ProjectOptions {
|
|
|
10
10
|
install: boolean;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
declare function isWindows(): boolean;
|
|
13
14
|
declare function runCommand(command: string, args: string[], cwd: string, capture?: boolean): Promise<string>;
|
|
14
15
|
declare function generateProject({ projectName, packageManager, templateType, clasp, claspProjectId, install, }: ProjectOptions): Promise<void>;
|
|
15
16
|
|
|
16
|
-
export { generateProject, runCommand };
|
|
17
|
+
export { generateProject, isWindows, runCommand };
|
package/dist/index.d.mts
CHANGED
|
@@ -10,7 +10,8 @@ interface ProjectOptions {
|
|
|
10
10
|
install: boolean;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
declare function isWindows(): boolean;
|
|
13
14
|
declare function runCommand(command: string, args: string[], cwd: string, capture?: boolean): Promise<string>;
|
|
14
15
|
declare function generateProject({ projectName, packageManager, templateType, clasp, claspProjectId, install, }: ProjectOptions): Promise<void>;
|
|
15
16
|
|
|
16
|
-
export { generateProject, runCommand };
|
|
17
|
+
export { generateProject, isWindows, runCommand };
|
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,8 @@ interface ProjectOptions {
|
|
|
10
10
|
install: boolean;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
declare function isWindows(): boolean;
|
|
13
14
|
declare function runCommand(command: string, args: string[], cwd: string, capture?: boolean): Promise<string>;
|
|
14
15
|
declare function generateProject({ projectName, packageManager, templateType, clasp, claspProjectId, install, }: ProjectOptions): Promise<void>;
|
|
15
16
|
|
|
16
|
-
export { generateProject, runCommand };
|
|
17
|
+
export { generateProject, isWindows, runCommand };
|
package/dist/index.mjs
CHANGED
|
@@ -15,13 +15,15 @@ import __cjs_mod__ from 'module';
|
|
|
15
15
|
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
16
16
|
const __dirname = __cjs_path__.dirname(__filename);
|
|
17
17
|
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
18
|
+
function isWindows() {
|
|
19
|
+
return process.platform === "win32";
|
|
20
|
+
}
|
|
18
21
|
async function runCommand(command, args, cwd, capture = false) {
|
|
19
22
|
return new Promise((resolve, reject) => {
|
|
20
|
-
const isWindows = process.platform === "win32";
|
|
21
23
|
const child = spawn(command, args, {
|
|
22
24
|
cwd,
|
|
23
25
|
stdio: capture ? "pipe" : "inherit",
|
|
24
|
-
shell: isWindows
|
|
26
|
+
shell: isWindows()
|
|
25
27
|
});
|
|
26
28
|
let stdout = "";
|
|
27
29
|
let stderr = "";
|
|
@@ -178,6 +180,9 @@ async function generateProject({
|
|
|
178
180
|
const templateBaseDir = path.resolve(__dirname, "..", "dist", "templates");
|
|
179
181
|
const commonTemplateDir = path.resolve(templateBaseDir, "common");
|
|
180
182
|
const specificTemplateDir = path.resolve(templateBaseDir, templateType);
|
|
183
|
+
const catalogPath = path.resolve(__dirname, "..", "dist", "catalog.json");
|
|
184
|
+
const catalogJson = await fs.readFile(catalogPath, "utf-8");
|
|
185
|
+
const catalog = JSON.parse(catalogJson);
|
|
181
186
|
consola.start(
|
|
182
187
|
`Creating a new Project for GoogleAppsScript in ${outputDir}...`
|
|
183
188
|
);
|
|
@@ -206,7 +211,10 @@ async function generateProject({
|
|
|
206
211
|
}
|
|
207
212
|
await fs.mkdir(outputDir, { recursive: true });
|
|
208
213
|
consola.info(`Generating project files from template '${templateType}'...`);
|
|
209
|
-
const ejsData = {
|
|
214
|
+
const ejsData = {
|
|
215
|
+
projectName,
|
|
216
|
+
biomeVersion: catalog["@biomejs/biome"]?.replace("^", "") || "2.0.0"
|
|
217
|
+
};
|
|
210
218
|
const templateDirs = [commonTemplateDir, specificTemplateDir];
|
|
211
219
|
for (const dir of templateDirs) {
|
|
212
220
|
const files = await glob("./**/*", {
|
|
@@ -277,4 +285,4 @@ To get started, write your GAS code in \`src/\`!`);
|
|
|
277
285
|
}
|
|
278
286
|
}
|
|
279
287
|
|
|
280
|
-
export { generateProject, runCommand };
|
|
288
|
+
export { generateProject, isWindows, runCommand };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/<%= biomeVersion %>/schema.json",
|
|
3
3
|
"vcs": {
|
|
4
4
|
"enabled": false,
|
|
5
5
|
"clientKind": "git",
|
|
@@ -39,5 +39,17 @@
|
|
|
39
39
|
"organizeImports": "on"
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
}
|
|
42
|
+
},
|
|
43
|
+
"overrides": [
|
|
44
|
+
{
|
|
45
|
+
"includes": ["server/**/*"],
|
|
46
|
+
"linter": {
|
|
47
|
+
"rules": {
|
|
48
|
+
"correctness": {
|
|
49
|
+
"noUnusedVariables": "info"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
]
|
|
43
55
|
}
|
|
@@ -17,17 +17,16 @@
|
|
|
17
17
|
"preview:web": "clasp open-web-app"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@biomejs/biome": "^2.3.
|
|
21
|
-
"@google/clasp": "^3.1.
|
|
22
|
-
"@
|
|
23
|
-
"@types/
|
|
24
|
-
"@types/node": "^24.10.0",
|
|
20
|
+
"@biomejs/biome": "^2.3.13",
|
|
21
|
+
"@google/clasp": "^3.1.3",
|
|
22
|
+
"@types/google-apps-script": "^2.0.8",
|
|
23
|
+
"@types/node": "^25.1.0",
|
|
25
24
|
"cpy-cli": "^6.0.0",
|
|
26
|
-
"rimraf": "^6.1.
|
|
27
|
-
"rolldown": "1.0.0-
|
|
25
|
+
"rimraf": "^6.1.2",
|
|
26
|
+
"rolldown": "1.0.0-rc.2",
|
|
28
27
|
"rolldown-plugin-remove-export": "^0.1.3",
|
|
29
|
-
"vite": "^7.1
|
|
30
|
-
"vite-tsconfig-paths": "^
|
|
31
|
-
"vitest": "^4.0.
|
|
28
|
+
"vite": "^7.3.1",
|
|
29
|
+
"vite-tsconfig-paths": "^6.0.5",
|
|
30
|
+
"vitest": "^4.0.18"
|
|
32
31
|
}
|
|
33
|
-
}
|
|
32
|
+
}
|
|
@@ -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: "server/app.js",
|
|
8
|
+
output: {
|
|
9
|
+
format: "esm",
|
|
10
|
+
file: `dist/${outputFile}`,
|
|
11
|
+
},
|
|
12
|
+
plugins: [removeExportPlugin(outputFile)],
|
|
29
13
|
});
|
|
@@ -17,30 +17,29 @@
|
|
|
17
17
|
"preview:web": "clasp open-web-app"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"react": "^19.2.
|
|
21
|
-
"react-dom": "^19.2.
|
|
20
|
+
"react": "^19.2.4",
|
|
21
|
+
"react-dom": "^19.2.4"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
|
-
"@biomejs/biome": "^2.
|
|
25
|
-
"@google/clasp": "^3.1.
|
|
26
|
-
"@
|
|
27
|
-
"@types/
|
|
28
|
-
"@types/
|
|
29
|
-
"@types/react": "^19.2.
|
|
30
|
-
"@
|
|
31
|
-
"@
|
|
32
|
-
"@vitest/coverage-v8": "3.2.4",
|
|
24
|
+
"@biomejs/biome": "^2.3.13",
|
|
25
|
+
"@google/clasp": "^3.1.3",
|
|
26
|
+
"@types/google-apps-script": "^2.0.8",
|
|
27
|
+
"@types/node": "^25.1.0",
|
|
28
|
+
"@types/react": "^19.2.10",
|
|
29
|
+
"@types/react-dom": "^19.2.3",
|
|
30
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
31
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
33
32
|
"cpy-cli": "^6.0.0",
|
|
34
33
|
"cross-var": "^1.1.0",
|
|
35
|
-
"dotenv-cli": "^
|
|
36
|
-
"rimraf": "^6.
|
|
37
|
-
"rolldown": "1.0.0-
|
|
34
|
+
"dotenv-cli": "^11.0.0",
|
|
35
|
+
"rimraf": "^6.1.2",
|
|
36
|
+
"rolldown": "1.0.0-rc.2",
|
|
38
37
|
"rolldown-plugin-remove-export": "^0.1.3",
|
|
39
|
-
"typescript": "
|
|
40
|
-
"vite": "^7.1
|
|
41
|
-
"vite-plugin-google-apps-script": "^0.4.
|
|
38
|
+
"typescript": "^5.9.3",
|
|
39
|
+
"vite": "^7.3.1",
|
|
40
|
+
"vite-plugin-google-apps-script": "^0.4.1",
|
|
42
41
|
"vite-plugin-singlefile": "^2.3.0",
|
|
43
|
-
"vite-tsconfig-paths": "^
|
|
44
|
-
"vitest": "^
|
|
42
|
+
"vite-tsconfig-paths": "^6.0.5",
|
|
43
|
+
"vitest": "^4.0.18"
|
|
45
44
|
}
|
|
46
|
-
}
|
|
45
|
+
}
|
|
@@ -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
|
});
|
|
@@ -19,33 +19,33 @@
|
|
|
19
19
|
"preview:web": "clasp open-web-app"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@ciderjs/city-gas": "^
|
|
23
|
-
"@ciderjs/gasnuki": "^0.
|
|
24
|
-
"react": "^19.2.
|
|
25
|
-
"react-dom": "^19.2.
|
|
22
|
+
"@ciderjs/city-gas": "^1.1.0",
|
|
23
|
+
"@ciderjs/gasnuki": "^0.5.5",
|
|
24
|
+
"react": "^19.2.4",
|
|
25
|
+
"react-dom": "^19.2.4",
|
|
26
|
+
"zod": "^4.3.6"
|
|
26
27
|
},
|
|
27
28
|
"devDependencies": {
|
|
28
|
-
"@biomejs/biome": "^2.
|
|
29
|
-
"@ciderjs/clasp-auth": "^0.
|
|
30
|
-
"@google/clasp": "^3.1.
|
|
31
|
-
"@
|
|
32
|
-
"@types/
|
|
33
|
-
"@types/
|
|
34
|
-
"@types/react": "^19.2.
|
|
35
|
-
"@
|
|
36
|
-
"@
|
|
37
|
-
"@vitest/coverage-v8": "3.2.4",
|
|
29
|
+
"@biomejs/biome": "^2.3.13",
|
|
30
|
+
"@ciderjs/clasp-auth": "^0.2.0",
|
|
31
|
+
"@google/clasp": "^3.1.3",
|
|
32
|
+
"@types/google-apps-script": "^2.0.8",
|
|
33
|
+
"@types/node": "^25.1.0",
|
|
34
|
+
"@types/react": "^19.2.10",
|
|
35
|
+
"@types/react-dom": "^19.2.3",
|
|
36
|
+
"@vitejs/plugin-react": "^5.1.2",
|
|
37
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
38
38
|
"cpy-cli": "^6.0.0",
|
|
39
39
|
"cross-var": "^1.1.0",
|
|
40
|
-
"dotenv-cli": "^
|
|
41
|
-
"rimraf": "^6.
|
|
42
|
-
"rolldown": "1.0.0-
|
|
40
|
+
"dotenv-cli": "^11.0.0",
|
|
41
|
+
"rimraf": "^6.1.2",
|
|
42
|
+
"rolldown": "1.0.0-rc.2",
|
|
43
43
|
"rolldown-plugin-remove-export": "^0.1.3",
|
|
44
|
-
"typescript": "
|
|
45
|
-
"vite": "^7.1
|
|
46
|
-
"vite-plugin-google-apps-script": "^0.4.
|
|
44
|
+
"typescript": "^5.9.3",
|
|
45
|
+
"vite": "^7.3.1",
|
|
46
|
+
"vite-plugin-google-apps-script": "^0.4.1",
|
|
47
47
|
"vite-plugin-singlefile": "^2.3.0",
|
|
48
|
-
"vite-tsconfig-paths": "^
|
|
49
|
-
"vitest": "^
|
|
48
|
+
"vite-tsconfig-paths": "^6.0.5",
|
|
49
|
+
"vitest": "^4.0.18"
|
|
50
50
|
}
|
|
51
|
-
}
|
|
51
|
+
}
|
|
@@ -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
|
});
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import { serialize } from "@ciderjs/gasnuki/json";
|
|
2
|
+
|
|
1
3
|
export function sayHello(name: string): string {
|
|
2
4
|
return `Hello, ${name}!`;
|
|
3
5
|
}
|
|
6
|
+
|
|
7
|
+
export function getHelloMember() {
|
|
8
|
+
return serialize({
|
|
9
|
+
name: "John Doe",
|
|
10
|
+
age: 30,
|
|
11
|
+
isMember: true,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Auto-generated by @ciderjs/city-gas
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/* biome-ignore: auto generated file */
|
|
5
|
+
|
|
6
|
+
export type RouteNames = "/about" | "/detail/user" | "/";
|
|
7
|
+
|
|
8
|
+
export interface RouteParams {
|
|
9
|
+
"/about": {};
|
|
10
|
+
"/detail/user": { id: string };
|
|
11
|
+
"/": {};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module "@ciderjs/city-gas" {
|
|
15
|
+
interface Register {
|
|
16
|
+
RouteNames: RouteNames;
|
|
17
|
+
RouteParams: RouteParams;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Auto-generated by @ciderjs/city-gas
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/* biome-ignore: auto generated file */
|
|
5
|
+
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
import P_b15baaaf from "../pages/_root.tsx";
|
|
8
|
+
import P_d39c764f from "../pages/about.tsx";
|
|
9
|
+
import P_ccc244b1, { schema as S_ccc244b1 } from "../pages/detail/user.tsx";
|
|
10
|
+
import P_15d2a633 from "../pages/index.tsx";
|
|
11
|
+
|
|
12
|
+
export const pages = {
|
|
13
|
+
"/about": {
|
|
14
|
+
component: P_d39c764f,
|
|
15
|
+
isIndex: false,
|
|
16
|
+
schema: z.object({}),
|
|
17
|
+
},
|
|
18
|
+
"/detail/user": {
|
|
19
|
+
component: P_ccc244b1,
|
|
20
|
+
isIndex: false,
|
|
21
|
+
schema: S_ccc244b1,
|
|
22
|
+
},
|
|
23
|
+
"/": {
|
|
24
|
+
component: P_15d2a633,
|
|
25
|
+
isIndex: true,
|
|
26
|
+
schema: z.object({}),
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export const specialPages = {
|
|
31
|
+
_root: P_b15baaaf,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const dynamicRoutes = [];
|
|
@@ -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;
|