@equinor/fusion-framework-cli 10.0.0-beta-8c92234668d5f4b20de0650ff947f3afeb7c335c → 10.0.0-next-9f6eec8c5a4cb3dd430fc6bee227442a3dc28bb8
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 +399 -6
- package/README.md +31 -9
- package/dist/bin/build-application.js +22 -1
- package/dist/bin/build-application.js.map +1 -1
- package/dist/bin/bundle-application.js +8 -11
- package/dist/bin/bundle-application.js.map +1 -1
- package/dist/bin/create-dev-serve.js +89 -117
- package/dist/bin/create-dev-serve.js.map +1 -1
- package/dist/bin/create-export-config.js +54 -12
- package/dist/bin/create-export-config.js.map +1 -1
- package/dist/bin/create-export-manifest.js +44 -36
- package/dist/bin/create-export-manifest.js.map +1 -1
- package/dist/bin/dev-portal/AppLoader.js +23 -0
- package/dist/bin/dev-portal/AppLoader.js.map +1 -1
- package/dist/bin/dev-portal/ContextSelector/ContextSelector.js +17 -2
- package/dist/bin/dev-portal/ContextSelector/ContextSelector.js.map +1 -1
- package/dist/bin/dev-portal/ContextSelector/useContextResolver.js +35 -1
- package/dist/bin/dev-portal/ContextSelector/useContextResolver.js.map +1 -1
- package/dist/bin/dev-portal/Header.js +1 -0
- package/dist/bin/dev-portal/Header.js.map +1 -1
- package/dist/bin/dev-portal/PersonSideSheet/index.js +4 -0
- package/dist/bin/dev-portal/PersonSideSheet/index.js.map +1 -1
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureSheetContent.js +4 -0
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureSheetContent.js.map +1 -1
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerApp.js +3 -0
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerApp.js.map +1 -1
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerPortal.js +3 -0
- package/dist/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerPortal.js.map +1 -1
- package/dist/bin/dev-portal/PersonSideSheet/sheets/LandingSheetContent.js +3 -0
- package/dist/bin/dev-portal/PersonSideSheet/sheets/LandingSheetContent.js.map +1 -1
- package/dist/bin/dev-portal/Router.js +3 -0
- package/dist/bin/dev-portal/Router.js.map +1 -1
- package/dist/bin/dev-portal/config.js +7 -2
- package/dist/bin/dev-portal/config.js.map +1 -1
- package/dist/bin/dev-portal/useAppContextNavigation.js +27 -6
- package/dist/bin/dev-portal/useAppContextNavigation.js.map +1 -1
- package/dist/bin/main.app.js +32 -19
- package/dist/bin/main.app.js.map +1 -1
- package/dist/bin/main.js +3 -0
- package/dist/bin/main.js.map +1 -1
- package/dist/bin/public/assets/index-CwGBhRCD.js +5235 -0
- package/dist/bin/public/index.html +1 -1
- package/dist/bin/publish-application.js +75 -20
- package/dist/bin/publish-application.js.map +1 -1
- package/dist/bin/tag-application.js +52 -16
- package/dist/bin/tag-application.js.map +1 -1
- package/dist/bin/upload-application.js +47 -14
- package/dist/bin/upload-application.js.map +1 -1
- package/dist/bin/utils/{execute-commant.js → execute-command.js} +5 -2
- package/dist/bin/utils/execute-command.js.map +1 -0
- package/dist/bin/utils/format.js +1 -1
- package/dist/bin/utils/format.js.map +1 -1
- package/dist/bin/utils/getEndpointUrl.js +49 -0
- package/dist/bin/utils/getEndpointUrl.js.map +1 -0
- package/dist/bin/utils/index.js +14 -0
- package/dist/bin/utils/index.js.map +1 -0
- package/dist/bin/utils/isAppRegistered.js +32 -0
- package/dist/bin/utils/isAppRegistered.js.map +1 -0
- package/dist/bin/utils/load-app-config.js +1 -0
- package/dist/bin/utils/load-app-config.js.map +1 -1
- package/dist/bin/utils/load-manifest.js +9 -4
- package/dist/bin/utils/load-manifest.js.map +1 -1
- package/dist/bin/utils/proxy-request-logger.js +34 -0
- package/dist/bin/utils/proxy-request-logger.js.map +1 -0
- package/dist/bin/utils/publishAppConfig.js +36 -0
- package/dist/bin/utils/publishAppConfig.js.map +1 -0
- package/dist/bin/utils/requireToken.js +10 -0
- package/dist/bin/utils/requireToken.js.map +1 -0
- package/dist/bin/utils/spinner.js +10 -0
- package/dist/bin/utils/spinner.js.map +1 -1
- package/dist/bin/utils/tagAppBundle.js +35 -0
- package/dist/bin/utils/tagAppBundle.js.map +1 -0
- package/dist/bin/utils/uploadAppBundle.js +54 -0
- package/dist/bin/utils/uploadAppBundle.js.map +1 -0
- package/dist/lib/app-config.js +3 -1
- package/dist/lib/app-config.js.map +1 -1
- package/dist/lib/app-manifest.js +97 -15
- package/dist/lib/app-manifest.js.map +1 -1
- package/dist/lib/app-package.js +52 -5
- package/dist/lib/app-package.js.map +1 -1
- package/dist/lib/plugins/app-assets/app-asset-plugin.js +102 -0
- package/dist/lib/plugins/app-assets/app-asset-plugin.js.map +1 -0
- package/dist/lib/plugins/app-assets/emit-asset.js +41 -0
- package/dist/lib/plugins/app-assets/emit-asset.js.map +1 -0
- package/dist/lib/plugins/app-assets/extension-filter-pattern.js +20 -0
- package/dist/lib/plugins/app-assets/extension-filter-pattern.js.map +1 -0
- package/dist/lib/plugins/app-assets/index.js +4 -0
- package/dist/lib/plugins/app-assets/index.js.map +1 -0
- package/dist/lib/plugins/app-assets/read-asset-content.js +34 -0
- package/dist/lib/plugins/app-assets/read-asset-content.js.map +1 -0
- package/dist/lib/plugins/app-assets/resolve-asset-id.js +63 -0
- package/dist/lib/plugins/app-assets/resolve-asset-id.js.map +1 -0
- package/dist/lib/plugins/app-assets/static.js +15 -0
- package/dist/lib/plugins/app-assets/static.js.map +1 -0
- package/dist/lib/plugins/app-proxy/app-proxy-plugin.js +127 -0
- package/dist/lib/plugins/app-proxy/app-proxy-plugin.js.map +1 -0
- package/dist/lib/plugins/app-proxy/index.js +2 -0
- package/dist/lib/plugins/app-proxy/index.js.map +1 -0
- package/dist/lib/plugins/external-public/external-public-plugin.js +103 -0
- package/dist/lib/plugins/external-public/external-public-plugin.js.map +1 -0
- package/dist/lib/plugins/external-public/index.js +2 -0
- package/dist/lib/plugins/external-public/index.js.map +1 -0
- package/dist/lib/utils/assert.js +2 -1
- package/dist/lib/utils/assert.js.map +1 -1
- package/dist/lib/utils/config.js +5 -0
- package/dist/lib/utils/config.js.map +1 -1
- package/dist/lib/vite-config.js +4 -4
- package/dist/lib/vite-config.js.map +1 -1
- package/dist/lib/vite-logger.js +2 -0
- package/dist/lib/vite-logger.js.map +1 -1
- package/dist/types/bin/build-application.d.ts +4 -3
- package/dist/types/bin/create-dev-serve.d.ts +1 -1
- package/dist/types/bin/create-export-config.d.ts +3 -3
- package/dist/types/bin/create-export-manifest.d.ts +6 -9
- package/dist/types/bin/dev-portal/AppLoader.d.ts +7 -0
- package/dist/types/bin/dev-portal/ContextSelector/ContextSelector.d.ts +5 -0
- package/dist/types/bin/dev-portal/ContextSelector/useContextResolver.d.ts +6 -0
- package/dist/types/bin/dev-portal/FusionLogo.d.ts +0 -1
- package/dist/types/bin/dev-portal/PersonSideSheet/index.d.ts +4 -0
- package/dist/types/bin/dev-portal/PersonSideSheet/sheets/FeatureSheetContent.d.ts +4 -0
- package/dist/types/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerApp.d.ts +3 -0
- package/dist/types/bin/dev-portal/PersonSideSheet/sheets/FeatureTogglerPortal.d.ts +3 -0
- package/dist/types/bin/dev-portal/PersonSideSheet/sheets/LandingSheetContent.d.ts +3 -0
- package/dist/types/bin/dev-portal/PersonSideSheet/sheets/Styled.d.ts +4 -5
- package/dist/types/bin/dev-portal/useAppContextNavigation.d.ts +4 -0
- package/dist/types/bin/publish-application.d.ts +1 -1
- package/dist/types/bin/tag-application.d.ts +1 -1
- package/dist/types/bin/upload-application.d.ts +1 -1
- package/dist/types/bin/utils/execute-command.d.ts +8 -0
- package/dist/types/bin/utils/format.d.ts +0 -2
- package/dist/types/bin/utils/getEndpointUrl.d.ts +10 -0
- package/dist/types/bin/utils/index.d.ts +14 -0
- package/dist/types/bin/utils/isAppRegistered.d.ts +7 -0
- package/dist/types/bin/utils/load-app-config.d.ts +1 -1
- package/dist/types/bin/utils/load-manifest.d.ts +3 -2
- package/dist/types/bin/utils/proxy-request-logger.d.ts +15 -0
- package/dist/types/bin/utils/publishAppConfig.d.ts +9 -0
- package/dist/types/bin/utils/requireToken.d.ts +4 -0
- package/dist/types/bin/utils/spinner.d.ts +1 -0
- package/dist/types/bin/utils/tagAppBundle.d.ts +7 -0
- package/dist/types/bin/utils/uploadAppBundle.d.ts +7 -0
- package/dist/types/lib/app-config.d.ts +1 -1
- package/dist/types/lib/app-manifest.d.ts +30 -2
- package/dist/types/lib/app-package.d.ts +34 -3
- package/dist/types/lib/plugins/app-assets/app-asset-plugin.d.ts +36 -0
- package/dist/types/lib/plugins/app-assets/emit-asset.d.ts +18 -0
- package/dist/types/lib/plugins/app-assets/extension-filter-pattern.d.ts +14 -0
- package/dist/types/lib/plugins/app-assets/index.d.ts +3 -0
- package/dist/types/lib/plugins/app-assets/read-asset-content.d.ts +14 -0
- package/dist/types/lib/plugins/app-assets/resolve-asset-id.d.ts +16 -0
- package/dist/types/lib/plugins/app-assets/static.d.ts +5 -0
- package/dist/types/lib/plugins/app-proxy/app-proxy-plugin.d.ts +70 -0
- package/dist/types/lib/plugins/app-proxy/index.d.ts +1 -0
- package/dist/types/lib/plugins/external-public/external-public-plugin.d.ts +30 -0
- package/dist/types/lib/plugins/external-public/index.d.ts +1 -0
- package/dist/types/lib/utils/assert.d.ts +2 -2
- package/dist/types/lib/utils/config.d.ts +7 -1
- package/dist/types/lib/utils/expect.d.ts +1 -1
- package/dist/types/lib/vite-config.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/version.js +2 -1
- package/dist/version.js.map +1 -1
- package/package.json +49 -35
- package/dist/bin/dev-proxy.js +0 -89
- package/dist/bin/dev-proxy.js.map +0 -1
- package/dist/bin/public/assets/index-DGTu1kLV.js +0 -3482
- package/dist/bin/utils/app-api.js +0 -169
- package/dist/bin/utils/app-api.js.map +0 -1
- package/dist/bin/utils/execute-commant.js.map +0 -1
- package/dist/index.js +0 -12
- package/dist/index.js.map +0 -1
- package/dist/types/bin/dev-proxy.d.ts +0 -26
- package/dist/types/bin/utils/app-api.d.ts +0 -8
- package/dist/types/bin/utils/execute-commant.d.ts +0 -8
- package/dist/types/index.d.ts +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,18 +1,411 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## 10.0.0-
|
|
3
|
+
## 10.0.0-next-9f6eec8c5a4cb3dd430fc6bee227442a3dc28bb8
|
|
4
4
|
|
|
5
5
|
### Major Changes
|
|
6
6
|
|
|
7
|
-
- [#
|
|
7
|
+
- [#2494](https://github.com/equinor/fusion-framework/pull/2494) [`9f6eec8`](https://github.com/equinor/fusion-framework/commit/9f6eec8c5a4cb3dd430fc6bee227442a3dc28bb8) Thanks [@odinr](https://github.com/odinr)! - Adding new commands for app management, `build-publish`, `build-pack`, `build-upload`, `build-config`, `build-manifest` and `build-tag`.
|
|
8
|
+
|
|
9
|
+
Introduces new parameters to the `build-config` command for publishing the app config to a build version.
|
|
10
|
+
|
|
11
|
+
Commands:
|
|
12
|
+
|
|
13
|
+
- `build-pack` - Bundle the app for distribution
|
|
14
|
+
- `-o, --output <output>` - Output directory for the packed app
|
|
15
|
+
- `-a, --archive` - Archive name for the packed app
|
|
16
|
+
- `build-upload` - Upload the packed app to the Fusion App Store
|
|
17
|
+
- `-b, --bundle <bundle>` - Path to the packed app bundle
|
|
18
|
+
- `-e, --env <ci | fqa | tr | fprd>` - Environment to upload the app to
|
|
19
|
+
- `-s, --service <service>` - Custom app service
|
|
20
|
+
- `build-tag` - Tag the uploaded app with a version
|
|
21
|
+
- `-t, --tag <tag>` - Tag to apply to the uploaded app
|
|
22
|
+
- `-v, --version <version>` - Version to attach to the tag
|
|
23
|
+
- `-e, --env <ci | fqa | tr | fprd>` - Environment to tag the app in
|
|
24
|
+
- `-s, --service <service>` - Custom app service
|
|
25
|
+
- `build-publish` - Publish the app config to a build version
|
|
26
|
+
- `-t, --tag <tag>` - Tag to apply to the uploaded app
|
|
27
|
+
- `-e, --env <ci | fqa | tr | fprd>` - Environment to tag the app in
|
|
28
|
+
- `-s, --service <service>` - Custom app service
|
|
29
|
+
- `build-config` - Publish the app config to a build version
|
|
30
|
+
- `-o, --output <output>` - Output file for the app config
|
|
31
|
+
- `-c, --config <config>` - Path to the app config file (for config generation)
|
|
32
|
+
- `-p, --publish<semver | current | latest | preview>` - Publish the app config to the build version
|
|
33
|
+
- `-e, --env <ci | fqa | tr | fprd>` - Environment to publish the app config to
|
|
34
|
+
- `-s, --service <service>` - Custom app service
|
|
35
|
+
- `build-manifest` - Creates the build manifest to publish with app
|
|
36
|
+
- `-o, --output <output>` - Output file for manifest
|
|
37
|
+
- `-c, --config <config>` - Manifest config file
|
|
38
|
+
|
|
39
|
+
simple usage:
|
|
8
40
|
|
|
9
|
-
|
|
41
|
+
```sh
|
|
42
|
+
fusion-framework-cli app build-publish -e ci
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
complex usage:
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
fusion-framework-cli app build-pack -o ./dist -a my-app.zip
|
|
49
|
+
fusion-framework-cli app build-upload -b ./dist/my-app.zip -e ci
|
|
50
|
+
fusion-framework-cli app build-tag -t my-tag -v 1.0.0 -e ci
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
After publishing a build of an app, the app config should be uploaded to the build version. This is done by running the `build-config` command.
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
# Publish the app config to the build version
|
|
57
|
+
fusion-framework-cli app build-config -p -e ci
|
|
58
|
+
|
|
59
|
+
# Publish the app config to a specific build tag
|
|
60
|
+
fusion-framework-cli app build-config -p preview -e ci
|
|
61
|
+
|
|
62
|
+
# Publish the app config to a specific build version
|
|
63
|
+
fusion-framework-cli app build-config -p 1.0.0 -e ci
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
**breaking changes:**
|
|
67
|
+
|
|
68
|
+
- renaming all commands accociated with build.
|
|
69
|
+
- The app-config endpoints is now an object containing url and scopes, where name is the object key:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
environment: {
|
|
73
|
+
myProp: 'foobar',
|
|
74
|
+
},
|
|
75
|
+
endpoints: {
|
|
76
|
+
api: {
|
|
77
|
+
url: 'https://foo.bars'
|
|
78
|
+
scopes: ['foobar./default']
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
- The `config` command has been removed, use `build-config` instead
|
|
84
|
+
|
|
85
|
+
### Minor Changes
|
|
86
|
+
|
|
87
|
+
- [#2494](https://github.com/equinor/fusion-framework/pull/2494) [`9f6eec8`](https://github.com/equinor/fusion-framework/commit/9f6eec8c5a4cb3dd430fc6bee227442a3dc28bb8) Thanks [@odinr](https://github.com/odinr)! - Introduced `proxyRequestLogger` to log proxy requests in the CLI.
|
|
88
|
+
|
|
89
|
+
- Show the request URL and method in the console when a proxy request is made.
|
|
90
|
+
- Show proxy response status code
|
|
91
|
+
|
|
92
|
+
- [#2494](https://github.com/equinor/fusion-framework/pull/2494) [`9f6eec8`](https://github.com/equinor/fusion-framework/commit/9f6eec8c5a4cb3dd430fc6bee227442a3dc28bb8) Thanks [@odinr](https://github.com/odinr)! - Create a plugin `externalPublicPlugin` to fix the issue with serving the `index.html` file from the specified external public directory. Vite mode `spa` will not serve the `index.html` file from the specified external public directory.
|
|
93
|
+
|
|
94
|
+
- Enhanced the middleware to intercept requests and serve the `index.html` file from the specified external public directory.
|
|
95
|
+
- Transformed the HTML using Vite's `transformIndexHtml` method.
|
|
96
|
+
- Applied appropriate content headers and additional configured headers before sending the response.
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
const viteConfig = defineConfig({
|
|
100
|
+
// vite configuration
|
|
101
|
+
root: './src', // this where vite will look for the index.html file
|
|
102
|
+
plugins: [
|
|
103
|
+
// path which contains the index.html file
|
|
104
|
+
externalPublicPlugin('./my-portal'),
|
|
105
|
+
],
|
|
106
|
+
});
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
- [#2494](https://github.com/equinor/fusion-framework/pull/2494) [`9f6eec8`](https://github.com/equinor/fusion-framework/commit/9f6eec8c5a4cb3dd430fc6bee227442a3dc28bb8) Thanks [@odinr](https://github.com/odinr)! - Updated commands in CLI to reflect purpose of the command:
|
|
110
|
+
|
|
111
|
+
- renamed `config` to `build-config` to generate build config of an application.
|
|
112
|
+
- renamed `pack`to `build-pack` to bundle an application.
|
|
113
|
+
- added `build-manifest` command to generate build manifest of an application.
|
|
114
|
+
|
|
115
|
+
> [!WARNING]
|
|
116
|
+
> Config callback for `manifest` and `config` now allows `void` return type.
|
|
117
|
+
> Return value from callback is now merged with default config instead of replacing it, this might be a breaking change for some applications.
|
|
118
|
+
|
|
119
|
+
> [!NOTE]
|
|
120
|
+
> This mean that `mergeAppConfig` and `mergeManifestConfig` functions are no longer needed and can be removed from the application.
|
|
121
|
+
|
|
122
|
+
- [#2494](https://github.com/equinor/fusion-framework/pull/2494) [`9f6eec8`](https://github.com/equinor/fusion-framework/commit/9f6eec8c5a4cb3dd430fc6bee227442a3dc28bb8) Thanks [@odinr](https://github.com/odinr)! - The `appProxyPlugin` is a Vite plugin designed to proxy requests to a Fusion app backend.
|
|
123
|
+
It sets up proxy rules for API and bundle requests and serves the app configuration and manifest based on the app key and version.
|
|
124
|
+
|
|
125
|
+
Key Features:
|
|
126
|
+
|
|
127
|
+
1. Proxy Configuration:
|
|
128
|
+
|
|
129
|
+
- Proxies API calls to the Fusion apps backend.
|
|
130
|
+
- Proxies bundle requests to the Fusion apps backend.
|
|
131
|
+
- Uses a base path `proxyPath` for proxying.
|
|
132
|
+
- Captures and reuses authorization tokens for asset requests.
|
|
133
|
+
|
|
134
|
+
2. **App Configuration and Manifest**:
|
|
135
|
+
|
|
136
|
+
- Serves the app configuration if the request matches the current app and version.
|
|
137
|
+
- Serves the app manifest if the request matches the current app.
|
|
138
|
+
|
|
139
|
+
3. **Middleware Setup**:
|
|
140
|
+
- Sets up middleware to handle requests for app configuration, manifest, and local bundles.
|
|
141
|
+
|
|
142
|
+
This plugin is used by the CLI for local development, but design as exportable for custom CLI to consume applications from other API`s
|
|
143
|
+
|
|
144
|
+
example configuration:
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
const viteConfig = defineConfig({
|
|
148
|
+
// vite configuration
|
|
149
|
+
plugins: [
|
|
150
|
+
appProxyPlugin({
|
|
151
|
+
proxy: {
|
|
152
|
+
path: '/app-proxy',
|
|
153
|
+
target: 'https://fusion-s-apps-ci.azurewebsites.net/',
|
|
154
|
+
// optional callback when matched request is proxied
|
|
155
|
+
onProxyReq: (proxyReq, req, res) => {
|
|
156
|
+
proxyReq.on('response', (res) => {
|
|
157
|
+
console.log(res.statusCode);
|
|
158
|
+
});
|
|
159
|
+
},
|
|
160
|
+
},
|
|
161
|
+
// optional, but required for serving local app configuration, manifest and resources
|
|
162
|
+
app: {
|
|
163
|
+
key: 'my-app',
|
|
164
|
+
version: '1.0.0',
|
|
165
|
+
generateConfig: async () => ({}),
|
|
166
|
+
generateManifest: async () => ({}),
|
|
167
|
+
},
|
|
168
|
+
}),
|
|
169
|
+
],
|
|
170
|
+
});
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
example usage:
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
// Example API calls
|
|
177
|
+
fetch('/app-proxy/apps/my-app/builds/1.0.0/config'); // local
|
|
178
|
+
fetch('/app-proxy/apps/my-app/builds/0.0.9/config'); // proxy
|
|
179
|
+
fetch('/app-proxy/apps/other-app/builds/1.0.0/config'); // proxy
|
|
180
|
+
|
|
181
|
+
// Example asset calls
|
|
182
|
+
fetch('/app-proxy/bundles/my-app/builds/1.0.0/index.js'); // local
|
|
183
|
+
fetch('/app-proxy/bundles/my-app/builds/0.0.9/index.js'); // proxy
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
- [#2494](https://github.com/equinor/fusion-framework/pull/2494) [`9f6eec8`](https://github.com/equinor/fusion-framework/commit/9f6eec8c5a4cb3dd430fc6bee227442a3dc28bb8) Thanks [@odinr](https://github.com/odinr)! - when building an application the `AppAssetExportPlugin` is now added to the `ViteConfig` and configure to include `manifest.build.allowedExtensions`
|
|
187
|
+
|
|
188
|
+
- [#2494](https://github.com/equinor/fusion-framework/pull/2494) [`9f6eec8`](https://github.com/equinor/fusion-framework/commit/9f6eec8c5a4cb3dd430fc6bee227442a3dc28bb8) Thanks [@odinr](https://github.com/odinr)! - **App Assets Export Plugin**
|
|
189
|
+
|
|
190
|
+
Create a plugin that exports assets from the app's source code.
|
|
191
|
+
This plugin resolves the issue where assets are not extracted from the app's source code since the app is in `lib` mode.
|
|
192
|
+
|
|
193
|
+
```typescript
|
|
194
|
+
export default {
|
|
195
|
+
plugins: [
|
|
196
|
+
AppAssetExportPlugin(
|
|
197
|
+
include: createExtensionFilterPattern(
|
|
198
|
+
manifest.build.allowedExtensions
|
|
199
|
+
),
|
|
200
|
+
),
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
see readme for more information.
|
|
206
|
+
|
|
207
|
+
### Patch Changes
|
|
208
|
+
|
|
209
|
+
- [#2494](https://github.com/equinor/fusion-framework/pull/2494) [`9f6eec8`](https://github.com/equinor/fusion-framework/commit/9f6eec8c5a4cb3dd430fc6bee227442a3dc28bb8) Thanks [@odinr](https://github.com/odinr)! - Updating fusion-wc-person to fix issues when using selectedPerson = null in PersonSelect component.
|
|
210
|
+
|
|
211
|
+
Updated the following dependencies
|
|
212
|
+
|
|
213
|
+
- `@equinor/fusion-wc-person` from `^3.0.1` to `^3.0.3` in `packages/cli/package.json` and `packages/react/components/people-resolver/package.json`.
|
|
214
|
+
|
|
215
|
+
- [#2494](https://github.com/equinor/fusion-framework/pull/2494) [`9f6eec8`](https://github.com/equinor/fusion-framework/commit/9f6eec8c5a4cb3dd430fc6bee227442a3dc28bb8) Thanks [@odinr](https://github.com/odinr)! - Generated base manifest from package will now include `StandardIncludeAssetExtensions` as `allowedExtensions`
|
|
216
|
+
|
|
217
|
+
## 9.13.1
|
|
218
|
+
|
|
219
|
+
### Patch Changes
|
|
220
|
+
|
|
221
|
+
- [#2493](https://github.com/equinor/fusion-framework/pull/2493) [`4839295`](https://github.com/equinor/fusion-framework/commit/4839295263f07704bc43930351ce34dfb27a4c81) Thanks [@eikeland](https://github.com/eikeland)! - Updating fusion-wc-person to fix issues when using selectedPerson = null in PersonSelect component.
|
|
222
|
+
|
|
223
|
+
Updated the following dependencies
|
|
224
|
+
|
|
225
|
+
- `@equinor/fusion-wc-person` from `^3.0.1` to `^3.0.3` in `packages/cli/package.json` and `packages/react/components/people-resolver/package.json`.
|
|
226
|
+
|
|
227
|
+
- Updated dependencies [[`4839295`](https://github.com/equinor/fusion-framework/commit/4839295263f07704bc43930351ce34dfb27a4c81)]:
|
|
228
|
+
- @equinor/fusion-framework-react-components-people-provider@1.4.8
|
|
229
|
+
- @equinor/fusion-framework-app@9.1.9
|
|
230
|
+
- @equinor/fusion-framework-module-feature-flag@1.1.9
|
|
231
|
+
|
|
232
|
+
## 9.13.0
|
|
233
|
+
|
|
234
|
+
### Minor Changes
|
|
10
235
|
|
|
11
|
-
|
|
236
|
+
- [#2465](https://github.com/equinor/fusion-framework/pull/2465) [`eb11a19`](https://github.com/equinor/fusion-framework/commit/eb11a1952cfa5a1ec8ca40d8f53303ff7c675cbe) Thanks [@dependabot](https://github.com/apps/dependabot)! - updated @equinor/eds-core-react to 0.42.0
|
|
237
|
+
|
|
238
|
+
- [#2459](https://github.com/equinor/fusion-framework/pull/2459) [`15152e4`](https://github.com/equinor/fusion-framework/commit/15152e413c054a5f57af93211a470c98c7696caa) Thanks [@odinr](https://github.com/odinr)! - **@equinor/fusion-framework-cli**
|
|
239
|
+
|
|
240
|
+
Updated the CLI to use the new service discovery API.
|
|
241
|
+
|
|
242
|
+
> [!NOTE]
|
|
243
|
+
> This is a quick fix until the new major version of the CLI is released.
|
|
244
|
+
|
|
245
|
+
- Updated the `baseUri` to use a more specific URL path for service discovery.
|
|
246
|
+
- Changed from `new URL(import.meta.url).origin` to `String(new URL('/_discovery/environments/current', import.meta.url))`.
|
|
247
|
+
- Changed parsing of service discovery response to match new API format.
|
|
248
|
+
|
|
249
|
+
### Patch Changes
|
|
250
|
+
|
|
251
|
+
- [#2458](https://github.com/equinor/fusion-framework/pull/2458) [`202cf10`](https://github.com/equinor/fusion-framework/commit/202cf10ae434d6432c8b57c2867b182223c19212) Thanks [@odinr](https://github.com/odinr)! - changed service discover url to match #c776845e753acf4a0bceda1c59d31e5939c44c31
|
|
252
|
+
|
|
253
|
+
- Updated dependencies []:
|
|
254
|
+
- @equinor/fusion-framework-app@9.1.8
|
|
255
|
+
- @equinor/fusion-framework-module-feature-flag@1.1.9
|
|
256
|
+
- @equinor/fusion-framework-react-components-people-provider@1.4.7
|
|
257
|
+
|
|
258
|
+
## 9.12.14
|
|
259
|
+
|
|
260
|
+
### Patch Changes
|
|
261
|
+
|
|
262
|
+
- [#2431](https://github.com/equinor/fusion-framework/pull/2431) [`53ff9cc`](https://github.com/equinor/fusion-framework/commit/53ff9ccdbac95ae8d279aed49f173708bbe9adbe) Thanks [@dependabot](https://github.com/apps/dependabot)! - Upgrade vite from 5.3.5 to [5.4.3](<(https://github.com/vitejs/vite/blob/create-vite@5.4.0/packages/create-vite/CHANGELOG.md)>)
|
|
263
|
+
|
|
264
|
+
- Updated dependencies [[`f7c143d`](https://github.com/equinor/fusion-framework/commit/f7c143d44a88cc25c377d3ce8c3d1744114b891d)]:
|
|
265
|
+
- @equinor/fusion-observable@8.4.1
|
|
266
|
+
- @equinor/fusion-framework-module-feature-flag@1.1.8
|
|
267
|
+
- @equinor/fusion-framework-app@9.1.7
|
|
268
|
+
- @equinor/fusion-framework-react-components-people-provider@1.4.6
|
|
269
|
+
|
|
270
|
+
## 9.12.13
|
|
271
|
+
|
|
272
|
+
### Patch Changes
|
|
273
|
+
|
|
274
|
+
- [#2403](https://github.com/equinor/fusion-framework/pull/2403) [`67ea61d`](https://github.com/equinor/fusion-framework/commit/67ea61dad8f50e8b8b977008b26374c2f982eb4d) Thanks [@dependabot](https://github.com/apps/dependabot)! - bump @equinor/eds-core-react from 0.40.1 to 0.41.2
|
|
275
|
+
|
|
276
|
+
[see EDS changelog](https://github.com/equinor/design-system/blob/develop/packages/eds-core-react/CHANGELOG.md)
|
|
277
|
+
|
|
278
|
+
- Updated dependencies []:
|
|
279
|
+
- @equinor/fusion-framework-app@9.1.6
|
|
280
|
+
- @equinor/fusion-framework-module-feature-flag@1.1.7
|
|
281
|
+
- @equinor/fusion-framework-react-components-people-provider@1.4.5
|
|
282
|
+
|
|
283
|
+
## 9.12.12
|
|
284
|
+
|
|
285
|
+
### Patch Changes
|
|
286
|
+
|
|
287
|
+
- [#2349](https://github.com/equinor/fusion-framework/pull/2349) [`0dd8160`](https://github.com/equinor/fusion-framework/commit/0dd8160b7b840e04ec6a92ed2bf8d00494752a00) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps): bump @vitejs/plugin-react from 4.2.1 to 4.3.1
|
|
288
|
+
|
|
289
|
+
- [#2389](https://github.com/equinor/fusion-framework/pull/2389) [`a3543e3`](https://github.com/equinor/fusion-framework/commit/a3543e31353c9eac25140842643cb8e27e9b187e) Thanks [@eikeland](https://github.com/eikeland)! - Updating fusion(react|wc)-person to fix issues with clearing component
|
|
290
|
+
|
|
291
|
+
- [#2337](https://github.com/equinor/fusion-framework/pull/2337) [`79fa856`](https://github.com/equinor/fusion-framework/commit/79fa8566d27dcc4d38da3a6b3fef1b78223f7458) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps-dev): bump rollup from 4.12.0 to 4.18.1
|
|
292
|
+
|
|
293
|
+
- [#2358](https://github.com/equinor/fusion-framework/pull/2358) [`decb9e9`](https://github.com/equinor/fusion-framework/commit/decb9e9e3d1bb1b0577b729a1e7ae812afdd83cb) Thanks [@eikeland](https://github.com/eikeland)! - Updating vitest to 2.0.4. Setting vitest as devDependency in fusion-query. Updating vite to 5.3.4
|
|
294
|
+
|
|
295
|
+
- [#2352](https://github.com/equinor/fusion-framework/pull/2352) [`2025368`](https://github.com/equinor/fusion-framework/commit/202536855f736fb58f09442da5ca473325c1141c) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps): bump vite from 5.2.10 to 5.3.3
|
|
296
|
+
|
|
297
|
+
- [#2256](https://github.com/equinor/fusion-framework/pull/2256) [`db92a9d`](https://github.com/equinor/fusion-framework/commit/db92a9d2132f74e2a72287640e6fdfbe3afa2824) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps): bump commander from 12.0.0 to 12.1.0
|
|
298
|
+
|
|
299
|
+
- [#2253](https://github.com/equinor/fusion-framework/pull/2253) [`6f93346`](https://github.com/equinor/fusion-framework/commit/6f9334672c6dd77237d52508bef8893303f33ca7) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps-dev): bump @equinor/fusion-react-context-selector from 0.6.3 to 0.6.5
|
|
300
|
+
|
|
301
|
+
- [#2264](https://github.com/equinor/fusion-framework/pull/2264) [`797095a`](https://github.com/equinor/fusion-framework/commit/797095ab3b51a675159be5541381ca06637a1b71) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps): bump express-rate-limit from 7.2.0 to 7.3.1
|
|
302
|
+
|
|
303
|
+
- [#2350](https://github.com/equinor/fusion-framework/pull/2350) [`960ca34`](https://github.com/equinor/fusion-framework/commit/960ca34cae26f386e28c16bac00e7932f4f9199a) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps): bump @equinor/eds-core-react from 0.38.0 to 0.40.1
|
|
304
|
+
|
|
305
|
+
- [#2360](https://github.com/equinor/fusion-framework/pull/2360) [`1c7ac1b`](https://github.com/equinor/fusion-framework/commit/1c7ac1b42213f33a668e79d750e0b12b227a7052) Thanks [@eikeland](https://github.com/eikeland)! - Enhanced ContextSelector component in the CLI package:
|
|
306
|
+
|
|
307
|
+
- Implemented responsive context clearing mechanism
|
|
308
|
+
- Improved handling of context selection and clearing events
|
|
309
|
+
- Optimized component rendering with useMemo and useCallback hooks
|
|
310
|
+
|
|
311
|
+
- [#2261](https://github.com/equinor/fusion-framework/pull/2261) [`aae93b9`](https://github.com/equinor/fusion-framework/commit/aae93b95120f1285545ea1b8344817c31e134ff5) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps): bump adm-zip from 0.5.10 to 0.5.14
|
|
312
|
+
|
|
313
|
+
- Updated dependencies [[`bbde502`](https://github.com/equinor/fusion-framework/commit/bbde502e638f459379f63968febbc97ebe282b76), [`a3543e3`](https://github.com/equinor/fusion-framework/commit/a3543e31353c9eac25140842643cb8e27e9b187e), [`decb9e9`](https://github.com/equinor/fusion-framework/commit/decb9e9e3d1bb1b0577b729a1e7ae812afdd83cb), [`e092f75`](https://github.com/equinor/fusion-framework/commit/e092f7599f1f2e0e0676a9f10565299272813594)]:
|
|
314
|
+
- @equinor/fusion-observable@8.4.0
|
|
315
|
+
- @equinor/fusion-framework-react-components-people-provider@1.4.4
|
|
316
|
+
- @equinor/fusion-framework-module-feature-flag@1.1.6
|
|
317
|
+
- @equinor/fusion-framework-app@9.1.5
|
|
318
|
+
|
|
319
|
+
## 9.12.11
|
|
320
|
+
|
|
321
|
+
### Patch Changes
|
|
322
|
+
|
|
323
|
+
- [#2251](https://github.com/equinor/fusion-framework/pull/2251) [`60afeaa`](https://github.com/equinor/fusion-framework/commit/60afeaab11ad2a76469807142098464bd5442e68) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps): bump @vitejs/plugin-react from 4.2.1 to 4.3.1
|
|
324
|
+
|
|
325
|
+
- [#2340](https://github.com/equinor/fusion-framework/pull/2340) [`9435ee4`](https://github.com/equinor/fusion-framework/commit/9435ee4ddebade18436c5c6bd57ee86b6baf0b24) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps): bump vite from 5.2.10 to 5.3.3
|
|
326
|
+
|
|
327
|
+
- Updated dependencies []:
|
|
328
|
+
- @equinor/fusion-framework-app@9.1.4
|
|
329
|
+
- @equinor/fusion-framework-module-feature-flag@1.1.5
|
|
330
|
+
- @equinor/fusion-framework-react-components-people-provider@1.4.3
|
|
331
|
+
|
|
332
|
+
## 9.12.10
|
|
333
|
+
|
|
334
|
+
### Patch Changes
|
|
335
|
+
|
|
336
|
+
- [#2328](https://github.com/equinor/fusion-framework/pull/2328) [`33d394f`](https://github.com/equinor/fusion-framework/commit/33d394f9718340f579e3f427bc68b59df5030d15) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps): bump vite from 5.2.10 to 5.3.3
|
|
337
|
+
|
|
338
|
+
- [#2322](https://github.com/equinor/fusion-framework/pull/2322) [`b4dd215`](https://github.com/equinor/fusion-framework/commit/b4dd2150b5f3202e4bae9773afd55993043b4a5e) Thanks [@dependabot](https://github.com/apps/dependabot)! - The Vite changelog highlights several fixes, features, and refactors in versions 5.3.3, 5.3.2, and 5.3.0.
|
|
339
|
+
Key updates include lazy evaluation of `__vite__mapDeps` files, removal of pure CSS dynamic import, and improvements to build and asset handling.
|
|
340
|
+
Additionally, Vite now supports the `system` library format and adds options for not starting a WebSocket server and ignoring certain code sections.
|
|
341
|
+
The changelog also notes performance enhancements, dependency updates, and bug fixes, including resolving circular dependencies, improving error recovery, and updating non-major dependencies.
|
|
342
|
+
|
|
343
|
+
build(deps): bump vite from 5.2.10 to 5.3.3
|
|
344
|
+
|
|
345
|
+
- [#2333](https://github.com/equinor/fusion-framework/pull/2333) [`86d55b8`](https://github.com/equinor/fusion-framework/commit/86d55b8d27a572f3f62170b1e72aceda54f955e1) Thanks [@odinr](https://github.com/odinr)! - Updated `TypeScript` to 5.5.3
|
|
346
|
+
|
|
347
|
+
- [#2320](https://github.com/equinor/fusion-framework/pull/2320) [`1dd85f3`](https://github.com/equinor/fusion-framework/commit/1dd85f3a408a73df556d1812a5f280945cc100ee) Thanks [@odinr](https://github.com/odinr)! - Removed the `removeComments` option from the `tsconfig.base.json` file.
|
|
348
|
+
|
|
349
|
+
Removing the `removeComments` option allows TypeScript to preserve comments in the compiled JavaScript output. This can be beneficial for several reasons:
|
|
350
|
+
|
|
351
|
+
1. Improved debugging: Preserved comments can help developers understand the code better during debugging sessions.
|
|
352
|
+
2. Documentation: JSDoc comments and other important code documentation will be retained in the compiled output.
|
|
353
|
+
3. Source map accuracy: Keeping comments can lead to more accurate source maps, which is crucial for debugging and error tracking.
|
|
354
|
+
|
|
355
|
+
No action is required from consumers of the library. This change affects the build process and doesn't introduce any breaking changes or new features.
|
|
356
|
+
|
|
357
|
+
Before:
|
|
358
|
+
|
|
359
|
+
```json
|
|
360
|
+
{
|
|
361
|
+
"compilerOptions": {
|
|
362
|
+
"module": "ES2022",
|
|
363
|
+
"target": "ES6",
|
|
364
|
+
"incremental": true,
|
|
365
|
+
"removeComments": true,
|
|
366
|
+
"preserveConstEnums": true,
|
|
367
|
+
"sourceMap": true,
|
|
368
|
+
"moduleResolution": "node"
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
After:
|
|
374
|
+
|
|
375
|
+
```json
|
|
376
|
+
{
|
|
377
|
+
"compilerOptions": {
|
|
378
|
+
"module": "ES2022",
|
|
379
|
+
"target": "ES6",
|
|
380
|
+
"incremental": true,
|
|
381
|
+
"preserveConstEnums": true,
|
|
382
|
+
"sourceMap": true,
|
|
383
|
+
"moduleResolution": "node"
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
This change ensures that comments are preserved in the compiled output, potentially improving the development and debugging experience for users of the Fusion Framework.
|
|
389
|
+
|
|
390
|
+
- [#2330](https://github.com/equinor/fusion-framework/pull/2330) [`4c4471a`](https://github.com/equinor/fusion-framework/commit/4c4471a61d083c6b00d25ebf82952632ff50e200) Thanks [@dependabot](https://github.com/apps/dependabot)! - build(deps-dev): bump rollup from 4.12.0 to 4.18.1
|
|
391
|
+
|
|
392
|
+
- Updated dependencies [[`86d55b8`](https://github.com/equinor/fusion-framework/commit/86d55b8d27a572f3f62170b1e72aceda54f955e1), [`29ff796`](https://github.com/equinor/fusion-framework/commit/29ff796ebb3a643c604e4153b6798bde5992363c), [`a723e86`](https://github.com/equinor/fusion-framework/commit/a723e8605059ad126602d053c65114c3ce908964), [`1dd85f3`](https://github.com/equinor/fusion-framework/commit/1dd85f3a408a73df556d1812a5f280945cc100ee)]:
|
|
393
|
+
- @equinor/fusion-framework-react-components-people-provider@1.4.2
|
|
394
|
+
- @equinor/fusion-framework-module-feature-flag@1.1.5
|
|
395
|
+
- @equinor/fusion-observable@8.3.3
|
|
396
|
+
- @equinor/fusion-framework-app@9.1.3
|
|
397
|
+
|
|
398
|
+
## 9.12.9
|
|
399
|
+
|
|
400
|
+
### Patch Changes
|
|
12
401
|
|
|
13
|
-
|
|
402
|
+
- [#2270](https://github.com/equinor/fusion-framework/pull/2270) [`b739416`](https://github.com/equinor/fusion-framework/commit/b7394165a573e545152cfcedc2ddae186ec94112) Thanks [@asbjornhaland](https://github.com/asbjornhaland)! - - Update fusion-wc-person to resolve issue with positioning
|
|
14
403
|
|
|
15
|
-
|
|
404
|
+
- Updated dependencies [[`97e41a5`](https://github.com/equinor/fusion-framework/commit/97e41a55d05644b6684c6cb165b65b115bd416eb), [`b739416`](https://github.com/equinor/fusion-framework/commit/b7394165a573e545152cfcedc2ddae186ec94112)]:
|
|
405
|
+
- @equinor/fusion-observable@8.3.2
|
|
406
|
+
- @equinor/fusion-framework-react-components-people-provider@1.4.1
|
|
407
|
+
- @equinor/fusion-framework-module-feature-flag@1.1.4
|
|
408
|
+
- @equinor/fusion-framework-app@9.1.2
|
|
16
409
|
|
|
17
410
|
## 9.12.8
|
|
18
411
|
|
package/README.md
CHANGED
|
@@ -1,20 +1,42 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
2
|
+
title: Fusion Framework CLI
|
|
3
3
|
---
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### fusion-framework-cli
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The cli, named `fusion-framework-cli`, contains tooling for running, building and publishing your application.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
The fusion-famework-cli should be installed as a devDependency.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
```sh
|
|
12
|
+
pnpm add -D @equinor/fusion-framework-cli
|
|
13
|
+
```
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
You can always use the option `-h or --help or help` to get help for the CLI and its commands.
|
|
16
|
+
|
|
17
|
+
Example:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
fusion-framework-cli help
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### App Commands
|
|
24
|
+
|
|
25
|
+
See [App Commands](/cli/docs/commands.md)
|
|
26
|
+
|
|
27
|
+
### Configuration
|
|
28
|
+
|
|
29
|
+
See [Configuration](/cli/docs/configuration.md)
|
|
30
|
+
|
|
31
|
+
### Tooling
|
|
32
|
+
|
|
33
|
+
- tooling for [Vitest](https://vitest.dev/) - 🚀 coming soon
|
|
34
|
+
- tooling for proxy configuration - 🚀 coming soon
|
|
35
|
+
|
|
36
|
+
### Widget
|
|
15
37
|
|
|
16
38
|
Tooling for developing widgets - 🚀 coming soon
|
|
17
39
|
|
|
18
|
-
### Portal
|
|
40
|
+
### Portal
|
|
19
41
|
|
|
20
|
-
Tooling for developing portals - 🚀 coming
|
|
42
|
+
Tooling for developing portals - 🚀 coming
|
|
@@ -12,9 +12,11 @@ import { build } from 'vite';
|
|
|
12
12
|
import { chalk } from './utils/format.js';
|
|
13
13
|
import { Spinner } from './utils/spinner.js';
|
|
14
14
|
import { loadViteConfig } from './utils/load-vite-config.js';
|
|
15
|
+
import { loadAppManifest } from './utils/load-manifest.js';
|
|
15
16
|
import { resolveAppPackage } from '../lib/app-package.js';
|
|
17
|
+
import { AppAssetExportPlugin, createExtensionFilterPattern, } from '../lib/plugins/app-assets/index.js';
|
|
16
18
|
export const buildApplication = (options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
17
|
-
var _a;
|
|
19
|
+
var _a, _b;
|
|
18
20
|
const { configSourceFiles, library, outDir } = options;
|
|
19
21
|
const env = {
|
|
20
22
|
command: 'build',
|
|
@@ -27,18 +29,37 @@ export const buildApplication = (options) => __awaiter(void 0, void 0, void 0, f
|
|
|
27
29
|
spinner.info('📦', chalk.yellowBright([pkg.packageJson.name, pkg.packageJson.version].join('@')));
|
|
28
30
|
const packageDirname = dirname(pkg.path);
|
|
29
31
|
spinner.info(`🏠 ${chalk.blueBright(packageDirname)}`);
|
|
32
|
+
spinner.start('resolve application manifest');
|
|
33
|
+
const { manifest } = yield loadAppManifest(env, pkg, {
|
|
34
|
+
file: configSourceFiles === null || configSourceFiles === void 0 ? void 0 : configSourceFiles.manifest,
|
|
35
|
+
});
|
|
36
|
+
spinner.succeed();
|
|
30
37
|
const { viteConfig } = yield loadViteConfig(env, {
|
|
31
38
|
file: configSourceFiles === null || configSourceFiles === void 0 ? void 0 : configSourceFiles.vite,
|
|
32
39
|
});
|
|
40
|
+
const includeAssetsPattern = ((_b = manifest.build) === null || _b === void 0 ? void 0 : _b.allowedExtensions)
|
|
41
|
+
? createExtensionFilterPattern(manifest.build.allowedExtensions)
|
|
42
|
+
: undefined;
|
|
43
|
+
spinner.info('📂', 'Using asset include filter:', chalk.red(includeAssetsPattern));
|
|
44
|
+
viteConfig.plugins = [
|
|
45
|
+
...viteConfig.plugins,
|
|
46
|
+
AppAssetExportPlugin({
|
|
47
|
+
include: includeAssetsPattern,
|
|
48
|
+
}),
|
|
49
|
+
];
|
|
33
50
|
if (library === 'react') {
|
|
34
51
|
const reactPlugin = yield import('@vitejs/plugin-react');
|
|
35
52
|
viteConfig.plugins.push(reactPlugin.default());
|
|
36
53
|
}
|
|
37
54
|
viteConfig.build.outDir = outDir.trim();
|
|
55
|
+
spinner.attachConsole = true;
|
|
56
|
+
console.log('Building application...');
|
|
38
57
|
const viteBuild = yield build(viteConfig);
|
|
58
|
+
spinner.attachConsole = false;
|
|
39
59
|
return {
|
|
40
60
|
viteConfig,
|
|
41
61
|
viteBuild,
|
|
62
|
+
pkg,
|
|
42
63
|
};
|
|
43
64
|
});
|
|
44
65
|
//# sourceMappingURL=build-application.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-application.js","sourceRoot":"","sources":["../../src/bin/build-application.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"build-application.js","sourceRoot":"","sources":["../../src/bin/build-application.ts"],"names":[],"mappings":"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"}
|
|
@@ -10,29 +10,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import AdmZip from 'adm-zip';
|
|
11
11
|
import { dirname, resolve } from 'node:path';
|
|
12
12
|
import { mkdir } from 'node:fs/promises';
|
|
13
|
-
import { loadPackage } from './utils/load-package.js';
|
|
14
13
|
import { chalk, formatByteSize, formatPath } from './utils/format.js';
|
|
15
14
|
import { Spinner } from './utils/spinner.js';
|
|
16
15
|
import { buildApplication } from './build-application.js';
|
|
17
|
-
import
|
|
16
|
+
import { createBuildManifest } from './create-export-manifest.js';
|
|
18
17
|
import { fileExistsSync } from '../lib/utils/file-exists.js';
|
|
19
18
|
export const bundleApplication = (options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
20
19
|
const { outDir, archive } = options;
|
|
21
20
|
const spinner = Spinner.Global({ prefixText: chalk.dim('pack') });
|
|
22
|
-
const pkg = yield loadPackage();
|
|
23
21
|
spinner.start('build application');
|
|
24
|
-
yield buildApplication({ outDir });
|
|
22
|
+
const { pkg } = yield buildApplication({ outDir });
|
|
25
23
|
spinner.succeed();
|
|
26
24
|
spinner.start('generate manifest');
|
|
27
|
-
const
|
|
28
|
-
spinner.succeed();
|
|
29
|
-
console.log(chalk.dim(JSON.stringify(manifest, undefined, 2)));
|
|
25
|
+
const buildManifest = yield createBuildManifest({ outputFile: `${outDir}/app-manifest.json` });
|
|
26
|
+
spinner.succeed('generated manifest:', '\n' + JSON.stringify(buildManifest, undefined, 2));
|
|
30
27
|
const bundle = new AdmZip();
|
|
31
28
|
bundle.addLocalFile(pkg.path);
|
|
32
29
|
spinner.info(`added ./package.json`);
|
|
33
30
|
bundle.addLocalFolder(outDir);
|
|
34
31
|
spinner.info(`added ./${outDir}`);
|
|
35
|
-
const
|
|
32
|
+
const appDir = dirname(pkg.path);
|
|
33
|
+
const licenseFile = resolve(appDir, 'LICENSE.md');
|
|
36
34
|
if (fileExistsSync(licenseFile)) {
|
|
37
35
|
bundle.addLocalFile(licenseFile);
|
|
38
36
|
spinner.info(`added ${licenseFile}`);
|
|
@@ -40,7 +38,7 @@ export const bundleApplication = (options) => __awaiter(void 0, void 0, void 0,
|
|
|
40
38
|
else {
|
|
41
39
|
spinner.warn(`missing ${licenseFile}`);
|
|
42
40
|
}
|
|
43
|
-
const readmeFile = resolve(
|
|
41
|
+
const readmeFile = resolve(appDir, 'README.md');
|
|
44
42
|
if (fileExistsSync(readmeFile)) {
|
|
45
43
|
bundle.addLocalFile(readmeFile);
|
|
46
44
|
spinner.info(`added ${readmeFile}`);
|
|
@@ -53,7 +51,6 @@ export const bundleApplication = (options) => __awaiter(void 0, void 0, void 0,
|
|
|
53
51
|
yield mkdir(dirname(archive), { recursive: true });
|
|
54
52
|
}
|
|
55
53
|
bundle.writeZip(archive);
|
|
56
|
-
spinner.
|
|
57
|
-
spinner.succeed();
|
|
54
|
+
spinner.succeed('Bundle complete', formatPath(archive, { relative: true }), formatByteSize(archive));
|
|
58
55
|
});
|
|
59
56
|
//# sourceMappingURL=bundle-application.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-application.js","sourceRoot":"","sources":["../../src/bin/bundle-application.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,MAAM,MAAM,SAAS,CAAC;AAE7B,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"bundle-application.js","sourceRoot":"","sources":["../../src/bin/bundle-application.ts"],"names":[],"mappings":"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"}
|