ember-vite-hmr 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1 @@
1
+ export { default } from "ember-vite-hmr/initializers/vite-hot-reload";
@@ -0,0 +1 @@
1
+ export { default } from "ember-vite-hmr/services/vite-hot-reload";
@@ -0,0 +1,15 @@
1
+ function initialize(application) {
2
+ application.__container__.lookup('service:vite-hot-reload');
3
+ const resolver = application.__registry__.resolver._fallback || application.__registry__.resolver;
4
+ const resolverResolve = resolver.resolve;
5
+ resolver.resolve = function (name) {
6
+ name = name.replace(/--hot-version--.*$/, '');
7
+ return resolverResolve.call(this, name);
8
+ };
9
+ }
10
+ var viteHotReload = {
11
+ initialize
12
+ };
13
+
14
+ export { viteHotReload as default, initialize };
15
+ //# sourceMappingURL=vite-hot-reload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite-hot-reload.js","sources":["../../src/initializers/vite-hot-reload.ts"],"sourcesContent":["export function initialize(application) {\n application.__container__.lookup('service:vite-hot-reload');\n const resolver =\n application.__registry__.resolver._fallback ||\n application.__registry__.resolver;\n const resolverResolve = resolver.resolve;\n resolver.resolve = function (name) {\n name = name.replace(/--hot-version--.*$/, '');\n return resolverResolve.call(this, name);\n };\n}\n\nexport default {\n initialize,\n};\n"],"names":["initialize","application","__container__","lookup","resolver","__registry__","_fallback","resolverResolve","resolve","name","replace","call"],"mappings":"AAAO,SAASA,UAAUA,CAACC,WAAW,EAAE;AACtCA,EAAAA,WAAW,CAACC,aAAa,CAACC,MAAM,CAAC,yBAAyB,CAAC,CAAA;AAC3D,EAAA,MAAMC,QAAQ,GACZH,WAAW,CAACI,YAAY,CAACD,QAAQ,CAACE,SAAS,IAC3CL,WAAW,CAACI,YAAY,CAACD,QAAQ,CAAA;AACnC,EAAA,MAAMG,eAAe,GAAGH,QAAQ,CAACI,OAAO,CAAA;AACxCJ,EAAAA,QAAQ,CAACI,OAAO,GAAG,UAAUC,IAAI,EAAE;IACjCA,IAAI,GAAGA,IAAI,CAACC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAA;AAC7C,IAAA,OAAOH,eAAe,CAACI,IAAI,CAAC,IAAI,EAAEF,IAAI,CAAC,CAAA;GACxC,CAAA;AACH,CAAA;AAEA,oBAAe;AACbT,EAAAA,UAAAA;AACF,CAAC;;;;"}
@@ -0,0 +1,202 @@
1
+ import Service, { service } from '@ember/service';
2
+ import { getOwner } from '@ember/owner';
3
+ import '@ember/routing/router-service';
4
+ import Router from '@ember/routing/route';
5
+ import Controller from '@ember/controller';
6
+
7
+ function _initializerWarningHelper(descriptor, context) {
8
+ throw new Error('Decorating class property failed. Please ensure that ' + 'transform-class-properties is enabled and runs after the decorators transform.');
9
+ }
10
+ function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
11
+ var desc = {};
12
+ Object.keys(descriptor).forEach(function (key) {
13
+ desc[key] = descriptor[key];
14
+ });
15
+ desc.enumerable = !!desc.enumerable;
16
+ desc.configurable = !!desc.configurable;
17
+ if ('value' in desc || desc.initializer) {
18
+ desc.writable = true;
19
+ }
20
+ desc = decorators.slice().reverse().reduce(function (desc, decorator) {
21
+ return decorator(target, property, desc) || desc;
22
+ }, desc);
23
+ if (context && desc.initializer !== void 0) {
24
+ desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
25
+ desc.initializer = undefined;
26
+ }
27
+ if (desc.initializer === void 0) {
28
+ Object.defineProperty(target, property, desc);
29
+ desc = null;
30
+ }
31
+ return desc;
32
+ }
33
+
34
+ var _dec, _class;
35
+ const ChangeMap = new WeakMap();
36
+ function getLatestChange(obj) {
37
+ while (ChangeMap.has(obj)) {
38
+ obj = ChangeMap.get(obj);
39
+ }
40
+ return obj;
41
+ }
42
+ let modulePrefix;
43
+ let podModulePrefix;
44
+ if (import.meta.hot) {
45
+ const ModuleMap = new Map();
46
+ window.emberHotReloadPlugin = {
47
+ _accepting: 0,
48
+ changed: {},
49
+ subscribers: [],
50
+ version: 1,
51
+ moduleDepCallbacks: {},
52
+ versionMap: {},
53
+ clear(module) {
54
+ this.moduleDepCallbacks[module.id] = {};
55
+ },
56
+ register(module, dep, callback) {
57
+ dep = dep.replace(new RegExp(`^${modulePrefix}/`), './');
58
+ this.moduleDepCallbacks[module.id][dep] = this.moduleDepCallbacks[module.id][dep] || [];
59
+ this.moduleDepCallbacks[module.id][dep].push(callback);
60
+ },
61
+ loadNew(oldModule, newModule) {
62
+ this.versionMap[newModule.id] = newModule.version;
63
+ const entry = Object.values(requirejs.entries).find(module => module.module.exports.default === oldModule.exports.default);
64
+ if (!entry) return;
65
+ entry.module = {
66
+ id: newModule.id,
67
+ exports: newModule.exports,
68
+ version: newModule.version
69
+ };
70
+ },
71
+ __import(moduleUrl) {
72
+ return import( /* @vite-ignore */moduleUrl);
73
+ },
74
+ async canAcceptNew(moduleUrl) {
75
+ this._accepting += 1;
76
+ const m = await this.__import(moduleUrl);
77
+ const module = {
78
+ exports: m,
79
+ id: moduleUrl.split('?')[0],
80
+ version: 0
81
+ };
82
+ this._accepting -= 1;
83
+ if (this._accepting === 0) {
84
+ setTimeout(() => this.notifyNew(), 0);
85
+ }
86
+ let ok = module.id.includes('/routes/') || module.id.includes('/routers/') || module.id.includes('/controllers/') || module.id.match(/controller\.(js|ts)$/) || module.id.match(/route\.(js|ts|gts)$/);
87
+ if (!ok) {
88
+ return false;
89
+ }
90
+ if (ModuleMap.get(module.id)) {
91
+ this.changed[module.id] = {
92
+ old: ModuleMap.get(module.id),
93
+ new: module
94
+ };
95
+ }
96
+ module.version = this.version;
97
+ ModuleMap.set(module.id, module);
98
+ return true;
99
+ },
100
+ notifyNew() {
101
+ this.version += 1;
102
+ Object.values(this.changed).forEach(change => {
103
+ this.loadNew(change.old, change.new);
104
+ this.subscribers.forEach(fn => fn(change.old, change.new));
105
+ });
106
+ this.changed = {};
107
+ },
108
+ subscribe(fn) {
109
+ this.subscribers.push(fn);
110
+ },
111
+ unsubscribe(fn) {
112
+ const idx = this.subscribers.indexOf(fn);
113
+ if (idx >= 0) {
114
+ this.subscribers.splice(idx, 1);
115
+ }
116
+ }
117
+ };
118
+ }
119
+ let ViteHotReloadService = (_dec = service(), (_class = class ViteHotReloadService extends Service {
120
+ router = _initializerWarningHelper();
121
+ init() {
122
+ super.init();
123
+ if (!window.emberHotReloadPlugin) return;
124
+ modulePrefix = getOwner(this).application.modulePrefix;
125
+ podModulePrefix = getOwner(this).application.podModulePrefix;
126
+ if (import.meta.hot) {
127
+ import.meta.hot.on('vite:beforeUpdate', options => {
128
+ options.updates = options.updates.filter(u => !u.path.startsWith(`/assets/${modulePrefix}.js`));
129
+ });
130
+ }
131
+ this.router._router;
132
+ Object.defineProperty(this.router._router, '_routerMicrolib', {
133
+ set(v) {
134
+ const getRoute = v.getRoute;
135
+ v.getRoute = function (name) {
136
+ const route = getRoute.call(this, `${name}--hot-version--${window.emberHotReloadPlugin.version}`);
137
+ route.fullRouteName = route.fullRouteName.replace(/--hot-version--.*$/, '');
138
+ return route;
139
+ };
140
+ this.___routerMicrolib = v;
141
+ },
142
+ get() {
143
+ return this.___routerMicrolib;
144
+ }
145
+ });
146
+ this.container = getOwner(this)?.__container__;
147
+ window.emberHotReloadPlugin.subscribe((oldModule, newModule) => {
148
+ const types = ['route', 'controller', 'template', 'modifier', 'helper', 'component'];
149
+ Object.keys(this.container.cache).forEach(k => {
150
+ if (types.some(t => k.startsWith(`${t}:`))) {
151
+ delete this.container.cache[k];
152
+ }
153
+ });
154
+ Object.keys(this.container.factoryManagerCache).forEach(k => {
155
+ if (types.some(t => k.startsWith(`${t}:`))) {
156
+ delete this.container.factoryManagerCache[k];
157
+ }
158
+ });
159
+ Object.keys(this.container.registry._resolveCache).forEach(k => {
160
+ if (types.some(t => k.startsWith(`${t}:`))) {
161
+ delete this.container.registry._resolveCache[k];
162
+ }
163
+ });
164
+ Object.keys(this.container.validationCache).forEach(k => {
165
+ if (types.some(t => k.startsWith(`${t}:`))) {
166
+ delete this.container.validationCache[k];
167
+ }
168
+ });
169
+ Object.keys(this.container.registry.registrations).forEach(k => {
170
+ if (types.some(t => k.startsWith(`${t}:`))) {
171
+ delete this.container.registry.registrations[k];
172
+ }
173
+ });
174
+ if (oldModule.exports.default?.prototype && oldModule.exports.default.prototype instanceof Router) {
175
+ this.router.refresh();
176
+ }
177
+ if (oldModule.exports.default?.prototype && oldModule.exports.default.prototype instanceof Controller) {
178
+ this.router.refresh();
179
+ }
180
+ if (oldModule.id.startsWith('./templates/') && !oldModule.id.startsWith('./templates/components/')) {
181
+ this.router.refresh();
182
+ }
183
+ if (oldModule.id.startsWith(`./${podModulePrefix}/`)) {
184
+ this.router.refresh();
185
+ }
186
+ });
187
+ }
188
+ getLatestChange(obj) {
189
+ return getLatestChange(obj);
190
+ }
191
+ }, (_applyDecoratedDescriptor(_class.prototype, "router", [_dec], {
192
+ configurable: true,
193
+ enumerable: true,
194
+ writable: true,
195
+ initializer: null
196
+ })), _class));
197
+ // this service using `Owner.lookup('service:hot-reload')`, as well
198
+ // as to check when you pass the service name as an argument to the decorator,
199
+ // like `@service('hot-reload') declare altName: HotReloadService;`.
200
+
201
+ export { ViteHotReloadService as default };
202
+ //# sourceMappingURL=vite-hot-reload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vite-hot-reload.js","sources":["../../src/services/vite-hot-reload.ts"],"sourcesContent":["import Service, { service } from '@ember/service';\nimport { getOwner } from '@ember/owner';\nimport RouterService from '@ember/routing/router-service';\nimport Router from '@ember/routing/route';\nimport Controller from '@ember/controller';\n\nconst ChangeMap = new WeakMap();\n\nfunction getLatestChange(obj: any) {\n while (ChangeMap.has(obj)) {\n obj = ChangeMap.get(obj);\n }\n return obj;\n}\n\nlet modulePrefix!: string;\nlet podModulePrefix!: string;\nif (import.meta.hot) {\n const ModuleMap = new Map();\n\n window.emberHotReloadPlugin = {\n _accepting: 0,\n changed: {},\n subscribers: [],\n version: 1,\n moduleDepCallbacks: {},\n versionMap: {},\n\n clear(module) {\n this.moduleDepCallbacks[module.id] = {};\n },\n register(module, dep, callback) {\n dep = dep.replace(new RegExp(`^${modulePrefix}/`), './');\n this.moduleDepCallbacks[module.id]![dep] =\n this.moduleDepCallbacks[module.id]![dep] || [] as Function[];\n this.moduleDepCallbacks[module.id]![dep]!.push(callback);\n },\n loadNew(oldModule: Module, newModule: Module) {\n this.versionMap[newModule.id] = newModule.version;\n const entry = Object.values(requirejs.entries as Record<string, ReqJSEntry>).find(\n (module) => module.module.exports.default === oldModule.exports.default,\n );\n if (!entry) return;\n entry.module = {\n id: newModule.id,\n exports: newModule.exports,\n version: newModule.version\n };\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: moduleUrl.split('?')[0]!,\n version: 0\n };\n this._accepting -= 1;\n if (this._accepting === 0) {\n 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.match(/controller\\.(js|ts)$/) ||\n module.id.match(/route\\.(js|ts|gts)$/);\n if (!ok) {\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 }\n module.version = this.version;\n ModuleMap.set(module.id, module);\n return true;\n },\n notifyNew() {\n this.version += 1;\n Object.values(this.changed).forEach((change) => {\n this.loadNew(change.old, change.new);\n this.subscribers.forEach((fn) => fn(change.old, change.new));\n });\n this.changed = {};\n },\n subscribe(fn) {\n this.subscribers.push(fn);\n },\n unsubscribe(fn) {\n const idx = this.subscribers.indexOf(fn);\n if (idx >= 0) {\n this.subscribers.splice(idx, 1);\n }\n },\n };\n}\n\nexport default class ViteHotReloadService extends Service {\n declare container: any;\n @service() router!: RouterService;\n\n init() {\n super.init();\n if (!window.emberHotReloadPlugin) return;\n modulePrefix = getOwner(this)!.application.modulePrefix;\n podModulePrefix = getOwner(this)!.application.podModulePrefix;\n if (import.meta.hot) {\n import.meta.hot.on('vite:beforeUpdate', (options) => {\n options.updates = options.updates.filter(\n (u) => !u.path.startsWith(`/assets/${modulePrefix}.js`),\n );\n });\n }\n this.router._router;\n Object.defineProperty(this.router._router, '_routerMicrolib', {\n set(v) {\n const getRoute = v.getRoute;\n v.getRoute = function (name) {\n const route = getRoute.call(\n this,\n `${name}--hot-version--${window.emberHotReloadPlugin.version}`,\n );\n route.fullRouteName = route.fullRouteName.replace(\n /--hot-version--.*$/,\n '',\n );\n return route;\n };\n this.___routerMicrolib = v;\n },\n get() {\n return this.___routerMicrolib;\n },\n });\n this.container = getOwner(this)?.__container__;\n window.emberHotReloadPlugin.subscribe((oldModule, newModule) => {\n const types = [\n 'route',\n 'controller',\n 'template',\n 'modifier',\n 'helper',\n 'component',\n ];\n Object.keys(this.container.cache).forEach((k) => {\n if (types.some((t) => k.startsWith(`${t}:`))) {\n delete this.container.cache[k];\n }\n });\n Object.keys(this.container.factoryManagerCache).forEach((k) => {\n if (types.some((t) => k.startsWith(`${t}:`))) {\n delete this.container.factoryManagerCache[k];\n }\n });\n Object.keys(this.container.registry._resolveCache).forEach((k) => {\n if (types.some((t) => k.startsWith(`${t}:`))) {\n delete this.container.registry._resolveCache[k];\n }\n });\n Object.keys(this.container.validationCache).forEach((k) => {\n if (types.some((t) => k.startsWith(`${t}:`))) {\n delete this.container.validationCache[k];\n }\n });\n Object.keys(this.container.registry.registrations).forEach((k) => {\n if (types.some((t) => k.startsWith(`${t}:`))) {\n delete this.container.registry.registrations[k];\n }\n });\n if (\n oldModule.exports.default?.prototype &&\n oldModule.exports.default.prototype instanceof Router\n ) {\n this.router.refresh();\n }\n if (\n oldModule.exports.default?.prototype &&\n oldModule.exports.default.prototype instanceof Controller\n ) {\n this.router.refresh();\n }\n if (\n oldModule.id.startsWith('./templates/') &&\n !oldModule.id.startsWith('./templates/components/')\n ) {\n this.router.refresh();\n }\n if (oldModule.id.startsWith(`./${podModulePrefix}/`)) {\n this.router.refresh();\n }\n });\n }\n getLatestChange(obj) {\n return getLatestChange(obj);\n }\n}\n\n// Don't remove this declaration: this is what enables TypeScript to resolve\n// this service using `Owner.lookup('service:hot-reload')`, as well\n// as to check when you pass the service name as an argument to the decorator,\n// like `@service('hot-reload') declare altName: HotReloadService;`.\ndeclare module '@ember/service' {\n interface Registry {\n 'hot-reload': ViteHotReloadService;\n }\n}"],"names":["ChangeMap","WeakMap","getLatestChange","obj","has","get","modulePrefix","podModulePrefix","import","meta","hot","ModuleMap","Map","window","emberHotReloadPlugin","_accepting","changed","subscribers","version","moduleDepCallbacks","versionMap","clear","module","id","register","dep","callback","replace","RegExp","push","loadNew","oldModule","newModule","entry","Object","values","requirejs","entries","find","exports","default","__import","moduleUrl","canAcceptNew","m","split","setTimeout","notifyNew","ok","includes","match","old","new","set","forEach","change","fn","subscribe","unsubscribe","idx","indexOf","splice","ViteHotReloadService","_dec","service","_class","Service","router","_initializerWarningHelper","init","getOwner","application","on","options","updates","filter","u","path","startsWith","_router","defineProperty","v","getRoute","name","route","call","fullRouteName","___routerMicrolib","container","__container__","types","keys","cache","k","some","t","factoryManagerCache","registry","_resolveCache","validationCache","registrations","prototype","Router","refresh","Controller","_applyDecoratedDescriptor","configurable","enumerable","writable","initializer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAMA,SAAS,GAAG,IAAIC,OAAO,EAAE,CAAA;AAE/B,SAASC,eAAeA,CAACC,GAAQ,EAAE;AACjC,EAAA,OAAOH,SAAS,CAACI,GAAG,CAACD,GAAG,CAAC,EAAE;AACzBA,IAAAA,GAAG,GAAGH,SAAS,CAACK,GAAG,CAACF,GAAG,CAAC,CAAA;AAC1B,GAAA;AACA,EAAA,OAAOA,GAAG,CAAA;AACZ,CAAA;AAEA,IAAIG,YAAqB,CAAA;AACzB,IAAIC,eAAwB,CAAA;AAC5B,IAA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AA;AAGD;AACA;AACA;;;;"}
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=template-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"template-registry.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ember-vite-hmr",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "keywords": [
5
5
  "ember-addon"
6
6
  ],
@@ -82,7 +82,7 @@
82
82
  "@types/fs-extra": "^9.0.12",
83
83
  "@types/lodash": "^4.14.170",
84
84
  "@types/mini-css-extract-plugin": "^1.4.3",
85
- "@types/node": "^15.12.2",
85
+ "@types/node": "^20.12.8",
86
86
  "@types/semver": "^7.3.6",
87
87
  "babel-plugin-ember-template-compilation": "^2.2.2",
88
88
  "babel-import-util": "2.0.3",