@betterstore/sdk 0.0.1

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,3 @@
1
+ node_modules
2
+ dist
3
+ pnpm-lock.yaml
package/.prettierrc ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "trailingComma": "es5",
3
+ "semi": true,
4
+ "tabWidth": 2,
5
+ "singleQuote": false,
6
+ "jsxSingleQuote": false,
7
+ "plugins": []
8
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "editor.defaultFormatter": "esbenp.prettier-vscode",
3
+ "editor.formatOnSave": true,
4
+ "editor.codeActionsOnSave": {
5
+ "source.fixAll": "explicit",
6
+ "source.organizeImports": "explicit"
7
+ },
8
+ "editor.quickSuggestionsDelay": 0,
9
+ "editor.acceptSuggestionOnEnter": "on",
10
+ "files.associations": {
11
+ ".html": "html",
12
+ ".ts": "typescript",
13
+ ".tsx": "typescriptreact",
14
+ ".prisma": "prisma",
15
+ ".json": "json",
16
+ ".js": "javascript",
17
+ "*.css": "tailwindcss",
18
+ ".gitignore": "ignore"
19
+ },
20
+ "[prisma]": { "editor.defaultFormatter": "Prisma.prisma" },
21
+ "turboConsoleLog.addSemicolonInTheEnd": true,
22
+ "turboConsoleLog.delimiterInsideMessage": "-",
23
+ "turboConsoleLog.includeFileNameAndLineNum": false,
24
+ "turboConsoleLog.insertEmptyLineAfterLogMessage": false,
25
+ "turboConsoleLog.insertEmptyLineBeforeLogMessage": false,
26
+ "turboConsoleLog.logMessagePrefix": "",
27
+ "turboConsoleLog.logMessageSuffix": ": ",
28
+ "turboConsoleLog.wrapLogMessage": false,
29
+ "workbench.sideBar.location": "right",
30
+ "i18n-ally.localesPaths": ["messages"],
31
+ "i18n-ally.keystyle": "nested",
32
+ "i18n-ally.sourceLanguage": "en"
33
+ }
@@ -0,0 +1,52 @@
1
+ # Contributing to Better Store SDK
2
+
3
+ πŸš€ Thank you for your interest in contributing to **Better Store SDK**! We’re building the best developer experience for eCommerce, and we’d love your help.
4
+
5
+ ## πŸ›  Getting Started
6
+
7
+ 1. **Fork the repository** and clone your fork locally:
8
+ ```sh
9
+ git clone https://github.com/your-username/better-store-sdk.git
10
+ cd better-store-sdk
11
+ ```
12
+ 2. **Install dependencies:**
13
+ ```sh
14
+ npm install
15
+ ```
16
+ 3. **Run the tests to ensure everything is working:**
17
+ ```sh
18
+ npm test
19
+ ```
20
+
21
+ ## πŸ“Œ Code Guidelines
22
+
23
+ - Use **TypeScript** for type safety.
24
+ - Follow **Prettier** and **ESLint** formatting.
25
+ - Keep PRs small and focused on a single issue.
26
+ - Write **unit tests** for any new functionality.
27
+
28
+ ## πŸ›  Submitting a Pull Request
29
+
30
+ 1. **Create a feature branch:**
31
+ ```sh
32
+ git checkout -b feature/new-feature
33
+ ```
34
+ 2. **Make your changes and commit them:**
35
+ ```sh
36
+ git add .
37
+ git commit -m "✨ Added new feature"
38
+ ```
39
+ 3. **Push your branch:**
40
+ ```sh
41
+ git push origin feature/new-feature
42
+ ```
43
+ 4. **Open a Pull Request** on GitHub and describe your changes.
44
+
45
+ ## πŸ› Reporting Issues
46
+
47
+ - Use the [GitHub Issues](https://github.com/your-org/better-store-sdk/issues) to report bugs and request features.
48
+ - Provide steps to reproduce bugs if possible.
49
+
50
+ ## ❀️ Thank You!
51
+
52
+ Your contributions make **Better Store SDK** awesome. Let's build a better eCommerce experience together! πŸš€
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Better Store
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # Better Store SDK
2
+
3
+ πŸš€ **Better Store SDK** is a modern, developer-friendly eCommerce toolkit designed to help developers build flexible and powerful online stores with ease.
4
+
5
+ ## ✨ Features
6
+
7
+ - πŸ›’ **Custom Checkout** – Build checkout flows that suit your business needs.
8
+ - πŸ’³ **Payments** – Integrate with Stripe, PayPal, and custom gateways.
9
+ - πŸ“¦ **Product & Order Management** – API-driven store management.
10
+ - 🎨 **Customizable UI** – Prebuilt components and themes.
11
+ - πŸ“‘ **Webhooks & API Events** – Extend and automate eCommerce operations.
12
+ - πŸš€ **Optimized for DX** – Built with TypeScript and fully documented.
13
+
14
+ ## πŸ“¦ Installation
15
+
16
+ ```sh
17
+ npm install better-store-sdk
18
+ ```
19
+
20
+ ## πŸš€ Quick Start
21
+
22
+ ```javascript
23
+ import { BetterStore } from "better-store-sdk";
24
+
25
+ const store = new BetterStore({ apiKey: "YOUR_API_KEY" });
26
+
27
+ store.checkout.start({
28
+ cart: [{ id: "prod_1", name: "T-Shirt", price: 20 }],
29
+ currency: "USD",
30
+ });
31
+ ```
32
+
33
+ ## πŸ“š Documentation
34
+
35
+ Full documentation is available at **[betterstore.dev](https://betterstore.dev)**.
36
+
37
+ ## 🀝 Contributing
38
+
39
+ We welcome contributions! Please check the [CONTRIBUTING.md](./CONTRIBUTING.md) for details.
40
+
41
+ ## βš–οΈ License
42
+
43
+ This project is licensed under the [MIT License](./LICENSE).
@@ -0,0 +1,3 @@
1
+ declare const hello: () => void;
2
+
3
+ export { hello };
@@ -0,0 +1,3 @@
1
+ declare const hello: () => void;
2
+
3
+ export { hello };
package/dist/index.js ADDED
@@ -0,0 +1,31 @@
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/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ hello: () => hello
24
+ });
25
+ module.exports = __toCommonJS(index_exports);
26
+ var hello = () => {
27
+ };
28
+ // Annotate the CommonJS export names for ESM import in node:
29
+ 0 && (module.exports = {
30
+ hello
31
+ });
package/dist/index.mjs ADDED
@@ -0,0 +1,6 @@
1
+ // src/index.ts
2
+ var hello = () => {
3
+ };
4
+ export {
5
+ hello
6
+ };
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@betterstore/sdk",
3
+ "version": "0.0.1",
4
+ "description": "E-commerce for Developers",
5
+ "private": false,
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.mjs",
8
+ "types": "dist/index.d.ts",
9
+ "scripts": {
10
+ "build": "tsup src/index.ts --format cjs,esm --dts",
11
+ "lint": "tsc",
12
+ "format:check": "prettier --check --ignore-path .prettierignore .",
13
+ "format": "prettier --write --ignore-path .prettierignore .",
14
+ "ci": "pnpm run lint && pnpm run format:check && pnpm run build",
15
+ "release": "pnpm run ci && changeset publish"
16
+ },
17
+ "keywords": [
18
+ "betterstore",
19
+ "ecommerce",
20
+ "storefront",
21
+ "storefronts"
22
+ ],
23
+ "author": "Better Store",
24
+ "license": "MIT",
25
+ "devDependencies": {
26
+ "@changesets/cli": "^2.28.1",
27
+ "prettier": "^3.5.3",
28
+ "tsup": "^8.4.0",
29
+ "typescript": "^5.8.2"
30
+ }
31
+ }