@icebreakers/monorepo 0.0.0 → 0.0.2

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/README.md ADDED
@@ -0,0 +1,5 @@
1
+ # @icebreakers/monorepo
2
+
3
+ ```sh
4
+ npx @icebreakers/monorepo@latest
5
+ ```
@@ -1,4 +1,4 @@
1
1
  # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/displaying-a-sponsor-button-in-your-repository
2
2
 
3
3
  github: [sonofmagic]
4
- custom: ["https://github.com/sonofmagic/sponsors"]
4
+ custom: ['https://github.com/sonofmagic/sponsors']
@@ -14,4 +14,4 @@ contact_links:
14
14
  # about: Love Vue.js? Please consider supporting us via Patreon.
15
15
  # - name: Open Collective
16
16
  # url: https://opencollective.com/vuejs/donate
17
- # about: Love Vue.js? Please consider supporting us via Open Collective.
17
+ # about: Love Vue.js? Please consider supporting us via Open Collective.
@@ -34,7 +34,7 @@ jobs:
34
34
  uses: actions/setup-node@v4
35
35
  with:
36
36
  node-version: ${{ matrix.node-version }}
37
- cache: 'pnpm'
37
+ cache: pnpm
38
38
 
39
39
  - name: Install dependencies
40
40
  run: pnpm install
@@ -9,7 +9,7 @@ on:
9
9
  concurrency: ${{ github.workflow }}-${{ github.ref }}
10
10
  env:
11
11
  HUSKY: 0
12
-
12
+
13
13
  jobs:
14
14
  release:
15
15
  name: Release
@@ -24,7 +24,7 @@ jobs:
24
24
  uses: actions/setup-node@v4
25
25
  with:
26
26
  node-version: 20
27
- cache: 'pnpm'
27
+ cache: pnpm
28
28
 
29
29
  - name: Install Dependencies
30
30
  run: pnpm i
@@ -47,4 +47,3 @@ jobs:
47
47
  uses: codecov/codecov-action@v4
48
48
  env:
49
49
  CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
50
-
@@ -1 +1 @@
1
- # pnpm lint-staged
1
+ pnpm lint-staged
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
17
17
  Examples of behavior that contributes to a positive environment for our
18
18
  community include:
19
19
 
20
- * Demonstrating empathy and kindness toward other people
21
- * Being respectful of differing opinions, viewpoints, and experiences
22
- * Giving and gracefully accepting constructive feedback
23
- * Accepting responsibility and apologizing to those affected by our mistakes,
20
+ - Demonstrating empathy and kindness toward other people
21
+ - Being respectful of differing opinions, viewpoints, and experiences
22
+ - Giving and gracefully accepting constructive feedback
23
+ - Accepting responsibility and apologizing to those affected by our mistakes,
24
24
  and learning from the experience
25
- * Focusing on what is best not just for us as individuals, but for the
25
+ - Focusing on what is best not just for us as individuals, but for the
26
26
  overall community
27
27
 
28
28
  Examples of unacceptable behavior include:
29
29
 
30
- * The use of sexualized language or imagery, and sexual attention or
30
+ - The use of sexualized language or imagery, and sexual attention or
31
31
  advances of any kind
32
- * Trolling, insulting or derogatory comments, and personal or political attacks
33
- * Public or private harassment
34
- * Publishing others' private information, such as a physical or email
32
+ - Trolling, insulting or derogatory comments, and personal or political attacks
33
+ - Public or private harassment
34
+ - Publishing others' private information, such as a physical or email
35
35
  address, without their explicit permission
36
- * Other conduct which could reasonably be considered inappropriate in a
36
+ - Other conduct which could reasonably be considered inappropriate in a
37
37
  professional setting
38
38
 
39
39
  ## Enforcement Responsibilities
@@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
106
106
  ### 4. Permanent Ban
107
107
 
108
108
  **Community Impact**: Demonstrating a pattern of violation of community
109
- standards, including sustained inappropriate behavior, harassment of an
109
+ standards, including sustained inappropriate behavior, harassment of an
110
110
  individual, or aggression toward or disparagement of classes of individuals.
111
111
 
112
112
  **Consequence**: A permanent ban from any sort of public interaction within
@@ -1 +0,0 @@
1
-
@@ -2,5 +2,5 @@ import type { UserConfig } from '@commitlint/types'
2
2
  // import { RuleConfigSeverity } from '@commitlint/types'
3
3
 
