miaoda-react-devkit 0.1.1-beta.1 → 0.1.1-beta.10

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.
@@ -7,12 +7,7 @@ import * as RealSentry from "@sentry/react";
7
7
 
8
8
  // src/capture/console.ts
9
9
  import { addConsoleInstrumentationHandler } from "@sentry/core";
10
- var DEFAULT_CONSOLE_FILTER_KEYWORDS = [
11
- "Sentry initialized successfully",
12
- "[vite] ",
13
- "Download the React DevTools for a better development experience"
14
- ];
15
- function serializeArg(arg) {
10
+ function formatConsoleArg(arg) {
16
11
  if (typeof arg === "string") return arg;
17
12
  if (arg instanceof Error) return arg.message;
18
13
  try {
@@ -21,9 +16,17 @@ function serializeArg(arg) {
21
16
  return String(arg);
22
17
  }
23
18
  }
19
+ function formatConsoleArgs(args) {
20
+ return args.map(formatConsoleArg).join(" ");
21
+ }
22
+ var DEFAULT_CONSOLE_FILTER_KEYWORDS = [
23
+ "Sentry initialized successfully",
24
+ "[vite] ",
25
+ "Download the React DevTools for a better development experience"
26
+ ];
24
27
  function shouldFilterConsole(args, keywords) {
25
28
  if (keywords.length === 0) return false;
26
- const text = args.map(serializeArg).join(" ");
29
+ const text = formatConsoleArgs(args);
27
30
  return keywords.some((kw) => text.includes(kw));
28
31
  }
29
32
  function shouldFilterConsoleMessage(message, keywords) {
@@ -39,9 +42,20 @@ function createConsoleObserver(keywords, subscribers) {
39
42
  for (const sub of subscribers) sub.onConsole(info);
40
43
  });
41
44
  },
42
- beforeBreadcrumb(breadcrumb, _hint) {
45
+ beforeBreadcrumb(breadcrumb, hint) {
43
46
  if (breadcrumb.category === "console" && breadcrumb.message != null) {
44
47
  if (shouldFilterConsoleMessage(breadcrumb.message, keywords)) return null;
48
+ const h = hint;
49
+ const consoleType = h?.level ?? "log";
50
+ const stacks = (h?.input ?? []).filter((arg) => arg instanceof Error && arg.stack != null).map((err) => err.stack);
51
+ const originalMessage = breadcrumb.message;
52
+ breadcrumb.message = `[${consoleType}]${originalMessage}`;
53
+ breadcrumb.data = {
54
+ ...breadcrumb.data ?? {},
55
+ consoleType,
56
+ message: originalMessage,
57
+ ...stacks.length > 0 ? { stack: stacks.join("\n\n") } : {}
58
+ };
45
59
  }
46
60
  return breadcrumb;
47
61
  }
@@ -49,7 +63,7 @@ function createConsoleObserver(keywords, subscribers) {
49
63
  }
50
64
 
51
65
  // src/capture/network.ts
52
- import { getClient } from "@sentry/core";
66
+ import { getClient, getIsolationScope } from "@sentry/core";
53
67
 
54
68
  // ../../node_modules/.pnpm/@sentry-internal+browser-utils@9.47.1/node_modules/@sentry-internal/browser-utils/build/esm/debug-build.js
55
69
  var DEBUG_BUILD = typeof __SENTRY_DEBUG__ === "undefined" || __SENTRY_DEBUG__;
@@ -87,9 +101,42 @@ function getFetchRequestArgBody(fetchArgs = []) {
87
101
  return fetchArgs[1].body;
88
102
  }
89
103
 
104
+ // src/utils.ts
105
+ function stripUrlOrigin(url) {
106
+ try {
107
+ const u = new URL(url);
108
+ return u.pathname + u.search + u.hash;
109
+ } catch {
110
+ return url;
111
+ }
112
+ }
113
+
90
114
  // src/capture/pgrest.ts
91
115
  var DEFAULT_PGREST_URL_PATTERNS = [/\/rest\/v1\//];
92
- var DEFAULT_PGREST_WHITELIST_CODES = [];
116
+ var DEFAULT_PGREST_WHITELIST_CODES = [
117
+ "22P02",
118
+ // 无效的文本表示(如类型转换失败)
119
+ "42703",
120
+ // 未定义的列
121
+ "42P01",
122
+ // 未定义的表
123
+ "42501",
124
+ // 权限不足
125
+ "23503",
126
+ // 外键约束失败
127
+ "42P17",
128
+ // 对象已存在
129
+ "22008",
130
+ // 日期时间字段值超出范围
131
+ "23505",
132
+ // 唯一键冲突
133
+ "PGRST116",
134
+ // 期望单行但返回多行
135
+ "PGRST200",
136
+ // 外键关系查找失败
137
+ "PGRST204"
138
+ // 响应中找不到列
139
+ ];
93
140
  function isPgRestRequest(url, patterns) {
94
141
  return patterns.some((p) => (typeof p === "string" ? new RegExp(p) : p).test(url));
95
142
  }
@@ -114,8 +161,38 @@ function parsePgRestErrorBody(body) {
114
161
  };
115
162
  }
116
163
 
164
+ // src/capture/auth.ts
165
+ var DEFAULT_AUTH_URL_PATTERNS = [/\/auth\/v1\//];
166
+ var DEFAULT_AUTH_WHITELIST_CODES = ["unexpected_failure"];
167
+ function isAuthRequest(url, patterns) {
168
+ return patterns.some((p) => (typeof p === "string" ? new RegExp(p) : p).test(url));
169
+ }
170
+ function parseAuthErrorBody(body) {
171
+ if (!body) return null;
172
+ let parsed;
173
+ try {
174
+ parsed = JSON.parse(body);
175
+ } catch {
176
+ return null;
177
+ }
178
+ if (typeof parsed !== "object") return null;
179
+ if (parsed === null) return null;
180
+ const p = parsed;
181
+ if (typeof p["code"] !== "string") return null;
182
+ if (typeof p["message"] !== "string") return null;
183
+ return {
184
+ code: p["code"],
185
+ message: p["message"],
186
+ requestId: typeof p["requestId"] === "string" ? p["requestId"] : null
187
+ };
188
+ }
189
+
117
190
  // src/capture/network.ts
118
191
  var BODY_TRUNCATE_LIMIT = 2e3;
192
+ function calcDuration(hint) {
193
+ if (hint?.startTimestamp == null || hint?.endTimestamp == null) return void 0;
194
+ return Math.round((hint.endTimestamp - hint.startTimestamp) * 1e3);
195
+ }
119
196
  var DEFAULT_IGNORE_URLS = [
120
197
  /\.(js|css|png|jpg|jpeg|gif|svg|ico|woff|woff2|ttf|eot|map)(\?.*)?$/,
121
198
  /\.chunk\./,
@@ -165,7 +242,15 @@ function handleXhrBreadcrumb(breadcrumb, hint, handler) {
165
242
  breadcrumb.data["requestBody"] = requestBody;
166
243
  breadcrumb.data["responseBody"] = responseBody;
167
244
  }
168
- void handler({ type: "xhr", method, url, statusCode, requestBody, responseBody, isError });
245
+ const duration = calcDuration(hint);
246
+ const relativeUrl = stripUrlOrigin(url);
247
+ const statusStr = statusCode != null ? String(statusCode) : "failed";
248
+ const durationStr = duration != null ? ` (${duration}ms)` : "";
249
+ breadcrumb.message = `XHR ${method} ${relativeUrl} -> ${statusStr}${durationStr}`;
250
+ if (breadcrumb.data) {
251
+ breadcrumb.data["duration"] = duration;
252
+ }
253
+ void handler({ type: "xhr", method, url, statusCode, requestBody, responseBody, isError, duration });
169
254
  }
170
255
  async function handleFetchBreadcrumb(breadcrumb, hint, handler) {
171
256
  const data = breadcrumb.data;
@@ -175,19 +260,24 @@ async function handleFetchBreadcrumb(breadcrumb, hint, handler) {
175
260
  const isError = hint?.data != null;
176
261
  const response = hint?.response;
177
262
  const cause = hint?.data instanceof Error ? hint.data : void 0;
178
- const fetchArgs = hint?.input;
179
- const reqBody = getFetchRequestArgBody(fetchArgs ?? []);
263
+ const reqBody = getFetchRequestArgBody(hint?.input ?? []);
180
264
  const [rawRequestBody] = getBodyString(reqBody);
181
265
  const requestBody = rawRequestBody != null ? truncateBody(rawRequestBody) : void 0;
266
+ const duration = calcDuration(hint);
267
+ const relativeUrl = stripUrlOrigin(url);
268
+ const statusStr = statusCode != null ? String(statusCode) : "failed";
269
+ const durationStr = duration != null ? ` (${duration}ms)` : "";
270
+ breadcrumb.message = `Fetch ${method} ${relativeUrl} -> ${statusStr}${durationStr}`;
182
271
  if (breadcrumb.data) {
183
272
  breadcrumb.data["requestBody"] = requestBody;
273
+ breadcrumb.data["duration"] = duration;
184
274
  }
185
275
  const contentType = response?.headers?.get("content-type") ?? "";
186
276
  if (isStreamByContentType(contentType)) {
187
277
  if (breadcrumb.data) {
188
278
  breadcrumb.data["responseBody"] = "[streaming response - not captured]";
189
279
  }
190
- await handler({ type: "fetch", method, url, statusCode, requestBody, responseBody: "[streaming response - not captured]", isError, cause });
280
+ await handler({ type: "fetch", method, url, statusCode, requestBody, responseBody: "[streaming response - not captured]", isError, cause, duration });
191
281
  return;
192
282
  }
193
283
  let responseBody;
@@ -207,18 +297,23 @@ async function handleFetchBreadcrumb(breadcrumb, hint, handler) {
207
297
  if (breadcrumb.data) {
208
298
  breadcrumb.data["responseBody"] = responseBody;
209
299
  }
210
- await handler({ type: "fetch", method, url, statusCode, requestBody, responseBody, isError, cause });
300
+ await handler({ type: "fetch", method, url, statusCode, requestBody, responseBody, isError, cause, duration });
211
301
  }
212
302
  function createNetworkObserver(opts, subscribers) {
213
303
  const shouldIgnore = createUrlMatcher(opts.ignoreUrls);
214
304
  const pgRestPatterns = opts.pgRestUrlPatterns ?? DEFAULT_PGREST_URL_PATTERNS;
215
305
  const pgRestWhitelistCodes = opts.pgRestWhitelistCodes ?? DEFAULT_PGREST_WHITELIST_CODES;
306
+ const precedingBreadcrumbsLimit = opts.precedingBreadcrumbsLimit;
307
+ const authPatterns = opts.authUrlPatterns ?? DEFAULT_AUTH_URL_PATTERNS;
308
+ const authWhitelistCodes = opts.authWhitelistCodes ?? DEFAULT_AUTH_WHITELIST_CODES;
216
309
  function tryDispatchPgRestWhitelistError(requestType, method, url, statusCode, requestBody, responseBody) {
217
310
  if (statusCode == null) return;
218
311
  if (!isPgRestRequest(url, pgRestPatterns)) return;
219
312
  const pgRestError = parsePgRestErrorBody(responseBody);
220
313
  if (!pgRestError) return;
221
314
  if (pgRestWhitelistCodes.length > 0 && !pgRestWhitelistCodes.includes(pgRestError.code)) return;
315
+ const allBreadcrumbs = getIsolationScope().getScopeData().breadcrumbs;
316
+ const precedingBreadcrumbs = precedingBreadcrumbsLimit != null ? allBreadcrumbs.slice(-precedingBreadcrumbsLimit) : allBreadcrumbs.slice();
222
317
  const info = {
223
318
  type: requestType,
224
319
  method,
@@ -226,10 +321,31 @@ function createNetworkObserver(opts, subscribers) {
226
321
  statusCode,
227
322
  pgRestError,
228
323
  requestBody,
229
- responseBody
324
+ responseBody,
325
+ precedingBreadcrumbs
230
326
  };
231
327
  for (const sub of subscribers) sub.onPgRestWhitelistError(info);
232
328
  }
329
+ function tryDispatchAuthWhitelistError(requestType, method, url, statusCode, requestBody, responseBody) {
330
+ if (statusCode == null) return;
331
+ if (!isAuthRequest(url, authPatterns)) return;
332
+ const authError = parseAuthErrorBody(responseBody);
333
+ if (!authError) return;
334
+ if (authWhitelistCodes.length > 0 && !authWhitelistCodes.includes(authError.code)) return;
335
+ const allBreadcrumbs = getIsolationScope().getScopeData().breadcrumbs;
336
+ const precedingBreadcrumbs = precedingBreadcrumbsLimit != null ? allBreadcrumbs.slice(-precedingBreadcrumbsLimit) : allBreadcrumbs.slice();
337
+ const info = {
338
+ type: requestType,
339
+ method,
340
+ url,
341
+ statusCode,
342
+ authError,
343
+ requestBody,
344
+ responseBody,
345
+ precedingBreadcrumbs
346
+ };
347
+ for (const sub of subscribers) sub.onAuthWhitelistError(info);
348
+ }
233
349
  function makeHandler(requestType) {
234
350
  return (info) => {
235
351
  for (const sub of subscribers) void sub.onNetworkRequest(info);
@@ -241,6 +357,14 @@ function createNetworkObserver(opts, subscribers) {
241
357
  info.requestBody,
242
358
  info.responseBody
243
359
  );
360
+ tryDispatchAuthWhitelistError(
361
+ requestType,
362
+ info.method,
363
+ info.url,
364
+ info.statusCode,
365
+ info.requestBody,
366
+ info.responseBody
367
+ );
244
368
  };
245
369
  }
246
370
  return {
@@ -253,10 +377,11 @@ function createNetworkObserver(opts, subscribers) {
253
377
  const fetchHandler = makeHandler("fetch");
254
378
  client.on("beforeAddBreadcrumb", (breadcrumb, hint) => {
255
379
  const url = breadcrumb.data?.url ?? "";
256
- if (shouldIgnore(url)) return;
257
380
  if (breadcrumb.category === "xhr") {
381
+ if (shouldIgnore(url)) return;
258
382
  handleXhrBreadcrumb(breadcrumb, hint, xhrHandler);
259
383
  } else if (breadcrumb.category === "fetch") {
384
+ if (shouldIgnore(url)) return;
260
385
  void handleFetchBreadcrumb(breadcrumb, hint, fetchHandler);
261
386
  }
262
387
  });
@@ -349,56 +474,10 @@ var PostMessageSubscriber = class {
349
474
  };
350
475
  this.send(msg, "*");
351
476
  }
352
- onNetworkRequest({ method, url, statusCode, requestBody, responseBody, isError, cause }) {
353
- const isClientError = statusCode != null && statusCode >= 400 && statusCode < 500;
354
- if (!isError && !isClientError) return;
355
- const urlPath = extractUrlPath(url);
356
- if (isError) {
357
- const causeDesc = cause != null ? String(cause) : "NetworkError";
358
- const errorMessage = `${method} ${urlPath} failed: ${causeDesc}`;
359
- const msg = {
360
- type: "GLOBAL_ERROR",
361
- message: errorMessage,
362
- error: cause != null ? { name: cause.name, message: cause.message, stack: cause.stack } : null,
363
- errorData: {
364
- name: cause?.name ?? "NetworkError",
365
- message: cause?.message ?? causeDesc,
366
- stack: cause?.stack ?? null,
367
- fileName: url,
368
- lineNumber: 0,
369
- columnNumber: 0,
370
- httpPath: urlPath,
371
- httpStatus: 0,
372
- httpMethod: method,
373
- requestBody: requestBody ?? "",
374
- responseBody: ""
375
- }
376
- };
377
- this.send(msg, "*");
378
- } else {
379
- const errorMessage = `${method} ${urlPath} -> ${statusCode}`;
380
- const msg = {
381
- type: "GLOBAL_ERROR",
382
- message: errorMessage,
383
- error: null,
384
- errorData: {
385
- name: "HTTPClientError",
386
- message: errorMessage,
387
- stack: null,
388
- fileName: url,
389
- lineNumber: 0,
390
- columnNumber: 0,
391
- httpPath: urlPath,
392
- httpStatus: statusCode,
393
- httpMethod: method,
394
- requestBody: requestBody ?? "",
395
- responseBody: responseBody ?? ""
396
- }
397
- };
398
- this.send(msg, "*");
399
- }
477
+ // postMessage 场景不需要上报 network 日志
478
+ onNetworkRequest(_info) {
400
479
  }
401
- onPgRestWhitelistError({ type, method, url, statusCode, pgRestError, requestBody, responseBody }) {
480
+ onPgRestWhitelistError({ type, method, url, statusCode, pgRestError, requestBody, responseBody, precedingBreadcrumbs }) {
402
481
  const urlPath = extractUrlPath(url);
403
482
  const code = pgRestError.code;
404
483
  const errorMessage = `${method} ${urlPath} -> ${statusCode} [PgRest:${code}]`;
@@ -421,7 +500,36 @@ var PostMessageSubscriber = class {
421
500
  pgRestCode: code,
422
501
  pgRestDetails: pgRestError.details ?? void 0,
423
502
  pgRestHint: pgRestError.hint ?? void 0,
424
- requestType: type
503
+ requestType: type,
504
+ precedingBreadcrumbs
505
+ }
506
+ };
507
+ this.send(msg, "*");
508
+ }
509
+ onAuthWhitelistError({ type, method, url, statusCode, authError, requestBody, responseBody, precedingBreadcrumbs }) {
510
+ const urlPath = extractUrlPath(url);
511
+ const code = authError.code;
512
+ const errorMessage = `${method} ${urlPath} -> ${statusCode} [Auth:${code}]`;
513
+ const msg = {
514
+ type: "GLOBAL_ERROR",
515
+ message: errorMessage,
516
+ error: null,
517
+ errorData: {
518
+ name: "AuthWhitelistError",
519
+ message: authError.message,
520
+ stack: null,
521
+ fileName: url,
522
+ lineNumber: 0,
523
+ columnNumber: 0,
524
+ httpPath: urlPath,
525
+ httpStatus: statusCode,
526
+ httpMethod: method,
527
+ requestBody: requestBody ?? "",
528
+ responseBody,
529
+ authCode: code,
530
+ authRequestId: authError.requestId ?? void 0,
531
+ requestType: type,
532
+ precedingBreadcrumbs
425
533
  }
426
534
  };
427
535
  this.send(msg, "*");
@@ -434,7 +542,8 @@ function createPostMessageSubscriber(send) {
434
542
  // src/stubs/sentry-react-stub.ts
435
543
  export * from "@sentry/react";
436
544
  var STUB_DSN = "https://stubPublicKey@o0.ingest.sentry.io/0";
437
- var OVERRIDE_DSN = typeof process !== "undefined" && process.env["SENTRY_OVERRIDE_DSN"] ? process.env["SENTRY_OVERRIDE_DSN"] : STUB_DSN;
545
+ var OVERRIDE_DSN = import.meta.env.VITE_SENTRY_DSN || STUB_DSN;
546
+ var OVERRIDE_ENVIRONMENT = import.meta.env.VITE_SENTRY_ENV;
438
547
  var _subscribers = [createPostMessageSubscriber()];
439
548
  function configureStubSubscribers(subscribers) {
440
549
  _subscribers = subscribers;
@@ -452,6 +561,7 @@ var init2 = (options) => {
452
561
  const result = RealSentry.init({
453
562
  ...options,
454
563
  dsn: OVERRIDE_DSN,
564
+ environment: OVERRIDE_ENVIRONMENT,
455
565
  beforeSend(event, hint) {
456
566
  const processed = capture.beforeSend(event, hint);
457
567
  return upstreamBeforeSend ? upstreamBeforeSend(processed, hint) : processed;
@@ -462,6 +572,15 @@ var init2 = (options) => {
462
572
  return upstreamBeforeBreadcrumb ? upstreamBeforeBreadcrumb(processed, hint) : processed;
463
573
  }
464
574
  });
575
+ const stubTags = {
576
+ app_id: import.meta.env.VITE_APP_ID,
577
+ environment: OVERRIDE_ENVIRONMENT
578
+ };
579
+ for (const [key, value] of Object.entries(stubTags)) {
580
+ if (value) {
581
+ RealSentry.setTag(key, value);
582
+ }
583
+ }
465
584
  capture.installNetworkObserver();
466
585
  capture.installConsoleObserver();
467
586
  return result;
@@ -470,4 +589,3 @@ export {
470
589
  configureStubSubscribers,
471
590
  init2 as init
472
591
  };
473
- //# sourceMappingURL=sentry-react-stub.js.map
@@ -31,6 +31,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
31
31
  var vite_exports = {};
32
32
  __export(vite_exports, {
33
33
  hmrTogglePlugin: () => hmrTogglePlugin,
34
+ withSentryBuild: () => withSentryBuild,
34
35
  withSentryStub: () => withSentryStub
35
36
  });
36
37
  module.exports = __toCommonJS(vite_exports);
@@ -60,6 +61,24 @@ function withSentryStub() {
60
61
  };
61
62
  }
62
63
 
64
+ // src/vite/withSentryBuild.ts
65
+ var import_node_path2 = __toESM(require("path"), 1);
66
+ var import_node_url2 = require("url");
67
+ var SENTRY_MODULE2 = "@sentry/react";
68
+ var _dirname2 = import_node_path2.default.dirname((0, import_node_url2.fileURLToPath)(importMetaUrl));
69
+ var STUB_PATH2 = import_node_path2.default.resolve(_dirname2, "../stubs/sentry-react-noop-stub.js");
70
+ function withSentryBuild() {
71
+ return {
72
+ name: "miaoda-devkit:sentry-build",
73
+ enforce: "pre",
74
+ apply: "build",
75
+ resolveId(id) {
76
+ if (id === SENTRY_MODULE2) return STUB_PATH2;
77
+ return null;
78
+ }
79
+ };
80
+ }
81
+
63
82
  // src/vite/hmrTogglePlugin.ts
64
83
  function hmrTogglePlugin() {
65
84
  return {
@@ -120,6 +139,6 @@ function hmrTogglePlugin() {
120
139
  // Annotate the CommonJS export names for ESM import in node:
121
140
  0 && (module.exports = {
122
141
  hmrTogglePlugin,
142
+ withSentryBuild,
123
143
  withSentryStub
124
144
  });
125
- //# sourceMappingURL=index.cjs.map
@@ -9,6 +9,8 @@ import { Plugin } from 'vite';
9
9
 
10
10
  declare function withSentryStub(): Plugin;
11
11
 
12
+ declare function withSentryBuild(): Plugin;
13
+
12
14
  /**
13
15
  * 云端 dev server 专用:HMR 开关 + 手动 reload 控制接口。
14
16
  *
@@ -21,4 +23,4 @@ declare function withSentryStub(): Plugin;
21
23
  */
22
24
  declare function hmrTogglePlugin(): Plugin;
23
25
 
24
- export { hmrTogglePlugin, withSentryStub };
26
+ export { hmrTogglePlugin, withSentryBuild, withSentryStub };
@@ -9,6 +9,8 @@ import { Plugin } from 'vite';
9
9
 
10
10
  declare function withSentryStub(): Plugin;
11
11
 
12
+ declare function withSentryBuild(): Plugin;
13
+
12
14
  /**
13
15
  * 云端 dev server 专用:HMR 开关 + 手动 reload 控制接口。
14
16
  *
@@ -21,4 +23,4 @@ declare function withSentryStub(): Plugin;
21
23
  */
22
24
  declare function hmrTogglePlugin(): Plugin;
23
25
 
24
- export { hmrTogglePlugin, withSentryStub };
26
+ export { hmrTogglePlugin, withSentryBuild, withSentryStub };
@@ -19,6 +19,24 @@ function withSentryStub() {
19
19
  };
20
20
  }
21
21
 
22
+ // src/vite/withSentryBuild.ts
23
+ import path2 from "path";
24
+ import { fileURLToPath as fileURLToPath2 } from "url";
25
+ var SENTRY_MODULE2 = "@sentry/react";
26
+ var _dirname2 = path2.dirname(fileURLToPath2(import.meta.url));
27
+ var STUB_PATH2 = path2.resolve(_dirname2, "../stubs/sentry-react-noop-stub.js");
28
+ function withSentryBuild() {
29
+ return {
30
+ name: "miaoda-devkit:sentry-build",
31
+ enforce: "pre",
32
+ apply: "build",
33
+ resolveId(id) {
34
+ if (id === SENTRY_MODULE2) return STUB_PATH2;
35
+ return null;
36
+ }
37
+ };
38
+ }
39
+
22
40
  // src/vite/hmrTogglePlugin.ts
23
41
  function hmrTogglePlugin() {
24
42
  return {
@@ -78,6 +96,6 @@ function hmrTogglePlugin() {
78
96
  }
79
97
  export {
80
98
  hmrTogglePlugin,
99
+ withSentryBuild,
81
100
  withSentryStub
82
101
  };
83
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "miaoda-react-devkit",
3
- "version": "0.1.1-beta.1",
3
+ "version": "0.1.1-beta.10",
4
4
  "description": "React admin 应用开发工具集",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -18,11 +18,13 @@
18
18
  "import": "./dist/vite/index.js",
19
19
  "require": "./dist/vite/index.cjs"
20
20
  },
21
+ "./cloud/vite.config": "./cloud/vite.config.js",
21
22
  "./tsconfig-base": "./tsconfig-base.json"
22
23
  },
23
24
  "files": [
24
25
  "dist",
25
26
  "cloud",
27
+ "!cloud/**/*.ts",
26
28
  "tsconfig-base.json",
27
29
  "!dist/**/*.map"
28
30
  ],