@equinor/fusion-framework-cli 11.0.0-next.5 → 11.0.0-next.7
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 +31 -0
- package/bin/build/bin.js +7 -7
- package/bin/build/cli.js +426 -188
- package/bin/build/{portal-pack-qpEBTWNW.js → portal-config-publish-OZ7Ocme4.js} +219 -22
- package/dist/esm/bin/helpers/resolve-portal-config.js +46 -0
- package/dist/esm/bin/helpers/resolve-portal-config.js.map +1 -0
- package/dist/esm/bin/index.js +2 -0
- package/dist/esm/bin/index.js.map +1 -1
- package/dist/esm/bin/portal-config-publish.js +74 -0
- package/dist/esm/bin/portal-config-publish.js.map +1 -0
- package/dist/esm/bin/portal-config.js +48 -0
- package/dist/esm/bin/portal-config.js.map +1 -0
- package/dist/esm/bin/portal-dev.js +3 -4
- package/dist/esm/bin/portal-dev.js.map +1 -1
- package/dist/esm/cli/commands/app/alias.js +4 -4
- package/dist/esm/cli/commands/app/alias.js.map +1 -1
- package/dist/esm/cli/commands/app/build.js +10 -3
- package/dist/esm/cli/commands/app/build.js.map +1 -1
- package/dist/esm/cli/commands/app/check.js +15 -5
- package/dist/esm/cli/commands/app/check.js.map +1 -1
- package/dist/esm/cli/commands/app/config.js +20 -8
- package/dist/esm/cli/commands/app/config.js.map +1 -1
- package/dist/esm/cli/commands/app/dev.js +10 -4
- package/dist/esm/cli/commands/app/dev.js.map +1 -1
- package/dist/esm/cli/commands/app/index.js +18 -1
- package/dist/esm/cli/commands/app/index.js.map +1 -1
- package/dist/esm/cli/commands/app/manifest.js +12 -3
- package/dist/esm/cli/commands/app/manifest.js.map +1 -1
- package/dist/esm/cli/commands/app/pack.js +16 -9
- package/dist/esm/cli/commands/app/pack.js.map +1 -1
- package/dist/esm/cli/commands/app/publish.js +15 -4
- package/dist/esm/cli/commands/app/publish.js.map +1 -1
- package/dist/esm/cli/commands/app/tag.js +16 -4
- package/dist/esm/cli/commands/app/tag.js.map +1 -1
- package/dist/esm/cli/commands/app/upload.js +13 -8
- package/dist/esm/cli/commands/app/upload.js.map +1 -1
- package/dist/esm/cli/commands/auth/index.js +13 -1
- package/dist/esm/cli/commands/auth/index.js.map +1 -1
- package/dist/esm/cli/commands/auth/login.js +11 -7
- package/dist/esm/cli/commands/auth/login.js.map +1 -1
- package/dist/esm/cli/commands/auth/logout.js +10 -7
- package/dist/esm/cli/commands/auth/logout.js.map +1 -1
- package/dist/esm/cli/commands/auth/token.js +13 -9
- package/dist/esm/cli/commands/auth/token.js.map +1 -1
- package/dist/esm/cli/commands/disco/resolve.js +13 -16
- package/dist/esm/cli/commands/disco/resolve.js.map +1 -1
- package/dist/esm/cli/commands/portal/build.js +12 -7
- package/dist/esm/cli/commands/portal/build.js.map +1 -1
- package/dist/esm/cli/commands/portal/config.js +101 -0
- package/dist/esm/cli/commands/portal/config.js.map +1 -0
- package/dist/esm/cli/commands/portal/dev.js +9 -6
- package/dist/esm/cli/commands/portal/dev.js.map +1 -1
- package/dist/esm/cli/commands/portal/index.js +3 -1
- package/dist/esm/cli/commands/portal/index.js.map +1 -1
- package/dist/esm/cli/commands/portal/manifest.js +11 -8
- package/dist/esm/cli/commands/portal/manifest.js.map +1 -1
- package/dist/esm/cli/commands/portal/pack.js +13 -8
- package/dist/esm/cli/commands/portal/pack.js.map +1 -1
- package/dist/esm/cli/commands/portal/publish.js +11 -8
- package/dist/esm/cli/commands/portal/publish.js.map +1 -1
- package/dist/esm/cli/commands/portal/schema.js +10 -8
- package/dist/esm/cli/commands/portal/schema.js.map +1 -1
- package/dist/esm/cli/commands/portal/tag.js +12 -8
- package/dist/esm/cli/commands/portal/tag.js.map +1 -1
- package/dist/esm/cli/commands/portal/upload.js +8 -7
- package/dist/esm/cli/commands/portal/upload.js.map +1 -1
- package/dist/esm/lib/portal/index.js +2 -0
- package/dist/esm/lib/portal/index.js.map +1 -1
- package/dist/esm/lib/portal/load-portal-config.js +49 -0
- package/dist/esm/lib/portal/load-portal-config.js.map +1 -0
- package/dist/esm/lib/portal/portal-config.js +23 -0
- package/dist/esm/lib/portal/portal-config.js.map +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/bin/helpers/resolve-portal-config.d.ts +18 -0
- package/dist/types/bin/index.d.ts +2 -0
- package/dist/types/bin/portal-config-publish.d.ts +26 -0
- package/dist/types/bin/portal-config.d.ts +46 -0
- package/dist/types/cli/commands/app/config.d.ts +3 -3
- package/dist/types/cli/commands/app/pack.d.ts +1 -1
- package/dist/types/cli/commands/auth/logout.d.ts +0 -4
- package/dist/types/cli/commands/auth/token.d.ts +0 -5
- package/dist/types/cli/commands/disco/resolve.d.ts +0 -7
- package/dist/types/cli/commands/portal/config.d.ts +32 -0
- package/dist/types/lib/portal/index.d.ts +2 -0
- package/dist/types/lib/portal/load-portal-config.d.ts +83 -0
- package/dist/types/lib/portal/portal-config.d.ts +69 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +8 -7
package/bin/build/cli.js
CHANGED
|
@@ -5,7 +5,7 @@ import { createCommand, createOption, InvalidOptionArgumentError, Command } from
|
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import chalk from 'chalk';
|
|
7
7
|
import 'pretty-bytes';
|
|
8
|
-
import { S as Spinner, b as buildApplication, a as bundleApp, F as FusionEnv, r as resolveDefaultEnv,
|
|
8
|
+
import { S as Spinner, b as buildApplication, a as bundleApp, F as FusionEnv, r as resolveDefaultEnv, i as resolveProjectPackage, j as resolveAppManifest, k as initializeFramework, p as publishAppConfig, g as generateApplicationConfig, m as formatPath, H as HttpJsonResponseError, n as loadAppManifest, s as startAppDevServer, o as fileExistsSync, N as NoAccountsError, q as resolvePortalManifest, t as resolvePortalConfig, u as createDevServer, l as loadPortalManifest, v as loadPortalSchema, w as writeFile$1, c as buildPortal, d as bundlePortal, f as publishPortalConfig, e as generatePortalConfig } from './portal-config-publish-OZ7Ocme4.js';
|
|
9
9
|
import { importJSON } from '@equinor/fusion-imports';
|
|
10
10
|
import 'lodash.mergewith';
|
|
11
11
|
import '@equinor/fusion-framework-dev-server';
|
|
@@ -13,12 +13,12 @@ import 'vite';
|
|
|
13
13
|
import { mkdir, writeFile } from 'node:fs/promises';
|
|
14
14
|
import 'node:assert';
|
|
15
15
|
import 'node:child_process';
|
|
16
|
+
import 'zod';
|
|
16
17
|
import AdmZip from 'adm-zip';
|
|
17
18
|
import { stdout } from 'node:process';
|
|
18
19
|
import '@azure/msal-node';
|
|
19
20
|
import 'open';
|
|
20
21
|
import 'node:http';
|
|
21
|
-
import 'zod';
|
|
22
22
|
import 'is-ci';
|
|
23
23
|
import 'ora';
|
|
24
24
|
|
|
@@ -157,12 +157,19 @@ class ConsoleLogger {
|
|
|
157
157
|
*
|
|
158
158
|
* @see buildApplication for build implementation details
|
|
159
159
|
*/
|
|
160
|
-
const command$
|
|
161
|
-
.description(
|
|
162
|
-
|
|
163
|
-
'
|
|
160
|
+
const command$p = createCommand('build')
|
|
161
|
+
.description('Build the application using a manifest file and environment-specific configuration.')
|
|
162
|
+
.addHelpText('after', [
|
|
163
|
+
'Builds the application using a manifest file and environment-specific configuration.',
|
|
164
|
+
'If no manifest is provided, searches for a default app.manifest.[ts|js|json] in the current directory.',
|
|
164
165
|
'You can use environment variables to customize the build process.',
|
|
165
166
|
'',
|
|
167
|
+
'Arguments:',
|
|
168
|
+
' [manifest] Manifest file to use for building (e.g., app.manifest.ts)',
|
|
169
|
+
'',
|
|
170
|
+
'Options:',
|
|
171
|
+
' -d, --debug Enable debug mode for verbose logging (default: false)',
|
|
172
|
+
'',
|
|
166
173
|
'Examples:',
|
|
167
174
|
' $ fusion build',
|
|
168
175
|
' $ fusion build app.manifest.dev.ts --debug',
|
|
@@ -174,7 +181,11 @@ const command$o = createCommand('build')
|
|
|
174
181
|
await buildApplication({ log, manifest });
|
|
175
182
|
});
|
|
176
183
|
|
|
177
|
-
|
|
184
|
+
function getDefaultExportFromCjs (x) {
|
|
185
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const DEFAULT_ARCHIVE = 'app-bundle.zip';
|
|
178
189
|
/**
|
|
179
190
|
* CLI command: `pack`
|
|
180
191
|
*
|
|
@@ -203,20 +214,27 @@ const defaultArchive = 'app-bundle.zip';
|
|
|
203
214
|
*
|
|
204
215
|
* @see bundleApp for implementation details
|
|
205
216
|
*/
|
|
206
|
-
const command$
|
|
207
|
-
.description(
|
|
208
|
-
|
|
209
|
-
'
|
|
210
|
-
'
|
|
211
|
-
'
|
|
212
|
-
'If no manifest is provided,
|
|
213
|
-
'
|
|
217
|
+
const command$o = createCommand('pack')
|
|
218
|
+
.description('Create a distributable app bundle of the application.')
|
|
219
|
+
.addHelpText('after', [
|
|
220
|
+
'Creates a distributable app bundle of the application.',
|
|
221
|
+
'Bundles all necessary files for deployment.',
|
|
222
|
+
'You can specify the output filename and directory, and optionally provide a manifest file.',
|
|
223
|
+
'If no manifest is provided, defaults to app.manifest.[ts|js|json] in the current directory.',
|
|
224
|
+
'',
|
|
225
|
+
'Arguments:',
|
|
226
|
+
' [manifest] Manifest file to use for bundling (e.g., app.manifest.ts)',
|
|
227
|
+
'',
|
|
228
|
+
'Options:',
|
|
229
|
+
' -a, --archive Name of the output archive file (default: app-bundle.zip)',
|
|
230
|
+
' -o, --output Directory where the archive will be saved (default: current working directory)',
|
|
231
|
+
' -d, --debug Enable debug mode for verbose logging',
|
|
214
232
|
'',
|
|
215
233
|
'Examples:',
|
|
216
234
|
' $ fusion pack',
|
|
217
235
|
' $ fusion pack app.manifest.dev.ts --archive my-app.zip --output ./dist',
|
|
218
236
|
].join('\n'))
|
|
219
|
-
.option('-a, --archive [string]', 'Name of the output archive file (default: app-bundle.zip)',
|
|
237
|
+
.option('-a, --archive [string]', 'Name of the output archive file (default: app-bundle.zip)', DEFAULT_ARCHIVE)
|
|
220
238
|
.option('-o, --output [string]', 'Directory where the archive will be saved (default: current working directory)', process.cwd())
|
|
221
239
|
.option('-d, --debug', 'Enable debug mode for verbose logging', false)
|
|
222
240
|
.argument('[manifest]', 'Manifest file to use for bundling (e.g., app.manifest.ts)')
|
|
@@ -437,11 +455,21 @@ const checkApp = async (options) => {
|
|
|
437
455
|
*
|
|
438
456
|
* @see checkApp for implementation details
|
|
439
457
|
*/
|
|
440
|
-
const command$
|
|
441
|
-
.description(
|
|
442
|
-
'
|
|
443
|
-
'
|
|
444
|
-
|
|
458
|
+
const command$n = withAuthOptions(createCommand('check')
|
|
459
|
+
.description('Check if application is registered in Fusion app store.')
|
|
460
|
+
.addHelpText('after', [
|
|
461
|
+
'Checks if the application is registered in the Fusion app store.',
|
|
462
|
+
'Verifies the registration status of your application in the Fusion app store.',
|
|
463
|
+
'Helps identify issues with app registration or configuration.',
|
|
464
|
+
'Supports authentication and environment options. Provides a debug mode for verbose logging.',
|
|
465
|
+
'',
|
|
466
|
+
'Options:',
|
|
467
|
+
' -d, --debug Enable debug mode for verbose logging (default: false)',
|
|
468
|
+
' --environment <env> Specify the environment (see available environments)',
|
|
469
|
+
' --token <token> Provide an authentication token (if required)',
|
|
470
|
+
'',
|
|
471
|
+
'Examples:',
|
|
472
|
+
' $ fusion check --environment prod --debug',
|
|
445
473
|
].join('\n'))
|
|
446
474
|
.option('-d, --debug', 'debug mode', false)
|
|
447
475
|
.addOption(createEnvOption({ allowDev: false }))
|
|
@@ -617,16 +645,21 @@ const uploadApplication = async (opt) => {
|
|
|
617
645
|
*
|
|
618
646
|
* @see uploadApplication for implementation details
|
|
619
647
|
*/
|
|
620
|
-
const command$
|
|
621
|
-
.description(
|
|
622
|
-
|
|
648
|
+
const command$m = withAuthOptions(createCommand('upload')
|
|
649
|
+
.description('Upload a Fusion application bundle to the Fusion App Store.')
|
|
650
|
+
.addHelpText('after', [
|
|
651
|
+
'',
|
|
652
|
+
'Uploads a Fusion application bundle to the Fusion App Store.',
|
|
653
|
+
'Uploads a distributable application bundle (e.g., app-bundle.zip) to the Fusion app registry.',
|
|
654
|
+
'Supports specifying application key, environment, and debug mode.',
|
|
623
655
|
'',
|
|
624
|
-
'
|
|
656
|
+
'Arguments:',
|
|
657
|
+
' [bundle] Application bundle to upload (default: app-bundle.zip)',
|
|
625
658
|
'',
|
|
626
659
|
'Options:',
|
|
627
|
-
' --appKey <string>
|
|
628
|
-
' --env <env>
|
|
629
|
-
' --debug
|
|
660
|
+
' -k, --appKey <string> Application key (if not provided, resolved from manifest)',
|
|
661
|
+
' -e, --env <env> Target environment',
|
|
662
|
+
' -d, --debug Enable debug mode for verbose logging',
|
|
630
663
|
'',
|
|
631
664
|
'Examples:',
|
|
632
665
|
' $ fusion upload',
|
|
@@ -636,7 +669,7 @@ const command$l = withAuthOptions(createCommand('upload')
|
|
|
636
669
|
.option('-d, --debug [boolean]', 'Enable debug mode for verbose logging', false)
|
|
637
670
|
.option('-k, --appKey <string>', 'Application key (if not provided, resolved from manifest)')
|
|
638
671
|
.addOption(createEnvOption({ allowDev: false }))
|
|
639
|
-
.argument('[bundle]', 'Application bundle to upload (default: app-bundle.zip)',
|
|
672
|
+
.argument('[bundle]', 'Application bundle to upload (default: app-bundle.zip)', DEFAULT_ARCHIVE)
|
|
640
673
|
.action(async (bundle, options) => {
|
|
641
674
|
const log = new ConsoleLogger('portal:upload', {
|
|
642
675
|
debug: options.debug,
|
|
@@ -688,25 +721,37 @@ const command$l = withAuthOptions(createCommand('upload')
|
|
|
688
721
|
* -o, --output <stdout|path> Output to stdout or a file (default: stdout)
|
|
689
722
|
*
|
|
690
723
|
* Example:
|
|
691
|
-
* $ fusion config app.config.ts
|
|
692
|
-
* $ fusion config app.config.prod.ts --output ./dist/app.config.json
|
|
693
|
-
* $ fusion config --publish --manifest app.manifest.ts --env prod
|
|
724
|
+
* $ fusion-framework-cli config app.config.ts
|
|
725
|
+
* $ fusion-framework-cli config app.config.prod.ts --output ./dist/app.config.json
|
|
726
|
+
* $ fusion-framework-cli config --publish --manifest app.manifest.ts --env prod
|
|
694
727
|
*
|
|
695
728
|
* @see generateApplicationConfig, publishAppConfig for implementation details
|
|
696
729
|
*/
|
|
697
|
-
const command$
|
|
698
|
-
.description(
|
|
730
|
+
const command$l = withAuthOptions(createCommand('config')
|
|
731
|
+
.description('Generate or publish the Fusion application configuration file.')
|
|
732
|
+
.addHelpText('after', [
|
|
699
733
|
'Generate and/or publish the application configuration for Fusion apps.',
|
|
700
734
|
'',
|
|
701
735
|
'By default, outputs the generated config to stdout or a file. Use --publish to upload the config to the Fusion app registry.',
|
|
702
736
|
'Options [token, tenant, client, manifest] are only relevant when --publish is used.',
|
|
703
737
|
'Option [-e, --env] cannot be set to dev when --publish is used.',
|
|
704
738
|
'',
|
|
739
|
+
'Arguments:',
|
|
740
|
+
' [config] Config build file to use (e.g., app.config[.env]?.[ts,js,json])',
|
|
741
|
+
'',
|
|
742
|
+
'Options:',
|
|
743
|
+
' --debug Enable debug mode for verbose logging',
|
|
744
|
+
' --silent Silent mode, suppresses output except errors',
|
|
745
|
+
' --publish Publish config to Fusion app registry',
|
|
746
|
+
' --manifest <path> Path to the app manifest file (required with --publish)',
|
|
747
|
+
' -e, --env <env> Target environment',
|
|
748
|
+
' -o, --output <stdout|path> Output to stdout or a file (default: stdout)',
|
|
749
|
+
'',
|
|
705
750
|
'Examples:',
|
|
706
|
-
' $ fusion config app.config.ts',
|
|
707
|
-
' $ fusion config app.config.prod.ts --output ./dist/app.config.json',
|
|
708
|
-
' $ fusion config --publish --manifest app.manifest.ts --env prod',
|
|
709
|
-
' $ fusion config --env prod my-custom.config.ts',
|
|
751
|
+
' $ fusion-framework-cli config app.config.ts',
|
|
752
|
+
' $ fusion-framework-cli config app.config.prod.ts --output ./dist/app.config.json',
|
|
753
|
+
' $ fusion-framework-cli config --publish --manifest app.manifest.ts --env prod',
|
|
754
|
+
' $ fusion-framework-cli config --env prod my-custom.config.ts',
|
|
710
755
|
].join('\n'))
|
|
711
756
|
.option('--debug', 'Enable debug mode for verbose logging')
|
|
712
757
|
.option('--silent', 'Silent mode, suppresses output except errors')
|
|
@@ -861,14 +906,26 @@ const tagApplication = async (options) => {
|
|
|
861
906
|
*
|
|
862
907
|
* @see tagApplication for implementation details
|
|
863
908
|
*/
|
|
864
|
-
const command$
|
|
865
|
-
.description(
|
|
866
|
-
|
|
909
|
+
const command$k = withAuthOptions(createCommand('tag')
|
|
910
|
+
.description('Tag your Fusion application with a specific version or preview.')
|
|
911
|
+
.addHelpText('after', [
|
|
867
912
|
'',
|
|
868
|
-
'
|
|
869
|
-
'
|
|
913
|
+
'Tags a Fusion application with a specific version or preview in the Fusion app registry.',
|
|
914
|
+
'Applies a tag to the specified application version for release management.',
|
|
915
|
+
'App key and version can be provided or resolved from the manifest file.',
|
|
870
916
|
'Supports environment selection, debug, and silent modes.',
|
|
871
917
|
'',
|
|
918
|
+
'Arguments:',
|
|
919
|
+
' <tag> Tag to apply (latest | preview | stable)',
|
|
920
|
+
'',
|
|
921
|
+
'Options:',
|
|
922
|
+
' --appKey <string> Application key (if not provided, resolved from manifest)',
|
|
923
|
+
' -v, --version <string> Version to tag (if not provided, resolved from manifest)',
|
|
924
|
+
' -m, --manifest <string> Manifest file to use for resolving app key and version',
|
|
925
|
+
' --debug Enable debug mode for verbose logging',
|
|
926
|
+
' --silent Silent mode, suppresses output except errors',
|
|
927
|
+
' -e, --env <env> Target environment',
|
|
928
|
+
'',
|
|
872
929
|
'Examples:',
|
|
873
930
|
' $ fusion tag latest',
|
|
874
931
|
' $ fusion tag preview --env prod --manifest app.manifest.prod.ts',
|
|
@@ -950,12 +1007,18 @@ const command$j = withAuthOptions(createCommand('tag')
|
|
|
950
1007
|
*
|
|
951
1008
|
* @see startAppDevServer for implementation details
|
|
952
1009
|
*/
|
|
953
|
-
const command$
|
|
954
|
-
.description(
|
|
955
|
-
|
|
1010
|
+
const command$j = createCommand('dev')
|
|
1011
|
+
.description('Start the application in development mode.')
|
|
1012
|
+
.addHelpText('after', [
|
|
956
1013
|
'',
|
|
957
|
-
'
|
|
958
|
-
'
|
|
1014
|
+
'Starts the application in development mode with a local dev server.',
|
|
1015
|
+
'',
|
|
1016
|
+
'Options:',
|
|
1017
|
+
' --debug Enable debug mode',
|
|
1018
|
+
' --manifest <path> Path to the app manifest file (app.manifest[.env]?.[ts,js,json])',
|
|
1019
|
+
' --config <path> Path to the app config file (app.config[.env]?.[ts,js,json])',
|
|
1020
|
+
' --env <environment> Runtime environment for the dev server (default: local)',
|
|
1021
|
+
' --port <port> Port for the development server (default: 3000)',
|
|
959
1022
|
'',
|
|
960
1023
|
'Examples:',
|
|
961
1024
|
' $ fusion app dev',
|
|
@@ -1008,14 +1071,23 @@ const command$i = createCommand('dev')
|
|
|
1008
1071
|
*
|
|
1009
1072
|
* @see loadAppManifest for implementation details
|
|
1010
1073
|
*/
|
|
1011
|
-
const command$
|
|
1012
|
-
.description(
|
|
1013
|
-
|
|
1074
|
+
const command$i = createCommand('manifest')
|
|
1075
|
+
.description('Build and output the application manifest for Fusion apps.')
|
|
1076
|
+
.addHelpText('after', [
|
|
1014
1077
|
'',
|
|
1015
|
-
'
|
|
1078
|
+
'Builds and outputs the application manifest for Fusion apps.',
|
|
1079
|
+
'By default, prints the manifest to stdout. Use --output to write to a file.',
|
|
1016
1080
|
'You can specify a custom manifest build file or use the default (app.manifest[.env]?.[ts,js,json]).',
|
|
1017
1081
|
'Supports debug and silent modes for flexible output.',
|
|
1018
1082
|
'',
|
|
1083
|
+
'Arguments:',
|
|
1084
|
+
' [manifest] Manifest build file to use (e.g., app.manifest[.env]?.[ts,js,json])',
|
|
1085
|
+
'',
|
|
1086
|
+
'Options:',
|
|
1087
|
+
' -d, --debug Enable debug mode for verbose logging',
|
|
1088
|
+
' -o, --output Write manifest to the specified file (default: stdout)',
|
|
1089
|
+
' -s, --silent Silent mode, suppresses output except errors',
|
|
1090
|
+
'',
|
|
1019
1091
|
'Examples:',
|
|
1020
1092
|
' $ fusion manifest',
|
|
1021
1093
|
' $ fusion manifest app.manifest.prod.ts --output ./dist/app.manifest.json',
|
|
@@ -1073,12 +1145,23 @@ const command$h = createCommand('manifest')
|
|
|
1073
1145
|
*
|
|
1074
1146
|
* @see uploadApplication, tagApplication for implementation details
|
|
1075
1147
|
*/
|
|
1076
|
-
const command$
|
|
1077
|
-
.description(
|
|
1078
|
-
'
|
|
1148
|
+
const command$h = withAuthOptions(createCommand('publish')
|
|
1149
|
+
.description('Build, upload, and tag your Fusion application for deployment.')
|
|
1150
|
+
.addHelpText('after', [
|
|
1079
1151
|
'',
|
|
1080
|
-
'
|
|
1081
|
-
'
|
|
1152
|
+
'Builds, uploads, and tags a Fusion application for deployment to the Fusion portal.',
|
|
1153
|
+
'Bundles the app, uploads it to the Fusion app store, and applies a tag for versioning.',
|
|
1154
|
+
'Supports specifying environment, manifest file, and tag.',
|
|
1155
|
+
'Debug mode and authentication options are supported.',
|
|
1156
|
+
'',
|
|
1157
|
+
'Arguments:',
|
|
1158
|
+
' [bundle] Path to the app bundle to upload',
|
|
1159
|
+
'',
|
|
1160
|
+
'Options:',
|
|
1161
|
+
' -d, --debug Enable debug mode for verbose logging (default: false)',
|
|
1162
|
+
' -e, --env <env> Target environment',
|
|
1163
|
+
' -m, --manifest Manifest file to use for bundling (e.g., app.manifest.ts)',
|
|
1164
|
+
' -t, --tag Tag to apply to the published app (latest | preview)',
|
|
1082
1165
|
'',
|
|
1083
1166
|
'Examples:',
|
|
1084
1167
|
' $ fusion publish',
|
|
@@ -1159,30 +1242,30 @@ const command$g = withAuthOptions(createCommand('publish')
|
|
|
1159
1242
|
* Each alias maps an old "build-*" command to its new equivalent, providing warnings and guidance for users.
|
|
1160
1243
|
* These aliases help maintain backward compatibility and inform users about updated command usage.
|
|
1161
1244
|
*/
|
|
1162
|
-
command$
|
|
1245
|
+
command$o.alias('build-pack').hook('preAction', (thisCommand) => {
|
|
1163
1246
|
if (process.argv[3] === 'build-pack') {
|
|
1164
1247
|
console.warn(chalk.bgRedBright.bold('The command "build-pack" is deprecated. Please use "pack" instead.'));
|
|
1165
1248
|
if (!thisCommand.getOptionValue('archive')) {
|
|
1166
|
-
thisCommand.setOptionValue('archive',
|
|
1249
|
+
thisCommand.setOptionValue('archive', DEFAULT_ARCHIVE);
|
|
1167
1250
|
}
|
|
1168
1251
|
}
|
|
1169
1252
|
});
|
|
1170
|
-
command$
|
|
1253
|
+
command$m.alias('build-upload').hook('preAction', (thisCommand) => {
|
|
1171
1254
|
if (process.argv[3] === 'build-upload') {
|
|
1172
1255
|
console.warn(chalk.bgRedBright.bold('The command "build-upload" is deprecated. Please use "upload" instead.'));
|
|
1173
1256
|
if (thisCommand.getOptionValue('service')) {
|
|
1174
1257
|
throw new Error('The --service option is deprecated. Please use --env instead.');
|
|
1175
1258
|
}
|
|
1176
|
-
const bundle = thisCommand.getOptionValue('bundle') ??
|
|
1259
|
+
const bundle = thisCommand.getOptionValue('bundle') ?? DEFAULT_ARCHIVE;
|
|
1177
1260
|
process.argv[4] = bundle;
|
|
1178
1261
|
}
|
|
1179
1262
|
});
|
|
1180
|
-
command$
|
|
1263
|
+
command$i.alias('build-manifest').hook('preAction', () => {
|
|
1181
1264
|
if (process.argv[3] === 'build-manifest') {
|
|
1182
1265
|
console.warn(chalk.bgRedBright.bold('The command "build-manifest" is deprecated. Please use "manifest" instead.'));
|
|
1183
1266
|
}
|
|
1184
1267
|
});
|
|
1185
|
-
command$
|
|
1268
|
+
command$h.alias('build-publish').hook('preAction', (thisCommand) => {
|
|
1186
1269
|
if (process.argv[3] === 'build-publish') {
|
|
1187
1270
|
console.warn(chalk.bgRedBright.bold('The command "build-publish" is deprecated. Please use "publish" instead.'));
|
|
1188
1271
|
}
|
|
@@ -1191,8 +1274,26 @@ command$g.alias('build-publish').hook('preAction', (thisCommand) => {
|
|
|
1191
1274
|
}
|
|
1192
1275
|
});
|
|
1193
1276
|
|
|
1194
|
-
const command$
|
|
1195
|
-
.description('Develop and deploy Fusion applications')
|
|
1277
|
+
const command$g = createCommand('app')
|
|
1278
|
+
.description('Develop, build, configure, and deploy Fusion applications from your workspace root.')
|
|
1279
|
+
.addHelpText('after', [
|
|
1280
|
+
'',
|
|
1281
|
+
'The "app" command is your main entry point for managing Fusion applications in this workspace.',
|
|
1282
|
+
'',
|
|
1283
|
+
'It provides access to subcommands for every stage of the application lifecycle, including development, building, packaging, configuration, deployment, and release management.',
|
|
1284
|
+
'',
|
|
1285
|
+
'All available subcommands are listed below automatically. For details and options for a specific subcommand, run:',
|
|
1286
|
+
' fusion app <subcommand> --help',
|
|
1287
|
+
'',
|
|
1288
|
+
'Typical usage:',
|
|
1289
|
+
' - Run and test your app locally with the dev subcommand',
|
|
1290
|
+
' - Build, bundle, and configure your app for deployment',
|
|
1291
|
+
' - Upload, publish, and tag releases to the Fusion App Store',
|
|
1292
|
+
' - Check registration and generate manifests as needed',
|
|
1293
|
+
'',
|
|
1294
|
+
'This command should be run from your app root directory.',
|
|
1295
|
+
].join('\n'))
|
|
1296
|
+
.addCommand(command$p)
|
|
1196
1297
|
.addCommand(command$o)
|
|
1197
1298
|
.addCommand(command$n)
|
|
1198
1299
|
.addCommand(command$m)
|
|
@@ -1200,30 +1301,33 @@ const command$f = createCommand('app')
|
|
|
1200
1301
|
.addCommand(command$k)
|
|
1201
1302
|
.addCommand(command$j)
|
|
1202
1303
|
.addCommand(command$i)
|
|
1203
|
-
.addCommand(command$h)
|
|
1204
|
-
.addCommand(command$g);
|
|
1304
|
+
.addCommand(command$h);
|
|
1205
1305
|
|
|
1206
1306
|
/**
|
|
1207
1307
|
* Command to authenticate and log in to Fusion Framework using interactive browser-based authentication.
|
|
1208
1308
|
*
|
|
1209
1309
|
* This command initializes the Fusion Framework and opens a browser window for secure login.
|
|
1210
1310
|
* Supports custom tenant, client, and scope options for advanced authentication scenarios.
|
|
1211
|
-
*
|
|
1212
|
-
* @example
|
|
1213
|
-
* $ fusion login
|
|
1214
|
-
* $ fusion login --tenant my-tenant --client my-client-id --scope api://my-app/.default
|
|
1215
1311
|
*/
|
|
1216
1312
|
const DEFAULT_SERVER_PORT = 49741;
|
|
1217
|
-
const command$
|
|
1218
|
-
.description(
|
|
1313
|
+
const command$f = createCommand('login')
|
|
1314
|
+
.description('Authenticate and log in to Fusion Framework using interactive browser-based authentication.')
|
|
1315
|
+
.addHelpText('after', [
|
|
1316
|
+
'',
|
|
1219
1317
|
'Authenticate and log in to Fusion Framework using interactive browser-based authentication.',
|
|
1220
1318
|
'',
|
|
1221
1319
|
'This command initializes the Fusion Framework and opens a browser window for secure login.',
|
|
1222
1320
|
'Supports custom tenant, client, and scope options for advanced authentication scenarios.',
|
|
1223
1321
|
'',
|
|
1322
|
+
'Options:',
|
|
1323
|
+
' --tenant <tenantId> Specify the tenant ID',
|
|
1324
|
+
' --client <clientId> Specify the client ID',
|
|
1325
|
+
' --scope <scope> Specify the scope(s) for authentication',
|
|
1326
|
+
' --debug Enable debug mode for verbose logging',
|
|
1327
|
+
'',
|
|
1224
1328
|
'Examples:',
|
|
1225
|
-
' $ fusion login',
|
|
1226
|
-
' $ fusion login --tenant my-tenant --client my-client-id --scope api://my-app/.default',
|
|
1329
|
+
' $ fusion-framework-cli login',
|
|
1330
|
+
' $ fusion-framework-cli login --tenant my-tenant --client my-client-id --scope api://my-app/.default',
|
|
1227
1331
|
].join('\n'))
|
|
1228
1332
|
.action(async (options) => {
|
|
1229
1333
|
const log = new ConsoleLogger('auth:login', { debug: options.debug });
|
|
@@ -1260,7 +1364,7 @@ const command$e = createCommand('login')
|
|
|
1260
1364
|
* Adds authentication options to the login command.
|
|
1261
1365
|
* @see withAuthOptions
|
|
1262
1366
|
*/
|
|
1263
|
-
withAuthOptions(command$
|
|
1367
|
+
withAuthOptions(command$f, {
|
|
1264
1368
|
includeScope: true,
|
|
1265
1369
|
excludeToken: true,
|
|
1266
1370
|
});
|
|
@@ -1270,21 +1374,24 @@ withAuthOptions(command$e, {
|
|
|
1270
1374
|
*
|
|
1271
1375
|
* This command removes your current authentication state from the Fusion Framework CLI.
|
|
1272
1376
|
* Supports custom tenant and client options for advanced scenarios.
|
|
1273
|
-
*
|
|
1274
|
-
* @example
|
|
1275
|
-
* $ fusion logout
|
|
1276
|
-
* $ fusion logout --tenant my-tenant --client my-client-id
|
|
1277
1377
|
*/
|
|
1278
|
-
const command$
|
|
1279
|
-
.description(
|
|
1378
|
+
const command$e = createCommand('logout')
|
|
1379
|
+
.description('Log out from Fusion Framework and clear your authentication session.')
|
|
1380
|
+
.addHelpText('after', [
|
|
1381
|
+
'',
|
|
1280
1382
|
'Log out from Fusion Framework and clear your authentication session.',
|
|
1281
1383
|
'',
|
|
1282
1384
|
'This command removes your current authentication state from the Fusion Framework CLI.',
|
|
1283
1385
|
'Supports custom tenant and client options for advanced scenarios.',
|
|
1284
1386
|
'',
|
|
1387
|
+
'Options:',
|
|
1388
|
+
' --tenant <tenantId> Specify the tenant ID',
|
|
1389
|
+
' --client <clientId> Specify the client ID',
|
|
1390
|
+
' --debug Enable debug mode for verbose logging',
|
|
1391
|
+
'',
|
|
1285
1392
|
'Examples:',
|
|
1286
|
-
' $ fusion logout',
|
|
1287
|
-
' $ fusion logout --tenant my-tenant --client my-client-id',
|
|
1393
|
+
' $ fusion-framework-cli logout',
|
|
1394
|
+
' $ fusion-framework-cli logout --tenant my-tenant --client my-client-id',
|
|
1288
1395
|
].join('\n'))
|
|
1289
1396
|
.action(async (options) => {
|
|
1290
1397
|
const log = new ConsoleLogger('auth:logout', { debug: options.debug });
|
|
@@ -1310,7 +1417,7 @@ const command$d = createCommand('logout')
|
|
|
1310
1417
|
* Adds authentication options to the logout command.
|
|
1311
1418
|
* @see withAuthOptions
|
|
1312
1419
|
*/
|
|
1313
|
-
withAuthOptions(command$
|
|
1420
|
+
withAuthOptions(command$e, {
|
|
1314
1421
|
excludeToken: true,
|
|
1315
1422
|
includeScope: false,
|
|
1316
1423
|
});
|
|
@@ -1320,23 +1427,27 @@ withAuthOptions(command$d, {
|
|
|
1320
1427
|
*
|
|
1321
1428
|
* This command retrieves an access token for the specified scopes, tenant, and client.
|
|
1322
1429
|
* Supports debug and silent modes for flexible output.
|
|
1323
|
-
*
|
|
1324
|
-
* @example
|
|
1325
|
-
* $ fusion token
|
|
1326
|
-
* $ fusion token --scope api://my-app/.default
|
|
1327
|
-
* $ fusion token --tenant my-tenant --client my-client-id --silent
|
|
1328
1430
|
*/
|
|
1329
|
-
const command$
|
|
1330
|
-
.description(
|
|
1431
|
+
const command$d = createCommand('token')
|
|
1432
|
+
.description('Acquire and print an access token for Fusion APIs using your current authentication context.')
|
|
1433
|
+
.addHelpText('after', [
|
|
1434
|
+
'',
|
|
1331
1435
|
'Acquire and print an access token for Fusion APIs using your current authentication context.',
|
|
1332
1436
|
'',
|
|
1333
1437
|
'This command retrieves an access token for the specified scopes, tenant, and client.',
|
|
1334
1438
|
'Supports debug and silent modes for flexible output.',
|
|
1335
1439
|
'',
|
|
1440
|
+
'Options:',
|
|
1441
|
+
' --tenant <tenantId> Specify the tenant ID',
|
|
1442
|
+
' --client <clientId> Specify the client ID',
|
|
1443
|
+
' --scope <scope> Specify the scope(s) for authentication',
|
|
1444
|
+
' --debug Enable debug mode for verbose logging',
|
|
1445
|
+
' --silent Only output the token (no extra logging)',
|
|
1446
|
+
'',
|
|
1336
1447
|
'Examples:',
|
|
1337
|
-
' $ fusion token',
|
|
1338
|
-
' $ fusion token --scope api://my-app/.default',
|
|
1339
|
-
' $ fusion token --tenant my-tenant --client my-client-id --silent',
|
|
1448
|
+
' $ fusion-framework-cli token',
|
|
1449
|
+
' $ fusion-framework-cli token --scope api://my-app/.default',
|
|
1450
|
+
' $ fusion-framework-cli token --tenant my-tenant --client my-client-id --silent',
|
|
1340
1451
|
].join('\n'))
|
|
1341
1452
|
.option('-d, --debug', 'Enable debug mode for verbose logging', false)
|
|
1342
1453
|
.option('--silent', 'Only output the token (no extra logging)')
|
|
@@ -1379,14 +1490,26 @@ const command$c = createCommand('token')
|
|
|
1379
1490
|
* Adds authentication options to the token command.
|
|
1380
1491
|
* @see withAuthOptions
|
|
1381
1492
|
*/
|
|
1382
|
-
withAuthOptions(command$
|
|
1493
|
+
withAuthOptions(command$d, {
|
|
1383
1494
|
includeScope: true,
|
|
1384
1495
|
});
|
|
1385
1496
|
|
|
1386
|
-
const command$
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1497
|
+
const command$c = new Command('auth')
|
|
1498
|
+
.description('Authenticate with Fusion Framework CLI')
|
|
1499
|
+
.addHelpText('after', [
|
|
1500
|
+
'',
|
|
1501
|
+
'Authentication commands for Fusion Framework CLI.',
|
|
1502
|
+
'',
|
|
1503
|
+
'Use these commands to log in, log out, or acquire tokens for Fusion APIs.',
|
|
1504
|
+
'',
|
|
1505
|
+
'Examples:',
|
|
1506
|
+
' $ fusion-framework-cli auth login',
|
|
1507
|
+
' $ fusion-framework-cli auth logout',
|
|
1508
|
+
' $ fusion-framework-cli auth token --scope api://my-app/.default',
|
|
1509
|
+
].join('\n'));
|
|
1510
|
+
command$c.addCommand(command$f, { isDefault: true });
|
|
1511
|
+
command$c.addCommand(command$e);
|
|
1512
|
+
command$c.addCommand(command$d);
|
|
1390
1513
|
|
|
1391
1514
|
/**
|
|
1392
1515
|
* The `resolve` command resolves and displays information about a service registered in Fusion service discovery.
|
|
@@ -1395,13 +1518,6 @@ command$b.addCommand(command$c);
|
|
|
1395
1518
|
*
|
|
1396
1519
|
* Supports environment selection and authentication options.
|
|
1397
1520
|
*
|
|
1398
|
-
* ## Examples
|
|
1399
|
-
*
|
|
1400
|
-
* ```sh
|
|
1401
|
-
* $ fusion resolve my-service
|
|
1402
|
-
* $ fusion resolve my-service --env prod
|
|
1403
|
-
* ```
|
|
1404
|
-
*
|
|
1405
1521
|
* @command resolve
|
|
1406
1522
|
* @description Resolve and display information about a service registered in Fusion service discovery.
|
|
1407
1523
|
* @argument {string} service - Name of the service to resolve in Fusion service discovery.
|
|
@@ -1411,16 +1527,20 @@ command$b.addCommand(command$c);
|
|
|
1411
1527
|
* @option {string} --clientId - Client ID for authentication.
|
|
1412
1528
|
* @returns {Promise<void>} Prints the resolved service details to the console.
|
|
1413
1529
|
*/
|
|
1414
|
-
const command$
|
|
1415
|
-
.description(
|
|
1530
|
+
const command$b = withAuthOptions(createCommand('resolve')
|
|
1531
|
+
.description('Resolve and display information about a service registered in Fusion service discovery.')
|
|
1532
|
+
.addHelpText('after', [
|
|
1533
|
+
'',
|
|
1416
1534
|
'Resolve and display information about a service registered in Fusion service discovery.',
|
|
1417
1535
|
'',
|
|
1418
1536
|
'This command looks up a service by name and prints its discovery details using the current authentication and environment.',
|
|
1419
|
-
'Supports environment selection and authentication options.',
|
|
1420
1537
|
'',
|
|
1421
1538
|
'Examples:',
|
|
1422
|
-
' $ fusion resolve my-service',
|
|
1423
|
-
' $ fusion resolve my-service --env prod',
|
|
1539
|
+
' $ fusion-framework-cli resolve my-service',
|
|
1540
|
+
' $ fusion-framework-cli resolve my-service --env prod',
|
|
1541
|
+
' $ fusion-framework-cli resolve my-service --env test --tenantId my-tenant --clientId my-client-id',
|
|
1542
|
+
'',
|
|
1543
|
+
'The command will print the resolved service details to the console.',
|
|
1424
1544
|
].join('\n'))
|
|
1425
1545
|
.addOption(createEnvOption({ allowDev: false }))
|
|
1426
1546
|
.argument('<service>', 'Name of the service to resolve in Fusion service discovery')
|
|
@@ -1443,8 +1563,8 @@ const command$a = withAuthOptions(createCommand('resolve')
|
|
|
1443
1563
|
console.debug(appClient);
|
|
1444
1564
|
}));
|
|
1445
1565
|
|
|
1446
|
-
const command$
|
|
1447
|
-
command$
|
|
1566
|
+
const command$a = createCommand('disco').description('Service discovery operations');
|
|
1567
|
+
command$a.addCommand(command$b);
|
|
1448
1568
|
|
|
1449
1569
|
/**
|
|
1450
1570
|
* Starts the portal development server for local development and testing.
|
|
@@ -1459,7 +1579,7 @@ command$9.addCommand(command$a);
|
|
|
1459
1579
|
*/
|
|
1460
1580
|
const startPortalDevServer = async (options) => {
|
|
1461
1581
|
const { log } = options ?? {};
|
|
1462
|
-
// Resolve the
|
|
1582
|
+
// Resolve the portals's package.json for root and metadata
|
|
1463
1583
|
const pkg = await resolveProjectPackage(log);
|
|
1464
1584
|
// Setup the runtime environment for the dev server
|
|
1465
1585
|
const env = {
|
|
@@ -1474,8 +1594,6 @@ const startPortalDevServer = async (options) => {
|
|
|
1474
1594
|
log,
|
|
1475
1595
|
manifestPath: options?.manifest,
|
|
1476
1596
|
});
|
|
1477
|
-
// Dummy implementation for resolving the portal config
|
|
1478
|
-
const resolvePortalConfig = async (...args) => ({ foo: 'bar' });
|
|
1479
1597
|
// Resolve the portal config (replace with real logic as needed)
|
|
1480
1598
|
const portalConfig = await resolvePortalConfig(env, { log, config: options?.config });
|
|
1481
1599
|
log?.start('Starting app development server...');
|
|
@@ -1505,16 +1623,19 @@ const startPortalDevServer = async (options) => {
|
|
|
1505
1623
|
return devServer;
|
|
1506
1624
|
};
|
|
1507
1625
|
|
|
1508
|
-
const command$
|
|
1509
|
-
.description(
|
|
1510
|
-
|
|
1626
|
+
const command$9 = createCommand('dev')
|
|
1627
|
+
.description('Start a local development server for the Fusion portal.')
|
|
1628
|
+
.addHelpText('after', [
|
|
1629
|
+
'',
|
|
1630
|
+
'Starts a local development server for your Fusion portal.',
|
|
1511
1631
|
'',
|
|
1512
|
-
'
|
|
1513
|
-
'
|
|
1632
|
+
'Options:',
|
|
1633
|
+
' -p, --port Port to run the development server on (default: 3000)',
|
|
1634
|
+
' -d, --debug Enable debug mode for verbose logging',
|
|
1514
1635
|
'',
|
|
1515
1636
|
'Examples:',
|
|
1516
|
-
' $ fusion portal dev',
|
|
1517
|
-
' $ fusion portal dev --port 4000 --debug',
|
|
1637
|
+
' $ fusion-framework-cli portal dev',
|
|
1638
|
+
' $ fusion-framework-cli portal dev --port 4000 --debug',
|
|
1518
1639
|
].join('\n'))
|
|
1519
1640
|
.option('-p, --port <number>', 'Port to run the development server on', '3000')
|
|
1520
1641
|
.option('-d, --debug', 'Enable debug mode for verbose logging')
|
|
@@ -1525,18 +1646,21 @@ const command$8 = createCommand('dev')
|
|
|
1525
1646
|
log.succeed('Development server started successfully.');
|
|
1526
1647
|
});
|
|
1527
1648
|
|
|
1528
|
-
const command$
|
|
1529
|
-
.description(
|
|
1530
|
-
|
|
1649
|
+
const command$8 = createCommand('manifest')
|
|
1650
|
+
.description('Generate or validate a Fusion portal manifest file.')
|
|
1651
|
+
.addHelpText('after', [
|
|
1652
|
+
'Generates or validates a Fusion portal manifest file.',
|
|
1531
1653
|
'',
|
|
1532
|
-
'
|
|
1533
|
-
'
|
|
1534
|
-
'
|
|
1654
|
+
'If no manifest is provided, a default portal.manifest.[ts|js|json] is used from the current directory.',
|
|
1655
|
+
'',
|
|
1656
|
+
'Options:',
|
|
1657
|
+
' -o, --output Write manifest to the specified file (default: stdout)',
|
|
1658
|
+
' -d, --debug Enable debug mode for verbose logging',
|
|
1659
|
+
' -s, --silent Silent mode, suppresses output except errors',
|
|
1535
1660
|
'',
|
|
1536
1661
|
'Examples:',
|
|
1537
|
-
' $ fusion portal manifest',
|
|
1538
|
-
' $ fusion portal manifest
|
|
1539
|
-
' $ fusion portal manifest --debug',
|
|
1662
|
+
' $ fusion-framework-cli portal manifest',
|
|
1663
|
+
' $ fusion-framework-cli portal manifest portal.manifest.prod.ts --output ./dist/portal.manifest.json',
|
|
1540
1664
|
].join('\n'))
|
|
1541
1665
|
.option('-d, --debug', 'Enable debug mode for verbose logging', false)
|
|
1542
1666
|
.option('-o, --output <string>', 'Write manifest to the specified file', 'stdout')
|
|
@@ -9342,18 +9466,20 @@ function require_2020 () {
|
|
|
9342
9466
|
var _2020Exports = require_2020();
|
|
9343
9467
|
var Ajv2020 = /*@__PURE__*/getDefaultExportFromCjs(_2020Exports);
|
|
9344
9468
|
|
|
9345
|
-
const command$
|
|
9346
|
-
.description(
|
|
9347
|
-
|
|
9469
|
+
const command$7 = createCommand('schema')
|
|
9470
|
+
.description('Generate or validate a Fusion portal schema file.')
|
|
9471
|
+
.addHelpText('after', [
|
|
9472
|
+
'Generates or validates a Fusion portal schema file.',
|
|
9348
9473
|
'',
|
|
9349
|
-
'
|
|
9350
|
-
'
|
|
9474
|
+
'Options:',
|
|
9475
|
+
' -o, --output Output file name (default: stdout)',
|
|
9476
|
+
' -v, --validate Validate the generated schema against a JSON file',
|
|
9477
|
+
' -d, --debug Enable debug mode for verbose logging',
|
|
9351
9478
|
'',
|
|
9352
9479
|
'Examples:',
|
|
9353
|
-
' $ fusion portal schema',
|
|
9354
|
-
' $ fusion portal schema --output portal.schema.json',
|
|
9355
|
-
' $ fusion portal schema --validate my-config.json',
|
|
9356
|
-
' $ fusion portal schema portal.schema.prod.ts --debug',
|
|
9480
|
+
' $ fusion-framework-cli portal schema',
|
|
9481
|
+
' $ fusion-framework-cli portal schema --output portal.schema.json',
|
|
9482
|
+
' $ fusion-framework-cli portal schema --validate my-config.json',
|
|
9357
9483
|
].join('\n'))
|
|
9358
9484
|
.addOption(createEnvOption({ allowDev: true }))
|
|
9359
9485
|
.option('-o, --output <string>', 'Output file name (default: stdout)', 'stdout')
|
|
@@ -9402,40 +9528,50 @@ const command$6 = createCommand('schema')
|
|
|
9402
9528
|
}
|
|
9403
9529
|
});
|
|
9404
9530
|
|
|
9405
|
-
const command$
|
|
9406
|
-
.description(
|
|
9407
|
-
|
|
9531
|
+
const command$6 = createCommand('build')
|
|
9532
|
+
.description('Build the Fusion portal from a manifest file with environment-specific settings.')
|
|
9533
|
+
.addHelpText('after', [
|
|
9534
|
+
'Builds the Fusion portal using a manifest file and environment-specific configuration.',
|
|
9408
9535
|
'',
|
|
9409
|
-
'If no manifest is provided, the command will search for a default
|
|
9410
|
-
'You can use environment variables to customize the build process.',
|
|
9536
|
+
'If no manifest is provided, the command will search for a default portal.manifest.[ts|js|json] in the current directory.',
|
|
9537
|
+
'You can use environment variables to customize the build process (e.g., NODE_ENV, FUSION_PORTAL_*).',
|
|
9538
|
+
'',
|
|
9539
|
+
'Options:',
|
|
9540
|
+
' -d, --debug Enable debug mode for verbose logging',
|
|
9411
9541
|
'',
|
|
9412
9542
|
'Examples:',
|
|
9413
|
-
' $ fusion portal build',
|
|
9414
|
-
' $ fusion portal build
|
|
9543
|
+
' $ fusion-framework-cli portal build',
|
|
9544
|
+
' $ fusion-framework-cli portal build portal.manifest.prod.ts --debug',
|
|
9545
|
+
'',
|
|
9415
9546
|
].join('\n'))
|
|
9416
9547
|
.option('-d, --debug', 'Enable debug mode for verbose logging', false)
|
|
9417
|
-
.argument('[manifest]', 'Manifest build file to use for building (e.g.,
|
|
9548
|
+
.argument('[manifest]', 'Manifest build file to use for building (e.g., portal.manifest[.env]?.[ts,js,json])')
|
|
9418
9549
|
.action(async (manifest, opt) => {
|
|
9419
9550
|
const log = new ConsoleLogger('portal:build', { debug: opt.debug });
|
|
9420
9551
|
await buildPortal({ log, manifest });
|
|
9421
9552
|
});
|
|
9422
9553
|
|
|
9423
|
-
const command$
|
|
9424
|
-
.description(
|
|
9425
|
-
|
|
9554
|
+
const command$5 = createCommand('pack')
|
|
9555
|
+
.description('Bundle the Fusion portal into a deployable archive.')
|
|
9556
|
+
.addHelpText('after', [
|
|
9557
|
+
'Bundles the Fusion portal using the provided manifest and schema into a zip archive for deployment.',
|
|
9426
9558
|
'',
|
|
9427
|
-
'
|
|
9428
|
-
'
|
|
9559
|
+
'If no manifest is provided, a default portal.manifest.[ts|js|json] is used from the current directory.',
|
|
9560
|
+
'',
|
|
9561
|
+
'Options:',
|
|
9562
|
+
' -a, --archive Name of the output archive file (default: out/bundle.zip)',
|
|
9563
|
+
' --schema Schema file to use for validation',
|
|
9564
|
+
' -d, --debug Enable debug mode for verbose logging',
|
|
9429
9565
|
'',
|
|
9430
9566
|
'Examples:',
|
|
9431
|
-
' $ fusion portal pack',
|
|
9432
|
-
' $ fusion portal pack --archive my-portal.zip --schema portal.schema.json',
|
|
9433
|
-
' $ fusion portal pack
|
|
9567
|
+
' $ fusion-framework-cli portal pack',
|
|
9568
|
+
' $ fusion-framework-cli portal pack --archive my-portal.zip --schema portal.schema.json',
|
|
9569
|
+
' $ fusion-framework-cli portal pack portal.manifest.prod.ts --debug',
|
|
9434
9570
|
].join('\n'))
|
|
9435
9571
|
.option('-a, --archive [string]', 'Name of the output archive file (default: out/bundle.zip)', 'out/bundle.zip')
|
|
9436
9572
|
.option('-d, --debug [boolean]', 'Enable debug mode for verbose logging', false)
|
|
9437
9573
|
.option('--schema [string]', 'Schema file to use for validation')
|
|
9438
|
-
.argument('[manifest]', 'Manifest file to use for bundling (e.g.,
|
|
9574
|
+
.argument('[manifest]', 'Manifest file to use for bundling (e.g., portal.manifest[.env]?.[ts,js,json])')
|
|
9439
9575
|
.action(async (manifest, options) => {
|
|
9440
9576
|
const log = new ConsoleLogger('portal:pack', {
|
|
9441
9577
|
debug: options.debug,
|
|
@@ -9545,17 +9681,18 @@ const uploadPortalBundle = async (opt) => {
|
|
|
9545
9681
|
}
|
|
9546
9682
|
};
|
|
9547
9683
|
|
|
9548
|
-
const command$
|
|
9549
|
-
.description(
|
|
9550
|
-
|
|
9684
|
+
const command$4 = withAuthOptions(createCommand('upload')
|
|
9685
|
+
.description('Upload a Fusion portal bundle to the portal registry.')
|
|
9686
|
+
.addHelpText('after', [
|
|
9687
|
+
'Uploads a distributable Fusion portal bundle to the portal registry for deployment.',
|
|
9551
9688
|
'',
|
|
9552
|
-
'
|
|
9553
|
-
'
|
|
9689
|
+
'Options:',
|
|
9690
|
+
' --env Target environment',
|
|
9691
|
+
' -d, --debug Enable debug mode for verbose logging',
|
|
9554
9692
|
'',
|
|
9555
9693
|
'Examples:',
|
|
9556
|
-
' $ fusion portal upload my-portal-bundle.zip',
|
|
9557
|
-
' $ fusion portal upload my-portal-bundle.zip --env prod',
|
|
9558
|
-
' $ fusion portal upload my-portal-bundle.zip --debug',
|
|
9694
|
+
' $ fusion-framework-cli portal upload my-portal-bundle.zip',
|
|
9695
|
+
' $ fusion-framework-cli portal upload my-portal-bundle.zip --env prod',
|
|
9559
9696
|
].join('\n'))
|
|
9560
9697
|
.option('-d, --debug [boolean]', 'Enable debug mode for verbose logging', false)
|
|
9561
9698
|
.addOption(createEnvOption({ allowDev: false }))
|
|
@@ -9670,18 +9807,22 @@ const tagPortal = async (options) => {
|
|
|
9670
9807
|
}
|
|
9671
9808
|
};
|
|
9672
9809
|
|
|
9673
|
-
const command$
|
|
9674
|
-
.description(
|
|
9675
|
-
|
|
9810
|
+
const command$3 = withAuthOptions(createCommand('tag')
|
|
9811
|
+
.description('Tag your Fusion portal with a specific version or label.')
|
|
9812
|
+
.addHelpText('after', [
|
|
9813
|
+
'Tags your Fusion portal with a specific version or label in the portal registry.',
|
|
9676
9814
|
'',
|
|
9677
|
-
'
|
|
9678
|
-
'
|
|
9679
|
-
'
|
|
9815
|
+
'Options:',
|
|
9816
|
+
' -n, --name Portal name (if not provided, resolved from manifest)',
|
|
9817
|
+
' -m, --manifest Manifest file to use for resolving portal name and version',
|
|
9818
|
+
' -v, --version Version to tag (if not provided, resolved from manifest)',
|
|
9819
|
+
' --env Target environment',
|
|
9820
|
+
' -d, --debug Enable debug mode for verbose logging',
|
|
9821
|
+
' --silent Silent mode, suppresses output except errors',
|
|
9680
9822
|
'',
|
|
9681
9823
|
'Examples:',
|
|
9682
|
-
' $ fusion portal tag latest',
|
|
9683
|
-
' $ fusion portal tag preview --env prod --manifest portal.manifest.prod.ts',
|
|
9684
|
-
' $ fusion portal tag stable --name my-portal --version 1.2.3',
|
|
9824
|
+
' $ fusion-framework-cli portal tag latest',
|
|
9825
|
+
' $ fusion-framework-cli portal tag preview --env prod --manifest portal.manifest.prod.ts',
|
|
9685
9826
|
].join('\n'))
|
|
9686
9827
|
.addOption(createEnvOption({ allowDev: false }))
|
|
9687
9828
|
.option('-n, --name <string>', 'Portal name (if not provided, resolved from manifest)')
|
|
@@ -9731,18 +9872,21 @@ const command$2 = withAuthOptions(createCommand('tag')
|
|
|
9731
9872
|
});
|
|
9732
9873
|
}));
|
|
9733
9874
|
|
|
9734
|
-
const command$
|
|
9735
|
-
.description(
|
|
9736
|
-
'
|
|
9875
|
+
const command$2 = withAuthOptions(createCommand('publish')
|
|
9876
|
+
.description('Build, upload, and tag your Fusion portal bundle for deployment.')
|
|
9877
|
+
.addHelpText('after', [
|
|
9878
|
+
'Builds, uploads, and tags your Fusion portal bundle for deployment to the portal registry.',
|
|
9737
9879
|
'',
|
|
9738
|
-
'
|
|
9739
|
-
'
|
|
9880
|
+
'Options:',
|
|
9881
|
+
' --env Target environment',
|
|
9882
|
+
' -m, --manifest Manifest file to use for bundling',
|
|
9883
|
+
' --schema Schema file to use for validation',
|
|
9884
|
+
' -t, --tag Tag to apply to the published portal',
|
|
9885
|
+
' -d, --debug Enable debug mode for verbose logging',
|
|
9740
9886
|
'',
|
|
9741
9887
|
'Examples:',
|
|
9742
|
-
' $ fusion portal publish',
|
|
9743
|
-
' $ fusion portal publish --env prod --manifest portal.manifest.prod.ts',
|
|
9744
|
-
' $ fusion portal publish --tag latest --debug',
|
|
9745
|
-
' $ fusion portal publish --schema portal.schema.json',
|
|
9888
|
+
' $ fusion-framework-cli portal publish',
|
|
9889
|
+
' $ fusion-framework-cli portal publish --env prod --manifest portal.manifest.prod.ts',
|
|
9746
9890
|
].join('\n'))
|
|
9747
9891
|
.option('-d, --debug', 'Enable debug mode for verbose logging', false)
|
|
9748
9892
|
.addOption(createEnvOption({ allowDev: false }))
|
|
@@ -9794,8 +9938,102 @@ const command$1 = withAuthOptions(createCommand('publish')
|
|
|
9794
9938
|
log.succeed('🏷️ Tagging completed');
|
|
9795
9939
|
}));
|
|
9796
9940
|
|
|
9941
|
+
/**
|
|
9942
|
+
* CLI command: `portal config`
|
|
9943
|
+
*
|
|
9944
|
+
* Generates and/or publishes the portal configuration for Fusion portals.
|
|
9945
|
+
*
|
|
9946
|
+
* Features:
|
|
9947
|
+
* - Outputs the generated config to stdout or a file.
|
|
9948
|
+
* - Use --publish to upload the config to the Fusion portal registry.
|
|
9949
|
+
* - Options [token, tenant, client, config, identifier, env, output] are only relevant when --publish is used.
|
|
9950
|
+
* - Option [--env] cannot be set to dev when --publish is used.
|
|
9951
|
+
*
|
|
9952
|
+
* Usage:
|
|
9953
|
+
* $ fusion-framework-cli portal config --identifier <portal@version> [options]
|
|
9954
|
+
*
|
|
9955
|
+
* Options:
|
|
9956
|
+
* --debug Enable debug mode for verbose logging
|
|
9957
|
+
* --silent Silent mode, suppresses output except errors
|
|
9958
|
+
* --publish Publish config to Fusion portal registry
|
|
9959
|
+
* --identifier <name@version> Identifier of the portal, example my-portal@1.2.3 (required with --publish)
|
|
9960
|
+
* -o, --output <stdout|path> Output to stdout or a file (default: stdout)
|
|
9961
|
+
* <config> Path to the portal config file (e.g., portal.config[.env]?.[ts,js,json])
|
|
9962
|
+
* --env <env> Target environment
|
|
9963
|
+
*
|
|
9964
|
+
* Examples:
|
|
9965
|
+
* $ fusion-framework-cli portal config --identifier my-portal@1.2.3 -o stdout portal.config.ts
|
|
9966
|
+
* $ fusion-framework-cli portal config --identifier my-portal@1.2.3 -o ./dist/portal.config.json portal.config.prod.ts
|
|
9967
|
+
* $ fusion-framework-cli portal config --publish --env prod --identifier my-portal@1.2.3 portal.config.ts
|
|
9968
|
+
*
|
|
9969
|
+
* @see generatePortalConfig, publishPortalConfig for implementation details
|
|
9970
|
+
*/
|
|
9971
|
+
const command$1 = withAuthOptions(createCommand('config')
|
|
9972
|
+
.description('Generate or publish the Fusion portal configuration file.')
|
|
9973
|
+
.addHelpText('after', [
|
|
9974
|
+
'Generates and/or publishes the Fusion portal configuration.',
|
|
9975
|
+
'',
|
|
9976
|
+
'By default, outputs the config to stdout or a file. Use --publish to upload to the portal registry.',
|
|
9977
|
+
'',
|
|
9978
|
+
'Options:',
|
|
9979
|
+
' --publish Publish config to Fusion portal registry',
|
|
9980
|
+
' --identifier Portal identifier (required with --publish)',
|
|
9981
|
+
' -o, --output Output to stdout or a file (default: stdout)',
|
|
9982
|
+
' --env Target environment',
|
|
9983
|
+
' --debug Enable debug mode for verbose logging',
|
|
9984
|
+
'',
|
|
9985
|
+
'Examples:',
|
|
9986
|
+
' $ fusion-framework-cli portal config --identifier my-portal@1.2.3 -o stdout portal.config.ts',
|
|
9987
|
+
' $ fusion-framework-cli portal config --publish --env prod --identifier my-portal@1.2.3 portal.config.ts',
|
|
9988
|
+
].join('\n'))
|
|
9989
|
+
.option('--debug', 'Enable debug mode for verbose logging')
|
|
9990
|
+
.option('--silent', 'Silent mode, suppresses output except errors')
|
|
9991
|
+
.option('--publish <name@version>', 'Publish config to Fusion portal registry, Identifier of the portal, example my-portal@1.2.3')
|
|
9992
|
+
.addOption(createEnvOption({ allowDev: true }))
|
|
9993
|
+
.option('-o, --output <stdout|path>', 'Output the result to stdout or a file (ignored with --publish, default: stdout)', 'stdout')
|
|
9994
|
+
.argument('[config]', 'Path to the portal config file (e.g., portal.config[.env]?.[ts,js,json])')
|
|
9995
|
+
.action(async (config, options) => {
|
|
9996
|
+
const log = options.silent
|
|
9997
|
+
? null
|
|
9998
|
+
: new ConsoleLogger('portal:config', { debug: !!options.debug });
|
|
9999
|
+
// Validate env for publish (no dev allowed)
|
|
10000
|
+
if (options.publish) {
|
|
10001
|
+
const [name, version] = options.publish.split('@') || [];
|
|
10002
|
+
if (!name || !version) {
|
|
10003
|
+
log?.fail('🤪', 'Portal identifier is required when using', chalk.blue('--publish'));
|
|
10004
|
+
log?.info('Example: fusion-framework-cli portal config --publish my-portal@1.2.3');
|
|
10005
|
+
process.exit(1);
|
|
10006
|
+
}
|
|
10007
|
+
if (options.env === 'dev') {
|
|
10008
|
+
log?.fail('🤪', chalk.blue('--env'), 'cannot be "dev" when', chalk.blue('--publish'), ' is used');
|
|
10009
|
+
process.exit(1);
|
|
10010
|
+
}
|
|
10011
|
+
return publishPortalConfig({
|
|
10012
|
+
config: options.config,
|
|
10013
|
+
portal: {
|
|
10014
|
+
name,
|
|
10015
|
+
version,
|
|
10016
|
+
},
|
|
10017
|
+
environment: options.env,
|
|
10018
|
+
auth: 'token' in options ? { token: options.token } : options,
|
|
10019
|
+
debug: options.debug,
|
|
10020
|
+
});
|
|
10021
|
+
}
|
|
10022
|
+
// Generate config
|
|
10023
|
+
const { config: portalConfig } = await generatePortalConfig({
|
|
10024
|
+
log,
|
|
10025
|
+
config,
|
|
10026
|
+
env: { environment: options.env },
|
|
10027
|
+
output: options.output === 'stdout' ? undefined : options.output,
|
|
10028
|
+
});
|
|
10029
|
+
if (options.output === 'stdout') {
|
|
10030
|
+
stdout.write(JSON.stringify(portalConfig, null, 2));
|
|
10031
|
+
}
|
|
10032
|
+
}));
|
|
10033
|
+
|
|
9797
10034
|
const command = createCommand('portal')
|
|
9798
10035
|
.description('Develop and deploy portal templates')
|
|
10036
|
+
.addCommand(command$9)
|
|
9799
10037
|
.addCommand(command$8)
|
|
9800
10038
|
.addCommand(command$7)
|
|
9801
10039
|
.addCommand(command$6)
|
|
@@ -9806,9 +10044,9 @@ const command = createCommand('portal')
|
|
|
9806
10044
|
.addCommand(command$1);
|
|
9807
10045
|
|
|
9808
10046
|
var registerCommands = (program) => {
|
|
9809
|
-
program.addCommand(command$
|
|
9810
|
-
program.addCommand(command$
|
|
9811
|
-
program.addCommand(command$
|
|
10047
|
+
program.addCommand(command$g);
|
|
10048
|
+
program.addCommand(command$c);
|
|
10049
|
+
program.addCommand(command$a);
|
|
9812
10050
|
program.addCommand(command);
|
|
9813
10051
|
};
|
|
9814
10052
|
|