@icebreakers/monorepo 0.1.0 → 0.1.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/{chunk-J3MNI6VD.js → chunk-VFW6IW2P.js} +3 -88
- package/dist/cli.cjs +1 -80
- package/dist/cli.js +1 -1
- package/dist/index.cjs +1 -80
- package/dist/index.js +1 -1
- package/package.json +2 -1
|
@@ -4,16 +4,10 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
8
|
-
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
9
|
-
}) : x)(function(x) {
|
|
10
|
-
if (typeof require !== "undefined") return require.apply(this, arguments);
|
|
11
|
-
throw Error('Dynamic require of "' + x + '" is not supported');
|
|
12
|
-
});
|
|
13
7
|
var __esm = (fn, res) => function __init() {
|
|
14
8
|
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
15
9
|
};
|
|
16
|
-
var __commonJS = (cb, mod) => function
|
|
10
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
17
11
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
18
12
|
};
|
|
19
13
|
var __copyProps = (to, from, except, desc) => {
|
|
@@ -309,85 +303,6 @@ var require_set_value = __commonJS({
|
|
|
309
303
|
}
|
|
310
304
|
});
|
|
311
305
|
|
|
312
|
-
// ../../node_modules/.pnpm/klaw@4.1.0/node_modules/klaw/src/index.js
|
|
313
|
-
var require_src = __commonJS({
|
|
314
|
-
"../../node_modules/.pnpm/klaw@4.1.0/node_modules/klaw/src/index.js"(exports, module) {
|
|
315
|
-
"use strict";
|
|
316
|
-
init_esm_shims();
|
|
317
|
-
var { strictEqual } = __require("assert");
|
|
318
|
-
var path2 = __require("path");
|
|
319
|
-
var fs2 = __require("fs");
|
|
320
|
-
var { Readable } = __require("stream");
|
|
321
|
-
var { fileURLToPath: fileURLToPath2 } = __require("url");
|
|
322
|
-
var Walker = class extends Readable {
|
|
323
|
-
/**
|
|
324
|
-
* @param {string} dir
|
|
325
|
-
* @param {Object} options
|
|
326
|
-
*/
|
|
327
|
-
constructor(dir, options) {
|
|
328
|
-
if (dir instanceof URL) {
|
|
329
|
-
dir = fileURLToPath2(dir);
|
|
330
|
-
}
|
|
331
|
-
strictEqual(typeof dir, "string", "`dir` parameter should be of type string or file URL. Got type: " + typeof dir);
|
|
332
|
-
options = {
|
|
333
|
-
queueMethod: "shift",
|
|
334
|
-
pathSorter: void 0,
|
|
335
|
-
filter: void 0,
|
|
336
|
-
depthLimit: void 0,
|
|
337
|
-
preserveSymlinks: false,
|
|
338
|
-
...options,
|
|
339
|
-
objectMode: true
|
|
340
|
-
};
|
|
341
|
-
super(options);
|
|
342
|
-
this.root = path2.resolve(dir);
|
|
343
|
-
this.paths = [this.root];
|
|
344
|
-
this.options = options;
|
|
345
|
-
if (options.depthLimit > -1) {
|
|
346
|
-
this.rootDepth = this.root.split(path2.sep).length + 1;
|
|
347
|
-
}
|
|
348
|
-
this.fs = options.fs || fs2;
|
|
349
|
-
}
|
|
350
|
-
_read() {
|
|
351
|
-
if (this.paths.length === 0) {
|
|
352
|
-
return this.push(null);
|
|
353
|
-
}
|
|
354
|
-
const pathItem = this.paths[this.options.queueMethod]();
|
|
355
|
-
const statFunction = this.options.preserveSymlinks ? this.fs.lstat : this.fs.stat;
|
|
356
|
-
statFunction(pathItem, (err, stats) => {
|
|
357
|
-
const item = { path: pathItem, stats };
|
|
358
|
-
if (err) {
|
|
359
|
-
return this.emit("error", err, item);
|
|
360
|
-
}
|
|
361
|
-
if (!stats.isDirectory() || this.rootDepth && pathItem.split(path2.sep).length - this.rootDepth >= this.options.depthLimit) {
|
|
362
|
-
return this.push(item);
|
|
363
|
-
}
|
|
364
|
-
this.fs.readdir(pathItem, (err2, pathItems) => {
|
|
365
|
-
if (err2) {
|
|
366
|
-
this.push(item);
|
|
367
|
-
return this.emit("error", err2, item);
|
|
368
|
-
}
|
|
369
|
-
pathItems = pathItems.map(function(part) {
|
|
370
|
-
return path2.join(pathItem, part);
|
|
371
|
-
});
|
|
372
|
-
if (this.options.filter) {
|
|
373
|
-
pathItems = pathItems.filter(this.options.filter);
|
|
374
|
-
}
|
|
375
|
-
if (this.options.pathSorter) {
|
|
376
|
-
pathItems.sort(this.options.pathSorter);
|
|
377
|
-
}
|
|
378
|
-
this.paths.push.apply(this.paths, pathItems);
|
|
379
|
-
this.push(item);
|
|
380
|
-
});
|
|
381
|
-
});
|
|
382
|
-
}
|
|
383
|
-
};
|
|
384
|
-
function walk(root, options) {
|
|
385
|
-
return new Walker(root, options);
|
|
386
|
-
}
|
|
387
|
-
module.exports = walk;
|
|
388
|
-
}
|
|
389
|
-
});
|
|
390
|
-
|
|
391
306
|
// src/index.ts
|
|
392
307
|
init_esm_shims();
|
|
393
308
|
|
|
@@ -395,11 +310,11 @@ init_esm_shims();
|
|
|
395
310
|
init_esm_shims();
|
|
396
311
|
var import_get_value2 = __toESM(require_get_value(), 1);
|
|
397
312
|
var import_set_value = __toESM(require_set_value(), 1);
|
|
398
|
-
var import_klaw = __toESM(require_src(), 1);
|
|
399
313
|
import { fileURLToPath } from "node:url";
|
|
400
314
|
import process from "node:process";
|
|
401
315
|
import path from "pathe";
|
|
402
316
|
import fs from "fs-extra";
|
|
317
|
+
import klaw from "klaw";
|
|
403
318
|
|
|
404
319
|
// src/git.ts
|
|
405
320
|
init_esm_shims();
|
|
@@ -435,7 +350,7 @@ async function main(outdir = "") {
|
|
|
435
350
|
baseDir: cwd
|
|
436
351
|
});
|
|
437
352
|
const repoName = await gitClient.getRepoName();
|
|
438
|
-
for await (const file of (
|
|
353
|
+
for await (const file of klaw(assetsDir)) {
|
|
439
354
|
if (file.stats.isFile()) {
|
|
440
355
|
const relPath = path.relative(assetsDir, file.path);
|
|
441
356
|
const targetPath = path.resolve(absOutDir, relPath);
|
package/dist/cli.cjs
CHANGED
|
@@ -307,85 +307,6 @@ var require_set_value = __commonJS({
|
|
|
307
307
|
}
|
|
308
308
|
});
|
|
309
309
|
|
|
310
|
-
// ../../node_modules/.pnpm/klaw@4.1.0/node_modules/klaw/src/index.js
|
|
311
|
-
var require_src = __commonJS({
|
|
312
|
-
"../../node_modules/.pnpm/klaw@4.1.0/node_modules/klaw/src/index.js"(exports2, module2) {
|
|
313
|
-
"use strict";
|
|
314
|
-
init_cjs_shims();
|
|
315
|
-
var { strictEqual } = require("assert");
|
|
316
|
-
var path2 = require("path");
|
|
317
|
-
var fs2 = require("fs");
|
|
318
|
-
var { Readable } = require("stream");
|
|
319
|
-
var { fileURLToPath: fileURLToPath2 } = require("url");
|
|
320
|
-
var Walker = class extends Readable {
|
|
321
|
-
/**
|
|
322
|
-
* @param {string} dir
|
|
323
|
-
* @param {Object} options
|
|
324
|
-
*/
|
|
325
|
-
constructor(dir, options) {
|
|
326
|
-
if (dir instanceof URL) {
|
|
327
|
-
dir = fileURLToPath2(dir);
|
|
328
|
-
}
|
|
329
|
-
strictEqual(typeof dir, "string", "`dir` parameter should be of type string or file URL. Got type: " + typeof dir);
|
|
330
|
-
options = {
|
|
331
|
-
queueMethod: "shift",
|
|
332
|
-
pathSorter: void 0,
|
|
333
|
-
filter: void 0,
|
|
334
|
-
depthLimit: void 0,
|
|
335
|
-
preserveSymlinks: false,
|
|
336
|
-
...options,
|
|
337
|
-
objectMode: true
|
|
338
|
-
};
|
|
339
|
-
super(options);
|
|
340
|
-
this.root = path2.resolve(dir);
|
|
341
|
-
this.paths = [this.root];
|
|
342
|
-
this.options = options;
|
|
343
|
-
if (options.depthLimit > -1) {
|
|
344
|
-
this.rootDepth = this.root.split(path2.sep).length + 1;
|
|
345
|
-
}
|
|
346
|
-
this.fs = options.fs || fs2;
|
|
347
|
-
}
|
|
348
|
-
_read() {
|
|
349
|
-
if (this.paths.length === 0) {
|
|
350
|
-
return this.push(null);
|
|
351
|
-
}
|
|
352
|
-
const pathItem = this.paths[this.options.queueMethod]();
|
|
353
|
-
const statFunction = this.options.preserveSymlinks ? this.fs.lstat : this.fs.stat;
|
|
354
|
-
statFunction(pathItem, (err, stats) => {
|
|
355
|
-
const item = { path: pathItem, stats };
|
|
356
|
-
if (err) {
|
|
357
|
-
return this.emit("error", err, item);
|
|
358
|
-
}
|
|
359
|
-
if (!stats.isDirectory() || this.rootDepth && pathItem.split(path2.sep).length - this.rootDepth >= this.options.depthLimit) {
|
|
360
|
-
return this.push(item);
|
|
361
|
-
}
|
|
362
|
-
this.fs.readdir(pathItem, (err2, pathItems) => {
|
|
363
|
-
if (err2) {
|
|
364
|
-
this.push(item);
|
|
365
|
-
return this.emit("error", err2, item);
|
|
366
|
-
}
|
|
367
|
-
pathItems = pathItems.map(function(part) {
|
|
368
|
-
return path2.join(pathItem, part);
|
|
369
|
-
});
|
|
370
|
-
if (this.options.filter) {
|
|
371
|
-
pathItems = pathItems.filter(this.options.filter);
|
|
372
|
-
}
|
|
373
|
-
if (this.options.pathSorter) {
|
|
374
|
-
pathItems.sort(this.options.pathSorter);
|
|
375
|
-
}
|
|
376
|
-
this.paths.push.apply(this.paths, pathItems);
|
|
377
|
-
this.push(item);
|
|
378
|
-
});
|
|
379
|
-
});
|
|
380
|
-
}
|
|
381
|
-
};
|
|
382
|
-
function walk(root, options) {
|
|
383
|
-
return new Walker(root, options);
|
|
384
|
-
}
|
|
385
|
-
module2.exports = walk;
|
|
386
|
-
}
|
|
387
|
-
});
|
|
388
|
-
|
|
389
310
|
// src/cli.ts
|
|
390
311
|
init_cjs_shims();
|
|
391
312
|
|
|
@@ -397,7 +318,7 @@ var import_pathe = __toESM(require("pathe"), 1);
|
|
|
397
318
|
var import_fs_extra = __toESM(require("fs-extra"), 1);
|
|
398
319
|
var import_get_value2 = __toESM(require_get_value(), 1);
|
|
399
320
|
var import_set_value = __toESM(require_set_value(), 1);
|
|
400
|
-
var import_klaw = __toESM(
|
|
321
|
+
var import_klaw = __toESM(require("klaw"), 1);
|
|
401
322
|
|
|
402
323
|
// src/git.ts
|
|
403
324
|
init_cjs_shims();
|
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -312,85 +312,6 @@ var require_set_value = __commonJS({
|
|
|
312
312
|
}
|
|
313
313
|
});
|
|
314
314
|
|
|
315
|
-
// ../../node_modules/.pnpm/klaw@4.1.0/node_modules/klaw/src/index.js
|
|
316
|
-
var require_src = __commonJS({
|
|
317
|
-
"../../node_modules/.pnpm/klaw@4.1.0/node_modules/klaw/src/index.js"(exports2, module2) {
|
|
318
|
-
"use strict";
|
|
319
|
-
init_cjs_shims();
|
|
320
|
-
var { strictEqual } = require("assert");
|
|
321
|
-
var path2 = require("path");
|
|
322
|
-
var fs2 = require("fs");
|
|
323
|
-
var { Readable } = require("stream");
|
|
324
|
-
var { fileURLToPath: fileURLToPath2 } = require("url");
|
|
325
|
-
var Walker = class extends Readable {
|
|
326
|
-
/**
|
|
327
|
-
* @param {string} dir
|
|
328
|
-
* @param {Object} options
|
|
329
|
-
*/
|
|
330
|
-
constructor(dir, options) {
|
|
331
|
-
if (dir instanceof URL) {
|
|
332
|
-
dir = fileURLToPath2(dir);
|
|
333
|
-
}
|
|
334
|
-
strictEqual(typeof dir, "string", "`dir` parameter should be of type string or file URL. Got type: " + typeof dir);
|
|
335
|
-
options = {
|
|
336
|
-
queueMethod: "shift",
|
|
337
|
-
pathSorter: void 0,
|
|
338
|
-
filter: void 0,
|
|
339
|
-
depthLimit: void 0,
|
|
340
|
-
preserveSymlinks: false,
|
|
341
|
-
...options,
|
|
342
|
-
objectMode: true
|
|
343
|
-
};
|
|
344
|
-
super(options);
|
|
345
|
-
this.root = path2.resolve(dir);
|
|
346
|
-
this.paths = [this.root];
|
|
347
|
-
this.options = options;
|
|
348
|
-
if (options.depthLimit > -1) {
|
|
349
|
-
this.rootDepth = this.root.split(path2.sep).length + 1;
|
|
350
|
-
}
|
|
351
|
-
this.fs = options.fs || fs2;
|
|
352
|
-
}
|
|
353
|
-
_read() {
|
|
354
|
-
if (this.paths.length === 0) {
|
|
355
|
-
return this.push(null);
|
|
356
|
-
}
|
|
357
|
-
const pathItem = this.paths[this.options.queueMethod]();
|
|
358
|
-
const statFunction = this.options.preserveSymlinks ? this.fs.lstat : this.fs.stat;
|
|
359
|
-
statFunction(pathItem, (err, stats) => {
|
|
360
|
-
const item = { path: pathItem, stats };
|
|
361
|
-
if (err) {
|
|
362
|
-
return this.emit("error", err, item);
|
|
363
|
-
}
|
|
364
|
-
if (!stats.isDirectory() || this.rootDepth && pathItem.split(path2.sep).length - this.rootDepth >= this.options.depthLimit) {
|
|
365
|
-
return this.push(item);
|
|
366
|
-
}
|
|
367
|
-
this.fs.readdir(pathItem, (err2, pathItems) => {
|
|
368
|
-
if (err2) {
|
|
369
|
-
this.push(item);
|
|
370
|
-
return this.emit("error", err2, item);
|
|
371
|
-
}
|
|
372
|
-
pathItems = pathItems.map(function(part) {
|
|
373
|
-
return path2.join(pathItem, part);
|
|
374
|
-
});
|
|
375
|
-
if (this.options.filter) {
|
|
376
|
-
pathItems = pathItems.filter(this.options.filter);
|
|
377
|
-
}
|
|
378
|
-
if (this.options.pathSorter) {
|
|
379
|
-
pathItems.sort(this.options.pathSorter);
|
|
380
|
-
}
|
|
381
|
-
this.paths.push.apply(this.paths, pathItems);
|
|
382
|
-
this.push(item);
|
|
383
|
-
});
|
|
384
|
-
});
|
|
385
|
-
}
|
|
386
|
-
};
|
|
387
|
-
function walk(root, options) {
|
|
388
|
-
return new Walker(root, options);
|
|
389
|
-
}
|
|
390
|
-
module2.exports = walk;
|
|
391
|
-
}
|
|
392
|
-
});
|
|
393
|
-
|
|
394
315
|
// src/index.ts
|
|
395
316
|
var src_exports = {};
|
|
396
317
|
__export(src_exports, {
|
|
@@ -407,7 +328,7 @@ var import_pathe = __toESM(require("pathe"), 1);
|
|
|
407
328
|
var import_fs_extra = __toESM(require("fs-extra"), 1);
|
|
408
329
|
var import_get_value2 = __toESM(require_get_value(), 1);
|
|
409
330
|
var import_set_value = __toESM(require_set_value(), 1);
|
|
410
|
-
var import_klaw = __toESM(
|
|
331
|
+
var import_klaw = __toESM(require("klaw"), 1);
|
|
411
332
|
|
|
412
333
|
// src/git.ts
|
|
413
334
|
init_cjs_shims();
|
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/monorepo",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.1",
|
|
5
5
|
"description": "my monorepo config copyer",
|
|
6
6
|
"author": "sonofmagic",
|
|
7
7
|
"license": "MIT",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"fs-extra": "^11.2.0",
|
|
28
28
|
"git-url-parse": "^14.1.0",
|
|
29
|
+
"klaw": "^4.1.0",
|
|
29
30
|
"pathe": "^1.1.2",
|
|
30
31
|
"simple-git": "^3.25.0"
|
|
31
32
|
},
|