@reverbia/sdk 1.0.0-next.20251202085701 → 1.0.0-next.20251202090922

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.
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/next/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ withReverbia: () => withReverbia
24
+ });
25
+ module.exports = __toCommonJS(index_exports);
26
+ var withReverbia = (nextConfig = {}) => {
27
+ return {
28
+ ...nextConfig,
29
+ serverExternalPackages: [
30
+ ...nextConfig.serverExternalPackages || [],
31
+ "onnxruntime-node",
32
+ "@huggingface/transformers",
33
+ "sharp"
34
+ ],
35
+ webpack: (config, options) => {
36
+ const { isServer } = options;
37
+ if (!isServer) {
38
+ config.resolve.alias = {
39
+ ...config.resolve.alias,
40
+ "onnxruntime-node": false,
41
+ sharp: false
42
+ };
43
+ }
44
+ config.module.rules.push({
45
+ test: /\.node$/,
46
+ type: "asset/resource"
47
+ });
48
+ config.resolve.fallback = {
49
+ ...config.resolve.fallback,
50
+ fs: false,
51
+ net: false,
52
+ tls: false,
53
+ child_process: false,
54
+ "node:fs": false,
55
+ "node:path": false
56
+ };
57
+ config.plugins.push(
58
+ new options.webpack.NormalModuleReplacementPlugin(
59
+ /transformers\.node-BSHUG7OY\.mjs/,
60
+ "@huggingface/transformers"
61
+ )
62
+ );
63
+ if (typeof nextConfig.webpack === "function") {
64
+ return nextConfig.webpack(config, options);
65
+ }
66
+ return config;
67
+ }
68
+ };
69
+ };
70
+ // Annotate the CommonJS export names for ESM import in node:
71
+ 0 && (module.exports = {
72
+ withReverbia
73
+ });
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Next.js configuration plugin for @reverbia/sdk
3
+ *
4
+ * Use this to automatically configure Webpack aliases and server exclusions
5
+ * needed for the SDK's AI dependencies (transformers.js, onnxruntime, etc).
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * // next.config.ts
10
+ * import { withReverbia } from "@reverbia/sdk/next";
11
+ *
12
+ * const nextConfig = {
13
+ * // your config...
14
+ * };
15
+ *
16
+ * export default withReverbia(nextConfig);
17
+ * ```
18
+ */
19
+ declare const withReverbia: (nextConfig?: any) => any;
20
+
21
+ export { withReverbia };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Next.js configuration plugin for @reverbia/sdk
3
+ *
4
+ * Use this to automatically configure Webpack aliases and server exclusions
5
+ * needed for the SDK's AI dependencies (transformers.js, onnxruntime, etc).
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * // next.config.ts
10
+ * import { withReverbia } from "@reverbia/sdk/next";
11
+ *
12
+ * const nextConfig = {
13
+ * // your config...
14
+ * };
15
+ *
16
+ * export default withReverbia(nextConfig);
17
+ * ```
18
+ */
19
+ declare const withReverbia: (nextConfig?: any) => any;
20
+
21
+ export { withReverbia };
@@ -0,0 +1,48 @@
1
+ // src/next/index.ts
2
+ var withReverbia = (nextConfig = {}) => {
3
+ return {
4
+ ...nextConfig,
5
+ serverExternalPackages: [
6
+ ...nextConfig.serverExternalPackages || [],
7
+ "onnxruntime-node",
8
+ "@huggingface/transformers",
9
+ "sharp"
10
+ ],
11
+ webpack: (config, options) => {
12
+ const { isServer } = options;
13
+ if (!isServer) {
14
+ config.resolve.alias = {
15
+ ...config.resolve.alias,
16
+ "onnxruntime-node": false,
17
+ sharp: false
18
+ };
19
+ }
20
+ config.module.rules.push({
21
+ test: /\.node$/,
22
+ type: "asset/resource"
23
+ });
24
+ config.resolve.fallback = {
25
+ ...config.resolve.fallback,
26
+ fs: false,
27
+ net: false,
28
+ tls: false,
29
+ child_process: false,
30
+ "node:fs": false,
31
+ "node:path": false
32
+ };
33
+ config.plugins.push(
34
+ new options.webpack.NormalModuleReplacementPlugin(
35
+ /transformers\.node-BSHUG7OY\.mjs/,
36
+ "@huggingface/transformers"
37
+ )
38
+ );
39
+ if (typeof nextConfig.webpack === "function") {
40
+ return nextConfig.webpack(config, options);
41
+ }
42
+ return config;
43
+ }
44
+ };
45
+ };
46
+ export {
47
+ withReverbia
48
+ };
@@ -0,0 +1,55 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
10
+ }) : x)(function(x) {
11
+ if (typeof require !== "undefined") return require.apply(this, arguments);
12
+ throw Error('Dynamic require of "' + x + '" is not supported');
13
+ });
14
+ var __glob = (map) => (path) => {
15
+ var fn = map[path];
16
+ if (fn) return fn();
17
+ throw new Error("Module not found in bundle: " + path);
18
+ };
19
+ var __esm = (fn, res) => function __init() {
20
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
21
+ };
22
+ var __commonJS = (cb, mod) => function __require2() {
23
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
24
+ };
25
+ var __export = (target, all) => {
26
+ for (var name in all)
27
+ __defProp(target, name, { get: all[name], enumerable: true });
28
+ };
29
+ var __copyProps = (to, from, except, desc) => {
30
+ if (from && typeof from === "object" || typeof from === "function") {
31
+ for (let key of __getOwnPropNames(from))
32
+ if (!__hasOwnProp.call(to, key) && key !== except)
33
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
34
+ }
35
+ return to;
36
+ };
37
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
38
+ // If the importer is in node compatibility mode or this is not an ESM
39
+ // file that has been converted to a CommonJS file using a Babel-
40
+ // compatible transform (i.e. "__esModule" has not been set), then set
41
+ // "default" to the CommonJS "module.exports" for node compatibility.
42
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
43
+ mod
44
+ ));
45
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
46
+
47
+ export {
48
+ __require,
49
+ __glob,
50
+ __esm,
51
+ __commonJS,
52
+ __export,
53
+ __toESM,
54
+ __publicField
55
+ };