@xylabs/ts-scripts-yarn3 3.5.0 → 3.5.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/actions/clean.js +1 -3
- package/dist/actions/clean.js.map +1 -1
- package/dist/actions/clean.mjs +2 -4
- package/dist/actions/clean.mjs.map +1 -1
- package/dist/actions/package/clean-outputs.js +4 -6
- package/dist/actions/package/clean-outputs.js.map +1 -1
- package/dist/actions/package/clean-outputs.mjs +4 -6
- package/dist/actions/package/clean-outputs.mjs.map +1 -1
- package/dist/actions/package/clean-typescript.js +4 -6
- package/dist/actions/package/clean-typescript.js.map +1 -1
- package/dist/actions/package/clean-typescript.mjs +4 -6
- package/dist/actions/package/clean-typescript.mjs.map +1 -1
- package/dist/actions/package/clean.js +2 -2
- package/dist/actions/package/clean.js.map +1 -1
- package/dist/actions/package/clean.mjs +2 -2
- package/dist/actions/package/clean.mjs.map +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/package.json +4 -4
- package/src/actions/clean.ts +3 -4
- package/src/actions/package/clean-outputs.ts +4 -6
- package/src/actions/package/clean-typescript.ts +4 -7
- package/src/actions/package/clean.ts +2 -2
package/dist/actions/clean.js
CHANGED
|
@@ -24,8 +24,6 @@ __export(clean_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(clean_exports);
|
|
26
26
|
var import_lib = require("../lib");
|
|
27
|
-
var import_clean_docs = require("./clean-docs");
|
|
28
|
-
var import_clean_eslint = require("./clean-eslint");
|
|
29
27
|
const clean = async ({ verbose, pkg }) => {
|
|
30
28
|
return pkg ? await cleanPackage({ pkg, verbose }) : cleanAll({ verbose });
|
|
31
29
|
};
|
|
@@ -34,7 +32,7 @@ const cleanPackage = ({ pkg }) => {
|
|
|
34
32
|
};
|
|
35
33
|
const cleanAll = ({ verbose }) => {
|
|
36
34
|
const verboseOptions = verbose ? ["--verbose"] : ["--no-verbose"];
|
|
37
|
-
return (0,
|
|
35
|
+
return (0, import_lib.runStepsAsync)("Clean", [["yarn", ["workspaces foreach", "-pA", "--jobs 64", ...verboseOptions, "run", "package-clean"]]]);
|
|
38
36
|
};
|
|
39
37
|
// Annotate the CommonJS export names for ESM import in node:
|
|
40
38
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/actions/clean.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/actions/clean.ts"],"sourcesContent":["import { runStepsAsync } from '../lib'\n\n\nexport interface CleanParams {\n pkg?: string\n verbose?: boolean\n}\n\nexport interface CleanPackageParams {\n pkg: string\n verbose?: boolean\n}\n\nexport const clean = async ({ verbose, pkg }: CleanParams) => {\n return pkg ? await cleanPackage({ pkg, verbose }) : cleanAll({ verbose })\n}\n\nexport const cleanPackage = ({ pkg }: CleanPackageParams) => {\n return runStepsAsync(`Clean [${pkg}]`, [['yarn', ['workspace', pkg, 'run', 'package-clean']]])\n}\n\nexport const cleanAll = ({ verbose }: CleanParams) => {\n const verboseOptions = verbose ? ['--verbose'] : ['--no-verbose']\n return runStepsAsync('Clean', [['yarn', ['workspaces foreach', '-pA', '--jobs 64', ...verboseOptions, 'run', 'package-clean']]])\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAA8B;AAavB,MAAM,QAAQ,OAAO,EAAE,SAAS,IAAI,MAAmB;AAC5D,SAAO,MAAM,MAAM,aAAa,EAAE,KAAK,QAAQ,CAAC,IAAI,SAAS,EAAE,QAAQ,CAAC;AAC1E;AAEO,MAAM,eAAe,CAAC,EAAE,IAAI,MAA0B;AAC3D,aAAO,0BAAc,UAAU,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,aAAa,KAAK,OAAO,eAAe,CAAC,CAAC,CAAC;AAC/F;AAEO,MAAM,WAAW,CAAC,EAAE,QAAQ,MAAmB;AACpD,QAAM,iBAAiB,UAAU,CAAC,WAAW,IAAI,CAAC,cAAc;AAChE,aAAO,0BAAc,SAAS,CAAC,CAAC,QAAQ,CAAC,sBAAsB,OAAO,aAAa,GAAG,gBAAgB,OAAO,eAAe,CAAC,CAAC,CAAC;AACjI;","names":[]}
|
package/dist/actions/clean.mjs
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { cleanDocs } from "./clean-docs";
|
|
3
|
-
import { cleanESLint } from "./clean-eslint";
|
|
1
|
+
import { runStepsAsync } from "../lib";
|
|
4
2
|
const clean = async ({ verbose, pkg }) => {
|
|
5
3
|
return pkg ? await cleanPackage({ pkg, verbose }) : cleanAll({ verbose });
|
|
6
4
|
};
|
|
@@ -9,7 +7,7 @@ const cleanPackage = ({ pkg }) => {
|
|
|
9
7
|
};
|
|
10
8
|
const cleanAll = ({ verbose }) => {
|
|
11
9
|
const verboseOptions = verbose ? ["--verbose"] : ["--no-verbose"];
|
|
12
|
-
return
|
|
10
|
+
return runStepsAsync("Clean", [["yarn", ["workspaces foreach", "-pA", "--jobs 64", ...verboseOptions, "run", "package-clean"]]]);
|
|
13
11
|
};
|
|
14
12
|
export {
|
|
15
13
|
clean,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/actions/clean.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../src/actions/clean.ts"],"sourcesContent":["import { runStepsAsync } from '../lib'\n\n\nexport interface CleanParams {\n pkg?: string\n verbose?: boolean\n}\n\nexport interface CleanPackageParams {\n pkg: string\n verbose?: boolean\n}\n\nexport const clean = async ({ verbose, pkg }: CleanParams) => {\n return pkg ? await cleanPackage({ pkg, verbose }) : cleanAll({ verbose })\n}\n\nexport const cleanPackage = ({ pkg }: CleanPackageParams) => {\n return runStepsAsync(`Clean [${pkg}]`, [['yarn', ['workspace', pkg, 'run', 'package-clean']]])\n}\n\nexport const cleanAll = ({ verbose }: CleanParams) => {\n const verboseOptions = verbose ? ['--verbose'] : ['--no-verbose']\n return runStepsAsync('Clean', [['yarn', ['workspaces foreach', '-pA', '--jobs 64', ...verboseOptions, 'run', 'package-clean']]])\n}\n"],"mappings":"AAAA,SAAS,qBAAqB;AAavB,MAAM,QAAQ,OAAO,EAAE,SAAS,IAAI,MAAmB;AAC5D,SAAO,MAAM,MAAM,aAAa,EAAE,KAAK,QAAQ,CAAC,IAAI,SAAS,EAAE,QAAQ,CAAC;AAC1E;AAEO,MAAM,eAAe,CAAC,EAAE,IAAI,MAA0B;AAC3D,SAAO,cAAc,UAAU,GAAG,KAAK,CAAC,CAAC,QAAQ,CAAC,aAAa,KAAK,OAAO,eAAe,CAAC,CAAC,CAAC;AAC/F;AAEO,MAAM,WAAW,CAAC,EAAE,QAAQ,MAAmB;AACpD,QAAM,iBAAiB,UAAU,CAAC,WAAW,IAAI,CAAC,cAAc;AAChE,SAAO,cAAc,SAAS,CAAC,CAAC,QAAQ,CAAC,sBAAsB,OAAO,aAAa,GAAG,gBAAgB,OAAO,eAAe,CAAC,CAAC,CAAC;AACjI;","names":[]}
|
|
@@ -31,17 +31,15 @@ __export(clean_outputs_exports, {
|
|
|
31
31
|
packageCleanOutputs: () => packageCleanOutputs
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(clean_outputs_exports);
|
|
34
|
-
var
|
|
34
|
+
var import_promises = require("node:fs/promises");
|
|
35
35
|
var import_node_path = __toESM(require("node:path"));
|
|
36
36
|
var import_chalk = __toESM(require("chalk"));
|
|
37
|
-
const packageCleanOutputs = () => {
|
|
37
|
+
const packageCleanOutputs = async () => {
|
|
38
38
|
const pkg = process.env.INIT_CWD ?? ".";
|
|
39
39
|
const pkgName = process.env.npm_package_name;
|
|
40
|
+
const folders = [import_node_path.default.join(pkg, "dist"), import_node_path.default.join(pkg, "build"), import_node_path.default.join(pkg, "docs")];
|
|
40
41
|
console.log(import_chalk.default.green(`Cleaning Outputs [${pkgName}]`));
|
|
41
|
-
|
|
42
|
-
(0, import_node_fs.rmSync)(dist, { force: true, recursive: true });
|
|
43
|
-
const build = import_node_path.default.join(pkg, "build");
|
|
44
|
-
(0, import_node_fs.rmSync)(build, { force: true, recursive: true });
|
|
42
|
+
await Promise.all(folders.map((folder) => (0, import_promises.rm)(folder, { force: true, recursive: true })));
|
|
45
43
|
return 0;
|
|
46
44
|
};
|
|
47
45
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/package/clean-outputs.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../src/actions/package/clean-outputs.ts"],"sourcesContent":["import { rm } from 'node:fs/promises'\nimport path from 'node:path'\n\nimport chalk from 'chalk'\n\nexport const packageCleanOutputs = async () => {\n const pkg = process.env.INIT_CWD ?? '.'\n const pkgName = process.env.npm_package_name\n const folders: string[] = [path.join(pkg, 'dist'), path.join(pkg, 'build'), path.join(pkg, 'docs')]\n console.log(chalk.green(`Cleaning Outputs [${pkgName}]`))\n\n await Promise.all(folders.map((folder) => rm(folder, { force: true, recursive: true })))\n\n return 0\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAmB;AACnB,uBAAiB;AAEjB,mBAAkB;AAEX,MAAM,sBAAsB,YAAY;AAC7C,QAAM,MAAM,QAAQ,IAAI,YAAY;AACpC,QAAM,UAAU,QAAQ,IAAI;AAC5B,QAAM,UAAoB,CAAC,iBAAAA,QAAK,KAAK,KAAK,MAAM,GAAG,iBAAAA,QAAK,KAAK,KAAK,OAAO,GAAG,iBAAAA,QAAK,KAAK,KAAK,MAAM,CAAC;AAClG,UAAQ,IAAI,aAAAC,QAAM,MAAM,qBAAqB,OAAO,GAAG,CAAC;AAExD,QAAM,QAAQ,IAAI,QAAQ,IAAI,CAAC,eAAW,oBAAG,QAAQ,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC,CAAC,CAAC;AAEvF,SAAO;AACT;","names":["path","chalk"]}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { rm } from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import chalk from "chalk";
|
|
4
|
-
const packageCleanOutputs = () => {
|
|
4
|
+
const packageCleanOutputs = async () => {
|
|
5
5
|
const pkg = process.env.INIT_CWD ?? ".";
|
|
6
6
|
const pkgName = process.env.npm_package_name;
|
|
7
|
+
const folders = [path.join(pkg, "dist"), path.join(pkg, "build"), path.join(pkg, "docs")];
|
|
7
8
|
console.log(chalk.green(`Cleaning Outputs [${pkgName}]`));
|
|
8
|
-
|
|
9
|
-
rmSync(dist, { force: true, recursive: true });
|
|
10
|
-
const build = path.join(pkg, "build");
|
|
11
|
-
rmSync(build, { force: true, recursive: true });
|
|
9
|
+
await Promise.all(folders.map((folder) => rm(folder, { force: true, recursive: true })));
|
|
12
10
|
return 0;
|
|
13
11
|
};
|
|
14
12
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/package/clean-outputs.ts"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../src/actions/package/clean-outputs.ts"],"sourcesContent":["import { rm } from 'node:fs/promises'\nimport path from 'node:path'\n\nimport chalk from 'chalk'\n\nexport const packageCleanOutputs = async () => {\n const pkg = process.env.INIT_CWD ?? '.'\n const pkgName = process.env.npm_package_name\n const folders: string[] = [path.join(pkg, 'dist'), path.join(pkg, 'build'), path.join(pkg, 'docs')]\n console.log(chalk.green(`Cleaning Outputs [${pkgName}]`))\n\n await Promise.all(folders.map((folder) => rm(folder, { force: true, recursive: true })))\n\n return 0\n}\n"],"mappings":"AAAA,SAAS,UAAU;AACnB,OAAO,UAAU;AAEjB,OAAO,WAAW;AAEX,MAAM,sBAAsB,YAAY;AAC7C,QAAM,MAAM,QAAQ,IAAI,YAAY;AACpC,QAAM,UAAU,QAAQ,IAAI;AAC5B,QAAM,UAAoB,CAAC,KAAK,KAAK,KAAK,MAAM,GAAG,KAAK,KAAK,KAAK,OAAO,GAAG,KAAK,KAAK,KAAK,MAAM,CAAC;AAClG,UAAQ,IAAI,MAAM,MAAM,qBAAqB,OAAO,GAAG,CAAC;AAExD,QAAM,QAAQ,IAAI,QAAQ,IAAI,CAAC,WAAW,GAAG,QAAQ,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC,CAAC,CAAC;AAEvF,SAAO;AACT;","names":[]}
|
|
@@ -31,17 +31,15 @@ __export(clean_typescript_exports, {
|
|
|
31
31
|
packageCleanTypescript: () => packageCleanTypescript
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(clean_typescript_exports);
|
|
34
|
+
var import_promises = require("node:fs/promises");
|
|
34
35
|
var import_node_path = __toESM(require("node:path"));
|
|
35
36
|
var import_chalk = __toESM(require("chalk"));
|
|
36
|
-
|
|
37
|
-
const packageCleanTypescript = () => {
|
|
37
|
+
const packageCleanTypescript = async () => {
|
|
38
38
|
const pkg = process.env.INIT_CWD ?? ".";
|
|
39
39
|
const pkgName = process.env.npm_package_name;
|
|
40
40
|
console.log(import_chalk.default.green(`Cleaning Typescript [${pkgName}]`));
|
|
41
|
-
const
|
|
42
|
-
(0,
|
|
43
|
-
const tsConfig = import_node_path.default.join(pkg, ".tsconfig.*");
|
|
44
|
-
(0, import_rimraf.rimrafSync)(tsConfig, { glob: true });
|
|
41
|
+
const files = [import_node_path.default.join(pkg, "*.tsbuildinfo"), import_node_path.default.join(pkg, ".tsconfig.*"), import_node_path.default.join(pkg, ".eslintcache")];
|
|
42
|
+
await Promise.all(files.map((file) => (0, import_promises.rm)(file, { force: true, recursive: true })));
|
|
45
43
|
return 0;
|
|
46
44
|
};
|
|
47
45
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/package/clean-typescript.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../../src/actions/package/clean-typescript.ts"],"sourcesContent":["import { rm } from 'node:fs/promises'\nimport path from 'node:path'\n\nimport chalk from 'chalk'\n\nexport const packageCleanTypescript = async () => {\n const pkg = process.env.INIT_CWD ?? '.'\n const pkgName = process.env.npm_package_name\n console.log(chalk.green(`Cleaning Typescript [${pkgName}]`))\n const files: string[] = [path.join(pkg, '*.tsbuildinfo'), path.join(pkg, '.tsconfig.*'), path.join(pkg, '.eslintcache')]\n\n await Promise.all(files.map((file) => rm(file, { force: true, recursive: true })))\n\n return 0\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAmB;AACnB,uBAAiB;AAEjB,mBAAkB;AAEX,MAAM,yBAAyB,YAAY;AAChD,QAAM,MAAM,QAAQ,IAAI,YAAY;AACpC,QAAM,UAAU,QAAQ,IAAI;AAC5B,UAAQ,IAAI,aAAAA,QAAM,MAAM,wBAAwB,OAAO,GAAG,CAAC;AAC3D,QAAM,QAAkB,CAAC,iBAAAC,QAAK,KAAK,KAAK,eAAe,GAAG,iBAAAA,QAAK,KAAK,KAAK,aAAa,GAAG,iBAAAA,QAAK,KAAK,KAAK,cAAc,CAAC;AAEvH,QAAM,QAAQ,IAAI,MAAM,IAAI,CAAC,aAAS,oBAAG,MAAM,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC,CAAC,CAAC;AAEjF,SAAO;AACT;","names":["chalk","path"]}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
+
import { rm } from "node:fs/promises";
|
|
1
2
|
import path from "node:path";
|
|
2
3
|
import chalk from "chalk";
|
|
3
|
-
|
|
4
|
-
const packageCleanTypescript = () => {
|
|
4
|
+
const packageCleanTypescript = async () => {
|
|
5
5
|
const pkg = process.env.INIT_CWD ?? ".";
|
|
6
6
|
const pkgName = process.env.npm_package_name;
|
|
7
7
|
console.log(chalk.green(`Cleaning Typescript [${pkgName}]`));
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const tsConfig = path.join(pkg, ".tsconfig.*");
|
|
11
|
-
rimrafSync(tsConfig, { glob: true });
|
|
8
|
+
const files = [path.join(pkg, "*.tsbuildinfo"), path.join(pkg, ".tsconfig.*"), path.join(pkg, ".eslintcache")];
|
|
9
|
+
await Promise.all(files.map((file) => rm(file, { force: true, recursive: true })));
|
|
12
10
|
return 0;
|
|
13
11
|
};
|
|
14
12
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/package/clean-typescript.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../../src/actions/package/clean-typescript.ts"],"sourcesContent":["import { rm } from 'node:fs/promises'\nimport path from 'node:path'\n\nimport chalk from 'chalk'\n\nexport const packageCleanTypescript = async () => {\n const pkg = process.env.INIT_CWD ?? '.'\n const pkgName = process.env.npm_package_name\n console.log(chalk.green(`Cleaning Typescript [${pkgName}]`))\n const files: string[] = [path.join(pkg, '*.tsbuildinfo'), path.join(pkg, '.tsconfig.*'), path.join(pkg, '.eslintcache')]\n\n await Promise.all(files.map((file) => rm(file, { force: true, recursive: true })))\n\n return 0\n}\n"],"mappings":"AAAA,SAAS,UAAU;AACnB,OAAO,UAAU;AAEjB,OAAO,WAAW;AAEX,MAAM,yBAAyB,YAAY;AAChD,QAAM,MAAM,QAAQ,IAAI,YAAY;AACpC,QAAM,UAAU,QAAQ,IAAI;AAC5B,UAAQ,IAAI,MAAM,MAAM,wBAAwB,OAAO,GAAG,CAAC;AAC3D,QAAM,QAAkB,CAAC,KAAK,KAAK,KAAK,eAAe,GAAG,KAAK,KAAK,KAAK,aAAa,GAAG,KAAK,KAAK,KAAK,cAAc,CAAC;AAEvH,QAAM,QAAQ,IAAI,MAAM,IAAI,CAAC,SAAS,GAAG,MAAM,EAAE,OAAO,MAAM,WAAW,KAAK,CAAC,CAAC,CAAC;AAEjF,SAAO;AACT;","names":[]}
|
|
@@ -23,8 +23,8 @@ __export(clean_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(clean_exports);
|
|
24
24
|
var import_clean_outputs = require("./clean-outputs");
|
|
25
25
|
var import_clean_typescript = require("./clean-typescript");
|
|
26
|
-
const packageClean = () => {
|
|
27
|
-
return (0, import_clean_outputs.packageCleanOutputs)()
|
|
26
|
+
const packageClean = async () => {
|
|
27
|
+
return (await Promise.all([(0, import_clean_outputs.packageCleanOutputs)(), (0, import_clean_typescript.packageCleanTypescript)()])).reduce((prev, value) => prev + value, 0);
|
|
28
28
|
};
|
|
29
29
|
// Annotate the CommonJS export names for ESM import in node:
|
|
30
30
|
0 && (module.exports = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/package/clean.ts"],"sourcesContent":["import { packageCleanOutputs } from './clean-outputs'\nimport { packageCleanTypescript } from './clean-typescript'\n\nexport const packageClean = () => {\n return packageCleanOutputs()
|
|
1
|
+
{"version":3,"sources":["../../../src/actions/package/clean.ts"],"sourcesContent":["import { packageCleanOutputs } from './clean-outputs'\nimport { packageCleanTypescript } from './clean-typescript'\n\nexport const packageClean = async () => {\n return (await Promise.all([packageCleanOutputs(), packageCleanTypescript()])).reduce((prev, value) => prev + value, 0)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,2BAAoC;AACpC,8BAAuC;AAEhC,MAAM,eAAe,YAAY;AACtC,UAAQ,MAAM,QAAQ,IAAI,KAAC,0CAAoB,OAAG,gDAAuB,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,UAAU,OAAO,OAAO,CAAC;AACvH;","names":[]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { packageCleanOutputs } from "./clean-outputs";
|
|
2
2
|
import { packageCleanTypescript } from "./clean-typescript";
|
|
3
|
-
const packageClean = () => {
|
|
4
|
-
return packageCleanOutputs()
|
|
3
|
+
const packageClean = async () => {
|
|
4
|
+
return (await Promise.all([packageCleanOutputs(), packageCleanTypescript()])).reduce((prev, value) => prev + value, 0);
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
packageClean
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/package/clean.ts"],"sourcesContent":["import { packageCleanOutputs } from './clean-outputs'\nimport { packageCleanTypescript } from './clean-typescript'\n\nexport const packageClean = () => {\n return packageCleanOutputs()
|
|
1
|
+
{"version":3,"sources":["../../../src/actions/package/clean.ts"],"sourcesContent":["import { packageCleanOutputs } from './clean-outputs'\nimport { packageCleanTypescript } from './clean-typescript'\n\nexport const packageClean = async () => {\n return (await Promise.all([packageCleanOutputs(), packageCleanTypescript()])).reduce((prev, value) => prev + value, 0)\n}\n"],"mappings":"AAAA,SAAS,2BAA2B;AACpC,SAAS,8BAA8B;AAEhC,MAAM,eAAe,YAAY;AACtC,UAAQ,MAAM,QAAQ,IAAI,CAAC,oBAAoB,GAAG,uBAAuB,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,UAAU,OAAO,OAAO,CAAC;AACvH;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -24,7 +24,7 @@ interface CleanPackageParams {
|
|
|
24
24
|
}
|
|
25
25
|
declare const clean: ({ verbose, pkg }: CleanParams) => Promise<number>;
|
|
26
26
|
declare const cleanPackage: ({ pkg }: CleanPackageParams) => Promise<number>;
|
|
27
|
-
declare const cleanAll: ({ verbose }: CleanParams) => number
|
|
27
|
+
declare const cleanAll: ({ verbose }: CleanParams) => Promise<number>;
|
|
28
28
|
|
|
29
29
|
declare const cleanDocs: () => number;
|
|
30
30
|
|
|
@@ -118,11 +118,11 @@ declare const lintProfile: () => number;
|
|
|
118
118
|
|
|
119
119
|
declare const npmignoreGen: (pkg?: string) => 1 | 0;
|
|
120
120
|
|
|
121
|
-
declare const packageClean: () => number
|
|
121
|
+
declare const packageClean: () => Promise<number>;
|
|
122
122
|
|
|
123
|
-
declare const packageCleanOutputs: () => number
|
|
123
|
+
declare const packageCleanOutputs: () => Promise<number>;
|
|
124
124
|
|
|
125
|
-
declare const packageCleanTypescript: () => number
|
|
125
|
+
declare const packageCleanTypescript: () => Promise<number>;
|
|
126
126
|
|
|
127
127
|
type EntryMode = 'all' | 'single' | 'auto' | 'platform';
|
|
128
128
|
type CompileMode = 'tsup' | 'tsc';
|
package/dist/index.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ interface CleanPackageParams {
|
|
|
24
24
|
}
|
|
25
25
|
declare const clean: ({ verbose, pkg }: CleanParams) => Promise<number>;
|
|
26
26
|
declare const cleanPackage: ({ pkg }: CleanPackageParams) => Promise<number>;
|
|
27
|
-
declare const cleanAll: ({ verbose }: CleanParams) => number
|
|
27
|
+
declare const cleanAll: ({ verbose }: CleanParams) => Promise<number>;
|
|
28
28
|
|
|
29
29
|
declare const cleanDocs: () => number;
|
|
30
30
|
|
|
@@ -118,11 +118,11 @@ declare const lintProfile: () => number;
|
|
|
118
118
|
|
|
119
119
|
declare const npmignoreGen: (pkg?: string) => 1 | 0;
|
|
120
120
|
|
|
121
|
-
declare const packageClean: () => number
|
|
121
|
+
declare const packageClean: () => Promise<number>;
|
|
122
122
|
|
|
123
|
-
declare const packageCleanOutputs: () => number
|
|
123
|
+
declare const packageCleanOutputs: () => Promise<number>;
|
|
124
124
|
|
|
125
|
-
declare const packageCleanTypescript: () => number
|
|
125
|
+
declare const packageCleanTypescript: () => Promise<number>;
|
|
126
126
|
|
|
127
127
|
type EntryMode = 'all' | 'single' | 'auto' | 'platform';
|
|
128
128
|
type CompileMode = 'tsup' | 'tsc';
|
package/package.json
CHANGED
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@types/yargs": "^17.0.32",
|
|
65
65
|
"@typescript-eslint/eslint-plugin": "^7.1.1",
|
|
66
66
|
"@typescript-eslint/parser": "^7.1.1",
|
|
67
|
-
"@xylabs/tsconfig": "~3.5.
|
|
67
|
+
"@xylabs/tsconfig": "~3.5.1",
|
|
68
68
|
"async-mutex": "^0.4.1",
|
|
69
69
|
"chalk": "^4.1.2",
|
|
70
70
|
"cosmiconfig": "^9.0.0",
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
"@types/license-checker": "^25.0.6",
|
|
113
113
|
"@types/lodash": "^4.14.202",
|
|
114
114
|
"@types/parse-git-config": "^3.0.4",
|
|
115
|
-
"@xylabs/eslint-config": "~3.5.
|
|
116
|
-
"@xylabs/tsconfig": "~3.5.
|
|
115
|
+
"@xylabs/eslint-config": "~3.5.1",
|
|
116
|
+
"@xylabs/tsconfig": "~3.5.1",
|
|
117
117
|
"publint": "^0.2.7",
|
|
118
118
|
"typescript": "^5.4.2"
|
|
119
119
|
},
|
|
@@ -169,6 +169,6 @@
|
|
|
169
169
|
"package-clean": "echo Not cleaning..."
|
|
170
170
|
},
|
|
171
171
|
"sideEffects": false,
|
|
172
|
-
"version": "3.5.
|
|
172
|
+
"version": "3.5.1",
|
|
173
173
|
"type": "commonjs"
|
|
174
174
|
}
|
package/src/actions/clean.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { cleanESLint } from './clean-eslint'
|
|
1
|
+
import { runStepsAsync } from '../lib'
|
|
2
|
+
|
|
4
3
|
|
|
5
4
|
export interface CleanParams {
|
|
6
5
|
pkg?: string
|
|
@@ -22,5 +21,5 @@ export const cleanPackage = ({ pkg }: CleanPackageParams) => {
|
|
|
22
21
|
|
|
23
22
|
export const cleanAll = ({ verbose }: CleanParams) => {
|
|
24
23
|
const verboseOptions = verbose ? ['--verbose'] : ['--no-verbose']
|
|
25
|
-
return
|
|
24
|
+
return runStepsAsync('Clean', [['yarn', ['workspaces foreach', '-pA', '--jobs 64', ...verboseOptions, 'run', 'package-clean']]])
|
|
26
25
|
}
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { rm } from 'node:fs/promises'
|
|
2
2
|
import path from 'node:path'
|
|
3
3
|
|
|
4
4
|
import chalk from 'chalk'
|
|
5
5
|
|
|
6
|
-
export const packageCleanOutputs = () => {
|
|
6
|
+
export const packageCleanOutputs = async () => {
|
|
7
7
|
const pkg = process.env.INIT_CWD ?? '.'
|
|
8
8
|
const pkgName = process.env.npm_package_name
|
|
9
|
+
const folders: string[] = [path.join(pkg, 'dist'), path.join(pkg, 'build'), path.join(pkg, 'docs')]
|
|
9
10
|
console.log(chalk.green(`Cleaning Outputs [${pkgName}]`))
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
rmSync(dist, { force: true, recursive: true })
|
|
12
|
+
await Promise.all(folders.map((folder) => rm(folder, { force: true, recursive: true })))
|
|
13
13
|
|
|
14
|
-
const build = path.join(pkg, 'build')
|
|
15
|
-
rmSync(build, { force: true, recursive: true })
|
|
16
14
|
return 0
|
|
17
15
|
}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
+
import { rm } from 'node:fs/promises'
|
|
1
2
|
import path from 'node:path'
|
|
2
3
|
|
|
3
4
|
import chalk from 'chalk'
|
|
4
|
-
import { rimrafSync } from 'rimraf'
|
|
5
5
|
|
|
6
|
-
export const packageCleanTypescript = () => {
|
|
6
|
+
export const packageCleanTypescript = async () => {
|
|
7
7
|
const pkg = process.env.INIT_CWD ?? '.'
|
|
8
8
|
const pkgName = process.env.npm_package_name
|
|
9
9
|
console.log(chalk.green(`Cleaning Typescript [${pkgName}]`))
|
|
10
|
+
const files: string[] = [path.join(pkg, '*.tsbuildinfo'), path.join(pkg, '.tsconfig.*'), path.join(pkg, '.eslintcache')]
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
rimrafSync(buildInfo, { glob: true })
|
|
13
|
-
|
|
14
|
-
const tsConfig = path.join(pkg, '.tsconfig.*')
|
|
15
|
-
rimrafSync(tsConfig, { glob: true })
|
|
12
|
+
await Promise.all(files.map((file) => rm(file, { force: true, recursive: true })))
|
|
16
13
|
|
|
17
14
|
return 0
|
|
18
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { packageCleanOutputs } from './clean-outputs'
|
|
2
2
|
import { packageCleanTypescript } from './clean-typescript'
|
|
3
3
|
|
|
4
|
-
export const packageClean = () => {
|
|
5
|
-
return packageCleanOutputs()
|
|
4
|
+
export const packageClean = async () => {
|
|
5
|
+
return (await Promise.all([packageCleanOutputs(), packageCleanTypescript()])).reduce((prev, value) => prev + value, 0)
|
|
6
6
|
}
|