agentmall 0.1.0 → 0.1.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.
package/dist/cli.js CHANGED
@@ -222,15 +222,19 @@ var AgentMallRefunds = class {
222
222
  // src/purchase.ts
223
223
  async function purchase(config) {
224
224
  const { account, baseUrl, ...body } = config;
225
- const mppxModule = await import("mppx");
226
- const Mppx = mppxModule.Mppx ?? mppxModule.default?.Mppx;
227
- const tempo = mppxModule.tempo ?? mppxModule.default?.tempo;
225
+ let mppxClient;
226
+ try {
227
+ mppxClient = await import("mppx/client");
228
+ } catch {
229
+ throw new Error("mppx is required for purchases. Install it: npm install mppx");
230
+ }
231
+ const Mppx = mppxClient.Mppx;
232
+ const tempo = mppxClient.tempo;
228
233
  if (!Mppx || !tempo) {
229
234
  throw new Error("mppx is required for purchases. Install it: npm install mppx");
230
235
  }
231
236
  const mppx = Mppx.create({
232
- methods: [tempo({ account })],
233
- polyfill: false
237
+ methods: [tempo({ account })]
234
238
  });
235
239
  const client = new AgentMall({
236
240
  baseUrl: baseUrl ?? BASE_URL,
package/dist/index.cjs CHANGED
@@ -265,15 +265,19 @@ var AgentMallRefunds = class {
265
265
  // src/purchase.ts
266
266
  async function purchase(config) {
267
267
  const { account, baseUrl, ...body } = config;
268
- const mppxModule = await import("mppx");
269
- const Mppx = mppxModule.Mppx ?? mppxModule.default?.Mppx;
270
- const tempo = mppxModule.tempo ?? mppxModule.default?.tempo;
268
+ let mppxClient;
269
+ try {
270
+ mppxClient = await import("mppx/client");
271
+ } catch {
272
+ throw new Error("mppx is required for purchases. Install it: npm install mppx");
273
+ }
274
+ const Mppx = mppxClient.Mppx;
275
+ const tempo = mppxClient.tempo;
271
276
  if (!Mppx || !tempo) {
272
277
  throw new Error("mppx is required for purchases. Install it: npm install mppx");
273
278
  }
274
279
  const mppx = Mppx.create({
275
- methods: [tempo({ account })],
276
- polyfill: false
280
+ methods: [tempo({ account })]
277
281
  });
278
282
  const client = new AgentMall({
279
283
  baseUrl: baseUrl ?? BASE_URL,
package/dist/index.js CHANGED
@@ -220,15 +220,19 @@ var AgentMallRefunds = class {
220
220
  // src/purchase.ts
221
221
  async function purchase(config) {
222
222
  const { account, baseUrl, ...body } = config;
223
- const mppxModule = await import("mppx");
224
- const Mppx = mppxModule.Mppx ?? mppxModule.default?.Mppx;
225
- const tempo = mppxModule.tempo ?? mppxModule.default?.tempo;
223
+ let mppxClient;
224
+ try {
225
+ mppxClient = await import("mppx/client");
226
+ } catch {
227
+ throw new Error("mppx is required for purchases. Install it: npm install mppx");
228
+ }
229
+ const Mppx = mppxClient.Mppx;
230
+ const tempo = mppxClient.tempo;
226
231
  if (!Mppx || !tempo) {
227
232
  throw new Error("mppx is required for purchases. Install it: npm install mppx");
228
233
  }
229
234
  const mppx = Mppx.create({
230
- methods: [tempo({ account })],
231
- polyfill: false
235
+ methods: [tempo({ account })]
232
236
  });
233
237
  const client = new AgentMall({
234
238
  baseUrl: baseUrl ?? BASE_URL,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentmall",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "SDK and CLI for the AgentMall API — let AI agents buy physical products from US retailers",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",