@batijs/cli 0.0.261 → 0.0.263
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/boilerplates/@batijs/plain-sentry/files/$package.json.js +117 -0
- package/dist/boilerplates/@batijs/plain-sentry/files/pages/sentry/+Page.js +19 -0
- package/dist/boilerplates/@batijs/plain-sentry/files/pages/sentry/+client.js +37 -0
- package/dist/boilerplates/@batijs/plain-sentry/files/sentry.browser.config.ts +25 -0
- package/dist/boilerplates/@batijs/plain-sentry/files/vite-env.d.ts +1 -0
- package/dist/boilerplates/@batijs/plain-sentry/types/pages/sentry/+Page.d.ts +1 -0
- package/dist/boilerplates/@batijs/plain-sentry/types/pages/sentry/+client.d.ts +6 -0
- package/dist/boilerplates/@batijs/plain-sentry/types/sentry.browser.config.d.ts +1 -0
- package/dist/boilerplates/@batijs/prettier/files/.prettierignore +3 -0
- package/dist/boilerplates/@batijs/react-sentry/files/$package.json.js +101 -0
- package/dist/boilerplates/@batijs/react-sentry/files/pages/sentry/+Page.tsx +43 -0
- package/dist/boilerplates/@batijs/react-sentry/files/sentry.browser.config.ts +22 -0
- package/dist/boilerplates/@batijs/react-sentry/types/pages/sentry/+Page.d.ts +1 -0
- package/dist/boilerplates/@batijs/react-sentry/types/sentry.browser.config.d.ts +1 -0
- package/dist/boilerplates/@batijs/sentry/files/$.env.js +22 -0
- package/dist/boilerplates/@batijs/sentry/files/$README.md.js +31 -0
- package/dist/boilerplates/@batijs/sentry/files/$package.json.js +86 -0
- package/dist/boilerplates/@batijs/sentry/files/$vite.config.ts.js +18 -0
- package/dist/boilerplates/@batijs/sentry/files/.env.sentry-build-plugin +8 -0
- package/dist/boilerplates/@batijs/sentry/files/pages/$+client.ts.js +23 -0
- package/dist/boilerplates/@batijs/shadcn-ui/files/!tailwind.config.ts +68 -0
- package/dist/boilerplates/@batijs/shadcn-ui/files/$README.md.js +36 -0
- package/dist/boilerplates/@batijs/shadcn-ui/files/$package.json.js +112 -0
- package/dist/boilerplates/@batijs/shadcn-ui/files/$tsconfig.json.js +13 -0
- package/dist/boilerplates/@batijs/shadcn-ui/files/$vite.config.ts.js +34 -0
- package/dist/boilerplates/@batijs/shadcn-ui/files/components.json +17 -0
- package/dist/boilerplates/@batijs/shadcn-ui/files/layouts/!tailwind.css +101 -0
- package/dist/boilerplates/@batijs/shadcn-ui/files/lib/utils.ts +6 -0
- package/dist/boilerplates/@batijs/shadcn-ui/types/!tailwind.config.d.ts +72 -0
- package/dist/boilerplates/@batijs/shadcn-ui/types/lib/utils.d.ts +2 -0
- package/dist/boilerplates/@batijs/shared/files/.gitignore +3 -0
- package/dist/boilerplates/@batijs/solid-sentry/files/$package.json.js +99 -0
- package/dist/boilerplates/@batijs/solid-sentry/files/pages/sentry/+Page.tsx +47 -0
- package/dist/boilerplates/@batijs/solid-sentry/files/sentry.browser.config.ts +22 -0
- package/dist/boilerplates/@batijs/solid-sentry/types/pages/sentry/+Page.d.ts +1 -0
- package/dist/boilerplates/@batijs/solid-sentry/types/sentry.browser.config.d.ts +1 -0
- package/dist/boilerplates/@batijs/vue/files/layouts/LayoutDefault.vue +3 -0
- package/dist/boilerplates/@batijs/vue-sentry/files/$package.json.js +93 -0
- package/dist/boilerplates/@batijs/vue-sentry/files/pages/sentry/+Page.vue +33 -0
- package/dist/boilerplates/@batijs/vue-sentry/files/sentry.browser.config.ts +25 -0
- package/dist/boilerplates/@batijs/vue-sentry/types/sentry.browser.config.d.ts +1 -0
- package/dist/boilerplates/boilerplates.json +99 -0
- package/dist/index.js +25 -9
- package/package.json +5 -5
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// files/$README.md.ts
|
|
2
|
+
import { loadReadme } from "@batijs/core";
|
|
3
|
+
async function getReadme(props) {
|
|
4
|
+
const content = await loadReadme(props);
|
|
5
|
+
const about = `
|
|
6
|
+
|
|
7
|
+
## shadcn/ui
|
|
8
|
+
|
|
9
|
+
Beautifully designed components that you can copy and paste into your apps. Accessible. Customizable. Open Source.
|
|
10
|
+
|
|
11
|
+
### Configuration
|
|
12
|
+
|
|
13
|
+
see [shadcn/ui theming](https://ui.shadcn.com/docs/theming)
|
|
14
|
+
|
|
15
|
+
Base Configuration can be found in \`components.json\` file.
|
|
16
|
+
|
|
17
|
+
> [!NOTE]
|
|
18
|
+
> changes to the \`components.json\` file **will not** be reflected in existing components. Only new components will be affected.
|
|
19
|
+
|
|
20
|
+
### Add Components to Your Project
|
|
21
|
+
|
|
22
|
+
**Example:** add a component to your project.
|
|
23
|
+
\`pnpm shadcn add button\`
|
|
24
|
+
|
|
25
|
+
use the \`<Button />\` component in your project:
|
|
26
|
+
\`import { Button } from "@/components/ui/button";\`
|
|
27
|
+
|
|
28
|
+
more [shadcn/ui components](https://ui.shadcn.com/docs/components/accordion)
|
|
29
|
+
|
|
30
|
+
`;
|
|
31
|
+
content.addAbout(about);
|
|
32
|
+
return content.finalize();
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
getReadme as default
|
|
36
|
+
};
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// package.json
|
|
28
|
+
var require_package = __commonJS({
|
|
29
|
+
"package.json"(exports, module) {
|
|
30
|
+
module.exports = {
|
|
31
|
+
name: "@batijs/shadcn-ui",
|
|
32
|
+
private: true,
|
|
33
|
+
version: "0.0.1",
|
|
34
|
+
description: "",
|
|
35
|
+
type: "module",
|
|
36
|
+
scripts: {
|
|
37
|
+
"check-types": "tsc --noEmit",
|
|
38
|
+
build: "bati-compile-boilerplate"
|
|
39
|
+
},
|
|
40
|
+
keywords: [],
|
|
41
|
+
author: "",
|
|
42
|
+
license: "MIT",
|
|
43
|
+
devDependencies: {
|
|
44
|
+
"@batijs/compile": "workspace:*",
|
|
45
|
+
"@radix-ui/react-icons": "^1.3.0",
|
|
46
|
+
"@types/node": "^18.19.14",
|
|
47
|
+
"class-variance-authority": "^0.7.0",
|
|
48
|
+
clsx: "^2.1.1",
|
|
49
|
+
"lucide-react": "^0.438.0",
|
|
50
|
+
"tailwind-merge": "^2.5.2",
|
|
51
|
+
tailwindcss: "^3.4.10",
|
|
52
|
+
"tailwindcss-animate": "^1.0.7"
|
|
53
|
+
},
|
|
54
|
+
dependencies: {
|
|
55
|
+
"@batijs/core": "workspace:*"
|
|
56
|
+
},
|
|
57
|
+
files: [
|
|
58
|
+
"dist/"
|
|
59
|
+
],
|
|
60
|
+
bati: {
|
|
61
|
+
if: {
|
|
62
|
+
flag: "shadcn-ui"
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
exports: {
|
|
66
|
+
"./!tailwind.config": {
|
|
67
|
+
types: "./dist/types/!tailwind.config.d.ts"
|
|
68
|
+
},
|
|
69
|
+
"./lib/utils": {
|
|
70
|
+
types: "./dist/types/lib/utils.d.ts"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
typesVersions: {
|
|
74
|
+
"*": {
|
|
75
|
+
"!tailwind.config": [
|
|
76
|
+
"./dist/types/!tailwind.config.d.ts"
|
|
77
|
+
],
|
|
78
|
+
"lib/utils": [
|
|
79
|
+
"./dist/types/lib/utils.d.ts"
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
// files/$package.json.ts
|
|
88
|
+
import { addDependency, loadAsJson, setScripts } from "@batijs/core";
|
|
89
|
+
async function getPackageJson(props) {
|
|
90
|
+
const packageJson = await loadAsJson(props);
|
|
91
|
+
setScripts(packageJson, {
|
|
92
|
+
// @ts-ignore
|
|
93
|
+
shadcn: {
|
|
94
|
+
value: "pnpm dlx shadcn@latest",
|
|
95
|
+
precedence: 20,
|
|
96
|
+
warnIfReplaced: true
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
|
|
100
|
+
dependencies: [
|
|
101
|
+
"tailwindcss-animate",
|
|
102
|
+
"class-variance-authority",
|
|
103
|
+
"clsx",
|
|
104
|
+
"tailwind-merge",
|
|
105
|
+
"lucide-react",
|
|
106
|
+
"@radix-ui/react-icons"
|
|
107
|
+
]
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
export {
|
|
111
|
+
getPackageJson as default
|
|
112
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// files/$tsconfig.json.ts
|
|
2
|
+
import { loadAsJson } from "@batijs/core";
|
|
3
|
+
async function getTsConfig(props) {
|
|
4
|
+
const tsConfig = await loadAsJson(props);
|
|
5
|
+
tsConfig.compilerOptions.paths = {
|
|
6
|
+
...tsConfig.compilerOptions?.paths ?? {},
|
|
7
|
+
"@/*": ["./*"]
|
|
8
|
+
};
|
|
9
|
+
return tsConfig;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
getTsConfig as default
|
|
13
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// files/$vite.config.ts.ts
|
|
2
|
+
import { loadAsMagicast, yellow } from "@batijs/core";
|
|
3
|
+
async function getViteConfig(props) {
|
|
4
|
+
const mod = await loadAsMagicast(props);
|
|
5
|
+
const replacement = `new URL("./", import.meta.url).pathname`;
|
|
6
|
+
addResolveAlias(mod, "@", replacement);
|
|
7
|
+
return mod.generate().code.replace(`"{{PLACEHOLDER_ALIAS}}"`, replacement);
|
|
8
|
+
}
|
|
9
|
+
function addResolveAlias(mod, find, replacement) {
|
|
10
|
+
const alias = mod.exports.default.$args[0]?.resolve?.alias ?? {};
|
|
11
|
+
const warnMsg = `${yellow("WARN")}: new resolve.alias: \`"${find}":${replacement}\` replaced existing in vite.config.ts.`;
|
|
12
|
+
if (alias?.length === void 0) {
|
|
13
|
+
if (alias[find]) {
|
|
14
|
+
console.warn(warnMsg);
|
|
15
|
+
}
|
|
16
|
+
alias[find] = "{{PLACEHOLDER_ALIAS}}";
|
|
17
|
+
} else {
|
|
18
|
+
const newAlias = {
|
|
19
|
+
find,
|
|
20
|
+
replacement: "{{PLACEHOLDER_ALIAS}}"
|
|
21
|
+
};
|
|
22
|
+
const index = alias.findIndex((a) => a?.find === find);
|
|
23
|
+
if (index >= 0) {
|
|
24
|
+
console.warn(warnMsg);
|
|
25
|
+
alias.splice(index, 1);
|
|
26
|
+
}
|
|
27
|
+
alias.push(newAlias);
|
|
28
|
+
}
|
|
29
|
+
if (!mod.exports.default.$args[0]?.resolve) mod.exports.default.$args[0].resolve = {};
|
|
30
|
+
mod.exports.default.$args[0].resolve.alias = alias;
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
getViteConfig as default
|
|
34
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://ui.shadcn.com/schema.json",
|
|
3
|
+
"style": "default",
|
|
4
|
+
"tailwind": {
|
|
5
|
+
"config": "tailwind.config.ts",
|
|
6
|
+
"css": "layouts/tailwind.css",
|
|
7
|
+
"baseColor": "gray",
|
|
8
|
+
"cssVariables": true
|
|
9
|
+
|
|
10
|
+
},
|
|
11
|
+
"rsc": true,
|
|
12
|
+
"tsx": true,
|
|
13
|
+
"aliases": {
|
|
14
|
+
"utils": "@/lib/utils",
|
|
15
|
+
"components": "@/components"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
|
+
@tailwind utilities;
|
|
4
|
+
|
|
5
|
+
@layer base {
|
|
6
|
+
:root {
|
|
7
|
+
--background: 0 0% 100%;
|
|
8
|
+
--foreground: 0 0% 3.9%;
|
|
9
|
+
|
|
10
|
+
--muted: 0 0% 96.1%;
|
|
11
|
+
--muted-foreground: 0 0% 45.1%;
|
|
12
|
+
|
|
13
|
+
--popover: 0 0% 100%;
|
|
14
|
+
--popover-foreground: 0 0% 3.9%;
|
|
15
|
+
|
|
16
|
+
--border: 0 0% 89.8%;
|
|
17
|
+
--input: 0 0% 89.8%;
|
|
18
|
+
|
|
19
|
+
--card: 0 0% 100%;
|
|
20
|
+
--card-foreground: 0 0% 3.9%;
|
|
21
|
+
|
|
22
|
+
--primary: 0 0% 9%;
|
|
23
|
+
--primary-foreground: 0 0% 98%;
|
|
24
|
+
|
|
25
|
+
--secondary: 0 0% 96.1%;
|
|
26
|
+
--secondary-foreground: 0 0% 9%;
|
|
27
|
+
|
|
28
|
+
--accent: 0 0% 96.1%;
|
|
29
|
+
--accent-foreground: 0 0% 9%;
|
|
30
|
+
|
|
31
|
+
--destructive: 0 84.2% 60.2%;
|
|
32
|
+
--destructive-foreground: 0 0% 98%;
|
|
33
|
+
|
|
34
|
+
--ring: 0 0% 3.9%;
|
|
35
|
+
|
|
36
|
+
--radius: 0.5rem;
|
|
37
|
+
|
|
38
|
+
--chart-1: 12 76% 61%;
|
|
39
|
+
|
|
40
|
+
--chart-2: 173 58% 39%;
|
|
41
|
+
|
|
42
|
+
--chart-3: 197 37% 24%;
|
|
43
|
+
|
|
44
|
+
--chart-4: 43 74% 66%;
|
|
45
|
+
|
|
46
|
+
--chart-5: 27 87% 67%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.dark {
|
|
50
|
+
--background: 0 0% 3.9%;
|
|
51
|
+
--foreground: 0 0% 98%;
|
|
52
|
+
|
|
53
|
+
--muted: 0 0% 14.9%;
|
|
54
|
+
--muted-foreground: 0 0% 63.9%;
|
|
55
|
+
|
|
56
|
+
--accent: 0 0% 14.9%;
|
|
57
|
+
--accent-foreground: 0 0% 98%;
|
|
58
|
+
|
|
59
|
+
--popover: 0 0% 3.9%;
|
|
60
|
+
--popover-foreground: 0 0% 98%;
|
|
61
|
+
|
|
62
|
+
--border: 0 0% 14.9%;
|
|
63
|
+
--input: 0 0% 14.9%;
|
|
64
|
+
|
|
65
|
+
--card: 0 0% 3.9%;
|
|
66
|
+
--card-foreground: 0 0% 98%;
|
|
67
|
+
|
|
68
|
+
--primary: 0 0% 98%;
|
|
69
|
+
--primary-foreground: 0 0% 9%;
|
|
70
|
+
|
|
71
|
+
--secondary: 0 0% 14.9%;
|
|
72
|
+
--secondary-foreground: 0 0% 98%;
|
|
73
|
+
|
|
74
|
+
--destructive: 0 62.8% 30.6%;
|
|
75
|
+
--destructive-foreground: 0 0% 98%;
|
|
76
|
+
|
|
77
|
+
--ring: 0 0% 83.1%;
|
|
78
|
+
|
|
79
|
+
--radius: 0.5rem;
|
|
80
|
+
|
|
81
|
+
--chart-1: 220 70% 50%;
|
|
82
|
+
|
|
83
|
+
--chart-2: 160 60% 45%;
|
|
84
|
+
|
|
85
|
+
--chart-3: 30 80% 55%;
|
|
86
|
+
|
|
87
|
+
--chart-4: 280 65% 60%;
|
|
88
|
+
|
|
89
|
+
--chart-5: 340 75% 55%;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@layer base {
|
|
94
|
+
* {
|
|
95
|
+
@apply border-border;
|
|
96
|
+
}
|
|
97
|
+
body {
|
|
98
|
+
@apply bg-background text-foreground;
|
|
99
|
+
font-feature-settings: "rlig" 1, "calt" 1;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
darkMode: ["class"];
|
|
3
|
+
content: string[];
|
|
4
|
+
theme: {
|
|
5
|
+
extend: {
|
|
6
|
+
keyframes: {
|
|
7
|
+
"caret-blink": {
|
|
8
|
+
"0%,70%,100%": {
|
|
9
|
+
opacity: string;
|
|
10
|
+
};
|
|
11
|
+
"20%,50%": {
|
|
12
|
+
opacity: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
animation: {
|
|
17
|
+
"caret-blink": string;
|
|
18
|
+
};
|
|
19
|
+
borderRadius: {
|
|
20
|
+
lg: string;
|
|
21
|
+
md: string;
|
|
22
|
+
sm: string;
|
|
23
|
+
};
|
|
24
|
+
colors: {
|
|
25
|
+
background: string;
|
|
26
|
+
foreground: string;
|
|
27
|
+
card: {
|
|
28
|
+
DEFAULT: string;
|
|
29
|
+
foreground: string;
|
|
30
|
+
};
|
|
31
|
+
popover: {
|
|
32
|
+
DEFAULT: string;
|
|
33
|
+
foreground: string;
|
|
34
|
+
};
|
|
35
|
+
primary: {
|
|
36
|
+
DEFAULT: string;
|
|
37
|
+
foreground: string;
|
|
38
|
+
};
|
|
39
|
+
secondary: {
|
|
40
|
+
DEFAULT: string;
|
|
41
|
+
foreground: string;
|
|
42
|
+
};
|
|
43
|
+
muted: {
|
|
44
|
+
DEFAULT: string;
|
|
45
|
+
foreground: string;
|
|
46
|
+
};
|
|
47
|
+
accent: {
|
|
48
|
+
DEFAULT: string;
|
|
49
|
+
foreground: string;
|
|
50
|
+
};
|
|
51
|
+
destructive: {
|
|
52
|
+
DEFAULT: string;
|
|
53
|
+
foreground: string;
|
|
54
|
+
};
|
|
55
|
+
border: string;
|
|
56
|
+
input: string;
|
|
57
|
+
ring: string;
|
|
58
|
+
chart: {
|
|
59
|
+
"1": string;
|
|
60
|
+
"2": string;
|
|
61
|
+
"3": string;
|
|
62
|
+
"4": string;
|
|
63
|
+
"5": string;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
plugins: {
|
|
69
|
+
handler: () => void;
|
|
70
|
+
}[];
|
|
71
|
+
};
|
|
72
|
+
export default _default;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// package.json
|
|
28
|
+
var require_package = __commonJS({
|
|
29
|
+
"package.json"(exports, module) {
|
|
30
|
+
module.exports = {
|
|
31
|
+
name: "@batijs/solid-sentry",
|
|
32
|
+
private: true,
|
|
33
|
+
version: "0.0.1",
|
|
34
|
+
description: "",
|
|
35
|
+
type: "module",
|
|
36
|
+
scripts: {
|
|
37
|
+
"check-types": "tsc --noEmit",
|
|
38
|
+
build: "bati-compile-boilerplate"
|
|
39
|
+
},
|
|
40
|
+
keywords: [],
|
|
41
|
+
author: "",
|
|
42
|
+
license: "MIT",
|
|
43
|
+
devDependencies: {
|
|
44
|
+
"@batijs/compile": "workspace:*",
|
|
45
|
+
"@sentry/solid": "^8.27.0",
|
|
46
|
+
"@types/node": "^18.19.14",
|
|
47
|
+
"solid-js": "^1.8.22",
|
|
48
|
+
"vike-solid": "^0.7.3",
|
|
49
|
+
vite: "^5.4.2"
|
|
50
|
+
},
|
|
51
|
+
dependencies: {
|
|
52
|
+
"@batijs/core": "workspace:*"
|
|
53
|
+
},
|
|
54
|
+
files: [
|
|
55
|
+
"dist/"
|
|
56
|
+
],
|
|
57
|
+
bati: {
|
|
58
|
+
if: {
|
|
59
|
+
flag: {
|
|
60
|
+
$all: [
|
|
61
|
+
"solid",
|
|
62
|
+
"sentry"
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
exports: {
|
|
68
|
+
"./sentry.browser.config": {
|
|
69
|
+
types: "./dist/types/sentry.browser.config.d.ts"
|
|
70
|
+
},
|
|
71
|
+
"./pages/sentry/+Page": {
|
|
72
|
+
types: "./dist/types/pages/sentry/+Page.d.ts"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
typesVersions: {
|
|
76
|
+
"*": {
|
|
77
|
+
"sentry.browser.config": [
|
|
78
|
+
"./dist/types/sentry.browser.config.d.ts"
|
|
79
|
+
],
|
|
80
|
+
"pages/sentry/+Page": [
|
|
81
|
+
"./dist/types/pages/sentry/+Page.d.ts"
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
// files/$package.json.ts
|
|
90
|
+
import { addDependency, loadAsJson } from "@batijs/core";
|
|
91
|
+
async function getPackageJson(props) {
|
|
92
|
+
const packageJson = await loadAsJson(props);
|
|
93
|
+
return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
|
|
94
|
+
dependencies: ["@sentry/solid"]
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
export {
|
|
98
|
+
getPackageJson as default
|
|
99
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as Sentry from "@sentry/solid";
|
|
2
|
+
import { createSignal, onMount } from "solid-js";
|
|
3
|
+
|
|
4
|
+
export default function SolidSentryErrorPage() {
|
|
5
|
+
const [sentryClientStatus, setSentryClientStatus] = createSignal({
|
|
6
|
+
client_not_loaded: false,
|
|
7
|
+
enabled: true,
|
|
8
|
+
dsn_missing: false,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
onMount(() => {
|
|
12
|
+
const options = Sentry?.getClient()?.getOptions();
|
|
13
|
+
setSentryClientStatus({
|
|
14
|
+
client_not_loaded: !options,
|
|
15
|
+
dsn_missing: (options?.dsn?.length ?? 0) < 2,
|
|
16
|
+
enabled: (options?.enabled ?? true) !== false,
|
|
17
|
+
});
|
|
18
|
+
console.log("Sentry DSN: ", options?.dsn);
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<>
|
|
23
|
+
<h1>Sentry Test Page</h1>
|
|
24
|
+
{(sentryClientStatus().client_not_loaded ||
|
|
25
|
+
sentryClientStatus().dsn_missing ||
|
|
26
|
+
!sentryClientStatus().enabled) && (
|
|
27
|
+
<p style={{ color: "red" }}>
|
|
28
|
+
<b>Sentry Config Error:</b> {sentryClientStatus().client_not_loaded ? "Client not loaded!" : ""}{" "}
|
|
29
|
+
{!sentryClientStatus().client_not_loaded && sentryClientStatus().dsn_missing ? "DSN is missing! " : ""}
|
|
30
|
+
{!sentryClientStatus().client_not_loaded && !sentryClientStatus().enabled
|
|
31
|
+
? "Client is not enabled! "
|
|
32
|
+
: ""}{" "}
|
|
33
|
+
Vite Mode: {import.meta.env.PROD ? "PROD" : "DEV"}
|
|
34
|
+
</p>
|
|
35
|
+
)}
|
|
36
|
+
<div>
|
|
37
|
+
<button
|
|
38
|
+
onClick={() => {
|
|
39
|
+
throw new Error(`This is a Solid SENTRY Browser Test! [${import.meta.env.DEV ? "DEV Mode" : "PROD Mode"}]`);
|
|
40
|
+
}}
|
|
41
|
+
>
|
|
42
|
+
Throw Javascript Error
|
|
43
|
+
</button>
|
|
44
|
+
</div>
|
|
45
|
+
</>
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as Sentry from "@sentry/solid";
|
|
2
|
+
|
|
3
|
+
export const sentryBrowserConfig = () => {
|
|
4
|
+
// eslint-disable-next-line
|
|
5
|
+
import.meta.env.PROD === true &&
|
|
6
|
+
Sentry.init({
|
|
7
|
+
dsn: import.meta.env.PUBLIC_ENV__SENTRY_DSN,
|
|
8
|
+
environment: "production-frontend",
|
|
9
|
+
//enabled: import.meta.env.DEV ? false : true,
|
|
10
|
+
integrations: [Sentry.replayIntegration()],
|
|
11
|
+
autoSessionTracking: globalThis?.window?.document ? true : false, // disable autoSessionTracking in SSR
|
|
12
|
+
// Set tracesSampleRate to 1.0 to capture 100%
|
|
13
|
+
// of transactions for tracing.
|
|
14
|
+
tracesSampleRate: 1.0,
|
|
15
|
+
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
|
|
16
|
+
tracePropagationTargets: [/^\//, /^https:\/\/yourserver\.io\/api/],
|
|
17
|
+
// Capture Replay for 10% of all sessions,
|
|
18
|
+
// plus for 100% of sessions with an error
|
|
19
|
+
replaysSessionSampleRate: 0.1,
|
|
20
|
+
replaysOnErrorSampleRate: 1.0,
|
|
21
|
+
});
|
|
22
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function SolidSentryErrorPage(): import("solid-js").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const sentryBrowserConfig: () => void;
|
|
@@ -17,6 +17,9 @@ import Content from "../components/Content.vue";
|
|
|
17
17
|
import Link from "../components/Link.vue";
|
|
18
18
|
import Logo from "../components/Logo.vue";
|
|
19
19
|
import Sidebar from "../components/Sidebar.vue";
|
|
20
|
+
import { sentryBrowserConfig } from "../sentry.browser.config";
|
|
21
|
+
//# BATI.has("sentry")
|
|
22
|
+
sentryBrowserConfig();
|
|
20
23
|
</script>
|
|
21
24
|
|
|
22
25
|
<style>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
8
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
19
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
20
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
21
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
22
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
23
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
24
|
+
mod
|
|
25
|
+
));
|
|
26
|
+
|
|
27
|
+
// package.json
|
|
28
|
+
var require_package = __commonJS({
|
|
29
|
+
"package.json"(exports, module) {
|
|
30
|
+
module.exports = {
|
|
31
|
+
name: "@batijs/vue-sentry",
|
|
32
|
+
private: true,
|
|
33
|
+
version: "0.0.1",
|
|
34
|
+
description: "",
|
|
35
|
+
type: "module",
|
|
36
|
+
scripts: {
|
|
37
|
+
"check-types": "tsc --noEmit",
|
|
38
|
+
build: "bati-compile-boilerplate"
|
|
39
|
+
},
|
|
40
|
+
keywords: [],
|
|
41
|
+
author: "",
|
|
42
|
+
license: "MIT",
|
|
43
|
+
devDependencies: {
|
|
44
|
+
"@batijs/compile": "workspace:*",
|
|
45
|
+
"@sentry/vue": "^8.27.0",
|
|
46
|
+
"@types/node": "^18.19.14",
|
|
47
|
+
"vike-vue": "^0.8.3",
|
|
48
|
+
vite: "^5.4.2",
|
|
49
|
+
vue: "^3.4.38"
|
|
50
|
+
},
|
|
51
|
+
dependencies: {
|
|
52
|
+
"@batijs/core": "workspace:*"
|
|
53
|
+
},
|
|
54
|
+
files: [
|
|
55
|
+
"dist/"
|
|
56
|
+
],
|
|
57
|
+
bati: {
|
|
58
|
+
if: {
|
|
59
|
+
flag: {
|
|
60
|
+
$all: [
|
|
61
|
+
"vue",
|
|
62
|
+
"sentry"
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
exports: {
|
|
68
|
+
"./sentry.browser.config": {
|
|
69
|
+
types: "./dist/types/sentry.browser.config.d.ts"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
typesVersions: {
|
|
73
|
+
"*": {
|
|
74
|
+
"sentry.browser.config": [
|
|
75
|
+
"./dist/types/sentry.browser.config.d.ts"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
// files/$package.json.ts
|
|
84
|
+
import { addDependency, loadAsJson } from "@batijs/core";
|
|
85
|
+
async function getPackageJson(props) {
|
|
86
|
+
const packageJson = await loadAsJson(props);
|
|
87
|
+
return addDependency(packageJson, await Promise.resolve().then(() => __toESM(require_package(), 1)).then((x) => x.default), {
|
|
88
|
+
dependencies: ["@sentry/vue"]
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
export {
|
|
92
|
+
getPackageJson as default
|
|
93
|
+
};
|