ember-vite-hmr 2.2.1 → 2.2.3

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.
@@ -200,80 +200,71 @@ export default function hotReplaceAst(babel) {
200
200
  const Service = util.import(programPath, '@ember/service', 'default');
201
201
  const originalClassName = classIdentifier.name;
202
202
  const proxyClassName = `${originalClassName}HmrProxy`;
203
- const implVarName = `_${originalClassName}Impl`;
204
- const proxyVarName = `_${originalClassName}Proxy`;
205
203
  // Keep the original class as-is, just remove it from export
206
204
  // We'll add it back as a non-exported class
205
+ const babelTemplate = babel.template;
206
+ // The live proxy instance and the latest accepted implementation must
207
+ // live on `import.meta.hot.data`, not in a module-scope `let`: Vite
208
+ // guarantees that object (and only that object) survives across a
209
+ // module's hot re-evaluations. A component's `@service` injection can
210
+ // end up constructing the proxy against a *later* re-evaluation of
211
+ // this module than the one whose `import.meta.hot.accept` closure
212
+ // captured a module-scope variable — the closure and the constructor
213
+ // would then silently operate on two disconnected variable bindings
214
+ // (a duplicate-module symptom), and the HMR swap would never reach
215
+ // the instance actually rendered.
216
+ const ctorBody = babelTemplate.statements(`
217
+ super(...args);
218
+ this._owner = args[0];
219
+ const Impl = (import.meta.hot && import.meta.hot.data._impl) || ${proxyClassName}.Impl;
220
+ this._delegate = new Impl(this._owner);
221
+ if (import.meta.hot) {
222
+ import.meta.hot.data._proxy = this;
223
+ }
224
+ return new Proxy(this, {
225
+ get(target, prop) {
226
+ if (prop === '_delegate') {
227
+ return target._delegate;
228
+ }
229
+ return target._delegate[prop];
230
+ },
231
+ set(target, prop, value) {
232
+ target._delegate[prop] = value;
233
+ return true;
234
+ },
235
+ });
236
+ `)();
237
+ const willDestroyBody = babelTemplate.statements(`
238
+ super.willDestroy();
239
+ this._delegate.willDestroy();
240
+ if (import.meta.hot && import.meta.hot.data._proxy === this) {
241
+ import.meta.hot.data._proxy = undefined;
242
+ }
243
+ `)();
207
244
  // Create the HMR proxy service class
208
245
  const proxyClass = t.classDeclaration(t.identifier(proxyClassName), Service, t.classBody([
209
246
  // static Impl = OriginalService (reference to the original class)
210
247
  t.classProperty(t.identifier('Impl'), t.identifier(originalClassName), null, null, false, true),
211
248
  // @tracked _delegate
212
249
  t.classProperty(t.identifier('_delegate'), null, null, [t.decorator(tracked)], false, false),
213
- // constructor
214
- t.classMethod('constructor', t.identifier('constructor'), [t.restElement(t.identifier('args'))], t.blockStatement([
215
- t.expressionStatement(t.callExpression(t.super(), [
216
- t.spreadElement(t.identifier('args')),
217
- ])),
218
- // Store owner for HMR reloads
219
- t.expressionStatement(t.assignmentExpression('=', t.memberExpression(t.thisExpression(), t.identifier('_owner')), t.memberExpression(t.identifier('args'), t.numericLiteral(0), true))),
220
- // Initialize delegate with owner
221
- t.expressionStatement(t.assignmentExpression('=', t.memberExpression(t.thisExpression(), t.identifier('_delegate')), t.newExpression(t.identifier(implVarName), [
222
- t.memberExpression(t.thisExpression(), t.identifier('_owner'))
223
- ]))),
224
- t.ifStatement(t.unaryExpression('!', t.identifier(proxyVarName)), t.blockStatement([
225
- t.expressionStatement(t.assignmentExpression('=', t.identifier(proxyVarName), t.thisExpression())),
226
- ])),
227
- t.returnStatement(t.newExpression(t.identifier('Proxy'), [
228
- t.thisExpression(),
229
- t.objectExpression([
230
- t.objectMethod('method', t.identifier('get'), [t.identifier('target'), t.identifier('prop')], t.blockStatement([
231
- t.ifStatement(t.binaryExpression('===', t.identifier('prop'), t.stringLiteral('_delegate')), t.returnStatement(t.memberExpression(t.identifier('target'), t.identifier('_delegate')))),
232
- t.returnStatement(t.memberExpression(t.memberExpression(t.identifier('target'), t.identifier('_delegate')), t.identifier('prop'), true)),
233
- ])),
234
- t.objectMethod('method', t.identifier('set'), [
235
- t.identifier('target'),
236
- t.identifier('prop'),
237
- t.identifier('value'),
238
- ], t.blockStatement([
239
- t.expressionStatement(t.assignmentExpression('=', t.memberExpression(t.memberExpression(t.identifier('target'), t.identifier('_delegate')), t.identifier('prop'), true), t.identifier('value'))),
240
- t.returnStatement(t.booleanLiteral(true)),
241
- ])),
242
- ]),
243
- ])),
244
- ])),
245
- // willDestroy
246
- t.classMethod('method', t.identifier('willDestroy'), [], t.blockStatement([
247
- t.expressionStatement(t.callExpression(t.memberExpression(t.super(), t.identifier('willDestroy')), [])),
248
- t.expressionStatement(t.callExpression(t.memberExpression(t.memberExpression(t.thisExpression(), t.identifier('_delegate')), t.identifier('willDestroy')), [])),
249
- ])),
250
+ t.classMethod('constructor', t.identifier('constructor'), [t.restElement(t.identifier('args'))], t.blockStatement(ctorBody)),
251
+ t.classMethod('method', t.identifier('willDestroy'), [], t.blockStatement(willDestroyBody)),
250
252
  ]));
251
- // Create variable declarations with unique names to avoid conflicts
252
- const currentImplDeclaration = t.variableDeclaration('let', [
253
- t.variableDeclarator(t.identifier(implVarName), t.identifier(originalClassName)),
254
- ]);
255
- const currentProxyDeclaration = t.variableDeclaration('let', [
256
- t.variableDeclarator(t.identifier(proxyVarName), t.nullLiteral()),
257
- ]);
258
253
  // For Case 1 (inline class), we need to keep the class as non-exported
259
254
  // For Case 2 (separate declaration), the class already exists, so we don't recreate it
260
255
  if (declaration.type === 'ClassDeclaration') {
261
256
  // Case 1: Inline class export - create a non-exported version
262
257
  const originalClass = t.classDeclaration(classIdentifier, classDeclaration.superClass, classDeclaration.body, classDeclaration.decorators || []);
263
258
  // Replace the export with all the necessary declarations
264
- // IMPORTANT: Class must be declared BEFORE the variables that reference it
259
+ // IMPORTANT: Class must be declared BEFORE the proxy class that references it
265
260
  path.replaceWithMultiple([
266
261
  originalClass, // The original class (no longer exported) - MUST BE FIRST
267
- currentImplDeclaration,
268
- currentProxyDeclaration,
269
262
  t.exportDefaultDeclaration(proxyClass), // Export the proxy class
270
263
  ]);
271
264
  }
272
265
  else {
273
266
  // Case 2: Separate declaration - class already exists, just replace the export
274
267
  path.replaceWithMultiple([
275
- currentImplDeclaration,
276
- currentProxyDeclaration,
277
268
  t.exportDefaultDeclaration(proxyClass), // Export the proxy class
278
269
  ]);
279
270
  }
@@ -282,23 +273,28 @@ export default function hotReplaceAst(babel) {
282
273
  const hmrCode = `
283
274
  if (import.meta.hot) {
284
275
  import.meta.hot.accept((newModule) => {
285
- if (import.meta.hot.data._hotReload && newModule?.default?.Impl) {
286
- import.meta.hot.data._hotReload(newModule.default.Impl);
276
+ const NewImpl = newModule?.default?.Impl;
277
+ if (!NewImpl) {
278
+ return;
287
279
  }
288
- });
289
-
290
- import.meta.hot.data._hotReload = import.meta.hot.data._hotReload || function(NewImpl) {
291
- // Skip reload if no instance has been created yet
292
- if (!${proxyVarName}) {
293
- ${implVarName} = NewImpl;
280
+
281
+ // Remember the latest accepted implementation so a proxy
282
+ // constructed *after* this update (its instantiation raced
283
+ // behind the HMR swap) still picks up the new class instead
284
+ // of the stale one captured at module-evaluation time.
285
+ import.meta.hot.data._impl = NewImpl;
286
+
287
+ const proxy = import.meta.hot.data._proxy;
288
+ if (!proxy) {
289
+ // No instance has been created yet; the next construction
290
+ // will read import.meta.hot.data._impl above.
294
291
  return;
295
292
  }
296
-
297
- const oldDelegate = ${proxyVarName}._delegate;
298
- ${implVarName} = NewImpl;
299
- const newDelegate = new ${implVarName}(${proxyVarName}._owner);
300
- ${proxyVarName}._delegate = newDelegate;
301
-
293
+
294
+ const oldDelegate = proxy._delegate;
295
+ const newDelegate = new NewImpl(proxy._owner);
296
+ proxy._delegate = newDelegate;
297
+
302
298
  // Sync state from old to new while keeping new implementation defaults
303
299
  for (const key in oldDelegate) {
304
300
  const descriptor =
@@ -307,17 +303,17 @@ export default function hotReplaceAst(babel) {
307
303
  const hasOwnDefault = Object.prototype.hasOwnProperty.call(newDelegate, key);
308
304
  const currentValue = newDelegate[key];
309
305
  const previousValue = oldDelegate[key];
310
-
306
+
311
307
  // Skip Service instances - they should not be synced
312
308
  if (previousValue instanceof Service) {
313
309
  continue;
314
310
  }
315
-
311
+
316
312
  // Skip Function properties - they should not be synced
317
313
  if (typeof previousValue === 'function') {
318
314
  continue;
319
315
  }
320
-
316
+
321
317
  const shouldSync =
322
318
  !!descriptor &&
323
319
  (descriptor.writable || descriptor.set || Object.prototype.hasOwnProperty.call(oldDelegate, key)) &&
@@ -333,11 +329,11 @@ export default function hotReplaceAst(babel) {
333
329
  }
334
330
 
335
331
  newDelegate._hmrAccepted?.(oldDelegate);
336
-
332
+
337
333
  if (oldDelegate.willDestroy) {
338
334
  oldDelegate.willDestroy();
339
335
  }
340
- };
336
+ });
341
337
  }
342
338
  `;
343
339
  const template = babel.template.statements(hmrCode);
package/dist/lib/hmr.js CHANGED
@@ -15,26 +15,51 @@ const traverse = traverseModule.default || traverseModule;
15
15
  import { readFile } from 'fs/promises';
16
16
  const __filename = fileURLToPath(import.meta.url);
17
17
  const __dirname = path.dirname(__filename);
18
+ // Above this many distinct named blocks, fall back to forwarding all of them
19
+ // unconditionally rather than generating an exponential number of branches
20
+ // (see generateInvocations below for why branching is needed at all).
21
+ const MAX_COMBINATORIAL_YIELDS = 8;
22
+ function blockTag(y) {
23
+ return `<:${y} as |a b c d e f g h i j k l|>{{yield a b c d e f g h i j k l to='${y}'}}</:${y}>`;
24
+ }
25
+ function invocation(selected) {
26
+ if (!selected.length) {
27
+ return `<this.curried @__hot__={{this.hot}} ...attributes />`;
28
+ }
29
+ return `<this.curried @__hot__={{this.hot}} ...attributes>${selected.map(blockTag).join('\n')}</this.curried>`;
30
+ }
31
+ // Glimmer determines a target component's `(has-block "y")` purely from
32
+ // whether a `<:y>` named block tag is structurally present on the
33
+ // invocation, not from whether that block's content renders anything, and
34
+ // named block tags cannot be nested inside `{{#if}}` (a "named block nested
35
+ // in a normal block" compile error). So a per-block `{{#if (has-block 'y')}}
36
+ // <:y>...</:y>{{/if}}` inside a single invocation can't work — instead this
37
+ // recursively branches on `(has-block y)` for each known named block to
38
+ // build one fully static invocation per combination of blocks the caller
39
+ // actually passed, so blocks not passed are truly absent rather than merely
40
+ // empty (see #531).
41
+ function generateInvocations(remaining, selected) {
42
+ if (!remaining.length) {
43
+ return invocation(selected);
44
+ }
45
+ const [y, ...rest] = remaining;
46
+ return `{{#if (has-block '${y}')}}${generateInvocations(rest, [...selected, y])}{{else}}${generateInvocations(rest, selected)}{{/if}}`;
47
+ }
18
48
  function generateContent(yields) {
19
49
  if (!yields.includes('default')) {
20
50
  yields.push('default');
21
51
  }
22
- let all = yields.map((y) => `(has-block '${y}')`).join(' ');
23
- let str = '';
24
- for (const y of yields) {
25
- str += `
26
- <:${y} as |a b c d e f g h i j k l|>{{yield a b c d e f g h i j k l to='${y}'}}</:${y}>
27
- `;
28
- }
29
- return `
52
+ if (yields.length > MAX_COMBINATORIAL_YIELDS) {
53
+ let all = yields.map((y) => `(has-block '${y}')`).join(' ');
54
+ return `
30
55
  {{#if (notAny ${all})}}
31
56
  <this.curried @__hot__={{this.hot}} ...attributes />
32
57
  {{else}}
33
- <this.curried @__hot__={{this.hot}} ...attributes >
34
- ${str}
35
- </this.curried>
58
+ ${invocation(yields)}
36
59
  {{/if}}
37
60
  `;
61
+ }
62
+ return generateInvocations(yields, []);
38
63
  }
39
64
  const getHotComponent = (imp, specifier, yields) => `
40
65
  import { ${specifier} as TargetComponent } from "${imp}";
@@ -164,11 +189,15 @@ export function hmr(enableViteHmrForModes = ['development']) {
164
189
  name: 'hmr-plugin',
165
190
  enforce: 'post',
166
191
  config(_config, env) {
167
- // The per-component hot wrapper (see getHotComponent) imports these, but
168
- // it is generated/served on demand, so it is never part of the static
169
- // module graph Vite's dependency scanner crawls on the first pass.
170
- // Without pre-declaring them, the browser requests them on boot, Vite
171
- // discovers "new" deps and triggers a re-optimize + full page reload.
192
+ // The per-component hot wrapper (see getHotComponent) imports the first
193
+ // four of these, but it is generated/served on demand, so it is never
194
+ // part of the static module graph Vite's dependency scanner crawls on
195
+ // the first pass. `@ember/component/template-only` has the same
196
+ // problem for a different reason: it's injected by the template
197
+ // compiler into a template-only component's compiled output, which the
198
+ // scanner (source-only) never sees either. Without pre-declaring them,
199
+ // the browser requests them on boot, Vite discovers "new" deps and
200
+ // triggers a re-optimize + full page reload.
172
201
  //
173
202
  // We must use the Embroider-rewritten `ember-source/...` subpaths: the
174
203
  // bare `@glimmer/reference` etc. specifiers the wrapper writes cannot be
@@ -185,6 +214,7 @@ export function hmr(enableViteHmrForModes = ['development']) {
185
214
  'ember-source/@glimmer/runtime/index.js',
186
215
  'ember-source/@ember/destroyable/index.js',
187
216
  'ember-source/@glimmer/manager/index.js',
217
+ 'ember-source/@ember/component/template-only.js',
188
218
  ],
189
219
  },
190
220
  };
@@ -256,7 +286,16 @@ export function hmr(enableViteHmrForModes = ['development']) {
256
286
  let yieldSourceContent = content;
257
287
  const templateImportMatch = content === null || content === void 0 ? void 0 : content.match(/\bfrom\s*['"]([^'"]+\.hbs(?:\?[^'"]*)?)['"]/);
258
288
  if (templateImportMatch) {
259
- const templateSpecifier = templateImportMatch[1];
289
+ // The compiled backing class embeds the template import as a
290
+ // browser-facing URL (i.e. prefixed with the configured vite
291
+ // `base`), since that's what gets sent to the client. But
292
+ // `server.transformRequest` is an internal API keyed by root-
293
+ // relative ids, so the base has to be stripped back off before
294
+ // reusing that specifier here, or this 404s under a non-root base.
295
+ let templateSpecifier = templateImportMatch[1];
296
+ if (base !== '/' && templateSpecifier.startsWith(base)) {
297
+ templateSpecifier = `/${templateSpecifier.slice(base.length)}`;
298
+ }
260
299
  const templateRes = yield server.transformRequest(templateSpecifier);
261
300
  yieldSourceFilename = templateSpecifier;
262
301
  yieldSourceContent = templateRes === null || templateRes === void 0 ? void 0 : templateRes.code;
@@ -464,7 +503,17 @@ export function hmr(enableViteHmrForModes = ['development']) {
464
503
  hotReloadStatements.push(`
465
504
  (async () => {
466
505
  const GlimmerComponent = (await import('@glimmer/component')).default;
467
- if (${imp.local}.prototype instanceof GlimmerComponent) {
506
+ const { hasInternalComponentManager } = await import('@glimmer/manager');
507
+ // Class-based Glimmer components are functions, detected the cheap way
508
+ // via prototype chain. Template-only components (no backing class, e.g.
509
+ // a bare \`<template>\` export) are plain objects instead, so they have to
510
+ // be recognized by checking for a registered component manager - that
511
+ // also keeps helpers/modifiers (which use separate manager registries)
512
+ // out of this branch.
513
+ const isComponent = typeof ${imp.local} === 'function'
514
+ ? ${imp.local}.prototype instanceof GlimmerComponent
515
+ : typeof ${imp.local} === 'object' && ${imp.local} !== null && hasInternalComponentManager(${imp.local});
516
+ if (isComponent) {
468
517
  const c = await import('${virtualPath}');
469
518
  ${importVar}.${imp.local} = c.default;
470
519
  import.meta.hot.accept('${virtualPath}', (c) => {
@@ -1,3 +1,7 @@
1
+ // Matches the app/addon-relative portion of a path once it reaches one of
2
+ // the directories ember-vite-hmr hot-reloads, e.g. the `app/templates/...`
3
+ // in `/Users/me/project/app/templates/application.hbs`.
4
+ const APP_RELATIVE_ID = /(?:^|\/)((?:app|addon)\/(?:routes?|routers|controllers|templates|services)\/.*)$/;
1
5
  function moduleIdFromUrl(moduleUrl) {
2
6
  let id = moduleUrl.split('?')[0];
3
7
  try {
@@ -12,7 +16,19 @@ function moduleIdFromUrl(moduleUrl) {
12
16
  if (base !== '/' && id.startsWith(base)) {
13
17
  id = id.slice(base.length);
14
18
  }
15
- return id.replace(/^\//, '');
19
+ id = id.replace(/^\//, '');
20
+ // Outside of vite's own dev server (e.g. a Node ESM loader running the
21
+ // app directly against on-disk `file://` URLs, with no server `base` to
22
+ // strip) `id` is still the full OS path up to the project root instead
23
+ // of a server-relative one. Re-anchor it to the nearest hot-reloadable
24
+ // directory so consumers that key off ids like `app/templates/...`
25
+ // (ViteHotReloadService's `startsWith('app/templates/')` check) keep
26
+ // working no matter where the checkout lives on disk.
27
+ const rooted = id.match(APP_RELATIVE_ID);
28
+ if (rooted) {
29
+ id = rooted[1];
30
+ }
31
+ return id;
16
32
  }
17
33
  if (import.meta.hot) {
18
34
  const ModuleMap = new Map();
@@ -94,4 +110,6 @@ if (import.meta.hot) {
94
110
  }
95
111
  };
96
112
  }
113
+
114
+ export { moduleIdFromUrl };
97
115
  //# sourceMappingURL=setup-ember-hmr.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"setup-ember-hmr.js","sources":["../src/setup-ember-hmr.ts"],"sourcesContent":["import type { Module } from '../types/global';\n\nfunction moduleIdFromUrl(moduleUrl: string) {\n let id = moduleUrl.split('?')[0]!;\n try {\n // covers http/https and URLs without an explicit port\n id = new URL(id).pathname;\n } catch {\n // not an absolute URL, keep as-is\n }\n // strip vite's `base` so ids are stable (`app/templates/...`) no matter\n // what base the app is served under\n const base = import.meta.env.BASE_URL || '/';\n if (base !== '/' && id.startsWith(base)) {\n id = id.slice(base.length);\n }\n return id.replace(/^\\//, '');\n}\n\nif (import.meta.hot) {\n const ModuleMap = new Map();\n\n globalThis.emberHotReloadPlugin = {\n modulePrefix: '',\n podModulePrefix: '',\n Resolver: null,\n _accepting: 0,\n changed: {} as Record<string, { old: Module; new: Module }>,\n subscribers: [],\n version: 1,\n routerVersion: 1,\n moduleDepCallbacks: {},\n versionMap: {},\n\n clear(module: Module) {\n this.moduleDepCallbacks[module.id] = {};\n },\n register(module: Module, dep: string, callback: () => void) {\n dep = dep.replace(\n new RegExp(`^${globalThis.emberHotReloadPlugin.modulePrefix}/`),\n './',\n );\n this.moduleDepCallbacks[module.id]![dep] =\n this.moduleDepCallbacks[module.id]![dep] || ([] as (() => void)[]);\n this.moduleDepCallbacks[module.id]![dep]!.push(callback);\n },\n loadNew(oldModule: Module, newModule: Module) {\n ModuleMap.set(newModule.id, newModule);\n this.versionMap[newModule.id] = newModule.version;\n const entry = Object.entries(\n this.Resolver.explicitModules as Record<string, { default?: unknown }>,\n ).find(([_name, module]) => module.default === oldModule.exports.default);\n if (!entry) return;\n this.Resolver.explicitModules[entry[0]] = newModule.exports;\n },\n\n __import(moduleUrl: string) {\n return import(/* @vite-ignore */ moduleUrl);\n },\n\n async canAcceptNew(moduleUrl: string) {\n this._accepting += 1;\n const m = await this.__import(moduleUrl);\n const module: Module = {\n exports: m,\n id: moduleIdFromUrl(moduleUrl),\n version: 0,\n };\n this._accepting -= 1;\n if (this._accepting === 0) {\n globalThis.setTimeout(() => this.notifyNew(), 0);\n }\n let ok =\n module.id.includes('/routes/') ||\n module.id.includes('/routers/') ||\n module.id.includes('/controllers/') ||\n module.id.includes('/templates/') ||\n module.id.includes('/services/') ||\n module.id.match(/controller\\.(js|ts)$/) ||\n module.id.match(/route\\.(js|ts|gts)$/);\n if (!ok) {\n return false;\n }\n\n if (module.id.includes('templates') && module.id.includes('components')) {\n return false;\n }\n\n if (ModuleMap.get(module.id)) {\n this.changed[module.id] = {\n old: ModuleMap.get(module.id),\n new: module,\n };\n } else {\n ModuleMap.set(module.id, module);\n }\n module.version = this.version;\n return true;\n },\n notifyNew() {\n this.version += 1;\n (\n Object.values(this.changed) as Array<{ old: Module; new: Module }>\n ).forEach((change) => {\n this.loadNew(change.old, change.new);\n this.subscribers.forEach(\n (fn: (oldModule: Module, newModule: Module) => void) =>\n fn(change.old, change.new),\n );\n });\n this.changed = {};\n },\n subscribe(fn: (oldModule: Module, newModule: Module) => void) {\n this.subscribers.push(fn);\n },\n unsubscribe(fn: (oldModule: Module, newModule: Module) => void) {\n const idx = this.subscribers.indexOf(fn);\n if (idx >= 0) {\n this.subscribers.splice(idx, 1);\n }\n },\n };\n}\n"],"names":["moduleIdFromUrl","moduleUrl","id","split","URL","pathname","base","import","meta","env","BASE_URL","startsWith","slice","length","replace","hot","ModuleMap","Map","globalThis","emberHotReloadPlugin","modulePrefix","podModulePrefix","Resolver","_accepting","changed","subscribers","version","routerVersion","moduleDepCallbacks","versionMap","clear","module","register","dep","callback","RegExp","push","loadNew","oldModule","newModule","set","entry","Object","entries","explicitModules","find","_name","default","exports","__import","canAcceptNew","m","setTimeout","notifyNew","ok","includes","match","get","old","new","values","forEach","change","fn","subscribe","unsubscribe","idx","indexOf","splice"],"mappings":"AAEA,SAASA,eAAeA,CAACC,SAAiB,EAAE;EAC1C,IAAIC,EAAE,GAAGD,SAAS,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE;E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ACwB,GAAG,CAACT,MAAM,CAAC7B,EAAE,EAAE6B,MAAM,CAAC;AAClC,MAAA;AACAA,MAAAA,MAAM,CAACL,OAAO,GAAG,IAAI,CAACA,OAAO;AAC7B,MAAA,OAAO,IAAI;IACb,CAAC;AACD2B,IAAAA,SAASA,GAAG;MACV,IAAI,CAAC3B,OAAO,IAAI,CAAC;MAEfgB,MAAM,CAACkB,MAAM,CAAC,IAAI,CAACpC,OAAO,CAAC,CAC3BqC,OAAO,CAAEC,MAAM,IAAK;QACpB,IAAI,CAACzB,OAAO,CAACyB,MAAM,CAACJ,GAAG,EAAEI,MAAM,CAACH,GAAG,CAAC;AACpC,QAAA,IAAI,CAAClC,WAAW,CAACoC,OAAO,CACrBE,EAAkD,IACjDA,EAAE,CAACD,MAAM,CAACJ,GAAG,EAAEI,MAAM,CAACH,GAAG,CAC7B,CAAC;AACH,MAAA,CAAC,CAAC;AACF,MAAA,IAAI,CAACnC,OAAO,GAAG,EAAE;IACnB,CAAC;IACDwC,SAASA,CAACD,EAAkD,EAAE;AAC5D,MAAA,IAAI,CAACtC,WAAW,CAACW,IAAI,CAAC2B,EAAE,CAAC;IAC3B,CAAC;IACDE,WAAWA,CAACF,EAAkD,EAAE;MAC9D,MAAMG,GAAG,GAAG,IAAI,CAACzC,WAAW,CAAC0C,OAAO,CAACJ,EAAE,CAAC;MACxC,IAAIG,GAAG,IAAI,CAAC,EAAE;QACZ,IAAI,CAACzC,WAAW,CAAC2C,MAAM,CAACF,GAAG,EAAE,CAAC,CAAC;AACjC,MAAA;AACF,IAAA;GACD;AACH"}
1
+ {"version":3,"file":"setup-ember-hmr.js","sources":["../src/setup-ember-hmr.ts"],"sourcesContent":["import type { Module } from '../types/global';\n\n// Matches the app/addon-relative portion of a path once it reaches one of\n// the directories ember-vite-hmr hot-reloads, e.g. the `app/templates/...`\n// in `/Users/me/project/app/templates/application.hbs`.\nconst APP_RELATIVE_ID =\n /(?:^|\\/)((?:app|addon)\\/(?:routes?|routers|controllers|templates|services)\\/.*)$/;\n\nexport function moduleIdFromUrl(moduleUrl: string) {\n let id = moduleUrl.split('?')[0]!;\n try {\n // covers http/https and URLs without an explicit port\n id = new URL(id).pathname;\n } catch {\n // not an absolute URL, keep as-is\n }\n // strip vite's `base` so ids are stable (`app/templates/...`) no matter\n // what base the app is served under\n const base = import.meta.env.BASE_URL || '/';\n if (base !== '/' && id.startsWith(base)) {\n id = id.slice(base.length);\n }\n id = id.replace(/^\\//, '');\n // Outside of vite's own dev server (e.g. a Node ESM loader running the\n // app directly against on-disk `file://` URLs, with no server `base` to\n // strip) `id` is still the full OS path up to the project root instead\n // of a server-relative one. Re-anchor it to the nearest hot-reloadable\n // directory so consumers that key off ids like `app/templates/...`\n // (ViteHotReloadService's `startsWith('app/templates/')` check) keep\n // working no matter where the checkout lives on disk.\n const rooted = id.match(APP_RELATIVE_ID);\n if (rooted) {\n id = rooted[1]!;\n }\n return id;\n}\n\nif (import.meta.hot) {\n const ModuleMap = new Map();\n\n globalThis.emberHotReloadPlugin = {\n modulePrefix: '',\n podModulePrefix: '',\n Resolver: null,\n _accepting: 0,\n changed: {} as Record<string, { old: Module; new: Module }>,\n subscribers: [],\n version: 1,\n routerVersion: 1,\n moduleDepCallbacks: {},\n versionMap: {},\n\n clear(module: Module) {\n this.moduleDepCallbacks[module.id] = {};\n },\n register(module: Module, dep: string, callback: () => void) {\n dep = dep.replace(\n new RegExp(`^${globalThis.emberHotReloadPlugin.modulePrefix}/`),\n './',\n );\n this.moduleDepCallbacks[module.id]![dep] =\n this.moduleDepCallbacks[module.id]![dep] || ([] as (() => void)[]);\n this.moduleDepCallbacks[module.id]![dep]!.push(callback);\n },\n loadNew(oldModule: Module, newModule: Module) {\n ModuleMap.set(newModule.id, newModule);\n this.versionMap[newModule.id] = newModule.version;\n const entry = Object.entries(\n this.Resolver.explicitModules as Record<string, { default?: unknown }>,\n ).find(([_name, module]) => module.default === oldModule.exports.default);\n if (!entry) return;\n this.Resolver.explicitModules[entry[0]] = newModule.exports;\n },\n\n __import(moduleUrl: string) {\n return import(/* @vite-ignore */ moduleUrl);\n },\n\n async canAcceptNew(moduleUrl: string) {\n this._accepting += 1;\n const m = await this.__import(moduleUrl);\n const module: Module = {\n exports: m,\n id: moduleIdFromUrl(moduleUrl),\n version: 0,\n };\n this._accepting -= 1;\n if (this._accepting === 0) {\n globalThis.setTimeout(() => this.notifyNew(), 0);\n }\n let ok =\n module.id.includes('/routes/') ||\n module.id.includes('/routers/') ||\n module.id.includes('/controllers/') ||\n module.id.includes('/templates/') ||\n module.id.includes('/services/') ||\n module.id.match(/controller\\.(js|ts)$/) ||\n module.id.match(/route\\.(js|ts|gts)$/);\n if (!ok) {\n return false;\n }\n\n if (module.id.includes('templates') && module.id.includes('components')) {\n return false;\n }\n\n if (ModuleMap.get(module.id)) {\n this.changed[module.id] = {\n old: ModuleMap.get(module.id),\n new: module,\n };\n } else {\n ModuleMap.set(module.id, module);\n }\n module.version = this.version;\n return true;\n },\n notifyNew() {\n this.version += 1;\n (\n Object.values(this.changed) as Array<{ old: Module; new: Module }>\n ).forEach((change) => {\n this.loadNew(change.old, change.new);\n this.subscribers.forEach(\n (fn: (oldModule: Module, newModule: Module) => void) =>\n fn(change.old, change.new),\n );\n });\n this.changed = {};\n },\n subscribe(fn: (oldModule: Module, newModule: Module) => void) {\n this.subscribers.push(fn);\n },\n unsubscribe(fn: (oldModule: Module, newModule: Module) => void) {\n const idx = this.subscribers.indexOf(fn);\n if (idx >= 0) {\n this.subscribers.splice(idx, 1);\n }\n },\n };\n}\n"],"names":["APP_RELATIVE_ID","moduleIdFromUrl","moduleUrl","id","split","URL","pathname","base","import","meta","env","BASE_URL","startsWith","slice","length","replace","rooted","match","hot","ModuleMap","Map","globalThis","emberHotReloadPlugin","modulePrefix","podModulePrefix","Resolver","_accepting","changed","subscribers","version","routerVersion","moduleDepCallbacks","versionMap","clear","module","register","dep","callback","RegExp","push","loadNew","oldModule","newModule","set","entry","Object","entries","explicitModules","find","_name","default","exports","__import","canAcceptNew","m","setTimeout","notifyNew","ok","includes","get","old","new","values","forEach","change","fn","subscribe","unsubscribe","idx","indexOf","splice"],"mappings":"AAEA;AACA;AACA;AACA,MAAMA,eAAe,GACnB,kFAAkF;AAE7E,SAASC,eAAeA,CAACC,SAAiB,EAAE;EACjD,IAAIC,EAAE,GAAGD,SAAS,CAACE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE;EACjC,IAAI;AACF;AACAD,IAAAA,EAAE,GAAG,IAAIE,GAAG,CAACF,EAAE,CAAC,CAACG,QAAQ;AAC3B,EAAA,CAAC,CAAC,MAAM;AACN;AAAA,EAAA;AAEF;AACA;EACA,MAAMC,IAAI,GAAGC,MAAM,CAACC,IAAI,CAACC,GAAG,CAACC,QAAQ,IAAI,GAAG;EAC5C,IAAIJ,IAAI,KAAK,GAAG,IAAIJ,EAAE,CAACS,UAAU,CAACL,IAAI,CAAC,EAAE;IACvCJ,EAAE,GAAGA,EAAE,CAACU,KAAK,CAACN,IAAI,CAACO,MAAM,CAAC;AAC5B,EAAA;EACAX,EAAE,GAAGA,EAAE,CAACY,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,MAAMC,MAAM,GAAGb,EAAE,CAACc,KAAK,CAACjB,eAAe,CAAC;AACxC,EAAA,IAAIgB,MAAM,EAAE;AACVb,IAAAA,EAAE,GAAGa,MAAM,CAAC,CAAC,CAAE;AACjB,EAAA;AACA,EAAA,OAAOb,EAAE;AACX;AAEA,IAAIK,MAAM,CAACC,IAAI,CAACS,GAAG,EAAE;AACnB,EAAA,MAAMC,SAAS,GAAG,IAAIC,GAAG,EAAE;EAE3BC,UAAU,CAACC,oBAAoB,GAAG;AAChCC,IAAAA,YAAY,EAAE,EAAE;AAChBC,IAAAA,eAAe,EAAE,EAAE;AACnBC,IAAAA,QAAQ,EAAE,IAAI;AACdC,IAAAA,UAAU,EAAE,CAAC;IACbC,OAAO,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AkD,EAAE;MAC9D,MAAMG,GAAG,GAAG,IAAI,CAACxC,WAAW,CAACyC,OAAO,CAACJ,EAAE,CAAC;MACxC,IAAIG,GAAG,IAAI,CAAC,EAAE;QACZ,IAAI,CAACxC,WAAW,CAAC0C,MAAM,CAACF,GAAG,EAAE,CAAC,CAAC;AACjC,MAAA;AACF,IAAA;GACD;AACH;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-vite-hmr",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "private": false,
5
5
  "description": "provides hmr support for ember apps",
6
6
  "keywords": [
@@ -83,7 +83,7 @@
83
83
  "content-tag": "^4.0.0",
84
84
  "ember-cli-htmlbars": "^6.3.0",
85
85
  "ember-resolver": "^13.2.0",
86
- "ember-source": "^7.0.0",
86
+ "ember-source": "^7.1.0",
87
87
  "ember-template-lint": "^7.9.3",
88
88
  "eslint": "^9.39.4",
89
89
  "eslint-config-prettier": "^10.1.8",