react-notify-sdk 1.0.4 → 1.0.7

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.
@@ -1,35 +1,20 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.NotifyProvider = void 0;
16
- const jsx_runtime_1 = require("react/jsx-runtime");
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
2
  // src/FeatureMessage.tsx
18
- const react_1 = require("react");
19
- const react_router_dom_1 = require("react-router-dom");
20
- const clsx_1 = __importDefault(require("clsx"));
21
- const supabaseClient_1 = require("./supabase/supabaseClient");
22
- const NotifyProvider = ({ projectId,
3
+ import { useEffect, useState } from 'react';
4
+ import { useLocation } from 'react-router-dom';
5
+ import clsx from 'clsx';
6
+ import { supabase } from './supabase/supabaseClient';
7
+ export const NotifyProvider = ({ projectId,
23
8
  //className,
24
9
  //style,
25
10
  disableDefaultStyles = false, }) => {
26
- const [message, setMessage] = (0, react_1.useState)(null);
27
- const location = (0, react_router_dom_1.useLocation)();
28
- (0, react_1.useEffect)(() => {
11
+ const [message, setMessage] = useState(null);
12
+ const location = useLocation();
13
+ useEffect(() => {
29
14
  if (typeof window === 'undefined')
30
15
  return; // Skip on server
31
- const fetchMessage = () => __awaiter(void 0, void 0, void 0, function* () {
32
- const { data } = yield supabaseClient_1.supabase
16
+ const fetchMessage = async () => {
17
+ const { data } = await supabase
33
18
  .from('feature_messages')
34
19
  .select('*')
35
20
  .eq('project_key', projectId)
@@ -39,9 +24,9 @@ disableDefaultStyles = false, }) => {
39
24
  .limit(1)
40
25
  .single();
41
26
  setMessage(data);
42
- });
27
+ };
43
28
  fetchMessage();
44
- const subscription = supabaseClient_1.supabase
29
+ const subscription = supabase
45
30
  .channel('feature_messages_channel')
46
31
  .on('postgres_changes', {
47
32
  event: '*',
@@ -55,35 +40,34 @@ disableDefaultStyles = false, }) => {
55
40
  })
56
41
  .subscribe();
57
42
  return () => {
58
- supabaseClient_1.supabase.removeChannel(subscription);
43
+ supabase.removeChannel(subscription);
59
44
  };
60
45
  }, [location.pathname, projectId]);
61
46
  if (!message)
62
47
  return null;
63
- const defaultClasses = `fixed ${message === null || message === void 0 ? void 0 : message.position}-4 left-1/2 transform -translate-x-1/2 z-50 w-[${message === null || message === void 0 ? void 0 : message.width}%] p-4 bg-[${message === null || message === void 0 ? void 0 : message.backgroundColor}] border border-[${message === null || message === void 0 ? void 0 : message.borderColor}] text-[${message === null || message === void 0 ? void 0 : message.textColor}] rounded-lg shadow`;
64
- return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)(!disableDefaultStyles && defaultClasses), style: disableDefaultStyles ?
48
+ const defaultClasses = `fixed ${message?.position}-4 left-1/2 transform -translate-x-1/2 z-50 w-[${message?.width}%] px-3 bg-[${message?.backgroundColor}] border border-[${message?.borderColor}] text-[${message?.textColor}] rounded-lg shadow`;
49
+ return (_jsxs("div", { className: clsx(!disableDefaultStyles && defaultClasses), style: disableDefaultStyles ?
65
50
  {
66
51
  position: 'fixed',
67
- top: (message === null || message === void 0 ? void 0 : message.position) === 'top' ? '16px' : undefined,
68
- bottom: (message === null || message === void 0 ? void 0 : message.position) === 'top' ? undefined : '16px',
52
+ top: message?.position === 'top' ? '16px' : undefined,
53
+ bottom: message?.position === 'top' ? undefined : '16px',
69
54
  left: '50%',
70
55
  transform: 'translateX(-50%)',
71
56
  zIndex: 50,
72
- width: `${message === null || message === void 0 ? void 0 : message.width}%`,
57
+ width: `${message?.width}%`,
73
58
  padding: '1rem', // p-4 = 1rem
74
- backgroundColor: message === null || message === void 0 ? void 0 : message.backgroundColor,
59
+ backgroundColor: message?.backgroundColor,
75
60
  border: '1px solid', // Completed border style
76
61
  }
77
62
  :
78
- {}, children: [(0, jsx_runtime_1.jsx)("strong", { className: `block mb-2 text-lg font-semibold text-[${message === null || message === void 0 ? void 0 : message.textColor}]`, style: {
63
+ {}, children: [_jsx("strong", { className: `block mb-2 text-lg font-semibold text-[${message?.textColor}]`, style: {
79
64
  display: 'block',
80
65
  marginBottom: '0.5rem', // mb-2 = 0.5rem
81
66
  fontSize: '1.125rem', // text-lg = 18px = 1.125rem
82
67
  fontWeight: 600, // font-semibold = 600
83
- color: `${message === null || message === void 0 ? void 0 : message.backgroundColor}`,
84
- }, children: message.title }), (0, jsx_runtime_1.jsx)("p", { className: `text-sm text-[${message === null || message === void 0 ? void 0 : message.textColor}]`, style: {
68
+ color: `${message?.backgroundColor}`,
69
+ }, children: message.title }), _jsx("p", { className: `text-sm text-[${message?.textColor}]`, style: {
85
70
  fontSize: '0.875rem', // text-sm = 14px = 0.875rem
86
- color: `${message === null || message === void 0 ? void 0 : message.backgroundColor}`,
71
+ color: `${message?.backgroundColor}`,
87
72
  }, children: message.content })] }));
88
73
  };
89
- exports.NotifyProvider = NotifyProvider;
package/dist/index.js CHANGED
@@ -1,5 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotifyProvider = void 0;
4
- var NotifyProvider_1 = require("./NotifyProvider");
5
- Object.defineProperty(exports, "NotifyProvider", { enumerable: true, get: function () { return NotifyProvider_1.NotifyProvider; } });
1
+ export { NotifyProvider } from './NotifyProvider';
@@ -1,8 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.supabase = void 0;
4
- const supabase_js_1 = require("@supabase/supabase-js");
1
+ import { createClient } from '@supabase/supabase-js';
5
2
  const supabaseUrl = process.env.REACT_APP_SUPABASE_URL;
6
3
  const supabaseKey = process.env.REACT_APP_SUPABASE_KEY;
7
4
  // Create a single supabase client for interacting with your database
8
- exports.supabase = (0, supabase_js_1.createClient)(supabaseUrl, supabaseKey);
5
+ export const supabase = createClient(supabaseUrl, supabaseKey);
package/dist/types.d.ts CHANGED
@@ -6,7 +6,6 @@ export type NotifyMessage = {
6
6
  content: string;
7
7
  position: string;
8
8
  positionValue: number;
9
- twPosition: string;
10
9
  backgroundColor: string;
11
10
  borderColor: string;
12
11
  textColor: string;
package/dist/types.js CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
package/package.json CHANGED
@@ -1,11 +1,15 @@
1
1
  {
2
2
  "name": "react-notify-sdk",
3
- "version": "1.0.4",
4
- "description": "",
5
- "main": "index.js",
3
+ "version": "1.0.7",
4
+ "description": "SDK for displaying real-time route-specific messages in React apps",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist"
9
+ ],
6
10
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1",
8
- "build": "tsc"
11
+ "build": "tsc",
12
+ "test": "echo \"Error: no test specified\" && exit 1"
9
13
  },
10
14
  "keywords": [],
11
15
  "author": "",
package/.env DELETED
@@ -1,2 +0,0 @@
1
- REACT_APP_SUPABASE_URL="https://dhgnstjrkeuqnsapwcec.supabase.co"
2
- REACT_APP_SUPABASE_KEY="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImRoZ25zdGpya2V1cW5zYXB3Y2VjIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NTA2MDA0NTEsImV4cCI6MjA2NjE3NjQ1MX0.TLBAPIWjPYvzNUUPHyakIypRydAeWM8Y1OrUzVvIgLQ"
@@ -1,89 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.NotifyProvider = void 0;
16
- const jsx_runtime_1 = require("react/jsx-runtime");
17
- // src/FeatureMessage.tsx
18
- const react_1 = require("react");
19
- const react_router_dom_1 = require("react-router-dom");
20
- const clsx_1 = __importDefault(require("clsx"));
21
- const supabaseClient_1 = require("./supabase/supabaseClient");
22
- const NotifyProvider = ({ projectId,
23
- //className,
24
- //style,
25
- disableDefaultStyles = false, }) => {
26
- const [message, setMessage] = (0, react_1.useState)(null);
27
- const location = (0, react_router_dom_1.useLocation)();
28
- (0, react_1.useEffect)(() => {
29
- if (typeof window === 'undefined')
30
- return; // Skip on server
31
- const fetchMessage = () => __awaiter(void 0, void 0, void 0, function* () {
32
- const { data } = yield supabaseClient_1.supabase
33
- .from('feature_messages')
34
- .select('*')
35
- .eq('project_key', projectId)
36
- .eq('route', location.pathname)
37
- .eq('is_active', true)
38
- .order('created_at', { ascending: false })
39
- .limit(1)
40
- .single();
41
- setMessage(data);
42
- });
43
- fetchMessage();
44
- const subscription = supabaseClient_1.supabase
45
- .channel('feature_messages_channel')
46
- .on('postgres_changes', {
47
- event: '*',
48
- schema: 'public',
49
- table: 'feature_messages',
50
- }, (payload) => {
51
- const msg = payload.new;
52
- if (msg.project_key === projectId && msg.route === location.pathname && msg.is_active) {
53
- setMessage(msg);
54
- }
55
- })
56
- .subscribe();
57
- return () => {
58
- supabaseClient_1.supabase.removeChannel(subscription);
59
- };
60
- }, [location.pathname, projectId]);
61
- if (!message)
62
- return null;
63
- const defaultClasses = `fixed ${message === null || message === void 0 ? void 0 : message.position}-4 left-1/2 transform -translate-x-1/2 z-50 w-[${message === null || message === void 0 ? void 0 : message.width}%] p-4 bg-[${message === null || message === void 0 ? void 0 : message.backgroundColor}] border border-[${message === null || message === void 0 ? void 0 : message.borderColor}] text-[${message === null || message === void 0 ? void 0 : message.textColor}] rounded-lg shadow`;
64
- return ((0, jsx_runtime_1.jsxs)("div", { className: (0, clsx_1.default)(!disableDefaultStyles && defaultClasses), style: disableDefaultStyles ?
65
- {
66
- position: 'fixed',
67
- top: (message === null || message === void 0 ? void 0 : message.position) === 'top' ? '16px' : undefined,
68
- bottom: (message === null || message === void 0 ? void 0 : message.position) === 'top' ? undefined : '16px',
69
- left: '50%',
70
- transform: 'translateX(-50%)',
71
- zIndex: 50,
72
- width: `${message === null || message === void 0 ? void 0 : message.width}%`,
73
- padding: '1rem', // p-4 = 1rem
74
- backgroundColor: message === null || message === void 0 ? void 0 : message.backgroundColor,
75
- border: '1px solid', // Completed border style
76
- }
77
- :
78
- {}, children: [(0, jsx_runtime_1.jsx)("strong", { className: `block mb-2 text-lg font-semibold text-[${message === null || message === void 0 ? void 0 : message.textColor}]`, style: {
79
- display: 'block',
80
- marginBottom: '0.5rem', // mb-2 = 0.5rem
81
- fontSize: '1.125rem', // text-lg = 18px = 1.125rem
82
- fontWeight: 600, // font-semibold = 600
83
- color: `${message === null || message === void 0 ? void 0 : message.backgroundColor}`,
84
- }, children: message.title }), (0, jsx_runtime_1.jsx)("p", { className: `text-sm text-[${message === null || message === void 0 ? void 0 : message.textColor}]`, style: {
85
- fontSize: '0.875rem', // text-sm = 14px = 0.875rem
86
- color: `${message === null || message === void 0 ? void 0 : message.backgroundColor}`,
87
- }, children: message.content })] }));
88
- };
89
- exports.NotifyProvider = NotifyProvider;
@@ -1,104 +0,0 @@
1
- // src/FeatureMessage.tsx
2
- import { useEffect, useState } from 'react';
3
- import { useLocation } from 'react-router-dom';
4
- import { NotifyMessage, NotifyMessageProviderProps } from './types';
5
- import clsx from 'clsx';
6
- import { supabase } from './supabase/supabaseClient';
7
-
8
-
9
-
10
- export const NotifyProvider = ({
11
- projectId,
12
- //className,
13
- //style,
14
- disableDefaultStyles = false,
15
- }: NotifyMessageProviderProps) => {
16
- const [message, setMessage] = useState<NotifyMessage | null>(null);
17
- const location = useLocation();
18
-
19
- useEffect(() => {
20
- if (typeof window === 'undefined') return; // Skip on server
21
-
22
- const fetchMessage = async () => {
23
- const { data } = await supabase
24
- .from('feature_messages')
25
- .select('*')
26
- .eq('project_key', projectId)
27
- .eq('route', location.pathname)
28
- .eq('is_active', true)
29
- .order('created_at', { ascending: false })
30
- .limit(1)
31
- .single();
32
-
33
- setMessage(data);
34
- };
35
-
36
- fetchMessage();
37
-
38
- const subscription = supabase
39
- .channel('feature_messages_channel')
40
- .on('postgres_changes', {
41
- event: '*',
42
- schema: 'public',
43
- table: 'feature_messages',
44
- }, (payload) => {
45
- const msg = payload.new as NotifyMessage;
46
- if (msg.project_key === projectId && msg.route === location.pathname && msg.is_active) {
47
- setMessage(msg);
48
- }
49
- })
50
- .subscribe();
51
-
52
- return () => {
53
- supabase.removeChannel(subscription);
54
- };
55
- }, [location.pathname, projectId]);
56
-
57
- if (!message) return null;
58
-
59
- const defaultClasses = `fixed ${message?.position}-4 left-1/2 transform -translate-x-1/2 z-50 w-[${message?.width}%] p-4 bg-[${message?.backgroundColor}] border border-[${message?.borderColor}] text-[${message?.textColor}] rounded-lg shadow`;
60
-
61
- return (
62
- <div
63
- className={clsx(!disableDefaultStyles && defaultClasses)}
64
- style={
65
- disableDefaultStyles ?
66
- {
67
- position: 'fixed',
68
- top: message?.position === 'top' ? '16px' : undefined,
69
- bottom: message?.position === 'top' ? undefined : '16px',
70
- left: '50%',
71
- transform: 'translateX(-50%)',
72
- zIndex: 50,
73
- width: `${message?.width}%`,
74
- padding: '1rem', // p-4 = 1rem
75
- backgroundColor: message?.backgroundColor,
76
- border: '1px solid', // Completed border style
77
- }
78
- :
79
- {}
80
- }
81
- >
82
- <strong
83
- className={`block mb-2 text-lg font-semibold text-[${message?.textColor}]`}
84
- style={{
85
- display: 'block',
86
- marginBottom: '0.5rem', // mb-2 = 0.5rem
87
- fontSize: '1.125rem', // text-lg = 18px = 1.125rem
88
- fontWeight: 600, // font-semibold = 600
89
- color: `${message?.backgroundColor}`,
90
- }}
91
- >
92
- {message.title}
93
- </strong>
94
- <p className={`text-sm text-[${message?.textColor}]`}
95
- style={{
96
- fontSize: '0.875rem', // text-sm = 14px = 0.875rem
97
- color: `${message?.backgroundColor}`,
98
- }}
99
- >
100
- {message.content}
101
- </p>
102
- </div>
103
- );
104
- };
package/src/index.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NotifyProvider = void 0;
4
- var NotifyProvider_1 = require("./NotifyProvider");
5
- Object.defineProperty(exports, "NotifyProvider", { enumerable: true, get: function () { return NotifyProvider_1.NotifyProvider; } });
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export { NotifyProvider } from './NotifyProvider'
@@ -1,8 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.supabase = void 0;
4
- const supabase_js_1 = require("@supabase/supabase-js");
5
- const supabaseUrl = process.env.REACT_APP_SUPABASE_URL;
6
- const supabaseKey = process.env.REACT_APP_SUPABASE_KEY;
7
- // Create a single supabase client for interacting with your database
8
- exports.supabase = (0, supabase_js_1.createClient)(supabaseUrl, supabaseKey);
@@ -1,7 +0,0 @@
1
- import { createClient } from '@supabase/supabase-js'
2
-
3
- const supabaseUrl = process.env.REACT_APP_SUPABASE_URL as string;
4
- const supabaseKey = process.env.REACT_APP_SUPABASE_KEY as string;
5
-
6
- // Create a single supabase client for interacting with your database
7
- export const supabase = createClient(supabaseUrl, supabaseKey)
package/src/types.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
package/src/types.ts DELETED
@@ -1,24 +0,0 @@
1
- export type NotifyMessage = {
2
- id: string;
3
- project_key: string;
4
- route: string;
5
- title: string;
6
- content: string;
7
- position: string;
8
- positionValue: number;
9
- twPosition: string;
10
- backgroundColor: string;
11
- borderColor: string;
12
- textColor: string;
13
- width: number;
14
- borderWidth: number;
15
- is_active: boolean;
16
- created_at: string;
17
- };
18
-
19
- export type NotifyMessageProviderProps = {
20
- projectId: string;
21
- className?: string;
22
- //style?: React.CSSProperties;
23
- disableDefaultStyles?: boolean;
24
- };
package/tsconfig.json DELETED
@@ -1,121 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES6",
4
- //"module": "ESNext",
5
- "declaration": true,
6
- "outDir": "dist",
7
- //"strict": true,
8
- //"esModuleInterop": true,
9
- "jsx": "react-jsx", // ✅ This is required for React 17+ JSX
10
- /* Visit https://aka.ms/tsconfig to read more about this file */
11
-
12
- /* Projects */
13
- // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
14
- // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
15
- // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
16
- // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
17
- // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
18
- // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
19
-
20
- /* Language and Environment */
21
- //"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
22
- // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
23
- // "jsx": "preserve", /* Specify what JSX code is generated. */
24
- // "libReplacement": true, /* Enable lib replacement. */
25
- // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
26
- // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
27
- // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
28
- // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
29
- // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
30
- // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
31
- // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
32
- // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
33
- // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
34
-
35
- /* Modules */
36
- "module": "commonjs", /* Specify what module code is generated. */
37
- // "rootDir": "./", /* Specify the root folder within your source files. */
38
- // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
39
- // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
40
- // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
41
- // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
42
- // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
43
- // "types": [], /* Specify type package names to be included without being referenced in a source file. */
44
- // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
45
- // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
46
- // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
47
- // "rewriteRelativeImportExtensions": true, /* Rewrite '.ts', '.tsx', '.mts', and '.cts' file extensions in relative import paths to their JavaScript equivalent in output files. */
48
- // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
49
- // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
50
- // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
51
- // "noUncheckedSideEffectImports": true, /* Check side effect imports. */
52
- // "resolveJsonModule": true, /* Enable importing .json files. */
53
- // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
54
- // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
55
-
56
- /* JavaScript Support */
57
- // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
58
- // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
59
- // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
60
-
61
- /* Emit */
62
- // "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
63
- // "declarationMap": true, /* Create sourcemaps for d.ts files. */
64
- // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
65
- // "sourceMap": true, /* Create source map files for emitted JavaScript files. */
66
- // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
67
- // "noEmit": true, /* Disable emitting files from a compilation. */
68
- // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
69
- // "outDir": "./", /* Specify an output folder for all emitted files. */
70
- // "removeComments": true, /* Disable emitting comments. */
71
- // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
72
- // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
73
- // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
74
- // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
75
- // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
76
- // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
77
- // "newLine": "crlf", /* Set the newline character for emitting files. */
78
- // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
79
- // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
80
- // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
81
- // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
82
- // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
83
-
84
- /* Interop Constraints */
85
- // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
86
- // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
87
- // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */
88
- // "erasableSyntaxOnly": true, /* Do not allow runtime constructs that are not part of ECMAScript. */
89
- // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
90
- "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
91
- // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
92
- "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
93
-
94
- /* Type Checking */
95
- "strict": true, /* Enable all strict type-checking options. */
96
- // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
97
- // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
98
- // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
99
- // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
100
- // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
101
- // "strictBuiltinIteratorReturn": true, /* Built-in iterators are instantiated with a 'TReturn' type of 'undefined' instead of 'any'. */
102
- // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
103
- // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
104
- // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
105
- // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
106
- // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
107
- // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
108
- // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
109
- // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
110
- // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
111
- // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
112
- // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
113
- // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
114
- // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
115
-
116
- /* Completeness */
117
- // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
118
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
119
- },
120
- "include": ["src"]
121
- }