@nizza/devkit 0.1.0-alpha.9 → 0.1.0-beta.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.
Files changed (118) hide show
  1. package/dist/cjs/executors/update-executors-file/index.cjs +2 -2
  2. package/dist/cjs/index.cjs +7 -7
  3. package/dist/cjs/node_modules/.pnpm/@vitejs_plugin-basic-ssl@1.0.2_vite@5.0.4/node_modules/@vitejs/plugin-basic-ssl/dist/chunks/certificate.cjs +19578 -0
  4. package/dist/cjs/node_modules/.pnpm/@vitejs_plugin-basic-ssl@1.0.2_vite@5.0.4/node_modules/@vitejs/plugin-basic-ssl/dist/index.cjs +40 -0
  5. package/dist/cjs/shared/utils.cjs +2 -2
  6. package/dist/cjs/{vite → vitejs}/config-builder/configs/base.cjs +3 -3
  7. package/dist/cjs/{vite → vitejs}/config-builder/configs/lib.cjs +2 -1
  8. package/dist/cjs/{vite → vitejs}/config-builder/plugins.cjs +16 -3
  9. package/dist/cjs/{vite → vitejs}/config-builder/shared/types.cjs +1 -0
  10. package/dist/cjs/{vite → vitejs}/config-builder/shared/utils/helpers.cjs +2 -2
  11. package/dist/cjs/{vite → vitejs}/plugins/third-party-css-inject/utils.cjs +1 -3
  12. package/dist/esm/executors/update-executors-file/index.mjs +2 -2
  13. package/dist/esm/index.mjs +7 -7
  14. package/dist/esm/node_modules/.pnpm/@vitejs_plugin-basic-ssl@1.0.2_vite@5.0.4/node_modules/@vitejs/plugin-basic-ssl/dist/chunks/certificate.mjs +19576 -0
  15. package/dist/esm/node_modules/.pnpm/@vitejs_plugin-basic-ssl@1.0.2_vite@5.0.4/node_modules/@vitejs/plugin-basic-ssl/dist/index.mjs +35 -0
  16. package/dist/esm/{vite → vitejs}/config-builder/configs/base.mjs +4 -4
  17. package/dist/esm/{vite → vitejs}/config-builder/configs/lib.mjs +2 -1
  18. package/dist/esm/{vite → vitejs}/config-builder/plugins.mjs +16 -4
  19. package/dist/esm/{vite → vitejs}/config-builder/shared/types.mjs +1 -0
  20. package/dist/esm/{vite → vitejs}/config-builder/shared/utils/helpers.mjs +2 -2
  21. package/dist/esm/{vite → vitejs}/plugins/third-party-css-inject/utils.mjs +1 -3
  22. package/dist/index.d.ts +367 -0
  23. package/package.json +4 -6
  24. package/dist/cjs/executors/deploy/helpers.d.cts +0 -4
  25. package/dist/cjs/executors/deploy/index.d.cts +0 -11
  26. package/dist/cjs/executors/environments/helpers.d.cts +0 -25
  27. package/dist/cjs/executors/environments/index.d.cts +0 -16
  28. package/dist/cjs/executors/publish/helpers.d.cts +0 -19
  29. package/dist/cjs/executors/publish/index.d.cts +0 -12
  30. package/dist/cjs/executors/shared/utils.d.cts +0 -27
  31. package/dist/cjs/executors/update-executors-file/helpers.d.cts +0 -17
  32. package/dist/cjs/executors/update-executors-file/index.d.cts +0 -12
  33. package/dist/cjs/executors/vtex-link/constants.d.cts +0 -4
  34. package/dist/cjs/executors/vtex-link/helpers.d.cts +0 -77
  35. package/dist/cjs/executors/vtex-link/index.d.cts +0 -5
  36. package/dist/cjs/index-0ce2daf7.d.ts +0 -2
  37. package/dist/cjs/index-17143e35.d.ts +0 -2
  38. package/dist/cjs/index-3080371d.d.ts +0 -3
  39. package/dist/cjs/index-f6330edc.d.ts +0 -2
  40. package/dist/cjs/index.d.cts +0 -9
  41. package/dist/cjs/index.d.cts.map +0 -1
  42. package/dist/cjs/scripts/changeset-pre-mode.d.cts +0 -2
  43. package/dist/cjs/scripts/index.d.cts +0 -1
  44. package/dist/cjs/shared/logger.d.cts +0 -33
  45. package/dist/cjs/shared/utils.d.cts +0 -18
  46. package/dist/cjs/types-1282e639.d.ts +0 -12
  47. package/dist/cjs/types-7377dcc9.d.ts +0 -4
  48. package/dist/cjs/types-763439e4.d.ts +0 -14
  49. package/dist/cjs/vite/config-builder/configs/app.d.cts +0 -4
  50. package/dist/cjs/vite/config-builder/configs/base.d.cts +0 -4
  51. package/dist/cjs/vite/config-builder/configs/index.d.cts +0 -7
  52. package/dist/cjs/vite/config-builder/configs/lib.d.cts +0 -4
  53. package/dist/cjs/vite/config-builder/configs/script.d.cts +0 -4
  54. package/dist/cjs/vite/config-builder/main.d.cts +0 -10
  55. package/dist/cjs/vite/config-builder/plugins.d.cts +0 -30
  56. package/dist/cjs/vite/config-builder/shared/types.d.cts +0 -155
  57. package/dist/cjs/vite/config-builder/shared/utils/helpers.d.cts +0 -71
  58. package/dist/cjs/vite/config-builder/shared/utils/projectConfig.d.cts +0 -60
  59. package/dist/cjs/vite/config-builder/shared/utils/viteCommand.d.cts +0 -24
  60. package/dist/cjs/vite/plugins/shadow-dom-inject-css/index.d.cts +0 -7
  61. package/dist/cjs/vite/plugins/third-party-css-inject/main.d.cts +0 -17
  62. package/dist/cjs/vite/plugins/third-party-css-inject/utils.d.cts +0 -5
  63. package/dist/esm/executors/deploy/helpers.d.mts +0 -4
  64. package/dist/esm/executors/deploy/index.d.mts +0 -11
  65. package/dist/esm/executors/environments/helpers.d.mts +0 -25
  66. package/dist/esm/executors/environments/index.d.mts +0 -16
  67. package/dist/esm/executors/publish/helpers.d.mts +0 -19
  68. package/dist/esm/executors/publish/index.d.mts +0 -12
  69. package/dist/esm/executors/shared/utils.d.mts +0 -27
  70. package/dist/esm/executors/update-executors-file/helpers.d.mts +0 -17
  71. package/dist/esm/executors/update-executors-file/index.d.mts +0 -12
  72. package/dist/esm/executors/vtex-link/constants.d.mts +0 -4
  73. package/dist/esm/executors/vtex-link/helpers.d.mts +0 -77
  74. package/dist/esm/executors/vtex-link/index.d.mts +0 -5
  75. package/dist/esm/index-0ce2daf7.d.ts +0 -2
  76. package/dist/esm/index-17143e35.d.ts +0 -2
  77. package/dist/esm/index-3080371d.d.ts +0 -3
  78. package/dist/esm/index-f6330edc.d.ts +0 -2
  79. package/dist/esm/index.d.mts +0 -9
  80. package/dist/esm/index.d.mts.map +0 -1
  81. package/dist/esm/scripts/changeset-pre-mode.d.mts +0 -2
  82. package/dist/esm/scripts/index.d.mts +0 -1
  83. package/dist/esm/shared/logger.d.mts +0 -33
  84. package/dist/esm/shared/utils.d.mts +0 -18
  85. package/dist/esm/types-1282e639.d.ts +0 -12
  86. package/dist/esm/types-7377dcc9.d.ts +0 -4
  87. package/dist/esm/types-763439e4.d.ts +0 -14
  88. package/dist/esm/vite/config-builder/configs/app.d.mts +0 -4
  89. package/dist/esm/vite/config-builder/configs/base.d.mts +0 -4
  90. package/dist/esm/vite/config-builder/configs/index.d.mts +0 -7
  91. package/dist/esm/vite/config-builder/configs/lib.d.mts +0 -4
  92. package/dist/esm/vite/config-builder/configs/script.d.mts +0 -4
  93. package/dist/esm/vite/config-builder/main.d.mts +0 -10
  94. package/dist/esm/vite/config-builder/plugins.d.mts +0 -30
  95. package/dist/esm/vite/config-builder/shared/types.d.mts +0 -155
  96. package/dist/esm/vite/config-builder/shared/utils/helpers.d.mts +0 -71
  97. package/dist/esm/vite/config-builder/shared/utils/projectConfig.d.mts +0 -60
  98. package/dist/esm/vite/config-builder/shared/utils/viteCommand.d.mts +0 -24
  99. package/dist/esm/vite/plugins/shadow-dom-inject-css/index.d.mts +0 -7
  100. package/dist/esm/vite/plugins/third-party-css-inject/main.d.mts +0 -17
  101. package/dist/esm/vite/plugins/third-party-css-inject/utils.d.mts +0 -5
  102. package/dist/executors.json +0 -29
  103. /package/dist/cjs/{vite → vitejs}/config-builder/configs/app.cjs +0 -0
  104. /package/dist/cjs/{vite → vitejs}/config-builder/configs/index.cjs +0 -0
  105. /package/dist/cjs/{vite → vitejs}/config-builder/configs/script.cjs +0 -0
  106. /package/dist/cjs/{vite → vitejs}/config-builder/main.cjs +0 -0
  107. /package/dist/cjs/{vite → vitejs}/config-builder/shared/utils/projectConfig.cjs +0 -0
  108. /package/dist/cjs/{vite → vitejs}/config-builder/shared/utils/viteCommand.cjs +0 -0
  109. /package/dist/cjs/{vite → vitejs}/plugins/shadow-dom-inject-css/index.cjs +0 -0
  110. /package/dist/cjs/{vite → vitejs}/plugins/third-party-css-inject/main.cjs +0 -0
  111. /package/dist/esm/{vite → vitejs}/config-builder/configs/app.mjs +0 -0
  112. /package/dist/esm/{vite → vitejs}/config-builder/configs/index.mjs +0 -0
  113. /package/dist/esm/{vite → vitejs}/config-builder/configs/script.mjs +0 -0
  114. /package/dist/esm/{vite → vitejs}/config-builder/main.mjs +0 -0
  115. /package/dist/esm/{vite → vitejs}/config-builder/shared/utils/projectConfig.mjs +0 -0
  116. /package/dist/esm/{vite → vitejs}/config-builder/shared/utils/viteCommand.mjs +0 -0
  117. /package/dist/esm/{vite → vitejs}/plugins/shadow-dom-inject-css/index.mjs +0 -0
  118. /package/dist/esm/{vite → vitejs}/plugins/third-party-css-inject/main.mjs +0 -0
