create-dovite 2.0.0 → 2.0.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/package.json +3 -2
- package/src/files.js +72 -0
- package/src/prompts.js +49 -0
- package/src/setup.js +106 -0
- package/templates/react-js/jsconfig.json +7 -0
- package/templates/react-js/public/manifest.json +12 -0
- package/templates/react-js/public/thumbnail.png +0 -0
- package/templates/react-js/src/API/currentUserContext.jsx +56 -0
- package/templates/react-js/src/API/dataApi.js +235 -0
- package/templates/react-js/src/API/domoAPI.js +311 -0
- package/templates/react-js/src/App.jsx +13 -0
- package/templates/react-js/src/index.css +1 -0
- package/templates/react-js/vite.config.js +40 -0
- package/templates/react-ts/public/manifest.json +12 -0
- package/templates/react-ts/public/thumbnail.png +0 -0
- package/templates/react-ts/src/API/currentUserContext.tsx +66 -0
- package/templates/react-ts/src/API/dataApi.ts +338 -0
- package/templates/react-ts/src/API/domoAPI.ts +355 -0
- package/templates/react-ts/src/App.tsx +13 -0
- package/templates/react-ts/src/index.css +1 -0
- package/templates/react-ts/tsconfig.app.json +31 -0
- package/templates/react-ts/tsconfig.json +17 -0
- package/templates/react-ts/vite.config.ts +47 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
4
|
+
"target": "ES2022",
|
|
5
|
+
"useDefineForClassFields": true,
|
|
6
|
+
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
|
7
|
+
"module": "ESNext",
|
|
8
|
+
"types": ["vite/client"],
|
|
9
|
+
"skipLibCheck": true,
|
|
10
|
+
"baseUrl": ".",
|
|
11
|
+
"paths": {
|
|
12
|
+
"@/*": ["./src/*"]
|
|
13
|
+
},
|
|
14
|
+
/* Bundler mode */
|
|
15
|
+
"moduleResolution": "bundler",
|
|
16
|
+
"allowImportingTsExtensions": true,
|
|
17
|
+
"verbatimModuleSyntax": true,
|
|
18
|
+
"moduleDetection": "force",
|
|
19
|
+
"noEmit": true,
|
|
20
|
+
"jsx": "react-jsx",
|
|
21
|
+
|
|
22
|
+
/* Linting */
|
|
23
|
+
"strict": true,
|
|
24
|
+
"noUnusedLocals": true,
|
|
25
|
+
"noUnusedParameters": true,
|
|
26
|
+
"erasableSyntaxOnly": true,
|
|
27
|
+
"noFallthroughCasesInSwitch": true,
|
|
28
|
+
"noUncheckedSideEffectImports": true
|
|
29
|
+
},
|
|
30
|
+
"include": ["src"]
|
|
31
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
import react from "@vitejs/plugin-react";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import { Proxy } from "@domoinc/ryuu-proxy";
|
|
5
|
+
import manifest from "./public/manifest.json";
|
|
6
|
+
import tailwindcss from "@tailwindcss/vite";
|
|
7
|
+
// import { fileURLToPath } from "url";
|
|
8
|
+
|
|
9
|
+
// const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
// const __dirname = path.dirname(__filename);
|
|
11
|
+
|
|
12
|
+
const config = { manifest };
|
|
13
|
+
const proxy = new Proxy(config);
|
|
14
|
+
|
|
15
|
+
// https://vite.dev/config/
|
|
16
|
+
export default defineConfig({
|
|
17
|
+
plugins: [
|
|
18
|
+
react(),
|
|
19
|
+
tailwindcss(),
|
|
20
|
+
{
|
|
21
|
+
name: "ryuu-proxy",
|
|
22
|
+
configureServer(server) {
|
|
23
|
+
// Patch the `res` object to add `status` and `send` methods
|
|
24
|
+
server.middlewares.use((_req: any, res: any, next: any) => {
|
|
25
|
+
res.status = function (code: number) {
|
|
26
|
+
this.statusCode = code;
|
|
27
|
+
return this;
|
|
28
|
+
};
|
|
29
|
+
res.send = function (body: string) {
|
|
30
|
+
this.setHeader("Content-Type", "text/plain");
|
|
31
|
+
this.end(body);
|
|
32
|
+
};
|
|
33
|
+
next();
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
// Use the proxy middleware
|
|
37
|
+
server.middlewares.use(proxy.express());
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
define: { "process.env": {} },
|
|
42
|
+
resolve: {
|
|
43
|
+
alias: {
|
|
44
|
+
"@": path.resolve(__dirname, "./src"),
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
});
|