@absolutejs/absolute 0.19.0-beta.852 → 0.19.0-beta.854
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/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +52 -76
- package/dist/angular/index.js.map +3 -3
- package/dist/angular/server.js +53 -77
- package/dist/angular/server.js.map +3 -3
- package/dist/build.js +2129 -730
- package/dist/build.js.map +17 -8
- package/dist/dev/client/handlers/angularHmrShim.ts +77 -0
- package/dist/dev/client/hmrClient.ts +55 -5
- package/dist/index.js +2219 -778
- package/dist/index.js.map +18 -9
- package/dist/react/index.js +3 -1
- package/dist/react/index.js.map +2 -2
- package/dist/react/server.js +3 -1
- package/dist/react/server.js.map +2 -2
- package/dist/src/core/prepare.d.ts +25 -0
- package/dist/src/dev/angular/fastHmrCompiler.d.ts +32 -0
- package/dist/src/dev/angular/hmrCompiler.d.ts +18 -0
- package/dist/src/dev/angular/hmrImportGenerator.d.ts +3 -0
- package/dist/src/dev/angular/hmrInjectionPlugin.d.ts +7 -0
- package/dist/src/dev/angular/resolveOwningComponents.d.ts +8 -0
- package/dist/src/dev/angular/vendor/translator/api/ast_factory.d.ts +363 -0
- package/dist/src/dev/angular/vendor/translator/api/import_generator.d.ts +49 -0
- package/dist/src/dev/angular/vendor/translator/context.d.ts +18 -0
- package/dist/src/dev/angular/vendor/translator/translator.d.ts +75 -0
- package/dist/src/dev/angular/vendor/translator/ts_util.d.ts +12 -0
- package/dist/src/dev/angular/vendor/translator/typescript_ast_factory.d.ts +66 -0
- package/dist/src/dev/angular/vendor/translator/typescript_translator.d.ts +13 -0
- package/dist/src/dev/rebuildTrigger.d.ts +1 -0
- package/dist/src/plugins/hmr.d.ts +25 -0
- package/dist/src/vue/components/Image.d.ts +1 -1
- package/dist/svelte/index.js +3 -1
- package/dist/svelte/index.js.map +2 -2
- package/dist/svelte/server.js +3 -1
- package/dist/svelte/server.js.map +2 -2
- package/dist/vue/index.js +3 -1
- package/dist/vue/index.js.map +2 -2
- package/dist/vue/server.js +3 -1
- package/dist/vue/server.js.map +2 -2
- package/package.json +1 -1
- package/dist/dev/client/handlers/angular.ts +0 -684
- package/dist/dev/client/handlers/angularRuntime.ts +0 -415
- package/dist/src/dev/angular/editTypeDetection.d.ts +0 -8
package/dist/angular/server.js
CHANGED
|
@@ -2769,6 +2769,8 @@ var colors2, frameworkColors, formatPath = (filePath) => {
|
|
|
2769
2769
|
console.error(`${timestamp} ${tag} ${fullMessage}`);
|
|
2770
2770
|
}, logHmrUpdate = (path, framework, duration) => {
|
|
2771
2771
|
log("hmr update", { duration, framework, path });
|
|
2772
|
+
}, logInfo = (message) => {
|
|
2773
|
+
log(message);
|
|
2772
2774
|
}, logScriptUpdate = (path, framework, duration) => {
|
|
2773
2775
|
log("script update", { duration, framework, path });
|
|
2774
2776
|
}, logServerReload = () => {
|
|
@@ -3504,26 +3506,7 @@ var traceAngularPhase = async (name, fn, metadata) => {
|
|
|
3504
3506
|
if (existsSync4(fromNodeModules))
|
|
3505
3507
|
return fromNodeModules;
|
|
3506
3508
|
return resolve5(import.meta.dir, "./dev/client");
|
|
3507
|
-
}, devClientDir, hmrClientPath,
|
|
3508
|
-
const entityClassRegex = /(?:export\s+)?class\s+(\w+(?:Component|Service|Directive|Pipe))\s/g;
|
|
3509
|
-
const entityNames = [];
|
|
3510
|
-
let match;
|
|
3511
|
-
while ((match = entityClassRegex.exec(content)) !== null) {
|
|
3512
|
-
if (match[1])
|
|
3513
|
-
entityNames.push(match[1]);
|
|
3514
|
-
}
|
|
3515
|
-
if (entityNames.length === 0)
|
|
3516
|
-
return content;
|
|
3517
|
-
const registrations = entityNames.map((name) => ` if (typeof ${name} === 'function') window.__ANGULAR_HMR__.register('${sourceId}#${name}', ${name});`).join(`
|
|
3518
|
-
`);
|
|
3519
|
-
const hmrBlock = `
|
|
3520
|
-
// Angular HMR Runtime Layer (Level 3) \u2014 Auto-registration
|
|
3521
|
-
if (typeof window !== 'undefined' && window.__ANGULAR_HMR__) {
|
|
3522
|
-
${registrations}
|
|
3523
|
-
}
|
|
3524
|
-
`;
|
|
3525
|
-
return content + hmrBlock;
|
|
3526
|
-
}, formatDiagnosticMessage = (diagnostic) => {
|
|
3509
|
+
}, devClientDir, hmrClientPath, formatDiagnosticMessage = (diagnostic) => {
|
|
3527
3510
|
try {
|
|
3528
3511
|
return ts.flattenDiagnosticMessageText(diagnostic.messageText, `
|
|
3529
3512
|
`);
|
|
@@ -4346,14 +4329,10 @@ export default ${componentClassName};
|
|
|
4346
4329
|
export const __ABSOLUTE_PAGE_USES_LEGACY_ANIMATIONS__ = true;
|
|
4347
4330
|
`;
|
|
4348
4331
|
}
|
|
4349
|
-
if (hmr) {
|
|
4350
|
-
rewritten = injectHMRRegistration(rewritten, resolvedEntry);
|
|
4351
|
-
}
|
|
4352
4332
|
await traceAngularPhase("wrapper/write-server-output", () => fs.writeFile(rawServerFile, rewritten, "utf-8"), { entry: resolvedEntry });
|
|
4353
4333
|
const relativePath = relative3(indexesDir, rawServerFile).replace(/\\/g, "/");
|
|
4354
4334
|
const normalizedImportPath = relativePath.startsWith(".") ? relativePath : `./${relativePath}`;
|
|
4355
4335
|
const hmrPreamble = hmr ? `window.__HMR_FRAMEWORK__ = "angular";
|
|
4356
|
-
import "${hmrRuntimePath}";
|
|
4357
4336
|
import "${hmrClientPath}";
|
|
4358
4337
|
` : "";
|
|
4359
4338
|
const hydration = hmr ? `${hmrPreamble}
|
|
@@ -4395,68 +4374,66 @@ var absoluteHttpTransferCacheOptions = {
|
|
|
4395
4374
|
}
|
|
4396
4375
|
};
|
|
4397
4376
|
|
|
4398
|
-
//
|
|
4399
|
-
//
|
|
4400
|
-
//
|
|
4401
|
-
|
|
4377
|
+
// SURGICAL_HMR Tier 1 \u2014 Re-bootstrap hook. The dev client invokes
|
|
4378
|
+
// \`window.__ABS_ANGULAR_REBOOTSTRAP__()\` when it receives an
|
|
4379
|
+
// \`angular:rebootstrap\` WS message; the hook looks up this page's
|
|
4380
|
+
// freshly-built bundle URL (the rebuild already broadcast its
|
|
4381
|
+
// updated manifest, so window.__HMR_MANIFEST__ is current) and
|
|
4382
|
+
// dynamic-imports it. Re-importing the chunk re-runs the
|
|
4383
|
+
// destroy+bootstrap block below \u2014 no special path needed because
|
|
4384
|
+
// chunk eval is the bootstrap.
|
|
4385
|
+
window.__ABS_ANGULAR_PAGE_BUNDLE_ID__ = '${toPascal(fileBase)}Index';
|
|
4386
|
+
window.__ABS_ANGULAR_REBOOTSTRAP__ = async function() {
|
|
4387
|
+
var id = window.__ABS_ANGULAR_PAGE_BUNDLE_ID__;
|
|
4388
|
+
var manifest = window.__HMR_MANIFEST__ || {};
|
|
4389
|
+
var newUrl = manifest[id];
|
|
4390
|
+
if (!newUrl) {
|
|
4391
|
+
console.warn('[absolutejs] no bundle URL in manifest for', id, '\u2014 full reload');
|
|
4392
|
+
window.location.reload();
|
|
4393
|
+
return;
|
|
4394
|
+
}
|
|
4395
|
+
await import(newUrl + '?t=' + Date.now());
|
|
4396
|
+
};
|
|
4402
4397
|
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
// to a full re-bootstrap because those values are consumed once at
|
|
4407
|
-
// bootstrap and won't propagate to the running router/injector via an
|
|
4408
|
-
// in-place component patch.
|
|
4409
|
-
if (typeof window !== 'undefined' && window.__ANGULAR_HMR__ && typeof window.__ANGULAR_HMR__.recordPageExports === 'function') {
|
|
4410
|
-
var __abs_hmr_routes = Reflect.get(pageModule, 'routes');
|
|
4411
|
-
window.__ANGULAR_HMR__.recordPageExports('${resolvedEntry}', __abs_hmr_routes, maybePageProviders);
|
|
4398
|
+
if (window.__ANGULAR_APP__) {
|
|
4399
|
+
try { window.__ANGULAR_APP__.destroy(); } catch (_err) { /* ignore */ }
|
|
4400
|
+
window.__ANGULAR_APP__ = null;
|
|
4412
4401
|
}
|
|
4413
4402
|
|
|
4414
|
-
//
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
if (!window.__ANGULAR_HMR_FAST_PATCH__) {
|
|
4420
|
-
if (window.__ANGULAR_APP__) {
|
|
4421
|
-
try { window.__ANGULAR_APP__.destroy(); } catch (_err) { /* ignore */ }
|
|
4422
|
-
window.__ANGULAR_APP__ = null;
|
|
4423
|
-
}
|
|
4424
|
-
|
|
4425
|
-
// Ensure root element exists after destroy (Angular removes it)
|
|
4426
|
-
var _sel = ${componentClassName}.\u0275cmp?.selectors?.[0]?.[0] || 'ng-app';
|
|
4427
|
-
if (!document.querySelector(_sel)) {
|
|
4428
|
-
(document.getElementById('root') || document.body).appendChild(document.createElement(_sel));
|
|
4429
|
-
}
|
|
4403
|
+
// Ensure root element exists after destroy (Angular removes it)
|
|
4404
|
+
var _sel = ${componentClassName}.\u0275cmp?.selectors?.[0]?.[0] || 'ng-app';
|
|
4405
|
+
if (!document.querySelector(_sel)) {
|
|
4406
|
+
(document.getElementById('root') || document.body).appendChild(document.createElement(_sel));
|
|
4407
|
+
}
|
|
4430
4408
|
|
|
4431
|
-
|
|
4432
|
-
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4409
|
+
var providers = [provideZonelessChangeDetection()];
|
|
4410
|
+
if (!window.__HMR_SKIP_HYDRATION__ && !pageHasIslands) {
|
|
4411
|
+
providers.push(provideClientHydration(withHttpTransferCacheOptions(absoluteHttpTransferCacheOptions)));
|
|
4412
|
+
}
|
|
4413
|
+
delete window.__HMR_SKIP_HYDRATION__;
|
|
4414
|
+
providers.push.apply(providers, pageProviders);
|
|
4415
|
+
providers.push.apply(providers, propProviders);
|
|
4416
|
+
window.__ABS_SLOT_HYDRATION_PENDING__ = pageHasRawStreamingSlots;
|
|
4439
4417
|
|
|
4440
|
-
|
|
4418
|
+
if (pageHasRawStreamingSlots) {
|
|
4419
|
+
window.__ABS_SLOT_HYDRATION_PENDING__ = false;
|
|
4420
|
+
if (typeof window.__ABS_SLOT_FLUSH__ === 'function') {
|
|
4421
|
+
requestAnimationFrame(function() {
|
|
4422
|
+
window.__ABS_SLOT_FLUSH__();
|
|
4423
|
+
});
|
|
4424
|
+
}
|
|
4425
|
+
} else {
|
|
4426
|
+
bootstrapApplication(${componentClassName}, {
|
|
4427
|
+
providers: providers
|
|
4428
|
+
}).then(function (appRef) {
|
|
4429
|
+
window.__ANGULAR_APP__ = appRef;
|
|
4441
4430
|
window.__ABS_SLOT_HYDRATION_PENDING__ = false;
|
|
4442
4431
|
if (typeof window.__ABS_SLOT_FLUSH__ === 'function') {
|
|
4443
4432
|
requestAnimationFrame(function() {
|
|
4444
4433
|
window.__ABS_SLOT_FLUSH__();
|
|
4445
4434
|
});
|
|
4446
4435
|
}
|
|
4447
|
-
}
|
|
4448
|
-
bootstrapApplication(${componentClassName}, {
|
|
4449
|
-
providers: providers
|
|
4450
|
-
}).then(function (appRef) {
|
|
4451
|
-
window.__ANGULAR_APP__ = appRef;
|
|
4452
|
-
window.__ABS_SLOT_HYDRATION_PENDING__ = false;
|
|
4453
|
-
if (typeof window.__ABS_SLOT_FLUSH__ === 'function') {
|
|
4454
|
-
requestAnimationFrame(function() {
|
|
4455
|
-
window.__ABS_SLOT_FLUSH__();
|
|
4456
|
-
});
|
|
4457
|
-
}
|
|
4458
|
-
});
|
|
4459
|
-
}
|
|
4436
|
+
});
|
|
4460
4437
|
}
|
|
4461
4438
|
`.trim() : `
|
|
4462
4439
|
import '@angular/compiler';
|
|
@@ -4558,7 +4535,6 @@ var init_compileAngular = __esm(() => {
|
|
|
4558
4535
|
init_generatedDir();
|
|
4559
4536
|
devClientDir = resolveDevClientDir();
|
|
4560
4537
|
hmrClientPath = join6(devClientDir, "hmrClient.ts").replace(/\\/g, "/");
|
|
4561
|
-
hmrRuntimePath = join6(devClientDir, "handlers", "angularRuntime.ts").replace(/\\/g, "/");
|
|
4562
4538
|
jitContentCache = new Map;
|
|
4563
4539
|
wrapperOutputCache = new Map;
|
|
4564
4540
|
});
|
|
@@ -5722,5 +5698,5 @@ export {
|
|
|
5722
5698
|
ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
|
|
5723
5699
|
};
|
|
5724
5700
|
|
|
5725
|
-
//# debugId=
|
|
5701
|
+
//# debugId=7EC96E5719073BAA64756E2164756E21
|
|
5726
5702
|
//# sourceMappingURL=server.js.map
|