@develit-io/backend-sdk 5.8.2 → 5.8.3

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/dist/index.cjs CHANGED
@@ -10,7 +10,7 @@ const consola = require('consola');
10
10
  const fs = require('fs');
11
11
  const crypto$1 = require('node:crypto');
12
12
  const path = require('path');
13
- const main_js = require('jsonc-parser/lib/esm/main.js');
13
+ const commentJson = require('comment-json');
14
14
  const superjson = require('superjson');
15
15
 
16
16
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
@@ -242,11 +242,7 @@ const getDatabaseIdFromWrangler = () => {
242
242
  try {
243
243
  const wranglerPath = path__default.resolve("./wrangler.jsonc");
244
244
  const wranglerContent = fs__default.readFileSync(wranglerPath, "utf-8");
245
- const errors = [];
246
- const config = main_js.parse(wranglerContent, errors, { allowTrailingComma: true });
247
- if (errors.length) {
248
- throw new Error("Invalid JSONC in wrangler.jsonc");
249
- }
245
+ const config = commentJson.parse(wranglerContent);
250
246
  const environment = process.env.ENVIRONMENT || "localhost";
251
247
  let databaseId;
252
248
  if (environment !== "localhost" && config.env?.[environment]) {
package/dist/index.mjs CHANGED
@@ -8,7 +8,7 @@ import { consola } from 'consola';
8
8
  import fs from 'fs';
9
9
  import crypto$1 from 'node:crypto';
10
10
  import path from 'path';
11
- import { parse } from 'jsonc-parser/lib/esm/main.js';
11
+ import { parse } from 'comment-json';
12
12
  import superjson from 'superjson';
13
13
 
14
14
  const base = {
@@ -220,11 +220,7 @@ const getDatabaseIdFromWrangler = () => {
220
220
  try {
221
221
  const wranglerPath = path.resolve("./wrangler.jsonc");
222
222
  const wranglerContent = fs.readFileSync(wranglerPath, "utf-8");
223
- const errors = [];
224
- const config = parse(wranglerContent, errors, { allowTrailingComma: true });
225
- if (errors.length) {
226
- throw new Error("Invalid JSONC in wrangler.jsonc");
227
- }
223
+ const config = parse(wranglerContent);
228
224
  const environment = process.env.ENVIRONMENT || "localhost";
229
225
  let databaseId;
230
226
  if (environment !== "localhost" && config.env?.[environment]) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@develit-io/backend-sdk",
3
- "version": "5.8.2",
3
+ "version": "5.8.3",
4
4
  "description": "Develit Backend SDK",
5
5
  "author": "Develit.io",
6
6
  "license": "ISC",
@@ -22,11 +22,6 @@
22
22
  "require": "./dist/index.cjs",
23
23
  "types": "./dist/index.d.ts"
24
24
  },
25
- "./jsonc": {
26
- "import": "./dist/jsonc.mjs",
27
- "require": "./dist/jsonc.cjs",
28
- "types": "./dist/jsonc.d.ts"
29
- },
30
25
  "./package.json": "./package.json"
31
26
  },
32
27
  "main": "./dist/index.cjs",
@@ -34,12 +29,12 @@
34
29
  "files": ["dist"],
35
30
  "dependencies": {
36
31
  "@cloudflare/workers-types": "^4.20250722.0",
32
+ "comment-json": "^4.2.5",
37
33
  "consola": "^3.4.2",
38
34
  "drizzle-kit": "^0.31.4",
39
35
  "drizzle-orm": "^0.44.3",
40
36
  "h3": "^1.15.3",
41
37
  "http-status-codes": "2.3.0",
42
- "jsonc-parser": "^3.3.1",
43
38
  "superjson": "^2.2.2"
44
39
  },
45
40
  "peerDependencies": {
package/dist/jsonc.cjs DELETED
@@ -1,16 +0,0 @@
1
- 'use strict';
2
-
3
- const main_js = require('jsonc-parser/lib/esm/main.js');
4
-
5
-
6
-
7
- Object.prototype.hasOwnProperty.call(main_js, '__proto__') &&
8
- !Object.prototype.hasOwnProperty.call(exports, '__proto__') &&
9
- Object.defineProperty(exports, '__proto__', {
10
- enumerable: true,
11
- value: main_js['__proto__']
12
- });
13
-
14
- Object.keys(main_js).forEach(function (k) {
15
- if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = main_js[k];
16
- });
package/dist/jsonc.d.cts DELETED
@@ -1 +0,0 @@
1
- export * from 'jsonc-parser/lib/esm/main.js';
package/dist/jsonc.d.mts DELETED
@@ -1 +0,0 @@
1
- export * from 'jsonc-parser/lib/esm/main.js';
package/dist/jsonc.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from 'jsonc-parser/lib/esm/main.js';
package/dist/jsonc.mjs DELETED
@@ -1 +0,0 @@
1
- export * from 'jsonc-parser/lib/esm/main.js';