@rebirth-wd/shared 0.0.0-stage → 0.1.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/CHANGELOG.md +7 -0
- package/README.md +14 -2
- package/dist/chunk-34FCMAJX.js +37 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +12 -0
- package/dist/index.d.ts +162 -0
- package/dist/index.js +108 -0
- package/package.json +48 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# @rebirth-wd/shared
|
|
2
|
+
|
|
3
|
+
## 0.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 4aeeefa: First public release of the v1 API contract: `EnquiryCreate`, `EnquiryCreated`, `WidgetConfig`, `SiteFormConfig`, `Journey`, `ApiError`, `estimateFor()`, `fieldErrors()`, and a zod-free browser client at `@rebirth-wd/shared/client`.
|
package/README.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @rebirth-wd/shared
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The Rebirth Pulse API contract: the only thing the widget, dashboard and API share.
|
|
4
|
+
|
|
5
|
+
- `@rebirth-wd/shared`: Zod schemas and types (`EnquiryCreate`, `WidgetConfig`, `SiteFormConfig`, `Journey`, `ApiError`), `estimateFor()`, `fieldErrors()`.
|
|
6
|
+
- `@rebirth-wd/shared/client`: a zod-free fetch client for browsers (`createPulseClient(baseUrl)`), plus the types.
|
|
7
|
+
|
|
8
|
+
Routes are versioned (`/v1/...`). Removing or renaming a field, tightening validation or changing a route's shape is a major release; additive optional fields are minor.
|
|
9
|
+
|
|
10
|
+
| Route | Purpose |
|
|
11
|
+
|---|---|
|
|
12
|
+
| `GET /v1/health` | `{ ok: true, version: "v1" }` |
|
|
13
|
+
| `GET /v1/widget/config?key=pk_...` | Site form config (projects with price bands, budgets, timings, consent text). Only for the site's allowed origins. Edge-cached 5 min. |
|
|
14
|
+
| `POST /v1/enquiries` | Body `EnquiryCreate` as JSON (`text/plain` is accepted, so browsers skip the CORS preflight). `201 EnquiryCreated`, `422 { error: "validation", fields }`, `403` for other origins or a failed Turnstile check. |
|
|
15
|
+
| `GET\|POST /v1/unsubscribe?t=...` | Signed one-click unsubscribe (Spam Act, RFC 8058). |
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// src/constants.ts
|
|
2
|
+
var API_VERSION = "v1";
|
|
3
|
+
var JOURNEY_MAX_PAGES = 50;
|
|
4
|
+
|
|
5
|
+
// src/client.ts
|
|
6
|
+
var PulseApiError = class extends Error {
|
|
7
|
+
constructor(status, code, fields) {
|
|
8
|
+
super(`Pulse API ${status}: ${code}`);
|
|
9
|
+
this.status = status;
|
|
10
|
+
this.code = code;
|
|
11
|
+
this.fields = fields;
|
|
12
|
+
this.name = "PulseApiError";
|
|
13
|
+
}
|
|
14
|
+
status;
|
|
15
|
+
code;
|
|
16
|
+
fields;
|
|
17
|
+
};
|
|
18
|
+
function createPulseClient(baseUrl, fetchImpl = (...a) => fetch(...a)) {
|
|
19
|
+
const base = `${baseUrl.replace(/\/+$/, "")}/${API_VERSION}`;
|
|
20
|
+
async function call(path, init) {
|
|
21
|
+
const res = await fetchImpl(base + path, { ...init, headers: { accept: "application/json", ...init.headers ?? {} } });
|
|
22
|
+
const body = await res.json().catch(() => ({}));
|
|
23
|
+
if (!res.ok) throw new PulseApiError(res.status, body.error ?? "http_error", body.fields);
|
|
24
|
+
return body;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
getWidgetConfig: (siteKey, init) => call(`/widget/config?key=${encodeURIComponent(siteKey)}`, { method: "GET", signal: init?.signal ?? null }),
|
|
28
|
+
createEnquiry: (body, init) => call("/enquiries", { method: "POST", body: JSON.stringify(body), headers: { "content-type": "text/plain;charset=UTF-8" }, signal: init?.signal ?? null })
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export {
|
|
33
|
+
API_VERSION,
|
|
34
|
+
JOURNEY_MAX_PAGES,
|
|
35
|
+
PulseApiError,
|
|
36
|
+
createPulseClient
|
|
37
|
+
};
|
package/dist/client.d.ts
ADDED
package/dist/client.js
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/** Zod-free constants, safe to import from the browser widget without pulling in zod. */
|
|
4
|
+
declare const API_VERSION: "v1";
|
|
5
|
+
declare const JOURNEY_MAX_PAGES = 50;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @rebirth-wd/shared: the only contract between widget, dashboard and API.
|
|
9
|
+
* Removing or renaming a field, tightening validation or changing a route's shape is a MAJOR bump.
|
|
10
|
+
* Additive optional fields are minor.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
declare const HealthResponse: z.ZodObject<{
|
|
14
|
+
ok: z.ZodLiteral<true>;
|
|
15
|
+
version: z.ZodLiteral<"v1">;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
type HealthResponse = z.infer<typeof HealthResponse>;
|
|
18
|
+
/** Public site key printed in the page that embeds the widget. Not a secret. */
|
|
19
|
+
declare const SiteKey: z.ZodString;
|
|
20
|
+
declare const ProjectOption: z.ZodObject<{
|
|
21
|
+
value: z.ZodString;
|
|
22
|
+
label: z.ZodString;
|
|
23
|
+
priceMin: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
priceMax: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
type ProjectOption = z.infer<typeof ProjectOption>;
|
|
27
|
+
declare const SiteFormConfig: z.ZodObject<{
|
|
28
|
+
projects: z.ZodArray<z.ZodObject<{
|
|
29
|
+
value: z.ZodString;
|
|
30
|
+
label: z.ZodString;
|
|
31
|
+
priceMin: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
priceMax: z.ZodOptional<z.ZodNumber>;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
budgets: z.ZodArray<z.ZodString>;
|
|
35
|
+
timings: z.ZodArray<z.ZodString>;
|
|
36
|
+
reassurance: z.ZodOptional<z.ZodString>;
|
|
37
|
+
thanks: z.ZodOptional<z.ZodObject<{
|
|
38
|
+
title: z.ZodString;
|
|
39
|
+
body: z.ZodString;
|
|
40
|
+
}, z.core.$strip>>;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
type SiteFormConfig = z.infer<typeof SiteFormConfig>;
|
|
43
|
+
/** GET /v1/widget/config?key=pk_... */
|
|
44
|
+
declare const WidgetConfig: z.ZodObject<{
|
|
45
|
+
siteName: z.ZodString;
|
|
46
|
+
privacyUrl: z.ZodString;
|
|
47
|
+
consentText: z.ZodString;
|
|
48
|
+
form: z.ZodObject<{
|
|
49
|
+
projects: z.ZodArray<z.ZodObject<{
|
|
50
|
+
value: z.ZodString;
|
|
51
|
+
label: z.ZodString;
|
|
52
|
+
priceMin: z.ZodOptional<z.ZodNumber>;
|
|
53
|
+
priceMax: z.ZodOptional<z.ZodNumber>;
|
|
54
|
+
}, z.core.$strip>>;
|
|
55
|
+
budgets: z.ZodArray<z.ZodString>;
|
|
56
|
+
timings: z.ZodArray<z.ZodString>;
|
|
57
|
+
reassurance: z.ZodOptional<z.ZodString>;
|
|
58
|
+
thanks: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
title: z.ZodString;
|
|
60
|
+
body: z.ZodString;
|
|
61
|
+
}, z.core.$strip>>;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
turnstileSiteKey: z.ZodNullable<z.ZodString>;
|
|
64
|
+
}, z.core.$strip>;
|
|
65
|
+
type WidgetConfig = z.infer<typeof WidgetConfig>;
|
|
66
|
+
declare const Journey: z.ZodObject<{
|
|
67
|
+
landing: z.ZodOptional<z.ZodString>;
|
|
68
|
+
referrer: z.ZodOptional<z.ZodString>;
|
|
69
|
+
utm: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
70
|
+
device: z.ZodOptional<z.ZodEnum<{
|
|
71
|
+
mobile: "mobile";
|
|
72
|
+
tablet: "tablet";
|
|
73
|
+
desktop: "desktop";
|
|
74
|
+
}>>;
|
|
75
|
+
pages: z.ZodArray<z.ZodObject<{
|
|
76
|
+
path: z.ZodString;
|
|
77
|
+
at: z.ZodNumber;
|
|
78
|
+
}, z.core.$strip>>;
|
|
79
|
+
}, z.core.$strip>;
|
|
80
|
+
type Journey = z.infer<typeof Journey>;
|
|
81
|
+
/** POST /v1/enquiries */
|
|
82
|
+
declare const EnquiryCreate: z.ZodObject<{
|
|
83
|
+
siteKey: z.ZodString;
|
|
84
|
+
project: z.ZodString;
|
|
85
|
+
budget: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
86
|
+
timing: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
87
|
+
suburb: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
88
|
+
name: z.ZodString;
|
|
89
|
+
email: z.ZodString;
|
|
90
|
+
phone: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
91
|
+
message: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
92
|
+
consent: z.ZodLiteral<true>;
|
|
93
|
+
page: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string | undefined, string | undefined>>;
|
|
94
|
+
journey: z.ZodOptional<z.ZodObject<{
|
|
95
|
+
landing: z.ZodOptional<z.ZodString>;
|
|
96
|
+
referrer: z.ZodOptional<z.ZodString>;
|
|
97
|
+
utm: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
98
|
+
device: z.ZodOptional<z.ZodEnum<{
|
|
99
|
+
mobile: "mobile";
|
|
100
|
+
tablet: "tablet";
|
|
101
|
+
desktop: "desktop";
|
|
102
|
+
}>>;
|
|
103
|
+
pages: z.ZodArray<z.ZodObject<{
|
|
104
|
+
path: z.ZodString;
|
|
105
|
+
at: z.ZodNumber;
|
|
106
|
+
}, z.core.$strip>>;
|
|
107
|
+
}, z.core.$strip>>;
|
|
108
|
+
turnstileToken: z.ZodOptional<z.ZodString>;
|
|
109
|
+
company_website: z.ZodOptional<z.ZodString>;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
type EnquiryCreate = z.input<typeof EnquiryCreate>;
|
|
112
|
+
type EnquiryCreateParsed = z.output<typeof EnquiryCreate>;
|
|
113
|
+
declare const EnquiryCreated: z.ZodObject<{
|
|
114
|
+
id: z.ZodString;
|
|
115
|
+
estimate: z.ZodNullable<z.ZodObject<{
|
|
116
|
+
min: z.ZodNumber;
|
|
117
|
+
max: z.ZodNumber;
|
|
118
|
+
}, z.core.$strip>>;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
type EnquiryCreated = z.infer<typeof EnquiryCreated>;
|
|
121
|
+
declare const ENQUIRY_STATUSES: readonly ["new", "contacted", "quoted", "won", "lost"];
|
|
122
|
+
declare const EnquiryStatus: z.ZodEnum<{
|
|
123
|
+
new: "new";
|
|
124
|
+
contacted: "contacted";
|
|
125
|
+
quoted: "quoted";
|
|
126
|
+
won: "won";
|
|
127
|
+
lost: "lost";
|
|
128
|
+
}>;
|
|
129
|
+
type EnquiryStatus = z.infer<typeof EnquiryStatus>;
|
|
130
|
+
declare const ApiError: z.ZodObject<{
|
|
131
|
+
error: z.ZodString;
|
|
132
|
+
fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
133
|
+
}, z.core.$strip>;
|
|
134
|
+
type ApiError = z.infer<typeof ApiError>;
|
|
135
|
+
/** Turns a Zod error into `{ field: message }`, first message per field. */
|
|
136
|
+
declare function fieldErrors(error: z.ZodError): Record<string, string>;
|
|
137
|
+
/** Ballpark range for a project, or null when the business set none. */
|
|
138
|
+
declare function estimateFor(form: SiteFormConfig, project: string): {
|
|
139
|
+
min: number;
|
|
140
|
+
max: number;
|
|
141
|
+
} | null;
|
|
142
|
+
|
|
143
|
+
declare class PulseApiError extends Error {
|
|
144
|
+
status: number;
|
|
145
|
+
code: string;
|
|
146
|
+
fields?: Record<string, string> | undefined;
|
|
147
|
+
constructor(status: number, code: string, fields?: Record<string, string> | undefined);
|
|
148
|
+
}
|
|
149
|
+
interface PulseClient {
|
|
150
|
+
getWidgetConfig(siteKey: string, init?: {
|
|
151
|
+
signal?: AbortSignal;
|
|
152
|
+
}): Promise<WidgetConfig>;
|
|
153
|
+
createEnquiry(body: EnquiryCreate, init?: {
|
|
154
|
+
signal?: AbortSignal;
|
|
155
|
+
}): Promise<EnquiryCreated>;
|
|
156
|
+
}
|
|
157
|
+
/** Tiny fetch client for the v1 API. No runtime validation here, to keep the widget small; the API validates.
|
|
158
|
+
* POST bodies are JSON sent as text/plain: a CORS simple request, so browsers skip the preflight. */
|
|
159
|
+
declare function createPulseClient(baseUrl: string, fetchImpl?: typeof fetch): PulseClient;
|
|
160
|
+
|
|
161
|
+
export { API_VERSION, ApiError, ENQUIRY_STATUSES, EnquiryCreate, EnquiryCreated, EnquiryStatus, HealthResponse, JOURNEY_MAX_PAGES, Journey, ProjectOption, PulseApiError, SiteFormConfig, SiteKey, WidgetConfig, createPulseClient, estimateFor, fieldErrors };
|
|
162
|
+
export type { EnquiryCreateParsed, PulseClient };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import {
|
|
2
|
+
API_VERSION,
|
|
3
|
+
JOURNEY_MAX_PAGES,
|
|
4
|
+
PulseApiError,
|
|
5
|
+
createPulseClient
|
|
6
|
+
} from "./chunk-34FCMAJX.js";
|
|
7
|
+
|
|
8
|
+
// src/index.ts
|
|
9
|
+
import { z } from "zod";
|
|
10
|
+
var HealthResponse = z.object({
|
|
11
|
+
ok: z.literal(true),
|
|
12
|
+
version: z.literal(API_VERSION)
|
|
13
|
+
});
|
|
14
|
+
var SiteKey = z.string().regex(/^pk_[a-z0-9_]{8,64}$/, "invalid site key");
|
|
15
|
+
var ProjectOption = z.object({
|
|
16
|
+
value: z.string().min(1).max(40),
|
|
17
|
+
label: z.string().min(1).max(60),
|
|
18
|
+
/** Ballpark range in whole dollars, from the business's recent jobs. Omit both to show no range. */
|
|
19
|
+
priceMin: z.number().int().nonnegative().optional(),
|
|
20
|
+
priceMax: z.number().int().nonnegative().optional()
|
|
21
|
+
});
|
|
22
|
+
var SiteFormConfig = z.object({
|
|
23
|
+
projects: z.array(ProjectOption).min(1).max(20),
|
|
24
|
+
budgets: z.array(z.string().min(1).max(40)).max(20),
|
|
25
|
+
timings: z.array(z.string().min(1).max(40)).max(20),
|
|
26
|
+
/** Shown under the suburb question, e.g. "Most bathrooms take 3 to 4 weeks." */
|
|
27
|
+
reassurance: z.string().max(200).optional(),
|
|
28
|
+
/** Thank-you heading and body after a successful send. */
|
|
29
|
+
thanks: z.object({ title: z.string().max(80), body: z.string().max(400) }).optional()
|
|
30
|
+
});
|
|
31
|
+
var WidgetConfig = z.object({
|
|
32
|
+
siteName: z.string(),
|
|
33
|
+
privacyUrl: z.string().url(),
|
|
34
|
+
consentText: z.string(),
|
|
35
|
+
form: SiteFormConfig,
|
|
36
|
+
/** When set, the widget must render Turnstile and send its token. */
|
|
37
|
+
turnstileSiteKey: z.string().nullable()
|
|
38
|
+
});
|
|
39
|
+
var Journey = z.object({
|
|
40
|
+
landing: z.string().max(500).optional(),
|
|
41
|
+
referrer: z.string().max(500).optional(),
|
|
42
|
+
utm: z.record(z.string().max(40), z.string().max(200)).optional(),
|
|
43
|
+
device: z.enum(["mobile", "tablet", "desktop"]).optional(),
|
|
44
|
+
pages: z.array(z.object({ path: z.string().max(300), at: z.number().int().nonnegative() })).max(JOURNEY_MAX_PAGES)
|
|
45
|
+
});
|
|
46
|
+
var trimmed = (max) => z.string().trim().max(max);
|
|
47
|
+
var optionalText = (max) => trimmed(max).optional().transform((v) => v ? v : void 0);
|
|
48
|
+
var EnquiryCreate = z.object({
|
|
49
|
+
siteKey: SiteKey,
|
|
50
|
+
project: trimmed(40).min(1, "Choose the type of project."),
|
|
51
|
+
budget: optionalText(40),
|
|
52
|
+
timing: optionalText(40),
|
|
53
|
+
suburb: optionalText(80),
|
|
54
|
+
name: trimmed(100).min(1, "Enter your name."),
|
|
55
|
+
email: z.string().trim().max(200).email("Enter an email address like name@example.com."),
|
|
56
|
+
phone: optionalText(30).refine((v) => !v || /^[+\d][\d\s()-]{7,}$/.test(v), "Enter a phone number, or leave it blank."),
|
|
57
|
+
message: optionalText(3e3),
|
|
58
|
+
/** Must be true. The consent text itself is taken from the site's config on the server. */
|
|
59
|
+
consent: z.literal(true, { error: "Tick the box so we can use your details to reply." }),
|
|
60
|
+
page: optionalText(300),
|
|
61
|
+
journey: Journey.optional(),
|
|
62
|
+
turnstileToken: z.string().max(4096).optional(),
|
|
63
|
+
/** Honeypot. Humans leave it empty. */
|
|
64
|
+
company_website: z.string().max(200).optional()
|
|
65
|
+
});
|
|
66
|
+
var EnquiryCreated = z.object({
|
|
67
|
+
id: z.string().uuid(),
|
|
68
|
+
estimate: z.object({ min: z.number().int(), max: z.number().int() }).nullable()
|
|
69
|
+
});
|
|
70
|
+
var ENQUIRY_STATUSES = ["new", "contacted", "quoted", "won", "lost"];
|
|
71
|
+
var EnquiryStatus = z.enum(ENQUIRY_STATUSES);
|
|
72
|
+
var ApiError = z.object({
|
|
73
|
+
error: z.string(),
|
|
74
|
+
/** Field messages, safe to show to the visitor. */
|
|
75
|
+
fields: z.record(z.string(), z.string()).optional()
|
|
76
|
+
});
|
|
77
|
+
function fieldErrors(error) {
|
|
78
|
+
const out = {};
|
|
79
|
+
for (const issue of error.issues) {
|
|
80
|
+
const key = String(issue.path[0] ?? "_");
|
|
81
|
+
out[key] ??= issue.message;
|
|
82
|
+
}
|
|
83
|
+
return out;
|
|
84
|
+
}
|
|
85
|
+
function estimateFor(form, project) {
|
|
86
|
+
const p = form.projects.find((o) => o.value === project);
|
|
87
|
+
if (!p || p.priceMin == null || p.priceMax == null) return null;
|
|
88
|
+
return { min: p.priceMin, max: p.priceMax };
|
|
89
|
+
}
|
|
90
|
+
export {
|
|
91
|
+
API_VERSION,
|
|
92
|
+
ApiError,
|
|
93
|
+
ENQUIRY_STATUSES,
|
|
94
|
+
EnquiryCreate,
|
|
95
|
+
EnquiryCreated,
|
|
96
|
+
EnquiryStatus,
|
|
97
|
+
HealthResponse,
|
|
98
|
+
JOURNEY_MAX_PAGES,
|
|
99
|
+
Journey,
|
|
100
|
+
ProjectOption,
|
|
101
|
+
PulseApiError,
|
|
102
|
+
SiteFormConfig,
|
|
103
|
+
SiteKey,
|
|
104
|
+
WidgetConfig,
|
|
105
|
+
createPulseClient,
|
|
106
|
+
estimateFor,
|
|
107
|
+
fieldErrors
|
|
108
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rebirth-wd/shared",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Rebirth Pulse API contract: Zod schemas, types and a tiny fetch client for the v1 API.",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./client": {
|
|
13
|
+
"types": "./dist/client.d.ts",
|
|
14
|
+
"import": "./dist/client.js"
|
|
15
|
+
},
|
|
16
|
+
"./package.json": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md",
|
|
21
|
+
"CHANGELOG.md"
|
|
22
|
+
],
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"zod": "^4.6.7"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"eslint": "^10.16.0",
|
|
29
|
+
"typescript": "~6.0.3",
|
|
30
|
+
"vitest": "^5.1.2",
|
|
31
|
+
"tsup": "^9.0.0",
|
|
32
|
+
"@rebirth-wd/eslint-config": "0.0.0",
|
|
33
|
+
"@rebirth-wd/tsconfig": "0.0.0"
|
|
34
|
+
},
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/rebirth-wd/rebirth-pulse.git",
|
|
38
|
+
"directory": "packages/shared"
|
|
39
|
+
},
|
|
40
|
+
"homepage": "https://github.com/rebirth-wd/rebirth-pulse/tree/main/packages/shared#readme",
|
|
41
|
+
"publishConfig": {
|
|
42
|
+
"access": "public",
|
|
43
|
+
"provenance": true
|
|
44
|
+
},
|
|
45
|
+
"scripts": {
|
|
46
|
+
"build": "tsup src/index.ts src/client.ts --format esm --dts --clean",
|
|
47
|
+
"lint": "eslint .",
|
|
48
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
49
|
+
"test": "vitest run"
|
|
50
|
+
}
|
|
6
51
|
}
|