@storm-software/k8s-tools 0.0.1
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/LICENSE +201 -0
- package/README.md +7 -0
- package/executors.json +9 -0
- package/generators.json +14 -0
- package/index.js +4109 -0
- package/meta.json +1 -0
- package/package.json +71 -0
- package/packages/build-tools/src/build/index.d.ts +3 -0
- package/packages/build-tools/src/build/rolldown.d.ts +20 -0
- package/packages/build-tools/src/build/ts-build.d.ts +20 -0
- package/packages/build-tools/src/build/unbuild.d.ts +20 -0
- package/packages/build-tools/src/cli/index.d.ts +2 -0
- package/packages/build-tools/src/config/browser-config.d.ts +2 -0
- package/packages/build-tools/src/config/default-config.d.ts +2 -0
- package/packages/build-tools/src/config/get-config.d.ts +2 -0
- package/packages/build-tools/src/config/get-rolldown-config.d.ts +6 -0
- package/packages/build-tools/src/config/get-unbuild-config.d.ts +6 -0
- package/packages/build-tools/src/config/index.d.ts +7 -0
- package/packages/build-tools/src/config/neutral-config.d.ts +2 -0
- package/packages/build-tools/src/config/node-config.d.ts +3 -0
- package/packages/build-tools/src/index.d.ts +6 -0
- package/packages/build-tools/src/plugins/analyze-plugin.d.ts +4 -0
- package/packages/build-tools/src/plugins/index.d.ts +4 -0
- package/packages/build-tools/src/plugins/swc-plugin.d.ts +2 -0
- package/packages/build-tools/src/plugins/ts-resolve.d.ts +6 -0
- package/packages/build-tools/src/plugins/type-definitions.d.ts +7 -0
- package/packages/build-tools/src/types.d.ts +213 -0
- package/packages/build-tools/src/utils/apply-default-options.d.ts +6 -0
- package/packages/build-tools/src/utils/generate-package-json.d.ts +7 -0
- package/packages/build-tools/src/utils/get-entry-points.d.ts +3 -0
- package/packages/build-tools/src/utils/get-file-banner.d.ts +8 -0
- package/packages/build-tools/src/utils/get-project-deps.d.ts +5 -0
- package/packages/build-tools/src/utils/index.d.ts +7 -0
- package/packages/build-tools/src/utils/out-extension.d.ts +8 -0
- package/packages/build-tools/src/utils/run-tsup-build.d.ts +3 -0
- package/packages/build-tools/src/utils/task-graph.d.ts +6 -0
- package/packages/config/src/constants.d.ts +3 -0
- package/packages/config/src/define-config.d.ts +174 -0
- package/packages/config/src/index.d.ts +12 -0
- package/packages/config/src/schema.d.ts +1915 -0
- package/packages/config/src/types.d.ts +23 -0
- package/packages/config-tools/src/config-file/get-config-file.d.ts +16 -0
- package/packages/config-tools/src/config-file/index.d.ts +1 -0
- package/packages/config-tools/src/create-storm-config.d.ts +26 -0
- package/packages/config-tools/src/env/get-env.d.ts +15 -0
- package/packages/config-tools/src/env/index.d.ts +2 -0
- package/packages/config-tools/src/env/set-env.d.ts +14 -0
- package/packages/config-tools/src/index.d.ts +13 -0
- package/packages/config-tools/src/types.d.ts +33 -0
- package/packages/config-tools/src/utilities/apply-workspace-tokens.d.ts +4 -0
- package/packages/config-tools/src/utilities/chalk.d.ts +23 -0
- package/packages/config-tools/src/utilities/correct-paths.d.ts +1 -0
- package/packages/config-tools/src/utilities/file-path-utils.d.ts +2 -0
- package/packages/config-tools/src/utilities/find-up.d.ts +4 -0
- package/packages/config-tools/src/utilities/find-workspace-root.d.ts +14 -0
- package/packages/config-tools/src/utilities/get-default-config.d.ts +15 -0
- package/packages/config-tools/src/utilities/get-log-level.d.ts +15 -0
- package/packages/config-tools/src/utilities/index.d.ts +10 -0
- package/packages/config-tools/src/utilities/logger.d.ts +74 -0
- package/packages/config-tools/src/utilities/process-handler.d.ts +4 -0
- package/packages/config-tools/src/utilities/run.d.ts +18 -0
- package/packages/k8s-tools/index.d.ts +1 -0
- package/packages/k8s-tools/src/executors/helm-package/executor.d.ts +8 -0
- package/packages/k8s-tools/src/executors/index.d.ts +1 -0
- package/packages/k8s-tools/src/generators/helm-chart/generator.d.ts +5 -0
- package/packages/k8s-tools/src/generators/helm-dependency/generator.d.ts +5 -0
- package/packages/k8s-tools/src/generators/index.d.ts +2 -0
- package/packages/k8s-tools/src/index.d.ts +2 -0
- package/packages/k8s-tools/src/types.d.ts +28 -0
- package/packages/k8s-tools/src/utils/client.d.ts +26 -0
- package/packages/k8s-tools/src/utils/ensure-init.d.ts +9 -0
- package/packages/k8s-tools/src/utils/prettier.d.ts +9 -0
- package/packages/workspace-tools/index.d.ts +32 -0
- package/packages/workspace-tools/src/base/base-executor.d.ts +7 -0
- package/packages/workspace-tools/src/base/base-generator.d.ts +4 -0
- package/packages/workspace-tools/src/base/index.d.ts +3 -0
- package/packages/workspace-tools/src/base/typescript-library-generator.d.ts +8 -0
- package/packages/workspace-tools/src/executors/cargo-publish/executor.d.ts +6 -0
- package/packages/workspace-tools/src/executors/clean-package/constants.d.ts +4 -0
- package/packages/workspace-tools/src/executors/clean-package/executor.d.ts +8 -0
- package/packages/workspace-tools/src/executors/clean-package/types.d.ts +8 -0
- package/packages/workspace-tools/src/executors/clean-package/utils.d.ts +4 -0
- package/packages/workspace-tools/src/executors/npm-publish/executor.d.ts +6 -0
- package/packages/workspace-tools/src/executors/rolldown/executor.d.ts +9 -0
- package/packages/workspace-tools/src/executors/size-limit/executor.d.ts +8 -0
- package/packages/workspace-tools/src/executors/tsup/executor.d.ts +8 -0
- package/packages/workspace-tools/src/executors/tsup-browser/executor.d.ts +8 -0
- package/packages/workspace-tools/src/executors/tsup-neutral/executor.d.ts +8 -0
- package/packages/workspace-tools/src/executors/tsup-node/executor.d.ts +8 -0
- package/packages/workspace-tools/src/executors/typia/executor.d.ts +8 -0
- package/packages/workspace-tools/src/executors/unbuild/executor.d.ts +9 -0
- package/packages/workspace-tools/src/generators/config-schema/generator.d.ts +13 -0
- package/packages/workspace-tools/src/generators/init/init.d.ts +4 -0
- package/packages/workspace-tools/src/generators/node-library/generator.d.ts +5 -0
- package/packages/workspace-tools/src/generators/preset/generator.d.ts +5 -0
- package/packages/workspace-tools/src/generators/release-version/generator.d.ts +13 -0
- package/packages/workspace-tools/src/utils/apply-workspace-tokens.d.ts +8 -0
- package/packages/workspace-tools/src/utils/cargo.d.ts +26 -0
- package/packages/workspace-tools/src/utils/create-cli-options.d.ts +1 -0
- package/packages/workspace-tools/src/utils/get-project-configurations.d.ts +13 -0
- package/packages/workspace-tools/src/utils/index.d.ts +9 -0
- package/packages/workspace-tools/src/utils/lock-file.d.ts +23 -0
- package/packages/workspace-tools/src/utils/project-tags.d.ts +30 -0
- package/packages/workspace-tools/src/utils/toml.d.ts +167 -0
- package/packages/workspace-tools/src/utils/typia-transform.d.ts +2 -0
- package/packages/workspace-tools/src/utils/versions.d.ts +18 -0
- package/src/executors/helm-package/executor.js +1244 -0
- package/src/executors/helm-package/schema.d.ts +29 -0
- package/src/executors/helm-package/schema.json +112 -0
- package/src/generators/helm-chart/files/chart/.helmignore +23 -0
- package/src/generators/helm-chart/files/chart/Chart.yaml.template +6 -0
- package/src/generators/helm-chart/files/chart/templates/NOTES.txt +22 -0
- package/src/generators/helm-chart/files/chart/templates/_helpers.yaml +62 -0
- package/src/generators/helm-chart/files/chart/templates/deployment.yaml +68 -0
- package/src/generators/helm-chart/files/chart/templates/hpa.yaml +32 -0
- package/src/generators/helm-chart/files/chart/templates/ingress.yaml +61 -0
- package/src/generators/helm-chart/files/chart/templates/service.yaml +13 -0
- package/src/generators/helm-chart/files/chart/templates/serviceaccount.yaml +13 -0
- package/src/generators/helm-chart/files/chart/templates/test/test-connection.yaml +15 -0
- package/src/generators/helm-chart/files/chart/values.yaml +111 -0
- package/src/generators/helm-chart/generator.js +131 -0
- package/src/generators/helm-chart/schema.d.ts +11 -0
- package/src/generators/helm-chart/schema.json +48 -0
- package/src/generators/helm-dependency/generator.js +2805 -0
- package/src/generators/helm-dependency/schema.d.ts +15 -0
- package/src/generators/helm-dependency/schema.json +71 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type z from "zod";
|
|
2
|
+
import type { ColorConfigMapSchema, ColorConfigSchema, DarkThemeColorConfigSchema, LightThemeColorConfigSchema, MultiThemeColorConfigSchema, SingleThemeColorConfigSchema, StormConfigSchema } from "./schema";
|
|
3
|
+
export type DarkThemeColorConfig = z.infer<typeof DarkThemeColorConfigSchema>;
|
|
4
|
+
export type DarkThemeColorConfigInput = z.input<typeof DarkThemeColorConfigSchema>;
|
|
5
|
+
export type LightThemeColorConfig = z.infer<typeof LightThemeColorConfigSchema>;
|
|
6
|
+
export type LightThemeColorConfigInput = z.input<typeof LightThemeColorConfigSchema>;
|
|
7
|
+
export type MultiThemeColorConfig = z.infer<typeof MultiThemeColorConfigSchema>;
|
|
8
|
+
export type MultiThemeColorConfigInput = z.input<typeof MultiThemeColorConfigSchema>;
|
|
9
|
+
export type SingleThemeColorConfig = z.infer<typeof SingleThemeColorConfigSchema>;
|
|
10
|
+
export type SingleThemeColorConfigInput = z.input<typeof SingleThemeColorConfigSchema>;
|
|
11
|
+
export type ColorConfig = z.infer<typeof ColorConfigSchema>;
|
|
12
|
+
export type ColorConfigInput = z.input<typeof ColorConfigSchema>;
|
|
13
|
+
export type ColorConfigMap = z.infer<typeof ColorConfigMapSchema>;
|
|
14
|
+
export type ColorConfigMapInput = z.input<typeof ColorConfigMapSchema>;
|
|
15
|
+
type TStormConfig = z.infer<typeof StormConfigSchema>;
|
|
16
|
+
export type StormConfigInput = z.input<typeof StormConfigSchema>;
|
|
17
|
+
export type StormConfig<TExtensionName extends keyof TStormConfig["extensions"] = keyof TStormConfig["extensions"], TExtensionConfig extends TStormConfig["extensions"][TExtensionName] = TStormConfig["extensions"][TExtensionName]> = TStormConfig & {
|
|
18
|
+
extensions?: (TStormConfig["extensions"] & {
|
|
19
|
+
[extensionName in TExtensionName]: TExtensionConfig;
|
|
20
|
+
}) | Record<string, any>;
|
|
21
|
+
};
|
|
22
|
+
export declare const COLOR_KEYS: string[];
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StormConfigInput } from "@storm-software/config";
|
|
2
|
+
import { ResolvedConfig, type LoadConfigOptions } from "c12";
|
|
3
|
+
/**
|
|
4
|
+
* Get the config file for the current Storm workspace
|
|
5
|
+
*
|
|
6
|
+
* @param fileName - The name of the config file to search for
|
|
7
|
+
* @param filePath - The path to search for the config file in
|
|
8
|
+
* @returns The config file for the current Storm workspace
|
|
9
|
+
*/
|
|
10
|
+
export declare const getConfigFileByName: (fileName: string, filePath?: string, options?: LoadConfigOptions<Partial<StormConfigInput>>) => Promise<ResolvedConfig<Partial<StormConfigInput>>>;
|
|
11
|
+
/**
|
|
12
|
+
* Get the config file for the current Storm workspace
|
|
13
|
+
*
|
|
14
|
+
* @returns The config file for the current Storm workspace
|
|
15
|
+
*/
|
|
16
|
+
export declare const getConfigFile: (filePath?: string, additionalFileNames?: string[]) => Promise<Partial<StormConfigInput> | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./get-config-file";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { StormConfig } from "@storm-software/config";
|
|
2
|
+
import type { ZodTypeAny } from "zod";
|
|
3
|
+
/**
|
|
4
|
+
* Get the config for the current Storm workspace
|
|
5
|
+
*
|
|
6
|
+
* @returns The config for the current Storm workspace
|
|
7
|
+
*/
|
|
8
|
+
export declare const createConfig: (workspaceRoot?: string) => StormConfig;
|
|
9
|
+
/**
|
|
10
|
+
* Get the config for the current Storm workspace
|
|
11
|
+
*
|
|
12
|
+
* @returns The config for the current Storm workspace
|
|
13
|
+
*/
|
|
14
|
+
export declare const createStormConfig: <TExtensionName extends keyof StormConfig["extensions"] = string, TExtensionConfig = any, TExtensionSchema extends ZodTypeAny = ZodTypeAny>(extensionName?: TExtensionName, schema?: TExtensionSchema, workspaceRoot?: string) => StormConfig<TExtensionName, TExtensionConfig>;
|
|
15
|
+
/**
|
|
16
|
+
* Get the config for a specific Storm config Extension
|
|
17
|
+
*
|
|
18
|
+
* @param extensionName - The name of the config extension
|
|
19
|
+
* @param options - The options for the config extension
|
|
20
|
+
* @returns The config for the specified Storm config extension. If the extension does not exist, `undefined` is returned.
|
|
21
|
+
*/
|
|
22
|
+
export declare const createConfigExtension: <TExtensionName extends keyof StormConfig["extensions"] = string, TExtensionConfig = any, TExtensionSchema extends ZodTypeAny = ZodTypeAny>(extensionName: TExtensionName, schema: TExtensionSchema) => TExtensionConfig;
|
|
23
|
+
/**
|
|
24
|
+
* Load the config file values for the current Storm workspace into environment variables
|
|
25
|
+
*/
|
|
26
|
+
export declare const loadStormConfig: (workspaceRoot?: string) => Promise<StormConfig>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type StormConfig } from "@storm-software/config";
|
|
2
|
+
import type { DeepPartial } from "../../declarations.d";
|
|
3
|
+
/**
|
|
4
|
+
* Get the config for an extension module of Storm workspace from environment variables
|
|
5
|
+
*
|
|
6
|
+
* @param extensionName - The name of the extension module
|
|
7
|
+
* @returns The config for the specified Storm extension module. If the module does not exist, `undefined` is returned.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getExtensionEnv: <TConfig extends Record<string, any> = Record<string, any>>(extensionName: string) => TConfig | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Get the config for the current Storm workspace
|
|
12
|
+
*
|
|
13
|
+
* @returns The config for the current Storm workspace from environment variables
|
|
14
|
+
*/
|
|
15
|
+
export declare const getConfigEnv: () => DeepPartial<StormConfig>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { StormConfig } from "@storm-software/config";
|
|
2
|
+
/**
|
|
3
|
+
* Get the config for an extension module of Storm workspace from environment variables
|
|
4
|
+
*
|
|
5
|
+
* @param extensionName - The name of the extension module
|
|
6
|
+
* @returns The config for the specified Storm extension module. If the module does not exist, `undefined` is returned.
|
|
7
|
+
*/
|
|
8
|
+
export declare const setExtensionEnv: <TConfig extends Record<string, any> = Record<string, any>>(extensionName: string, extension: TConfig) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Get the config for the current Storm workspace
|
|
11
|
+
*
|
|
12
|
+
* @returns The config for the current Storm workspace from environment variables
|
|
13
|
+
*/
|
|
14
|
+
export declare const setConfigEnv: (config: StormConfig) => void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The config-tools library used by Storm Software for building TypeScript applications.
|
|
3
|
+
*
|
|
4
|
+
* @remarks
|
|
5
|
+
* A package containing various utilities to support custom workspace configurations
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
export * from "./config-file";
|
|
10
|
+
export * from "./create-storm-config";
|
|
11
|
+
export * from "./env";
|
|
12
|
+
export * from "./types";
|
|
13
|
+
export * from "./utilities";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { StormConfig } from "@storm-software/config";
|
|
2
|
+
export type LogLevel = 0 | 10 | 20 | 30 | 35 | 40 | 60 | 70 | 100;
|
|
3
|
+
export declare const LogLevel: {
|
|
4
|
+
readonly SILENT: LogLevel;
|
|
5
|
+
readonly FATAL: LogLevel;
|
|
6
|
+
readonly ERROR: LogLevel;
|
|
7
|
+
readonly WARN: LogLevel;
|
|
8
|
+
readonly SUCCESS: LogLevel;
|
|
9
|
+
readonly INFO: LogLevel;
|
|
10
|
+
readonly DEBUG: LogLevel;
|
|
11
|
+
readonly TRACE: LogLevel;
|
|
12
|
+
readonly ALL: LogLevel;
|
|
13
|
+
};
|
|
14
|
+
export type LogLevelLabel = "silent" | "fatal" | "error" | "warn" | "info" | "debug" | "trace" | "all";
|
|
15
|
+
export declare const LogLevelLabel: {
|
|
16
|
+
readonly SILENT: LogLevelLabel;
|
|
17
|
+
readonly FATAL: LogLevelLabel;
|
|
18
|
+
readonly ERROR: LogLevelLabel;
|
|
19
|
+
readonly WARN: LogLevelLabel;
|
|
20
|
+
readonly INFO: LogLevelLabel;
|
|
21
|
+
readonly DEBUG: LogLevelLabel;
|
|
22
|
+
readonly TRACE: LogLevelLabel;
|
|
23
|
+
readonly ALL: LogLevelLabel;
|
|
24
|
+
};
|
|
25
|
+
export interface BaseTokenizerOptions {
|
|
26
|
+
workspaceRoot?: string;
|
|
27
|
+
config?: StormConfig;
|
|
28
|
+
}
|
|
29
|
+
export interface ProjectTokenizerOptions extends BaseTokenizerOptions {
|
|
30
|
+
projectRoot?: string;
|
|
31
|
+
projectName?: string;
|
|
32
|
+
sourceRoot?: string;
|
|
33
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { BaseTokenizerOptions, ProjectTokenizerOptions } from "../../declarations";
|
|
2
|
+
export declare const applyWorkspaceBaseTokens: (option: string, tokenizerOptions: BaseTokenizerOptions) => Promise<string>;
|
|
3
|
+
export declare const applyWorkspaceProjectTokens: (option: string, tokenizerOptions: ProjectTokenizerOptions) => Promise<string>;
|
|
4
|
+
export declare const applyWorkspaceTokens: <TConfig extends BaseTokenizerOptions = BaseTokenizerOptions>(options: Record<string, any>, config: TConfig, tokenizerFn: (option: string, config: TConfig) => string | Promise<string>) => Promise<Record<string, any>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type GetChalkReturn = {
|
|
2
|
+
hex: (_: string) => (message?: string) => string | undefined;
|
|
3
|
+
bgHex: (_: string) => {
|
|
4
|
+
whiteBright: (message?: string) => string | undefined;
|
|
5
|
+
};
|
|
6
|
+
whiteBright: (message?: string) => string | undefined;
|
|
7
|
+
bold: {
|
|
8
|
+
hex: (_: string) => (message?: string) => string | undefined;
|
|
9
|
+
bgHex: (_: string) => {
|
|
10
|
+
whiteBright: (message?: string) => string | undefined;
|
|
11
|
+
};
|
|
12
|
+
whiteBright: (message?: string) => string | undefined;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Get the chalk instance
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Annoying polyfill to temporarily fix the issue with the `chalk` import
|
|
20
|
+
*
|
|
21
|
+
* @returns The chalk instance
|
|
22
|
+
*/
|
|
23
|
+
export declare const getChalk: () => GetChalkReturn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const correctPaths: (path?: string) => string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Find the monorepo root directory, searching upwards from `path`.
|
|
3
|
+
*
|
|
4
|
+
* @param pathInsideMonorepo - The path inside the monorepo to start searching from
|
|
5
|
+
* @returns The monorepo root directory
|
|
6
|
+
*/
|
|
7
|
+
export declare function findWorkspaceRootSafe(pathInsideMonorepo?: string): string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Find the monorepo root directory, searching upwards from `path`.
|
|
10
|
+
*
|
|
11
|
+
* @param pathInsideMonorepo - The path inside the monorepo to start searching from
|
|
12
|
+
* @returns The monorepo root directory
|
|
13
|
+
*/
|
|
14
|
+
export declare function findWorkspaceRoot(pathInsideMonorepo?: string): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type ColorConfig, type StormConfig } from "@storm-software/config";
|
|
2
|
+
/**
|
|
3
|
+
* Storm theme config values used for styling various workspace elements
|
|
4
|
+
*/
|
|
5
|
+
export declare const DEFAULT_COLOR_CONFIG: ColorConfig;
|
|
6
|
+
/**
|
|
7
|
+
* Storm Workspace config values used during various dev-ops processes
|
|
8
|
+
*/
|
|
9
|
+
export declare const DEFAULT_STORM_CONFIG: any;
|
|
10
|
+
/**
|
|
11
|
+
* Get the default Storm config values used during various dev-ops processes
|
|
12
|
+
*
|
|
13
|
+
* @returns The default Storm config values
|
|
14
|
+
*/
|
|
15
|
+
export declare const getDefaultConfig: (config?: Partial<StormConfig>, root?: string) => StormConfig;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LogLevel, LogLevelLabel } from "../types";
|
|
2
|
+
/**
|
|
3
|
+
* Convert the log level label to a log level
|
|
4
|
+
*
|
|
5
|
+
* @param label - The log level label to convert
|
|
6
|
+
* @returns The log level
|
|
7
|
+
*/
|
|
8
|
+
export declare const getLogLevel: (label?: string) => LogLevel;
|
|
9
|
+
/**
|
|
10
|
+
* Convert the log level to a log level label
|
|
11
|
+
*
|
|
12
|
+
* @param logLevel - The log level to convert
|
|
13
|
+
* @returns The log level label
|
|
14
|
+
*/
|
|
15
|
+
export declare const getLogLevelLabel: (logLevel?: number) => LogLevelLabel;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./find-workspace-root";
|
|
2
|
+
export * from "./get-default-config";
|
|
3
|
+
export * from "./get-log-level";
|
|
4
|
+
export * from "./logger";
|
|
5
|
+
export * from "./process-handler";
|
|
6
|
+
export * from "./run";
|
|
7
|
+
export * from "./correct-paths";
|
|
8
|
+
export * from "./file-path-utils";
|
|
9
|
+
export * from "./apply-workspace-tokens";
|
|
10
|
+
export * from "./chalk";
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { StormConfig } from "@storm-software/config";
|
|
2
|
+
import { LogLevel } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Get the log function for a log level
|
|
5
|
+
*
|
|
6
|
+
* @param logLevel - The log level
|
|
7
|
+
* @param config - The Storm configuration
|
|
8
|
+
* @returns The log function
|
|
9
|
+
*/
|
|
10
|
+
export declare const getLogFn: (logLevel?: number | LogLevel, config?: Partial<StormConfig>) => ((message?: any) => void);
|
|
11
|
+
/**
|
|
12
|
+
* Write a message to the console at the `fatal` log level
|
|
13
|
+
*
|
|
14
|
+
* @param message - The message to write
|
|
15
|
+
* @param config - The Storm configuration
|
|
16
|
+
*/
|
|
17
|
+
export declare const writeFatal: (message?: any, config?: Partial<StormConfig>) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Write a message to the console at the `error` log level
|
|
20
|
+
*
|
|
21
|
+
* @param message - The message to write
|
|
22
|
+
* @param config - The Storm configuration
|
|
23
|
+
*/
|
|
24
|
+
export declare const writeError: (message?: any, config?: Partial<StormConfig>) => void;
|
|
25
|
+
/**
|
|
26
|
+
* Write a message to the console at the `warning` log level
|
|
27
|
+
*
|
|
28
|
+
* @param message - The message to write
|
|
29
|
+
* @param config - The Storm configuration
|
|
30
|
+
*/
|
|
31
|
+
export declare const writeWarning: (message?: any, config?: Partial<StormConfig>) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Write a message to the console at the `info` log level
|
|
34
|
+
*
|
|
35
|
+
* @param message - The message to write
|
|
36
|
+
* @param config - The Storm configuration
|
|
37
|
+
*/
|
|
38
|
+
export declare const writeInfo: (message?: any, config?: Partial<StormConfig>) => void;
|
|
39
|
+
/**
|
|
40
|
+
* Write a message to the console at the `success` log level
|
|
41
|
+
*
|
|
42
|
+
* @param message - The message to write
|
|
43
|
+
* @param config - The Storm configuration
|
|
44
|
+
*/
|
|
45
|
+
export declare const writeSuccess: (message?: any, config?: Partial<StormConfig>) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Write a message to the console at the `debug` log level
|
|
48
|
+
*
|
|
49
|
+
* @param message - The message to write
|
|
50
|
+
* @param config - The Storm configuration
|
|
51
|
+
*/
|
|
52
|
+
export declare const writeDebug: (message?: any, config?: Partial<StormConfig>) => void;
|
|
53
|
+
/**
|
|
54
|
+
* Write a message to the console at the `trace` log level
|
|
55
|
+
*
|
|
56
|
+
* @param message - The message to write
|
|
57
|
+
* @param config - The Storm configuration
|
|
58
|
+
*/
|
|
59
|
+
export declare const writeTrace: (message?: any, config?: Partial<StormConfig>) => void;
|
|
60
|
+
/**
|
|
61
|
+
* Write a message to the console at the `all` log level
|
|
62
|
+
*
|
|
63
|
+
* @param message - The message to write
|
|
64
|
+
* @param config - The Storm configuration
|
|
65
|
+
*/
|
|
66
|
+
export declare const writeSystem: (message?: any, config?: Partial<StormConfig>) => void;
|
|
67
|
+
/**
|
|
68
|
+
* Get a stopwatch function
|
|
69
|
+
*
|
|
70
|
+
* @param name - The name of the process
|
|
71
|
+
* @returns The stopwatch function
|
|
72
|
+
*/
|
|
73
|
+
export declare const getStopwatch: (name: string) => () => void;
|
|
74
|
+
export declare const formatLogMessage: (message?: any, prefix?: string) => string;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { StormConfig } from "@storm-software/config";
|
|
2
|
+
export declare const exitWithError: (config?: Partial<StormConfig>) => never;
|
|
3
|
+
export declare const exitWithSuccess: (config?: Partial<StormConfig>) => never;
|
|
4
|
+
export declare const handleProcess: (config?: Partial<StormConfig>) => void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { StormConfig } from "@storm-software/config";
|
|
2
|
+
export declare const LARGE_BUFFER: number;
|
|
3
|
+
export type IOType = "overlapped" | "pipe" | "ignore" | "inherit";
|
|
4
|
+
export type StdioOptions = IOType | Array<IOType | "ipc" | number | null | undefined>;
|
|
5
|
+
/**
|
|
6
|
+
* Run a command line process
|
|
7
|
+
*
|
|
8
|
+
* @remarks
|
|
9
|
+
* A wrapper around execSync to run our command line processes
|
|
10
|
+
*
|
|
11
|
+
* @param config - The Storm configuration object
|
|
12
|
+
* @param command - The command to run
|
|
13
|
+
* @param cwd - The current working directory
|
|
14
|
+
* @param stdio - The standard input/output options
|
|
15
|
+
* @param env - The environment variables
|
|
16
|
+
* @returns The result of the command
|
|
17
|
+
*/
|
|
18
|
+
export declare const run: (config: StormConfig, command: string, cwd?: string, stdio?: StdioOptions, env?: NodeJS.ProcessEnv) => Buffer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./src";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ExecutorContext, PromiseExecutor } from "@nx/devkit";
|
|
2
|
+
import type { StormConfig } from "@storm-software/config";
|
|
3
|
+
import { HelmPackageExecutorSchema } from "./schema";
|
|
4
|
+
export declare function serveExecutor(options: HelmPackageExecutorSchema, context: ExecutorContext, config?: StormConfig): Promise<{
|
|
5
|
+
success: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
declare const _default: PromiseExecutor<HelmPackageExecutorSchema>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./helm-package/executor";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GeneratorCallback, Tree } from "@nx/devkit";
|
|
2
|
+
import type { HelmChartGeneratorSchema } from "./schema";
|
|
3
|
+
export declare function helmChartGenerator(tree: Tree, options: HelmChartGeneratorSchema): Promise<GeneratorCallback>;
|
|
4
|
+
export default helmChartGenerator;
|
|
5
|
+
export declare const helmChartSchematic: (generatorOptions: HelmChartGeneratorSchema) => (tree: any, context: any) => Promise<any>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GeneratorCallback, Tree } from "@nx/devkit";
|
|
2
|
+
import type { HelmDependencyGeneratorSchema } from "./schema";
|
|
3
|
+
export declare function helmDependencyGenerator(tree: Tree, options: HelmDependencyGeneratorSchema): Promise<GeneratorCallback>;
|
|
4
|
+
export default helmDependencyGenerator;
|
|
5
|
+
export declare const helmDependencySchematic: (generatorOptions: HelmDependencyGeneratorSchema) => (tree: any, context: any) => Promise<any>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Options } from 'prettier';
|
|
2
|
+
/** Types for the core library */
|
|
3
|
+
/** Interface for objects that can be initialized */
|
|
4
|
+
export interface Initializable {
|
|
5
|
+
initialized: boolean;
|
|
6
|
+
initialize(): Promise<void>;
|
|
7
|
+
}
|
|
8
|
+
/** Options for packaging a chart */
|
|
9
|
+
export interface PackageOptions {
|
|
10
|
+
chartFolder: string;
|
|
11
|
+
outputFolder: string;
|
|
12
|
+
}
|
|
13
|
+
/** Options for pushing a chart */
|
|
14
|
+
export interface PushOptions {
|
|
15
|
+
chartPath: string;
|
|
16
|
+
remote: string;
|
|
17
|
+
}
|
|
18
|
+
/** Abstract class for Helm */
|
|
19
|
+
export declare abstract class AbstractHelmClient implements Initializable {
|
|
20
|
+
initialized: boolean;
|
|
21
|
+
abstract package(options: PackageOptions): Promise<string | undefined>;
|
|
22
|
+
initialize(): Promise<void>;
|
|
23
|
+
}
|
|
24
|
+
/** Represents an Prettier ignore file. */
|
|
25
|
+
export interface PrettierConfig {
|
|
26
|
+
sourceFilepath: string;
|
|
27
|
+
config: Options;
|
|
28
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { AbstractHelmClient, PackageOptions, PushOptions } from "../types";
|
|
2
|
+
/** Helm wrapper class */
|
|
3
|
+
export declare class HelmClient extends AbstractHelmClient {
|
|
4
|
+
/**
|
|
5
|
+
* Package a chart directory into a chart archive
|
|
6
|
+
*
|
|
7
|
+
* @param {PackageOptions} [options]
|
|
8
|
+
*/
|
|
9
|
+
package(options: PackageOptions): Promise<string | undefined>;
|
|
10
|
+
push(options: PushOptions): Promise<void>;
|
|
11
|
+
dependencyUpdate(chartFolder: string): Promise<void>;
|
|
12
|
+
dependencyBuild(chartFolder: string): Promise<void>;
|
|
13
|
+
addRepository(name: string, url: string): Promise<void>;
|
|
14
|
+
/**
|
|
15
|
+
* Initialize Helm
|
|
16
|
+
*
|
|
17
|
+
* @returns {Promise<void>}
|
|
18
|
+
*/
|
|
19
|
+
initialize(): Promise<void>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Create a new Helm client instance
|
|
23
|
+
*
|
|
24
|
+
* @returns {HelmClient}
|
|
25
|
+
*/
|
|
26
|
+
export declare const createHelmClient: () => HelmClient;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decorator to ensure the class is initialized before executing a method
|
|
3
|
+
*
|
|
4
|
+
* @param {any} target
|
|
5
|
+
* @param {string} propertyKey
|
|
6
|
+
* @param {PropertyDescriptor} descriptor
|
|
7
|
+
* @returns {PropertyDescriptor}
|
|
8
|
+
*/
|
|
9
|
+
export declare const ensureInitialized: (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Tree } from "@nx/devkit";
|
|
2
|
+
import { PrettierConfig } from "../types";
|
|
3
|
+
/**
|
|
4
|
+
* Resolves the existing Prettier configuration.
|
|
5
|
+
*
|
|
6
|
+
* @returns The Prettier configuration or undefined if not found.
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveUserExistingPrettierConfig(): Promise<PrettierConfig | undefined>;
|
|
9
|
+
export declare function addToPrettierIgnore(tree: Tree, ignore: string[]): void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export * from "./src/base";
|
|
2
|
+
export * from "./src/executors/cargo-publish/executor";
|
|
3
|
+
export * from "./src/executors/cargo-publish/schema";
|
|
4
|
+
export * from "./src/executors/clean-package/executor";
|
|
5
|
+
export * from "./src/executors/clean-package/schema";
|
|
6
|
+
export * from "./src/executors/npm-publish/executor";
|
|
7
|
+
export * from "./src/executors/npm-publish/schema";
|
|
8
|
+
export * from "./src/executors/rolldown/executor";
|
|
9
|
+
export * from "./src/executors/rolldown/schema";
|
|
10
|
+
export * from "./src/executors/size-limit/executor";
|
|
11
|
+
export * from "./src/executors/size-limit/schema";
|
|
12
|
+
export * from "./src/executors/tsup-browser/executor";
|
|
13
|
+
export * from "./src/executors/tsup-browser/schema";
|
|
14
|
+
export * from "./src/executors/tsup-neutral/executor";
|
|
15
|
+
export * from "./src/executors/tsup-neutral/schema";
|
|
16
|
+
export * from "./src/executors/tsup-node/executor";
|
|
17
|
+
export * from "./src/executors/tsup-node/schema";
|
|
18
|
+
export * from "./src/executors/typia/executor";
|
|
19
|
+
export * from "./src/executors/typia/schema";
|
|
20
|
+
export * from "./src/executors/unbuild/executor";
|
|
21
|
+
export * from "./src/executors/unbuild/schema";
|
|
22
|
+
export * from "./src/generators/config-schema/generator";
|
|
23
|
+
export * from "./src/generators/config-schema/schema";
|
|
24
|
+
export * from "./src/generators/init/init";
|
|
25
|
+
export * from "./src/generators/init/schema";
|
|
26
|
+
export * from "./src/generators/node-library/generator";
|
|
27
|
+
export * from "./src/generators/node-library/schema";
|
|
28
|
+
export * from "./src/generators/preset/generator";
|
|
29
|
+
export * from "./src/generators/preset/schema";
|
|
30
|
+
export * from "./src/generators/release-version/generator";
|
|
31
|
+
export * from "./src/generators/release-version/schema";
|
|
32
|
+
export * from "./src/utils";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ExecutorContext, PromiseExecutor } from "@nx/devkit";
|
|
2
|
+
import type { StormConfig } from "@storm-software/config";
|
|
3
|
+
import type { BaseExecutorOptions as _BaseExecutorOptions, BaseExecutorResult as _BaseExecutorResult, BaseExecutorSchema as _BaseExecutorSchema } from "../../declarations";
|
|
4
|
+
export type BaseExecutorOptions<TExecutorSchema extends BaseExecutorSchema = BaseExecutorSchema> = _BaseExecutorOptions<TExecutorSchema>;
|
|
5
|
+
export type BaseExecutorResult = _BaseExecutorResult;
|
|
6
|
+
export type BaseExecutorSchema = _BaseExecutorSchema;
|
|
7
|
+
export declare const withRunExecutor: <TExecutorSchema extends BaseExecutorSchema = _BaseExecutorSchema>(name: string, executorFn: (options: TExecutorSchema, context: ExecutorContext, config: StormConfig) => Promise<BaseExecutorResult | null | undefined> | AsyncGenerator<any, BaseExecutorResult | null | undefined> | BaseExecutorResult | null | undefined, executorOptions?: BaseExecutorOptions<TExecutorSchema>) => PromiseExecutor<TExecutorSchema>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GeneratorCallback, Tree } from "@nx/devkit";
|
|
2
|
+
import type { StormConfig } from "@storm-software/config";
|
|
3
|
+
import type { BaseGeneratorOptions, BaseGeneratorResult, BaseGeneratorSchema } from "../../declarations";
|
|
4
|
+
export declare const withRunGenerator: <TGeneratorSchema extends BaseGeneratorSchema = any>(name: string, generatorFn: (tree: Tree, options: TGeneratorSchema, config?: StormConfig) => Promise<BaseGeneratorResult | null | undefined> | BaseGeneratorResult | null | undefined, generatorOptions?: BaseGeneratorOptions<TGeneratorSchema>) => (tree: Tree, _options: TGeneratorSchema) => Promise<GeneratorCallback | BaseGeneratorResult>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type GeneratorCallback, type Tree } from "@nx/devkit";
|
|
2
|
+
import type { AddLintOptions } from "@nx/js/src/generators/library/library";
|
|
3
|
+
import type { TypeScriptLibraryGeneratorNormalizedSchema, TypeScriptLibraryGeneratorSchema } from "../../declarations.d";
|
|
4
|
+
export declare function typeScriptLibraryGeneratorFn(tree: Tree, schema: TypeScriptLibraryGeneratorSchema): Promise<null>;
|
|
5
|
+
export declare function addLint(tree: Tree, options: AddLintOptions): Promise<GeneratorCallback>;
|
|
6
|
+
export declare function getOutputPath(options: TypeScriptLibraryGeneratorNormalizedSchema): string;
|
|
7
|
+
export declare function createProjectTsConfigJson(tree: Tree, options: TypeScriptLibraryGeneratorNormalizedSchema): void;
|
|
8
|
+
export declare function normalizeOptions(tree: Tree, options: TypeScriptLibraryGeneratorSchema): Promise<TypeScriptLibraryGeneratorNormalizedSchema>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ExecutorContext } from "@nx/devkit";
|
|
2
|
+
import type { CargoPublishExecutorSchema } from "./schema.d";
|
|
3
|
+
export default function runExecutor(options: CargoPublishExecutorSchema, context: ExecutorContext): Promise<{
|
|
4
|
+
success: boolean;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const getRegistryVersion: (name: string, version: string, registry: string) => Promise<string>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ExecutorContext } from "@nx/devkit";
|
|
2
|
+
import type { StormConfig } from "@storm-software/config";
|
|
3
|
+
import { CleanPackageExecutorSchema } from "./schema";
|
|
4
|
+
export declare function cleanPackageExecutorFn(options: CleanPackageExecutorSchema, context: ExecutorContext, config: StormConfig): Promise<{
|
|
5
|
+
success: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
declare const _default: import("@nx/devkit").PromiseExecutor<CleanPackageExecutorSchema>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function isObject(object: any): boolean;
|
|
2
|
+
export declare function filterObjectByKey(object: Record<string, any>, filterByKey?: (key?: string) => boolean, deep?: boolean): {};
|
|
3
|
+
export declare function createIgnoreMatcher(ignorePattern?: string | RegExp): (_filename: any, path: any) => boolean;
|
|
4
|
+
export declare function createFilesFilter(ignoreFiles: string | undefined, cwd: string): Promise<(path: any) => boolean | void | undefined>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ExecutorContext } from "@nx/devkit";
|
|
2
|
+
import type { NpmPublishExecutorSchema } from "./schema.d";
|
|
3
|
+
export declare const LARGE_BUFFER: number;
|
|
4
|
+
export default function npmPublishExecutorFn(options: NpmPublishExecutorSchema, context: ExecutorContext): Promise<{
|
|
5
|
+
success: boolean;
|
|
6
|
+
}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ExecutorContext } from "@nx/devkit";
|
|
2
|
+
import type { RolldownOptions } from "@storm-software/build-tools";
|
|
3
|
+
import type { StormConfig } from "@storm-software/config";
|
|
4
|
+
import type { RolldownExecutorSchema } from "./schema.d";
|
|
5
|
+
export declare function rolldownExecutorFn(options: RolldownExecutorSchema, context: ExecutorContext, config?: StormConfig): Promise<{
|
|
6
|
+
success: boolean;
|
|
7
|
+
}>;
|
|
8
|
+
declare const _default: import("@nx/devkit").PromiseExecutor<RolldownOptions>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ExecutorContext } from "@nx/devkit";
|
|
2
|
+
import type { StormConfig } from "@storm-software/config";
|
|
3
|
+
import type { SizeLimitExecutorSchema } from "./schema";
|
|
4
|
+
export declare function sizeLimitExecutorFn(options: SizeLimitExecutorSchema, context: ExecutorContext, config?: StormConfig): Promise<{
|
|
5
|
+
success: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
declare const _default: import("@nx/devkit").PromiseExecutor<SizeLimitExecutorSchema>;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ExecutorContext } from "@nx/devkit";
|
|
2
|
+
import type { StormConfig } from "@storm-software/config";
|
|
3
|
+
import type { TsupExecutorSchema } from "./schema.d";
|
|
4
|
+
export declare function tsupExecutorFn(options: TsupExecutorSchema, context: ExecutorContext, config: StormConfig): Promise<{
|
|
5
|
+
success: boolean;
|
|
6
|
+
}>;
|
|
7
|
+
declare const _default: import("@nx/devkit").PromiseExecutor<TsupExecutorSchema>;
|
|
8
|
+
export default _default;
|