@tscircuit/cli 0.0.144 → 0.0.145

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 (101) hide show
  1. package/.github/workflows/formatbot.yml +41 -0
  2. package/biome.json +44 -0
  3. package/bun.lockb +0 -0
  4. package/dev-server-api/bun.lockb +0 -0
  5. package/dev-server-api/routes/api/db/download.ts +2 -2
  6. package/dev-server-api/routes/api/dev_package_examples/get.ts +1 -1
  7. package/dev-server-api/routes/api/dev_package_examples/list.ts +2 -2
  8. package/dev-server-api/routes/api/dev_package_examples/update.ts +1 -1
  9. package/dev-server-api/routes/api/export_requests/get.ts +2 -2
  10. package/dev-server-api/routes/index.ts +1 -1
  11. package/dev-server-api/server.ts +1 -1
  12. package/dev-server-api/src/db/create-schema.ts +4 -4
  13. package/dev-server-api/src/db/generic-json-level.ts +2 -2
  14. package/dev-server-api/src/db/zod-level-db.ts +9 -9
  15. package/dev-server-api/src/middlewares/with-debug-request-logging.ts +1 -1
  16. package/dev-server-api/src/middlewares/with-error-response.ts +2 -2
  17. package/dev-server-api/tests/fixtures/start-server.ts +1 -1
  18. package/dev-server-api/tests/routes/dev_package_examples/create.test.ts +1 -1
  19. package/dev-server-api/tests/routes/dev_package_examples/get.test.ts +1 -1
  20. package/dev-server-api/tests/routes/dev_package_examples/list.test.ts +1 -1
  21. package/dev-server-api/tests/routes/dev_package_examples/update.test.ts +2 -2
  22. package/dev-server-api/tests/routes/export_files/download.test.ts +2 -2
  23. package/dev-server-api/tests/routes/export_requests/create.test.ts +1 -1
  24. package/dev-server-api/tests/routes/export_requests/get.test.ts +1 -1
  25. package/dev-server-frontend/.eslintrc.cjs +10 -10
  26. package/dev-server-frontend/components.json +1 -1
  27. package/dev-server-frontend/src/ExampleContentView.tsx +2 -2
  28. package/dev-server-frontend/src/HeaderMenu.tsx +2 -7
  29. package/dev-server-frontend/src/components/command-k.tsx +1 -1
  30. package/dev-server-frontend/src/components/dialogs/generic-export-dialog.tsx +3 -3
  31. package/dev-server-frontend/src/components/dialogs/gerber-export-dialog.tsx +3 -3
  32. package/dev-server-frontend/src/components/select-example-search.tsx +1 -1
  33. package/dev-server-frontend/src/components/ui/alert-dialog.tsx +5 -5
  34. package/dev-server-frontend/src/components/ui/alert.tsx +1 -1
  35. package/dev-server-frontend/src/components/ui/breadcrumb.tsx +1 -1
  36. package/dev-server-frontend/src/components/ui/button.tsx +2 -2
  37. package/dev-server-frontend/src/components/ui/card.tsx +1 -1
  38. package/dev-server-frontend/src/components/ui/command.tsx +5 -5
  39. package/dev-server-frontend/src/components/ui/context-menu.tsx +8 -8
  40. package/dev-server-frontend/src/components/ui/dialog.tsx +5 -5
  41. package/dev-server-frontend/src/components/ui/menubar.tsx +12 -12
  42. package/dev-server-frontend/src/components/ui/navigation-menu.tsx +6 -6
  43. package/dev-server-frontend/src/components/ui/popover.tsx +1 -1
  44. package/dev-server-frontend/src/components/ui/select.tsx +6 -6
  45. package/dev-server-frontend/src/components/ui/tabs.tsx +3 -3
  46. package/dev-server-frontend/src/components/ui/toggle-group.tsx +1 -1
  47. package/dev-server-frontend/src/components/ui/toggle.tsx +1 -1
  48. package/dev-server-frontend/src/components/ui/tooltip.tsx +1 -1
  49. package/dev-server-frontend/src/hooks/use-active-dev-package-example-lite.ts +2 -2
  50. package/dev-server-frontend/src/main.tsx +1 -1
  51. package/dev-server-frontend/tailwind.config.js +5 -5
  52. package/dev-server-frontend/tsconfig.json +1 -1
  53. package/dist/cli.js +14 -7
  54. package/example-project/src/manual-edits.ts +34 -34
  55. package/lib/cmd-fns/add.ts +1 -1
  56. package/lib/cmd-fns/auth-login.ts +2 -2
  57. package/lib/cmd-fns/dev/check-if-initialized.ts +1 -1
  58. package/lib/cmd-fns/dev/derive-selector-from-pcb-component-id.ts +1 -1
  59. package/lib/cmd-fns/dev/dev-server-request-handler.ts +3 -3
  60. package/lib/cmd-fns/dev/find-available-port.ts +7 -5
  61. package/lib/cmd-fns/dev/fulfill-export-requests.ts +14 -14
  62. package/lib/cmd-fns/dev/get-dev-server-axios.ts +3 -3
  63. package/lib/cmd-fns/dev/index.ts +3 -3
  64. package/lib/cmd-fns/dev/infer-export-name-from-source.ts +2 -2
  65. package/lib/cmd-fns/dev/soupify-and-upload-example-file.ts +4 -4
  66. package/lib/cmd-fns/dev/start-edit-event-watcher.ts +37 -38
  67. package/lib/cmd-fns/dev/start-export-request-watcher.ts +2 -3
  68. package/lib/cmd-fns/dev/start-fs-watcher.ts +1 -1
  69. package/lib/cmd-fns/dev/upload-examples-from-directory.ts +2 -2
  70. package/lib/cmd-fns/dev-server-fulfill-export-requests.ts +3 -3
  71. package/lib/cmd-fns/dev-server-upload.ts +3 -3
  72. package/lib/cmd-fns/export-gerbers.ts +1 -1
  73. package/lib/cmd-fns/init/create-or-modify-npmrc.ts +1 -1
  74. package/lib/cmd-fns/init/index.ts +12 -8
  75. package/lib/cmd-fns/lint.ts +15 -9
  76. package/lib/cmd-fns/package-examples-create.ts +1 -1
  77. package/lib/cmd-fns/package-files-create.ts +1 -1
  78. package/lib/cmd-fns/package-files-upload-directory.ts +1 -1
  79. package/lib/cmd-fns/package-releases-create.ts +1 -1
  80. package/lib/cmd-fns/package-releases-list.ts +1 -1
  81. package/lib/cmd-fns/publish/index.ts +33 -33
  82. package/lib/cmd-fns/remove.ts +1 -1
  83. package/lib/cmd-fns/soupify.ts +1 -1
  84. package/lib/cmd-fns/version.ts +1 -1
  85. package/lib/create-config-manager.ts +1 -1
  86. package/lib/export-fns/export-bom-csv.ts +2 -2
  87. package/lib/export-fns/export-gerbers.ts +5 -5
  88. package/lib/export-fns/export-pnp-csv.ts +2 -2
  89. package/lib/get-program.ts +17 -17
  90. package/lib/param-handlers/interact-for-package-release-id.ts +2 -3
  91. package/lib/param-handlers/interact-for-runtime.ts +1 -1
  92. package/lib/posthog.ts +6 -7
  93. package/lib/soupify.ts +4 -4
  94. package/lib/util/create-context-and-run-program.ts +10 -6
  95. package/lib/util/get-all-package-files.ts +1 -1
  96. package/lib/util/lint-project.ts +79 -54
  97. package/package.json +4 -2
  98. package/renovate.json +2 -4
  99. package/tests/init.test.ts +1 -1
  100. package/tsconfig.json +13 -13
  101. package/tsup.config.ts +3 -3
