@equinor/echo-cli 1.0.2 → 1.0.3-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.
- package/README.md +354 -354
- package/package.json +110 -110
- package/templates/echoAppTemplate/.gitattributes +3 -3
- package/templates/echoAppTemplate/package.json +35 -35
- package/templates/echoAppTemplate/readme.md +41 -41
- package/templates/echoAppTemplate/tsconfig.json +25 -25
- package/templates/echoAppTemplateTutorial/.gitattributes +3 -3
- package/templates/echoAppTemplateTutorial/package.json +36 -36
- package/templates/echoAppTemplateTutorial/readme.md +41 -41
- package/templates/echoAppTemplateTutorial/tsconfig.json +25 -25
- package/templates/echoLibraryTemplate/package.json +35 -35
- package/templates/echoLibraryTemplate/public/index.html +21 -21
- package/templates/echoLibraryTemplate/readme.md +1 -1
- package/templates/echoPluginTemplate/package.json +35 -35
- package/templates/echoPluginTemplate/public/index.html +21 -21
- package/templates/echoPluginTemplate/readme.md +1 -1
- package/lib/__test__/utils/merg.test.d.ts +0 -1
- package/lib/__test__/utils/merg.test.js +0 -29
- package/lib/__test__/utils/merg.test.js.map +0 -1
- package/lib/config/common/buildAndCopyEchoHostForProd.d.ts +0 -16
- package/lib/config/common/buildAndCopyEchoHostForProd.js +0 -38
- package/lib/config/common/buildAndCopyEchoHostForProd.js.map +0 -1
- package/lib/config/common/echoManifest.d.ts +0 -3
- package/lib/config/common/echoManifest.js +0 -45
- package/lib/config/common/echoManifest.js.map +0 -1
- package/lib/config/common/echoModuleConfig.d.ts +0 -31
- package/lib/config/common/echoModuleConfig.js +0 -34
- package/lib/config/common/echoModuleConfig.js.map +0 -1
- package/lib/config/common/echoModuleId.d.ts +0 -5
- package/lib/config/common/echoModuleId.js +0 -15
- package/lib/config/common/echoModuleId.js.map +0 -1
- package/lib/config/common/extensions.d.ts +0 -1
- package/lib/config/common/extensions.js +0 -2
- package/lib/config/common/extensions.js.map +0 -1
- package/lib/config/common/getCurrentIndexFile.d.ts +0 -2
- package/lib/config/common/getCurrentIndexFile.js +0 -11
- package/lib/config/common/getCurrentIndexFile.js.map +0 -1
- package/lib/config/common/getPackageJson.d.ts +0 -1
- package/lib/config/common/getPackageJson.js +0 -7
- package/lib/config/common/getPackageJson.js.map +0 -1
- package/lib/config/common/https.d.ts +0 -6
- package/lib/config/common/https.js +0 -16
- package/lib/config/common/https.js.map +0 -1
- package/lib/config/common/initOptions.d.ts +0 -26
- package/lib/config/common/initOptions.js +0 -32
- package/lib/config/common/initOptions.js.map +0 -1
- package/lib/config/common/ssl.d.ts +0 -7
- package/lib/config/common/ssl.js +0 -76
- package/lib/config/common/ssl.js.map +0 -1
- package/lib/config/common/updateEnv.d.ts +0 -6
- package/lib/config/common/updateEnv.js +0 -16
- package/lib/config/common/updateEnv.js.map +0 -1
- package/lib/config/webpack/config.d.ts +0 -3
- package/lib/config/webpack/config.js +0 -36
- package/lib/config/webpack/config.js.map +0 -1
- package/lib/config/webpack/configBuilders/devServer.d.ts +0 -8
- package/lib/config/webpack/configBuilders/devServer.js +0 -60
- package/lib/config/webpack/configBuilders/devServer.js.map +0 -1
- package/lib/config/webpack/configBuilders/entry.d.ts +0 -12
- package/lib/config/webpack/configBuilders/entry.js +0 -13
- package/lib/config/webpack/configBuilders/entry.js.map +0 -1
- package/lib/config/webpack/configBuilders/module.d.ts +0 -8
- package/lib/config/webpack/configBuilders/module.js +0 -124
- package/lib/config/webpack/configBuilders/module.js.map +0 -1
- package/lib/config/webpack/configBuilders/optimization.d.ts +0 -7
- package/lib/config/webpack/configBuilders/optimization.js +0 -30
- package/lib/config/webpack/configBuilders/optimization.js.map +0 -1
- package/lib/config/webpack/configBuilders/output.d.ts +0 -12
- package/lib/config/webpack/configBuilders/output.js +0 -20
- package/lib/config/webpack/configBuilders/output.js.map +0 -1
- package/lib/config/webpack/configBuilders/plugins.d.ts +0 -10
- package/lib/config/webpack/configBuilders/plugins.js +0 -29
- package/lib/config/webpack/configBuilders/plugins.js.map +0 -1
- package/lib/config/webpack/echoWebpackModule.d.ts +0 -2
- package/lib/config/webpack/echoWebpackModule.js +0 -47
- package/lib/config/webpack/echoWebpackModule.js.map +0 -1
- package/lib/config/webpack/server.d.ts +0 -3
- package/lib/config/webpack/server.js +0 -22
- package/lib/config/webpack/server.js.map +0 -1
- package/lib/const/common.d.ts +0 -6
- package/lib/const/common.js +0 -15
- package/lib/const/common.js.map +0 -1
- package/lib/echo-build-dev-host.d.ts +0 -6
- package/lib/echo-build-dev-host.js +0 -19
- package/lib/echo-build-dev-host.js.map +0 -1
- package/lib/echo-build.d.ts +0 -34
- package/lib/echo-build.js +0 -83
- package/lib/echo-build.js.map +0 -1
- package/lib/echo-create.d.ts +0 -16
- package/lib/echo-create.js +0 -35
- package/lib/echo-create.js.map +0 -1
- package/lib/echo-dev-host/.env +0 -29
- package/lib/echo-dev-host/README.md +0 -121
- package/lib/echo-dev-host/babel.config.js +0 -11
- package/lib/echo-dev-host/env.sh +0 -51
- package/lib/echo-dev-host/jest.config.js +0 -21
- package/lib/echo-dev-host/package-lock.json +0 -12464
- package/lib/echo-dev-host/package.json +0 -80
- package/lib/echo-dev-host/public/env-config.js +0 -17
- package/lib/echo-dev-host/public/index.css +0 -60
- package/lib/echo-dev-host/public/index.html +0 -21
- package/lib/echo-dev-host/src/api/api-plants.ts +0 -22
- package/lib/echo-dev-host/src/app.css +0 -12
- package/lib/echo-dev-host/src/app.tsx +0 -43
- package/lib/echo-dev-host/src/components/Home/Home.tsx +0 -23
- package/lib/echo-dev-host/src/components/Home/home.module.css +0 -38
- package/lib/echo-dev-host/src/components/dummySearchPanel/DummySearchPanel.tsx +0 -28
- package/lib/echo-dev-host/src/components/dummySearchPanel/dummySearchPanel.module.css +0 -13
- package/lib/echo-dev-host/src/components/legend.tsx +0 -3
- package/lib/echo-dev-host/src/images/frontpage-brand-placeholder.jpg +0 -0
- package/lib/echo-dev-host/src/index.tsx +0 -91
- package/lib/echo-dev-host/src/setupTests.ts +0 -25
- package/lib/echo-dev-host/src/utils/plants.test.ts +0 -33
- package/lib/echo-dev-host/src/utils/plants.ts +0 -12
- package/lib/echo-dev-host/src/utils/setupSkipAuth.ts +0 -43
- package/lib/echo-dev-host/tsconfig.json +0 -21
- package/lib/echo-dev-host/webpack.config.js +0 -145
- package/lib/echo-manifest.d.ts +0 -6
- package/lib/echo-manifest.js +0 -13
- package/lib/echo-manifest.js.map +0 -1
- package/lib/tools/buildScripts/buildAndCopyDevHost.d.ts +0 -29
- package/lib/tools/buildScripts/buildAndCopyDevHost.js +0 -135
- package/lib/tools/buildScripts/buildAndCopyDevHost.js.map +0 -1
- package/lib/tools/buildScripts/webpackBuilds.d.ts +0 -3
- package/lib/tools/buildScripts/webpackBuilds.js +0 -87
- package/lib/tools/buildScripts/webpackBuilds.js.map +0 -1
- package/lib/tools/create/copyFile.d.ts +0 -2
- package/lib/tools/create/copyFile.js +0 -16
- package/lib/tools/create/copyFile.js.map +0 -1
- package/lib/tools/create/createProject.d.ts +0 -2
- package/lib/tools/create/createProject.js +0 -83
- package/lib/tools/create/createProject.js.map +0 -1
- package/lib/tools/create/createSetTargetDirectory.d.ts +0 -1
- package/lib/tools/create/createSetTargetDirectory.js +0 -12
- package/lib/tools/create/createSetTargetDirectory.js.map +0 -1
- package/lib/tools/create/getAppTemplateName.d.ts +0 -1
- package/lib/tools/create/getAppTemplateName.js +0 -22
- package/lib/tools/create/getAppTemplateName.js.map +0 -1
- package/lib/tools/create/gitInit.d.ts +0 -1
- package/lib/tools/create/gitInit.js +0 -19
- package/lib/tools/create/gitInit.js.map +0 -1
- package/lib/tools/create/promptOptions.d.ts +0 -2
- package/lib/tools/create/promptOptions.js +0 -88
- package/lib/tools/create/promptOptions.js.map +0 -1
- package/lib/tools/create/updatePackageConfig.d.ts +0 -2
- package/lib/tools/create/updatePackageConfig.js +0 -28
- package/lib/tools/create/updatePackageConfig.js.map +0 -1
- package/lib/tools/create/updateReadme.d.ts +0 -2
- package/lib/tools/create/updateReadme.js +0 -23
- package/lib/tools/create/updateReadme.js.map +0 -1
- package/lib/types/createTypes.d.ts +0 -23
- package/lib/types/createTypes.js +0 -2
- package/lib/types/createTypes.js.map +0 -1
- package/lib/types/types.d.ts +0 -4
- package/lib/types/types.js +0 -2
- package/lib/types/types.js.map +0 -1
- package/lib/update-echo-libs.d.ts +0 -9
- package/lib/update-echo-libs.js +0 -188
- package/lib/update-echo-libs.js.map +0 -1
- package/lib/utils/findConsumerAppPackageJson.d.ts +0 -11
- package/lib/utils/findConsumerAppPackageJson.js +0 -55
- package/lib/utils/findConsumerAppPackageJson.js.map +0 -1
- package/lib/utils/findTopLevelNodeModulesWithCli.d.ts +0 -12
- package/lib/utils/findTopLevelNodeModulesWithCli.js +0 -28
- package/lib/utils/findTopLevelNodeModulesWithCli.js.map +0 -1
- package/lib/utils/getFile.d.ts +0 -34
- package/lib/utils/getFile.js +0 -72
- package/lib/utils/getFile.js.map +0 -1
- package/lib/utils/getFilePath.d.ts +0 -1
- package/lib/utils/getFilePath.js +0 -22
- package/lib/utils/getFilePath.js.map +0 -1
- package/lib/utils/getLatestPkgVersion.d.ts +0 -14
- package/lib/utils/getLatestPkgVersion.js +0 -30
- package/lib/utils/getLatestPkgVersion.js.map +0 -1
- package/lib/utils/logo.d.ts +0 -1
- package/lib/utils/logo.js +0 -12
- package/lib/utils/logo.js.map +0 -1
- package/lib/utils/merge.d.ts +0 -1
- package/lib/utils/merge.js +0 -8
- package/lib/utils/merge.js.map +0 -1
- package/lib/utils/printEchoLibsVersions.d.ts +0 -23
- package/lib/utils/printEchoLibsVersions.js +0 -162
- package/lib/utils/printEchoLibsVersions.js.map +0 -1
- package/lib/utils/timer.d.ts +0 -0
- package/lib/utils/timer.js +0 -2
- package/lib/utils/timer.js.map +0 -1
package/lib/utils/getFile.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import * as fs from 'fs';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { promisify } from 'util';
|
|
5
|
-
const access = promisify(fs.access);
|
|
6
|
-
/**
|
|
7
|
-
* Asynchronously checks if a file exists and is readable in the specified directory.
|
|
8
|
-
*
|
|
9
|
-
* @param currentDir - The directory in which to look for the file.
|
|
10
|
-
* @param fileName - The name of the file to check for.
|
|
11
|
-
* @returns A promise that resolves to the full path of the file if it is accessible.
|
|
12
|
-
* @throws Exits the process with code 1 and logs an error if the file is not accessible.
|
|
13
|
-
*/
|
|
14
|
-
export default async function getFilePath(currentDir, fileName) {
|
|
15
|
-
const currentPath = path.join(currentDir, `${fileName}`);
|
|
16
|
-
try {
|
|
17
|
-
await access(currentPath, fs.constants.R_OK);
|
|
18
|
-
return currentPath;
|
|
19
|
-
}
|
|
20
|
-
catch (err) {
|
|
21
|
-
if (err instanceof Error) {
|
|
22
|
-
console.error(`%s Cant access ${fileName}`, chalk.red.bold('ERROR'));
|
|
23
|
-
process.exit(1);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
throw err;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Reads and parses a JSON file from the specified path, returning its contents as a typed object.
|
|
32
|
-
*
|
|
33
|
-
* @template T - The expected type of the parsed JSON object.
|
|
34
|
-
* @param currentDir - The current working directory to resolve the file path from.
|
|
35
|
-
* @param filePath - The relative or absolute path to the JSON file.
|
|
36
|
-
* @returns A promise that resolves to the parsed JSON object of type T.
|
|
37
|
-
* @throws Will log an error and return undefined if the file cannot be read or parsed.
|
|
38
|
-
*/
|
|
39
|
-
export async function readJSONFile(currentDir, filePath) {
|
|
40
|
-
const path = await getFilePath(currentDir, filePath);
|
|
41
|
-
let parsedFile;
|
|
42
|
-
try {
|
|
43
|
-
parsedFile = JSON.parse(fs.readFileSync(path).toString());
|
|
44
|
-
// ...use json...
|
|
45
|
-
}
|
|
46
|
-
catch (e) {
|
|
47
|
-
console.error('Failed to parse JSON:', e);
|
|
48
|
-
}
|
|
49
|
-
return parsedFile;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Asynchronously loads a Webpack configuration file from a specified path.
|
|
53
|
-
*
|
|
54
|
-
* This function resolves the absolute file path using `getFilePath`, converts it to a file URL,
|
|
55
|
-
* and dynamically imports the configuration module. It supports both ESM and CommonJS module formats,
|
|
56
|
-
* returning the configuration object accordingly.
|
|
57
|
-
*
|
|
58
|
-
* @param currentDir - The current working directory to resolve relative paths.
|
|
59
|
-
* @param filePath - The relative or absolute path to the Webpack configuration file.
|
|
60
|
-
* @returns A promise that resolves to the loaded Webpack `Configuration` object.
|
|
61
|
-
*
|
|
62
|
-
* @throws Will throw an error if the file cannot be found or imported.
|
|
63
|
-
*/
|
|
64
|
-
export async function getWebpackConfigFile(currentDir, filePath) {
|
|
65
|
-
const path = await getFilePath(currentDir, filePath);
|
|
66
|
-
// Convert the path to a file URL
|
|
67
|
-
const fileUrl = new URL(`file://${path}`);
|
|
68
|
-
const config = await import(fileUrl.href);
|
|
69
|
-
// Return the configuration, handling both ESM and CommonJS formats
|
|
70
|
-
return (config.default || config);
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=getFile.js.map
|
package/lib/utils/getFile.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getFile.js","sourceRoot":"","sources":["../../src/utils/getFile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAGjC,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,WAAW,CAAC,UAAkB,EAAE,QAAgB;IAC1E,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,QAAQ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,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1C,mEAAmE;IACnE,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,MAAM,CAAkB,CAAC;AACvD,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function getFilePath(currentDir: string, fileName: string): Promise<string>;
|
package/lib/utils/getFilePath.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import * as fs from 'fs';
|
|
3
|
-
import path from 'path';
|
|
4
|
-
import { promisify } from 'util';
|
|
5
|
-
const access = promisify(fs.access);
|
|
6
|
-
export default async function getFilePath(currentDir, fileName) {
|
|
7
|
-
const currentPath = path.join(currentDir, `${fileName}`);
|
|
8
|
-
try {
|
|
9
|
-
await access(currentPath, fs.constants.R_OK);
|
|
10
|
-
return currentPath;
|
|
11
|
-
}
|
|
12
|
-
catch (err) {
|
|
13
|
-
if (err instanceof Error) {
|
|
14
|
-
console.error(`%s Cant access ${fileName}`, chalk.red.bold('ERROR'));
|
|
15
|
-
process.exit(1);
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
throw err;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=getFilePath.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getFilePath.js","sourceRoot":"","sources":["../../src/utils/getFilePath.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,MAAM,MAAM,GAAG,SAAS,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;AAEpC,MAAM,CAAC,OAAO,CAAC,KAAK,UAAU,WAAW,CAAC,UAAkB,EAAE,QAAgB;IAC1E,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC;IAEzD,IAAI,CAAC;QACD,MAAM,MAAM,CAAC,WAAW,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QAC7C,OAAO,WAAW,CAAC;IACvB,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACX,IAAI,GAAG,YAAY,KAAK,EAAE,CAAC;YACvB,OAAO,CAAC,KAAK,CAAC,kBAAkB,QAAQ,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;YACrE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC;aAAM,CAAC;YACJ,MAAM,GAAG,CAAC;QACd,CAAC;IACL,CAAC;AACL,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { Ora } from 'ora';
|
|
3
|
-
/**
|
|
4
|
-
* Retrieves the latest published version of an npm package.
|
|
5
|
-
*
|
|
6
|
-
* @param pkg - The name of the npm package to query.
|
|
7
|
-
* @param spinner - An Ora spinner instance used to display progress and status messages.
|
|
8
|
-
* @returns A promise that resolves to the latest version string of the package, or an empty string if not found or on error.
|
|
9
|
-
*
|
|
10
|
-
* @remarks
|
|
11
|
-
* This function uses the `npm view <pkg> version` command to fetch the latest version.
|
|
12
|
-
* The spinner is updated to reflect the progress, warnings, or failures during the process.
|
|
13
|
-
*/
|
|
14
|
-
export declare function getLatestPkgVersion(pkg: string, spinner: Ora): Promise<string>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { execSync } from 'child_process';
|
|
3
|
-
/**
|
|
4
|
-
* Retrieves the latest published version of an npm package.
|
|
5
|
-
*
|
|
6
|
-
* @param pkg - The name of the npm package to query.
|
|
7
|
-
* @param spinner - An Ora spinner instance used to display progress and status messages.
|
|
8
|
-
* @returns A promise that resolves to the latest version string of the package, or an empty string if not found or on error.
|
|
9
|
-
*
|
|
10
|
-
* @remarks
|
|
11
|
-
* This function uses the `npm view <pkg> version` command to fetch the latest version.
|
|
12
|
-
* The spinner is updated to reflect the progress, warnings, or failures during the process.
|
|
13
|
-
*/
|
|
14
|
-
export async function getLatestPkgVersion(pkg, spinner) {
|
|
15
|
-
try {
|
|
16
|
-
spinner.text = `Fetching latest version for ${pkg}...`;
|
|
17
|
-
const result = execSync(`npm view ${pkg} version`, { stdio: ['pipe', 'pipe', 'ignore'] })
|
|
18
|
-
.toString()
|
|
19
|
-
.trim();
|
|
20
|
-
if (!result) {
|
|
21
|
-
spinner.warn(`No version found for ${pkg}.`);
|
|
22
|
-
}
|
|
23
|
-
return result;
|
|
24
|
-
}
|
|
25
|
-
catch (error) {
|
|
26
|
-
spinner.fail(`Could not fetch latest version for ${pkg}.`);
|
|
27
|
-
return '';
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=getLatestPkgVersion.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getLatestPkgVersion.js","sourceRoot":"","sources":["../../src/utils/getLatestPkgVersion.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC;;;;;;;;;;GAUG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,GAAW,EAAE,OAAY;IAC/D,IAAI,CAAC;QACD,OAAO,CAAC,IAAI,GAAG,+BAA+B,GAAG,KAAK,CAAC;QACvD,MAAM,MAAM,GAAG,QAAQ,CAAC,YAAY,GAAG,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,CAAC;aACpF,QAAQ,EAAE;aACV,IAAI,EAAE,CAAC;QACZ,IAAI,CAAC,MAAM,EAAE,CAAC;YACV,OAAO,CAAC,IAAI,CAAC,wBAAwB,GAAG,GAAG,CAAC,CAAC;QACjD,CAAC;QACD,OAAO,MAAM,CAAC;IAClB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,IAAI,CAAC,sCAAsC,GAAG,GAAG,CAAC,CAAC;QAC3D,OAAO,EAAE,CAAC;IACd,CAAC;AACL,CAAC"}
|
package/lib/utils/logo.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function echoCliLogo(): void;
|
package/lib/utils/logo.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import figlet from 'figlet';
|
|
3
|
-
export function echoCliLogo() {
|
|
4
|
-
console.log(`${chalk.cyan.bold('echo-cli')} - by Echo Core Team`);
|
|
5
|
-
console.log('Tool for building and running of Echo applications.\n');
|
|
6
|
-
console.log(figlet.textSync('Echo', {
|
|
7
|
-
font: '3D-ASCII',
|
|
8
|
-
horizontalLayout: 'default',
|
|
9
|
-
verticalLayout: 'default'
|
|
10
|
-
}));
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=logo.js.map
|
package/lib/utils/logo.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"logo.js","sourceRoot":"","sources":["../../src/utils/logo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,MAAM,UAAU,WAAW;IACvB,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC,CAAC;IAClE,OAAO,CAAC,GAAG,CAAC,uDAAuD,CAAC,CAAC;IACrE,OAAO,CAAC,GAAG,CACP,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE;QACpB,IAAI,EAAE,UAAU;QAChB,gBAAgB,EAAE,SAAS;QAC3B,cAAc,EAAE,SAAS;KAC5B,CAAC,CACL,CAAC;AACN,CAAC"}
|
package/lib/utils/merge.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function merge<T>(...args: T[][]): T[];
|
package/lib/utils/merge.js
DELETED
package/lib/utils/merge.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../src/utils/merge.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,KAAK,CAAI,GAAG,IAAW;IACnC,IAAI,GAAG,GAAQ,EAAE,CAAC;IAClB,IAAI,CAAC,OAAO,CAAC,CAAC,IAAS,EAAE,EAAE;QACvB,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;IACH,OAAO,GAAG,CAAC;AACf,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Prints a table of Echo library versions used in both the application and the dev host,
|
|
3
|
-
* optionally fetching and displaying the latest available versions from the registry.
|
|
4
|
-
*
|
|
5
|
-
* This function reads the `package.json` files for both the app and the dev host, extracts
|
|
6
|
-
* the versions of supported Echo libraries, and displays them in a formatted table. It can
|
|
7
|
-
* also compare these versions to the latest available versions and warn if updates are available.
|
|
8
|
-
*
|
|
9
|
-
* @param args - The arguments object.
|
|
10
|
-
* @param args.devHostPkgPath - Path to the dev host's `package.json`.
|
|
11
|
-
* @param args.appPkgPath - Path to the app's `package.json`.
|
|
12
|
-
* @param args.fetchLatest - If true, fetches the latest versions of the Echo libraries from the registry.
|
|
13
|
-
* @param args.echoLibVersionsToUse - Optional record of library names to specific versions to use as "latest".
|
|
14
|
-
* @param args.hideNewVersionsWarningMessage - If true, suppresses the warning message about available updates.
|
|
15
|
-
* @returns A promise that resolves when the version information has been printed.
|
|
16
|
-
*/
|
|
17
|
-
export declare function printEchoLibsVersions(args: {
|
|
18
|
-
devHostPkgPath: string;
|
|
19
|
-
appPkgPath: string;
|
|
20
|
-
fetchLatest?: boolean;
|
|
21
|
-
echoLibVersionsToUse?: Record<string, string>;
|
|
22
|
-
hideNewVersionsWarningMessage?: boolean;
|
|
23
|
-
}): Promise<void>;
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import chalk from 'chalk';
|
|
2
|
-
import fs from 'fs-extra';
|
|
3
|
-
import ora from 'ora';
|
|
4
|
-
import stripAnsi from 'strip-ansi';
|
|
5
|
-
import { SUPPORTED_ECHO_LIBS } from '../const/common.js';
|
|
6
|
-
import { getEchoDeps } from './findConsumerAppPackageJson.js';
|
|
7
|
-
import { getLatestPkgVersion } from './getLatestPkgVersion.js';
|
|
8
|
-
/**
|
|
9
|
-
* Prints a table of Echo library versions used in both the application and the dev host,
|
|
10
|
-
* optionally fetching and displaying the latest available versions from the registry.
|
|
11
|
-
*
|
|
12
|
-
* This function reads the `package.json` files for both the app and the dev host, extracts
|
|
13
|
-
* the versions of supported Echo libraries, and displays them in a formatted table. It can
|
|
14
|
-
* also compare these versions to the latest available versions and warn if updates are available.
|
|
15
|
-
*
|
|
16
|
-
* @param args - The arguments object.
|
|
17
|
-
* @param args.devHostPkgPath - Path to the dev host's `package.json`.
|
|
18
|
-
* @param args.appPkgPath - Path to the app's `package.json`.
|
|
19
|
-
* @param args.fetchLatest - If true, fetches the latest versions of the Echo libraries from the registry.
|
|
20
|
-
* @param args.echoLibVersionsToUse - Optional record of library names to specific versions to use as "latest".
|
|
21
|
-
* @param args.hideNewVersionsWarningMessage - If true, suppresses the warning message about available updates.
|
|
22
|
-
* @returns A promise that resolves when the version information has been printed.
|
|
23
|
-
*/
|
|
24
|
-
export async function printEchoLibsVersions(args) {
|
|
25
|
-
const { devHostPkgPath, appPkgPath, fetchLatest, echoLibVersionsToUse, hideNewVersionsWarningMessage } = args;
|
|
26
|
-
let appPkg = {};
|
|
27
|
-
let devHostPkg = {};
|
|
28
|
-
// Error handling for app package.json
|
|
29
|
-
if (!fs.existsSync(appPkgPath)) {
|
|
30
|
-
console.log(chalk.red(`Could not read echo app version numbers: ${appPkgPath} does not exist.`));
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
try {
|
|
34
|
-
appPkg = fs.readJsonSync(appPkgPath);
|
|
35
|
-
}
|
|
36
|
-
catch {
|
|
37
|
-
console.log(chalk.red(`Could not read ${appPkgPath}. Is it valid JSON?`));
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
// Error handling for dev host package.json
|
|
41
|
-
if (!fs.existsSync(devHostPkgPath)) {
|
|
42
|
-
console.log(chalk.red(`Could not read echo dev host version numbers: ${devHostPkgPath} does not exist.`));
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
try {
|
|
46
|
-
devHostPkg = fs.readJsonSync(devHostPkgPath);
|
|
47
|
-
}
|
|
48
|
-
catch {
|
|
49
|
-
console.log(chalk.red(`Could not read ${devHostPkgPath}. Is it valid JSON?`));
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
const appDeps = getEchoDeps(appPkg);
|
|
53
|
-
const devHostDeps = getEchoDeps(devHostPkg);
|
|
54
|
-
const allLibs = new Set([...appDeps.map(([n]) => n), ...devHostDeps.map(([n]) => n)]);
|
|
55
|
-
if (allLibs.size === 0) {
|
|
56
|
-
console.log(chalk.gray('No supported echo libraries found in either package.json. Supported libs are:'), SUPPORTED_ECHO_LIBS.join(', '));
|
|
57
|
-
return;
|
|
58
|
-
}
|
|
59
|
-
let versions = {};
|
|
60
|
-
if (echoLibVersionsToUse) {
|
|
61
|
-
// Use the provided latest versions for allLibs
|
|
62
|
-
for (const lib of allLibs) {
|
|
63
|
-
versions[lib] = {
|
|
64
|
-
appVersion: appDeps.find(([n]) => n === lib)?.[1],
|
|
65
|
-
devHostVersion: devHostDeps.find(([n]) => n === lib)?.[1],
|
|
66
|
-
latestVersion: echoLibVersionsToUse[lib]
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
let spinner;
|
|
72
|
-
if (fetchLatest) {
|
|
73
|
-
spinner = ora();
|
|
74
|
-
console.log(chalk.yellow('Fetching latest versions for echo libraries...'));
|
|
75
|
-
}
|
|
76
|
-
for (const lib of allLibs) {
|
|
77
|
-
versions[lib] = {
|
|
78
|
-
appVersion: appDeps.find(([n]) => n === lib)?.[1],
|
|
79
|
-
devHostVersion: devHostDeps.find(([n]) => n === lib)?.[1]
|
|
80
|
-
};
|
|
81
|
-
if (fetchLatest) {
|
|
82
|
-
try {
|
|
83
|
-
versions[lib].latestVersion = await getLatestPkgVersion(lib, spinner);
|
|
84
|
-
}
|
|
85
|
-
catch {
|
|
86
|
-
versions[lib].latestVersion = undefined;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
if (spinner)
|
|
91
|
-
spinner.stop();
|
|
92
|
-
}
|
|
93
|
-
const appName = appPkg?.name ? appPkg.name : 'App';
|
|
94
|
-
// Explanation above the table
|
|
95
|
-
console.log(chalk.cyan('\nEcho Dev Host dependencies: These are the versions of echo libraries actually used at runtime when your app is running inside the dev host.'));
|
|
96
|
-
console.log(chalk.yellow(` [dev host package.json: ${devHostPkgPath}]`));
|
|
97
|
-
console.log(chalk.cyan(`${appName} dependencies: These are the versions of echo libraries your app is developed and built against during coding.`));
|
|
98
|
-
console.log(chalk.yellow(` [app package.json: ${appPkgPath}]\n`));
|
|
99
|
-
// Print the table using the extracted function
|
|
100
|
-
printEchoLibsTable({
|
|
101
|
-
allLibs,
|
|
102
|
-
versions,
|
|
103
|
-
appName,
|
|
104
|
-
printLatest: fetchLatest || echoLibVersionsToUse !== undefined
|
|
105
|
-
});
|
|
106
|
-
// Warnings
|
|
107
|
-
const outdated = Object.entries(versions).filter(([, v]) => fetchLatest &&
|
|
108
|
-
v.latestVersion &&
|
|
109
|
-
((v.appVersion && v.appVersion !== v.latestVersion) ||
|
|
110
|
-
(v.devHostVersion && v.devHostVersion !== v.latestVersion)));
|
|
111
|
-
if (!hideNewVersionsWarningMessage && outdated.length > 0) {
|
|
112
|
-
console.log(chalk.hex('#FFA500')('\n⚠️ Updates available for echo libraries.\nRun npx update-echo-libs to upgrade.'));
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
function padCell(str, len) {
|
|
116
|
-
const realLen = stripAnsi(str).length;
|
|
117
|
-
return str + ' '.repeat(Math.max(0, len - realLen));
|
|
118
|
-
}
|
|
119
|
-
function printEchoLibsTable({ allLibs, versions, appName, printLatest }) {
|
|
120
|
-
const col1 = 'Echo Library';
|
|
121
|
-
const col2 = `${appName} version`;
|
|
122
|
-
const col3 = 'Dev Host version';
|
|
123
|
-
const gap = 6;
|
|
124
|
-
const col1w = 28 + gap, col2w = 28 + gap, col3w = 24;
|
|
125
|
-
const divider = '-'.repeat(col1w + col2w + col3w);
|
|
126
|
-
console.log(chalk.bold(padCell(col1, col1w) + padCell(col2, col2w) + padCell(col3, col3w)));
|
|
127
|
-
console.log('='.repeat(col1w + col2w + col3w));
|
|
128
|
-
const libsSorted = Array.from(allLibs).sort();
|
|
129
|
-
libsSorted.forEach((lib, idx) => {
|
|
130
|
-
const { appVersion, devHostVersion, latestVersion } = versions[lib];
|
|
131
|
-
let appStr = appVersion ? chalk.yellow(appVersion) : chalk.gray('—');
|
|
132
|
-
if (printLatest && appVersion) {
|
|
133
|
-
if (!latestVersion) {
|
|
134
|
-
appStr += ' ' + chalk.gray('(could not fetch latest)');
|
|
135
|
-
}
|
|
136
|
-
else if (appVersion === latestVersion) {
|
|
137
|
-
appStr += ' ' + chalk.green('(latest)');
|
|
138
|
-
}
|
|
139
|
-
else {
|
|
140
|
-
appStr += ' ' + chalk.red(`(latest: ${latestVersion})`);
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
let devHostStr = devHostVersion ? chalk.yellow(devHostVersion) : chalk.gray('—');
|
|
144
|
-
if (printLatest && devHostVersion) {
|
|
145
|
-
if (!latestVersion) {
|
|
146
|
-
devHostStr += ' ' + chalk.gray('(could not fetch latest)');
|
|
147
|
-
}
|
|
148
|
-
else if (devHostVersion === latestVersion) {
|
|
149
|
-
devHostStr += ' ' + chalk.green('(latest)');
|
|
150
|
-
}
|
|
151
|
-
else {
|
|
152
|
-
devHostStr += ' ' + chalk.red(`(latest: ${latestVersion})`);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
console.log(padCell(lib, col1w) + padCell(appStr, col2w) + padCell(devHostStr, col3w));
|
|
156
|
-
// Print a row divider after each row except the last
|
|
157
|
-
if (idx < libsSorted.length - 1) {
|
|
158
|
-
console.log(divider);
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
//# sourceMappingURL=printEchoLibsVersions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"printEchoLibsVersions.js","sourceRoot":"","sources":["../../src/utils/printEchoLibsVersions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAU/D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,IAM3C;IACG,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,GAAG,IAAI,CAAC;IAE9G,IAAI,MAAM,GAAQ,EAAE,CAAC;IACrB,IAAI,UAAU,GAAQ,EAAE,CAAC;IAEzB,sCAAsC;IACtC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC7B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,4CAA4C,UAAU,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YAChE,CAAC;QACL,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,CAAC;QAEvF,qDAAqD;QACrD,IAAI,GAAG,GAAG,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC9B,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/lib/utils/timer.d.ts
DELETED
|
File without changes
|
package/lib/utils/timer.js
DELETED
package/lib/utils/timer.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timer.js","sourceRoot":"","sources":["../../src/utils/timer.ts"],"names":[],"mappings":""}
|