@equinor/fusion-framework-cli 12.3.10 → 13.0.0-cli-search-index.0
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 +86 -0
- package/bin/build/bin.mjs +1 -1
- package/bin/build/cli.mjs +6 -6
- package/dist/esm/lib/fusion-ai.js +2 -0
- package/dist/esm/lib/fusion-ai.js.map +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/types/bin/framework.node.d.ts +13 -1
- package/dist/types/bin/index.d.ts +2 -2
- package/dist/types/bin/portal-tag.d.ts +3 -17
- package/dist/types/cli/commands/ai/chat.d.ts +2 -0
- package/dist/types/cli/commands/ai/embeddings.d.ts +2 -0
- package/dist/types/cli/commands/ai/index.d.ts +27 -0
- package/dist/types/cli/commands/ai/utils/extract-git-metadata.d.ts +49 -0
- package/dist/types/cli/commands/ai/utils/generate-cunk-id.d.ts +1 -0
- package/dist/types/cli/commands/ai/utils/parse-markdown.d.ts +9 -0
- package/dist/types/cli/commands/ai/utils/parse-ts-doc.d.ts +33 -0
- package/dist/types/cli/commands/ai/utils/setup-framework.d.ts +6 -0
- package/dist/types/cli/commands/ai/utils/types.d.ts +5 -0
- package/dist/types/cli/commands/portal/publish.d.ts +1 -1
- package/dist/types/cli/commands/portal/tag.d.ts +1 -1
- package/dist/types/cli/options/ai.d.ts +105 -0
- package/dist/types/lib/fusion-ai.d.ts +20 -0
- package/dist/types/version.d.ts +1 -1
- package/docs/portal.md +7 -5
- package/package.json +33 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fusion-ai.js","sourceRoot":"","sources":["../../../src/lib/fusion-ai.ts"],"names":[],"mappings":"AAwBA,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,EAAkD,EAAE,EAAE,CAAC,EAAE,CAAC"}
|
package/dist/esm/version.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ModulesInstance } from '@equinor/fusion-framework-module';
|
|
1
|
+
import { ModulesConfigurator, type ModulesInstance } from '@equinor/fusion-framework-module';
|
|
2
2
|
import { type MsalNodeModule } from '@equinor/fusion-framework-module-msal-node';
|
|
3
3
|
import { type HttpModule } from '@equinor/fusion-framework-module-http';
|
|
4
4
|
import { type ServiceDiscoveryModule } from '@equinor/fusion-framework-module-service-discovery';
|
|
@@ -62,6 +62,18 @@ export type FusionFrameworkSettings = {
|
|
|
62
62
|
scope?: string[];
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
+
/**
|
|
66
|
+
* Configures the Fusion Framework with the provided settings and returns a configurator.
|
|
67
|
+
*
|
|
68
|
+
* This function creates and configures a module configurator with HTTP, service discovery,
|
|
69
|
+
* and authentication modules based on the supplied configuration. The returned configurator
|
|
70
|
+
* can be further customized before initialization.
|
|
71
|
+
*
|
|
72
|
+
* @param config - The settings for framework configuration.
|
|
73
|
+
* @returns A configured module configurator ready for initialization.
|
|
74
|
+
* @throws Will throw if required authentication parameters are missing.
|
|
75
|
+
*/
|
|
76
|
+
export declare const configureFramework: (config: FusionFrameworkSettings) => ModulesConfigurator<Modules>;
|
|
65
77
|
/**
|
|
66
78
|
* Initializes the Fusion Framework with the provided settings.
|
|
67
79
|
*
|
|
@@ -14,7 +14,7 @@ export { loadPortalManifest } from './portal-manifest.js';
|
|
|
14
14
|
export { generatePortalConfig } from './portal-config.js';
|
|
15
15
|
export { publishPortalConfig } from './portal-config-publish.js';
|
|
16
16
|
export { uploadPortalBundle, type UploadPortalOptions } from './portal-upload.js';
|
|
17
|
-
export { tagPortal
|
|
17
|
+
export { tagPortal } from './portal-tag.js';
|
|
18
18
|
export { pack } from './pack.js';
|
|
19
19
|
export { ConsoleLogger } from './utils/ConsoleLogger.js';
|
|
20
|
-
export { initializeFramework, resolveDefaultEnv, type FusionFramework, type FusionFrameworkSettings, FusionEnv, } from './framework.node.js';
|
|
20
|
+
export { initializeFramework, configureFramework, resolveDefaultEnv, type FusionFramework, type FusionFrameworkSettings, FusionEnv, } from './framework.node.js';
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
import type { FusionFramework } from './framework.node.js';
|
|
2
2
|
import { type ConsoleLogger } from './utils/index.js';
|
|
3
|
-
/**
|
|
4
|
-
* Allowed tags for portal versions in the portal service.
|
|
5
|
-
*
|
|
6
|
-
* - `latest`: Marks the most recent stable version of the portal template.
|
|
7
|
-
* - `preview`: Marks a pre-release or preview version for testing or review.
|
|
8
|
-
*
|
|
9
|
-
* Used by {@link tagPortal} to validate and apply version tags.
|
|
10
|
-
*
|
|
11
|
-
* @public
|
|
12
|
-
*/
|
|
13
|
-
export declare enum AllowedTags {
|
|
14
|
-
Latest = "latest",
|
|
15
|
-
Preview = "preview"
|
|
16
|
-
}
|
|
17
3
|
/**
|
|
18
4
|
* Options for tagging a portal template version in the portal service.
|
|
19
5
|
*
|
|
@@ -21,7 +7,7 @@ export declare enum AllowedTags {
|
|
|
21
7
|
* {@link tagPortal} function, including the tag type, portal name,
|
|
22
8
|
* version, framework instance, and logger.
|
|
23
9
|
*
|
|
24
|
-
* @property tag - The tag to apply to the portal version (
|
|
10
|
+
* @property tag - The tag to apply to the portal version (any string value).
|
|
25
11
|
* @property name - The unique name identifying the portal template.
|
|
26
12
|
* @property version - The version of the portal template to tag.
|
|
27
13
|
* @property framework - The FusionFramework instance used for service discovery and requests.
|
|
@@ -30,14 +16,14 @@ export declare enum AllowedTags {
|
|
|
30
16
|
* @public
|
|
31
17
|
*/
|
|
32
18
|
export type TagPortalOptions = {
|
|
33
|
-
tag:
|
|
19
|
+
tag: string;
|
|
34
20
|
name: string;
|
|
35
21
|
version: string;
|
|
36
22
|
framework: FusionFramework;
|
|
37
23
|
log?: ConsoleLogger | null;
|
|
38
24
|
};
|
|
39
25
|
/**
|
|
40
|
-
* Tags a portal template version in the portal service with a specified tag
|
|
26
|
+
* Tags a portal template version in the portal service with a specified tag.
|
|
41
27
|
*
|
|
42
28
|
* This function validates input, creates a client for the portal service, and sends a tag request.
|
|
43
29
|
* It provides detailed logging and error handling for common failure scenarios.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CLI command: `ai`
|
|
3
|
+
*
|
|
4
|
+
* Manage Large Language Model (ai) integrations and configurations.
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* - Interactive chat with AI models
|
|
8
|
+
* - Document embedding and chunking utilities
|
|
9
|
+
* - Configure ai clients
|
|
10
|
+
* - Test model connections
|
|
11
|
+
* - Manage API keys and settings
|
|
12
|
+
*
|
|
13
|
+
* Usage:
|
|
14
|
+
* $ ffc ai <subcommand> [options]
|
|
15
|
+
*
|
|
16
|
+
* Subcommands:
|
|
17
|
+
* chat Interactive chat with AI models
|
|
18
|
+
* embeddings Document embedding utilities for ai processing
|
|
19
|
+
*
|
|
20
|
+
* Examples:
|
|
21
|
+
* $ ffc ai chat
|
|
22
|
+
* $ ffc ai chat --model gpt-4 --api-key sk-...
|
|
23
|
+
* $ ffc ai embeddings --dry-run ./src
|
|
24
|
+
* $ ffc ai embeddings --chunk-size 1000 ./docs/readme.md
|
|
25
|
+
*/
|
|
26
|
+
export declare const command: import("commander").Command;
|
|
27
|
+
export default command;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type SimpleGit } from 'simple-git';
|
|
2
|
+
export type GitMetadata = Partial<{
|
|
3
|
+
git_remote_url: string;
|
|
4
|
+
git_commit_hash: string;
|
|
5
|
+
git_commit_date: string;
|
|
6
|
+
git_link: string;
|
|
7
|
+
}>;
|
|
8
|
+
/**
|
|
9
|
+
* Git diff options for filtering changed files
|
|
10
|
+
*/
|
|
11
|
+
export interface GitDiffOptions {
|
|
12
|
+
/** Enable diff-based file filtering */
|
|
13
|
+
diff: boolean;
|
|
14
|
+
/** Git reference to compare against (default: HEAD~1) */
|
|
15
|
+
baseRef?: string;
|
|
16
|
+
/** Working directory for git operations */
|
|
17
|
+
cwd?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const resolveProjectRoot: (filePath: string) => string | undefined;
|
|
20
|
+
export declare const getGit: (filePath: string) => {
|
|
21
|
+
git: SimpleGit | undefined;
|
|
22
|
+
gitRepoPath: string;
|
|
23
|
+
} | undefined;
|
|
24
|
+
export declare const extractGitMetadata: (filePath: string) => Promise<GitMetadata | undefined>;
|
|
25
|
+
/**
|
|
26
|
+
* Get list of changed files using git diff
|
|
27
|
+
* @param options - Git diff configuration options
|
|
28
|
+
* @returns Array of changed file paths
|
|
29
|
+
*/
|
|
30
|
+
export declare const getChangedFiles: (options: GitDiffOptions) => Promise<string[]>;
|
|
31
|
+
/**
|
|
32
|
+
* Check if a file path matches any of the changed files
|
|
33
|
+
* @param filePath - File path to check
|
|
34
|
+
* @param changedFiles - Array of changed file paths
|
|
35
|
+
* @returns True if file has changed
|
|
36
|
+
*/
|
|
37
|
+
export declare const isFileChanged: (filePath: string, changedFiles: string[]) => boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Get git status information for debugging
|
|
40
|
+
* @param cwd - Working directory
|
|
41
|
+
* @returns Git status information
|
|
42
|
+
*/
|
|
43
|
+
export declare const getGitStatus: (cwd?: string) => Promise<{
|
|
44
|
+
branch: string;
|
|
45
|
+
commit: string;
|
|
46
|
+
hasChanges: boolean;
|
|
47
|
+
stagedFiles: number;
|
|
48
|
+
unstagedFiles: number;
|
|
49
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const generateChunkId: (filePath: string, chunkIndex?: number) => string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { VectorStoreDocument, VectorStoreDocumentMetadata } from '@equinor/fusion-framework-module-ai/lib';
|
|
2
|
+
import type { SourceFile } from './types.js';
|
|
3
|
+
export type MarkdownMetadata<T extends Record<string, unknown> = Record<string, unknown>> = VectorStoreDocumentMetadata<T & {
|
|
4
|
+
type: 'markdown';
|
|
5
|
+
}>;
|
|
6
|
+
export type MarkdownDocument<T extends Record<string, unknown> = Record<string, unknown>> = VectorStoreDocument<MarkdownMetadata<T>>;
|
|
7
|
+
export declare const isMarkdownFile: (filePath: string) => boolean;
|
|
8
|
+
export declare const parseMarkdown: <T extends Record<string, unknown> = Record<string, unknown>>(content: string, source: string) => Promise<MarkdownDocument<T>[]>;
|
|
9
|
+
export declare const parseMarkdownFile: <T extends Record<string, unknown> = Record<string, unknown>>(file: SourceFile) => Promise<MarkdownDocument<T>[]>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { VectorStoreDocument, VectorStoreDocumentMetadata } from '@equinor/fusion-framework-module-ai/lib';
|
|
2
|
+
import type { SourceFile } from './types.js';
|
|
3
|
+
export type TypescriptMetadata = VectorStoreDocumentMetadata<{
|
|
4
|
+
type: 'tsdoc';
|
|
5
|
+
ts_kind: string;
|
|
6
|
+
ts_name: string;
|
|
7
|
+
}>;
|
|
8
|
+
export type TypescriptDocument = VectorStoreDocument<TypescriptMetadata>;
|
|
9
|
+
export interface ParseTsDocOptions {
|
|
10
|
+
/** The project root path for generating relative paths */
|
|
11
|
+
projectRoot?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Checks if a file is a TypeScript or TSX file based on its extension.
|
|
15
|
+
* @param filePath - The path to the file.
|
|
16
|
+
* @returns True if the file ends with .ts or .tsx, false otherwise.
|
|
17
|
+
*/
|
|
18
|
+
export declare const isTypescriptFile: (filePath: string) => boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Parses TSDoc from a string of TypeScript code.
|
|
21
|
+
* @param content - The TypeScript code content.
|
|
22
|
+
* @param options - Optional parsing configuration.
|
|
23
|
+
* @returns An array of TypeScript documents with TSDoc metadata.
|
|
24
|
+
*/
|
|
25
|
+
export declare const parseTsDocSync: (content: string, options?: ParseTsDocOptions) => TypescriptDocument[];
|
|
26
|
+
/**
|
|
27
|
+
* Parses TSDoc from a TypeScript file by path.
|
|
28
|
+
* @param file - The source file object.
|
|
29
|
+
* @param options - Optional parsing configuration.
|
|
30
|
+
* @returns An array of TypeScript documents with TSDoc metadata.
|
|
31
|
+
* @throws If the file is not a TypeScript file.
|
|
32
|
+
*/
|
|
33
|
+
export declare const parseTsDocFromFileSync: (file: SourceFile, options?: ParseTsDocOptions) => TypescriptDocument[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type IAIProvider } from '@equinor/fusion-framework-module-ai';
|
|
2
|
+
import { type FusionFramework } from '../../../../bin/framework.node.js';
|
|
3
|
+
import type { AiOptions } from '../../../options/ai.js';
|
|
4
|
+
export declare const setupFramework: (options: AiOptions) => Promise<FusionFramework & {
|
|
5
|
+
ai: IAIProvider;
|
|
6
|
+
}>;
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* -d, --debug Enable debug mode for verbose logging
|
|
16
16
|
* -e, --env <env> Target environment
|
|
17
17
|
* -m, --manifest Manifest file to use for bundling
|
|
18
|
-
* -t, --tag Tag to apply to the published portal
|
|
18
|
+
* -t, --tag Tag to apply to the published portal (any string value)
|
|
19
19
|
*
|
|
20
20
|
* Example:
|
|
21
21
|
* $ ffc portal publish
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* $ ffc portal tag <tag> [options]
|
|
13
13
|
*
|
|
14
14
|
* Arguments:
|
|
15
|
-
* <tag> Tag to apply (e.g., latest, preview)
|
|
15
|
+
* <tag> Tag to apply (e.g., latest, preview, next, or any string value)
|
|
16
16
|
*
|
|
17
17
|
* Options:
|
|
18
18
|
* -m, --manifest <file> Manifest file to use (optional, defaults to portal.manifest.ts)
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { type Command } from 'commander';
|
|
2
|
+
/**
|
|
3
|
+
* Interface representing the AI-related options available in CLI commands.
|
|
4
|
+
* This interface defines the structure of options that can be passed to AI commands.
|
|
5
|
+
*/
|
|
6
|
+
export interface AiOptions {
|
|
7
|
+
/** Azure OpenAI API key for authentication */
|
|
8
|
+
openaiApiKey: string;
|
|
9
|
+
/** Azure OpenAI API version */
|
|
10
|
+
openaiApiVersion: string;
|
|
11
|
+
/** Azure OpenAI instance name */
|
|
12
|
+
openaiInstance: string;
|
|
13
|
+
/** Azure OpenAI chat deployment name (optional) */
|
|
14
|
+
openaiChatDeployment?: string;
|
|
15
|
+
/** Azure OpenAI embedding deployment name (optional) */
|
|
16
|
+
openaiEmbeddingDeployment?: string;
|
|
17
|
+
/** Azure Search endpoint URL (optional) */
|
|
18
|
+
azureSearchEndpoint?: string;
|
|
19
|
+
/** Azure Search API key (optional) */
|
|
20
|
+
azureSearchApiKey?: string;
|
|
21
|
+
/** Azure Search index name (optional) */
|
|
22
|
+
azureSearchIndexName?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Option for specifying the Azure OpenAI API key.
|
|
26
|
+
* Required for authentication with Azure OpenAI services.
|
|
27
|
+
*/
|
|
28
|
+
export declare const apiKeyOption: import("commander").Option;
|
|
29
|
+
/**
|
|
30
|
+
* Option for specifying the Azure OpenAI API version.
|
|
31
|
+
* Defaults to the latest stable version if not provided.
|
|
32
|
+
*/
|
|
33
|
+
export declare const apiVersionOption: import("commander").Option;
|
|
34
|
+
/**
|
|
35
|
+
* Option for specifying the Azure OpenAI instance name.
|
|
36
|
+
* Required for Azure OpenAI service endpoint construction.
|
|
37
|
+
*/
|
|
38
|
+
export declare const apiInstanceOption: import("commander").Option;
|
|
39
|
+
/**
|
|
40
|
+
* Option for specifying the Azure OpenAI deployment name for chat models.
|
|
41
|
+
* Required for chat completions API calls.
|
|
42
|
+
*/
|
|
43
|
+
export declare const chatDeploymentOption: import("commander").Option;
|
|
44
|
+
/**
|
|
45
|
+
* Option for specifying the Azure OpenAI deployment name for embedding models.
|
|
46
|
+
* Required for embeddings API calls.
|
|
47
|
+
*/
|
|
48
|
+
export declare const embeddingDeploymentOption: import("commander").Option;
|
|
49
|
+
/**
|
|
50
|
+
* Option for specifying the Azure Search endpoint URL.
|
|
51
|
+
* Required for Azure Cognitive Search operations.
|
|
52
|
+
*/
|
|
53
|
+
export declare const azureSearchEndpointOption: import("commander").Option;
|
|
54
|
+
/**
|
|
55
|
+
* Option for specifying the Azure Search API key.
|
|
56
|
+
* Required for authentication with Azure Cognitive Search.
|
|
57
|
+
*/
|
|
58
|
+
export declare const azureSearchApiKeyOption: import("commander").Option;
|
|
59
|
+
/**
|
|
60
|
+
* Option for specifying the Azure Search index name.
|
|
61
|
+
* Required for search operations on a specific index.
|
|
62
|
+
*/
|
|
63
|
+
export declare const azureSearchIndexNameOption: import("commander").Option;
|
|
64
|
+
/**
|
|
65
|
+
* Enhances a given command with AI-related options.
|
|
66
|
+
*
|
|
67
|
+
* This function adds the following options to the provided command:
|
|
68
|
+
* - `openaiApiKey`: Azure OpenAI API key
|
|
69
|
+
* - `openaiApiVersion`: Azure OpenAI API version
|
|
70
|
+
* - `openaiInstance`: Azure OpenAI instance name
|
|
71
|
+
* - `openaiChatDeployment`: Chat model deployment name
|
|
72
|
+
* - `openaiEmbeddingDeployment`: Embedding model deployment name (if includeEmbedding is true)
|
|
73
|
+
* - `azureSearchEndpoint`: Azure Search endpoint URL (if includeSearch is true)
|
|
74
|
+
* - `azureSearchApiKey`: Azure Search API key (if includeSearch is true)
|
|
75
|
+
* - `azureSearchIndexName`: Azure Search index name (if includeSearch is true)
|
|
76
|
+
*
|
|
77
|
+
* @param command - The command to which AI options will be added
|
|
78
|
+
* @param args - Optional configuration for which options to include
|
|
79
|
+
* @param args.includeEmbedding - Whether to include embedding deployment option
|
|
80
|
+
* @param args.includeChat - Whether to include chat deployment option (defaults to true)
|
|
81
|
+
* @param args.includeSearch - Whether to include Azure Search options (defaults to false)
|
|
82
|
+
* @returns The enhanced command with AI options
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* ```ts
|
|
86
|
+
* import { createCommand } from 'commander';
|
|
87
|
+
* import { withAiOptions } from './path/to/this/file';
|
|
88
|
+
*
|
|
89
|
+
* const command = withAiOptions(
|
|
90
|
+
* createCommand('ai-chat')
|
|
91
|
+
* .description('Chat with AI models')
|
|
92
|
+
* .action((options) => {
|
|
93
|
+
* console.log('API Key:', options.openaiApiKey);
|
|
94
|
+
* console.log('Instance:', options.openaiInstance);
|
|
95
|
+
* console.log('Chat Deployment:', options.openaiChatDeployment);
|
|
96
|
+
* })
|
|
97
|
+
* );
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
export declare const withAiOptions: (command: Command, args?: Partial<{
|
|
101
|
+
includeEmbedding: boolean;
|
|
102
|
+
includeChat: boolean;
|
|
103
|
+
includeSearch: boolean;
|
|
104
|
+
}>) => Command;
|
|
105
|
+
export default withAiOptions;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { VectorStoreDocument } from '@equinor/fusion-framework-module-ai/lib';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration interface for Fusion AI operations
|
|
4
|
+
*/
|
|
5
|
+
export interface FusionAIConfig {
|
|
6
|
+
patterns?: string[];
|
|
7
|
+
/** Metadata processing configuration */
|
|
8
|
+
metadata?: {
|
|
9
|
+
/** Custom metadata processors to transform metadata before embedding */
|
|
10
|
+
attributeProcessor?: (metadata: Record<string, any>, document: VectorStoreDocument) => Record<string, any>;
|
|
11
|
+
};
|
|
12
|
+
/** Embedding generation configuration */
|
|
13
|
+
embedding?: {
|
|
14
|
+
/** Size of text chunks for embedding */
|
|
15
|
+
chunkSize?: number;
|
|
16
|
+
/** Overlap between chunks */
|
|
17
|
+
chunkOverlap?: number;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare const configureFusionAI: (fn: () => Promise<FusionAIConfig> | FusionAIConfig) => () => Promise<FusionAIConfig> | FusionAIConfig;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "
|
|
1
|
+
export declare const version = "13.0.0-cli-search-index.0";
|
package/docs/portal.md
CHANGED
|
@@ -137,7 +137,7 @@ This command builds your portal template, uploads it to the Fusion portal regist
|
|
|
137
137
|
| `-e`, `--env` | Target environment for deployment (e.g., `ci`, `fqa`, `fprd`). | |
|
|
138
138
|
| `-m`, `--manifest` | Manifest file to use for bundling (e.g., `portal.manifest.ts`) (optional). | `portal.manifest.ts` |
|
|
139
139
|
| `-s`, `--schema` | Schema file to use for bundling (e.g., `portal.schema.ts`) (optional). | `portal.schema.ts` |
|
|
140
|
-
| `-t`, `--tag` | Tag to apply to the published portal (`latest
|
|
140
|
+
| `-t`, `--tag` | Tag to apply to the published portal (e.g., `latest`, `preview`, `next`, or any string value). | `latest` |
|
|
141
141
|
| `-d`, `--debug` | Enable debug mode for verbose logging. | `false` |
|
|
142
142
|
| `--token` | Authentication token for Fusion. | |
|
|
143
143
|
| `--tenantId` | Azure tenant ID for authentication. | |
|
|
@@ -194,10 +194,10 @@ pnpm fusion-framework-cli portal upload my-portal.zip --name my-portal
|
|
|
194
194
|
|
|
195
195
|
Tag a published portal template version in the Fusion portal registry.
|
|
196
196
|
|
|
197
|
-
| Option/Argument | Description
|
|
198
|
-
| ----------------- |
|
|
199
|
-
| `<tag>` | Tag to apply (`latest
|
|
200
|
-
| `-p, --package` | Package to tag in format name@version.
|
|
197
|
+
| Option/Argument | Description | Default / Example |
|
|
198
|
+
| ----------------- | ----------------------------------------------- | ----------------- |
|
|
199
|
+
| `<tag>` | Tag to apply (e.g., `latest`, `preview`, `next`, or any string value). | |
|
|
200
|
+
| `-p, --package` | Package to tag in format name@version. | |
|
|
201
201
|
| `-m, --manifest` | Manifest file to use. | `portal.manifest.ts` |
|
|
202
202
|
| `--token` | Authentication token for Fusion. | |
|
|
203
203
|
| `--tenantId` | Azure tenant ID for authentication. | |
|
|
@@ -212,6 +212,8 @@ pnpm fusion-framework-cli portal tag <tag> [options]
|
|
|
212
212
|
```sh
|
|
213
213
|
pnpm fusion-framework-cli portal tag latest --package my-portal@1.0.0
|
|
214
214
|
pnpm fusion-framework-cli portal tag preview --package my-portal@1.1.0-beta
|
|
215
|
+
pnpm fusion-framework-cli portal tag next --package my-portal@2.0.0-alpha
|
|
216
|
+
pnpm fusion-framework-cli portal tag stable --package my-portal@1.2.0
|
|
215
217
|
```
|
|
216
218
|
|
|
217
219
|
---
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "13.0.0-cli-search-index.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"Fusion",
|
|
6
6
|
"Fusion Framework",
|
|
@@ -59,6 +59,10 @@
|
|
|
59
59
|
"types": "./dist/types/lib/utils/index.d.ts",
|
|
60
60
|
"import": "./dist/esm/lib/utils/index.js"
|
|
61
61
|
},
|
|
62
|
+
"./ai": {
|
|
63
|
+
"types": "./dist/types/lib/ai/index.d.ts",
|
|
64
|
+
"import": "./dist/esm/lib/ai/index.js"
|
|
65
|
+
},
|
|
62
66
|
"./package.json": "./package.json",
|
|
63
67
|
"./README.md": "./README.md",
|
|
64
68
|
"./CHANGELOG.md": "./CHANGELOG.md"
|
|
@@ -85,6 +89,9 @@
|
|
|
85
89
|
],
|
|
86
90
|
"utils": [
|
|
87
91
|
"dist/types/lib/utils/index.d.ts"
|
|
92
|
+
],
|
|
93
|
+
"ai": [
|
|
94
|
+
"dist/types/lib/ai/index.d.ts"
|
|
88
95
|
]
|
|
89
96
|
}
|
|
90
97
|
},
|
|
@@ -94,23 +101,37 @@
|
|
|
94
101
|
"directory": "packages/cli"
|
|
95
102
|
},
|
|
96
103
|
"dependencies": {
|
|
104
|
+
"@langchain/core": "^1.0.1",
|
|
105
|
+
"@langchain/textsplitters": "^1.0.0",
|
|
106
|
+
"@types/find-up": "^4.0.2",
|
|
97
107
|
"@types/inquirer": "^9.0.9",
|
|
98
108
|
"commander": "^14.0.1",
|
|
99
109
|
"deepmerge": "^4.3.1",
|
|
110
|
+
"dotenv": "^17.2.2",
|
|
100
111
|
"execa": "^9.6.0",
|
|
112
|
+
"find-up": "^8.0.0",
|
|
113
|
+
"findup": "^0.1.5",
|
|
114
|
+
"globby": "^15.0.0",
|
|
115
|
+
"gray-matter": "^4.0.3",
|
|
101
116
|
"inquirer": "^12.9.6",
|
|
102
117
|
"is-mergeable-object": "^1.1.1",
|
|
103
118
|
"is-path-inside": "^4.0.0",
|
|
119
|
+
"multimatch": "^7.0.0",
|
|
104
120
|
"ora": "^9.0.0",
|
|
121
|
+
"package-up": "^5.0.0",
|
|
105
122
|
"read-package-up": "^11.0.0",
|
|
106
123
|
"simple-git": "^3.28.0",
|
|
107
124
|
"vite": "^7.1.12",
|
|
125
|
+
"tree-sitter": "^0.25.0",
|
|
126
|
+
"tree-sitter-typescript": "^0.23.2",
|
|
127
|
+
"ts-morph": "^27.0.2",
|
|
128
|
+
"tsx": "^4.19.3",
|
|
108
129
|
"vite-tsconfig-paths": "^5.1.4",
|
|
109
130
|
"zod": "^4.1.8",
|
|
110
|
-
"@equinor/fusion-framework-dev-
|
|
111
|
-
"@equinor/fusion-framework-dev-
|
|
112
|
-
"@equinor/fusion-
|
|
113
|
-
"@equinor/fusion-
|
|
131
|
+
"@equinor/fusion-framework-dev-server": "1.1.13-cli-search-index.0",
|
|
132
|
+
"@equinor/fusion-framework-dev-portal": "1.2.6-cli-search-index.0",
|
|
133
|
+
"@equinor/fusion-framework-module-msal-node": "2.0.1-cli-search-index.0",
|
|
134
|
+
"@equinor/fusion-imports": "1.1.7-cli-search-index.0"
|
|
114
135
|
},
|
|
115
136
|
"devDependencies": {
|
|
116
137
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
@@ -129,14 +150,15 @@
|
|
|
129
150
|
"pretty-bytes": "^7.0.0",
|
|
130
151
|
"rollup": "^4.50.2",
|
|
131
152
|
"rollup-plugin-terser": "^7.0.2",
|
|
132
|
-
"rxjs": "^7.8.
|
|
153
|
+
"rxjs": "^7.8.2",
|
|
133
154
|
"type-fest": "^5.0.0",
|
|
134
155
|
"typescript": "^5.8.2",
|
|
135
156
|
"vitest": "^3.2.4",
|
|
136
|
-
"@equinor/fusion-framework-module": "5.0.
|
|
137
|
-
"@equinor/fusion-framework-module-
|
|
138
|
-
"@equinor/fusion-framework-module-
|
|
139
|
-
"@equinor/fusion-framework-module-
|
|
157
|
+
"@equinor/fusion-framework-module": "5.0.6-cli-search-index.0",
|
|
158
|
+
"@equinor/fusion-framework-module-ai": "1.1.0-cli-search-index.0",
|
|
159
|
+
"@equinor/fusion-framework-module-app": "7.1.1-cli-search-index.0",
|
|
160
|
+
"@equinor/fusion-framework-module-http": "7.0.6-cli-search-index.0",
|
|
161
|
+
"@equinor/fusion-framework-module-service-discovery": "9.0.5-cli-search-index.0"
|
|
140
162
|
},
|
|
141
163
|
"peerDependenciesMeta": {
|
|
142
164
|
"typescript": {
|
|
@@ -145,6 +167,7 @@
|
|
|
145
167
|
},
|
|
146
168
|
"scripts": {
|
|
147
169
|
"prebuild": "tsc -b",
|
|
170
|
+
"dev:cli": "tsx src/cli/main.ts",
|
|
148
171
|
"build": "rollup -c rollup.config.js",
|
|
149
172
|
"build:clean": "rm -rf dist && rm -rf bin/build && rm -f tsconfig.tsbuildinfo && pnpm build",
|
|
150
173
|
"test": "vitest",
|