@cimplify/sdk 0.66.0 → 0.67.0
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/advanced.d.mts +1 -1
- package/dist/advanced.d.ts +1 -1
- package/dist/advanced.js +20 -20
- package/dist/advanced.mjs +1 -1
- package/dist/{chunk-AVQL3TSJ.js → chunk-3QSW33RG.js} +389 -78
- package/dist/chunk-E6T5VJMG.mjs +156 -0
- package/dist/{chunk-MWI5GAUF.mjs → chunk-FNK6UZOE.mjs} +2 -2
- package/dist/{chunk-3G4QCENX.mjs → chunk-FVGVJ4TC.mjs} +12 -50
- package/dist/chunk-IQLJJW2H.js +168 -0
- package/dist/{chunk-227XTAEB.mjs → chunk-JAPCAZN4.mjs} +2 -48
- package/dist/{chunk-R6363CC7.mjs → chunk-QQMDEGAK.mjs} +382 -79
- package/dist/{chunk-H6DBPHMZ.js → chunk-SH6HJW4A.js} +4 -4
- package/dist/{chunk-J3MGY6AU.js → chunk-SSLFZPAI.js} +36 -82
- package/dist/{chunk-HCZTBWU4.js → chunk-SXGFJEME.js} +12 -50
- package/dist/{client-Dka2cGhu.d.mts → client-ByI_3jfL.d.mts} +32 -20
- package/dist/{client-DasPHOJh.d.ts → client-CQlEWH5j.d.ts} +1 -1
- package/dist/{client-Bo5rujc2.d.ts → client-DVFQoDtI.d.ts} +32 -20
- package/dist/{client-CUrA1uQ0.d.mts → client-Dd82KQ_G.d.mts} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +80 -81
- package/dist/index.mjs +4 -5
- package/dist/mock/cli.mjs +12 -50
- package/dist/mock/library.js +12 -50
- package/dist/mock/library.mjs +12 -50
- package/dist/mock/msw.js +12 -50
- package/dist/mock/msw.mjs +12 -50
- package/dist/react.d.mts +4 -7
- package/dist/react.d.ts +4 -7
- package/dist/react.js +63 -71
- package/dist/react.mjs +5 -13
- package/dist/server.d.mts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +16 -9
- package/dist/server.mjs +11 -4
- package/dist/{sign-in-dr7m09nm.d.ts → sign-in-RFuWZOgF.d.mts} +6 -1
- package/dist/{sign-in-dr7m09nm.d.mts → sign-in-RFuWZOgF.d.ts} +6 -1
- package/dist/testing/msw.js +2 -2
- package/dist/testing/msw.mjs +1 -1
- package/dist/testing/suite.d.mts +2 -2
- package/dist/testing/suite.d.ts +2 -2
- package/dist/testing/suite.js +23 -23
- package/dist/testing/suite.mjs +4 -4
- package/dist/testing.d.mts +2 -2
- package/dist/testing.d.ts +2 -2
- package/dist/testing.js +79 -79
- package/dist/testing.mjs +5 -5
- package/package.json +1 -1
- package/dist/chunk-3Z3FQH7X.mjs +0 -323
- package/dist/chunk-7BKKBJQM.mjs +0 -52
- package/dist/chunk-GDAGM26J.js +0 -338
- package/dist/chunk-KWYI2TTA.js +0 -60
package/dist/react.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-
|
|
6
|
-
var
|
|
7
|
-
var chunkAVQL3TSJ_js = require('./chunk-AVQL3TSJ.js');
|
|
4
|
+
var chunkIQLJJW2H_js = require('./chunk-IQLJJW2H.js');
|
|
5
|
+
var chunkSSLFZPAI_js = require('./chunk-SSLFZPAI.js');
|
|
6
|
+
var chunk3QSW33RG_js = require('./chunk-3QSW33RG.js');
|
|
8
7
|
var chunk7Y2O3E4D_js = require('./chunk-7Y2O3E4D.js');
|
|
9
8
|
var chunkXA3ZNR75_js = require('./chunk-XA3ZNR75.js');
|
|
10
9
|
require('./chunk-OWW5GUSB.js');
|
|
@@ -1087,7 +1086,7 @@ var DEFAULT_COUNTRY = "US";
|
|
|
1087
1086
|
function createDefaultClient() {
|
|
1088
1087
|
const processRef = globalThis.process;
|
|
1089
1088
|
const envPublicKey = processRef?.env?.NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY || "";
|
|
1090
|
-
return
|
|
1089
|
+
return chunkSSLFZPAI_js.createCimplifyClient({ publicKey: envPublicKey });
|
|
1091
1090
|
}
|
|
1092
1091
|
function getStoredLocationId() {
|
|
1093
1092
|
if (typeof window === "undefined" || !window.localStorage) {
|
|
@@ -2716,7 +2715,7 @@ function CimplifySignInButton({
|
|
|
2716
2715
|
const onClick = async () => {
|
|
2717
2716
|
if (busy || disabled) return;
|
|
2718
2717
|
setBusy(true);
|
|
2719
|
-
await
|
|
2718
|
+
await chunk3QSW33RG_js.startSignIn({
|
|
2720
2719
|
...signInOpts,
|
|
2721
2720
|
onSuccess: () => {
|
|
2722
2721
|
setBusy(false);
|
|
@@ -5100,7 +5099,6 @@ function AuthElement({
|
|
|
5100
5099
|
prefillEmail,
|
|
5101
5100
|
onReady,
|
|
5102
5101
|
onAuthenticated,
|
|
5103
|
-
onRequiresOtp,
|
|
5104
5102
|
onError
|
|
5105
5103
|
}) {
|
|
5106
5104
|
const containerRef = React12.useRef(null);
|
|
@@ -5108,29 +5106,23 @@ function AuthElement({
|
|
|
5108
5106
|
const elements = useElements();
|
|
5109
5107
|
const onReadyRef = React12.useRef(onReady);
|
|
5110
5108
|
const onAuthenticatedRef = React12.useRef(onAuthenticated);
|
|
5111
|
-
const onRequiresOtpRef = React12.useRef(onRequiresOtp);
|
|
5112
5109
|
const onErrorRef = React12.useRef(onError);
|
|
5113
5110
|
React12.useEffect(() => {
|
|
5114
5111
|
onReadyRef.current = onReady;
|
|
5115
5112
|
onAuthenticatedRef.current = onAuthenticated;
|
|
5116
|
-
onRequiresOtpRef.current = onRequiresOtp;
|
|
5117
5113
|
onErrorRef.current = onError;
|
|
5118
|
-
}, [onReady, onAuthenticated,
|
|
5114
|
+
}, [onReady, onAuthenticated, onError]);
|
|
5119
5115
|
React12.useEffect(() => {
|
|
5120
5116
|
if (!elements || !containerRef.current) return;
|
|
5121
|
-
const element = elements.create(
|
|
5117
|
+
const element = elements.create(chunk3QSW33RG_js.ELEMENT_TYPES.AUTH, { prefillEmail });
|
|
5122
5118
|
elementRef.current = element;
|
|
5123
|
-
element.on(
|
|
5119
|
+
element.on(chunk3QSW33RG_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
|
|
5124
5120
|
element.on(
|
|
5125
|
-
|
|
5121
|
+
chunk3QSW33RG_js.EVENT_TYPES.AUTHENTICATED,
|
|
5126
5122
|
(data) => onAuthenticatedRef.current?.(data)
|
|
5127
5123
|
);
|
|
5128
5124
|
element.on(
|
|
5129
|
-
|
|
5130
|
-
(data) => onRequiresOtpRef.current?.(data)
|
|
5131
|
-
);
|
|
5132
|
-
element.on(
|
|
5133
|
-
chunkAVQL3TSJ_js.EVENT_TYPES.ERROR,
|
|
5125
|
+
chunk3QSW33RG_js.EVENT_TYPES.ERROR,
|
|
5134
5126
|
(data) => onErrorRef.current?.(data)
|
|
5135
5127
|
);
|
|
5136
5128
|
element.mount(containerRef.current);
|
|
@@ -5159,15 +5151,15 @@ function AddressElement({
|
|
|
5159
5151
|
}, [onReady, onChange, onError]);
|
|
5160
5152
|
React12.useEffect(() => {
|
|
5161
5153
|
if (!elements || !containerRef.current) return;
|
|
5162
|
-
const element = elements.create(
|
|
5154
|
+
const element = elements.create(chunk3QSW33RG_js.ELEMENT_TYPES.ADDRESS, { mode });
|
|
5163
5155
|
elementRef.current = element;
|
|
5164
|
-
element.on(
|
|
5156
|
+
element.on(chunk3QSW33RG_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
|
|
5165
5157
|
element.on(
|
|
5166
|
-
|
|
5158
|
+
chunk3QSW33RG_js.EVENT_TYPES.CHANGE,
|
|
5167
5159
|
(data) => onChangeRef.current?.(data)
|
|
5168
5160
|
);
|
|
5169
5161
|
element.on(
|
|
5170
|
-
|
|
5162
|
+
chunk3QSW33RG_js.EVENT_TYPES.ERROR,
|
|
5171
5163
|
(data) => onErrorRef.current?.(data)
|
|
5172
5164
|
);
|
|
5173
5165
|
element.mount(containerRef.current);
|
|
@@ -5197,15 +5189,15 @@ function PaymentElement({
|
|
|
5197
5189
|
}, [onReady, onChange, onError]);
|
|
5198
5190
|
React12.useEffect(() => {
|
|
5199
5191
|
if (!elements || !containerRef.current) return;
|
|
5200
|
-
const element = elements.create(
|
|
5192
|
+
const element = elements.create(chunk3QSW33RG_js.ELEMENT_TYPES.PAYMENT, { amount, currency });
|
|
5201
5193
|
elementRef.current = element;
|
|
5202
|
-
element.on(
|
|
5194
|
+
element.on(chunk3QSW33RG_js.EVENT_TYPES.READY, () => onReadyRef.current?.());
|
|
5203
5195
|
element.on(
|
|
5204
|
-
|
|
5196
|
+
chunk3QSW33RG_js.EVENT_TYPES.CHANGE,
|
|
5205
5197
|
(data) => onChangeRef.current?.(data)
|
|
5206
5198
|
);
|
|
5207
5199
|
element.on(
|
|
5208
|
-
|
|
5200
|
+
chunk3QSW33RG_js.EVENT_TYPES.ERROR,
|
|
5209
5201
|
(data) => onErrorRef.current?.(data)
|
|
5210
5202
|
);
|
|
5211
5203
|
element.mount(containerRef.current);
|
|
@@ -5465,7 +5457,7 @@ function VariantSelector({
|
|
|
5465
5457
|
{
|
|
5466
5458
|
"data-cimplify-variant-name": true,
|
|
5467
5459
|
className: cn("flex-1 min-w-0 text-sm", classNames?.name),
|
|
5468
|
-
children:
|
|
5460
|
+
children: chunkIQLJJW2H_js.getVariantDisplayName(variant, productName)
|
|
5469
5461
|
}
|
|
5470
5462
|
),
|
|
5471
5463
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { "data-cimplify-variant-pricing": true, className: cn("text-sm text-muted-foreground", classNames?.pricing), children: [
|
|
@@ -6938,12 +6930,12 @@ function FieldInput({
|
|
|
6938
6930
|
classNames?.input
|
|
6939
6931
|
);
|
|
6940
6932
|
switch (field.field_type) {
|
|
6941
|
-
case
|
|
6942
|
-
case
|
|
6933
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Text:
|
|
6934
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Url:
|
|
6943
6935
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6944
6936
|
"input",
|
|
6945
6937
|
{
|
|
6946
|
-
type: field.field_type ===
|
|
6938
|
+
type: field.field_type === chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Url ? "url" : "text",
|
|
6947
6939
|
value: typeof value === "string" ? value : "",
|
|
6948
6940
|
onChange: (e) => onValueChange(e.target.value),
|
|
6949
6941
|
placeholder: field.placeholder,
|
|
@@ -6952,7 +6944,7 @@ function FieldInput({
|
|
|
6952
6944
|
className: inputClass
|
|
6953
6945
|
}
|
|
6954
6946
|
);
|
|
6955
|
-
case
|
|
6947
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Textarea:
|
|
6956
6948
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6957
6949
|
"textarea",
|
|
6958
6950
|
{
|
|
@@ -6965,7 +6957,7 @@ function FieldInput({
|
|
|
6965
6957
|
className: cn(inputClass, "resize-none", classNames?.textarea)
|
|
6966
6958
|
}
|
|
6967
6959
|
);
|
|
6968
|
-
case
|
|
6960
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Number:
|
|
6969
6961
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
6970
6962
|
"input",
|
|
6971
6963
|
{
|
|
@@ -6979,7 +6971,7 @@ function FieldInput({
|
|
|
6979
6971
|
className: inputClass
|
|
6980
6972
|
}
|
|
6981
6973
|
);
|
|
6982
|
-
case
|
|
6974
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Select:
|
|
6983
6975
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6984
6976
|
"select",
|
|
6985
6977
|
{
|
|
@@ -6993,7 +6985,7 @@ function FieldInput({
|
|
|
6993
6985
|
]
|
|
6994
6986
|
}
|
|
6995
6987
|
);
|
|
6996
|
-
case
|
|
6988
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Radio:
|
|
6997
6989
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-2", classNames?.radioGroup), children: (field.options || []).map((opt) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6998
6990
|
"label",
|
|
6999
6991
|
{
|
|
@@ -7018,7 +7010,7 @@ function FieldInput({
|
|
|
7018
7010
|
},
|
|
7019
7011
|
opt
|
|
7020
7012
|
)) });
|
|
7021
|
-
case
|
|
7013
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Checkbox:
|
|
7022
7014
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: cn("flex items-center gap-2 text-sm cursor-pointer", classNames?.checkboxLabel), children: [
|
|
7023
7015
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7024
7016
|
"input",
|
|
@@ -7031,7 +7023,7 @@ function FieldInput({
|
|
|
7031
7023
|
),
|
|
7032
7024
|
field.placeholder || field.name
|
|
7033
7025
|
] });
|
|
7034
|
-
case
|
|
7026
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Color:
|
|
7035
7027
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7036
7028
|
"input",
|
|
7037
7029
|
{
|
|
@@ -7041,7 +7033,7 @@ function FieldInput({
|
|
|
7041
7033
|
className: cn("w-12 h-10 rounded-md border border-input cursor-pointer", classNames?.colorInput)
|
|
7042
7034
|
}
|
|
7043
7035
|
);
|
|
7044
|
-
case
|
|
7036
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Date:
|
|
7045
7037
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7046
7038
|
DatePicker,
|
|
7047
7039
|
{
|
|
@@ -7052,8 +7044,8 @@ function FieldInput({
|
|
|
7052
7044
|
"aria-label": field.name
|
|
7053
7045
|
}
|
|
7054
7046
|
);
|
|
7055
|
-
case
|
|
7056
|
-
case
|
|
7047
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.File:
|
|
7048
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Image:
|
|
7057
7049
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7058
7050
|
FileUploadInput,
|
|
7059
7051
|
{
|
|
@@ -7064,7 +7056,7 @@ function FieldInput({
|
|
|
7064
7056
|
classNames
|
|
7065
7057
|
}
|
|
7066
7058
|
);
|
|
7067
|
-
case
|
|
7059
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Email:
|
|
7068
7060
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7069
7061
|
"input",
|
|
7070
7062
|
{
|
|
@@ -7076,7 +7068,7 @@ function FieldInput({
|
|
|
7076
7068
|
className: inputClass
|
|
7077
7069
|
}
|
|
7078
7070
|
);
|
|
7079
|
-
case
|
|
7071
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.DateTime: {
|
|
7080
7072
|
const stringValue = typeof value === "string" ? value : "";
|
|
7081
7073
|
const [datePart, timePartRaw] = stringValue.includes("T") ? stringValue.split("T", 2) : [stringValue, ""];
|
|
7082
7074
|
const timePart = (timePartRaw ?? "").slice(0, 5);
|
|
@@ -7115,7 +7107,7 @@ function FieldInput({
|
|
|
7115
7107
|
)
|
|
7116
7108
|
] });
|
|
7117
7109
|
}
|
|
7118
|
-
case
|
|
7110
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Time:
|
|
7119
7111
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7120
7112
|
TimePicker,
|
|
7121
7113
|
{
|
|
@@ -7126,7 +7118,7 @@ function FieldInput({
|
|
|
7126
7118
|
"aria-label": field.name
|
|
7127
7119
|
}
|
|
7128
7120
|
);
|
|
7129
|
-
case
|
|
7121
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.MultiSelect:
|
|
7130
7122
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7131
7123
|
MultiSelectInput,
|
|
7132
7124
|
{
|
|
@@ -7136,7 +7128,7 @@ function FieldInput({
|
|
|
7136
7128
|
classNames
|
|
7137
7129
|
}
|
|
7138
7130
|
);
|
|
7139
|
-
case
|
|
7131
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.DateRange:
|
|
7140
7132
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7141
7133
|
DateRangeInput,
|
|
7142
7134
|
{
|
|
@@ -7146,7 +7138,7 @@ function FieldInput({
|
|
|
7146
7138
|
classNames
|
|
7147
7139
|
}
|
|
7148
7140
|
);
|
|
7149
|
-
case
|
|
7141
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Address:
|
|
7150
7142
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7151
7143
|
AddressInput,
|
|
7152
7144
|
{
|
|
@@ -7157,7 +7149,7 @@ function FieldInput({
|
|
|
7157
7149
|
inputClass
|
|
7158
7150
|
}
|
|
7159
7151
|
);
|
|
7160
|
-
case
|
|
7152
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Location:
|
|
7161
7153
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7162
7154
|
LocationInput,
|
|
7163
7155
|
{
|
|
@@ -7168,7 +7160,7 @@ function FieldInput({
|
|
|
7168
7160
|
inputClass
|
|
7169
7161
|
}
|
|
7170
7162
|
);
|
|
7171
|
-
case
|
|
7163
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Phone:
|
|
7172
7164
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7173
7165
|
PhoneInput,
|
|
7174
7166
|
{
|
|
@@ -7179,7 +7171,7 @@ function FieldInput({
|
|
|
7179
7171
|
inputClass
|
|
7180
7172
|
}
|
|
7181
7173
|
);
|
|
7182
|
-
case
|
|
7174
|
+
case chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Signature:
|
|
7183
7175
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7184
7176
|
SignatureInput,
|
|
7185
7177
|
{
|
|
@@ -7212,7 +7204,7 @@ function FileUploadInput({
|
|
|
7212
7204
|
const [isUploading, setIsUploading] = React12__default.default.useState(false);
|
|
7213
7205
|
const fileUrl = typeof value === "string" ? value : void 0;
|
|
7214
7206
|
const acceptedFormats = field.validation?.accepted_formats;
|
|
7215
|
-
const accept = acceptedFormats ? acceptedFormats.map((f) => `.${f}`).join(",") : field.field_type ===
|
|
7207
|
+
const accept = acceptedFormats ? acceptedFormats.map((f) => `.${f}`).join(",") : field.field_type === chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Image ? "image/*" : void 0;
|
|
7216
7208
|
const handleFile = async (file) => {
|
|
7217
7209
|
if (!onFileUpload) return;
|
|
7218
7210
|
if (field.validation?.max_size_mb) {
|
|
@@ -7230,7 +7222,7 @@ function FileUploadInput({
|
|
|
7230
7222
|
}
|
|
7231
7223
|
};
|
|
7232
7224
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-2", classNames?.fileInput), children: fileUrl ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
7233
|
-
field.field_type ===
|
|
7225
|
+
field.field_type === chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Image && /* @__PURE__ */ jsxRuntime.jsx("img", { src: fileUrl, alt: "Uploaded", className: "w-16 h-16 object-cover rounded-md border border-border" }),
|
|
7234
7226
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-foreground truncate", children: fileUrl.split("/").pop() }) }),
|
|
7235
7227
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7236
7228
|
"button",
|
|
@@ -7256,7 +7248,7 @@ function FileUploadInput({
|
|
|
7256
7248
|
}
|
|
7257
7249
|
),
|
|
7258
7250
|
isUploading ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: "Uploading..." }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
7259
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: field.placeholder || `Upload ${field.field_type ===
|
|
7251
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: field.placeholder || `Upload ${field.field_type === chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Image ? "image" : "file"}` }),
|
|
7260
7252
|
acceptedFormats && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground/60 mt-1", children: [
|
|
7261
7253
|
acceptedFormats.map((f) => f.toUpperCase()).join(", "),
|
|
7262
7254
|
field.validation?.max_size_mb && ` \xB7 Max ${field.validation.max_size_mb}MB`
|
|
@@ -8878,7 +8870,7 @@ function CartLineItemRow({
|
|
|
8878
8870
|
const isOptimistic = item.isOptimistic === true;
|
|
8879
8871
|
const lineTotal = chunk7Y2O3E4D_js.parsePrice(unitPrice) * item.quantity;
|
|
8880
8872
|
const imageUrl = item.product.image_url;
|
|
8881
|
-
const variantLabel = item.variant ?
|
|
8873
|
+
const variantLabel = item.variant ? chunkIQLJJW2H_js.getVariantDisplayName(item.variant, item.product.name) : null;
|
|
8882
8874
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8883
8875
|
"div",
|
|
8884
8876
|
{
|
|
@@ -8978,7 +8970,7 @@ function CartLineItemRow({
|
|
|
8978
8970
|
input.field_name,
|
|
8979
8971
|
":"
|
|
8980
8972
|
] }),
|
|
8981
|
-
/* @__PURE__ */ jsxRuntime.jsx("dd", { "data-cimplify-cart-input-value": true, className: "text-foreground m-0 truncate", children: input.field_type ===
|
|
8973
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { "data-cimplify-cart-input-value": true, className: "text-foreground m-0 truncate", children: input.field_type === chunkIQLJJW2H_js.INPUT_FIELD_TYPE.File || input.field_type === chunkIQLJJW2H_js.INPUT_FIELD_TYPE.Image ? String(input.value).split("/").pop() || "Uploaded file" : String(input.value) })
|
|
8982
8974
|
] }, input.field_id)) }),
|
|
8983
8975
|
(item.lineType === "service" || item.product.type === "service") && item.scheduledStart && /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-cimplify-cart-service-info": true, className: cn("mt-1.5 flex items-center gap-1.5 text-xs text-muted-foreground", classNames?.serviceInfo), children: [
|
|
8984
8976
|
/* @__PURE__ */ jsxRuntime.jsx("svg", { className: "w-3.5 h-3.5 shrink-0", fill: "none", stroke: "currentColor", strokeWidth: "2", viewBox: "0 0 24 24", "aria-hidden": true, children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z" }) }),
|
|
@@ -9699,7 +9691,7 @@ function FoodProductCard({
|
|
|
9699
9691
|
const tags = product.tags || [];
|
|
9700
9692
|
const isSignature = product.metadata?.is_signature === true;
|
|
9701
9693
|
const isNew = product.metadata?.is_new === true;
|
|
9702
|
-
const isComposite = product.type ===
|
|
9694
|
+
const isComposite = product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Composite;
|
|
9703
9695
|
return /* @__PURE__ */ jsxRuntime.jsxs(CardShell, { product, renderLink, className, children: [
|
|
9704
9696
|
/* @__PURE__ */ jsxRuntime.jsxs(CardImage, { src: image, alt: product.name, aspectRatio: "square", renderImage, children: [
|
|
9705
9697
|
isSignature && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "absolute top-3 left-3 inline-flex items-center gap-1 text-[11px] font-semibold tracking-wide bg-amber-50 text-amber-700 border border-amber-200/60 px-2 py-0.5 rounded-md", children: [
|
|
@@ -10452,26 +10444,26 @@ var BUILT_IN_CARDS = {
|
|
|
10452
10444
|
["composite" /* Composite */]: CompositeProductCard,
|
|
10453
10445
|
["subscription" /* Subscription */]: SubscriptionCard
|
|
10454
10446
|
};
|
|
10455
|
-
var RENTAL_UNITS = /* @__PURE__ */ new Set([
|
|
10456
|
-
var LEASE_UNITS = /* @__PURE__ */ new Set([
|
|
10447
|
+
var RENTAL_UNITS = /* @__PURE__ */ new Set([chunkIQLJJW2H_js.DURATION_UNIT.Days, chunkIQLJJW2H_js.DURATION_UNIT.Hours]);
|
|
10448
|
+
var LEASE_UNITS = /* @__PURE__ */ new Set([chunkIQLJJW2H_js.DURATION_UNIT.Weeks, chunkIQLJJW2H_js.DURATION_UNIT.Months, chunkIQLJJW2H_js.DURATION_UNIT.Years]);
|
|
10457
10449
|
function resolveCardVariant(product) {
|
|
10458
|
-
if (product.type ===
|
|
10450
|
+
if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Bundle) {
|
|
10459
10451
|
return "bundle" /* Bundle */;
|
|
10460
10452
|
}
|
|
10461
|
-
if (product.type ===
|
|
10453
|
+
if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Composite) {
|
|
10462
10454
|
return "composite" /* Composite */;
|
|
10463
10455
|
}
|
|
10464
10456
|
if (product.quantity_pricing && product.quantity_pricing.length > 1) {
|
|
10465
10457
|
return "wholesale" /* Wholesale */;
|
|
10466
10458
|
}
|
|
10467
|
-
if (product.type ===
|
|
10459
|
+
if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Digital) {
|
|
10468
10460
|
return "digital" /* Digital */;
|
|
10469
10461
|
}
|
|
10470
|
-
if (product.type ===
|
|
10462
|
+
if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Service) {
|
|
10471
10463
|
if (product.duration_unit && RENTAL_UNITS.has(product.duration_unit)) {
|
|
10472
10464
|
return "rental" /* Rental */;
|
|
10473
10465
|
}
|
|
10474
|
-
if (product.duration_unit ===
|
|
10466
|
+
if (product.duration_unit === chunkIQLJJW2H_js.DURATION_UNIT.Nights) {
|
|
10475
10467
|
return "accommodation" /* Accommodation */;
|
|
10476
10468
|
}
|
|
10477
10469
|
if (product.duration_unit && LEASE_UNITS.has(product.duration_unit)) {
|
|
@@ -10482,10 +10474,10 @@ function resolveCardVariant(product) {
|
|
|
10482
10474
|
}
|
|
10483
10475
|
return "standard" /* Standard */;
|
|
10484
10476
|
}
|
|
10485
|
-
if (product.render_hint ===
|
|
10477
|
+
if (product.render_hint === chunkIQLJJW2H_js.RENDER_HINT.Food) {
|
|
10486
10478
|
return "food" /* Food */;
|
|
10487
10479
|
}
|
|
10488
|
-
if (product.render_hint ===
|
|
10480
|
+
if (product.render_hint === chunkIQLJJW2H_js.RENDER_HINT.Physical) {
|
|
10489
10481
|
return "retail" /* Retail */;
|
|
10490
10482
|
}
|
|
10491
10483
|
return "retail" /* Retail */;
|
|
@@ -12792,7 +12784,7 @@ function DefaultProductLayout({
|
|
|
12792
12784
|
className
|
|
12793
12785
|
}) {
|
|
12794
12786
|
const [selectedVariantId, setSelectedVariantId] = React12__default.default.useState();
|
|
12795
|
-
const images =
|
|
12787
|
+
const images = chunkIQLJJW2H_js.resolveGallery(product, selectedVariantId);
|
|
12796
12788
|
const hasRange = product.quantity_pricing && product.quantity_pricing.length > 1 || product.variants && product.variants.length > 1;
|
|
12797
12789
|
const onSale = chunk7Y2O3E4D_js.isOnSale(product);
|
|
12798
12790
|
const hasPhysicalDetails = product.sku || product.vendor || product.material;
|
|
@@ -13428,25 +13420,25 @@ function resolveTemplateKey(product) {
|
|
|
13428
13420
|
if (typeof metaTemplate === "string" && metaTemplate.trim()) {
|
|
13429
13421
|
return metaTemplate.trim();
|
|
13430
13422
|
}
|
|
13431
|
-
if (product.type ===
|
|
13423
|
+
if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Bundle) {
|
|
13432
13424
|
return "bundle" /* Bundle */;
|
|
13433
13425
|
}
|
|
13434
|
-
if (product.type ===
|
|
13426
|
+
if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Composite) {
|
|
13435
13427
|
return "composite" /* Composite */;
|
|
13436
13428
|
}
|
|
13437
13429
|
if (product.quantity_pricing && product.quantity_pricing.length > 1) {
|
|
13438
13430
|
return "wholesale" /* Wholesale */;
|
|
13439
13431
|
}
|
|
13440
|
-
if (product.type ===
|
|
13432
|
+
if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Service) {
|
|
13441
13433
|
return "service" /* Service */;
|
|
13442
13434
|
}
|
|
13443
|
-
if (product.type ===
|
|
13435
|
+
if (product.type === chunkIQLJJW2H_js.PRODUCT_TYPE.Digital) {
|
|
13444
13436
|
return "digital" /* Digital */;
|
|
13445
13437
|
}
|
|
13446
|
-
if (product.render_hint ===
|
|
13438
|
+
if (product.render_hint === chunkIQLJJW2H_js.RENDER_HINT.Food) {
|
|
13447
13439
|
return "food" /* Food */;
|
|
13448
13440
|
}
|
|
13449
|
-
if (product.render_hint ===
|
|
13441
|
+
if (product.render_hint === chunkIQLJJW2H_js.RENDER_HINT.Physical) {
|
|
13450
13442
|
return "physical" /* Physical */;
|
|
13451
13443
|
}
|
|
13452
13444
|
return "default" /* Default */;
|
|
@@ -15672,7 +15664,7 @@ function SparkleIcon({ className }) {
|
|
|
15672
15664
|
|
|
15673
15665
|
Object.defineProperty(exports, "getVariantDisplayName", {
|
|
15674
15666
|
enumerable: true,
|
|
15675
|
-
get: function () { return
|
|
15667
|
+
get: function () { return chunkIQLJJW2H_js.getVariantDisplayName; }
|
|
15676
15668
|
});
|
|
15677
15669
|
exports.AccommodationCard = AccommodationCard;
|
|
15678
15670
|
exports.AccountContent = AccountContent;
|
package/dist/react.mjs
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { DURATION_UNIT, getVariantDisplayName, INPUT_FIELD_TYPE, PRODUCT_TYPE, resolveGallery,
|
|
3
|
-
export { getVariantDisplayName } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import {
|
|
6
|
-
import { ELEMENT_TYPES, EVENT_TYPES } from './chunk-R6363CC7.mjs';
|
|
2
|
+
import { DURATION_UNIT, getVariantDisplayName, INPUT_FIELD_TYPE, PRODUCT_TYPE, resolveGallery, RENDER_HINT } from './chunk-E6T5VJMG.mjs';
|
|
3
|
+
export { getVariantDisplayName } from './chunk-E6T5VJMG.mjs';
|
|
4
|
+
import { createCimplifyClient } from './chunk-JAPCAZN4.mjs';
|
|
5
|
+
import { ELEMENT_TYPES, EVENT_TYPES, startSignIn } from './chunk-QQMDEGAK.mjs';
|
|
7
6
|
import { formatPrice, parsePrice, getUnitPriceAtQuantity, isOnSale, getDiscountPercentage, getBasePrice, getPriceRange, formatPriceRange } from './chunk-TD3AY34U.mjs';
|
|
8
7
|
import { isSupportedCurrency } from './chunk-AMZXALF6.mjs';
|
|
9
8
|
import './chunk-3G6RQLXK.mjs';
|
|
@@ -5095,7 +5094,6 @@ function AuthElement({
|
|
|
5095
5094
|
prefillEmail,
|
|
5096
5095
|
onReady,
|
|
5097
5096
|
onAuthenticated,
|
|
5098
|
-
onRequiresOtp,
|
|
5099
5097
|
onError
|
|
5100
5098
|
}) {
|
|
5101
5099
|
const containerRef = useRef(null);
|
|
@@ -5103,14 +5101,12 @@ function AuthElement({
|
|
|
5103
5101
|
const elements = useElements();
|
|
5104
5102
|
const onReadyRef = useRef(onReady);
|
|
5105
5103
|
const onAuthenticatedRef = useRef(onAuthenticated);
|
|
5106
|
-
const onRequiresOtpRef = useRef(onRequiresOtp);
|
|
5107
5104
|
const onErrorRef = useRef(onError);
|
|
5108
5105
|
useEffect(() => {
|
|
5109
5106
|
onReadyRef.current = onReady;
|
|
5110
5107
|
onAuthenticatedRef.current = onAuthenticated;
|
|
5111
|
-
onRequiresOtpRef.current = onRequiresOtp;
|
|
5112
5108
|
onErrorRef.current = onError;
|
|
5113
|
-
}, [onReady, onAuthenticated,
|
|
5109
|
+
}, [onReady, onAuthenticated, onError]);
|
|
5114
5110
|
useEffect(() => {
|
|
5115
5111
|
if (!elements || !containerRef.current) return;
|
|
5116
5112
|
const element = elements.create(ELEMENT_TYPES.AUTH, { prefillEmail });
|
|
@@ -5120,10 +5116,6 @@ function AuthElement({
|
|
|
5120
5116
|
EVENT_TYPES.AUTHENTICATED,
|
|
5121
5117
|
(data) => onAuthenticatedRef.current?.(data)
|
|
5122
5118
|
);
|
|
5123
|
-
element.on(
|
|
5124
|
-
EVENT_TYPES.REQUIRES_OTP,
|
|
5125
|
-
(data) => onRequiresOtpRef.current?.(data)
|
|
5126
|
-
);
|
|
5127
5119
|
element.on(
|
|
5128
5120
|
EVENT_TYPES.ERROR,
|
|
5129
5121
|
(data) => onErrorRef.current?.(data)
|
package/dist/server.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ac as CimplifyClient } from './client-
|
|
2
|
-
export { J as CacheOptions,
|
|
1
|
+
import { ac as CimplifyClient } from './client-ByI_3jfL.mjs';
|
|
2
|
+
export { J as CacheOptions, c8 as ReadRequestOptions, cu as Result } from './client-ByI_3jfL.mjs';
|
|
3
3
|
export { Q as Category, T as CimplifyError, U as Collection, aX as Product, b9 as ProductWithDetails } from './product-B_kS4Oxa.mjs';
|
|
4
4
|
import { JWTVerifyResult } from 'jose';
|
|
5
5
|
import './payment-DVS7ZUEp.mjs';
|
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ac as CimplifyClient } from './client-
|
|
2
|
-
export { J as CacheOptions,
|
|
1
|
+
import { ac as CimplifyClient } from './client-DVFQoDtI.js';
|
|
2
|
+
export { J as CacheOptions, c8 as ReadRequestOptions, cu as Result } from './client-DVFQoDtI.js';
|
|
3
3
|
export { Q as Category, T as CimplifyError, U as Collection, aX as Product, b9 as ProductWithDetails } from './product-B_kS4Oxa.js';
|
|
4
4
|
import { JWTVerifyResult } from 'jose';
|
|
5
5
|
import './payment-sn-yGL7v.js';
|
package/dist/server.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
require('./chunk-AVQL3TSJ.js');
|
|
3
|
+
var chunkSSLFZPAI_js = require('./chunk-SSLFZPAI.js');
|
|
4
|
+
var chunk3QSW33RG_js = require('./chunk-3QSW33RG.js');
|
|
6
5
|
require('./chunk-7Y2O3E4D.js');
|
|
7
6
|
var chunkXA3ZNR75_js = require('./chunk-XA3ZNR75.js');
|
|
8
7
|
require('./chunk-OWW5GUSB.js');
|
|
@@ -27,7 +26,7 @@ function readEnv(...keys) {
|
|
|
27
26
|
var getServerClient = react.cache((opts = {}) => {
|
|
28
27
|
const baseUrl = opts.apiUrl ?? readEnv("CIMPLIFY_API_URL", "NEXT_PUBLIC_CIMPLIFY_API_URL") ?? defaultBaseUrl();
|
|
29
28
|
const publicKey = opts.secretKey ?? readEnv("CIMPLIFY_SECRET_KEY", "NEXT_PUBLIC_CIMPLIFY_PUBLIC_KEY") ?? "mock-dev";
|
|
30
|
-
const client =
|
|
29
|
+
const client = chunkSSLFZPAI_js.createCimplifyClient({
|
|
31
30
|
baseUrl,
|
|
32
31
|
publicKey,
|
|
33
32
|
suppressPublicKeyWarning: true
|
|
@@ -251,7 +250,7 @@ var QUERY_AUTH_ERROR = "cimplify_auth_error";
|
|
|
251
250
|
var discoveryCache = /* @__PURE__ */ new Map();
|
|
252
251
|
var jwksCache = /* @__PURE__ */ new Map();
|
|
253
252
|
function issuerBase(cfg) {
|
|
254
|
-
return (cfg.issuer ?? cfg.authUrl ??
|
|
253
|
+
return (cfg.issuer ?? cfg.authUrl ?? chunk3QSW33RG_js.DEFAULT_ISSUER).replace(/\/$/, "");
|
|
255
254
|
}
|
|
256
255
|
function cookieName(cfg) {
|
|
257
256
|
return cfg.cookieName ?? SESSION_COOKIE;
|
|
@@ -454,16 +453,24 @@ async function handleOidcCallback(req, opts) {
|
|
|
454
453
|
buildRefreshTokenCookie(opts, tokens.refreshToken, REFRESH_COOKIE_MAX_AGE_SECONDS)
|
|
455
454
|
);
|
|
456
455
|
}
|
|
457
|
-
return new Response(
|
|
456
|
+
return new Response(
|
|
457
|
+
JSON.stringify({
|
|
458
|
+
ok: true,
|
|
459
|
+
accessToken: tokens.accessToken,
|
|
460
|
+
expiresIn: tokens.expiresIn,
|
|
461
|
+
scope: tokens.scope
|
|
462
|
+
}),
|
|
463
|
+
{ status: 200, headers }
|
|
464
|
+
);
|
|
458
465
|
}
|
|
459
466
|
function readPkceCookie(cookieHeader) {
|
|
460
467
|
if (!cookieHeader) return null;
|
|
461
|
-
const match = cookieHeader.split(/;\s*/).find((p) => p.startsWith(`${
|
|
468
|
+
const match = cookieHeader.split(/;\s*/).find((p) => p.startsWith(`${chunk3QSW33RG_js.PKCE_COOKIE}=`));
|
|
462
469
|
if (!match) return null;
|
|
463
|
-
return
|
|
470
|
+
return chunk3QSW33RG_js.decodePkceState(match.slice(chunk3QSW33RG_js.PKCE_COOKIE.length + 1));
|
|
464
471
|
}
|
|
465
472
|
function buildPkceClearCookie() {
|
|
466
|
-
return `${
|
|
473
|
+
return `${chunk3QSW33RG_js.PKCE_COOKIE}=; Path=${chunk3QSW33RG_js.PKCE_COOKIE_PATH}; Max-Age=0; Secure; SameSite=Lax`;
|
|
467
474
|
}
|
|
468
475
|
function safeReturnPath(returnTo, fallback) {
|
|
469
476
|
if (returnTo && returnTo.startsWith("/") && !returnTo.startsWith("//")) return returnTo;
|
package/dist/server.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import './chunk-R6363CC7.mjs';
|
|
1
|
+
import { createCimplifyClient } from './chunk-JAPCAZN4.mjs';
|
|
2
|
+
import { PKCE_COOKIE, decodePkceState, PKCE_COOKIE_PATH, DEFAULT_ISSUER } from './chunk-QQMDEGAK.mjs';
|
|
4
3
|
import './chunk-TD3AY34U.mjs';
|
|
5
4
|
export { CimplifyError } from './chunk-AMZXALF6.mjs';
|
|
6
5
|
import './chunk-3G6RQLXK.mjs';
|
|
@@ -452,7 +451,15 @@ async function handleOidcCallback(req, opts) {
|
|
|
452
451
|
buildRefreshTokenCookie(opts, tokens.refreshToken, REFRESH_COOKIE_MAX_AGE_SECONDS)
|
|
453
452
|
);
|
|
454
453
|
}
|
|
455
|
-
return new Response(
|
|
454
|
+
return new Response(
|
|
455
|
+
JSON.stringify({
|
|
456
|
+
ok: true,
|
|
457
|
+
accessToken: tokens.accessToken,
|
|
458
|
+
expiresIn: tokens.expiresIn,
|
|
459
|
+
scope: tokens.scope
|
|
460
|
+
}),
|
|
461
|
+
{ status: 200, headers }
|
|
462
|
+
);
|
|
456
463
|
}
|
|
457
464
|
function readPkceCookie(cookieHeader) {
|
|
458
465
|
if (!cookieHeader) return null;
|
|
@@ -50,7 +50,12 @@ interface SignInOptions {
|
|
|
50
50
|
error: string;
|
|
51
51
|
description?: string;
|
|
52
52
|
}) => void;
|
|
53
|
-
onSuccess?: () => void;
|
|
53
|
+
onSuccess?: (result: SignInSuccess) => void;
|
|
54
|
+
}
|
|
55
|
+
interface SignInSuccess {
|
|
56
|
+
accessToken?: string;
|
|
57
|
+
expiresIn?: number;
|
|
58
|
+
scope?: string;
|
|
54
59
|
}
|
|
55
60
|
declare function startSignIn(opts: SignInOptions): Promise<void>;
|
|
56
61
|
|
|
@@ -50,7 +50,12 @@ interface SignInOptions {
|
|
|
50
50
|
error: string;
|
|
51
51
|
description?: string;
|
|
52
52
|
}) => void;
|
|
53
|
-
onSuccess?: () => void;
|
|
53
|
+
onSuccess?: (result: SignInSuccess) => void;
|
|
54
|
+
}
|
|
55
|
+
interface SignInSuccess {
|
|
56
|
+
accessToken?: string;
|
|
57
|
+
expiresIn?: number;
|
|
58
|
+
scope?: string;
|
|
54
59
|
}
|
|
55
60
|
declare function startSignIn(opts: SignInOptions): Promise<void>;
|
|
56
61
|
|
package/dist/testing/msw.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkSXGFJEME_js = require('../chunk-SXGFJEME.js');
|
|
4
4
|
require('../chunk-XA3ZNR75.js');
|
|
5
5
|
require('../chunk-OWW5GUSB.js');
|
|
6
6
|
|
|
7
7
|
// src/mock/msw.ts
|
|
8
8
|
async function createMswHandlers(options = {}) {
|
|
9
9
|
const baseUrl = options.baseUrl ?? "http://localhost:8787";
|
|
10
|
-
const handle =
|
|
10
|
+
const handle = chunkSXGFJEME_js.createMockApp(options);
|
|
11
11
|
const msw = await import('msw').catch(() => {
|
|
12
12
|
throw new Error("msw is required to use @cimplify/sdk/mock/msw \u2014 install it as a peer dependency");
|
|
13
13
|
});
|
package/dist/testing/msw.mjs
CHANGED
package/dist/testing/suite.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TestAPI } from 'vitest';
|
|
2
|
-
import { T as TestClientHandle } from '../client-
|
|
2
|
+
import { T as TestClientHandle } from '../client-Dd82KQ_G.mjs';
|
|
3
3
|
import { C as CreateAppOptions } from '../server-D8rwqZQ6.mjs';
|
|
4
4
|
export { S as SeedName } from '../server-D8rwqZQ6.mjs';
|
|
5
|
-
import '../client-
|
|
5
|
+
import '../client-ByI_3jfL.mjs';
|
|
6
6
|
import '../product-B_kS4Oxa.mjs';
|
|
7
7
|
import '../payment-DVS7ZUEp.mjs';
|
|
8
8
|
import 'hono';
|