fix: module not find

This commit is contained in:
JimmFly 2023-01-11 15:28:34 +08:00
parent 98692ba790
commit bad5dda67e
3 changed files with 7 additions and 7 deletions

View File

@ -1,5 +1,5 @@
// cSpell:ignore Tolgee
import { fetchTolgee } from './request';
import { fetchTolgee } from './request.js';
/**
* Returns all project languages

View File

@ -2,8 +2,8 @@
import fs from 'node:fs/promises';
import path from 'node:path';
import { format } from 'prettier';
import { getAllProjectLanguages, getRemoteTranslations } from './api';
import type { TranslationRes } from './utils';
import { getAllProjectLanguages, getRemoteTranslations } from './api.js';
import type { TranslationRes } from './utils.js';
const RES_DIR = path.resolve(process.cwd(), 'src', 'resources');
@ -66,7 +66,7 @@ const main = async () => {
);
const availableLanguages = languagesWithTranslations.filter(
language => language.completeRate > 0
language => language.completeRate === 1
);
availableLanguages
@ -90,7 +90,7 @@ const main = async () => {
console.log('Generating meta data...');
const code = `// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
// Run \`pnpm run download-resources\` to regenerate.
// To overwrite this, please overwrite ${path.basename(__filename)}
// To overwrite this, please overwrite download.ts script.
${availableLanguages
.map(
language =>

View File

@ -1,8 +1,8 @@
// cSpell:ignore Tolgee
import { readFile } from 'fs/promises';
import path from 'path';
import { createsNewKey, getRemoteTranslations } from './api';
import type { TranslationRes } from './utils';
import { createsNewKey, getRemoteTranslations } from './api.js';
import type { TranslationRes } from './utils.js';
const BASE_JSON_PATH = path.resolve(
process.cwd(),