@catladder/cli 3.27.0 → 3.29.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/dist/bundles/catenv/index.js +1 -1
- package/dist/bundles/cli/index.js +1 -1
- package/dist/pipeline/src/build/node/yarn.d.ts +2 -1
- package/dist/pipeline/src/build/node/yarn.js +13 -2
- package/dist/pipeline/src/build/node/yarn.js.map +1 -1
- package/dist/pipeline/src/build/types.d.ts +11 -0
- package/dist/pipeline/src/build/types.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/pipeline/src/pipeline/yarn/yarnUtils.d.ts +0 -5
- package/dist/pipeline/src/pipeline/yarn/yarnUtils.js +0 -51
- package/dist/pipeline/src/pipeline/yarn/yarnUtils.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import memoizee from "memoizee";
|
|
2
|
-
import type { YarnWorkspace } from "../../types";
|
|
3
|
-
export declare const getYarnVersion: (() => Promise<string>) & memoizee.Memoized<() => Promise<string>>;
|
|
4
|
-
export declare const getWorkspaces: ((isClassic: boolean) => Promise<Array<YarnWorkspace>>) & memoizee.Memoized<(isClassic: boolean) => Promise<Array<YarnWorkspace>>>;
|
|
5
|
-
export declare const getWorkspaceDependencies: (ws: YarnWorkspace, allWorkspaces: YarnWorkspace[]) => string[];
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getWorkspaceDependencies = exports.getWorkspaces = exports.getYarnVersion = void 0;
|
|
7
|
-
const child_process_promise_1 = require("child-process-promise");
|
|
8
|
-
const memoizee_1 = __importDefault(require("memoizee"));
|
|
9
|
-
const jsonParse_1 = require("../../utils/jsonParse");
|
|
10
|
-
const execOrFail = async (cmd, onFail) => {
|
|
11
|
-
try {
|
|
12
|
-
return await (0, child_process_promise_1.exec)(cmd).then((r) => r.stdout);
|
|
13
|
-
}
|
|
14
|
-
catch (e) {
|
|
15
|
-
return onFail !== null && onFail !== void 0 ? onFail : null;
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
// export for mocking
|
|
19
|
-
exports.getYarnVersion = (0, memoizee_1.default)(async () => {
|
|
20
|
-
return await execOrFail("yarn --version", "");
|
|
21
|
-
}, { promise: true });
|
|
22
|
-
// export for mocking
|
|
23
|
-
exports.getWorkspaces = (0, memoizee_1.default)(async (isClassic) => {
|
|
24
|
-
var _a, _b;
|
|
25
|
-
return isClassic
|
|
26
|
-
? Object.values((0, jsonParse_1.jsonParseOrThrow)((_b = (_a = (0, jsonParse_1.jsonParseOrThrow)(await execOrFail("yarn workspaces --json info", "{}"))) === null || _a === void 0 ? void 0 : _a.data) !== null && _b !== void 0 ? _b : "{}"))
|
|
27
|
-
: (0, jsonParse_1.jsonParseOrThrow)(`[${(await execOrFail("yarn workspaces list --json --verbose", ""))
|
|
28
|
-
.trim()
|
|
29
|
-
.split("\n")
|
|
30
|
-
.join(",")}]`);
|
|
31
|
-
}, { promise: true });
|
|
32
|
-
// recursivly get all workspace dependencies
|
|
33
|
-
const getWorkspaceDependencies = (ws, allWorkspaces) => {
|
|
34
|
-
return ws
|
|
35
|
-
? [...ws.workspaceDependencies, ...ws.mismatchedWorkspaceDependencies]
|
|
36
|
-
.flatMap((location) => {
|
|
37
|
-
// we have to do this recursivly
|
|
38
|
-
const otherWorkspace = allWorkspaces.find((w) => w.location === location);
|
|
39
|
-
if (otherWorkspace) {
|
|
40
|
-
return [
|
|
41
|
-
...(0, exports.getWorkspaceDependencies)(otherWorkspace, allWorkspaces),
|
|
42
|
-
otherWorkspace.location,
|
|
43
|
-
];
|
|
44
|
-
}
|
|
45
|
-
return [];
|
|
46
|
-
})
|
|
47
|
-
.filter(Boolean)
|
|
48
|
-
: [];
|
|
49
|
-
};
|
|
50
|
-
exports.getWorkspaceDependencies = getWorkspaceDependencies;
|
|
51
|
-
//# sourceMappingURL=yarnUtils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"yarnUtils.js","sourceRoot":"","sources":["../../../../../../pipeline/src/pipeline/yarn/yarnUtils.ts"],"names":[],"mappings":";;;;;;AAAA,iEAA6C;AAC7C,wDAAgC;AAEhC,qDAAyD;AAEzD,MAAM,UAAU,GAAG,KAAK,EAAE,GAAW,EAAE,MAAc,EAAmB,EAAE;IACxE,IAAI,CAAC;QACH,OAAO,MAAM,IAAA,4BAAI,EAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IAC/C,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,IAAI,CAAC;IACxB,CAAC;AACH,CAAC,CAAC;AACF,qBAAqB;AACR,QAAA,cAAc,GAAG,IAAA,kBAAQ,EACpC,KAAK,IAAI,EAAE;IACT,OAAO,MAAM,UAAU,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC;AAChD,CAAC,EACD,EAAE,OAAO,EAAE,IAAI,EAAE,CAClB,CAAC;AAEF,qBAAqB;AACR,QAAA,aAAa,GAAG,IAAA,kBAAQ,EACnC,KAAK,EAAE,SAAkB,EAAiC,EAAE;;IAC1D,OAAO,SAAS;QACd,CAAC,CAAC,MAAM,CAAC,MAAM,CACX,IAAA,4BAAgB,EACd,MAAA,MAAA,IAAA,4BAAgB,EACd,MAAM,UAAU,CAAC,6BAA6B,EAAE,IAAI,CAAC,CACtD,0CAAE,IAAI,mCAAI,IAAI,CAChB,CACF;QACH,CAAC,CAAC,IAAA,4BAAgB,EACd,IAAI,CAAC,MAAM,UAAU,CAAC,uCAAuC,EAAE,EAAE,CAAC,CAAC;aACh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