@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.
Files changed (44) hide show
  1. package/dist/boilerplates/@batijs/plain-sentry/files/$package.json.js +117 -0
  2. package/dist/boilerplates/@batijs/plain-sentry/files/pages/sentry/+Page.js +19 -0
  3. package/dist/boilerplates/@batijs/plain-sentry/files/pages/sentry/+client.js +37 -0
  4. package/dist/boilerplates/@batijs/plain-sentry/files/sentry.browser.config.ts +25 -0
  5. package/dist/boilerplates/@batijs/plain-sentry/files/vite-env.d.ts +1 -0
  6. package/dist/boilerplates/@batijs/plain-sentry/types/pages/sentry/+Page.d.ts +1 -0
  7. package/dist/boilerplates/@batijs/plain-sentry/types/pages/sentry/+client.d.ts +6 -0
  8. package/dist/boilerplates/@batijs/plain-sentry/types/sentry.browser.config.d.ts +1 -0
  9. package/dist/boilerplates/@batijs/prettier/files/.prettierignore +3 -0
  10. package/dist/boilerplates/@batijs/react-sentry/files/$package.json.js +101 -0
  11. package/dist/boilerplates/@batijs/react-sentry/files/pages/sentry/+Page.tsx +43 -0
  12. package/dist/boilerplates/@batijs/react-sentry/files/sentry.browser.config.ts +22 -0
  13. package/dist/boilerplates/@batijs/react-sentry/types/pages/sentry/+Page.d.ts +1 -0
  14. package/dist/boilerplates/@batijs/react-sentry/types/sentry.browser.config.d.ts +1 -0
  15. package/dist/boilerplates/@batijs/sentry/files/$.env.js +22 -0
  16. package/dist/boilerplates/@batijs/sentry/files/$README.md.js +31 -0
  17. package/dist/boilerplates/@batijs/sentry/files/$package.json.js +86 -0
  18. package/dist/boilerplates/@batijs/sentry/files/$vite.config.ts.js +18 -0
  19. package/dist/boilerplates/@batijs/sentry/files/.env.sentry-build-plugin +8 -0
  20. package/dist/boilerplates/@batijs/sentry/files/pages/$+client.ts.js +23 -0
  21. package/dist/boilerplates/@batijs/shadcn-ui/files/!tailwind.config.ts +68 -0
  22. package/dist/boilerplates/@batijs/shadcn-ui/files/$README.md.js +36 -0
  23. package/dist/boilerplates/@batijs/shadcn-ui/files/$package.json.js +112 -0
  24. package/dist/boilerplates/@batijs/shadcn-ui/files/$tsconfig.json.js +13 -0
  25. package/dist/boilerplates/@batijs/shadcn-ui/files/$vite.config.ts.js +34 -0
  26. package/dist/boilerplates/@batijs/shadcn-ui/files/components.json +17 -0
  27. package/dist/boilerplates/@batijs/shadcn-ui/files/layouts/!tailwind.css +101 -0
  28. package/dist/boilerplates/@batijs/shadcn-ui/files/lib/utils.ts +6 -0
  29. package/dist/boilerplates/@batijs/shadcn-ui/types/!tailwind.config.d.ts +72 -0
  30. package/dist/boilerplates/@batijs/shadcn-ui/types/lib/utils.d.ts +2 -0
  31. package/dist/boilerplates/@batijs/shared/files/.gitignore +3 -0
  32. package/dist/boilerplates/@batijs/solid-sentry/files/$package.json.js +99 -0
  33. package/dist/boilerplates/@batijs/solid-sentry/files/pages/sentry/+Page.tsx +47 -0
  34. package/dist/boilerplates/@batijs/solid-sentry/files/sentry.browser.config.ts +22 -0
  35. package/dist/boilerplates/@batijs/solid-sentry/types/pages/sentry/+Page.d.ts +1 -0
  36. package/dist/boilerplates/@batijs/solid-sentry/types/sentry.browser.config.d.ts +1 -0
  37. package/dist/boilerplates/@batijs/vue/files/layouts/LayoutDefault.vue +3 -0
  38. package/dist/boilerplates/@batijs/vue-sentry/files/$package.json.js +93 -0
  39. package/dist/boilerplates/@batijs/vue-sentry/files/pages/sentry/+Page.vue +33 -0
  40. package/dist/boilerplates/@batijs/vue-sentry/files/sentry.browser.config.ts +25 -0
  41. package/dist/boilerplates/@batijs/vue-sentry/types/sentry.browser.config.d.ts +1 -0
  42. package/dist/boilerplates/boilerplates.json +99 -0
  43. package/dist/index.js +25 -9
  44. package/package.json +5 -5
