@przeprogramowani/10x-cli 1.13.0 → 1.14.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/index.mjs +17 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -9261,7 +9261,7 @@ var cac = (name = "") => new CAC(name);
|
|
|
9261
9261
|
// package.json
|
|
9262
9262
|
var package_default = {
|
|
9263
9263
|
name: "@przeprogramowani/10x-cli",
|
|
9264
|
-
version: "1.
|
|
9264
|
+
version: "1.14.0",
|
|
9265
9265
|
description: "Open-source CLI for 10xDevs course content",
|
|
9266
9266
|
repository: {
|
|
9267
9267
|
type: "git",
|
|
@@ -10827,6 +10827,7 @@ async function runBenchKitInit(ctx, dirArg, options, deps = defaultDeps) {
|
|
|
10827
10827
|
const templateVersion = readTemplateVersion(ctx, scratch);
|
|
10828
10828
|
mkdirSync3(targetDir, { recursive: true });
|
|
10829
10829
|
const copied = materialize(scratch, targetDir, { skipExisting: repair });
|
|
10830
|
+
installWorkflows(targetDir, { skipExisting: repair });
|
|
10830
10831
|
let baseRepo = null;
|
|
10831
10832
|
if (!repair) {
|
|
10832
10833
|
const detected = await deps.detectBaseRepo(process.cwd());
|
|
@@ -10907,6 +10908,21 @@ function readTemplateVersion(ctx, cloneDir) {
|
|
|
10907
10908
|
}
|
|
10908
10909
|
return readFileSync2(versionFile, "utf8").trim();
|
|
10909
10910
|
}
|
|
10911
|
+
function installWorkflows(targetDir, opts) {
|
|
10912
|
+
const srcDir = join2(targetDir, ".bench-kit", "workflows");
|
|
10913
|
+
if (!existsSync2(srcDir))
|
|
10914
|
+
return;
|
|
10915
|
+
const destDir = join2(targetDir, ".github", "workflows");
|
|
10916
|
+
mkdirSync3(destDir, { recursive: true });
|
|
10917
|
+
for (const entry of readdirSync(srcDir, { withFileTypes: true })) {
|
|
10918
|
+
if (!entry.isFile())
|
|
10919
|
+
continue;
|
|
10920
|
+
const to = join2(destDir, entry.name);
|
|
10921
|
+
if (opts.skipExisting && existsSync2(to))
|
|
10922
|
+
continue;
|
|
10923
|
+
cpSync(join2(srcDir, entry.name), to);
|
|
10924
|
+
}
|
|
10925
|
+
}
|
|
10910
10926
|
function materialize(srcDir, destDir, opts) {
|
|
10911
10927
|
let copied = 0;
|
|
10912
10928
|
const walk = (rel) => {
|