web-ggf 1.0.9 → 2.0.0
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/bin/_chunks/file-helper-D3QczOlm.js +55 -0
- package/bin/_chunks/file-helper-D3QczOlm.js.map +1 -0
- package/bin/_chunks/{index-DDL8vi6o.js → index-BbfKFDuQ.js} +20 -21
- package/bin/_chunks/index-BbfKFDuQ.js.map +1 -0
- package/bin/_chunks/{index-BaQt8yVT.js → index-BksocSTH.js} +20 -21
- package/bin/_chunks/index-BksocSTH.js.map +1 -0
- package/bin/_chunks/{index-m0G5jZTY.js → index-BxF5ETQg.js} +9 -10
- package/bin/_chunks/index-BxF5ETQg.js.map +1 -0
- package/bin/_chunks/{index-CJwhB9ZM.js → index-C7IjWgfh.js} +18 -19
- package/bin/_chunks/index-C7IjWgfh.js.map +1 -0
- package/bin/_chunks/{index-B6tEqrai.js → index-CnWNcsRs.js} +4 -5
- package/bin/_chunks/index-CnWNcsRs.js.map +1 -0
- package/bin/_chunks/{npm-install-DR6c952D.js → npm-install-7LYQx09p.js} +4 -5
- package/bin/_chunks/npm-install-7LYQx09p.js.map +1 -0
- package/bin/nextjs15/index.js +20 -12
- package/bin/nextjs15/index.js.map +1 -0
- package/bin/types/nextjs15/adjust-files/auth-page.d.ts +2 -0
- package/bin/types/nextjs15/adjust-files/auth-page.d.ts.map +1 -0
- package/bin/types/nextjs15/adjust-files/favicon.ico.d.ts +2 -0
- package/bin/types/nextjs15/adjust-files/favicon.ico.d.ts.map +1 -0
- package/bin/types/nextjs15/adjust-files/globalcss.d.ts +2 -0
- package/bin/types/nextjs15/adjust-files/globalcss.d.ts.map +1 -0
- package/bin/types/nextjs15/adjust-files/home-page.d.ts +2 -0
- package/bin/types/nextjs15/adjust-files/home-page.d.ts.map +1 -0
- package/bin/types/nextjs15/adjust-files/index.d.ts +8 -0
- package/bin/types/nextjs15/adjust-files/index.d.ts.map +1 -0
- package/bin/types/nextjs15/adjust-files/layout.d.ts +2 -0
- package/bin/types/nextjs15/adjust-files/layout.d.ts.map +1 -0
- package/bin/types/nextjs15/adjust-files/middleware.d.ts +2 -0
- package/bin/types/nextjs15/adjust-files/middleware.d.ts.map +1 -0
- package/bin/types/nextjs15/adjust-files/next-config.d.ts +2 -0
- package/bin/types/nextjs15/adjust-files/next-config.d.ts.map +1 -0
- package/bin/types/nextjs15/adjust-files/unwanted.d.ts +2 -0
- package/bin/types/nextjs15/adjust-files/unwanted.d.ts.map +1 -0
- package/bin/types/nextjs15/base-dependencies/index.d.ts +2 -0
- package/bin/types/nextjs15/base-dependencies/index.d.ts.map +1 -0
- package/bin/types/nextjs15/configs/APP_CONFIG.d.ts +2 -0
- package/bin/types/nextjs15/configs/APP_CONFIG.d.ts.map +1 -0
- package/bin/types/nextjs15/configs/APP_CONFIG_D.d.ts +2 -0
- package/bin/types/nextjs15/configs/APP_CONFIG_D.d.ts.map +1 -0
- package/bin/types/nextjs15/configs/HOST_CONFIG.d.ts +2 -0
- package/bin/types/nextjs15/configs/HOST_CONFIG.d.ts.map +1 -0
- package/bin/types/nextjs15/configs/HOST_CONFIG_D.d.ts +2 -0
- package/bin/types/nextjs15/configs/HOST_CONFIG_D.d.ts.map +1 -0
- package/bin/types/nextjs15/configs/MIDDLEWARE_CONFIG.d.ts +2 -0
- package/bin/types/nextjs15/configs/MIDDLEWARE_CONFIG.d.ts.map +1 -0
- package/bin/types/nextjs15/configs/STORE_KEY_CONFIG.d.ts +2 -0
- package/bin/types/nextjs15/configs/STORE_KEY_CONFIG.d.ts.map +1 -0
- package/bin/types/nextjs15/configs/STORE_KEY_CONFIG_D.d.ts +2 -0
- package/bin/types/nextjs15/configs/STORE_KEY_CONFIG_D.d.ts.map +1 -0
- package/bin/types/nextjs15/configs/THEME_CONFIG.d.ts +2 -0
- package/bin/types/nextjs15/configs/THEME_CONFIG.d.ts.map +1 -0
- package/bin/types/nextjs15/configs/favicon.d.ts +2 -0
- package/bin/types/nextjs15/configs/favicon.d.ts.map +1 -0
- package/bin/types/nextjs15/configs/index.d.ts +9 -0
- package/bin/types/nextjs15/configs/index.d.ts.map +1 -0
- package/bin/types/nextjs15/graphql/apollo-provider.d.ts +2 -0
- package/bin/types/nextjs15/graphql/apollo-provider.d.ts.map +1 -0
- package/bin/types/nextjs15/graphql/dependencies.d.ts +2 -0
- package/bin/types/nextjs15/graphql/dependencies.d.ts.map +1 -0
- package/bin/types/nextjs15/graphql/index.d.ts +3 -0
- package/bin/types/nextjs15/graphql/index.d.ts.map +1 -0
- package/bin/types/nextjs15/helper/file-helper.d.ts +15 -0
- package/bin/types/nextjs15/helper/file-helper.d.ts.map +1 -0
- package/bin/types/nextjs15/helper/npm-install.d.ts +6 -0
- package/bin/types/nextjs15/helper/npm-install.d.ts.map +1 -0
- package/bin/types/nextjs15/helper/package-json-helper.d.ts +14 -0
- package/bin/types/nextjs15/helper/package-json-helper.d.ts.map +1 -0
- package/bin/types/nextjs15/index.d.ts +4 -0
- package/bin/types/nextjs15/index.d.ts.map +1 -0
- package/bin/types/nextjs15/lingui/dependencies.d.ts +2 -0
- package/bin/types/nextjs15/lingui/dependencies.d.ts.map +1 -0
- package/bin/types/nextjs15/lingui/index.d.ts +7 -0
- package/bin/types/nextjs15/lingui/index.d.ts.map +1 -0
- package/bin/types/nextjs15/lingui/init-lingui.d.ts +2 -0
- package/bin/types/nextjs15/lingui/init-lingui.d.ts.map +1 -0
- package/bin/types/nextjs15/lingui/lingui-client-provider.d.ts +2 -0
- package/bin/types/nextjs15/lingui/lingui-client-provider.d.ts.map +1 -0
- package/bin/types/nextjs15/lingui/lingui-config-js.d.ts +2 -0
- package/bin/types/nextjs15/lingui/lingui-config-js.d.ts.map +1 -0
- package/bin/types/nextjs15/lingui/lingui-server-instance.d.ts +2 -0
- package/bin/types/nextjs15/lingui/lingui-server-instance.d.ts.map +1 -0
- package/bin/types/nextjs15/lingui/packagejson.d.ts +2 -0
- package/bin/types/nextjs15/lingui/packagejson.d.ts.map +1 -0
- package/package.json +2 -2
- package/bin/_chunks/file-helper-CPVdSg32.js +0 -80
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
|
|
4
|
+
function findOrInitialsFile(pathWithNameExtension) {
|
|
5
|
+
if (isExist(pathWithNameExtension)) {
|
|
6
|
+
console.warn(`❎ ${pathWithNameExtension} is existing`);
|
|
7
|
+
return path.join(process.cwd(), pathWithNameExtension);
|
|
8
|
+
}
|
|
9
|
+
for (const pathName of pathWithNameExtension.split('/').reduce((acc, cur, idx) => {
|
|
10
|
+
if (idx === 0)
|
|
11
|
+
return [cur];
|
|
12
|
+
return [...acc, `${acc.slice(-1)[0]}/${cur}`];
|
|
13
|
+
}, [])) {
|
|
14
|
+
if (pathName.includes('.'))
|
|
15
|
+
continue;
|
|
16
|
+
if (!isExist(pathName)) {
|
|
17
|
+
console.warn(`${pathName} is not exist`);
|
|
18
|
+
mkdirSync(pathName);
|
|
19
|
+
}
|
|
20
|
+
else
|
|
21
|
+
console.warn(`${pathName} is exist`);
|
|
22
|
+
}
|
|
23
|
+
return path.join(process.cwd(), pathWithNameExtension);
|
|
24
|
+
}
|
|
25
|
+
function deleteFile(filePath) {
|
|
26
|
+
if (isExist(filePath)) {
|
|
27
|
+
fs.unlinkSync(getFilePath(filePath));
|
|
28
|
+
console.warn(`${filePath} is removed`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function getFilePath(name) {
|
|
32
|
+
return path.join(process.cwd(), name);
|
|
33
|
+
}
|
|
34
|
+
function isExist(name) {
|
|
35
|
+
return fs.existsSync(getFilePath(name));
|
|
36
|
+
}
|
|
37
|
+
function mkdirSync(name) {
|
|
38
|
+
fs.mkdirSync(getFilePath(name), { recursive: true });
|
|
39
|
+
return console.warn(`🆗 ${name} directory created`);
|
|
40
|
+
}
|
|
41
|
+
function readUtf8File(filePath) {
|
|
42
|
+
return JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
|
43
|
+
}
|
|
44
|
+
function writeFileSyncWithLog({ targetPath, content, fileName, option }) {
|
|
45
|
+
try {
|
|
46
|
+
fs.writeFileSync(targetPath, content, option);
|
|
47
|
+
console.warn(`🆗 -> ${fileName} successfully ${fs.existsSync(targetPath) ? 'updated' : 'created'}`);
|
|
48
|
+
}
|
|
49
|
+
catch (err) {
|
|
50
|
+
console.error('❌ Error creating file:', err);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export { deleteFile as d, findOrInitialsFile as f, getFilePath as g, readUtf8File as r, writeFileSyncWithLog as w };
|
|
55
|
+
//# sourceMappingURL=file-helper-D3QczOlm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-helper-D3QczOlm.js","sources":["../../src/src/bin/nextjs15/helper/file-helper.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAIM,SAAU,kBAAkB,CAAC,qBAA6B,EAAA;AAC9D,IAAA,IAAI,OAAO,CAAC,qBAAqB,CAAC,EAAE;AAClC,QAAA,OAAO,CAAC,IAAI,CAAC,KAAK,qBAAqB,CAAA,YAAA,CAAc,CAAC;QACtD,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,qBAAqB,CAAC;IACxD;AACA,IAAA,KAAK,MAAM,QAAQ,IAAI,qBAAqB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,GAAa,EAAE,GAAG,EAAE,GAAG,KAAI;QACzF,IAAI,GAAG,KAAK,CAAC;YAAE,OAAO,CAAC,GAAG,CAAC;AAC3B,QAAA,OAAO,CAAC,GAAG,GAAG,EAAE,CAAA,EAAG,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAA,CAAE,CAAC;AAC/C,IAAA,CAAC,EAAE,EAAE,CAAC,EAAE;AACN,QAAA,IAAI,QAAQ,CAAC,QAAQ,CAAC,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AQ,EAAE,MAAM,EAA6B,EAAA;AACvG,IAAA,IAAI;QACF,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,OAAO,EAAE,MAAM,CAAC;QAC7C,OAAO,CAAC,IAAI,CAAC,CAAA,MAAA,EAAS,QAAQ,CAAA,cAAA,EAAiB,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,GAAG,SAAS,GAAG,SAAS,CAAA,CAAE,CAAC;IACrG;IAAE,OAAO,GAAG,EAAE;AACZ,QAAA,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,GAAG,CAAC;IAC9C;AACF;;;;"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
require('fs');
|
|
5
|
-
require('path');
|
|
1
|
+
import { f as findOrInitialsFile, w as writeFileSyncWithLog } from './file-helper-D3QczOlm.js';
|
|
2
|
+
import 'fs';
|
|
3
|
+
import 'path';
|
|
6
4
|
|
|
7
5
|
const fileName$7 = `APP_CONFIG.d.ts`;
|
|
8
|
-
const targetPath$7 =
|
|
6
|
+
const targetPath$7 = findOrInitialsFile(`src/configs/${fileName$7}`);
|
|
9
7
|
const content$7 = `export interface AppConfigProps {
|
|
10
8
|
appIndex: string;
|
|
11
9
|
tokens: {
|
|
@@ -19,10 +17,10 @@ const content$7 = `export interface AppConfigProps {
|
|
|
19
17
|
};
|
|
20
18
|
}
|
|
21
19
|
`;
|
|
22
|
-
|
|
20
|
+
writeFileSyncWithLog({ targetPath: targetPath$7, content: content$7, fileName: fileName$7 });
|
|
23
21
|
|
|
24
22
|
const fileName$6 = `APP_CONFIG.ts`;
|
|
25
|
-
const targetPath$6 =
|
|
23
|
+
const targetPath$6 = findOrInitialsFile(`src/configs/${fileName$6}`);
|
|
26
24
|
const content$6 = `import type { AppConfigProps } from './APP_CONFIG.d';
|
|
27
25
|
|
|
28
26
|
export const APP_CONFIG: AppConfigProps = {
|
|
@@ -31,10 +29,10 @@ export const APP_CONFIG: AppConfigProps = {
|
|
|
31
29
|
map: { googleMapApiKey: '', defaultCenter: { lat: 47.919045645074696, lng: 106.91752910614014 }, defaultZoom: 12 },
|
|
32
30
|
};
|
|
33
31
|
`;
|
|
34
|
-
|
|
32
|
+
writeFileSyncWithLog({ targetPath: targetPath$6, content: content$6, fileName: fileName$6 });
|
|
35
33
|
|
|
36
34
|
const fileName$5 = `HOST_CONFIG.d.ts`;
|
|
37
|
-
const targetPath$5 =
|
|
35
|
+
const targetPath$5 = findOrInitialsFile(`src/configs/${fileName$5}`);
|
|
38
36
|
const content$5 = `export interface HostConfigProps {
|
|
39
37
|
host: string;
|
|
40
38
|
elastic: {
|
|
@@ -44,10 +42,10 @@ const content$5 = `export interface HostConfigProps {
|
|
|
44
42
|
};
|
|
45
43
|
}
|
|
46
44
|
`;
|
|
47
|
-
|
|
45
|
+
writeFileSyncWithLog({ targetPath: targetPath$5, content: content$5, fileName: fileName$5 });
|
|
48
46
|
|
|
49
47
|
const fileName$4 = `HOST_CONFIG.ts`;
|
|
50
|
-
const targetPath$4 =
|
|
48
|
+
const targetPath$4 = findOrInitialsFile(`src/configs/${fileName$4}`);
|
|
51
49
|
const content$4 = `import type { HostConfigProps } from './HOST_CONFIG.d';
|
|
52
50
|
|
|
53
51
|
export const HOST_CONFIG: HostConfigProps = {
|
|
@@ -59,10 +57,10 @@ export const HOST_CONFIG: HostConfigProps = {
|
|
|
59
57
|
}
|
|
60
58
|
};
|
|
61
59
|
`;
|
|
62
|
-
|
|
60
|
+
writeFileSyncWithLog({ targetPath: targetPath$4, content: content$4, fileName: fileName$4 });
|
|
63
61
|
|
|
64
62
|
const fileName$3 = `MIDDLEWARE_CONFIG.ts`;
|
|
65
|
-
const targetPath$3 =
|
|
63
|
+
const targetPath$3 = findOrInitialsFile(`src/configs/${fileName$3}`);
|
|
66
64
|
const content$3 = `import { NextJSAuthMiddleware } from 'web-ggf/nextjs-middleware';
|
|
67
65
|
|
|
68
66
|
import { APP_CONFIG } from '@/configs/APP_CONFIG';
|
|
@@ -81,10 +79,10 @@ export const middlewareConfig = new NextJSAuthMiddleware({
|
|
|
81
79
|
locale: 'mn',
|
|
82
80
|
});
|
|
83
81
|
`;
|
|
84
|
-
|
|
82
|
+
writeFileSyncWithLog({ targetPath: targetPath$3, content: content$3, fileName: fileName$3 });
|
|
85
83
|
|
|
86
84
|
const fileName$2 = `STORE_KEY_CONFIG.d.ts`;
|
|
87
|
-
const targetPath$2 =
|
|
85
|
+
const targetPath$2 = findOrInitialsFile(`src/configs/${fileName$2}`);
|
|
88
86
|
const content$2 = `export interface StoreKeyConfigProps {
|
|
89
87
|
USER_TOKEN: string;
|
|
90
88
|
REFRESH_TOKEN: string;
|
|
@@ -92,10 +90,10 @@ const content$2 = `export interface StoreKeyConfigProps {
|
|
|
92
90
|
EXPIRES_IN: string;
|
|
93
91
|
}
|
|
94
92
|
`;
|
|
95
|
-
|
|
93
|
+
writeFileSyncWithLog({ targetPath: targetPath$2, content: content$2, fileName: fileName$2 });
|
|
96
94
|
|
|
97
95
|
const fileName$1 = `STORE_KEY_CONFIG.ts`;
|
|
98
|
-
const targetPath$1 =
|
|
96
|
+
const targetPath$1 = findOrInitialsFile(`src/configs/${fileName$1}`);
|
|
99
97
|
const content$1 = `import type { StoreKeyConfigProps } from './STORE_KEY_CONFIG.d';
|
|
100
98
|
|
|
101
99
|
import { APP_CONFIG } from '@/configs/APP_CONFIG';
|
|
@@ -107,10 +105,10 @@ export const STORE_KEY_CONFIG: StoreKeyConfigProps = {
|
|
|
107
105
|
EXPIRES_IN: \`\${APP_CONFIG.appIndex}EXPIRES_IN\`,
|
|
108
106
|
};
|
|
109
107
|
`;
|
|
110
|
-
|
|
108
|
+
writeFileSyncWithLog({ targetPath: targetPath$1, content: content$1, fileName: fileName$1 });
|
|
111
109
|
|
|
112
110
|
const fileName = `index.css`;
|
|
113
|
-
const targetPath =
|
|
111
|
+
const targetPath = findOrInitialsFile(`src/configs/THEME_CONFIG/${fileName}`);
|
|
114
112
|
const content = `@plugin "daisyui" {
|
|
115
113
|
/*noinspection CssUnknownProperty*/
|
|
116
114
|
themes: light --default, dark --prefersdark;
|
|
@@ -130,4 +128,5 @@ const content = `@plugin "daisyui" {
|
|
|
130
128
|
--color-secondary: teal;
|
|
131
129
|
}
|
|
132
130
|
`;
|
|
133
|
-
|
|
131
|
+
writeFileSyncWithLog({ targetPath, content, fileName });
|
|
132
|
+
//# sourceMappingURL=index-BbfKFDuQ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BbfKFDuQ.js","sources":["../../src/src/bin/nextjs15/configs/APP_CONFIG_D.ts","../../src/src/bin/nextjs15/configs/APP_CONFIG.ts","../../src/src/bin/nextjs15/configs/HOST_CONFIG_D.ts","../../src/src/bin/nextjs15/configs/HOST_CONFIG.ts","../../src/src/bin/nextjs15/configs/MIDDLEWARE_CONFIG.ts","../../src/src/bin/nextjs15/configs/STORE_KEY_CONFIG_D.ts","../../src/src/bin/nextjs15/configs/STORE_KEY_CONFIG.ts","../../src/src/bin/nextjs15/configs/THEME_CONFIG.ts"],"sourcesContent":[null,null,null,null,null,null,null,null],"names":["fileName","targetPath","content"],"mappings":";;;;AAEA,MAAMA,UAAQ,GAAG,CAAA,eAAA,CAAiB;AAClC,MAAMC,YAAU,GAAG,kBAAkB,CAAC,eAAeD,UAAQ,CAAA,CAAE,CAAC;AAChE,MAAME,SAAO,GAAG,CAAA;;;;;;;;;;;;CAYf;AACD,oBAAoB,CAAC,cAAED,YAAU,WAAEC,SAAO,YAAEF,UAAQ,EAAE,CAAC;;ACfvD,MAAMA,UAAQ,GAAG,CAAA,aAAA,CAAe;AAChC,MAAMC,YAAU,GAAG,kBAAkB,CAAC,eAAeD,UAAQ,CAAA,CAAE,CAAC;AAChE,MAAME,SAAO,GAAG,CAAA;;;;;;;CAOf;AAED,oBAAoB,CAAC,cAAED,YAAU,WAAEC,SAAO,YAAEF,UAAQ,EAAE,CAAC;;ACXvD,MAAMA,UAAQ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AAM,UAAU,GAAG,kBAAkB,CAAC,4BAA4B,QAAQ,CAAA,CAAE,CAAC;AAC7E,MAAM,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;CAkBf;AAED,oBAAoB,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,26 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
require('fs');
|
|
5
|
-
require('path');
|
|
1
|
+
import { f as findOrInitialsFile, w as writeFileSyncWithLog, d as deleteFile } from './file-helper-D3QczOlm.js';
|
|
2
|
+
import 'fs';
|
|
3
|
+
import 'path';
|
|
6
4
|
|
|
7
5
|
const fileName$5 = `page.tsx`;
|
|
8
|
-
const targetPath$5 =
|
|
6
|
+
const targetPath$5 = findOrInitialsFile(`src/app/[locale]/auth/${fileName$5}`);
|
|
9
7
|
const content$5 = `export default function AuthPage() {
|
|
10
8
|
return <div>AuthPage</div>;
|
|
11
9
|
}
|
|
12
10
|
`;
|
|
13
|
-
|
|
11
|
+
writeFileSyncWithLog({ targetPath: targetPath$5, content: content$5, fileName: fileName$5 });
|
|
14
12
|
|
|
15
13
|
const fileName$4 = `globals.css`;
|
|
16
|
-
const targetPath$4 =
|
|
14
|
+
const targetPath$4 = findOrInitialsFile(`src/app/[locale]/${fileName$4}`);
|
|
17
15
|
const content$4 = `@import "tailwindcss";
|
|
18
16
|
@import "../../configs/THEME_CONFIG/index.css";
|
|
19
17
|
`;
|
|
20
|
-
|
|
18
|
+
writeFileSyncWithLog({ targetPath: targetPath$4, content: content$4, fileName: fileName$4 });
|
|
21
19
|
|
|
22
20
|
const fileName$3 = `page.tsx`;
|
|
23
|
-
const targetPath$3 =
|
|
21
|
+
const targetPath$3 = findOrInitialsFile(`src/app/[locale]/${fileName$3}`);
|
|
24
22
|
const content$3 = `import { t } from '@lingui/core/macro';
|
|
25
23
|
|
|
26
24
|
import { initLingui, PageLangParam } from '@/locales/init-lingui';
|
|
@@ -36,10 +34,10 @@ export default async function Page({ params }: PageLangParam) {
|
|
|
36
34
|
);
|
|
37
35
|
}
|
|
38
36
|
`;
|
|
39
|
-
|
|
37
|
+
writeFileSyncWithLog({ targetPath: targetPath$3, content: content$3, fileName: fileName$3 });
|
|
40
38
|
|
|
41
39
|
const fileName$2 = `layout.tsx`;
|
|
42
|
-
const targetPath$2 =
|
|
40
|
+
const targetPath$2 = findOrInitialsFile(`src/app/[locale]/${fileName$2}`);
|
|
43
41
|
const content$2 = `import { ReactNode } from 'react';
|
|
44
42
|
|
|
45
43
|
import { i18n as Lingui18n } from '@lingui/core';
|
|
@@ -73,10 +71,10 @@ export const metadata: Metadata = {
|
|
|
73
71
|
description: 'Test description',
|
|
74
72
|
};
|
|
75
73
|
`;
|
|
76
|
-
|
|
74
|
+
writeFileSyncWithLog({ targetPath: targetPath$2, content: content$2, fileName: fileName$2 });
|
|
77
75
|
|
|
78
76
|
const fileName$1 = `middleware.ts`;
|
|
79
|
-
const targetPath$1 =
|
|
77
|
+
const targetPath$1 = findOrInitialsFile(`src/${fileName$1}`);
|
|
80
78
|
const content$1 = `import { NextRequest } from 'next/server';
|
|
81
79
|
|
|
82
80
|
import { middlewareConfig } from '@/configs/MIDDLEWARE_CONFIG';
|
|
@@ -89,10 +87,10 @@ export const config = {
|
|
|
89
87
|
matcher: '/((?!api|_next/data|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)',
|
|
90
88
|
};
|
|
91
89
|
`;
|
|
92
|
-
|
|
90
|
+
writeFileSyncWithLog({ targetPath: targetPath$1, content: content$1, fileName: fileName$1 });
|
|
93
91
|
|
|
94
92
|
const fileName = `next.config.ts`;
|
|
95
|
-
const targetPath =
|
|
93
|
+
const targetPath = findOrInitialsFile(fileName);
|
|
96
94
|
const content = `import type { NextConfig } from 'next';
|
|
97
95
|
|
|
98
96
|
const nextConfig: NextConfig = {
|
|
@@ -113,9 +111,10 @@ const nextConfig: NextConfig = {
|
|
|
113
111
|
|
|
114
112
|
export default nextConfig;
|
|
115
113
|
`;
|
|
116
|
-
|
|
114
|
+
writeFileSyncWithLog({ targetPath, content, fileName });
|
|
117
115
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
116
|
+
deleteFile('src/app/page.tsx');
|
|
117
|
+
deleteFile('src/app/layout.tsx');
|
|
118
|
+
deleteFile('src/app/favicon.ico');
|
|
119
|
+
deleteFile('src/app/globals.css');
|
|
120
|
+
//# sourceMappingURL=index-BksocSTH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BksocSTH.js","sources":["../../src/src/bin/nextjs15/adjust-files/auth-page.ts","../../src/src/bin/nextjs15/adjust-files/globalcss.ts","../../src/src/bin/nextjs15/adjust-files/home-page.ts","../../src/src/bin/nextjs15/adjust-files/layout.ts","../../src/src/bin/nextjs15/adjust-files/middleware.ts","../../src/src/bin/nextjs15/adjust-files/next-config.ts","../../src/src/bin/nextjs15/adjust-files/unwanted.ts"],"sourcesContent":[null,null,null,null,null,null,null],"names":["fileName","targetPath","content"],"mappings":";;;;AAEA,MAAMA,UAAQ,GAAG,CAAA,QAAA,CAAU;AAC3B,MAAMC,YAAU,GAAG,kBAAkB,CAAC,yBAAyBD,UAAQ,CAAA,CAAE,CAAC;AAC1E,MAAME,SAAO,GAAG,CAAA;;;CAGf;AAED,oBAAoB,CAAC,cAAED,YAAU,WAAEC,SAAO,YAAEF,UAAQ,EAAE,CAAC;;ACPvD,MAAMA,UAAQ,GAAG,CAAA,WAAA,CAAa;AAC9B,MAAMC,YAAU,GAAG,kBAAkB,CAAC,oBAAoBD,UAAQ,CAAA,CAAE,CAAC;AACrE,MAAME,SAAO,GAAG,CAAA;;CAEf;AAED,oBAAoB,CAAC,cAAED,YAAU,WAAEC,SAAO,YAAEF,UAAQ,EAAE,CAAC;;ACNvD,MAAMA,UAAQ,GAAG,CAAA,QAAA,CAAU;AAC3B,MAAMC,YAAU,GAAG,kBAAkB,CAAC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
+
import { n as npmInstall } from './npm-install-7LYQx09p.js';
|
|
3
|
+
import 'fs';
|
|
4
|
+
import 'path';
|
|
5
|
+
import 'child_process';
|
|
8
6
|
|
|
9
7
|
const fileName = `apollo-provider.tsx`;
|
|
10
|
-
const targetPath =
|
|
8
|
+
const targetPath = findOrInitialsFile(`src/utils/${fileName}`);
|
|
11
9
|
const content = `'use client';
|
|
12
10
|
|
|
13
11
|
import { ReactNode } from 'react';
|
|
@@ -37,9 +35,9 @@ export function ApolloProvider({ children }: { children: ReactNode }) {
|
|
|
37
35
|
);
|
|
38
36
|
}
|
|
39
37
|
`;
|
|
40
|
-
|
|
38
|
+
writeFileSyncWithLog({ targetPath, content, fileName });
|
|
41
39
|
|
|
42
|
-
npmInstall
|
|
40
|
+
npmInstall([
|
|
43
41
|
{ name: '@apollo/client', version: '^4.1.6' },
|
|
44
42
|
{ name: '@apollo/client-integration-nextjs', version: '^0.14.4' },
|
|
45
43
|
{ name: 'rxjs', version: '^7.8.2' },
|
|
@@ -47,3 +45,4 @@ npmInstall.npmInstall([
|
|
|
47
45
|
{ name: 'apollo-upload-client', version: '^19.0.0' },
|
|
48
46
|
{ name: '@types/apollo-upload-client', version: '^19.0.0', dev: true },
|
|
49
47
|
]);
|
|
48
|
+
//# sourceMappingURL=index-BxF5ETQg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-BxF5ETQg.js","sources":["../../src/src/bin/nextjs15/graphql/apollo-provider.ts","../../src/src/bin/nextjs15/graphql/dependencies.ts"],"sourcesContent":[null,null],"names":[],"mappings":";;;;;;AAEA,MAAM,QAAQ,GAAG,CAAA,mBAAA,CAAqB;AACtC,MAAM,UAAU,GAAG,kBAAkB,CAAC,aAAa,QAAQ,CAAA,CAAE,CAAC;AAE9D,MAAM,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Bf;AAED,oBAAoB,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;;ACjCvD,UAAU,CAAC;AACT,IAAA,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,QAAQ,EAAE;AAC7C,IAAA,EAAE,IAAI,EAAE,mCAAmC,EAAE,OAAO,EAAE,SAAS,EAAE;AACjE,IAAA,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;AACnC,IAAA,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,UAAU,EAAE;AACxC,IAAA,EAAE,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,SAAS,EAAE;IACpD,EAAE,IAAI,EAAE,6BAA6B,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE;AACvE,CAAA,CAAC"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { n as npmInstall } from './npm-install-7LYQx09p.js';
|
|
2
|
+
import { f as findOrInitialsFile, w as writeFileSyncWithLog, g as getFilePath, r as readUtf8File } from './file-helper-D3QczOlm.js';
|
|
3
|
+
import 'child_process';
|
|
4
|
+
import 'fs';
|
|
5
|
+
import 'path';
|
|
2
6
|
|
|
3
|
-
|
|
4
|
-
var fileHelper = require('./file-helper-CPVdSg32.js');
|
|
5
|
-
require('child_process');
|
|
6
|
-
require('fs');
|
|
7
|
-
require('path');
|
|
8
|
-
|
|
9
|
-
npmInstall.npmInstall([
|
|
7
|
+
npmInstall([
|
|
10
8
|
{ name: '@lingui/cli', version: 'latest', dev: true },
|
|
11
9
|
{ name: '@lingui/swc-plugin', version: '5.7.0', dev: true },
|
|
12
10
|
{ name: '@lingui/loader', version: 'latest', dev: true },
|
|
@@ -15,7 +13,7 @@ npmInstall.npmInstall([
|
|
|
15
13
|
]);
|
|
16
14
|
|
|
17
15
|
const fileName$4 = `init-lingui.ts`;
|
|
18
|
-
const targetPath$4 =
|
|
16
|
+
const targetPath$4 = findOrInitialsFile(`src/locales/${fileName$4}`);
|
|
19
17
|
const content$4 = `import { setI18n } from '@lingui/react/server';
|
|
20
18
|
|
|
21
19
|
import { getI18nInstance } from './lingui-server-instance';
|
|
@@ -30,10 +28,10 @@ export function initLingui(lang: string) {
|
|
|
30
28
|
return i18n;
|
|
31
29
|
}
|
|
32
30
|
`;
|
|
33
|
-
|
|
31
|
+
writeFileSyncWithLog({ targetPath: targetPath$4, content: content$4, fileName: fileName$4 });
|
|
34
32
|
|
|
35
33
|
const fileName$3 = `linqui-client-provider.tsx`;
|
|
36
|
-
const targetPath$3 =
|
|
34
|
+
const targetPath$3 = findOrInitialsFile(`src/utils/${fileName$3}`);
|
|
37
35
|
const content$3 = `'use client';
|
|
38
36
|
|
|
39
37
|
import { type ReactNode, useState } from 'react';
|
|
@@ -60,10 +58,10 @@ export function LinguiClientProvider({
|
|
|
60
58
|
return <I18nProvider i18n={i18n}>{children}</I18nProvider>;
|
|
61
59
|
}
|
|
62
60
|
`;
|
|
63
|
-
|
|
61
|
+
writeFileSyncWithLog({ targetPath: targetPath$3, content: content$3, fileName: fileName$3 });
|
|
64
62
|
|
|
65
63
|
const fileName$2 = `lingui.config.js`;
|
|
66
|
-
const targetPath$2 =
|
|
64
|
+
const targetPath$2 = findOrInitialsFile(fileName$2);
|
|
67
65
|
const content$2 = `/** @type {import('@lingui/conf').LinguiConfig} */
|
|
68
66
|
module.exports = {
|
|
69
67
|
locales: ['en', 'mn'],
|
|
@@ -80,10 +78,10 @@ module.exports = {
|
|
|
80
78
|
compileNamespace: 'ts',
|
|
81
79
|
};
|
|
82
80
|
`;
|
|
83
|
-
|
|
81
|
+
writeFileSyncWithLog({ targetPath: targetPath$2, content: content$2, fileName: fileName$2 });
|
|
84
82
|
|
|
85
83
|
const fileName$1 = `lingui-server-instance.ts`;
|
|
86
|
-
const targetPath$1 =
|
|
84
|
+
const targetPath$1 = findOrInitialsFile(`src/locales/${fileName$1}`);
|
|
87
85
|
const content$1 = `import 'server-only';
|
|
88
86
|
|
|
89
87
|
import { I18n, Messages, setupI18n } from '@lingui/core';
|
|
@@ -125,11 +123,12 @@ export const getI18nInstance = (locale: SupportedLocales): I18n => {
|
|
|
125
123
|
return allI18nInstances[locale] || allI18nInstances['en']!;
|
|
126
124
|
};
|
|
127
125
|
`;
|
|
128
|
-
|
|
126
|
+
writeFileSyncWithLog({ targetPath: targetPath$1, content: content$1, fileName: fileName$1 });
|
|
129
127
|
|
|
130
128
|
const fileName = `package.json`;
|
|
131
|
-
const targetPath =
|
|
132
|
-
const content =
|
|
129
|
+
const targetPath = getFilePath(fileName);
|
|
130
|
+
const content = readUtf8File(targetPath);
|
|
133
131
|
content.scripts['lingui:extract:clean'] = `lingui extract --clean`;
|
|
134
132
|
content.scripts['lingui:compile:typescript'] = `lingui compile --typescript`;
|
|
135
|
-
|
|
133
|
+
writeFileSyncWithLog({ targetPath, content: JSON.stringify(content, null, 2), fileName, option: 'utf-8' });
|
|
134
|
+
//# sourceMappingURL=index-C7IjWgfh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-C7IjWgfh.js","sources":["../../src/src/bin/nextjs15/lingui/dependencies.ts","../../src/src/bin/nextjs15/lingui/init-lingui.ts","../../src/src/bin/nextjs15/lingui/lingui-client-provider.ts","../../src/src/bin/nextjs15/lingui/lingui-config-js.ts","../../src/src/bin/nextjs15/lingui/lingui-server-instance.ts","../../src/src/bin/nextjs15/lingui/packagejson.ts"],"sourcesContent":[null,null,null,null,null,null],"names":["fileName","targetPath","content"],"mappings":";;;;;;AAEA,UAAU,CAAC;IACT,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE;IACrD,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE;IAC3D,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE;AACxD,IAAA,EAAE,IAAI,EA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AC;AACxC,MAAM,OAAO,GAAG,YAAY,CAAC,UAAU,CAAC;AAExC,OAAO,CAAC,OAAO,CAAC,sBAAsB,CAAC,GAAG,wBAAwB;AAClE,OAAO,CAAC,OAAO,CAAC,2BAA2B,CAAC,GAAG,6BAA6B;AAE5E,oBAAoB,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { n as npmInstall } from './npm-install-7LYQx09p.js';
|
|
2
|
+
import 'child_process';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
require('child_process');
|
|
5
|
-
|
|
6
|
-
npmInstall.npmInstall([
|
|
4
|
+
npmInstall([
|
|
7
5
|
{ name: 'web-ggf', version: 'latest' },
|
|
8
6
|
{ name: 'js-cookie', version: '^3.0.5' },
|
|
9
7
|
{ name: 'daisyui', version: 'latest', dev: true },
|
|
10
8
|
{ name: '@types/js-cookie', version: '^3.0.6', dev: true },
|
|
11
9
|
]);
|
|
10
|
+
//# sourceMappingURL=index-CnWNcsRs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-CnWNcsRs.js","sources":["../../src/src/bin/nextjs15/base-dependencies/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAEA,UAAU,CAAC;AACT,IAAA,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE;AACtC,IAAA,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE;IACxC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE;IACjD,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE;AAC3D,CAAA,CAAC"}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var child_process = require('child_process');
|
|
1
|
+
import { execSync } from 'child_process';
|
|
4
2
|
|
|
5
3
|
//
|
|
6
4
|
function npmInstall(dependencies) {
|
|
7
5
|
try {
|
|
8
6
|
for (const dep of dependencies) {
|
|
9
7
|
process.stdout.write(`⌛ Installing "${dep.name}"...`);
|
|
10
|
-
|
|
8
|
+
execSync(`npm i${dep.dev ? ' -D' : ''} ${dep.name}@${dep.version} --silent`, { stdio: 'ignore', cwd: process.cwd() });
|
|
11
9
|
process.stdout.write(`\r✅ Installed "${dep.name}@${dep.version}"\n`);
|
|
12
10
|
}
|
|
13
11
|
}
|
|
@@ -17,4 +15,5 @@ function npmInstall(dependencies) {
|
|
|
17
15
|
}
|
|
18
16
|
}
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
export { npmInstall as n };
|
|
19
|
+
//# sourceMappingURL=npm-install-7LYQx09p.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-install-7LYQx09p.js","sources":["../../src/src/bin/nextjs15/helper/npm-install.ts"],"sourcesContent":[null],"names":[],"mappings":";;AACA;AAEM,SAAU,UAAU,CAAC,YAAgE,EAAA;AACzF,IAAA,IAAI;AACF,QAAA,KAAK,MAAM,GAAG,IAAI,YAAY,EAAE;YAC9B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA,cAAA,EAAiB,GAAG,CAAC,IAAI,CAAA,IAAA,CAAM,CAAC;AAErD,YAAA,QAAQ,CAAC,CAAA,KAAA,EAAQ,GAAG,CAAC,GAAG,GAAG,KAAK,GAAG,EAAE,CAAA,CAAA,EAAI,GAAG,CAAC,IAAI,CAAA,CAAA,EAAI,GAAG,CAAC,OAAO,CAAA,SAAA,CAAW,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,EAAE,CAAC;AACrH,YAAA,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA,eAAA,EAAkB,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,OAAO,CAAA,GAAA,CAAK,CAAC;QACtE;IACF;IAAE,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,KAAK,CAAC,mCAAmC,EAAG,KAAe,EAAE,OAAO,CAAC;AAC7E,QAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjB;AACF;;;;"}
|
package/bin/nextjs15/index.js
CHANGED
|
@@ -1,16 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
#!/usr/bin/env node
|
|
3
2
|
const init = process.argv[2];
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
console.error('Invalid init. Usage: npx web-ggf nextjs');
|
|
3
|
+
if (!init || init !== 'nextjs15') {
|
|
4
|
+
console.error('Invalid init. Usage: npx web-ggf nextjs15');
|
|
7
5
|
process.exit(1);
|
|
8
6
|
}
|
|
9
|
-
function main() {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
7
|
+
async function main() {
|
|
8
|
+
try {
|
|
9
|
+
await import('../_chunks/index-BbfKFDuQ.js');
|
|
10
|
+
await import('../_chunks/index-BksocSTH.js');
|
|
11
|
+
await import('../_chunks/index-BxF5ETQg.js');
|
|
12
|
+
await import('../_chunks/index-C7IjWgfh.js');
|
|
13
|
+
await import('../_chunks/index-CnWNcsRs.js');
|
|
14
|
+
}
|
|
15
|
+
catch (error) {
|
|
16
|
+
console.error(error);
|
|
17
|
+
process.exit(1);
|
|
18
|
+
}
|
|
15
19
|
}
|
|
16
|
-
main()
|
|
20
|
+
main().catch((error) => {
|
|
21
|
+
console.error(error);
|
|
22
|
+
process.exit(1);
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/src/bin/nextjs15/index.ts"],"sourcesContent":[null],"names":[],"mappings":";AACA,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AAE5B,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,UAAU,EAAE;AAChC,IAAA,OAAO,CAAC,KAAK,CAAC,2CAA2C,CAAC;AAC1D,IAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AACjB;AAEA,eAAe,IAAI,GAAA;AACjB,IAAA,IAAI;AACF,QAAA,MAAM,OAAO,8BAAW,CAAC;AACzB,QAAA,MAAM,OAAO,8BAAgB,CAAC;AAC9B,QAAA,MAAM,OAAO,8BAAW,CAAC;AACzB,QAAA,MAAM,OAAO,8BAAU,CAAC;AACxB,QAAA,MAAM,OAAO,8BAAqB,CAAC;IACrC;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;AACpB,QAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;IACjB;AACF;AAEA,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,KAAI;AACrB,IAAA,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;AACpB,IAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AACjB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-page.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/adjust-files/auth-page.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"favicon.ico.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/adjust-files/favicon.ico.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"globalcss.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/adjust-files/globalcss.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"home-page.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/adjust-files/home-page.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/adjust-files/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layout.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/adjust-files/layout.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/adjust-files/middleware.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"next-config.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/adjust-files/next-config.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unwanted.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/adjust-files/unwanted.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/base-dependencies/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"APP_CONFIG.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/configs/APP_CONFIG.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"APP_CONFIG_D.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/configs/APP_CONFIG_D.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HOST_CONFIG.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/configs/HOST_CONFIG.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HOST_CONFIG_D.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/configs/HOST_CONFIG_D.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MIDDLEWARE_CONFIG.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/configs/MIDDLEWARE_CONFIG.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"STORE_KEY_CONFIG.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/configs/STORE_KEY_CONFIG.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"STORE_KEY_CONFIG_D.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/configs/STORE_KEY_CONFIG_D.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"THEME_CONFIG.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/configs/THEME_CONFIG.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"favicon.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/configs/favicon.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './APP_CONFIG_D';
|
|
2
|
+
import './APP_CONFIG';
|
|
3
|
+
import './HOST_CONFIG_D';
|
|
4
|
+
import './HOST_CONFIG';
|
|
5
|
+
import './MIDDLEWARE_CONFIG';
|
|
6
|
+
import './STORE_KEY_CONFIG_D';
|
|
7
|
+
import './STORE_KEY_CONFIG';
|
|
8
|
+
import './THEME_CONFIG';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/configs/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,CAAC;AACxB,OAAO,cAAc,CAAC;AACtB,OAAO,iBAAiB,CAAC;AACzB,OAAO,eAAe,CAAC;AACvB,OAAO,qBAAqB,CAAC;AAC7B,OAAO,sBAAsB,CAAC;AAC9B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apollo-provider.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/graphql/apollo-provider.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/graphql/dependencies.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/graphql/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { WriteFileOptions } from 'fs';
|
|
2
|
+
export declare function findOrInitialsFile(pathWithNameExtension: string): string;
|
|
3
|
+
export declare function deleteFile(filePath: string): void;
|
|
4
|
+
export declare function getFilePath(name: string): string;
|
|
5
|
+
export declare function isExist(name: string): boolean;
|
|
6
|
+
export declare function mkdirSync(name: string): void;
|
|
7
|
+
export declare function readUtf8File(filePath: string): Record<string, any>;
|
|
8
|
+
export declare function writeFileSyncWithLog({ targetPath, content, fileName, option }: WriteFileSyncWithLogProps): void;
|
|
9
|
+
export interface WriteFileSyncWithLogProps {
|
|
10
|
+
targetPath: string;
|
|
11
|
+
content: string;
|
|
12
|
+
fileName: string;
|
|
13
|
+
option?: WriteFileOptions;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=file-helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-helper.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/helper/file-helper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,IAAI,CAAC;AAI3C,wBAAgB,kBAAkB,CAAC,qBAAqB,EAAE,MAAM,GAAG,MAAM,CAgBxE;AAED,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAKjD;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,UAEvC;AAED,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,WAEnC;AACD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,QAGrC;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CACpD,MAAM,EACN,GAAG,CACJ,CAEA;AAED,wBAAgB,oBAAoB,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,yBAAyB,QAOxG;AAED,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,gBAAgB,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"npm-install.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/helper/npm-install.ts"],"names":[],"mappings":"AAGA,wBAAgB,UAAU,CAAC,YAAY,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,EAAE,QAY1F"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function updatePackageJson({ scripts, devDependencies, dependencies }?: UpdatePackageJsonProps): Promise<void>;
|
|
2
|
+
interface UpdatePackageJsonProps {
|
|
3
|
+
scripts?: {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
};
|
|
6
|
+
dependencies?: {
|
|
7
|
+
[key: string]: string;
|
|
8
|
+
};
|
|
9
|
+
devDependencies?: {
|
|
10
|
+
[key: string]: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=package-json-helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-json-helper.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/helper/package-json-helper.ts"],"names":[],"mappings":"AAGA,wBAAsB,iBAAiB,CAAC,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,GAAE,sBAA2B,iBAc9G;AAQD,UAAU,sBAAsB;IAC9B,OAAO,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACpC,YAAY,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACzC,eAAe,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CAC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/bin/nextjs15/index.ts"],"names":[],"mappings":";AACA,QAAA,MAAM,IAAI,QAAkB,CAAC;AAO7B,iBAAe,IAAI,kBAWlB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependencies.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/lingui/dependencies.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/lingui/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init-lingui.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/lingui/init-lingui.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lingui-client-provider.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/lingui/lingui-client-provider.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lingui-config-js.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/lingui/lingui-config-js.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lingui-server-instance.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/lingui/lingui-server-instance.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packagejson.d.ts","sourceRoot":"","sources":["../../../../src/bin/nextjs15/lingui/packagejson.ts"],"names":[],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "web-ggf",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"bin": {
|
|
10
|
-
"nextjs15": "./bin/nextjs15/index.js"
|
|
10
|
+
"web-ggf-nextjs15": "./bin/nextjs15/index.js"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
"./apollo-nextjs-client": {
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var fs = require('fs');
|
|
4
|
-
var path = require('path');
|
|
5
|
-
|
|
6
|
-
function _interopNamespaceDefault(e) {
|
|
7
|
-
var n = Object.create(null);
|
|
8
|
-
if (e) {
|
|
9
|
-
Object.keys(e).forEach(function (k) {
|
|
10
|
-
if (k !== 'default') {
|
|
11
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
12
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () { return e[k]; }
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
n.default = e;
|
|
20
|
-
return Object.freeze(n);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
var fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs);
|
|
24
|
-
var path__namespace = /*#__PURE__*/_interopNamespaceDefault(path);
|
|
25
|
-
|
|
26
|
-
function findOrInitialsFile(pathWithNameExtension) {
|
|
27
|
-
if (isExist(pathWithNameExtension)) {
|
|
28
|
-
console.warn(`❎ ${pathWithNameExtension} is existing`);
|
|
29
|
-
return path__namespace.join(process.cwd(), pathWithNameExtension);
|
|
30
|
-
}
|
|
31
|
-
for (const pathName of pathWithNameExtension.split('/').reduce((acc, cur, idx) => {
|
|
32
|
-
if (idx === 0)
|
|
33
|
-
return [cur];
|
|
34
|
-
return [...acc, `${acc.slice(-1)[0]}/${cur}`];
|
|
35
|
-
}, [])) {
|
|
36
|
-
if (pathName.includes('.'))
|
|
37
|
-
continue;
|
|
38
|
-
if (!isExist(pathName)) {
|
|
39
|
-
console.warn(`${pathName} is not exist`);
|
|
40
|
-
mkdirSync(pathName);
|
|
41
|
-
}
|
|
42
|
-
else
|
|
43
|
-
console.warn(`${pathName} is exist`);
|
|
44
|
-
}
|
|
45
|
-
return path__namespace.join(process.cwd(), pathWithNameExtension);
|
|
46
|
-
}
|
|
47
|
-
function deleteFile(filePath) {
|
|
48
|
-
if (isExist(filePath)) {
|
|
49
|
-
fs__namespace.unlinkSync(getFilePath(filePath));
|
|
50
|
-
console.warn(`${filePath} is removed`);
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function getFilePath(name) {
|
|
54
|
-
return path__namespace.join(process.cwd(), name);
|
|
55
|
-
}
|
|
56
|
-
function isExist(name) {
|
|
57
|
-
return fs__namespace.existsSync(getFilePath(name));
|
|
58
|
-
}
|
|
59
|
-
function mkdirSync(name) {
|
|
60
|
-
fs__namespace.mkdirSync(getFilePath(name), { recursive: true });
|
|
61
|
-
return console.warn(`🆗 ${name} directory created`);
|
|
62
|
-
}
|
|
63
|
-
function readUtf8File(filePath) {
|
|
64
|
-
return JSON.parse(fs__namespace.readFileSync(filePath, 'utf-8'));
|
|
65
|
-
}
|
|
66
|
-
function writeFileSyncWithLog({ targetPath, content, fileName, option }) {
|
|
67
|
-
try {
|
|
68
|
-
fs__namespace.writeFileSync(targetPath, content, option);
|
|
69
|
-
console.warn(`🆗 -> ${fileName} successfully ${fs__namespace.existsSync(targetPath) ? 'updated' : 'created'}`);
|
|
70
|
-
}
|
|
71
|
-
catch (err) {
|
|
72
|
-
console.error('❌ Error creating file:', err);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
exports.deleteFile = deleteFile;
|
|
77
|
-
exports.findOrInitialsFile = findOrInitialsFile;
|
|
78
|
-
exports.getFilePath = getFilePath;
|
|
79
|
-
exports.readUtf8File = readUtf8File;
|
|
80
|
-
exports.writeFileSyncWithLog = writeFileSyncWithLog;
|