ember-vite-hmr 2.2.1 → 2.2.2
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.
- package/dist/lib/babel-plugin.js +66 -70
- package/dist/lib/hmr.js +31 -7
- package/dist/setup-ember-hmr.js +19 -1
- package/dist/setup-ember-hmr.js.map +1 -1
- package/package.json +2 -2
package/dist/lib/babel-plugin.js
CHANGED
|
@@ -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
|
-
|
|
214
|
-
t.classMethod('
|
|
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
|
|
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
|
-
|
|
286
|
-
|
|
276
|
+
const NewImpl = newModule?.default?.Impl;
|
|
277
|
+
if (!NewImpl) {
|
|
278
|
+
return;
|
|
287
279
|
}
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
//
|
|
292
|
-
|
|
293
|
-
|
|
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 =
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
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
|
@@ -164,11 +164,15 @@ export function hmr(enableViteHmrForModes = ['development']) {
|
|
|
164
164
|
name: 'hmr-plugin',
|
|
165
165
|
enforce: 'post',
|
|
166
166
|
config(_config, env) {
|
|
167
|
-
// The per-component hot wrapper (see getHotComponent) imports
|
|
168
|
-
// it is generated/served on demand, so it is never
|
|
169
|
-
// module graph Vite's dependency scanner crawls on
|
|
170
|
-
//
|
|
171
|
-
//
|
|
167
|
+
// The per-component hot wrapper (see getHotComponent) imports the first
|
|
168
|
+
// four of these, but it is generated/served on demand, so it is never
|
|
169
|
+
// part of the static module graph Vite's dependency scanner crawls on
|
|
170
|
+
// the first pass. `@ember/component/template-only` has the same
|
|
171
|
+
// problem for a different reason: it's injected by the template
|
|
172
|
+
// compiler into a template-only component's compiled output, which the
|
|
173
|
+
// scanner (source-only) never sees either. Without pre-declaring them,
|
|
174
|
+
// the browser requests them on boot, Vite discovers "new" deps and
|
|
175
|
+
// triggers a re-optimize + full page reload.
|
|
172
176
|
//
|
|
173
177
|
// We must use the Embroider-rewritten `ember-source/...` subpaths: the
|
|
174
178
|
// bare `@glimmer/reference` etc. specifiers the wrapper writes cannot be
|
|
@@ -185,6 +189,7 @@ export function hmr(enableViteHmrForModes = ['development']) {
|
|
|
185
189
|
'ember-source/@glimmer/runtime/index.js',
|
|
186
190
|
'ember-source/@ember/destroyable/index.js',
|
|
187
191
|
'ember-source/@glimmer/manager/index.js',
|
|
192
|
+
'ember-source/@ember/component/template-only.js',
|
|
188
193
|
],
|
|
189
194
|
},
|
|
190
195
|
};
|
|
@@ -256,7 +261,16 @@ export function hmr(enableViteHmrForModes = ['development']) {
|
|
|
256
261
|
let yieldSourceContent = content;
|
|
257
262
|
const templateImportMatch = content === null || content === void 0 ? void 0 : content.match(/\bfrom\s*['"]([^'"]+\.hbs(?:\?[^'"]*)?)['"]/);
|
|
258
263
|
if (templateImportMatch) {
|
|
259
|
-
|
|
264
|
+
// The compiled backing class embeds the template import as a
|
|
265
|
+
// browser-facing URL (i.e. prefixed with the configured vite
|
|
266
|
+
// `base`), since that's what gets sent to the client. But
|
|
267
|
+
// `server.transformRequest` is an internal API keyed by root-
|
|
268
|
+
// relative ids, so the base has to be stripped back off before
|
|
269
|
+
// reusing that specifier here, or this 404s under a non-root base.
|
|
270
|
+
let templateSpecifier = templateImportMatch[1];
|
|
271
|
+
if (base !== '/' && templateSpecifier.startsWith(base)) {
|
|
272
|
+
templateSpecifier = `/${templateSpecifier.slice(base.length)}`;
|
|
273
|
+
}
|
|
260
274
|
const templateRes = yield server.transformRequest(templateSpecifier);
|
|
261
275
|
yieldSourceFilename = templateSpecifier;
|
|
262
276
|
yieldSourceContent = templateRes === null || templateRes === void 0 ? void 0 : templateRes.code;
|
|
@@ -464,7 +478,17 @@ export function hmr(enableViteHmrForModes = ['development']) {
|
|
|
464
478
|
hotReloadStatements.push(`
|
|
465
479
|
(async () => {
|
|
466
480
|
const GlimmerComponent = (await import('@glimmer/component')).default;
|
|
467
|
-
|
|
481
|
+
const { hasInternalComponentManager } = await import('@glimmer/manager');
|
|
482
|
+
// Class-based Glimmer components are functions, detected the cheap way
|
|
483
|
+
// via prototype chain. Template-only components (no backing class, e.g.
|
|
484
|
+
// a bare \`<template>\` export) are plain objects instead, so they have to
|
|
485
|
+
// be recognized by checking for a registered component manager - that
|
|
486
|
+
// also keeps helpers/modifiers (which use separate manager registries)
|
|
487
|
+
// out of this branch.
|
|
488
|
+
const isComponent = typeof ${imp.local} === 'function'
|
|
489
|
+
? ${imp.local}.prototype instanceof GlimmerComponent
|
|
490
|
+
: typeof ${imp.local} === 'object' && ${imp.local} !== null && hasInternalComponentManager(${imp.local});
|
|
491
|
+
if (isComponent) {
|
|
468
492
|
const c = await import('${virtualPath}');
|
|
469
493
|
${importVar}.${imp.local} = c.default;
|
|
470
494
|
import.meta.hot.accept('${virtualPath}', (c) => {
|
package/dist/setup-ember-hmr.js
CHANGED
|
@@ -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
|
-
|
|
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;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;AACA,EAAA,OAAOX,EAAE,CAACY,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;AAC9B;AAEA,IAAIP,MAAM,CAACC,IAAI,CAACO,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,EAAE,EAAkD;AAC3DC,IAAAA,WAAW,EAAE,EAAE;AACfC,IAAAA,OAAO,EAAE,CAAC;AACVC,IAAAA,aAAa,EAAE,CAAC;IAChBC,kBAAkB,EAAE,EAAE;IACtBC,UAAU,EAAE,EAAE;IAEdC,KAAKA,CAACC,MAAc,EAAE;MACpB,IAAI,CAACH,kBAAkB,CAACG,MAAM,CAAC7B,E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
|
+
{"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,CAAC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GAAG,EAAEI,MAAM,CAACH,GAAG,CAC7B,CAAC;AACH,MAAA,CAAC,CAAC;AACF,MAAA,IAAI,CAAClC,OAAO,GAAG,EAAE;IACnB,CAAC;IACDuC,SAASA,CAACD,EAAkD,EAAE;AAC5D,MAAA,IAAI,CAACrC,WAAW,CAACW,IAAI,CAAC0B,EAAE,CAAC;IAC3B,CAAC;IACDE,WAAWA,CAACF,EAAkD,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.
|
|
3
|
+
"version": "2.2.2",
|
|
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.
|
|
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",
|