@@ -0,0 +1,33 @@
1
+ <template>
2
+ <div>
3
+ <h1>Sentry Test Page</h1>
4
+ <div v-if="!isSentryClientInitialized" style="color: red">
5
+ Sentry Client is not initialized! Vite Mode: {{ isProdMode ? "PROD" : "DEV" }}
6
+ </div>
7
+
8
+ <div>
9
+ <button @click="throwError">Throw Javascript Error</button>
10
+ </div>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+ import * as Sentry from "@sentry/vue";
16
+ export default {
17
+ data() {
18
+ return {
19
+ isSentryClientInitialized: false,
20
+ isProdMode: import.meta.env.PROD,
21
+ };
22
+ },
23
+ mounted() {
24
+ this.isSentryClientInitialized = !!Sentry.getClient();
25
+ },
26
+ methods: {
27
+ throwError() {
28
+ const mode = import.meta.env.DEV ? "DEV Mode" : "PROD Mode";
29
+ throw new Error(`This is a Vue SENTRY Browser Vue Test! [${mode}]`);
30
+ },
31
+ },
32
+ };
33
+ </script>
@@ -0,0 +1,25 @@
1
+ import * as Sentry from "@sentry/vue";
2
+ import { usePageContext } from "vike-vue/usePageContext";
3
+
4
+ export const sentryBrowserConfig = () => {
5
+ // eslint-disable-next-line
6
+ import.meta.env.PROD === true &&
7
+ Sentry.init({
8
+ // @ts-ignore
9
+ app: usePageContext().app,
10
+ dsn: import.meta.env.PUBLIC_ENV__SENTRY_DSN,
11
+ environment: "production-frontend",
12
+ //enabled: import.meta.env.DEV ? false : true,
13
+ integrations: [Sentry.replayIntegration()],
14
+ autoSessionTracking: globalThis?.window?.document ? true : false, // disable autoSessionTracking in SSR
15
+ // Set tracesSampleRate to 1.0 to capture 100%
16
+ // of transactions for tracing.
17
+ tracesSampleRate: 1.0,
18
+ // Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
19
+ tracePropagationTargets: [/^\//, /^https:\/\/yourserver\.io\/api/],
20
+ // Capture Replay for 10% of all sessions,
21
+ // plus for 100% of sessions with an error
22
+ replaysSessionSampleRate: 0.1,
23
+ replaysOnErrorSampleRate: 1.0,
24
+ });
25
+ };
@@ -0,0 +1 @@
1
+ export declare const sentryBrowserConfig: () => void;
@@ -243,6 +243,35 @@
243
243
  "files"
244
244
  ]
245
245
  },
