@angular/pwa 19.1.6 → 19.1.8
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/package.json +3 -3
- package/pwa/index.js +8 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@angular/pwa",
|
|
3
|
-
"version": "19.1.
|
|
3
|
+
"version": "19.1.8",
|
|
4
4
|
"description": "PWA schematics for Angular",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Angular CLI",
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"save": false
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@angular-devkit/schematics": "19.1.
|
|
21
|
-
"@schematics/angular": "19.1.
|
|
20
|
+
"@angular-devkit/schematics": "19.1.8",
|
|
21
|
+
"@schematics/angular": "19.1.8",
|
|
22
22
|
"parse5-html-rewriting-stream": "7.0.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
package/pwa/index.js
CHANGED
|
@@ -10,9 +10,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
10
|
exports.default = default_1;
|
|
11
11
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
12
12
|
const utility_1 = require("@schematics/angular/utility");
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const promises_1 = require("stream/promises");
|
|
13
|
+
const node_path_1 = require("node:path");
|
|
14
|
+
const node_stream_1 = require("node:stream");
|
|
15
|
+
const promises_1 = require("node:stream/promises");
|
|
16
16
|
function updateIndexFile(path) {
|
|
17
17
|
return async (host) => {
|
|
18
18
|
const originalContent = host.readText(path);
|
|
@@ -35,7 +35,7 @@ function updateIndexFile(path) {
|
|
|
35
35
|
}
|
|
36
36
|
rewriter.emitEndTag(endTag);
|
|
37
37
|
});
|
|
38
|
-
return (0, promises_1.pipeline)(
|
|
38
|
+
return (0, promises_1.pipeline)(node_stream_1.Readable.from(originalContent), rewriter, async function (source) {
|
|
39
39
|
const chunks = [];
|
|
40
40
|
for await (const chunk of source) {
|
|
41
41
|
chunks.push(Buffer.from(chunk));
|
|
@@ -91,15 +91,15 @@ function default_1(options) {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
// Setup sources for the assets files to add to the project
|
|
94
|
-
const sourcePath = project.sourceRoot ??
|
|
94
|
+
const sourcePath = project.sourceRoot ?? node_path_1.posix.join(project.root, 'src');
|
|
95
95
|
// Setup service worker schematic options
|
|
96
96
|
const { title, ...swOptions } = options;
|
|
97
97
|
await (0, utility_1.writeWorkspace)(host, workspace);
|
|
98
|
-
let assetsDir =
|
|
98
|
+
let assetsDir = node_path_1.posix.join(sourcePath, 'assets');
|
|
99
99
|
let iconsPath;
|
|
100
100
|
if (host.exists(assetsDir)) {
|
|
101
101
|
// Add manifest to asset configuration
|
|
102
|
-
const assetEntry =
|
|
102
|
+
const assetEntry = node_path_1.posix.join(project.sourceRoot ?? node_path_1.posix.join(project.root, 'src'), 'manifest.webmanifest');
|
|
103
103
|
for (const target of [...buildTargets, ...testTargets]) {
|
|
104
104
|
if (target.options) {
|
|
105
105
|
if (Array.isArray(target.options.assets)) {
|
|
@@ -116,7 +116,7 @@ function default_1(options) {
|
|
|
116
116
|
iconsPath = 'assets';
|
|
117
117
|
}
|
|
118
118
|
else {
|
|
119
|
-
assetsDir =
|
|
119
|
+
assetsDir = node_path_1.posix.join(project.root, 'public');
|
|
120
120
|
iconsPath = 'icons';
|
|
121
121
|
}
|
|
122
122
|
return (0, schematics_1.chain)([
|