silgi 0.25.8 → 0.25.9

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,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
 
4
- const version = "0.25.8";
4
+ const version = "0.25.9";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -242,8 +242,7 @@ async function h3Framework(silgi, skip = false) {
242
242
  );
243
243
  });
244
244
  silgi.hook("prepare:core.ts", (data) => {
245
- data._silgiConfigs.push(`captureError: (error, context = {}) => {
246
- const silgi = useSilgi()
245
+ data._silgiConfigs.push(`captureError: (silgi, error, context = {}) => {
247
246
  const promise = silgi.hooks
248
247
  .callHookParallel('error', error, context)
249
248
  .catch((error_) => {
@@ -1835,10 +1834,6 @@ async function prepareCoreFile(data, frameworkContext, silgi) {
1835
1834
  {
1836
1835
  name: "createSilgi",
1837
1836
  key: "createSilgi"
1838
- },
1839
- {
1840
- name: "useSilgi",
1841
- key: "useSilgi"
1842
1837
  }
1843
1838
  ],
1844
1839
  from: "silgi"
@@ -506,7 +506,7 @@ async function runSilgiPlugins(silgi) {
506
506
  try {
507
507
  await plugin(silgi);
508
508
  } catch (error) {
509
- silgi.captureError(error, { tags: ["plugin"] });
509
+ silgi.captureError(error, { tags: ["plugin"] }, silgi);
510
510
  throw error;
511
511
  }
512
512
  }
@@ -1051,7 +1051,7 @@ interface CapturedErrorContext {
1051
1051
  event?: SilgiEvents;
1052
1052
  [key: string]: unknown;
1053
1053
  }
1054
- type CaptureError = (error: Error, context: CapturedErrorContext) => void;
1054
+ type CaptureError = (error: Error, context: CapturedErrorContext, silgi: Silgi) => void;
1055
1055
 
1056
1056
  /**
1057
1057
  * The listeners to Silgi
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.25.8",
4
+ "version": "0.25.9",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {