@remix-run/assets 0.3.0 → 0.4.1

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 (66) hide show
  1. package/README.md +206 -8
  2. package/dist/assets.d.ts +1 -0
  3. package/dist/assets.d.ts.map +1 -1
  4. package/dist/assets.js +1 -0
  5. package/dist/lib/access.d.ts +1 -0
  6. package/dist/lib/access.d.ts.map +1 -1
  7. package/dist/lib/access.js +7 -1
  8. package/dist/lib/asset-server.d.ts +29 -6
  9. package/dist/lib/asset-server.d.ts.map +1 -1
  10. package/dist/lib/asset-server.js +176 -17
  11. package/dist/lib/compilation-error.d.ts +1 -1
  12. package/dist/lib/compilation-error.d.ts.map +1 -1
  13. package/dist/lib/files/compiler.d.ts +71 -0
  14. package/dist/lib/files/compiler.d.ts.map +1 -0
  15. package/dist/lib/files/compiler.js +552 -0
  16. package/dist/lib/files/config.d.ts +101 -0
  17. package/dist/lib/files/config.d.ts.map +1 -0
  18. package/dist/lib/files/config.js +219 -0
  19. package/dist/lib/files/store.d.ts +31 -0
  20. package/dist/lib/files/store.d.ts.map +1 -0
  21. package/dist/lib/files/store.js +63 -0
  22. package/dist/lib/fingerprint.d.ts +3 -3
  23. package/dist/lib/fingerprint.d.ts.map +1 -1
  24. package/dist/lib/fingerprint.js +5 -5
  25. package/dist/lib/routes.d.ts.map +1 -1
  26. package/dist/lib/routes.js +28 -20
  27. package/dist/lib/scripts/compiler.d.ts +1 -0
  28. package/dist/lib/scripts/compiler.d.ts.map +1 -1
  29. package/dist/lib/scripts/compiler.js +31 -14
  30. package/dist/lib/scripts/resolve.d.ts.map +1 -1
  31. package/dist/lib/scripts/resolve.js +35 -8
  32. package/dist/lib/scripts/specifiers.d.ts +2 -0
  33. package/dist/lib/scripts/specifiers.d.ts.map +1 -0
  34. package/dist/lib/scripts/specifiers.js +9 -0
  35. package/dist/lib/scripts/transform.d.ts.map +1 -1
  36. package/dist/lib/scripts/transform.js +3 -5
  37. package/dist/lib/styles/compiler.d.ts +4 -0
  38. package/dist/lib/styles/compiler.d.ts.map +1 -1
  39. package/dist/lib/styles/compiler.js +2 -0
  40. package/dist/lib/styles/emit.d.ts +3 -0
  41. package/dist/lib/styles/emit.d.ts.map +1 -1
  42. package/dist/lib/styles/emit.js +36 -1
  43. package/dist/lib/styles/resolve.d.ts +8 -1
  44. package/dist/lib/styles/resolve.d.ts.map +1 -1
  45. package/dist/lib/styles/resolve.js +85 -32
  46. package/dist/lib/watch.d.ts +2 -0
  47. package/dist/lib/watch.d.ts.map +1 -1
  48. package/dist/lib/watch.js +25 -8
  49. package/package.json +7 -5
  50. package/src/assets.ts +1 -0
  51. package/src/lib/access.ts +8 -1
  52. package/src/lib/asset-server.ts +273 -28
  53. package/src/lib/compilation-error.ts +9 -0
  54. package/src/lib/files/compiler.ts +885 -0
  55. package/src/lib/files/config.ts +479 -0
  56. package/src/lib/files/store.ts +109 -0
  57. package/src/lib/fingerprint.ts +8 -7
  58. package/src/lib/routes.ts +36 -33
  59. package/src/lib/scripts/compiler.ts +44 -17
  60. package/src/lib/scripts/resolve.ts +57 -9
  61. package/src/lib/scripts/specifiers.ts +11 -0
  62. package/src/lib/scripts/transform.ts +3 -6
  63. package/src/lib/styles/compiler.ts +9 -0
  64. package/src/lib/styles/emit.ts +75 -1
  65. package/src/lib/styles/resolve.ts +132 -35
  66. package/src/lib/watch.ts +34 -12
package/README.md CHANGED
@@ -1,10 +1,11 @@
1
1
  # assets
2
2
 
3
- Fetch-based server for compiling browser JS/TS and CSS assets on demand.
3
+ Fetch-based server for compiling browser assets on demand.
4
4
 
5
5
  ## Features
6
6
 
7
7
  - **On-Demand Compilation** - Compile browser scripts and styles on demand
8
+ - **File Serving** - Serve configured file assets like images and fonts with optional transforms
8
9
  - **Custom File Mapping** - Define patterns for mapping public URLs to file paths on disk
9
10
  - **Access Control** - Control exactly which files can be served with allow and deny rules
10
11
  - **Preloads** - Generate preload URLs for scripts and styles based on imports
@@ -20,10 +21,10 @@ npm i remix
20
21
 
21
22
  ## Usage
22
23
 
23
- Use `createAssetServer` to serve browser JS/TS and CSS assets from a URL namespace in your app.
24
+ Use `createAssetServer` to serve browser assets from a URL namespace in your app.
24
25
 
25
26
  ```ts
26
- import { createRouter } from 'remix/fetch-router'
27
+ import { createRouter } from 'remix/router'
27
28
  import { createAssetServer } from 'remix/assets'
28
29
 
29
30
  let assetServer = createAssetServer({
@@ -33,6 +34,9 @@ let assetServer = createAssetServer({
33
34
  '/npm/*path': 'node_modules/*path',
34
35
  },
35
36
  allow: ['app/assets/**', 'node_modules/**'],
37
+ files: {
38
+ extensions: ['.svg', '.png', '.jpg', '.jpeg', '.woff2'],
39
+ },
36
40
  })
37
41
 
38
42
  let router = createRouter()
@@ -156,6 +160,15 @@ let src = await assetServer.getHref('app/assets/entry.tsx')
156
160
  // '/assets/app/assets/entry.tsx'
157
161
  ```
158
162
 
163
+ For configured `files` assets, you can also pass a `transform` pipeline to build a request URL with custom file transforms. Basic transforms are written as strings, while dynamic transforms use `[name, param]` tuples.
164
+
165
+ ```ts
166
+ let src = await assetServer.getHref('app/assets/image.png', {
167
+ transform: [['resize', '100x100'], 'webp'],
168
+ })
169
+ // '/assets/app/assets/image.png?transform=resize%3A100x100&transform=webp'
170
+ ```
171
+
159
172
  ## Preloads
160
173
 
161
174
  Use `assetServer.getPreloads()` when rendering HTML so you can turn the returned URLs into `<link rel="modulepreload">`, stylesheet preload tags, or `Link` headers for one or more assets and their dependencies. You can provide root-relative or absolute file paths, or `file://` URLs.
