@opentermsarchive/engine 0.18.0 → 0.18.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/config/production.json
CHANGED
package/package.json
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import path from 'path';
|
|
2
|
-
import { fileURLToPath } from 'url';
|
|
3
2
|
|
|
4
3
|
import GitRepository from './git/index.js';
|
|
5
4
|
import MongoRepository from './mongo/index.js';
|
|
6
5
|
|
|
7
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
8
|
-
|
|
9
6
|
export default class RepositoryFactory {
|
|
10
7
|
static create(params) {
|
|
11
8
|
switch (params.type) {
|
|
12
9
|
case 'git':
|
|
13
10
|
return new GitRepository({
|
|
14
11
|
...params.git,
|
|
15
|
-
path: path.resolve(
|
|
12
|
+
path: path.resolve(process.cwd(), params.git.path),
|
|
16
13
|
});
|
|
17
14
|
case 'mongo':
|
|
18
15
|
return new MongoRepository(params.mongo);
|