@depup/vercel 50.32.5-depup.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.
Files changed (96) hide show
  1. package/LICENSE +202 -0
  2. package/README.md +38 -0
  3. package/changes.json +38 -0
  4. package/dist/chunks/chunk-2DLBVZWU.js +197 -0
  5. package/dist/chunks/chunk-2HSQ7YUK.js +93 -0
  6. package/dist/chunks/chunk-2IQTNMUG.js +86 -0
  7. package/dist/chunks/chunk-3FRG2XGZ.js +466 -0
  8. package/dist/chunks/chunk-3KMKI2FP.js +34 -0
  9. package/dist/chunks/chunk-3XFFP2BA.js +110 -0
  10. package/dist/chunks/chunk-4S3Y3ATR.js +5383 -0
  11. package/dist/chunks/chunk-7EHTK7LP.js +359 -0
  12. package/dist/chunks/chunk-7YHZDJ4G.js +116 -0
  13. package/dist/chunks/chunk-A3NYPUKZ.js +17 -0
  14. package/dist/chunks/chunk-AA7QEJFB.js +5204 -0
  15. package/dist/chunks/chunk-AHU7WNL2.js +24 -0
  16. package/dist/chunks/chunk-AKQZ7KG3.js +4172 -0
  17. package/dist/chunks/chunk-AQLVWVEN.js +39155 -0
  18. package/dist/chunks/chunk-BQ3DXZNT.js +968 -0
  19. package/dist/chunks/chunk-E65JE2CC.js +102 -0
  20. package/dist/chunks/chunk-EKPSCRJZ.js +26 -0
  21. package/dist/chunks/chunk-EOZFDJSY.js +18 -0
  22. package/dist/chunks/chunk-FDJURQMQ.js +4676 -0
  23. package/dist/chunks/chunk-FLKHKWZV.js +1854 -0
  24. package/dist/chunks/chunk-G6BUEBF5.js +192 -0
  25. package/dist/chunks/chunk-GBNIO3KP.js +771 -0
  26. package/dist/chunks/chunk-GGP5R3FU.js +129 -0
  27. package/dist/chunks/chunk-H5XJSH37.js +91 -0
  28. package/dist/chunks/chunk-IB5L4LKZ.js +1082 -0
  29. package/dist/chunks/chunk-IE7MNZ56.js +149 -0
  30. package/dist/chunks/chunk-IK7DLK2T.js +16112 -0
  31. package/dist/chunks/chunk-IUGPWINM.js +104 -0
  32. package/dist/chunks/chunk-J7HDA5GH.js +54 -0
  33. package/dist/chunks/chunk-JLYZNGYY.js +293 -0
  34. package/dist/chunks/chunk-JQ4NA5MX.js +250 -0
  35. package/dist/chunks/chunk-LL26LVRR.js +81 -0
  36. package/dist/chunks/chunk-LW5ZNGW7.js +127 -0
  37. package/dist/chunks/chunk-LWBSOTJP.js +1772 -0
  38. package/dist/chunks/chunk-MBGJBHYD.js +388 -0
  39. package/dist/chunks/chunk-NUKAG3YM.js +168 -0
  40. package/dist/chunks/chunk-O7I4ZOCC.js +58 -0
  41. package/dist/chunks/chunk-OWR3XNE3.js +48 -0
  42. package/dist/chunks/chunk-P3SKP5WM.js +27 -0
  43. package/dist/chunks/chunk-P4I4DMEU.js +342 -0
  44. package/dist/chunks/chunk-P5Q6F5IA.js +107 -0
  45. package/dist/chunks/chunk-PMSMUMUO.js +30 -0
  46. package/dist/chunks/chunk-QXRJ52T4.js +2977 -0
  47. package/dist/chunks/chunk-RQXPRFRM.js +90 -0
  48. package/dist/chunks/chunk-S7KYDPEM.js +1564 -0
  49. package/dist/chunks/chunk-SGGLJFUZ.js +68 -0
  50. package/dist/chunks/chunk-SOTR4CXR.js +34 -0
  51. package/dist/chunks/chunk-TEVP63TU.js +1717 -0
  52. package/dist/chunks/chunk-TNBMKNET.js +323 -0
  53. package/dist/chunks/chunk-TZ2YI2VH.js +87 -0
  54. package/dist/chunks/chunk-U6XOC6E4.js +903 -0
  55. package/dist/chunks/chunk-V5P25P7F.js +22 -0
  56. package/dist/chunks/chunk-WQ5CUZWR.js +333 -0
  57. package/dist/chunks/chunk-WU2BPWRP.js +12237 -0
  58. package/dist/chunks/chunk-XPKWKPWA.js +44 -0
  59. package/dist/chunks/chunk-XR53KVJD.js +33 -0
  60. package/dist/chunks/chunk-Y4JJYHUG.js +16 -0
  61. package/dist/chunks/chunk-YPQSDAEW.js +29 -0
  62. package/dist/chunks/chunk-ZB2UO4V2.js +135 -0
  63. package/dist/chunks/chunk-ZLCMHY2G.js +1528 -0
  64. package/dist/chunks/compile-vercel-config-XU3YY2CZ.js +32 -0
  65. package/dist/chunks/delete-EJ2V7KQO.js +144 -0
  66. package/dist/chunks/disable-BKRFMX4U.js +122 -0
  67. package/dist/chunks/discard-4WF34DXK.js +118 -0
  68. package/dist/chunks/edit-FQE7JGU3.js +509 -0
  69. package/dist/chunks/emit-flags-datafiles-QYKPNWPX.js +17 -0
  70. package/dist/chunks/enable-VCNMX63U.js +122 -0
  71. package/dist/chunks/export-3KNVJCQR.js +133 -0
  72. package/dist/chunks/list-43XQCGKH.js +382 -0
  73. package/dist/chunks/list-DUL6PHUR.js +394 -0
  74. package/dist/chunks/publish-CF7GVZK3.js +128 -0
  75. package/dist/chunks/query-KWKO7VWO.js +954 -0
  76. package/dist/chunks/reorder-GU65YMIN.js +259 -0
  77. package/dist/chunks/restore-Q7ENGWVJ.js +158 -0
  78. package/dist/chunks/routes-Q5CWG44T.js +20 -0
  79. package/dist/chunks/schema-PJKLO2K2.js +176 -0
  80. package/dist/chunks/stamp-RTPE2EBB.js +15 -0
  81. package/dist/chunks/types-563KUQRV.js +108 -0
  82. package/dist/chunks/update-route-version-E3V47KNI.js +13 -0
  83. package/dist/commands/build/index.js +1597 -0
  84. package/dist/commands/deploy/index.js +1711 -0
  85. package/dist/commands/dev/builder-worker.cjs +95 -0
  86. package/dist/commands/dev/index.js +20810 -0
  87. package/dist/commands/env/index.js +2154 -0
  88. package/dist/commands/link/index.js +225 -0
  89. package/dist/commands/list/index.js +528 -0
  90. package/dist/commands-bulk.js +29627 -0
  91. package/dist/get-latest-worker.cjs +272 -0
  92. package/dist/help.js +14 -0
  93. package/dist/index.js +24274 -0
  94. package/dist/vc.js +36 -0
  95. package/dist/version.mjs +1 -0
  96. package/package.json +254 -0