package/lib/soupify.ts CHANGED
@@ -18,7 +18,7 @@ export const soupify = async (
18
18
  filePath: string
19
19
  exportName?: string
20
20
  },
21
- ctx: Pick<AppContext, "runtime" | "params">
21
+ ctx: Pick<AppContext, "runtime" | "params">,
22
22
  ) => {
23
23
  debug(`reading ${filePath}`)
24
24
  const targetFileContent = await readFile(filePath, "utf-8")
@@ -38,13 +38,13 @@ export const soupify = async (
38
38
 
39
39
  if (!exportName) {
40
40
  throw new Error(
41
- `Couldn't derive an export name and didn't find default export in "${filePath}"`
41
+ `Couldn't derive an export name and didn't find default export in "${filePath}"`,
42
42
  )
43
43
  }
44
44
 
45
45
  const tmpFilePath = Path.join(
46
46
  Path.dirname(filePath),
47
- Path.basename(filePath).replace(/\.[^\.]+$/, "") + ".__tmp_entrypoint.tsx"
47
+ Path.basename(filePath).replace(/\.[^\.]+$/, "") + ".__tmp_entrypoint.tsx",
48
48
  )
49
49
 
50
50
  debug(`writing to ${tmpFilePath}`)
@@ -71,7 +71,7 @@ const elements = await createRoot().render(<Component />, projectBuilder)
71
71
 
72
72
  console.log(JSON.stringify(elements))
73
73
 
74
- `.trim()
74
+ `.trim(),
75
75
  )
76
76
 
77
77
  debug(`using runtime ${ctx.runtime}`)
@@ -62,8 +62,8 @@ export const createContextAndRunProgram = async (process_args: any) => {
62
62
  kleur.grey(
63
63
  `[RES] ${res.status} ${res.config.method?.toUpperCase()} ${
64
64
  res.config.url
65
- }`
66
- )
65
+ }`,
66
+ ),
67
67
  )
68
68
  return res
69
69
  })
@@ -82,7 +82,11 @@ export const createContextAndRunProgram = async (process_args: any) => {
82
82
  // end ignores ---
83
83
 
84
84
  if (err.response?.status === 401) {
85
- console.log(kleur.red("Authentication failed. Please run 'tsci login' to authenticate yourself."))
85
+ console.log(
86
+ kleur.red(
87
+ "Authentication failed. Please run 'tsci login' to authenticate yourself.",
88
+ ),
89
+ )
86
90
  process.exit(1)
87
91
  }
88
92
 
@@ -92,12 +96,12 @@ export const createContextAndRunProgram = async (process_args: any) => {
92
96
  err.config.url
93
97
  }\n\n${JSON.stringify(err.response?.data, null, " ")}`
94
98
  .replace(/\\n/g, "\n")
95
- .replace(/\\"/g, '"')
96
- )
99
+ .replace(/\\"/g, '"'),
100
+ ),
97
101
  )