4
4
  export default <UserConfig>{
5
- extends: ['@commitlint/config-conventional']
5
+ extends: ['@commitlint/config-conventional'],
6
6
  }
@@ -1,3 +1,3 @@
1
1
  packages:
2
- - "apps/*"
3
- - "packages/*"
2
+ - 'apps/*'
3
+ - 'packages/*'
@@ -0,0 +1,41 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __esm = (fn, res) => function __init() {
8
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
9
+ };
10
+ var __commonJS = (cb, mod) => function __require() {
11
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+
30
+ // ../../node_modules/.pnpm/tsup@8.2.4_jiti@1.21.6_postcss@8.4.41_tsx@4.17.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/esm_shims.js
31
+ var init_esm_shims = __esm({
32
+ "../../node_modules/.pnpm/tsup@8.2.4_jiti@1.21.6_postcss@8.4.41_tsx@4.17.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/esm_shims.js"() {
33
+ "use strict";
34
+ }
35
+ });
36
+
37
+ export {
38
+ __commonJS,
39
+ __toESM,
40
+ init_esm_shims
41
+ };
package/dist/cli.cjs ADDED
@@ -0,0 +1,395 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esm = (fn, res) => function __init() {
9
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
+ };
11
+ var __commonJS = (cb, mod) => function __require() {
12
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
+ mod
29
+ ));
30
+
31
+ // ../../node_modules/.pnpm/tsup@8.2.4_jiti@1.21.6_postcss@8.4.41_tsx@4.17.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js
32
+ var getImportMetaUrl, importMetaUrl;
33
+ var init_cjs_shims = __esm({
34
+ "../../node_modules/.pnpm/tsup@8.2.4_jiti@1.21.6_postcss@8.4.41_tsx@4.17.0_typescript@5.5.4_yaml@2.5.0/node_modules/tsup/assets/cjs_shims.js"() {
35
+ "use strict";
36
+ getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.src || new URL("main.js", document.baseURI).href;
37
+ importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
38
+ }
39
+ });
40
+
41
+ // ../../node_modules/.pnpm/isobject@3.0.1/node_modules/isobject/index.js
42
+ var require_isobject = __commonJS({
43
+ "../../node_modules/.pnpm/isobject@3.0.1/node_modules/isobject/index.js"(exports2, module2) {
44
+ "use strict";
45
+ init_cjs_shims();
46
+ module2.exports = function isObject(val) {
47
+ return val != null && typeof val === "object" && Array.isArray(val) === false;
48
+ };
49
+ }
50
+ });
51
+
52
+ // ../../node_modules/.pnpm/get-value@3.0.1/node_modules/get-value/index.js
53
+ var require_get_value = __commonJS({
54
+ "../../node_modules/.pnpm/get-value@3.0.1/node_modules/get-value/index.js"(exports2, module2) {
55
+ "use strict";
56
+ init_cjs_shims();
57
+ var isObject = require_isobject();
58
+ module2.exports = function(target, path2, options) {
59
+ if (!isObject(options)) {
60
+ options = { default: options };
61
+ }
62
+ if (!isValidObject(target)) {
63
+ return typeof options.default !== "undefined" ? options.default : target;
64
+ }
65
+ if (typeof path2 === "number") {
66
+ path2 = String(path2);
67
+ }
68
+ const isArray = Array.isArray(path2);
69
+ const isString = typeof path2 === "string";
70
+ const splitChar = options.separator || ".";
71
+ const joinChar = options.joinChar || (typeof splitChar === "string" ? splitChar : ".");
72
+ if (!isString && !isArray) {
73
+ return target;
74
+ }
75
+ if (isString && path2 in target) {
76
+ return isValid(path2, target, options) ? target[path2] : options.default;
77
+ }
78
+ let segs = isArray ? path2 : split(path2, splitChar, options);
79
+ let len = segs.length;
80
+ let idx = 0;
81
+ do {
82
+ let prop = segs[idx];
83
+ if (typeof prop === "number") {
84
+ prop = String(prop);
85
+ }
86
+ while (prop && prop.slice(-1) === "\\") {
87
+ prop = join([prop.slice(0, -1), segs[++idx] || ""], joinChar, options);
88
+ }
89
+ if (prop in target) {
90
+ if (!isValid(prop, target, options)) {
91
+ return options.default;
92
+ }
93
+ target = target[prop];
94
+ } else {
95
+ let hasProp = false;
96
+ let n = idx + 1;
97
+ while (n < len) {
98
+ prop = join([prop, segs[n++]], joinChar, options);
99
+ if (hasProp = prop in target) {
100
+ if (!isValid(prop, target, options)) {
101
+ return options.default;
102
+ }
103
+ target = target[prop];
104
+ idx = n - 1;
105
+ break;
106
+ }
107
+ }
108
+ if (!hasProp) {
109
+ return options.default;
110
+ }
111
+ }
112
+ } while (++idx < len && isValidObject(target));
113
+ if (idx === len) {
114
+ return target;
115
+ }
116
+ return options.default;
117
+ };
118
+ function join(segs, joinChar, options) {
119
+ if (typeof options.join === "function") {
120
+ return options.join(segs);
121
+ }
122
+ return segs[0] + joinChar + segs[1];
123
+ }
124
+ function split(path2, splitChar, options) {
125
+ if (typeof options.split === "function") {
126
+ return options.split(path2);
127
+ }
128
+ return path2.split(splitChar);
129
+ }
130
+ function isValid(key, target, options) {
131
+ if (typeof options.isValid === "function") {
132
+ return options.isValid(key, target);
133
+ }
134
+ return true;
135
+ }
136
+ function isValidObject(val) {
137
+ return isObject(val) || Array.isArray(val) || typeof val === "function";
138
+ }
139
+ }
140
+ });
141
+
142
+ // ../../node_modules/.pnpm/is-primitive@3.0.1/node_modules/is-primitive/index.js
143
+ var require_is_primitive = __commonJS({
144
+ "../../node_modules/.pnpm/is-primitive@3.0.1/node_modules/is-primitive/index.js"(exports2, module2) {
145
+ "use strict";
146
+ init_cjs_shims();
147
+ module2.exports = function isPrimitive(val) {
148
+ if (typeof val === "object") {
149
+ return val === null;
150
+ }
151
+ return typeof val !== "function";
152
+ };
153
+ }
154
+ });
155
+
156
+ // ../../node_modules/.pnpm/is-plain-object@2.0.4/node_modules/is-plain-object/index.js
157
+ var require_is_plain_object = __commonJS({
158
+ "../../node_modules/.pnpm/is-plain-object@2.0.4/node_modules/is-plain-object/index.js"(exports2, module2) {
159
+ "use strict";
160
+ init_cjs_shims();
161
+ var isObject = require_isobject();
162
+ function isObjectObject(o) {
163
+ return isObject(o) === true && Object.prototype.toString.call(o) === "[object Object]";
164
+ }
165
+ module2.exports = function isPlainObject(o) {
166
+ var ctor, prot;
167
+ if (isObjectObject(o) === false) return false;
168
+ ctor = o.constructor;
169
+ if (typeof ctor !== "function") return false;
170
+ prot = ctor.prototype;
171
+ if (isObjectObject(prot) === false) return false;
172
+ if (prot.hasOwnProperty("isPrototypeOf") === false) {
173
+ return false;
174
+ }
175
+ return true;
176
+ };
177
+ }
178
+ });
179
+
180
+ // ../../node_modules/.pnpm/set-value@4.1.0/node_modules/set-value/index.js
181
+ var require_set_value = __commonJS({
182
+ "../../node_modules/.pnpm/set-value@4.1.0/node_modules/set-value/index.js"(exports2, module2) {
183
+ "use strict";
184
+ init_cjs_shims();
185
+ var { deleteProperty } = Reflect;
186
+ var isPrimitive = require_is_primitive();
187
+ var isPlainObject = require_is_plain_object();
188
+ var isObject = (value) => {
189
+ return typeof value === "object" && value !== null || typeof value === "function";
190
+ };
191
+ var isUnsafeKey = (key) => {
192
+ return key === "__proto__" || key === "constructor" || key === "prototype";
193
+ };
194
+ var validateKey = (key) => {
195
+ if (!isPrimitive(key)) {
196
+ throw new TypeError("Object keys must be strings or symbols");
197
+ }
198
+ if (isUnsafeKey(key)) {
199
+ throw new Error(`Cannot set unsafe key: "${key}"`);
200
+ }
201
+ };
202
+ var toStringKey = (input) => {
203
+ return Array.isArray(input) ? input.flat().map(String).join(",") : input;
204
+ };
205
+ var createMemoKey = (input, options) => {
206
+ if (typeof input !== "string" || !options) return input;
207
+ let key = input + ";";
208
+ if (options.arrays !== void 0) key += `arrays=${options.arrays};`;
209
+ if (options.separator !== void 0) key += `separator=${options.separator};`;
210
+ if (options.split !== void 0) key += `split=${options.split};`;
211
+ if (options.merge !== void 0) key += `merge=${options.merge};`;
212
+ if (options.preservePaths !== void 0) key += `preservePaths=${options.preservePaths};`;
213
+ return key;
214
+ };
215
+ var memoize = (input, options, fn) => {
216
+ const key = toStringKey(options ? createMemoKey(input, options) : input);
217
+ validateKey(key);
218
+ const value = setValue.cache.get(key) || fn();
219
+ setValue.cache.set(key, value);
220
+ return value;
221
+ };
222
+ var splitString = (input, options = {}) => {
223
+ const sep = options.separator || ".";
224
+ const preserve = sep === "/" ? false : options.preservePaths;
225
+ if (typeof input === "string" && preserve !== false && /\//.test(input)) {
226
+ return [input];
227
+ }
228
+ const parts = [];
229
+ let part = "";
230
+ const push = (part2) => {
231
+ let number;
232
+ if (part2.trim() !== "" && Number.isInteger(number = Number(part2))) {
233
+ parts.push(number);
234
+ } else {
235
+ parts.push(part2);
236
+ }
237
+ };
238
+ for (let i = 0; i < input.length; i++) {
239
+ const value = input[i];
240
+ if (value === "\\") {
241
+ part += input[++i];
242
+ continue;
243
+ }
244
+ if (value === sep) {
245
+ push(part);
246
+ part = "";
247
+ continue;
248
+ }
249
+ part += value;
250
+ }
251
+ if (part) {
252
+ push(part);
253
+ }
254
+ return parts;
255
+ };
256
+ var split = (input, options) => {
257
+ if (options && typeof options.split === "function") return options.split(input);
258
+ if (typeof input === "symbol") return [input];
259
+ if (Array.isArray(input)) return input;
260
+ return memoize(input, options, () => splitString(input, options));
261
+ };
262
+ var assignProp = (obj, prop, value, options) => {
263
+ validateKey(prop);
264
+ if (value === void 0) {
265
+ deleteProperty(obj, prop);
266
+ } else if (options && options.merge) {
267
+ const merge = options.merge === "function" ? options.merge : Object.assign;
268
+ if (merge && isPlainObject(obj[prop]) && isPlainObject(value)) {
269
+ obj[prop] = merge(obj[prop], value);
270
+ } else {
271
+ obj[prop] = value;
272
+ }
273
+ } else {
274
+ obj[prop] = value;
275
+ }
276
+ return obj;
277
+ };
278
+ var setValue = (target, path2, value, options) => {
279
+ if (!path2 || !isObject(target)) return target;
280
+ const keys = split(path2, options);
281
+ let obj = target;
282
+ for (let i = 0; i < keys.length; i++) {
283
+ const key = keys[i];
284
+ const next = keys[i + 1];
285
+ validateKey(key);
286
+ if (next === void 0) {
287
+ assignProp(obj, key, value, options);
288
+ break;
289
+ }
290
+ if (typeof next === "number" && !Array.isArray(obj[key])) {
291
+ obj = obj[key] = [];
292
+ continue;
293
+ }
294
+ if (!isObject(obj[key])) {
295
+ obj[key] = {};
296
+ }
297
+ obj = obj[key];
298
+ }
299
+ return target;
300
+ };
301
+ setValue.split = split;
302
+ setValue.cache = /* @__PURE__ */ new Map();
303
+ setValue.clear = () => {
304
+ setValue.cache = /* @__PURE__ */ new Map();
305
+ };
306
+ module2.exports = setValue;
307
+ }
308
+ });
309
+
310
+ // src/cli.ts
311
+ init_cjs_shims();
312
+ var import_node_url = require("url");
313
+ var import_node_process = __toESM(require("process"), 1);
314
+ var import_pathe = __toESM(require("pathe"), 1);
315
+ var import_fs_extra = __toESM(require("fs-extra"), 1);
316
+ var import_get_value = __toESM(require_get_value(), 1);
317
+ var import_set_value = __toESM(require_set_value(), 1);
318
+ var __filename2 = (0, import_node_url.fileURLToPath)(importMetaUrl);
319
+ var __dirname = import_pathe.default.dirname(__filename2);
320
+ var assetsDir = import_pathe.default.join(__dirname, "./assets");
321
+ var cwd = import_node_process.default.cwd();
322
+ async function main() {
323
+ const list = await import_fs_extra.default.readdir(assetsDir);
324
+ for (const item of list) {
325
+ if (item === "package.json") {
326
+ const sourcePath = import_pathe.default.resolve(assetsDir, item);
327
+ const targetPath = import_pathe.default.resolve(cwd, item);
328
+ if (await import_fs_extra.default.exists(targetPath) && await import_fs_extra.default.exists(sourcePath)) {
329
+ const sourcePkgJson = await import_fs_extra.default.readJson(sourcePath);
330
+ const targetPkgJson = await import_fs_extra.default.readJson(targetPath);
331
+ const deps = (0, import_get_value.default)(sourcePkgJson, "dependencies", { default: {} });
332
+ const devDeps = (0, import_get_value.default)(sourcePkgJson, "devDependencies", { default: {} });
333
+ Object.entries(deps).forEach((x) => {
334
+ (0, import_set_value.default)(targetPkgJson, x[0], x[1]);
335
+ });
336
+ Object.entries(devDeps).forEach((x) => {
337
+ (0, import_set_value.default)(targetPkgJson, x[0], x[1]);
338
+ });
339
+ await import_fs_extra.default.writeJson(targetPath, targetPkgJson, {
340
+ spaces: 2
341
+ });
342
+ }
343
+ } else {
344
+ await import_fs_extra.default.copy(
345
+ import_pathe.default.resolve(assetsDir, item),
346
+ import_pathe.default.resolve(cwd, item)
347
+ );
348
+ }
349
+ }
350
+ }
351
+ main().then(() => {
352
+ console.log("@icebreakers/monorepo ok!");
353
+ });
354
+ /*! Bundled license information:
355
+
356
+ isobject/index.js:
357
+ (*!
358
+ * isobject <https://github.com/jonschlinkert/isobject>
359
+ *
360
+ * Copyright (c) 2014-2017, Jon Schlinkert.
361
+ * Released under the MIT License.
362
+ *)
363
+
364
+ get-value/index.js:
365
+ (*!
366
+ * get-value <https://github.com/jonschlinkert/get-value>
367
+ *
368
+ * Copyright (c) 2014-2018, Jon Schlinkert.
369
+ * Released under the MIT License.
370
+ *)
371
+
372
+ is-primitive/index.js:
373
+ (*!
374
+ * is-primitive <https://github.com/jonschlinkert/is-primitive>
375
+ *
376
+ * Copyright (c) 2014-present, Jon Schlinkert.
377
+ * Released under the MIT License.
378
+ *)
379
+
380
+ is-plain-object/index.js:
381
+ (*!
382
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
383
+ *
384
+ * Copyright (c) 2014-2017, Jon Schlinkert.
385
+ * Released under the MIT License.
386
+ *)
387
+
388
+ set-value/index.js:
389
+ (*!
390
+ * set-value <https://github.com/jonschlinkert/set-value>
391
+ *
392
+ * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert).
393
+ * Released under the MIT License.
394
+ *)
395
+ */
package/dist/cli.d.cts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/dist/cli.js ADDED
@@ -0,0 +1,361 @@
1
+ import {
2
+ __commonJS,
3
+ __toESM,
4
+ init_esm_shims
5
+ } from "./chunk-22Y5C5SV.js";
6
+
7
+ // ../../node_modules/.pnpm/isobject@3.0.1/node_modules/isobject/index.js
8
+ var require_isobject = __commonJS({
9
+ "../../node_modules/.pnpm/isobject@3.0.1/node_modules/isobject/index.js"(exports, module) {
10
+ "use strict";
11
+ init_esm_shims();
12
+ module.exports = function isObject(val) {
13
+ return val != null && typeof val === "object" && Array.isArray(val) === false;
14
+ };
15
+ }
16
+ });
17
+
18
+ // ../../node_modules/.pnpm/get-value@3.0.1/node_modules/get-value/index.js
19
+ var require_get_value = __commonJS({
20
+ "../../node_modules/.pnpm/get-value@3.0.1/node_modules/get-value/index.js"(exports, module) {
21
+ "use strict";
22
+ init_esm_shims();
23
+ var isObject = require_isobject();
24
+ module.exports = function(target, path2, options) {
25
+ if (!isObject(options)) {
26
+ options = { default: options };
27
+ }
28
+ if (!isValidObject(target)) {
29
+ return typeof options.default !== "undefined" ? options.default : target;
30
+ }
31
+ if (typeof path2 === "number") {
32
+ path2 = String(path2);
33
+ }
34
+ const isArray = Array.isArray(path2);
35
+ const isString = typeof path2 === "string";
36
+ const splitChar = options.separator || ".";
37
+ const joinChar = options.joinChar || (typeof splitChar === "string" ? splitChar : ".");
38
+ if (!isString && !isArray) {
39
+ return target;
40
+ }
41
+ if (isString && path2 in target) {
42
+ return isValid(path2, target, options) ? target[path2] : options.default;
43
+ }
44
+ let segs = isArray ? path2 : split(path2, splitChar, options);
45
+ let len = segs.length;
46
+ let idx = 0;
47
+ do {
48
+ let prop = segs[idx];
49
+ if (typeof prop === "number") {
50
+ prop = String(prop);
51
+ }
52
+ while (prop && prop.slice(-1) === "\\") {
53
+ prop = join([prop.slice(0, -1), segs[++idx] || ""], joinChar, options);
54
+ }
55
+ if (prop in target) {
56
+ if (!isValid(prop, target, options)) {
57
+ return options.default;
58
+ }
59
+ target = target[prop];
60
+ } else {
61
+ let hasProp = false;
62
+ let n = idx + 1;
63
+ while (n < len) {
64
+ prop = join([prop, segs[n++]], joinChar, options);
65
+ if (hasProp = prop in target) {
66
+ if (!isValid(prop, target, options)) {
67
+ return options.default;
68
+ }
69
+ target = target[prop];
70
+ idx = n - 1;
71
+ break;
72
+ }
73
+ }
74
+ if (!hasProp) {
75
+ return options.default;
76
+ }
77
+ }
78
+ } while (++idx < len && isValidObject(target));
79
+ if (idx === len) {
80
+ return target;
81
+ }
82
+ return options.default;
83
+ };
84
+ function join(segs, joinChar, options) {
85
+ if (typeof options.join === "function") {
86
+ return options.join(segs);
87
+ }
88
+ return segs[0] + joinChar + segs[1];
89
+ }
90
+ function split(path2, splitChar, options) {
91
+ if (typeof options.split === "function") {
92
+ return options.split(path2);
93
+ }
94
+ return path2.split(splitChar);
95
+ }
96
+ function isValid(key, target, options) {
97
+ if (typeof options.isValid === "function") {
98
+ return options.isValid(key, target);
99
+ }
100
+ return true;
101
+ }
102
+ function isValidObject(val) {
103
+ return isObject(val) || Array.isArray(val) || typeof val === "function";
104
+ }
105
+ }
106
+ });
107
+
108
+ // ../../node_modules/.pnpm/is-primitive@3.0.1/node_modules/is-primitive/index.js
109
+ var require_is_primitive = __commonJS({
110
+ "../../node_modules/.pnpm/is-primitive@3.0.1/node_modules/is-primitive/index.js"(exports, module) {
111
+ "use strict";
112
+ init_esm_shims();
113
+ module.exports = function isPrimitive(val) {
114
+ if (typeof val === "object") {
115
+ return val === null;
116
+ }
117
+ return typeof val !== "function";
118
+ };
119
+ }
120
+ });
121
+
122
+ // ../../node_modules/.pnpm/is-plain-object@2.0.4/node_modules/is-plain-object/index.js
123
+ var require_is_plain_object = __commonJS({
124
+ "../../node_modules/.pnpm/is-plain-object@2.0.4/node_modules/is-plain-object/index.js"(exports, module) {
125
+ "use strict";
126
+ init_esm_shims();
127
+ var isObject = require_isobject();
128
+ function isObjectObject(o) {
129
+ return isObject(o) === true && Object.prototype.toString.call(o) === "[object Object]";
130
+ }
131
+ module.exports = function isPlainObject(o) {
132
+ var ctor, prot;
133
+ if (isObjectObject(o) === false) return false;
134
+ ctor = o.constructor;
135
+ if (typeof ctor !== "function") return false;
136
+ prot = ctor.prototype;
137
+ if (isObjectObject(prot) === false) return false;
138
+ if (prot.hasOwnProperty("isPrototypeOf") === false) {
139
+ return false;
140
+ }
141
+ return true;
142
+ };
143
+ }
144
+ });
145
+
146
+ // ../../node_modules/.pnpm/set-value@4.1.0/node_modules/set-value/index.js
147
+ var require_set_value = __commonJS({
148
+ "../../node_modules/.pnpm/set-value@4.1.0/node_modules/set-value/index.js"(exports, module) {
149
+ "use strict";
150
+ init_esm_shims();
151
+ var { deleteProperty } = Reflect;
152
+ var isPrimitive = require_is_primitive();
153
+ var isPlainObject = require_is_plain_object();
154
+ var isObject = (value) => {
155
+ return typeof value === "object" && value !== null || typeof value === "function";
156
+ };
157
+ var isUnsafeKey = (key) => {
158
+ return key === "__proto__" || key === "constructor" || key === "prototype";
159
+ };
160
+ var validateKey = (key) => {
161
+ if (!isPrimitive(key)) {
162
+ throw new TypeError("Object keys must be strings or symbols");
163
+ }
164
+ if (isUnsafeKey(key)) {
165
+ throw new Error(`Cannot set unsafe key: "${key}"`);
166
+ }
167
+ };
168
+ var toStringKey = (input) => {
169
+ return Array.isArray(input) ? input.flat().map(String).join(",") : input;
170
+ };
171
+ var createMemoKey = (input, options) => {
172
+ if (typeof input !== "string" || !options) return input;
173
+ let key = input + ";";
174
+ if (options.arrays !== void 0) key += `arrays=${options.arrays};`;
175
+ if (options.separator !== void 0) key += `separator=${options.separator};`;
176
+ if (options.split !== void 0) key += `split=${options.split};`;
177
+ if (options.merge !== void 0) key += `merge=${options.merge};`;
178
+ if (options.preservePaths !== void 0) key += `preservePaths=${options.preservePaths};`;
179
+ return key;
180
+ };
181
+ var memoize = (input, options, fn) => {
182
+ const key = toStringKey(options ? createMemoKey(input, options) : input);
183
+ validateKey(key);
184
+ const value = setValue.cache.get(key) || fn();
185
+ setValue.cache.set(key, value);
186
+ return value;
187
+ };
188
+ var splitString = (input, options = {}) => {
189
+ const sep = options.separator || ".";
190
+ const preserve = sep === "/" ? false : options.preservePaths;
191
+ if (typeof input === "string" && preserve !== false && /\//.test(input)) {
192
+ return [input];
193
+ }
194
+ const parts = [];
195
+ let part = "";
196
+ const push = (part2) => {
197
+ let number;
198
+ if (part2.trim() !== "" && Number.isInteger(number = Number(part2))) {
199
+ parts.push(number);
200
+ } else {
201
+ parts.push(part2);
202
+ }
203
+ };
204
+ for (let i = 0; i < input.length; i++) {
205
+ const value = input[i];
206
+ if (value === "\\") {
207
+ part += input[++i];
208
+ continue;
209
+ }
210
+ if (value === sep) {
211
+ push(part);
212
+ part = "";
213
+ continue;
214
+ }
215
+ part += value;
216
+ }
217
+ if (part) {
218
+ push(part);
219
+ }
220
+ return parts;
221
+ };
222
+ var split = (input, options) => {
223
+ if (options && typeof options.split === "function") return options.split(input);
224
+ if (typeof input === "symbol") return [input];
225
+ if (Array.isArray(input)) return input;
226
+ return memoize(input, options, () => splitString(input, options));
227
+ };
228
+ var assignProp = (obj, prop, value, options) => {
229
+ validateKey(prop);
230
+ if (value === void 0) {
231
+ deleteProperty(obj, prop);
232
+ } else if (options && options.merge) {
233
+ const merge = options.merge === "function" ? options.merge : Object.assign;
234
+ if (merge && isPlainObject(obj[prop]) && isPlainObject(value)) {
235
+ obj[prop] = merge(obj[prop], value);
236
+ } else {
237
+ obj[prop] = value;
238
+ }
239
+ } else {
240
+ obj[prop] = value;
241
+ }
242
+ return obj;
243
+ };
244
+ var setValue = (target, path2, value, options) => {
245
+ if (!path2 || !isObject(target)) return target;
246
+ const keys = split(path2, options);
247
+ let obj = target;
248
+ for (let i = 0; i < keys.length; i++) {
249
+ const key = keys[i];
250
+ const next = keys[i + 1];
251
+ validateKey(key);
252
+ if (next === void 0) {
253
+ assignProp(obj, key, value, options);
254
+ break;
255
+ }
256
+ if (typeof next === "number" && !Array.isArray(obj[key])) {
257
+ obj = obj[key] = [];
258
+ continue;
259
+ }
260
+ if (!isObject(obj[key])) {
261
+ obj[key] = {};
262
+ }
263
+ obj = obj[key];
264
+ }
265
+ return target;
266
+ };
267
+ setValue.split = split;
268
+ setValue.cache = /* @__PURE__ */ new Map();
269
+ setValue.clear = () => {
270
+ setValue.cache = /* @__PURE__ */ new Map();
271
+ };
272
+ module.exports = setValue;
273
+ }
274
+ });
275
+
276
+ // src/cli.ts
277
+ init_esm_shims();
278
+ var import_get_value = __toESM(require_get_value(), 1);
279
+ var import_set_value = __toESM(require_set_value(), 1);
280
+ import { fileURLToPath } from "node:url";
281
+ import process from "node:process";
282
+ import path from "pathe";
283
+ import fs from "fs-extra";
284
+ var __filename = fileURLToPath(import.meta.url);
285
+ var __dirname = path.dirname(__filename);
286
+ var assetsDir = path.join(__dirname, "./assets");
287
+ var cwd = process.cwd();
288
+ async function main() {
289
+ const list = await fs.readdir(assetsDir);
290
+ for (const item of list) {
291
+ if (item === "package.json") {
292
+ const sourcePath = path.resolve(assetsDir, item);
293
+ const targetPath = path.resolve(cwd, item);
294
+ if (await fs.exists(targetPath) && await fs.exists(sourcePath)) {
295
+ const sourcePkgJson = await fs.readJson(sourcePath);
296
+ const targetPkgJson = await fs.readJson(targetPath);
297
+ const deps = (0, import_get_value.default)(sourcePkgJson, "dependencies", { default: {} });
298
+ const devDeps = (0, import_get_value.default)(sourcePkgJson, "devDependencies", { default: {} });
299
+ Object.entries(deps).forEach((x) => {
300
+ (0, import_set_value.default)(targetPkgJson, x[0], x[1]);
301
+ });
302
+ Object.entries(devDeps).forEach((x) => {
303
+ (0, import_set_value.default)(targetPkgJson, x[0], x[1]);
304
+ });
305
+ await fs.writeJson(targetPath, targetPkgJson, {
306
+ spaces: 2
307
+ });
308
+ }
309
+ } else {
310
+ await fs.copy(
311
+ path.resolve(assetsDir, item),
312
+ path.resolve(cwd, item)
313
+ );
314
+ }
315
+ }
316
+ }
317
+ main().then(() => {
318
+ console.log("@icebreakers/monorepo ok!");
319
+ });
320
+ /*! Bundled license information:
321
+
322
+ isobject/index.js:
323
+ (*!
324
+ * isobject <https://github.com/jonschlinkert/isobject>
325
+ *
326
+ * Copyright (c) 2014-2017, Jon Schlinkert.
327
+ * Released under the MIT License.
328
+ *)
329
+
330
+ get-value/index.js:
331
+ (*!
332
+ * get-value <https://github.com/jonschlinkert/get-value>
333
+ *
334
+ * Copyright (c) 2014-2018, Jon Schlinkert.
335
+ * Released under the MIT License.
336
+ *)
337
+
338
+ is-primitive/index.js:
339
+ (*!
340
+ * is-primitive <https://github.com/jonschlinkert/is-primitive>
341
+ *
342
+ * Copyright (c) 2014-present, Jon Schlinkert.
343
+ * Released under the MIT License.
344
+ *)
345
+
346
+ is-plain-object/index.js:
347
+ (*!
348
+ * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
349
+ *
350
+ * Copyright (c) 2014-2017, Jon Schlinkert.
351
+ * Released under the MIT License.
352
+ *)
353
+
354
+ set-value/index.js:
355
+ (*!
356
+ * set-value <https://github.com/jonschlinkert/set-value>
357
+ *
358
+ * Copyright (c) Jon Schlinkert (https://github.com/jonschlinkert).
359
+ * Released under the MIT License.
360
+ *)
361
+ */
package/dist/index.js CHANGED
@@ -0,0 +1,6 @@
1
+ import {
2
+ init_esm_shims
3
+ } from "./chunk-22Y5C5SV.js";
4
+
5
+ // src/index.ts
6
+ init_esm_shims();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@icebreakers/monorepo",
3
3
  "type": "module",
4
- "version": "0.0.0",
4
+ "version": "0.0.2",
5
5
  "description": "my monorepo config copyer",
6
6
  "author": "",
7
7
  "license": "MIT",