utilitas 1995.2.87 → 1995.2.89

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/lib/manifest.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  const manifest = {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "1995.2.87",
4
+ "version": "1995.2.89",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",
package/lib/sentinel.mjs CHANGED
@@ -10,10 +10,11 @@ const init = async (options) => {
10
10
  if (options) {
11
11
  sentry = await need('@sentry/node');
12
12
  sentry.init({
13
+ debug: globalThis.debug, ...options || {},
13
14
  integrations: [
14
15
  new sentry.Integrations.OnUnhandledRejection({ mode: 'strict' }),
15
16
  ...options?.integrations || [],
16
- ], ...options || {}
17
+ ],
17
18
  });
18
19
  isPrimary && !options.silent && log(`Initialized, dsn: ${options.dsn}.`);
19
20
  }
package/lib/utilitas.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { assertPath, readJson, } from './storage.mjs';
1
+ import { assertPath, decodeBase64DataURL, readJson } from './storage.mjs';
2
2
  import { basename as _basename, dirname, join, sep } from 'path';
3
3
  import { fileURLToPath } from 'node:url';
4
4
  import { promisify } from 'util';
@@ -120,6 +120,8 @@ const assembleBuffer = any => {
120
120
  case 'Object':
121
121
  if (any.type === 'Buffer' && Array.isArray(any.data)) {
122
122
  resp = Buffer.from(any.data);
123
+ } else if (any.type === 'DataURL' && String.isString(any.data)) {
124
+ resp = decodeBase64DataURL(any.data)?.buffer;
123
125
  } else {
124
126
  resp = {};
125
127
  for (let i in any) { resp[i] = assembleBuffer(any[i]); }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "utilitas",
3
3
  "description": "Just another common utility for JavaScript.",
4
- "version": "1995.2.87",
4
+ "version": "1995.2.89",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/utilitas",
7
7
  "main": "index.mjs",