98
102
  console.log(kleur.yellow("[Request Body]:"), err.config.data)
99
103
  return Promise.reject(err)
100
- }
104
+ },
101
105
  )
102
106
 
103
107
  const ctx: AppContext = {
@@ -13,7 +13,7 @@ import ignore from "ignore"
13
13
  * Returns an array of files paths.
14
14
  */
15
15
  export const getAllPackageFiles = async (
16
- ctx: AppContext
16
+ ctx: AppContext,
17
17
  ): Promise<Array<string>> => {
18
18
  await ensureNodeModulesIgnored()
19
19
 
@@ -1,112 +1,137 @@
1
- import * as ts from 'typescript';
2
- import * as fs from 'fs';
3
- import * as path from 'path';
1
+ import * as ts from "typescript"
2
+ import * as fs from "fs"
3
+ import * as path from "path"
4
4
 
5
5
  interface LintResult {
6
- filePath: string;
7
- messages: LintMessage[];
6
+ filePath: string
7
+ messages: LintMessage[]
8
8
  }
9
9
 
10
10
  interface LintMessage {
11
- line: number;
12
- column: number;
13
- message: string;
11
+ line: number
12
+ column: number
13
+ message: string
14
14
  fix?: {
15
- range: [number, number];
16
- text: string;
17
- };
15
+ range: [number, number]
16
+ text: string
17
+ }
18
18
  }
19
19
 
20
- export function lintProject(projectPath: string, fix: boolean = false): LintResult[] {
21
- const results: LintResult[] = [];
22
- const files = getTypeScriptFiles(projectPath);
20
+ export function lintProject(
21
+ projectPath: string,
22
+ fix: boolean = false,
23
+ ): LintResult[] {
24
+ const results: LintResult[] = []
25
+ const files = getTypeScriptFiles(projectPath)
23
26
 
24
27
  for (const file of files) {
25
28
  const sourceFile = ts.createSourceFile(
26
29
  file,
27
- fs.readFileSync(file, 'utf8'),
30
+ fs.readFileSync(file, "utf8"),
28
31
  ts.ScriptTarget.Latest,
29
- true
30
- );
32
+ true,
33
+ )
31
34
 
32
- const result = lintFile(sourceFile, fix);
35
+ const result = lintFile(sourceFile, fix)
33
36
  if (result.messages.length > 0) {
34
- results.push({ filePath: file, messages: result.messages });
37
+ results.push({ filePath: file, messages: result.messages })
35
38
  }
36
39
 
37
- if (fix && result.messages.some(m => m.fix)) {
38
- const newContent = applyFixes(sourceFile.text, result.messages);
39
- fs.writeFileSync(file, newContent);
40
+ if (fix && result.messages.some((m) => m.fix)) {
41
+ const newContent = applyFixes(sourceFile.text, result.messages)
42
+ fs.writeFileSync(file, newContent)
40
43
  }
41
44
  }
42
45
 
43
- return results;
46
+ return results
44
47
  }
45
48
 
46
- function lintFile(sourceFile: ts.SourceFile, fix: boolean): { messages: LintMessage[] } {
47
- const messages: LintMessage[] = [];
49
+ function lintFile(
50
+ sourceFile: ts.SourceFile,
51
+ fix: boolean,
52
+ ): { messages: LintMessage[] } {
53
+ const messages: LintMessage[] = []
48
54
 
49
55
  function visit(node: ts.Node) {
50
- if (ts.isCallExpression(node) && ts.isIdentifier(node.expression) && node.expression.text === 'capacitor') {
51
- const valueArg = node.arguments.find(arg => ts.isObjectLiteralExpression(arg));
56
+ if (
57
+ ts.isCallExpression(node) &&
58
+ ts.isIdentifier(node.expression) &&
59
+ node.expression.text === "capacitor"
60
+ ) {
61
+ const valueArg = node.arguments.find((arg) =>
62
+ ts.isObjectLiteralExpression(arg),
63
+ )
52
64
  if (valueArg && ts.isObjectLiteralExpression(valueArg)) {
53
65
  const valueProp = valueArg.properties.find(
54
- prop => ts.isPropertyAssignment(prop) && ts.isIdentifier(prop.name) && prop.name.text === 'value'
55
- );
56
- if (valueProp && ts.isPropertyAssignment(valueProp) && ts.isStringLiteral(valueProp.initializer)) {
57
- const value = valueProp.initializer.text;
66
+ (prop) =>
67
+ ts.isPropertyAssignment(prop) &&
68
+ ts.isIdentifier(prop.name) &&
69
+ prop.name.text === "value",
70
+ )
71
+ if (
72
+ valueProp &&
73
+ ts.isPropertyAssignment(valueProp) &&
74
+ ts.isStringLiteral(valueProp.initializer)
75
+ ) {
76
+ const value = valueProp.initializer.text
58
77
  if (!value.match(/[µuμ]F$/)) {
59
- const { line, character } = sourceFile.getLineAndCharacterOfPosition(valueProp.getStart());
78
+ const { line, character } =
79
+ sourceFile.getLineAndCharacterOfPosition(valueProp.getStart())
60
80
  messages.push({
61
81
  line: line + 1,
62
82
  column: character + 1,
63
83
  message: 'Capacitor value should include units (e.g., "100F")',
64
- fix: fix ? {
65
- range: [valueProp.initializer.getStart(), valueProp.initializer.getEnd()],
66
- text: `"${value}F"`
67
- } : undefined
68
- });
84
+ fix: fix
85
+ ? {
86
+ range: [
87
+ valueProp.initializer.getStart(),
88
+ valueProp.initializer.getEnd(),
89
+ ],
90
+ text: `"${value}F"`,
91
+ }
92
+ : undefined,
93
+ })
69
94
  }
70
95
  }
71
96
  }
72
97
  }
73
98
 
74
- ts.forEachChild(node, visit);
99
+ ts.forEachChild(node, visit)
75
100
  }
76
101
 
77
- visit(sourceFile);
102
+ visit(sourceFile)
78
103
 
79
- return { messages };
104
+ return { messages }
80
105
  }
81
106
 
82
107
  function getTypeScriptFiles(dir: string): string[] {
83
- const files: string[] = [];
84
- const entries = fs.readdirSync(dir, { withFileTypes: true });
108
+ const files: string[] = []
109
+ const entries = fs.readdirSync(dir, { withFileTypes: true })
85
110
 
86
111
  for (const entry of entries) {
87
- const fullPath = path.join(dir, entry.name);
112
+ const fullPath = path.join(dir, entry.name)
88
113
  if (entry.isDirectory()) {
89
- if (entry.name !== 'node_modules' && entry.name !== 'dist') {
90
- files.push(...getTypeScriptFiles(fullPath));
114
+ if (entry.name !== "node_modules" && entry.name !== "dist") {
115
+ files.push(...getTypeScriptFiles(fullPath))
91
116
  }
92
117
  } else if (entry.isFile() && /\.tsx?$/.test(entry.name)) {
93
- files.push(fullPath);
118
+ files.push(fullPath)
94
119
  }
95
120
  }
96
121
 
97
- return files;
122
+ return files
98
123
  }
99
124
 
100
125
  function applyFixes(source: string, messages: LintMessage[]): string {
101
126
  const fixes = messages
102
- .filter(m => m.fix)
103
- .sort((a, b) => (b.fix!.range[0] - a.fix!.range[0]));
127
+ .filter((m) => m.fix)
128
+ .sort((a, b) => b.fix!.range[0] - a.fix!.range[0])
104
129
 
105
- let result = source;
130
+ let result = source
106
131
  for (const message of fixes) {
107
- const [start, end] = message.fix!.range;
108
- result = result.slice(0, start) + message.fix!.text + result.slice(end);
132
+ const [start, end] = message.fix!.range
133
+ result = result.slice(0, start) + message.fix!.text + result.slice(end)
109
134
  }
110
135
 
111
- return result;
112
- }
136
+ return result
137
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tscircuit/cli",
3
- "version": "0.0.144",
3
+ "version": "0.0.145",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Command line tool for developing, publishing and installing tscircuit circuits",
@@ -18,7 +18,8 @@
18
18
  "build": "bun build:dev-server && npm run build:cli",
19
19
  "dev-with-test-project": "bun cli.ts dev --cwd ./example-project",
20
20
  "test:init": "bun cli.ts init --dir ./tmp/test --name test",
21
- "update-deps": "bun add @tscircuit/builder@latest @tscircuit/react-fiber@latest && cd dev-server-frontend && bun run update-deps && cd ../example-project && bun run update-deps"
21
+ "update-deps": "bun add @tscircuit/builder@latest @tscircuit/react-fiber@latest && cd dev-server-frontend && bun run update-deps && cd ../example-project && bun run update-deps",
22
+ "format": "biome format . --write"
22
23
  },
23
24
  "bin": {
24
25
  "tsci": "./dist/cli.js"
@@ -76,6 +77,7 @@
76
77
  "@tscircuit/soup-util": "*"
77
78
  },
78
79
  "devDependencies": {
80
+ "@biomejs/biome": "^1.8.3",
79
81
  "@tscircuit/builder": "*",
80
82
  "@tscircuit/layout": "^0.0.25",
81
83
  "@tscircuit/manual-edit-events": "^0.0.4",
package/renovate.json CHANGED
@@ -1,8 +1,6 @@
1
1
  {
2
2
  "$schema": "https://docs.renovatebot.com/renovate-schema.json",
3
- "extends": [
4
- "config:base"
5
- ],
3
+ "extends": ["config:base"],
6
4
  "packageRules": [
7
5
  {
8
6
  "packagePatterns": ["*"],
@@ -14,4 +12,4 @@
14
12
  "automerge": true
15
13
  }
16
14
  ]
17
- }
15
+ }
@@ -4,6 +4,6 @@ import { $ } from "bun"
4
4
  test.skip("tsci init", async () => {
5
5
  await $`rm -rf ./tests/example-init`
6
6
  console.log(
7
- await $`bun cli.ts init --name init-test --dir ./tests/example-init`.text()
7
+ await $`bun cli.ts init --name init-test --dir ./tests/example-init`.text(),
8
8
  )
9
9
  })
package/tsconfig.json CHANGED
@@ -11,9 +11,9 @@
11
11
  // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
12
12
 
13
13
  /* Language and Environment */
14
- "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
14
+ "target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
15
15
  // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
16
- "jsx": "react-jsx", /* Specify what JSX code is generated. */
16
+ "jsx": "react-jsx" /* Specify what JSX code is generated. */,
17
17
  // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
18
18
  // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
19
19
  // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
@@ -25,23 +25,23 @@
25
25
  // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
26
26
 
27
27
  /* Modules */
28
- "module": "ESNext", /* Specify what module code is generated. */
28
+ "module": "ESNext" /* Specify what module code is generated. */,
29
29
  // "rootDir": "./", /* Specify the root folder within your source files. */
30
- "moduleResolution": "Bundler", /* Specify how TypeScript looks up a file from a given module specifier. */
31
- "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
30
+ "moduleResolution": "Bundler" /* Specify how TypeScript looks up a file from a given module specifier. */,
31
+ "baseUrl": "./" /* Specify the base directory to resolve non-relative module names. */,
32
32
  "paths": {
33
33
  "@server/*": ["./dev-server-api/src/*"]
34
- }, /* Specify a set of entries that re-map imports to additional lookup locations. */
34
+ } /* Specify a set of entries that re-map imports to additional lookup locations. */,
35
35
  // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
36
36
  // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
37
37
  // "types": [], /* Specify type package names to be included without being referenced in a source file. */
38
38
  // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
39
39
  // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
40
- "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
40
+ "allowImportingTsExtensions": true /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */,
41
41
  // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
42
42
  // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
43
43
  // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
44
- "resolveJsonModule": true, /* Enable importing .json files. */
44
+ "resolveJsonModule": true /* Enable importing .json files. */,
45
45
  // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
46
46
  // "noResolve": true, /* Disallow 'import's, 'require's or '<reference>'s from expanding the number of files TypeScript should add to a project. */
47
47
 
@@ -59,7 +59,7 @@
59
59
  // "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. */
60
60
  // "outDir": "./", /* Specify an output folder for all emitted files. */
61
61
  // "removeComments": true, /* Disable emitting comments. */
62
- "noEmit": true, /* Disable emitting files from a compilation. */
62
+ "noEmit": true /* Disable emitting files from a compilation. */,
63
63
  // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
64
64
  // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
65
65
  // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
@@ -79,12 +79,12 @@
79
79
  // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
80
80
  // "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. */
81
81
  // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
82
- "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
82
+ "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */,
83
83
  // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
84
- "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
84
+ "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
85
85
 
86
86
  /* Type Checking */
87
- "strict": true, /* Enable all strict type-checking options. */
87
+ "strict": true /* Enable all strict type-checking options. */,
88
88
  // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
89
89
  // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
90
90
  // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
@@ -106,6 +106,6 @@
106
106
 
107
107
  /* Completeness */
108
108
  // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
109
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
109
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
110
110
  }
111
111
  }
package/tsup.config.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { defineConfig } from 'tsup'
1
+ import { defineConfig } from "tsup"
2
2
 
3
3
  export default defineConfig({
4
4
  env: {
5
- POSTHOG_API_KEY: JSON.stringify(process.env.POSTHOG_API_KEY || ''),
5
+ POSTHOG_API_KEY: JSON.stringify(process.env.POSTHOG_API_KEY || ""),
6
6
  },
7
- })
7
+ })