@t8/docsgen 0.1.1 → 0.1.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/dist/bin.js CHANGED
@@ -136,7 +136,7 @@ async function getConfig() {
136
136
  }
137
137
  let targetId;
138
138
  let args = process.argv.slice(2);
139
- if (!args[0].startsWith("--")) targetId = args.shift();
139
+ if (args.length !== 0 && !args[0].startsWith("--")) targetId = args.shift();
140
140
  config = {
141
141
  targetId,
142
142
  mainBranch: "main",
@@ -743,7 +743,7 @@ async function run() {
743
743
  let entryCtx = entries.find(
744
744
  ({ id, dir }) => id === targetId || dir === targetId
745
745
  );
746
- if (entryCtx) runEntry(entryCtx);
746
+ if (entryCtx) runEntry({ ...rootCtx, ...entryCtx });
747
747
  else console.warn(`Specified config entry not found: '${targetId}'`);
748
748
  } else {
749
749
  await Promise.all(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@t8/docsgen",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "",
5
5
  "main": "dist/bin.js",
6
6
  "bin": {
@@ -26,7 +26,7 @@ export async function getConfig(): Promise<BinConfig> {
26
26
  let targetId: string | undefined;
27
27
  let args = process.argv.slice(2);
28
28
 
29
- if (!args[0].startsWith("--")) targetId = args.shift();
29
+ if (args.length !== 0 && !args[0].startsWith("--")) targetId = args.shift();
30
30
 
31
31
  config = {
32
32
  targetId,
package/src/bin/run.ts CHANGED
@@ -17,7 +17,7 @@ async function run() {
17
17
  ({ id, dir }) => id === targetId || dir === targetId,
18
18
  );
19
19
 
20
- if (entryCtx) runEntry(entryCtx);
20
+ if (entryCtx) runEntry({ ...rootCtx, ...entryCtx });
21
21
  else console.warn(`Specified config entry not found: '${targetId}'`);
22
22
  } else {
23
23
  await Promise.all(