@betterstore/react 0.2.17 → 0.2.19

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.
@@ -1,13 +1,3 @@
1
- export declare const storeClient: {
2
- proxy?: string;
3
- retrieveCheckout(clientSecret: string, checkoutId: string): Promise<import("@betterstore/sdk").CheckoutSession>;
4
- updateCheckout(clientSecret: string, checkoutId: string, params: import("@betterstore/sdk").CheckoutUpdateParams): Promise<import("@betterstore/sdk").CheckoutSession>;
5
- getCheckoutShippingRates(clientSecret: string, checkoutId: string): Promise<import("@betterstore/sdk").ShippingRate[]>;
6
- generateCheckoutsPaymentSecret(clientSecret: string, checkoutId: string): Promise<string>;
7
- createCustomer(clientSecret: string, params: import("@betterstore/sdk").CustomerCreateParams): Promise<import("@betterstore/sdk").Customer>;
8
- retrieveCustomer(clientSecret: string, idOrEmail: string): Promise<import("@betterstore/sdk").Customer>;
9
- updateCustomer(clientSecret: string, customerId: string, params: import("@betterstore/sdk").CustomerUpdateParams): Promise<import("@betterstore/sdk").Customer>;
10
- };
11
1
  export declare const storeHelpers: {
12
2
  proxy?: string;
13
3
  formatPrice(priceInCents: number, currency: string, exchangeRate?: number): string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betterstore/react",
3
- "version": "0.2.17",
3
+ "version": "0.2.19",
4
4
  "description": "E-commerce for Developers",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -79,7 +79,7 @@
79
79
  "zustand": "^5.0.3"
80
80
  },
81
81
  "scripts": {
82
- "dev": "vite",
82
+ "dev": "BETTERSTORE_DEV_PROXY=true vite",
83
83
  "prep": "changeset && changeset version && git add .",
84
84
  "build": "rollup -c",
85
85
  "lint": "tsc",
package/rollup.config.mjs CHANGED
@@ -29,6 +29,45 @@ export default {
29
29
  {
30
30
  file: "dist/index.mjs",
31
31
  format: "esm",
32
+ globals: {
33
+ fs: "null",
34
+ path: "null",
35
+ url: "null",
36
+ crypto: "null",
37
+ assert: "null",
38
+ tty: "null",
39
+ https: "null",
40
+ http: "null",
41
+ stream: "null",
42
+ util: "null",
43
+ os: "null",
44
+ zlib: "null",
45
+ buffer: "null",
46
+ events: "null",
47
+ process: "null",
48
+ querystring: "null",
49
+ string_decoder: "null",
50
+ timers: "null",
51
+ punycode: "null",
52
+ net: "null",
53
+ dns: "null",
54
+ dgram: "null",
55
+ child_process: "null",
56
+ cluster: "null",
57
+ module: "null",
58
+ vm: "null",
59
+ readline: "null",
60
+ repl: "null",
61
+ constants: "null",
62
+ domain: "null",
63
+ v8: "null",
64
+ worker_threads: "null",
65
+ perf_hooks: "null",
66
+ async_hooks: "null",
67
+ inspector: "null",
68
+ trace_events: "null",
69
+ wasi: "null",
70
+ },
32
71
  },
33
72
  ],
34
73
  plugins: [
@@ -38,8 +77,51 @@ export default {
38
77
  alias: {
39
78
  "@": pathResolve(__dirname, "src"),
40
79
  },
80
+ browser: true,
81
+ preferBuiltins: false,
82
+ }),
83
+ commonjs({
84
+ include: /node_modules/,
85
+ exclude: [
86
+ "fs",
87
+ "path",
88
+ "url",
89
+ "crypto",
90
+ "assert",
91
+ "tty",
92
+ "https",
93
+ "http",
94
+ "stream",
95
+ "util",
96
+ "os",
97
+ "zlib",
98
+ "buffer",
99
+ "events",
100
+ "process",
101
+ "querystring",
102
+ "string_decoder",
103
+ "timers",
104
+ "punycode",
105
+ "net",
106
+ "dns",
107
+ "dgram",
108
+ "child_process",
109
+ "cluster",
110
+ "module",
111
+ "vm",
112
+ "readline",
113
+ "repl",
114
+ "constants",
115
+ "domain",
116
+ "v8",
117
+ "worker_threads",
118
+ "perf_hooks",
119
+ "async_hooks",
120
+ "inspector",
121
+ "trace_events",
122
+ "wasi",
123
+ ],
41
124
  }),
42
- commonjs(),
43
125
  typescript(),
44
126
  json({
45
127
  include: "**/*.json",