@@ -166,14 +179,14 @@ let preloads = await assetServer.getPreloads(['app/assets/entry.tsx', 'app/asset
166
179
  // '/assets/app/assets/entry.tsx',
167
180
  // '/assets/app/assets/search.tsx',
168
181
  // '/assets/app/assets/utils.ts',
169
- // '/assets/npm/@remix-run/ui/index.js',
182
+ // '/assets/npm/remix/ui/index.js',
170
183
  // ...etc
171
184
  // ]
172
185
  ```
173
186
 
174
187
  ## Fingerprinting
175
188
 
176
- By default, assets are served at stable URLs with ETags and `Cache-Control: no-cache`. Responses are cached for the lifetime of the asset server instance.
189
+ By default, assets are served at stable URLs with ETags and `Cache-Control: no-cache`.
177
190
 
178
191
  If you want clients to cache assets aggressively without revalidation, you can opt into source-based fingerprinting.
179
192
 
@@ -300,15 +313,200 @@ let assetServer = createAssetServer({
300
313
  })
301
314
  ```
302
315
 
316
+ ## File Options
317
+
318
+ Use `files` to serve additional leaf assets like images and fonts. File extensions must include the leading dot and are only served when explicitly configured.
319
+
320
+ ```ts
321
+ import { createAssetServer } from 'remix/assets'
322
+
323
+ let assetServer = createAssetServer({
324
+ basePath: '/assets',
325
+ fileMap: { '/app/*path': 'app/*path' },
326
+ allow: ['app/assets/**'],
327
+ files: {
328
+ extensions: ['.svg', '.png', '.jpg', '.jpeg', '.woff2'],
329
+ },
330
+ })
331
+ ```
332
+
333
+ JavaScript/TypeScript and CSS extensions not supported in `files.extensions` as they are not leaf assets and have their own module systems.
334
+
335
+ ### File transforms
336
+
337
+ Files can optionally be transformed before serving.
338
+
339
+ Use `files.transforms` for named transforms that callers can opt into per request, provided via the `transform` option when calling `assetServer.getHref()`.
340
+
341
+ ```ts
342
+ import { createAssetServer, defineFileTransform } from 'remix/assets'
343
+ import sharp from 'sharp'
344
+
345
+ let assetServer = createAssetServer({
346
+ basePath: '/assets',
347
+ fileMap: { '/app/*path': 'app/*path' },
348
+ allow: ['app/assets/**'],
349
+ files: {
350
+ extensions: ['.svg', '.png', '.jpg', '.jpeg', '.woff2'],
351
+ transforms: {
352
+ webp: defineFileTransform({
353
+ extensions: ['.png', '.jpg', '.jpeg'],
354
+ async transform(bytes) {
355
+ return {
356
+ content: await sharp(bytes).webp({ quality: 80 }).toBuffer(),
357
+ extension: '.webp',
358
+ }
359
+ },
360
+ }),
361
+ },
362
+ },
363
+ })
364
+
365
+ let imageUrl = await assetServer.getHref('app/assets/photo.jpg', {
366
+ transform: ['webp'],
367
+ })
368
+ ```
369
+
370
+ Transforms can also accept a single string param value, provided as a `[name, param]` tuple in the `transform` array when calling `assetServer.getHref()`.
371
+
372
+ ```ts
373
+ import { createAssetServer, defineFileTransform } from 'remix/assets'
374
+
375
+ let assetServer = createAssetServer({
376
+ basePath: '/assets',
377
+ fileMap: { '/app/*path': 'app/*path' },
378
+ allow: ['app/assets/**'],
379
+ files: {
380
+ extensions: ['.svg', '.png', '.jpg', '.jpeg', '.woff2'],
381
+ transforms: {
382
+ recolor: defineFileTransform({
383
+ extensions: ['.svg'],
384
+ param: true,
385
+ async transform(bytes, { param }) {
386
+ if (!/^#?(?:[\da-f]{3,4}|[\da-f]{6}(?:[\da-f]{2})?)$/i.test(param)) {
387
+ throw new TypeError('Expected a hex color, with or without a leading #')
388
+ }
389
+
390
+ let svg = new TextDecoder().decode(bytes)
391
+ return svg.replaceAll('currentColor', `${!param.startsWith('#') ? '#' : ''}${param}`)
392
+ },
393
+ }),
394
+ },
395
+ },
396
+ })
397
+
398
+ let imageUrl = await assetServer.getHref('app/assets/logo.svg', {
399
+ transform: [['recolor', '0000ff']],
400
+ })
401
+ ```
402
+
403
+ Hand-authored URLs use repeated `transform` search params with `name` or `name:param` values:
404
+
405
+ ```css
406
+ .selector {
407
+ background-image: url('/assets/app/assets/image.png?transform=resize:100x100&transform=webp');
408
+ }
409
+ ```
410
+
411
+ #### Global file transforms
412
+
413
+ Use `files.globalTransforms` to define transforms that should always happen before a file is served. These transforms are run after any request-level transforms for all configured file extensions, and can return `null` to skip themselves for a given input.
414
+
415
+ ```ts
416
+ import { createAssetServer } from 'remix/assets'
417
+ import { optimize as optimizeSvg } from 'svgo'
418
+
419
+ let assetServer = createAssetServer({
420
+ basePath: '/assets',
421
+ fileMap: { '/app/*path': 'app/*path' },
422
+ allow: ['app/assets/**'],
423
+ files: {
424
+ extensions: ['.svg', '.png', '.jpg', '.jpeg', '.woff2'],
425
+ globalTransforms: [
426
+ {
427
+ extensions: ['.svg'],
428
+ async transform(bytes) {
429
+ let svg = new TextDecoder().decode(bytes)
430
+ return optimizeSvg(svg, { multipass: true }).data
431
+ },
432
+ },
433
+ ],
434
+ },
435
+ })
436
+ ```
437
+
438
+ #### File transform caching
439
+
440
+ Use `files.cache` to store transformed file outputs via a [`file-storage`](https://github.com/remix-run/remix/tree/main/packages/file-storage) backend.
441
+
442
+ Without `files.cache`, transformed file outputs are recomputed per request.
443
+
444
+ If `fingerprint.buildId` is set, the file cache can be reused across server restarts for the same build.
445
+
446
+ ```ts
447
+ import * as path from 'node:path'
448
+ import { createAssetServer } from 'remix/assets'
449
+ import { createFsFileStorage } from 'remix/file-storage/fs'
450
+
451
+ let assetServer = createAssetServer({
452
+ basePath: '/assets',
453
+ fileMap: { '/app/*path': 'app/*path' },
454
+ allow: ['app/assets/**'],
455
+ files: {
456
+ cache: createFsFileStorage(path.resolve('.tmp/assets-cache')),
457
+ extensions: ['.svg', '.png', '.jpg', '.jpeg', '.woff2'],
458
+ transforms: {
459
+ /*...*/
460
+ },
461
+ },
462
+ })
463
+ ```
464
+
465
+ #### Request transform limits
466
+
467
+ Use `files.maxRequestTransforms` to cap request transform pipelines. It defaults to `5`.
468
+
469
+ ```ts
470
+ import { createAssetServer } from 'remix/assets'
471
+
472
+ let assetServer = createAssetServer({
473
+ basePath: '/assets',
474
+ fileMap: { '/app/*path': 'app/*path' },
475
+ allow: ['app/assets/**'],
476
+ files: {
477
+ maxRequestTransforms: 5,
478
+ extensions: ['.svg', '.png', '.jpg', '.jpeg', '.woff2'],
479
+ transforms: {
480
+ /*...*/
481
+ },
482
+ },
483
+ })
484
+ ```
485
+
303
486
  ## CSS Imports
304
487
 
305
- Relative CSS `@import` rules are rewritten to asset server URLs. External `@import` URLs are left unchanged automatically. `url()` references are preserved as authored.
488
+ Relative CSS `@import` rules and `url()` references are rewritten to asset server URLs.
306
489
 
307
490
  ```css
308
- /* Rewritten to asset server URL: */
491
+ /* Rewritten to asset server URLs: */
309
492
  @import './reset.css';
310
- /* External URL: */
493
+ .selector {
494
+ background-image: url('./image.png');
495
+ }
496
+
497
+ /* External URLs: */
311
498
  @import 'https://fonts.googleapis.com/css2?family=Inter';
499
+ .selector {
500
+ background-image: url('https://example.com/logo.svg');
501
+ }
502
+ ```
503
+
504
+ File transforms can also be applied to relative CSS `url()` references:
505
+
506
+ ```css
507
+ .selector {
508
+ background-image: url('./image.png?transform=resize:100x100&transform=webp');
509
+ }
312
510
  ```
313
511
 
314
512
  ## Error Handling
package/dist/assets.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { createAssetServer } from './lib/asset-server.ts';
2
+ export { defineFileTransform } from './lib/files/config.ts';
2
3
  export type { AssetServer, AssetServerOptions } from './lib/asset-server.ts';
3
4
  //# sourceMappingURL=assets.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../src/assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA"}
1
+ {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../src/assets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA"}
package/dist/assets.js CHANGED
@@ -1 +1,2 @@
1
1
  export { createAssetServer } from "./lib/asset-server.js";
2
+ export { defineFileTransform } from "./lib/files/config.js";
@@ -1,4 +1,5 @@
1
1
  type AccessPolicy = {
2
+ isDenied(filePath: string): boolean;
2
3
  isAllowed(filePath: string): boolean;
3
4
  };
4
5
  export declare function createAccessPolicy(options: {
@@ -1 +1 @@
1
- {"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../src/lib/access.ts"],"names":[],"mappings":"AAGA,KAAK,YAAY,GAAG;IAClB,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;CACrC,CAAA;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;CAChB,GAAG,YAAY,CAcf"}
1
+ {"version":3,"file":"access.d.ts","sourceRoot":"","sources":["../../src/lib/access.ts"],"names":[],"mappings":"AAGA,KAAK,YAAY,GAAG;IAClB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;IACnC,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;CACrC,CAAA;AAED,wBAAgB,kBAAkB,CAAC,OAAO,EAAE;IAC1C,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACxB,OAAO,EAAE,MAAM,CAAA;CAChB,GAAG,YAAY,CAoBf"}
@@ -3,13 +3,19 @@ import { isInjectedPackageFilePath } from "./injected-packages.js";
3
3
  export function createAccessPolicy(options) {
4
4
  let allowMatchers = options.allow.map((pattern) => createFileMatcher(pattern, options.rootDir));
5
5
  let denyMatchers = (options.deny ?? []).map((pattern) => createFileMatcher(pattern, options.rootDir));
6
+ function isDenied(filePath) {
7
+ if (isInjectedPackageFilePath(filePath))
8
+ return false;
9
+ return denyMatchers.length > 0 && denyMatchers.some((matcher) => matcher(filePath));
10
+ }
6
11
  return {
12
+ isDenied,
7
13
  isAllowed(filePath) {
8
14
  if (isInjectedPackageFilePath(filePath))
9
15
  return true;
10
16
  if (!allowMatchers.some((matcher) => matcher(filePath)))
11
17
  return false;
12
- if (denyMatchers.length > 0 && denyMatchers.some((matcher) => matcher(filePath)))
18
+ if (isDenied(filePath))
13
19
  return false;
14
20
  return true;
15
21
  },
@@ -1,3 +1,4 @@
1
+ import type { AssetRequestTransformMap, AssetServerFilesOptions, AssetTransformInvocation } from './files/config.ts';
1
2
  import type { AssetTarget } from './target.ts';
2
3
  import type { ChokidarWatcher } from './watch.ts';
3
4
  interface AssetServerWatchOptions {
@@ -33,10 +34,14 @@ interface AssetServerScriptOptions {
33
34
  /** Import specifiers to leave unrewritten (CDN URLs, import map entries, etc.) */
34
35
  external?: string[];
35
36
  }
36
- export interface AssetServerOptions {
37
+ /**
38
+ * Options used to construct an {@link AssetServer} via {@link createAssetServer}.
39
+ */
40
+ export interface AssetServerOptions<transforms extends AssetRequestTransformMap = {}> {
37
41
  /** Public mount path for this asset server, e.g. `'/assets'`. */
38
42
  basePath: string;
39
43
  /** File patterns keyed by public URL patterns relative to `basePath`. */
44
+ /** File patterns keyed by public URL patterns. */
40
45
  fileMap: Readonly<Record<string, string>>;
41
46
  /**
42
47
  * Root directory used to resolve relative file paths. Defaults to `process.cwd()`.
@@ -82,6 +87,12 @@ export interface AssetServerOptions {
82
87
  * Script-only configuration.
83
88
  */
84
89
  scripts?: AssetServerScriptOptions;
90
+ /**
91
+ * Leaf file asset configuration. Files configured here are served directly and can be
92
+ * referenced from CSS `url(...)` rules. Compiled asset extensions like `.css` and script
93
+ * module extensions are not allowed here.
94
+ */
95
+ files?: AssetServerFilesOptions<transforms>;
85
96
  /**
86
97
  * Enable filesystem-backed cache invalidation for long-lived server instances.
87
98
  * Enabled by default. Pass `true` to use the default watcher options, an options
@@ -94,7 +105,19 @@ export interface AssetServerOptions {
94
105
  */
95
106
  onError?: (error: unknown) => void | Response | Promise<void | Response>;
96
107
  }
97
- export interface AssetServer {
108
+ type AssetServerCreateOptions<transforms extends AssetRequestTransformMap> = Omit<AssetServerOptions<transforms>, 'files'> & {
109
+ files?: Omit<AssetServerFilesOptions<transforms>, 'transforms'> & {
110
+ transforms?: transforms;
111
+ };
112
+ };
113
+ export type AssetServerGetHrefOptions<transforms extends AssetRequestTransformMap> = undefined | {
114
+ transform: readonly AssetTransformInvocation<transforms>[];
115
+ };
116
+ /**
117
+ * Serves compiled scripts and styles for asset requests routed to it.
118
+ * Construct with {@link createAssetServer}.
119
+ */
120
+ export interface AssetServer<transforms extends AssetRequestTransformMap = {}> {
98
121
  /**
99
122
  * Serves a script or style request. Returns `Response | null` — null means the request
100
123
  * was not handled by this server, letting the router fall through to a 404.
@@ -103,7 +126,7 @@ export interface AssetServer {
103
126
  /**
104
127
  * Returns the request href for a served asset file.
105
128
  */
106
- getHref(filePath: string): Promise<string>;
129
+ getHref(filePath: string, options?: AssetServerGetHrefOptions<transforms>): Promise<string>;
107
130
  /**
108
131
  * Returns preload URLs for one or more served asset files, ordered shallowest-first.
109
132
  */
@@ -113,8 +136,8 @@ export interface AssetServer {
113
136
  */
114
137
  close(): Promise<void>;
115
138
  }
116
- export declare function getInternalChokidarWatcher(assetServer: AssetServer): ChokidarWatcher | undefined;
117
- export declare function getInternalWatchTargets(assetServer: AssetServer): readonly string[];
139
+ export declare function getInternalChokidarWatcher<transforms extends AssetRequestTransformMap>(assetServer: AssetServer<transforms>): ChokidarWatcher | undefined;
140
+ export declare function getInternalWatchTargets<transforms extends AssetRequestTransformMap>(assetServer: AssetServer<transforms>): readonly string[];
118
141
  /**
119
142
  * Create an asset server instance
120
143
  *
@@ -137,6 +160,6 @@ export declare function getInternalWatchTargets(assetServer: AssetServer): reado
137
160
  * route('/assets/*path', ({ request }) => assetServer.fetch(request))
138
161
  * ```
139
162
  */
140
- export declare function createAssetServer(options: AssetServerOptions): AssetServer;
163
+ export declare function createAssetServer<const transforms extends AssetRequestTransformMap = {}>(options: AssetServerCreateOptions<transforms>): AssetServer<transforms>;
141
164
  export {};
142
165
  //# sourceMappingURL=asset-server.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"asset-server.d.ts","sourceRoot":"","sources":["../../src/lib/asset-server.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAA6C,MAAM,aAAa,CAAA;AAEzF,OAAO,KAAK,EAAsB,eAAe,EAAE,MAAM,YAAY,CAAA;AAErE,U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