@servicetitan/startup 24.0.3 → 24.1.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/dist/cli/commands/build.d.ts +1 -0
- package/dist/cli/commands/build.d.ts.map +1 -1
- package/dist/cli/commands/build.js +3 -0
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/bundle-package.d.ts +1 -0
- package/dist/cli/commands/bundle-package.d.ts.map +1 -1
- package/dist/cli/commands/bundle-package.js +3 -0
- package/dist/cli/commands/bundle-package.js.map +1 -1
- package/dist/cli/commands/eslint.d.ts +1 -0
- package/dist/cli/commands/eslint.d.ts.map +1 -1
- package/dist/cli/commands/eslint.js +3 -0
- package/dist/cli/commands/eslint.js.map +1 -1
- package/dist/cli/commands/get-command.d.ts +6 -0
- package/dist/cli/commands/get-command.d.ts.map +1 -0
- package/dist/cli/commands/get-command.js +50 -0
- package/dist/cli/commands/get-command.js.map +1 -0
- package/dist/cli/commands/get-user-commands.d.ts +7 -0
- package/dist/cli/commands/get-user-commands.d.ts.map +1 -0
- package/dist/cli/commands/get-user-commands.js +17 -0
- package/dist/cli/commands/get-user-commands.js.map +1 -0
- package/dist/cli/commands/index.d.ts +3 -3
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +3 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +2 -1
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +5 -2
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/install.d.ts +1 -0
- package/dist/cli/commands/install.d.ts.map +1 -1
- package/dist/cli/commands/install.js +3 -0
- package/dist/cli/commands/install.js.map +1 -1
- package/dist/cli/commands/kendo-ui-license.d.ts +1 -0
- package/dist/cli/commands/kendo-ui-license.d.ts.map +1 -1
- package/dist/cli/commands/kendo-ui-license.js +3 -0
- package/dist/cli/commands/kendo-ui-license.js.map +1 -1
- package/dist/cli/commands/lint.d.ts +1 -0
- package/dist/cli/commands/lint.d.ts.map +1 -1
- package/dist/cli/commands/lint.js +3 -0
- package/dist/cli/commands/lint.js.map +1 -1
- package/dist/cli/commands/mfe-publish.d.ts +7 -2
- package/dist/cli/commands/mfe-publish.d.ts.map +1 -1
- package/dist/cli/commands/mfe-publish.js +25 -11
- package/dist/cli/commands/mfe-publish.js.map +1 -1
- package/dist/cli/commands/prepare-package.d.ts +1 -0
- package/dist/cli/commands/prepare-package.d.ts.map +1 -1
- package/dist/cli/commands/prepare-package.js +3 -0
- package/dist/cli/commands/prepare-package.js.map +1 -1
- package/dist/cli/commands/start.d.ts +1 -0
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +3 -0
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/styles-check.d.ts +1 -0
- package/dist/cli/commands/styles-check.d.ts.map +1 -1
- package/dist/cli/commands/styles-check.js +3 -0
- package/dist/cli/commands/styles-check.js.map +1 -1
- package/dist/cli/commands/tests.d.ts +1 -0
- package/dist/cli/commands/tests.d.ts.map +1 -1
- package/dist/cli/commands/tests.js +3 -0
- package/dist/cli/commands/tests.js.map +1 -1
- package/dist/cli/commands/types.d.ts +5 -0
- package/dist/cli/commands/types.d.ts.map +1 -0
- package/dist/cli/commands/types.js +3 -0
- package/dist/cli/commands/types.js.map +1 -0
- package/dist/cli/index.js +24 -37
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/utils/lerna-exec.d.ts +1 -0
- package/dist/cli/utils/lerna-exec.d.ts.map +1 -1
- package/dist/cli/utils/lerna-exec.js +3 -0
- package/dist/cli/utils/lerna-exec.js.map +1 -1
- package/dist/utils/get-packages.d.ts.map +1 -1
- package/dist/utils/get-packages.js +29 -12
- package/dist/utils/get-packages.js.map +1 -1
- package/dist/utils/maybe-create-git-folder.d.ts +10 -0
- package/dist/utils/maybe-create-git-folder.d.ts.map +1 -0
- package/dist/utils/maybe-create-git-folder.js +25 -0
- package/dist/utils/maybe-create-git-folder.js.map +1 -0
- package/package.json +12 -12
- package/src/cli/commands/__tests__/get-command.test.ts +17 -0
- package/src/cli/commands/__tests__/get-user-commands.test.ts +24 -0
- package/src/cli/commands/__tests__/init.test.ts +4 -4
- package/src/cli/commands/__tests__/install.test.ts +4 -0
- package/src/cli/commands/__tests__/mfe-publish.test.ts +11 -0
- package/src/cli/commands/build.ts +4 -0
- package/src/cli/commands/bundle-package.ts +4 -0
- package/src/cli/commands/eslint.ts +4 -0
- package/src/cli/commands/get-command.ts +50 -0
- package/src/cli/commands/get-user-commands.ts +19 -0
- package/src/cli/commands/index.ts +3 -4
- package/src/cli/commands/init.ts +7 -3
- package/src/cli/commands/install.ts +4 -0
- package/src/cli/commands/kendo-ui-license.ts +4 -0
- package/src/cli/commands/lint.ts +4 -0
- package/src/cli/commands/mfe-publish.ts +31 -12
- package/src/cli/commands/prepare-package.ts +4 -0
- package/src/cli/commands/start.ts +4 -0
- package/src/cli/commands/styles-check.ts +4 -0
- package/src/cli/commands/tests.ts +4 -0
- package/src/cli/commands/types.ts +4 -0
- package/src/cli/index.ts +27 -59
- package/src/cli/utils/__tests__/lerna-exec.test.ts +2 -0
- package/src/cli/utils/lerna-exec.ts +4 -0
- package/src/utils/__tests__/get-packages.test.ts +67 -20
- package/src/utils/__tests__/maybe-create-git-folder.test.ts +41 -0
- package/src/utils/get-packages.ts +34 -17
- package/src/utils/maybe-create-git-folder.ts +18 -0
- package/template-react18/packages/application/package.json +1 -1
- package/template-react18/packages/feature-a/package.json +1 -1
- package/template-react18/packages/feature-b/package.json +1 -1
- package/template-react18/packages/feature-c/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import execa from 'execa';
|
|
2
2
|
import { isBundle, isLegacy } from './get-configuration';
|
|
3
|
+
import { maybeCreateGitFolder } from './maybe-create-git-folder';
|
|
3
4
|
import { toArray } from './to-array';
|
|
5
|
+
import { log } from './log';
|
|
4
6
|
|
|
5
7
|
export enum PackageType {
|
|
6
8
|
TSC,
|
|
@@ -27,23 +29,14 @@ export function getPackages(options: GetPackagesOptions = {}) {
|
|
|
27
29
|
const scope = toArray(options.scope);
|
|
28
30
|
const ignore = toArray(options.ignore);
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
);
|
|
32
|
+
maybeCreateGitFolder();
|
|
33
|
+
const allPackages: RawPackage[] = listPackages();
|
|
33
34
|
|
|
34
35
|
if (!scope.length && !ignore.length) {
|
|
35
36
|
return withMetadata(allPackages);
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
const filteredPackages: RawPackage[] =
|
|
39
|
-
execa.sync('npx', [
|
|
40
|
-
'lerna',
|
|
41
|
-
'la',
|
|
42
|
-
...scope.map(v => ['--scope', v]).flat(),
|
|
43
|
-
...ignore.map(v => ['--ignore', v]).flat(),
|
|
44
|
-
'--json',
|
|
45
|
-
]).stdout
|
|
46
|
-
);
|
|
39
|
+
const filteredPackages: RawPackage[] = listPackages(options);
|
|
47
40
|
|
|
48
41
|
const graph: Record<string, string[]> = getPackagesGraph();
|
|
49
42
|
|
|
@@ -84,18 +77,42 @@ interface GetPackagesGraphOptions {
|
|
|
84
77
|
* Returns packages and their direct dependencies
|
|
85
78
|
*/
|
|
86
79
|
export function getPackagesGraph(options: GetPackagesGraphOptions = {}): Record<string, string[]> {
|
|
80
|
+
return listPackages({ ...options, graph: true });
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function listPackages(options: GetPackagesOptions & { graph?: boolean } = {}) {
|
|
87
84
|
const scope = toArray(options.scope);
|
|
88
85
|
const ignore = toArray(options.ignore);
|
|
89
86
|
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
let execaOptions: execa.SyncOptions | undefined;
|
|
88
|
+
if (process.platform === 'win32') {
|
|
89
|
+
/*
|
|
90
|
+
* Disabled the project graph cache to workaround issue when nx fails with
|
|
91
|
+
* "Error: EPERM: operation not permitted, rename ..." error when multiple
|
|
92
|
+
* processes simultaneously generate the project graph.
|
|
93
|
+
*/
|
|
94
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
95
|
+
execaOptions = { extendEnv: true, env: { NX_CACHE_PROJECT_GRAPH: 'false' } };
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
const output = execa.sync(
|
|
99
|
+
'npx',
|
|
100
|
+
[
|
|
92
101
|
'lerna',
|
|
93
102
|
'la',
|
|
94
103
|
...scope.map(v => ['--scope', v]).flat(),
|
|
95
104
|
...ignore.map(v => ['--ignore', v]).flat(),
|
|
96
|
-
'--graph',
|
|
97
|
-
]
|
|
98
|
-
|
|
105
|
+
options.graph ? '--graph' : '--json',
|
|
106
|
+
],
|
|
107
|
+
execaOptions
|
|
108
|
+
).stdout;
|
|
109
|
+
|
|
110
|
+
try {
|
|
111
|
+
return JSON.parse(output);
|
|
112
|
+
} catch (error) {
|
|
113
|
+
log.error(`error: could not parse lerna output:\n${output}`);
|
|
114
|
+
throw error;
|
|
115
|
+
}
|
|
99
116
|
}
|
|
100
117
|
|
|
101
118
|
function withMetadata(packages: RawPackage[]): Package[] {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Create empty .git folder to workaround issue where Lerna does not
|
|
5
|
+
* detect workspace packages on Windows systems. The empty .git folder
|
|
6
|
+
* causes nx to use the git-hasher when building the project graph.
|
|
7
|
+
* Note this gets fixed (e.g., https://github.com/nrwl/nx/issues/8601) but
|
|
8
|
+
* keeps reappearing (e.g., https://github.com/nrwl/nx/issues/9584 and
|
|
9
|
+
* https://github.com/nrwl/nx/issues/18094)
|
|
10
|
+
*/
|
|
11
|
+
export function maybeCreateGitFolder() {
|
|
12
|
+
if (process.platform !== 'win32') {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
if (!fs.existsSync('.git')) {
|
|
16
|
+
fs.mkdirSync('.git');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"@testing-library/jest-dom": "^6.4.2",
|
|
29
29
|
"@testing-library/react": "^14.2.1",
|
|
30
30
|
"@testing-library/react-hooks": "^8.0.1",
|
|
31
|
-
"@types/react": "^18.3.
|
|
31
|
+
"@types/react": "^18.3.3",
|
|
32
32
|
"@types/react-dom": "^18.3.0",
|
|
33
33
|
"@types/react-router-dom": "^5.3.2"
|
|
34
34
|
}
|