@@ -0,0 +1,466 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import {
8
+ TelemetryClient
9
+ } from "./chunk-P4I4DMEU.js";
10
+
11
+ // src/util/telemetry/commands/routes/index.ts
12
+ var RoutesTelemetryClient = class extends TelemetryClient {
13
+ trackCliSubcommandList(actual) {
14
+ this.trackCliSubcommand({
15
+ subcommand: "list",
16
+ value: actual
17
+ });
18
+ }
19
+ trackCliSubcommandListVersions(actual) {
20
+ this.trackCliSubcommand({
21
+ subcommand: "list-versions",
22
+ value: actual
23
+ });
24
+ }
25
+ trackCliSubcommandInspect(actual) {
26
+ this.trackCliSubcommand({
27
+ subcommand: "inspect",
28
+ value: actual
29
+ });
30
+ }
31
+ trackCliSubcommandAdd(actual) {
32
+ this.trackCliSubcommand({
33
+ subcommand: "add",
34
+ value: actual
35
+ });
36
+ }
37
+ trackCliSubcommandPublish(actual) {
38
+ this.trackCliSubcommand({
39
+ subcommand: "publish",
40
+ value: actual
41
+ });
42
+ }
43
+ trackCliSubcommandRestore(actual) {
44
+ this.trackCliSubcommand({
45
+ subcommand: "restore",
46
+ value: actual
47
+ });
48
+ }
49
+ trackCliSubcommandDiscardStaging(actual) {
50
+ this.trackCliSubcommand({
51
+ subcommand: "discard-staging",
52
+ value: actual
53
+ });
54
+ }
55
+ trackCliSubcommandDelete(actual) {
56
+ this.trackCliSubcommand({
57
+ subcommand: "delete",
58
+ value: actual
59
+ });
60
+ }
61
+ trackCliSubcommandExport(actual) {
62
+ this.trackCliSubcommand({
63
+ subcommand: "export",
64
+ value: actual
65
+ });
66
+ }
67
+ trackCliSubcommandEnable(actual) {
68
+ this.trackCliSubcommand({
69
+ subcommand: "enable",
70
+ value: actual
71
+ });
72
+ }
73
+ trackCliSubcommandDisable(actual) {
74
+ this.trackCliSubcommand({
75
+ subcommand: "disable",
76
+ value: actual
77
+ });
78
+ }
79
+ trackCliSubcommandReorder(actual) {
80
+ this.trackCliSubcommand({
81
+ subcommand: "reorder",
82
+ value: actual
83
+ });
84
+ }
85
+ trackCliSubcommandEdit(actual) {
86
+ this.trackCliSubcommand({
87
+ subcommand: "edit",
88
+ value: actual
89
+ });
90
+ }
91
+ };
92
+ var RoutesAddTelemetryClient = class extends TelemetryClient {
93
+ // Argument tracking
94
+ trackCliArgumentName(name) {
95
+ if (name) {
96
+ this.trackCliArgument({
97
+ arg: "name",
98
+ value: this.redactedValue
99
+ });
100
+ }
101
+ }
102
+ // Flag tracking
103
+ trackCliFlagYes(flag) {
104
+ if (flag) {
105
+ this.trackCliFlag("yes");
106
+ }
107
+ }
108
+ trackCliFlagDisabled(flag) {
109
+ if (flag) {
110
+ this.trackCliFlag("disabled");
111
+ }
112
+ }
113
+ // Option tracking
114
+ trackCliOptionSrc(src) {
115
+ if (src) {
116
+ this.trackCliOption({
117
+ option: "src",
118
+ value: this.redactedValue
119
+ });
120
+ }
121
+ }
122
+ trackCliOptionSrcSyntax(syntax) {
123
+ if (syntax) {
124
+ this.trackCliOption({
125
+ option: "src-syntax",
126
+ value: syntax
127
+ });
128
+ }
129
+ }
130
+ trackCliOptionAction(action) {
131
+ if (action) {
132
+ this.trackCliOption({
133
+ option: "action",
134
+ value: action
135
+ });
136
+ }
137
+ }
138
+ trackCliOptionDest(dest) {
139
+ if (dest) {
140
+ this.trackCliOption({
141
+ option: "dest",
142
+ value: this.redactedValue
143
+ });
144
+ }
145
+ }
146
+ trackCliOptionStatus(status) {
147
+ if (status !== void 0) {
148
+ this.trackCliOption({
149
+ option: "status",
150
+ value: String(status)
151
+ });
152
+ }
153
+ }
154
+ trackCliOptionPosition(position) {
155
+ if (position) {
156
+ const placement = position.split(":")[0];
157
+ this.trackCliOption({
158
+ option: "position",
159
+ value: placement
160
+ });
161
+ }
162
+ }
163
+ trackCliOptionDescription(description) {
164
+ if (description) {
165
+ this.trackCliOption({
166
+ option: "description",
167
+ value: this.redactedValue
168
+ });
169
+ }
170
+ }
171
+ // Response header options
172
+ trackCliOptionSetResponseHeader(headers) {
173
+ if (headers && headers.length > 0) {
174
+ this.trackCliOption({
175
+ option: "set-response-header",
176
+ value: this.redactedValue
177
+ });
178
+ }
179
+ }
180
+ trackCliOptionAppendResponseHeader(headers) {
181
+ if (headers && headers.length > 0) {
182
+ this.trackCliOption({
183
+ option: "append-response-header",
184
+ value: this.redactedValue
185
+ });
186
+ }
187
+ }
188
+ trackCliOptionDeleteResponseHeader(headers) {
189
+ if (headers && headers.length > 0) {
190
+ this.trackCliOption({
191
+ option: "delete-response-header",
192
+ value: this.redactedValue
193
+ });
194
+ }
195
+ }
196
+ // Request header options
197
+ trackCliOptionSetRequestHeader(headers) {
198
+ if (headers && headers.length > 0) {
199
+ this.trackCliOption({
200
+ option: "set-request-header",
201
+ value: this.redactedValue
202
+ });
203
+ }
204
+ }
205
+ trackCliOptionAppendRequestHeader(headers) {
206
+ if (headers && headers.length > 0) {
207
+ this.trackCliOption({
208
+ option: "append-request-header",
209
+ value: this.redactedValue
210
+ });
211
+ }
212
+ }
213
+ trackCliOptionDeleteRequestHeader(headers) {
214
+ if (headers && headers.length > 0) {
215
+ this.trackCliOption({
216
+ option: "delete-request-header",
217
+ value: this.redactedValue
218
+ });
219
+ }
220
+ }
221
+ // Request query options
222
+ trackCliOptionSetRequestQuery(params) {
223
+ if (params && params.length > 0) {
224
+ this.trackCliOption({
225
+ option: "set-request-query",
226
+ value: this.redactedValue
227
+ });
228
+ }
229
+ }
230
+ trackCliOptionAppendRequestQuery(params) {
231
+ if (params && params.length > 0) {
232
+ this.trackCliOption({
233
+ option: "append-request-query",
234
+ value: this.redactedValue
235
+ });
236
+ }
237
+ }
238
+ trackCliOptionDeleteRequestQuery(params) {
239
+ if (params && params.length > 0) {
240
+ this.trackCliOption({
241
+ option: "delete-request-query",
242
+ value: this.redactedValue
243
+ });
244
+ }
245
+ }
246
+ // Condition options
247
+ trackCliOptionHas(conditions) {
248
+ if (conditions && conditions.length > 0) {
249
+ this.trackCliOption({
250
+ option: "has",
251
+ value: this.redactedValue
252
+ });
253
+ }
254
+ }
255
+ trackCliOptionMissing(conditions) {
256
+ if (conditions && conditions.length > 0) {
257
+ this.trackCliOption({
258
+ option: "missing",
259
+ value: this.redactedValue
260
+ });
261
+ }
262
+ }
263
+ trackCliOptionAi(prompt) {
264
+ if (prompt) {
265
+ this.trackCliOption({
266
+ option: "ai",
267
+ value: this.redactedValue
268
+ });
269
+ }
270
+ }
271
+ // Custom tracking methods (not part of interface, but useful)
272
+ trackCliActionType(actionType) {
273
+ this.trackCliOption({
274
+ option: "action-type",
275
+ value: actionType
276
+ });
277
+ }
278
+ trackCliFlagHasConditions(hasConditions) {
279
+ if (hasConditions) {
280
+ this.trackCliFlag("has-conditions");
281
+ }
282
+ }
283
+ trackCliFlagMissingConditions(hasMissingConditions) {
284
+ if (hasMissingConditions) {
285
+ this.trackCliFlag("missing-conditions");
286
+ }
287
+ }
288
+ trackCliFlagResponseHeaders(hasResponseHeaders) {
289
+ if (hasResponseHeaders) {
290
+ this.trackCliFlag("response-headers");
291
+ }
292
+ }
293
+ trackCliFlagRequestTransforms(hasRequestTransforms) {
294
+ if (hasRequestTransforms) {
295
+ this.trackCliFlag("request-transforms");
296
+ }
297
+ }
298
+ };
299
+ var RoutesEditTelemetryClient = class extends TelemetryClient {
300
+ trackCliArgumentNameOrId(id) {
301
+ if (id) {
302
+ this.trackCliArgument({ arg: "name-or-id", value: this.redactedValue });
303
+ }
304
+ }
305
+ trackCliFlagYes(flag) {
306
+ if (flag) {
307
+ this.trackCliFlag("yes");
308
+ }
309
+ }
310
+ trackCliFlagNoDest(flag) {
311
+ if (flag) {
312
+ this.trackCliFlag("no-dest");
313
+ }
314
+ }
315
+ trackCliFlagNoStatus(flag) {
316
+ if (flag) {
317
+ this.trackCliFlag("no-status");
318
+ }
319
+ }
320
+ trackCliFlagClearConditions(flag) {
321
+ if (flag) {
322
+ this.trackCliFlag("clear-conditions");
323
+ }
324
+ }
325
+ trackCliFlagClearHeaders(flag) {
326
+ if (flag) {
327
+ this.trackCliFlag("clear-headers");
328
+ }
329
+ }
330
+ trackCliFlagClearTransforms(flag) {
331
+ if (flag) {
332
+ this.trackCliFlag("clear-transforms");
333
+ }
334
+ }
335
+ trackCliOptionName(name) {
336
+ if (name) {
337
+ this.trackCliOption({ option: "name", value: this.redactedValue });
338
+ }
339
+ }
340
+ trackCliOptionDescription(desc) {
341
+ if (desc) {
342
+ this.trackCliOption({ option: "description", value: this.redactedValue });
343
+ }
344
+ }
345
+ trackCliOptionSrc(src) {
346
+ if (src) {
347
+ this.trackCliOption({ option: "src", value: this.redactedValue });
348
+ }
349
+ }
350
+ trackCliOptionSrcSyntax(syntax) {
351
+ if (syntax) {
352
+ this.trackCliOption({ option: "src-syntax", value: syntax });
353
+ }
354
+ }
355
+ trackCliOptionAction(action) {
356
+ if (action) {
357
+ this.trackCliOption({ option: "action", value: action });
358
+ }
359
+ }
360
+ trackCliOptionDest(dest) {
361
+ if (dest) {
362
+ this.trackCliOption({ option: "dest", value: this.redactedValue });
363
+ }
364
+ }
365
+ trackCliOptionStatus(status) {
366
+ if (status !== void 0) {
367
+ this.trackCliOption({ option: "status", value: String(status) });
368
+ }
369
+ }
370
+ trackCliOptionSetResponseHeader(h) {
371
+ if (h && h.length > 0) {
372
+ this.trackCliOption({
373
+ option: "set-response-header",
374
+ value: this.redactedValue
375
+ });
376
+ }
377
+ }
378
+ trackCliOptionAppendResponseHeader(h) {
379
+ if (h && h.length > 0) {
380
+ this.trackCliOption({
381
+ option: "append-response-header",
382
+ value: this.redactedValue
383
+ });
384
+ }
385
+ }
386
+ trackCliOptionDeleteResponseHeader(h) {
387
+ if (h && h.length > 0) {
388
+ this.trackCliOption({
389
+ option: "delete-response-header",
390
+ value: this.redactedValue
391
+ });
392
+ }
393
+ }
394
+ trackCliOptionSetRequestHeader(h) {
395
+ if (h && h.length > 0) {
396
+ this.trackCliOption({
397
+ option: "set-request-header",
398
+ value: this.redactedValue
399
+ });
400
+ }
401
+ }
402
+ trackCliOptionAppendRequestHeader(h) {
403
+ if (h && h.length > 0) {
404
+ this.trackCliOption({
405
+ option: "append-request-header",
406
+ value: this.redactedValue
407
+ });
408
+ }
409
+ }
410
+ trackCliOptionDeleteRequestHeader(h) {
411
+ if (h && h.length > 0) {
412
+ this.trackCliOption({
413
+ option: "delete-request-header",
414
+ value: this.redactedValue
415
+ });
416
+ }
417
+ }
418
+ trackCliOptionSetRequestQuery(p) {
419
+ if (p && p.length > 0) {
420
+ this.trackCliOption({
421
+ option: "set-request-query",
422
+ value: this.redactedValue
423
+ });
424
+ }
425
+ }
426
+ trackCliOptionAppendRequestQuery(p) {
427
+ if (p && p.length > 0) {
428
+ this.trackCliOption({
429
+ option: "append-request-query",
430
+ value: this.redactedValue
431
+ });
432
+ }
433
+ }
434
+ trackCliOptionDeleteRequestQuery(p) {
435
+ if (p && p.length > 0) {
436
+ this.trackCliOption({
437
+ option: "delete-request-query",
438
+ value: this.redactedValue
439
+ });
440
+ }
441
+ }
442
+ trackCliOptionHas(conditions) {
443
+ if (conditions && conditions.length > 0) {
444
+ this.trackCliOption({ option: "has", value: this.redactedValue });
445
+ }
446
+ }
447
+ trackCliOptionMissing(conditions) {
448
+ if (conditions && conditions.length > 0) {
449
+ this.trackCliOption({ option: "missing", value: this.redactedValue });
450
+ }
451
+ }
452
+ trackCliOptionAi(prompt) {
453
+ if (prompt) {
454
+ this.trackCliOption({
455
+ option: "ai",
456
+ value: this.redactedValue
457
+ });
458
+ }
459
+ }
460
+ };
461
+
462
+ export {
463
+ RoutesTelemetryClient,
464
+ RoutesAddTelemetryClient,
465
+ RoutesEditTelemetryClient
466
+ };
@@ -0,0 +1,34 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import {
8
+ getTeamById,
9
+ getUser
10
+ } from "./chunk-AQLVWVEN.js";
11
+ import {
12
+ TeamDeleted
13
+ } from "./chunk-ZLCMHY2G.js";
14
+
15
+ // src/util/get-scope.ts
16
+ async function getScope(client, opts = {}) {
17
+ const user = await getUser(client);
18
+ let contextName = user.username || user.email;
19
+ let team = null;
20
+ const defaultTeamId = user.version === "northstar" ? user.defaultTeamId : void 0;
21
+ const currentTeamOrDefaultTeamId = client.config.currentTeam || defaultTeamId;
22
+ if (currentTeamOrDefaultTeamId && opts.getTeam !== false) {
23
+ team = await getTeamById(client, currentTeamOrDefaultTeamId);
24
+ if (!team) {
25
+ throw new TeamDeleted();
26
+ }
27
+ contextName = team.slug;
28
+ }
29
+ return { contextName, team, user };
30
+ }
31
+
32
+ export {
33
+ getScope
34
+ };
@@ -0,0 +1,110 @@
1
+ import { createRequire as __createRequire } from 'node:module';
2
+ import { fileURLToPath as __fileURLToPath } from 'node:url';
3
+ import { dirname as __dirname_ } from 'node:path';
4
+ const require = __createRequire(import.meta.url);
5
+ const __filename = __fileURLToPath(import.meta.url);
6
+ const __dirname = __dirname_(__filename);
7
+ import {
8
+ __commonJS,
9
+ __esm,
10
+ __export,
11
+ __require,
12
+ __toESM
13
+ } from "./chunk-TZ2YI2VH.js";
14
+
15
+ // ../../internals/get-package-json/dist/index.js
16
+ var require_dist = __commonJS({
17
+ "../../internals/get-package-json/dist/index.js"(exports, module) {
18
+ "use strict";
19
+ var __create = Object.create;
20
+ var __defProp = Object.defineProperty;
21
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
22
+ var __getOwnPropNames = Object.getOwnPropertyNames;
23
+ var __getProtoOf = Object.getPrototypeOf;
24
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
25
+ var __export2 = (target, all) => {
26
+ for (var name in all)
27
+ __defProp(target, name, { get: all[name], enumerable: true });
28
+ };
29
+ var __copyProps = (to, from, except, desc) => {
30
+ if (from && typeof from === "object" || typeof from === "function") {
31
+ for (let key of __getOwnPropNames(from))
32
+ if (!__hasOwnProp.call(to, key) && key !== except)
33
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
34
+ }
35
+ return to;
36
+ };
37
+ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
38
+ // If the importer is in node compatibility mode or this is not an ESM
39
+ // file that has been converted to a CommonJS file using a Babel-
40
+ // compatible transform (i.e. "__esModule" has not been set), then set
41
+ // "default" to the CommonJS "module.exports" for node compatibility.
42
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
43
+ mod
44
+ ));
45
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
46
+ var src_exports = {};
47
+ __export2(src_exports, {
48
+ getPackageJSON: () => getPackageJSON2
49
+ });
50
+ module.exports = __toCommonJS(src_exports);
51
+ var import_fs = __toESM2(__require("fs"));
52
+ var import_path = __toESM2(__require("path"));
53
+ var import_url = __require("url");
54
+ var cache = /* @__PURE__ */ new Map();
55
+ function getPackageJSONPath(dir) {
56
+ return import_path.default.join(dir, "package.json");
57
+ }
58
+ function captureCallerCallSite() {
59
+ const _prepareStackTrace = Error.prepareStackTrace;
60
+ let callSite;
61
+ try {
62
+ Error.prepareStackTrace = (_, stack) => stack;
63
+ const callSites = new Error().stack;
64
+ callSite = callSites[2];
65
+ } finally {
66
+ Error.prepareStackTrace = _prepareStackTrace;
67
+ }
68
+ return callSite;
69
+ }
70
+ function getPackageJSON2() {
71
+ const callSite = captureCallerCallSite();
72
+ let filePath = callSite.getFileName() || callSite.getEvalOrigin();
73
+ if (filePath.startsWith("file://")) {
74
+ filePath = (0, import_url.fileURLToPath)(filePath);
75
+ }
76
+ let rootDir = import_path.default.dirname(filePath);
77
+ let packageJSONPath = getPackageJSONPath(rootDir);
78
+ while (!import_fs.default.existsSync(packageJSONPath)) {
79
+ rootDir = import_path.default.join(rootDir, "..");
80
+ packageJSONPath = getPackageJSONPath(rootDir);
81
+ }
82
+ let packageJSON = cache.get(packageJSONPath);
83
+ if (!packageJSON) {
84
+ packageJSON = JSON.parse(import_fs.default.readFileSync(packageJSONPath, "utf-8"));
85
+ cache.set(packageJSONPath, packageJSON);
86
+ }
87
+ return packageJSON;
88
+ }
89
+ }
90
+ });
91
+
92
+ // src/util/pkg.ts
93
+ var pkg_exports = {};
94
+ __export(pkg_exports, {
95
+ default: () => pkg_default
96
+ });
97
+ var import_get_package_json, pkg_default;
98
+ var init_pkg = __esm({
99
+ "src/util/pkg.ts"() {
100
+ "use strict";
101
+ import_get_package_json = __toESM(require_dist(), 1);
102
+ pkg_default = (0, import_get_package_json.getPackageJSON)();
103
+ }
104
+ });
105
+
106
+ export {
107
+ pkg_default,
108
+ pkg_exports,
109
+ init_pkg
110
+ };