@@ -1,24 +0,0 @@
1
- import { ViteMode, ViteCommand } from "../types.js";
2
- /**
3
- * Retrieves the Vite command details.
4
- *
5
- * @param {ViteMode} mode - The Vite mode.
6
- * @returns {ViteCommand} - The command details.
7
- *
8
- * @example
9
- * const command = getViteCommand(ViteMode.PROD);
10
- * // Outputs: { stage: Stage.PROD, target: 'build', flags: {} }
11
- */
12
- declare function getViteCommand(mode: ViteMode): ViteCommand;
13
- /**
14
- * Parses the command string to extract flags.
15
- *
16
- * @param {string | undefined} commandString - The command string.
17
- * @returns {Record<string, string>} - The flags extracted from the command string.
18
- *
19
- * @example
20
- * const flags = getViteCmdFlags('nx run core:build --source-maps');
21
- * // Outputs: { 'source-maps: 'true' }
22
- */
23
- declare function getViteCmdFlags(commandString: string | undefined): Record<string, string>;
24
- export { getViteCommand, getViteCmdFlags };
@@ -1,7 +0,0 @@
1
- import { ViteDevServer } from 'vite';
2
- declare function injectCssIntoShadowDom(): {
3
- name: string;
4
- configureServer(_server: ViteDevServer): void;
5
- transform(src: string, id: string): void;
6
- };
7
- export { injectCssIntoShadowDom };
@@ -1,17 +0,0 @@
1
- import { Plugin } from 'vite';
2
- interface Execute {
3
- function: (data?: string) => void;
4
- listen: string;
5
- observer: string;
6
- }
7
- interface ThirdPartyCssInjectPlugin {
8
- topExecutionPriority?: boolean;
9
- execute?: Execute[];
10
- }
11
- /**
12
- * Inject the CSS compiled with JS.
13
- *
14
- * @return {Plugin}
15
- */
16
- declare function thirdPartyCssInjectPlugin({ topExecutionPriority, execute }?: ThirdPartyCssInjectPlugin | undefined): Plugin;
17
- export { Execute, ThirdPartyCssInjectPlugin, thirdPartyCssInjectPlugin };
@@ -1,5 +0,0 @@
1
- import { OutputChunk } from 'rollup';
2
- import { Execute } from "../../../index-3080371d.js";
3
- declare function buildCSSInjectionCode(execute?: Execute[]): Promise<OutputChunk | null | any>;
4
- declare function removeLinkStyleSheets(html: string, cssFileName: string): string;
5
- export { buildCSSInjectionCode, removeLinkStyleSheets };
@@ -1,4 +0,0 @@
1
- declare function cleanS3Bucket(s3BucketPath: string): Promise<void>;
2
- declare function copyAssetsToS3(s3BucketPath: string, projectRoot: string): Promise<void>;
3
- declare function createCloudFrontInvalidation(distributionId: string, invalidationPaths: string[]): Promise<void>;
4
- export { cleanS3Bucket, copyAssetsToS3, createCloudFrontInvalidation };
@@ -1,11 +0,0 @@
1
- import { ExecutorContext } from '@nx/devkit';
2
- import { ExecutorResponse } from "../../index-f6330edc.js";
3
- interface ExecutorOptions {
4
- s3BucketPath: string;
5
- cloudFrontDistributionId: string;
6
- cloudFrontInvalidationPaths: string[];
7
- buildTarget: string;
8
- skipBuild?: boolean;
9
- }
10
- declare function deployExecutor(opts: ExecutorOptions, ctx: ExecutorContext): Promise<ExecutorResponse>;
11
- export { ExecutorOptions, deployExecutor as default };
@@ -1,25 +0,0 @@
1
- interface CreateEnvironmentData {
2
- projectOrg: string;
3
- coreEnvFile: string;
4
- }
5
- /**
6
- * Creates the content for an environment file based on the core environment path.
7
- *
8
- * @param {CreateEnvironmentData} data - Values to replace in template.
9
- * @returns {string} The content of the environment file.
10
- */
11
- declare function createEnvironmentFileContent({ coreEnvFile, projectOrg, }: CreateEnvironmentData): Promise<string>;
12
- /**
13
- * Ensures that the given directory exists, creating it if it does not.
14
- *
15
- * @param {string} dir - The path to the directory to check/create.
16
- */
17
- declare function ensureDirectoryExists(dir: string): Promise<void>;
18
- /**
19
- * Writes environment files to the given base path if they do not already exist.
20
- *
21
- * @param {string} basePath - The base directory where the files should be written.
22
- * @param {Record<string, string>} files - An object containing filenames and their respective content.
23
- */
24
- declare function writeFilesIfNotExist(basePath: string, files: Record<string, string>): Promise<void>;
25
- export { createEnvironmentFileContent, ensureDirectoryExists, writeFilesIfNotExist };
@@ -1,16 +0,0 @@
1
- import { ExecutorContext } from '@nx/devkit';
2
- import { ExecutorResponse } from "../../index-f6330edc.js";
3
- interface ExecutorOptions {
4
- }
5
- /**
6
- * The executor function to create environment files.
7
- * Ensures that the directory for the environment files exists and creates the files
8
- * if they do not exist already. Files created are 'environment.ts', 'environment.prod.ts',
9
- * and 'environment.staging.ts'.
10
- *
11
- * @param {ExecutorOptions} _opts - Executor options, currently not used but provided for future extensibility.
12
- * @param {ExecutorContext} ctx - The executor context, providing access to the project configuration.
13
- * @returns {Promise<ExecutorResponse>} The result object with a success or error status.
14
- */
15
- declare function runExecutor(_opts: ExecutorOptions, ctx: ExecutorContext): Promise<ExecutorResponse>;
16
- export { ExecutorOptions, runExecutor as default };
@@ -1,19 +0,0 @@
1
- /**
2
- * Retrieves the version of a published package with a given name and tag.
3
- *
4
- * @param {string} packageName The name of the package to retrieve the version for.
5
- * @param {string} tag The tag to retrieve the version for.
6
- * @returns The version of the package as a string or an object containing versions for each tag.
7
- */
8
- declare function getPublishedPackageVersion(packageName: string, tag?: string): Promise<any>;
9
- /**
10
- * Checks if a package with the given name is already published and returns its version.
11
- *
12
- * @param {string} packageName The name of the package to check for.
13
- * @returns An object containing the published versions of the package and a flag indicating if it is the first version.
14
- */
15
- declare function checkPublishedVersion(packageName: string): Promise<{
16
- publishedVersion: any;
17
- isFirstVersion: boolean;
18
- }>;
19
- export { getPublishedPackageVersion, checkPublishedVersion };
@@ -1,12 +0,0 @@
1
- import { ExecutorContext } from '@nx/devkit';
2
- import { ExecutorResponse } from "../../index-f6330edc.js";
3
- interface ExecutorOptions {
4
- tag: string;
5
- dryRun?: boolean;
6
- }
7
- /**
8
- * This is a minimal script to publish package to "npm".
9
- * Need to authenticate with NPM before running this script.
10
- */
11
- declare function runExecutor(opts: ExecutorOptions, ctx: ExecutorContext): Promise<ExecutorResponse>;
12
- export { ExecutorOptions, runExecutor as default };
@@ -1,27 +0,0 @@
1
- import { ExecutorContext, ProjectConfiguration } from '@nx/devkit';
2
- import { ExecutorResponse } from "../../types-7377dcc9.js";
3
- /**
4
- * Indicates a successful executor operation.
5
- *
6
- * @param {string} message - Optional message to log for the success case.
7
- * @returns {ExecutorResponse} - An object representing a successful operation.
8
- */
9
- declare function ok(message?: string): ExecutorResponse;
10
- /**
11
- * Indicates a failed executor operation.
12
- *
13
- * @param {string | Error | unknown} err - An optional error object or message indicating the nature of the failure.
14
- * @param {string} message - An optional message to log for the error case. If not provided, a default error message is logged.
15
- * @returns {ExecutorResponse} - An object representing a failed operation.
16
- */
17
- declare function err(err?: string | Error | unknown, message?: string): ExecutorResponse;
18
- /**
19
- * Retrieves the project configuration for the current execution context.
20
- *
21
- * @param {ExecutorContext} ctx - The execution context containing project information.
22
- * @returns {ProjectConfiguration} - The configuration object for the current project.
23
- * @throws {Error} If the project configuration is invalid or not found.
24
- */
25
- declare function getProjectConfig(ctx: ExecutorContext): ProjectConfiguration;
26
- declare function runCommand(command: string, cwd?: string | URL): Promise<void>;
27
- export { ok, err, getProjectConfig, runCommand };
@@ -1,17 +0,0 @@
1
- import { Executors } from "../../types-763439e4.js";
2
- declare const transformPathToRoot: (path: string) => string;
3
- declare const transformPathToDist: (path: string) => string;
4
- /**
5
- * Updates the executor paths for the provided executors object.
6
- * @param {Executors} executors - The executors object from executors.json.
7
- * @param {boolean} toDist - Flag to determine if './dist' should be removed from paths.
8
- * @returns - The updated executors object with transformed paths.
9
- */
10
- declare const updateExecutorPaths: (executors: Executors, toDist: boolean) => Executors;
11
- /**
12
- * Writes a JSON file asynchronously.
13
- * @param {string} path - The file path where to write the JSON data.
14
- * @param {any} data - The data to be written to the file.
15
- */
16
- declare const writeJsonFileAsync: (path: string, data: any) => Promise<void>;
17
- export { transformPathToRoot, transformPathToDist, updateExecutorPaths, writeJsonFileAsync };
@@ -1,12 +0,0 @@
1
- import { ExecutorContext } from '@nx/devkit';
2
- import { ExecutorResponse } from "../../index-f6330edc.js";
3
- import { ExecutorOptions } from "../../types-763439e4.js";
4
- /**
5
- * Executor function to update paths in the executors.json file.
6
- *
7
- * @param {ExecutorOptions} _opts - Executor options, currently not used but provided for future extensibility.
8
- * @param {ExecutorContext} ctx - The executor context, providing access to the project configuration.
9
- * @returns {Promise<ExecutorResponse>} The result object with a success or error status.
10
- */
11
- declare function runExecutor(_opts: ExecutorOptions, ctx: ExecutorContext): Promise<ExecutorResponse>;
12
- export { runExecutor as default };
@@ -1,4 +0,0 @@
1
- declare const VTEX_PROJECT_PATH: string | undefined;
2
- declare const ERROR_LINKING_FLAG = "[31merror\u001B[39m: App build failed";
3
- declare const SUCCESS_LINKING_FLAG = "[32minfo\u001B[39m: App running";
4
- export { VTEX_PROJECT_PATH, ERROR_LINKING_FLAG, SUCCESS_LINKING_FLAG };
@@ -1,77 +0,0 @@
1
- import { SharedContext } from "../../types-1282e639.js";
2
- /**
3
- * Links the local package to the VTEX environment.
4
- *
5
- * @param {SharedContext} ctx - The shared context containing paths and configurations.
6
- * @returns {Promise<void>} A promise that resolves when the package is linked or rejects on error.
7
- */
8
- declare function vtexLink(ctx: SharedContext): Promise<void>;
9
- /**
10
- * Updates the package.json file within the VTEX project to use the local version of the package.
11
- *
12
- * @param {SharedContext} ctx - The shared context containing paths and configurations.
13
- * @param {string} packageName - The name of the package to link.
14
- * @returns {Promise<void>} A promise that resolves when the package.json is updated.
15
- */
16
- declare function changePackageJsonFromVtexProject(ctx: SharedContext, packageName: string): Promise<void>;
17
- /**
18
- * Restores the original package.json from the backup created before modifications.
19
- *
20
- * @param {SharedContext} ctx - The shared context containing paths and configurations.
21
- * @returns {Promise<void>} A promise that resolves when the package.json is restored.
22
- */
23
- declare function restorePackageJsonFromVtexProject(ctx: SharedContext): Promise<void>;
24
- /**
25
- * Renames the generated package file with a unique identifier.
26
- *
27
- * @param {SharedContext} ctx - The shared context containing paths and configurations.
28
- * @returns {Promise<string>} A promise that resolves with the new name of the package.
29
- */
30
- declare function renamePackage(ctx: SharedContext): Promise<string>;
31
- /**
32
- * Creates a pnpm package for uploading to VTEX.
33
- *
34
- * @param {SharedContext} ctx - The shared context containing paths and configurations.
35
- * @returns {Promise<string>} A promise that resolves with the name of the created package.
36
- */
37
- declare function createPackage(ctx: SharedContext): Promise<string>;
38
- /**
39
- * Searches for and lists all outdated packages in the VTEX project directory.
40
- *
41
- * @param {SharedContext} ctx - The shared context containing paths and configurations.
42
- * @returns {Promise<string[]>} A promise that resolves with a list of deprecated package names.
43
- */
44
- declare function findLastPackages(ctx: SharedContext): Promise<string[]>;
45
- /**
46
- * Removes all outdated packages in the VTEX project directory.
47
- *
48
- * @param {SharedContext} ctx - The shared context containing paths and configurations.
49
- * @returns {Promise<void>} A promise that resolves when the old packages are removed.
50
- */
51
- declare function removeOldPackages(ctx: SharedContext): Promise<void>;
52
- /**
53
- * Moves a package to the VTEX project directory.
54
- *
55
- * @param {SharedContext} ctx - The shared context containing paths and configurations.
56
- * @param {string} packageName - The name of the package to move.
57
- * @returns {Promise<void>} A promise that resolves when the package is moved successfully.
58
- */
59
- declare function movePackage(ctx: SharedContext, packageName: string): Promise<void>;
60
- /**
61
- * Builds the package, moves it to the VTEX project, and updates the project's package.json.
62
- *
63
- * @param {SharedContext} ctx - The shared context containing paths and configurations.
64
- * @returns {Promise<void>} A promise that resolves when the build is complete.
65
- */
66
- declare function buildPackage(ctx: SharedContext): Promise<void>;
67
- /**
68
- * Cleans the VTEX project by removing old packages and restoring the original package.json.
69
- *
70
- * @param {SharedContext} ctx - The shared context containing paths and configurations.
71
- * @returns {Promise<void>} A promise that resolves when the clean-up is complete.
72
- */
73
- declare function clean(ctx: SharedContext): Promise<void>;
74
- declare function validateEnvironment(): void;
75
- declare function performRollback(sharedContext: SharedContext): Promise<import("../../index-f6330edc.js").ExecutorResponse>;
76
- declare function buildAndLink(sharedContext: SharedContext, skipLink?: boolean): Promise<void>;
77
- export { vtexLink, changePackageJsonFromVtexProject, restorePackageJsonFromVtexProject, renamePackage, createPackage, findLastPackages, removeOldPackages, movePackage, buildPackage, clean, validateEnvironment, performRollback, buildAndLink };
@@ -1,5 +0,0 @@
1
- import { ExecutorContext } from '@nx/devkit';
2
- import { ExecutorResponse } from "../../index-f6330edc.js";
3
- import { ExecutorOptions } from "../../types-1282e639.js";
4
- declare function runExecutor(opts: ExecutorOptions, ctx: ExecutorContext): Promise<ExecutorResponse>;
5
- export { runExecutor as default };
@@ -1,2 +0,0 @@
1
- export * from "./index-3080371d.js";
2
- export * from "./vite/plugins/shadow-dom-inject-css/index.js";
@@ -1,2 +0,0 @@
1
- export * from "./shared/logger.js";
2
- export * from "./shared/utils.js";
@@ -1,3 +0,0 @@
1
- import { thirdPartyCssInjectPlugin } from "./vite/plugins/third-party-css-inject/main.js";
2
- export * from "./vite/plugins/third-party-css-inject/main.js";
3
- export { thirdPartyCssInjectPlugin as default };
@@ -1,2 +0,0 @@
1
- export * from "./types-7377dcc9.js";
2
- export * from "./executors/shared/utils.js";
@@ -1,9 +0,0 @@
1
- export { default as deployExecutor } from "./executors/deploy/index.js";
2
- export { default as environmentsExecutor } from "./executors/environments/index.js";
3
- export { default as publishExecutor } from "./executors/publish/index.js";
4
- export { default as updateExecutorsFileExecutor } from "./executors/update-executors-file/index.js";
5
- export { default as vtexLinkExecutor } from "./executors/vtex-link/index.js";
6
- export * from "./vite/config-builder/main.js";
7
- export * from "./index-f6330edc.js";
8
- export * from "./index-0ce2daf7.js";
9
- //# sourceMappingURL=index.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/index.ts","../../src/executors/index.ts","../../src/vite/config-builder/index.ts","../../src/vite/index.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- declare function main(): Promise<void>;
2
- export { main };
@@ -1 +0,0 @@
1
- export * from "./changeset-pre-mode.js";
@@ -1,33 +0,0 @@
1
- /**
2
- * Enum representing the different log levels.
3
- */
4
- declare enum LogLevel {
5
- ERROR = 0,
6
- WARN = 1,
7
- INFO = 2,
8
- DEBUG = 3
9
- }
10
- declare let currentLogLevel: LogLevel;
11
- /**
12
- * Sets the log level for the logger.
13
- * Only logs at this level and above will be displayed.
14
- *
15
- * @param {LogLevel} level - The log level to set.
16
- * @example
17
- * // Set log level to WARN
18
- * setLogLevel(LogLevel.WARN);
19
- *
20
- * // Now only WARN and ERROR logs will be displayed
21
- * logger.debug('Debug message'); // Will not be logged
22
- * logger.info('Info message'); // Will not be logged
23
- * logger.warn('Warn message'); // Will be logged
24
- * logger.error('Error message'); // Will be logged
25
- */
26
- declare const setLogLevel: (level: LogLevel) => void;
27
- declare const logger: {
28
- error: (message: string, ...rest: any[]) => void;
29
- warn: (message: string, ...rest: any[]) => void;
30
- info: (message: string, ...rest: any[]) => void;
31
- debug: (message: string, ...rest: any[]) => void;
32
- };
33
- export { LogLevel, currentLogLevel, setLogLevel, logger };
@@ -1,18 +0,0 @@
1
- /**
2
- * Reads and parses the package.json file from the given project path.
3
- *
4
- * @param {string} projectPath - The path to the project.
5
- * @returns {Record<string, any>} - The parsed package.json data.
6
- *
7
- * @example
8
- * const pkgJsonData = getPkgJson('/path/to/project');
9
- */
10
- declare const getPkgJson: (projectPath: string) => Record<string, any>;
11
- /**
12
- * Generates a random alphanumeric identifier of a specified length.
13
- *
14
- * @param {number} [length=8] - The length of the identifier to generate. Defaults to 8 if not specified.
15
- * @returns {string} - A string representing a unique identifier.
16
- */
17
- declare function shortId(length?: number): string;
18
- export { getPkgJson, shortId };
@@ -1,12 +0,0 @@
1
- interface SharedContext {
2
- vtexProjectPath: string;
3
- projectRoot: string;
4
- projectName: string;
5
- packageOrg: string;
6
- }
7
- interface ExecutorOptions {
8
- packageOrg: string;
9
- rollback?: boolean;
10
- skipLink?: boolean;
11
- }
12
- export { SharedContext, ExecutorOptions };
@@ -1,4 +0,0 @@
1
- type ExecutorResponse = {
2
- success: boolean;
3
- };
4
- export { ExecutorResponse };
@@ -1,14 +0,0 @@
1
- interface ExecutorOptions {
2
- }
3
- interface ExecutorConfig {
4
- implementation: string;
5
- schema: string;
6
- description: string;
7
- }
8
- interface Executors {
9
- [executorName: string]: ExecutorConfig;
10
- }
11
- interface ExecutorsFile {
12
- executors: Executors;
13
- }
14
- export { ExecutorOptions, ExecutorConfig, Executors, ExecutorsFile };
@@ -1,4 +0,0 @@
1
- import { UserConfig } from 'vite';
2
- import { Context } from "../../../index-f6330edc.js";
3
- declare const getAppConfig: (ctx: Context) => UserConfig;
4
- export { getAppConfig };
@@ -1,4 +0,0 @@
1
- import { UserConfig } from 'vite';
2
- import { Context } from "../../../index-f6330edc.js";
3
- declare const getBaseConfig: (ctx: Context) => UserConfig;
4
- export { getBaseConfig };
@@ -1,7 +0,0 @@
1
- import { ProjectType, Context } from "../../../index-f6330edc.js";
2
- declare const getConfig: (ctx: Context, type?: ProjectType | null) => import("vite").UserConfig;
3
- export * from "./app.js";
4
- export * from "./base.js";
5
- export * from "./lib.js";
6
- export * from "./script.js";
7
- export { getConfig };
@@ -1,4 +0,0 @@
1
- import { UserConfig } from 'vite';
2
- import { Context } from "../../../index-f6330edc.js";
3
- declare const getLibConfig: (ctx: Context) => UserConfig;
4
- export { getLibConfig };
@@ -1,4 +0,0 @@
1
- import { UserConfig } from 'vite';
2
- import { Context } from "../../../index-f6330edc.js";
3
- declare const getScriptConfig: (ctx: Context) => UserConfig;
4
- export { getScriptConfig };
@@ -1,10 +0,0 @@
1
- import { UserConfig } from 'vite';
2
- import { CommonProjectConfig, ProjectConfig } from "../../index-f6330edc.js";
3
- /**
4
- * Builds the configuration based on common and project-specific configurations.
5
- *
6
- * @param {CommonProjectConfig} commonConfig - The common configuration.
7
- * @returns - Returns a function that accepts a project configuration and returns the Vite configuration.
8
- */
9
- declare const createConfigBuilder: (commonConfig: CommonProjectConfig) => (projectConfig: ProjectConfig) => UserConfig;
10
- export { createConfigBuilder };
@@ -1,30 +0,0 @@
1
- import { PluginConfig } from "../../index-f6330edc.js";
2
- /**
3
- * Base plugins configuration for apps and libs.
4
- *
5
- * Plugins configured:
6
- * - vite-tsconfig-paths
7
- * - @originjs/vite-plugin-commonjs
8
- * - @rollup/plugin-graphql
9
- * - @vitejs/plugin-react-swc
10
- */
11
- declare const basePlugins: PluginConfig;
12
- /**
13
- * Plugin configuration for generating type declarations using vite-plugin-dts.
14
- */
15
- declare const dtsPlugin: PluginConfig;
16
- /**
17
- * Plugin configuration for bundle analysis using rollup-plugin-visualizer.
18
- */
19
- declare const bundleAnalysisPlugin: PluginConfig;
20
- /**
21
- * Plugin configuration for injecting CSS into JS files
22
- * using vite-plugin-css-injected-by-js.
23
- */
24
- declare const injectCssByJsPlugin: PluginConfig;
25
- /**
26
- * Plugin configuration for injecting CSS into Shadow Dom.
27
- * using local plugin.
28
- */
29
- declare const injectCssIntoShadowDomPlugin: PluginConfig;
30
- export { basePlugins, dtsPlugin, bundleAnalysisPlugin, injectCssByJsPlugin, injectCssIntoShadowDomPlugin };