@lsbjordao/type-taxon-script 1.1.13 → 1.1.15

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/export.js CHANGED
@@ -84,7 +84,7 @@ console.log(jsonData)
84
84
  const tempFilePath = './temp/exportTemp.ts';
85
85
  fs_1.default.writeFileSync(tempFilePath, fileContent, 'utf-8');
86
86
  const fileToTranspile = 'exportTemp';
87
- (0, child_process_1.exec)(`tsc ./temp/${fileToTranspile}.ts`, (error, stdout, stderr) => {
87
+ (0, child_process_1.exec)(`tsc --ignoreConfig ./temp/${fileToTranspile}.ts`, (error, stdout, stderr) => {
88
88
  if (stdout) {
89
89
  spinner.stop();
90
90
  console.error('\x1b[31m✖ TS Error:\x1b[0m\n\n' + `${stdout}`);
@@ -176,7 +176,7 @@ console.log(jsonData)
176
176
  // console.log('\\x1b[1m\\x1b[32m✔ Process finished.\\x1b[0m')`;
177
177
  fs_1.default.writeFileSync(tempFilePath, fileContent, 'utf-8');
178
178
  const fileToTranspile = 'exportTemp';
179
- (0, child_process_1.exec)(`tsc ./temp/${fileToTranspile}.ts`, (error, stdout, stderr) => {
179
+ (0, child_process_1.exec)(`tsc --ignoreConfig ./temp/${fileToTranspile}.ts`, (error, stdout, stderr) => {
180
180
  if (stdout) {
181
181
  spinner.stop();
182
182
  console.error('\x1b[31m✖ TS Error:\x1b[0m\n\n' + `${stdout}`);
@@ -238,11 +238,26 @@ function serializeObject(writer, subject, object, objectTypeName, objectId, visi
238
238
  }
239
239
  }
240
240
  }
241
+ function getLatestCharactersVersion() {
242
+ const baseDir = './characters';
243
+ if (!fs_1.default.existsSync(baseDir))
244
+ return null;
245
+ const versions = fs_1.default.readdirSync(baseDir)
246
+ .filter(d => /^v\d+$/.test(d))
247
+ .map(d => ({ dir: d, num: parseInt(d.slice(1), 10) }))
248
+ .sort((a, b) => b.num - a.num);
249
+ return versions.length > 0 ? versions[0].dir : null;
250
+ }
241
251
  function buildOntologyTTL() {
242
252
  var _a, _b, _c, _d, _e, _f, _g;
243
253
  return __awaiter(this, void 0, void 0, function* () {
244
254
  const writer = createWriter();
245
- const modules = yield importModules('./characters/v1/**/*.ts');
255
+ const version = getLatestCharactersVersion();
256
+ if (!version) {
257
+ console.error('\x1b[31m✖ No versioned directory found under ./characters/\x1b[0m');
258
+ return writerToString(writer);
259
+ }
260
+ const modules = yield importModules(`./characters/${version}/**/*.ts`);
246
261
  for (const { mod } of modules) {
247
262
  for (const exported of Object.values(mod)) {
248
263
  if (!isClassLike(exported))
@@ -86,7 +86,7 @@ console.log(jsonData)
86
86
  const tempFilePath = './temp/exportTemp.ts';
87
87
  fs_1.default.writeFileSync(tempFilePath, fileContent, 'utf-8');
88
88
  const fileToTranspile = 'exportTemp';
89
- (0, child_process_1.exec)(`tsc ./temp/${fileToTranspile}.ts`, (error, stdout, stderr) => {
89
+ (0, child_process_1.exec)(`tsc --ignoreConfig ./temp/${fileToTranspile}.ts`, (error, stdout, stderr) => {
90
90
  if (stdout) {
91
91
  spinner.stop();
92
92
  console.error('\x1b[31m✖ TS Error:\x1b[0m\n\n' + `${stdout}`);
@@ -192,7 +192,7 @@ console.log(jsonData)
192
192
  // console.log('\\x1b[1m\\x1b[32m✔ Process finished.\\x1b[0m')`;
193
193
  fs_1.default.writeFileSync(tempFilePath, fileContent, 'utf-8');
194
194
  const fileToTranspile = 'exportTemp';
195
- (0, child_process_1.exec)(`tsc ./temp/${fileToTranspile}.ts`, (error, stdout, stderr) => {
195
+ (0, child_process_1.exec)(`tsc --ignoreConfig ./temp/${fileToTranspile}.ts`, (error, stdout, stderr) => {
196
196
  if (stdout) {
197
197
  spinner.stop();
198
198
  console.error('\x1b[31m✖ TS Error:\x1b[0m\n\n' + `${stdout}`);
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@lsbjordao/type-taxon-script",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "author": "Lucas Jordão <tucarj@gmail.com> & André Eppinghaus <andreeppinghaus@gmail.com> & Vicente Calfo <vicentecalfo@gmail.com>",
5
5
  "license": "ISC",
6
6
  "description": "TypeTaxonScript",
7
7
  "dependencies": {
8
- "@json2csv/plainjs": "^7.0.5",
9
- "@json2csv/transforms": "^7.0.5",
8
+ "@json2csv/plainjs": "^7.0.6",
9
+ "@json2csv/transforms": "^7.0.6",
10
10
  "cli-spinner": "^0.2.10",
11
11
  "csv-parser": "^3.0.0",
12
12
  "fast-glob": "^3.3.3",