1
- import path from "path" ;
2
1
import dotenv from "dotenv" ;
2
+ import path from "path" ;
3
3
4
4
dotenv . config ( {
5
5
path : ".env" ,
6
6
} ) ;
7
7
8
- import { existsSync , linkSync , mkdirSync , readdirSync } from "fs" ;
9
- import type {
10
- inducks_storyversion ,
11
- } from "~prisma-schemas/client_coa/client" ;
12
- import { prismaClient as prismaCoa } from "~prisma-schemas/schemas/coa/client" ;
8
+ import { existsSync , mkdirSync , readdirSync } from "fs" ;
13
9
10
+ import type { inducks_storyversion } from "~prisma-schemas/client_coa/client" ;
11
+ import { prismaClient as prismaCoa } from "~prisma-schemas/schemas/coa/client" ;
14
12
15
13
declare global {
16
14
interface ImportMeta {
@@ -39,7 +37,7 @@ for (const file of files) {
39
37
const storycode = (
40
38
await prismaCoa . $queryRaw <
41
39
{
42
- storycode : inducks_storyversion [ ' storycode' ] ;
40
+ storycode : inducks_storyversion [ " storycode" ] ;
43
41
} [ ]
44
42
> `
45
43
SELECT sv.storycode
@@ -58,13 +56,13 @@ WHERE sitecode = 'webusers'
58
56
}
59
57
if ( existsSync ( path . join ( storycodeDir , file . name ) ) ) {
60
58
console . debug ( `File already exists for ${ relativePath } ` ) ;
61
- }
62
- else {
63
- console . log ( `ln -s '${ path . join ( root , relativePath ) } ' '${ path . join ( storycodeDir , file . name ) } '` ) ;
59
+ } else {
60
+ console . log (
61
+ `ln -s '${ path . join ( root , relativePath ) } ' '${ path . join ( storycodeDir , file . name ) } '` ,
62
+ ) ;
64
63
}
65
64
console . log ( `Linked ${ relativePath } to ${ storycodeDir } ` ) ;
66
- }
67
- else {
65
+ } else {
68
66
console . debug ( `Storycode not found for ${ relativePath } ` ) ;
69
67
}
70
- }
68
+ }
0 commit comments