@jpetit/toolkit 3.0.17 → 3.0.18

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/lib/maker.ts CHANGED
@@ -126,6 +126,8 @@ export class Maker {
126
126
  tui.yaml(this.problemYmls[language])
127
127
  })
128
128
  }
129
+
130
+ this.language = basename(this.directory)
129
131
  }
130
132
 
131
133
  private async loadHandler() {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@jpetit/toolkit",
3
3
  "description": "Toolkit to prepare problems for Jutge.org",
4
- "version": "3.0.17",
4
+ "version": "3.0.18",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
package/toolkit/make.ts CHANGED
@@ -2,7 +2,7 @@ import tui from '../lib/tui'
2
2
  import { newMaker, type MakerOptions } from '../lib/maker'
3
3
  import { nothing, projectDir } from '../lib/utils'
4
4
  import { Command } from '@commander-js/extra-typings'
5
- import { join, resolve } from 'path'
5
+ import { join, normalize, resolve } from 'path'
6
6
  import { languageNames } from '../lib/data'
7
7
  import { exists } from 'fs/promises'
8
8
 
@@ -13,7 +13,10 @@ import { exists } from 'fs/promises'
13
13
  */
14
14
  async function findRealDirectories(directories: string[]): Promise<string[]> {
15
15
  const realDirectories: string[] = []
16
- for (const dir of directories) {
16
+ for (let dir of directories) {
17
+ if (dir === '.') {
18
+ dir = normalize(resolve(process.cwd()))
19
+ }
17
20
  if (await exists(join(dir, 'handler.yml'))) {
18
21
  realDirectories.push(dir)
19
22
  } else {