@ycadence/sdk 0.0.0-stage → 0.2.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.
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Every API operation the client calls, in one table.
3
+ *
4
+ * The client builds each request from this table rather than from a path
5
+ * written inline in a method, so there is one place to compare with the
6
+ * server: `apps/web/lib/api/sdk-contract.test.ts` fails when an entry has no
7
+ * matching route contract (unless it is marked `pending`), and the CLI's
8
+ * reference and `--dry-run` name operations by these ids.
9
+ */
10
+ export type HttpMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE';
11
+ export interface Operation {
12
+ method: HttpMethod;
13
+ /** The route contract's path, with `{param}` placeholders. */
14
+ path: string;
15
+ /**
16
+ * Planned by the work management contracts and not served yet. The client
17
+ * still calls it; a 404 from an older server is reported as such.
18
+ */
19
+ pending?: string;
20
+ }
21
+ export declare const OPERATIONS: {
22
+ readonly health: {
23
+ readonly method: 'GET';
24
+ readonly path: '/api/health';
25
+ };
26
+ readonly me: {
27
+ readonly method: 'GET';
28
+ readonly path: '/api/v1/me';
29
+ };
30
+ readonly listProjects: {
31
+ readonly method: 'GET';
32
+ readonly path: '/api/v1/projects';
33
+ };
34
+ readonly listWorkItems: {
35
+ readonly method: 'GET';
36
+ readonly path: '/api/v1/projects/{projectId}/work-items';
37
+ };
38
+ readonly createWorkItem: {
39
+ readonly method: 'POST';
40
+ readonly path: '/api/v1/projects/{projectId}/work-items';
41
+ };
42
+ readonly getWorkItem: {
43
+ readonly method: 'GET';
44
+ readonly path: '/api/v1/work-items/{workItemId}';
45
+ };
46
+ readonly updateWorkItem: {
47
+ readonly method: 'PATCH';
48
+ readonly path: '/api/v1/work-items/{workItemId}';
49
+ };
50
+ readonly deleteWorkItem: {
51
+ readonly method: 'DELETE';
52
+ readonly path: '/api/v1/work-items/{workItemId}';
53
+ };
54
+ readonly listStates: {
55
+ readonly method: 'GET';
56
+ readonly path: '/api/v1/projects/{projectId}/states';
57
+ };
58
+ readonly listLabels: {
59
+ readonly method: 'GET';
60
+ readonly path: '/api/v1/projects/{projectId}/labels';
61
+ };
62
+ readonly createLabel: {
63
+ readonly method: 'POST';
64
+ readonly path: '/api/v1/projects/{projectId}/labels';
65
+ };
66
+ readonly listTypes: {
67
+ readonly method: 'GET';
68
+ readonly path: '/api/v1/projects/{projectId}/types';
69
+ };
70
+ readonly listCycles: {
71
+ readonly method: 'GET';
72
+ readonly path: '/api/v1/projects/{projectId}/cycles';
73
+ };
74
+ readonly createCycle: {
75
+ readonly method: 'POST';
76
+ readonly path: '/api/v1/projects/{projectId}/cycles';
77
+ };
78
+ readonly getCycleProgress: {
79
+ readonly method: 'GET';
80
+ readonly path: '/api/v1/cycles/{cycleId}/progress';
81
+ };
82
+ readonly addWorkItemsToCycle: {
83
+ readonly method: 'POST';
84
+ readonly path: '/api/v1/cycles/{cycleId}/work-items';
85
+ };
86
+ readonly listViews: {
87
+ readonly method: 'GET';
88
+ readonly path: '/api/v1/projects/{projectId}/views';
89
+ };
90
+ readonly createView: {
91
+ readonly method: 'POST';
92
+ readonly path: '/api/v1/projects/{projectId}/views';
93
+ };
94
+ readonly listIntake: {
95
+ readonly method: 'GET';
96
+ readonly path: '/api/v1/projects/{projectId}/intake';
97
+ };
98
+ readonly submitIntake: {
99
+ readonly method: 'POST';
100
+ readonly path: '/api/v1/projects/{projectId}/intake';
101
+ };
102
+ readonly triageIntake: {
103
+ readonly method: 'POST';
104
+ readonly path: '/api/v1/intake-items/{intakeItemId}/triage';
105
+ };
106
+ readonly previewImport: {
107
+ readonly method: 'POST';
108
+ readonly path: '/api/v1/projects/{projectId}/imports/preview';
109
+ };
110
+ readonly startImport: {
111
+ readonly method: 'POST';
112
+ readonly path: '/api/v1/projects/{projectId}/imports';
113
+ };
114
+ readonly listImports: {
115
+ readonly method: 'GET';
116
+ readonly path: '/api/v1/projects/{projectId}/imports';
117
+ };
118
+ readonly getImport: {
119
+ readonly method: 'GET';
120
+ readonly path: '/api/v1/imports/{runId}';
121
+ };
122
+ };
123
+ export type OperationId = keyof typeof OPERATIONS;
124
+ /** GET and HEAD are safe to repeat; anything else needs an idempotency key first. */
125
+ export declare function isIdempotentMethod(method: string): boolean;
126
+ /** Fill `{param}` placeholders, encoding each value. */
127
+ export declare function buildPath(template: string, params?: Record<string, string>): string;
128
+ //# sourceMappingURL=operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../src/operations.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAA;AAEpE,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,UAAU,CAAA;IAClB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,eAAO,MAAM,UAAU;;iBACX,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,aAAa;;;iBACtC,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,YAAY;;;iBACvB,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,kBAAkB;;;iBAEtC,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,yCAAyC;;;iBAC7D,MAAM,EAAE,MAAM;iBAAE,IAAI,EAAE,yCAAyC;;;iBAClE,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,iCAAiC;;;iBACnD,MAAM,EAAE,OAAO;iBAAE,IAAI,EAAE,iCAAiC;;;iBACxD,MAAM,EAAE,QAAQ;iBAAE,IAAI,EAAE,iCAAiC;;;iBAE7D,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,qCAAqC;;;iBAC1D,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,qCAAqC;;;iBACzD,MAAM,EAAE,MAAM;iBAAE,IAAI,EAAE,qCAAqC;;;iBAC7D,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,oCAAoC;;;iBAExD,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,qCAAqC;;;iBACzD,MAAM,EAAE,MAAM;iBAAE,IAAI,EAAE,qCAAqC;;;iBACtD,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,mCAAmC;;;iBACrD,MAAM,EAAE,MAAM;iBAAE,IAAI,EAAE,qCAAqC;;;iBAErE,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,oCAAoC;;;iBACxD,MAAM,EAAE,MAAM;iBAAE,IAAI,EAAE,oCAAoC;;;iBAE1D,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,qCAAqC;;;iBACxD,MAAM,EAAE,MAAM;iBAAE,IAAI,EAAE,qCAAqC;;;iBAC3D,MAAM,EAAE,MAAM;iBAAE,IAAI,EAAE,4CAA4C;;;iBAEjE,MAAM,EAAE,MAAM;iBAAE,IAAI,EAAE,8CAA8C;;;iBACtE,MAAM,EAAE,MAAM;iBAAE,IAAI,EAAE,sCAAsC;;;iBAC5D,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,sCAAsC;;;iBAC7D,MAAM,EAAE,KAAK;iBAAE,IAAI,EAAE,yBAAyB;;CACf,CAAA;AAE9C,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,UAAU,CAAA;AAEjD,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAE1D;AAED,wDAAwD;AACxD,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,GAAG,MAAM,CAQvF"}
@@ -0,0 +1,13 @@
1
+ import type { Page } from './types';
2
+ /**
3
+ * Follow `nextCursor` to the end, one page at a time.
4
+ *
5
+ * Lazy: a caller that breaks out early pays for the pages it read and no more.
6
+ */
7
+ export declare function paginate<T>(fetchPage: (cursor: string | undefined) => Promise<Page<T>>, options?: {
8
+ cursor?: string;
9
+ maxItems?: number;
10
+ }): AsyncGenerator<T>;
11
+ /** Every item from {@link paginate}, as an array, up to `maxItems`. */
12
+ export declare function collect<T>(iterable: AsyncIterable<T>, maxItems?: number): Promise<T[]>;
13
+ //# sourceMappingURL=pagination.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../src/pagination.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAEnC;;;;GAIG;AACH,wBAAuB,QAAQ,CAAC,CAAC,EAC/B,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAC3D,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO,GACnD,cAAc,CAAC,CAAC,CAAC,CAYnB;AAED,uEAAuE;AACvE,wBAAsB,OAAO,CAAC,CAAC,EAC7B,QAAQ,EAAE,aAAa,CAAC,CAAC,CAAC,EAC1B,QAAQ,SAA2B,GAClC,OAAO,CAAC,CAAC,EAAE,CAAC,CAOd"}
@@ -0,0 +1,280 @@
1
+ /**
2
+ * Request and response shapes of the v1 API, as they arrive over JSON.
3
+ *
4
+ * The routes define these with zod in `apps/web` (`lib/api/contracts.ts` and
5
+ * the route files). The SDK is published without dependencies, so it cannot
6
+ * import those schemas; instead each response type has a field list below that
7
+ * the compiler checks against the type, and `apps/web/lib/api/sdk-contract.test.ts`
8
+ * checks against the route's zod schema. A field added on one side and not the
9
+ * other fails that test rather than reaching a user.
10
+ *
11
+ * Dates are ISO strings: that is what JSON carries.
12
+ */
13
+ export type Priority = 'urgent' | 'high' | 'medium' | 'low' | 'none';
14
+ export declare const PRIORITIES: readonly Priority[];
15
+ export type StateGroup = 'backlog' | 'unstarted' | 'started' | 'completed' | 'cancelled' | 'triage';
16
+ export interface WorkItem {
17
+ id: string;
18
+ key: string;
19
+ sequenceId: number;
20
+ name: string;
21
+ priority: Priority;
22
+ stateId: string | null;
23
+ assigneeIds: string[];
24
+ labelIds: string[];
25
+ parentId: string | null;
26
+ sortOrder: string;
27
+ createdAt: string;
28
+ /**
29
+ * Returned by `GET /work-items/{id}` (always, from Slice 2A on); not yet by
30
+ * lists or writes.
31
+ */
32
+ projectId?: string;
33
+ /** Not returned yet. Sent back as `If-Match` once the server versions items. */
34
+ version?: number;
35
+ }
36
+ export interface WorkItemDetail extends WorkItem {
37
+ /** Optional only so the SDK still reads a server older than Slice 2A. */
38
+ projectId?: string;
39
+ description: string | null;
40
+ startDate: string | null;
41
+ targetDate: string | null;
42
+ archivedAt: string | null;
43
+ updatedAt: string;
44
+ }
45
+ export interface Page<T> {
46
+ items: T[];
47
+ nextCursor: string | null;
48
+ }
49
+ export interface CreateWorkItemInput {
50
+ name: string;
51
+ description?: string;
52
+ stateId?: string;
53
+ priority?: Priority;
54
+ assigneeIds?: string[];
55
+ labelIds?: string[];
56
+ parentId?: string;
57
+ /** ISO date. */
58
+ startDate?: string;
59
+ targetDate?: string;
60
+ }
61
+ /**
62
+ * The fields PATCH accepts today. The server strips anything else, so sending
63
+ * an unlisted field would look like success and change nothing.
64
+ */
65
+ export interface UpdateWorkItemInput {
66
+ name?: string;
67
+ description?: string;
68
+ stateId?: string;
69
+ priority?: Priority;
70
+ parentId?: string | null;
71
+ startDate?: string | null;
72
+ targetDate?: string | null;
73
+ }
74
+ export interface ListWorkItemsOptions {
75
+ /** A @devpulse/query expression; sent JSON-encoded as `filter`. */
76
+ filter?: unknown;
77
+ limit?: number;
78
+ cursor?: string;
79
+ /** A state id. */
80
+ state?: string;
81
+ priority?: Priority;
82
+ }
83
+ export interface State {
84
+ id: string;
85
+ name: string;
86
+ group: StateGroup | string;
87
+ color: string;
88
+ description: string | null;
89
+ /** Fractional-index sort key; the list arrives already ordered by it. */
90
+ sequence: string;
91
+ isDefault: boolean;
92
+ }
93
+ export interface Label {
94
+ id: string;
95
+ name: string;
96
+ color: string;
97
+ description: string | null;
98
+ sortOrder: string;
99
+ }
100
+ export interface Cycle {
101
+ id: string;
102
+ name: string;
103
+ description: string | null;
104
+ startDate: string | null;
105
+ endDate: string | null;
106
+ status: 'draft' | 'upcoming' | 'active' | 'completed';
107
+ sortOrder: string;
108
+ completedAt: string | null;
109
+ archivedAt: string | null;
110
+ }
111
+ export interface CycleProgress {
112
+ progress: unknown;
113
+ burndown: unknown;
114
+ frozen: boolean;
115
+ }
116
+ export interface View {
117
+ id: string;
118
+ name: string;
119
+ description: string | null;
120
+ filter: unknown;
121
+ display: unknown;
122
+ access: 'private' | 'public';
123
+ ownerId: string | null;
124
+ sortOrder: string;
125
+ }
126
+ export interface CreateViewInput {
127
+ name: string;
128
+ description?: string;
129
+ where?: unknown;
130
+ display?: Record<string, unknown>;
131
+ access?: 'private' | 'public';
132
+ }
133
+ export type IntakeStatus = 'pending' | 'accepted' | 'declined' | 'snoozed' | 'duplicate';
134
+ export interface IntakeItem {
135
+ id: string;
136
+ workItemId: string;
137
+ status: IntakeStatus;
138
+ source: string;
139
+ sourceEmail: string | null;
140
+ snoozedUntil: string | null;
141
+ submittedAt: string;
142
+ }
143
+ export interface SubmitIntakeInput {
144
+ title: string;
145
+ description?: string;
146
+ source?: 'in_app' | 'form' | 'email' | 'api' | 'integration';
147
+ sourceEmail?: string;
148
+ extra?: Record<string, unknown>;
149
+ }
150
+ export interface SubmitIntakeResult {
151
+ intakeItemId: string;
152
+ workItemId: string;
153
+ sequenceId: number;
154
+ }
155
+ export interface TriageInput {
156
+ status: 'accepted' | 'declined' | 'snoozed' | 'duplicate';
157
+ /** ISO date; required when snoozing. */
158
+ snoozedUntil?: string;
159
+ /** Required when marking a duplicate. */
160
+ duplicateOfId?: string;
161
+ }
162
+ export interface TriageResult {
163
+ status: string;
164
+ movedToStateId: string | null;
165
+ }
166
+ export interface ImportPreview {
167
+ source: string;
168
+ total: number;
169
+ states: {
170
+ name: string;
171
+ suggestedStateId: string | null;
172
+ }[];
173
+ labels: {
174
+ name: string;
175
+ exists: boolean;
176
+ }[];
177
+ assignees: {
178
+ value: string;
179
+ matched: boolean;
180
+ }[];
181
+ skipped: {
182
+ row: number;
183
+ reason: string;
184
+ }[];
185
+ unmappedPriorities: string[];
186
+ /**
187
+ * False when re-importing would create duplicates rather than update — a CSV
188
+ * with no id column. Worth showing before the import, not after.
189
+ */
190
+ idempotent: boolean;
191
+ }
192
+ export interface ImportRun {
193
+ id: string;
194
+ source: string;
195
+ status: string;
196
+ totalItems: number;
197
+ createdCount: number;
198
+ updatedCount: number;
199
+ cursor: number;
200
+ skipped: {
201
+ row: number;
202
+ reason: string;
203
+ }[];
204
+ unmatched: {
205
+ kind: string;
206
+ value: string;
207
+ item: string;
208
+ }[];
209
+ error: string | null;
210
+ startedAt?: string | null;
211
+ finishedAt?: string | null;
212
+ createdAt?: string;
213
+ }
214
+ export type ImportSource = 'csv' | 'github' | 'jira' | 'linear';
215
+ export interface ImportInput {
216
+ source: ImportSource;
217
+ /** CSV text, or the parsed JSON export for the API sources. */
218
+ data: unknown;
219
+ repository?: string;
220
+ baseUrl?: string;
221
+ /** Source state name to state id. Only for `startImport`. */
222
+ stateMap?: Record<string, string>;
223
+ }
224
+ export interface Health {
225
+ status: string;
226
+ checks: Record<string, string>;
227
+ }
228
+ /** `GET /api/v1/me`: who the credential is. Never includes the key. */
229
+ export interface Me {
230
+ principal: {
231
+ kind: 'personal_key' | 'service_key' | string;
232
+ scopeType?: 'project' | 'organization' | 'personal' | string;
233
+ apiKeyId: string;
234
+ keyPrefix: string;
235
+ userId: string | null;
236
+ email: string | null;
237
+ organizationRole?: string | null;
238
+ };
239
+ organization: {
240
+ id: string;
241
+ slug: string;
242
+ name: string;
243
+ };
244
+ project: {
245
+ id: string;
246
+ identifier: string;
247
+ name: string;
248
+ } | null;
249
+ scopes: string[];
250
+ expiresAt: string | null;
251
+ }
252
+ /** `GET /api/v1/projects`. */
253
+ export interface Project {
254
+ id: string;
255
+ identifier: string;
256
+ name: string;
257
+ archivedAt: string | null;
258
+ }
259
+ /**
260
+ * Field lists, checked by the compiler to name every key of the type (and no
261
+ * others), and by the contract test to match the route's response schema.
262
+ */
263
+ type FieldsOf<T> = {
264
+ [K in keyof Required<T>]: true;
265
+ };
266
+ export declare const WORK_ITEM_FIELDS: FieldsOf<WorkItem>;
267
+ export declare const WORK_ITEM_DETAIL_FIELDS: FieldsOf<WorkItemDetail>;
268
+ export declare const STATE_FIELDS: FieldsOf<State>;
269
+ export declare const LABEL_FIELDS: FieldsOf<Label>;
270
+ export declare const CYCLE_FIELDS: FieldsOf<Cycle>;
271
+ export declare const VIEW_FIELDS: FieldsOf<View>;
272
+ export declare const INTAKE_ITEM_FIELDS: FieldsOf<IntakeItem>;
273
+ export declare const IMPORT_RUN_FIELDS: FieldsOf<ImportRun>;
274
+ /**
275
+ * Fields the SDK declares ahead of the server (the work management contracts
276
+ * add them). The contract test allows them to be missing from today's schemas.
277
+ */
278
+ export declare const PENDING_FIELDS: Record<string, readonly string[]>;
279
+ export {};
280
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAA;AACpE,eAAO,MAAM,UAAU,EAAE,SAAS,QAAQ,EAAgD,CAAA;AAE1F,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,WAAW,GAAG,WAAW,GAAG,QAAQ,CAAA;AAEnG,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAA;IACV,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI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,QAAQ,CAAC,IAAI,CAStC,CAAA;AAED,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,UAAU,CAQnD,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,SAAS,CAcjD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAE5D,CAAA"}
@@ -0,0 +1,2 @@
1
+ export declare const SDK_VERSION: string;
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,WAAW,EAAE,MAC6D,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,55 @@
1
1
  {
2
2
  "name": "@ycadence/sdk",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.0",
4
+ "description": "TypeScript client for the YCadence API.",
5
+ "keywords": [
6
+ "ycadence",
7
+ "project-management",
8
+ "issue-tracker",
9
+ "api-client",
10
+ "sdk"
11
+ ],
12
+ "license": "Apache-2.0",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/YarlisAISolutions/dev-pulse.git",
16
+ "directory": "packages/sdk"
17
+ },
18
+ "homepage": "https://github.com/YarlisAISolutions/dev-pulse/tree/main/packages/sdk#readme",
19
+ "bugs": {
20
+ "url": "https://github.com/YarlisAISolutions/dev-pulse/issues"
21
+ },
22
+ "type": "module",
23
+ "exports": {
24
+ ".": {
25
+ "ycadence-source": "./src/index.ts",
26
+ "types": "./dist/index.d.ts",
27
+ "bun": "./src/index.ts",
28
+ "import": "./dist/index.js",
29
+ "default": "./dist/index.js"
30
+ },
31
+ "./package.json": "./package.json"
32
+ },
33
+ "main": "./dist/index.js",
34
+ "types": "./dist/index.d.ts",
35
+ "files": [
36
+ "dist",
37
+ "src",
38
+ "!src/**/*.test.ts",
39
+ "README.md",
40
+ "LICENSE"
41
+ ],
42
+ "engines": {
43
+ "node": ">=18"
44
+ },
45
+ "publishConfig": {
46
+ "access": "public",
47
+ "provenance": false
48
+ },
49
+ "scripts": {
50
+ "build": "rm -rf dist && bun build src/index.ts --outdir dist --target node --format esm --sourcemap=linked --define __YCADENCE_SDK_VERSION__=\\\"$(node -p \"require('./package.json').version\")\\\" && tsc -p tsconfig.build.json",
51
+ "prepack": "cp ../../LICENSE LICENSE && bun run build",
52
+ "type-check": "tsc --noEmit",
53
+ "test": "vitest run"
54
+ }
55
+ }