@bundleup/nextjs 0.0.2
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/README.md +4 -0
- package/dist/index.d.mts +12 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +42 -0
- package/dist/index.mjs +18 -0
- package/dist/react.d.mts +1 -0
- package/dist/react.d.ts +1 -0
- package/dist/react.js +25 -0
- package/dist/react.mjs +4 -0
- package/package.json +46 -0
package/README.md
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# Official Bundle Up Plugin for Next.js
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@bundleup/nextjs)
|
|
4
|
+
[](https://bundleup.io/docs/nextjs)
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as _bundleup_core_server from '@bundleup/core/server';
|
|
2
|
+
|
|
3
|
+
interface CreateConnectionParams {
|
|
4
|
+
apiKey?: string;
|
|
5
|
+
debug?: boolean;
|
|
6
|
+
integrationId: string;
|
|
7
|
+
externalId?: string;
|
|
8
|
+
metadata?: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
declare function createConnection(options: CreateConnectionParams): Promise<_bundleup_core_server.BundleUpResponse>;
|
|
11
|
+
|
|
12
|
+
export { CreateConnectionParams, createConnection };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as _bundleup_core_server from '@bundleup/core/server';
|
|
2
|
+
|
|
3
|
+
interface CreateConnectionParams {
|
|
4
|
+
apiKey?: string;
|
|
5
|
+
debug?: boolean;
|
|
6
|
+
integrationId: string;
|
|
7
|
+
externalId?: string;
|
|
8
|
+
metadata?: Record<string, unknown>;
|
|
9
|
+
}
|
|
10
|
+
declare function createConnection(options: CreateConnectionParams): Promise<_bundleup_core_server.BundleUpResponse>;
|
|
11
|
+
|
|
12
|
+
export { CreateConnectionParams, createConnection };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use server";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
+
|
|
21
|
+
// src/index.ts
|
|
22
|
+
var src_exports = {};
|
|
23
|
+
__export(src_exports, {
|
|
24
|
+
createConnection: () => createConnection
|
|
25
|
+
});
|
|
26
|
+
module.exports = __toCommonJS(src_exports);
|
|
27
|
+
var import_server = require("@bundleup/core/server");
|
|
28
|
+
var import_utils = require("@bundleup/core/utils");
|
|
29
|
+
function createConnection(options) {
|
|
30
|
+
const bundleup = new import_server.BundleUp({
|
|
31
|
+
apiKey: options.apiKey ?? process.env.BUNDLEUP_API_KEY,
|
|
32
|
+
debug: options.debug ?? (0, import_utils.isTrue)(process.env.BUNDLEUP_DEBUG)
|
|
33
|
+
});
|
|
34
|
+
return bundleup.createConnection(options.integrationId, {
|
|
35
|
+
externalId: options.externalId,
|
|
36
|
+
metadata: options.metadata
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
+
0 && (module.exports = {
|
|
41
|
+
createConnection
|
|
42
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use server";
|
|
2
|
+
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import { BundleUp } from "@bundleup/core/server";
|
|
5
|
+
import { isTrue } from "@bundleup/core/utils";
|
|
6
|
+
function createConnection(options) {
|
|
7
|
+
const bundleup = new BundleUp({
|
|
8
|
+
apiKey: options.apiKey ?? process.env.BUNDLEUP_API_KEY,
|
|
9
|
+
debug: options.debug ?? isTrue(process.env.BUNDLEUP_DEBUG)
|
|
10
|
+
});
|
|
11
|
+
return bundleup.createConnection(options.integrationId, {
|
|
12
|
+
externalId: options.externalId,
|
|
13
|
+
metadata: options.metadata
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
createConnection
|
|
18
|
+
};
|
package/dist/react.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@bundleup/react';
|
package/dist/react.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@bundleup/react';
|
package/dist/react.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from))
|
|
10
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
11
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
12
|
+
}
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
16
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
17
|
+
|
|
18
|
+
// src/react.ts
|
|
19
|
+
var react_exports = {};
|
|
20
|
+
module.exports = __toCommonJS(react_exports);
|
|
21
|
+
__reExport(react_exports, require("@bundleup/react"), module.exports);
|
|
22
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
23
|
+
0 && (module.exports = {
|
|
24
|
+
...require("@bundleup/react")
|
|
25
|
+
});
|
package/dist/react.mjs
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bundleup/nextjs",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"description": "BundleUp plugin for Next.js applications",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./react": {
|
|
15
|
+
"types": "./dist/react.d.ts",
|
|
16
|
+
"import": "./dist/react.mjs",
|
|
17
|
+
"require": "./dist/react.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsup src/index.ts src/react.ts --format cjs,esm --dts",
|
|
22
|
+
"dev": "tsup src/index.ts src/react.ts --format cjs,esm --dts --watch",
|
|
23
|
+
"lint": "eslint src/",
|
|
24
|
+
"test": "jest",
|
|
25
|
+
"clean": "rm -rf dist"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@bundleup/core": "0.0.2",
|
|
29
|
+
"@bundleup/react": "0.0.2"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"next": ">=13.0.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"tsup": "^7.0.0",
|
|
36
|
+
"typescript": "^5.0.0",
|
|
37
|
+
"eslint": "^8.0.0",
|
|
38
|
+
"jest": "^29.0.0",
|
|
39
|
+
"next": "^13.0.0"
|
|
40
|
+
},
|
|
41
|
+
"files": [
|
|
42
|
+
"dist"
|
|
43
|
+
],
|
|
44
|
+
"author": "BundleUp",
|
|
45
|
+
"license": "ISC"
|
|
46
|
+
}
|