@storm-software/unbuild 0.30.5 → 0.31.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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  writeTrace
3
- } from "./chunk-TPFSDZCR.js";
3
+ } from "./chunk-VWXW3RW5.js";
4
4
  import {
5
5
  __name
6
6
  } from "./chunk-3GQAWCBQ.js";
@@ -1,25 +1,25 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkV627S7QUcjs = require('./chunk-V627S7QU.cjs');
3
+ var _chunk26OHEX55cjs = require('./chunk-26OHEX55.cjs');
4
4
 
5
5
 
6
6
  var _chunkSHHAZOHNcjs = require('./chunk-SHHAZOHN.cjs');
7
7
 
8
8
 
9
- var _chunkPSYW5YJBcjs = require('./chunk-PSYW5YJB.cjs');
9
+ var _chunkKDTFDJN3cjs = require('./chunk-KDTFDJN3.cjs');
10
10
 
11
11
 
12
- var _chunkCF2C3GEVcjs = require('./chunk-CF2C3GEV.cjs');
12
+ var _chunkGVX7LSWKcjs = require('./chunk-GVX7LSWK.cjs');
13
13
 
14
14
 
15
15
  var _chunkYDYGZTJKcjs = require('./chunk-YDYGZTJK.cjs');
16
16
 
17
17
  // src/config.ts
18
18
  var getDefaultBuildPlugins = /* @__PURE__ */ _chunkYDYGZTJKcjs.__name.call(void 0, async (options, resolvedOptions) => Promise.all([
19
- _chunkPSYW5YJBcjs.analyzePlugin.call(void 0, options, resolvedOptions),
19
+ _chunkKDTFDJN3cjs.analyzePlugin.call(void 0, options, resolvedOptions),
20
20
  _chunkSHHAZOHNcjs.typeDefinitions.call(void 0, resolvedOptions.projectRoot),
21
- _chunkV627S7QUcjs.tscPlugin.call(void 0, options, resolvedOptions),
22
- _chunkCF2C3GEVcjs.onErrorPlugin.call(void 0, options, resolvedOptions)
21
+ _chunk26OHEX55cjs.tscPlugin.call(void 0, options, resolvedOptions),
22
+ _chunkGVX7LSWKcjs.onErrorPlugin.call(void 0, options, resolvedOptions)
23
23
  ].map((plugin) => Promise.resolve(plugin))), "getDefaultBuildPlugins");
24
24
 
25
25
 
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  tscPlugin
3
- } from "./chunk-C5IHRWT3.js";
3
+ } from "./chunk-NYVG7QMW.js";
4
4
  import {
5
5
  typeDefinitions
6
6
  } from "./chunk-ESRR2FD2.js";
7
7
  import {
8
8
  analyzePlugin
9
- } from "./chunk-KPFCICEG.js";
9
+ } from "./chunk-3Q2ZB7CN.js";
10
10
  import {
11
11
  onErrorPlugin
12
- } from "./chunk-5S4A4OEA.js";
12
+ } from "./chunk-G2BQ6VSR.js";
13
13
  import {
14
14
  __name
15
15
  } from "./chunk-3GQAWCBQ.js";
@@ -188,6 +188,8 @@ var ColorConfigMapSchema = z.union([
188
188
  }),
189
189
  z.record(z.string(), ColorConfigSchema)
190
190
  ]);