246
+ {
247
+ "config": {
248
+ "if": {
249
+ "$and": [
250
+ {
251
+ "flag": "sentry"
252
+ },
253
+ {
254
+ "flag": {
255
+ "$not": {
256
+ "$in": [
257
+ "react",
258
+ "vue",
259
+ "solid",
260
+ "svelte",
261
+ "preact",
262
+ "angular"
263
+ ]
264
+ }
265
+ }
266
+ }
267
+ ]
268
+ }
269
+ },
270
+ "folder": "@batijs/plain-sentry",
271
+ "subfolders": [
272
+ "files"
273
+ ]
274
+ },
246
275
  {
247
276
  "config": {
248
277
  "if": {
@@ -308,6 +337,44 @@
308
337
  "files"
309
338
  ]
310
339
  },
340
+ {
341
+ "config": {
342
+ "if": {
343
+ "flag": {
344
+ "$all": [
345
+ "react",
346
+ "sentry"
347
+ ]
348
+ }
349
+ }
350
+ },
351
+ "folder": "@batijs/react-sentry",
352
+ "subfolders": [
353
+ "files"
354
+ ]
355
+ },
356
+ {
357
+ "config": {
358
+ "if": {
359
+ "flag": "sentry"
360
+ }
361
+ },
362
+ "folder": "@batijs/sentry",
363
+ "subfolders": [
364
+ "files"
365
+ ]
366
+ },
367
+ {
368
+ "config": {
369
+ "if": {
370
+ "flag": "shadcn-ui"
371
+ }
372
+ },
373
+ "folder": "@batijs/shadcn-ui",
374
+ "subfolders": [
375
+ "files"
376
+ ]
377
+ },
311
378
  {
312
379
  "config": {
313
380
  "enforce": "pre"
@@ -446,6 +513,22 @@
446
513
  "files"
447
514
  ]
448
515
  },
516
+ {
517
+ "config": {
518
+ "if": {
519
+ "flag": {
520
+ "$all": [
521
+ "solid",
522
+ "sentry"
523
+ ]
524
+ }
525
+ }
526
+ },
527
+ "folder": "@batijs/solid-sentry",
528
+ "subfolders": [
529
+ "files"
530
+ ]
531
+ },
449
532
  {
450
533
  "config": {
451
534
  "if": {
@@ -563,5 +646,21 @@
563
646
  "subfolders": [
564
647
  "files"
565
648
  ]
649
+ },
650
+ {
651
+ "config": {
652
+ "if": {
653
+ "flag": {
654
+ "$all": [
655
+ "vue",
656
+ "sentry"
657
+ ]
658
+ }
659
+ }
660
+ },
661
+ "folder": "@batijs/vue-sentry",
662
+ "subfolders": [
663
+ "files"
664
+ ]
566
665
  }
567
666
  ]
package/dist/index.js CHANGED
@@ -1677,7 +1677,7 @@ var createDefaultQueryTester = function(query, options) {
1677
1677
  // package.json
1678
1678
  var package_default = {
1679
1679
  name: "@batijs/cli",
1680
- version: "0.0.261",
1680
+ version: "0.0.263",
1681
1681
  type: "module",
1682
1682
  scripts: {
1683
1683
  "check-types": "tsc --noEmit",
@@ -1728,6 +1728,12 @@ function error(value) {
1728
1728
  value
1729
1729
  };
1730
1730
  }
1731
+ function warning(value) {
1732
+ return {
1733
+ type: "warning",
1734
+ value
1735
+ };
1736
+ }
1731
1737
  function info(value) {
1732
1738
  return {
1733
1739
  type: "info",
@@ -1764,6 +1770,12 @@ Choose one of them, or simply remove selected Server`
1764
1770
  `${inverse(bold("AWS"))} is only compatible with ${inverse(bold("Hono"))} or ${inverse(bold("HatTip"))}.
1765
1771
  Choose one of them, or simply remove selected Server`
1766
1772
  ),
1773
+ [RulesMessage.ERROR_SHADCN_R_REACT]: error(
1774
+ `${inverse(bold("shadcn/ui"))} is only compatible with ${inverse(bold("React"))}`
1775
+ ),
1776
+ [RulesMessage.WARN_SHADCN_R_TAILWINDCSS]: warning(
1777
+ `${inverse(bold("shadcn/ui"))} integration is tied to ${inverse(bold("TailwindCSS"))}. Using another CSS library with it may have unpredictable behaviour.`
1778
+ ),
1767
1779
  [RulesMessage.INFO_DRIZZLE_STACKBLITZ]: null
1768
1780
  };
1769
1781
 
@@ -2036,14 +2048,18 @@ async function run() {
2036
2048
  await checkArguments(args);
2037
2049
  const sources = [];
2038
2050
  const hooks = [];
2039
- const flags = Object.entries(args).filter(([, val]) => val === true).map(([key]) => {
2040
- const flag = [key];
2041
- const dependsOn = features.find((f) => f.flag === key)?.dependsOn;
2042
- if (dependsOn) {
2043
- flag.push(...dependsOn);
2044
- }
2045
- return flag;
2046
- }).flat(1);
2051
+ const flags = [
2052
+ ...new Set(
2053
+ Object.entries(args).filter(([, val]) => val === true).map(([key]) => {
2054
+ const flag = [key];
2055
+ const dependsOn = features.find((f) => f.flag === key)?.dependsOn;
2056
+ if (dependsOn) {
2057
+ flag.push(...dependsOn);
2058
+ }
2059
+ return flag;
2060
+ }).flat(1)
2061
+ )
2062
+ ];
2047
2063
  checkFlagsExist(flags);
2048
2064
  checkRules(flags);
2049
2065
  boilerplates.sort((b1, b2) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@batijs/cli",
3
- "version": "0.0.261",
3
+ "version": "0.0.263",
4
4
  "type": "module",
5
5
  "keywords": [],
6
6
  "description": "Next-gen scaffolder. Get started with fully-functional apps, and choose any tool you want",
@@ -20,12 +20,12 @@
20
20
  "typescript": "^5.5.4",
21
21
  "unplugin-purge-polyfills": "^0.0.5",
22
22
  "vite": "^5.4.2",
23
- "@batijs/compile": "0.0.261",
24
- "@batijs/build": "0.0.261"
23
+ "@batijs/build": "0.0.263",
24
+ "@batijs/compile": "0.0.263"
25
25
  },
26
26
  "dependencies": {
27
- "@batijs/core": "0.0.261",
28
- "@batijs/features": "0.0.261"
27
+ "@batijs/core": "0.0.263",
28
+ "@batijs/features": "0.0.263"
29
29
  },
30
30
  "bin": "./dist/index.js",
31
31
  "exports": {