@equinor/fusion-framework-cli 10.5.2 → 10.5.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.
- package/CHANGELOG.md +8 -0
- package/dist/bin/public/assets/{index-DGNw04_i.js → index-BfAHMH9T.js} +3 -3
- package/dist/bin/public/index.html +1 -1
- package/dist/lib/plugins/app-assets/emit-asset.js +8 -3
- package/dist/lib/plugins/app-assets/emit-asset.js.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +10 -10
|
@@ -13,13 +13,17 @@ import { readAssetContentSync } from './read-asset-content.js';
|
|
|
13
13
|
* @returns The path of the emitted asset relative to the assets directory, or null if the asset content could not be read.
|
|
14
14
|
*/
|
|
15
15
|
export const emitAssetSync = (context, id, options = {}) => {
|
|
16
|
+
// extract options and set defaults
|
|
16
17
|
const { outDir = 'dist', assetsDir = 'assets', name = '[name].[ext]' } = options;
|
|
18
|
+
// extract original file name and resource query
|
|
17
19
|
const [originalFileName, resourceQuery] = id.split('?');
|
|
18
|
-
// read asset content,
|
|
20
|
+
// read asset content, throw error if content is empty
|
|
19
21
|
const content = readAssetContentSync(id);
|
|
20
22
|
if (!content || content.byteLength === 0) {
|
|
21
23
|
throw new Error(`Could not read asset content for ${id}`);
|
|
22
24
|
}
|
|
25
|
+
// convert content to Uint8Array
|
|
26
|
+
const source = new Uint8Array(content);
|
|
23
27
|
// generate asset file name
|
|
24
28
|
const url = interpolateName({
|
|
25
29
|
resourcePath: originalFileName,
|
|
@@ -28,13 +32,14 @@ export const emitAssetSync = (context, id, options = {}) => {
|
|
|
28
32
|
const assetPath = path.posix.join(assetsDir, url);
|
|
29
33
|
const fileName = assetPath.replace(`?${resourceQuery}`, '');
|
|
30
34
|
const fullName = path.join(path.isAbsolute(outDir) ? process.cwd() : '', outDir, assetPath);
|
|
31
|
-
//
|
|
35
|
+
// emit asset file to output directory
|
|
32
36
|
context.emitFile({
|
|
33
37
|
fileName,
|
|
34
38
|
name: fullName,
|
|
35
39
|
type: 'asset',
|
|
36
|
-
source
|
|
40
|
+
source,
|
|
37
41
|
});
|
|
42
|
+
// return the path of the emitted asset relative to the assets directory
|
|
38
43
|
return assetPath;
|
|
39
44
|
};
|
|
40
45
|
export default emitAssetSync;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"emit-asset.js","sourceRoot":"","sources":["../../../../src/lib/plugins/app-assets/emit-asset.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAI/D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,OAAsB,EACtB,EAAU,EACV,UAII,EAAE,EACS,EAAE;IACjB,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,GAAG,QAAQ,EAAE,IAAI,GAAG,cAAc,EAAE,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"emit-asset.js","sourceRoot":"","sources":["../../../../src/lib/plugins/app-assets/emit-asset.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAI/D;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAC3B,OAAsB,EACtB,EAAU,EACV,UAII,EAAE,EACS,EAAE;IACjB,mCAAmC;IACnC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,SAAS,GAAG,QAAQ,EAAE,IAAI,GAAG,cAAc,EAAE,GAAG,OAAO,CAAC;IAEjF,gDAAgD;IAChD,MAAM,CAAC,gBAAgB,EAAE,aAAa,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAExD,sDAAsD;IACtD,MAAM,OAAO,GAAG,oBAAoB,CAAC,EAAE,CAAC,CAAC;IACzC,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,UAAU,KAAK,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,KAAK,CAAC,oCAAoC,EAAE,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED,gCAAgC;IAChC,MAAM,MAAM,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;IAEvC,2BAA2B;IAC3B,MAAM,GAAG,GAAG,eAAe,CACzB;QACE,YAAY,EAAE,gBAAgB;QAC9B,aAAa;KACG,EAClB,IAAI,EACJ,EAAE,OAAO,EAAE,CACZ,CAAC;IAEF,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,aAAa,EAAE,EAAE,EAAE,CAAC,CAAC;IAC5D,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,CAAC,CAAC;IAE5F,sCAAsC;IACtC,OAAO,CAAC,QAAQ,CAAC;QACf,QAAQ;QACR,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,OAAO;QACb,MAAM;KACP,CAAC,CAAC;IAEH,wEAAwE;IACxE,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "10.5.
|
|
1
|
+
export declare const version = "10.5.3";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-cli",
|
|
3
|
-
"version": "10.5.
|
|
3
|
+
"version": "10.5.3",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"Fusion",
|
|
6
6
|
"Fusion Framework",
|
|
@@ -83,20 +83,20 @@
|
|
|
83
83
|
"rollup": "^4.22.4",
|
|
84
84
|
"rxjs": "^7.8.1",
|
|
85
85
|
"styled-components": "^6.0.7",
|
|
86
|
-
"typescript": "^5.
|
|
87
|
-
"@equinor/fusion-framework": "^7.3.
|
|
88
|
-
"@equinor/fusion-framework-app": "^9.3.
|
|
86
|
+
"typescript": "^5.7.3",
|
|
87
|
+
"@equinor/fusion-framework": "^7.3.2",
|
|
88
|
+
"@equinor/fusion-framework-app": "^9.3.2",
|
|
89
89
|
"@equinor/fusion-framework-module-app": "^6.1.5",
|
|
90
|
-
"@equinor/fusion-framework-module-feature-flag": "^1.1.13",
|
|
91
90
|
"@equinor/fusion-framework-module-bookmark": "^2.1.2",
|
|
92
|
-
"@equinor/fusion-framework-module-context": "^5.0.
|
|
91
|
+
"@equinor/fusion-framework-module-context": "^5.0.18",
|
|
92
|
+
"@equinor/fusion-framework-module-feature-flag": "^1.1.13",
|
|
93
93
|
"@equinor/fusion-framework-module-msal": "^4.0.1",
|
|
94
94
|
"@equinor/fusion-framework-module-navigation": "^4.0.8",
|
|
95
|
-
"@equinor/fusion-framework-react": "^7.4.
|
|
96
|
-
"@equinor/fusion-framework-react-components-people-provider": "^1.5.4",
|
|
95
|
+
"@equinor/fusion-framework-react": "^7.4.2",
|
|
97
96
|
"@equinor/fusion-framework-module-services": "^5.1.1",
|
|
98
|
-
"@equinor/fusion-framework-react-
|
|
99
|
-
"@equinor/fusion-framework-react-
|
|
97
|
+
"@equinor/fusion-framework-react-components-bookmark": "^1.0.10",
|
|
98
|
+
"@equinor/fusion-framework-react-module-bookmark": "^3.0.2",
|
|
99
|
+
"@equinor/fusion-framework-react-components-people-provider": "^1.5.5",
|
|
100
100
|
"@equinor/fusion-observable": "^8.4.5",
|
|
101
101
|
"@equinor/fusion-query": "^5.2.2"
|
|
102
102
|
},
|