191
+ var ExtendsItemSchema = z.string().trim().describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
192
+ var ExtendsSchema = ExtendsItemSchema.or(z.array(ExtendsItemSchema)).describe("The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration.");
191
193
  var WorkspaceBotConfigSchema = z.object({
192
194
  name: z.string().trim().default("Stormie-Bot").describe("The workspace bot user's name (this is the bot that will be used to perform various tasks)"),
193
195
  email: z.string().trim().email().default("bot@stormsoftware.com").describe("The email of the workspace bot")
@@ -202,11 +204,11 @@ var WorkspaceDirectoryConfigSchema = z.object({
202
204
  }).describe("Various directories used by the workspace to store data, cache, and configuration files");
203
205
  var StormConfigSchema = z.object({
204
206
  $schema: z.string().trim().default("https://cdn.jsdelivr.net/npm/@storm-software/config/schemas/storm.schema.json").optional().nullish().describe("The URL to the JSON schema file that describes the Storm configuration file"),
205
- extends: z.string().trim().optional().describe("The path to a base JSON file to use as a configuration preset file"),
207
+ extends: ExtendsSchema.optional(),
206
208
  name: z.string().trim().toLowerCase().optional().describe("The name of the service/package/scope using this configuration"),
207
209
  namespace: z.string().trim().toLowerCase().optional().describe("The namespace of the package"),
208
210
  organization: z.string().trim().default("storm-software").describe("The organization of the workspace"),
209
- repository: z.string().trim().url().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
211
+ repository: z.string().trim().optional().describe("The repo URL of the workspace (i.e. GitHub)"),
210
212
  license: z.string().trim().default("Apache-2.0").describe("The license type of the package"),
211
213
  homepage: z.string().trim().url().default(STORM_DEFAULT_HOMEPAGE).describe("The homepage of the workspace"),
212
214
  docs: z.string().trim().url().default(STORM_DEFAULT_DOCS).describe("The base documentation site for the workspace"),
@@ -269,7 +271,8 @@ var COLOR_KEYS = [
269
271
  ];
270
272
 
271
273
  // ../config-tools/src/utilities/get-default-config.ts
272
- import { existsSync as existsSync2, readFileSync } from "node:fs";
274
+ import { existsSync as existsSync2 } from "node:fs";
275
+ import { readFile } from "node:fs/promises";
273
276
  import { join as join2 } from "node:path";
274
277
 
275
278
  // ../config-tools/src/utilities/find-up.ts
@@ -373,17 +376,15 @@ var DEFAULT_COLOR_CONFIG = {
373
376
  "negative": "#dc2626"
374
377
  }
375
378
  };
376
- var getDefaultConfig = /* @__PURE__ */ __name((root) => {
379
+ var getDefaultConfig = /* @__PURE__ */ __name(async (root) => {
377
380
  let license = STORM_DEFAULT_LICENSE;
378
381
  let homepage = STORM_DEFAULT_HOMEPAGE;
379
- let name;
380
- let namespace;
381
- let repository;
382
+ let name = void 0;
383
+ let namespace = void 0;
384
+ let repository = void 0;
382
385
  const workspaceRoot = findWorkspaceRoot(root);
383
386
  if (existsSync2(join2(workspaceRoot, "package.json"))) {
384
- const file = readFileSync(join2(workspaceRoot, "package.json"), {
385
- encoding: "utf8"
386
- });
387
+ const file = await readFile(joinPaths(workspaceRoot, "package.json"), "utf8");
387
388
  if (file) {
388
389
  const packageJson = JSON.parse(file);
389
390
  if (packageJson.name) {
@@ -392,8 +393,12 @@ var getDefaultConfig = /* @__PURE__ */ __name((root) => {
392
393
  if (packageJson.namespace) {
393
394
  namespace = packageJson.namespace;
394
395
  }
395
- if (packageJson.repository?.url) {
396
- repository = packageJson.repository?.url;
396
+ if (packageJson.repository) {
397
+ if (typeof packageJson.repository === "string") {
398
+ repository = packageJson.repository;
399
+ } else if (packageJson.repository.url) {
400
+ repository = packageJson.repository.url;
401
+ }
397
402
  }
398
403
  if (packageJson.license) {
399
404
  license = packageJson.license;
@@ -547,7 +552,6 @@ var writeInfo = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.IN
547
552
  var writeSuccess = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.SUCCESS, config)(message), "writeSuccess");
548
553
  var writeDebug = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.DEBUG, config)(message), "writeDebug");
549
554
  var writeTrace = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.TRACE, config)(message), "writeTrace");
550
- var writeSystem = /* @__PURE__ */ __name((message, config) => getLogFn(LogLevel.ALL, config)(message), "writeSystem");
551
555
  var getStopwatch = /* @__PURE__ */ __name((name) => {
552
556
  const start = process.hrtime();
553
557
  return () => {
@@ -589,6 +593,7 @@ export {
589
593
  STORM_DEFAULT_DOCS,
590
594
  STORM_DEFAULT_HOMEPAGE,
591
595
  STORM_DEFAULT_LICENSING,
596
+ StormConfigSchema,
592
597
  COLOR_KEYS,
593
598
  correctPaths,
594
599
  joinPaths,
@@ -604,7 +609,6 @@ export {
604
609
  writeSuccess,
605
610
  writeDebug,
606
611
  writeTrace,
607
- writeSystem,
608
612
  getStopwatch,
609
613
  formatLogMessage
610
614
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getStopwatch,
3
3
  writeDebug
4
- } from "./chunk-TPFSDZCR.js";
4
+ } from "./chunk-VWXW3RW5.js";
5
5
  import {
6
6
  __name
7
7
  } from "./chunk-3GQAWCBQ.js";
package/dist/clean.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunk5E3NJ26Lcjs = require('./chunk-5E3NJ26L.cjs');
5
- require('./chunk-FG6XQ26M.cjs');
4
+ var _chunkCUQLNBV5cjs = require('./chunk-CUQLNBV5.cjs');
5
+ require('./chunk-LXCK6Y4C.cjs');
6
6
  require('./chunk-YDYGZTJK.cjs');
7
7
 
8
8
 
9
9
 
10
- exports.clean = _chunk5E3NJ26Lcjs.clean; exports.cleanDirectories = _chunk5E3NJ26Lcjs.cleanDirectories;
10
+ exports.clean = _chunkCUQLNBV5cjs.clean; exports.cleanDirectories = _chunkCUQLNBV5cjs.cleanDirectories;
package/dist/clean.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  clean,
3
3
  cleanDirectories
4
- } from "./chunk-VC7N2YVM.js";
5
- import "./chunk-TPFSDZCR.js";
4
+ } from "./chunk-XGZOR6PZ.js";
5
+ import "./chunk-VWXW3RW5.js";
6
6
  import "./chunk-3GQAWCBQ.js";
7
7
  export {
8
8
  clean,
package/dist/config.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkY2DOCJBEcjs = require('./chunk-Y2DOCJBE.cjs');
4
- require('./chunk-V627S7QU.cjs');
3
+ var _chunkO45RUFL3cjs = require('./chunk-O45RUFL3.cjs');
4
+ require('./chunk-26OHEX55.cjs');
5
5
  require('./chunk-SHHAZOHN.cjs');
6
- require('./chunk-PSYW5YJB.cjs');
7
- require('./chunk-CF2C3GEV.cjs');
8
- require('./chunk-FG6XQ26M.cjs');
6
+ require('./chunk-KDTFDJN3.cjs');
7
+ require('./chunk-GVX7LSWK.cjs');
8
+ require('./chunk-LXCK6Y4C.cjs');
9
9
  require('./chunk-YDYGZTJK.cjs');
10
10
 
11
11
 
12
- exports.getDefaultBuildPlugins = _chunkY2DOCJBEcjs.getDefaultBuildPlugins;
12
+ exports.getDefaultBuildPlugins = _chunkO45RUFL3cjs.getDefaultBuildPlugins;
package/dist/config.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  getDefaultBuildPlugins
3
- } from "./chunk-K2D7TQ7G.js";
4
- import "./chunk-C5IHRWT3.js";
3
+ } from "./chunk-OAOLAATA.js";
4
+ import "./chunk-NYVG7QMW.js";
5
5
  import "./chunk-ESRR2FD2.js";
6
- import "./chunk-KPFCICEG.js";
7
- import "./chunk-5S4A4OEA.js";
8
- import "./chunk-TPFSDZCR.js";
6
+ import "./chunk-3Q2ZB7CN.js";
7
+ import "./chunk-G2BQ6VSR.js";
8
+ import "./chunk-VWXW3RW5.js";
9
9
  import "./chunk-3GQAWCBQ.js";
10
10
  export {
11
11
  getDefaultBuildPlugins
package/dist/index.cjs CHANGED
@@ -5,23 +5,23 @@
5
5
 
6
6
 
7
7
 
8
- var _chunkF77T2VZVcjs = require('./chunk-F77T2VZV.cjs');
8
+ var _chunkN2XPKSKOcjs = require('./chunk-N2XPKSKO.cjs');
9
9
 
10
10
 
11
11
 
12
- var _chunk5E3NJ26Lcjs = require('./chunk-5E3NJ26L.cjs');
12
+ var _chunkCUQLNBV5cjs = require('./chunk-CUQLNBV5.cjs');
13
13
 
14
14
 
15
- var _chunkY2DOCJBEcjs = require('./chunk-Y2DOCJBE.cjs');
15
+ var _chunkO45RUFL3cjs = require('./chunk-O45RUFL3.cjs');
16
16
 
17
17
 
18
18
 
19
- var _chunkV627S7QUcjs = require('./chunk-V627S7QU.cjs');
19
+ var _chunk26OHEX55cjs = require('./chunk-26OHEX55.cjs');
20
20
  require('./chunk-SHHAZOHN.cjs');
21
21
  require('./chunk-ORA4UQMU.cjs');
22
- require('./chunk-PSYW5YJB.cjs');
23
- require('./chunk-CF2C3GEV.cjs');
24
- require('./chunk-FG6XQ26M.cjs');
22
+ require('./chunk-KDTFDJN3.cjs');
23
+ require('./chunk-GVX7LSWK.cjs');
24
+ require('./chunk-LXCK6Y4C.cjs');
25
25
  require('./chunk-YDYGZTJK.cjs');
26
26
 
27
27
 
@@ -35,4 +35,4 @@ require('./chunk-YDYGZTJK.cjs');
35
35
 
36
36
 
37
37
 
38
- exports.build = _chunkF77T2VZVcjs.build; exports.clean = _chunk5E3NJ26Lcjs.clean; exports.cleanDirectories = _chunk5E3NJ26Lcjs.cleanDirectories; exports.cleanOutputPath = _chunkF77T2VZVcjs.cleanOutputPath; exports.copyBuildAssets = _chunkF77T2VZVcjs.copyBuildAssets; exports.createTsCompilerOptions = _chunkV627S7QUcjs.createTsCompilerOptions; exports.executeUnbuild = _chunkF77T2VZVcjs.executeUnbuild; exports.generatePackageJson = _chunkF77T2VZVcjs.generatePackageJson; exports.getDefaultBuildPlugins = _chunkY2DOCJBEcjs.getDefaultBuildPlugins; exports.loadConfig = _chunkV627S7QUcjs.loadConfig; exports.resolveOptions = _chunkF77T2VZVcjs.resolveOptions;
38
+ exports.build = _chunkN2XPKSKOcjs.build; exports.clean = _chunkCUQLNBV5cjs.clean; exports.cleanDirectories = _chunkCUQLNBV5cjs.cleanDirectories; exports.cleanOutputPath = _chunkN2XPKSKOcjs.cleanOutputPath; exports.copyBuildAssets = _chunkN2XPKSKOcjs.copyBuildAssets; exports.createTsCompilerOptions = _chunk26OHEX55cjs.createTsCompilerOptions; exports.executeUnbuild = _chunkN2XPKSKOcjs.executeUnbuild; exports.generatePackageJson = _chunkN2XPKSKOcjs.generatePackageJson; exports.getDefaultBuildPlugins = _chunkO45RUFL3cjs.getDefaultBuildPlugins; exports.loadConfig = _chunk26OHEX55cjs.loadConfig; exports.resolveOptions = _chunkN2XPKSKOcjs.resolveOptions;
package/dist/index.js CHANGED
@@ -5,23 +5,23 @@ import {
5
5
  executeUnbuild,
6
6
  generatePackageJson,
7
7
  resolveOptions
8
- } from "./chunk-VD6EE7HD.js";
8
+ } from "./chunk-BZJA6TK2.js";
9
9
  import {
10
10
  clean,
11
11
  cleanDirectories
12
- } from "./chunk-VC7N2YVM.js";
12
+ } from "./chunk-XGZOR6PZ.js";
13
13
  import {
14
14
  getDefaultBuildPlugins
15
- } from "./chunk-K2D7TQ7G.js";
15
+ } from "./chunk-OAOLAATA.js";
16
16
  import {
17
17
  createTsCompilerOptions,
18
18
  loadConfig
19
- } from "./chunk-C5IHRWT3.js";
19
+ } from "./chunk-NYVG7QMW.js";
20
20
  import "./chunk-ESRR2FD2.js";
21
21
  import "./chunk-OULCUN6I.js";
22
- import "./chunk-KPFCICEG.js";
23
- import "./chunk-5S4A4OEA.js";
24
- import "./chunk-TPFSDZCR.js";
22
+ import "./chunk-3Q2ZB7CN.js";
23
+ import "./chunk-G2BQ6VSR.js";
24
+ import "./chunk-VWXW3RW5.js";
25
25
  import "./chunk-3GQAWCBQ.js";
26
26
  export {
27
27
  build,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-software/unbuild",
3
- "version": "0.30.5",
3
+ "version": "0.31.0",
4
4
  "type": "module",
5
5
  "description": "A package containing `unbuild` utilities for building Storm Software libraries and applications",
6
6
  "repository": {
@@ -171,9 +171,9 @@
171
171
  "@nx/devkit": "^20.3.1",
172
172
  "@nx/js": "^20.3.1",
173
173
  "@rollup/pluginutils": "^5.1.4",
174
- "@storm-software/build-tools": "0.135.5",
175
- "@storm-software/config": "1.98.2",
176
- "@storm-software/config-tools": "1.141.5",
174
+ "@storm-software/build-tools": "0.136.0",
175
+ "@storm-software/config": "1.99.0",
176
+ "@storm-software/config-tools": "1.142.0",
177
177
  "@swc/core": "1.7.26",
178
178
  "@types/node": "^22.10.2",
179
179
  "commander": "^12.1.0",