web-ggf 1.0.7 → 1.0.9
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-CPVdSg32.js +80 -0
- package/bin/_chunks/{index-DgSqZr5v.mjs → index-B6tEqrai.js} +5 -4
- package/bin/_chunks/{index-BDhnAS_n.mjs → index-BaQt8yVT.js} +21 -20
- package/bin/_chunks/{index-BajZ1Zw6.mjs → index-CJwhB9ZM.js} +19 -18
- package/bin/_chunks/{index-DuSBC4jV.mjs → index-DDL8vi6o.js} +21 -20
- package/bin/_chunks/{index-CjXJh1ls.mjs → index-m0G5jZTY.js} +10 -9
- package/bin/_chunks/{npm-install-7LYQx09p.mjs → npm-install-DR6c952D.js} +5 -4
- package/bin/nextjs15/index.js +16 -0
- package/package.json +14 -12
- package/bin/_chunks/file-helper-D3QczOlm.mjs +0 -55
- package/bin/_chunks/file-helper-D3QczOlm.mjs.map +0 -1
- package/bin/_chunks/index-BDhnAS_n.mjs.map +0 -1
- package/bin/_chunks/index-BajZ1Zw6.mjs.map +0 -1
- package/bin/_chunks/index-CjXJh1ls.mjs.map +0 -1
- package/bin/_chunks/index-DgSqZr5v.mjs.map +0 -1
- package/bin/_chunks/index-DuSBC4jV.mjs.map +0 -1
- package/bin/_chunks/npm-install-7LYQx09p.mjs.map +0 -1
- package/bin/nextjs15/index.mjs +0 -14
- package/bin/nextjs15/index.mjs.map +0 -1
|
@@ -0,0 +1,80 @@
|
|
|
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;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import 'child_process';
|
|
1
|
+
'use strict';
|
|
3
2
|
|
|
4
|
-
npmInstall(
|
|
3
|
+
var npmInstall = require('./npm-install-DR6c952D.js');
|
|
4
|
+
require('child_process');
|
|
5
|
+
|
|
6
|
+
npmInstall.npmInstall([
|
|
5
7
|
{ name: 'web-ggf', version: 'latest' },
|
|
6
8
|
{ name: 'js-cookie', version: '^3.0.5' },
|
|
7
9
|
{ name: 'daisyui', version: 'latest', dev: true },
|
|
8
10
|
{ name: '@types/js-cookie', version: '^3.0.6', dev: true },
|
|
9
11
|
]);
|
|
10
|
-
//# sourceMappingURL=index-DgSqZr5v.mjs.map
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var fileHelper = require('./file-helper-CPVdSg32.js');
|
|
4
|
+
require('fs');
|
|
5
|
+
require('path');
|
|
4
6
|
|
|
5
7
|
const fileName$5 = `page.tsx`;
|
|
6
|
-
const targetPath$5 = findOrInitialsFile(`src/app/[locale]/auth/${fileName$5}`);
|
|
8
|
+
const targetPath$5 = fileHelper.findOrInitialsFile(`src/app/[locale]/auth/${fileName$5}`);
|
|
7
9
|
const content$5 = `export default function AuthPage() {
|
|
8
10
|
return <div>AuthPage</div>;
|
|
9
11
|
}
|
|
10
12
|
`;
|
|
11
|
-
writeFileSyncWithLog({ targetPath: targetPath$5, content: content$5, fileName: fileName$5 });
|
|
13
|
+
fileHelper.writeFileSyncWithLog({ targetPath: targetPath$5, content: content$5, fileName: fileName$5 });
|
|
12
14
|
|
|
13
15
|
const fileName$4 = `globals.css`;
|
|
14
|
-
const targetPath$4 = findOrInitialsFile(`src/app/[locale]/${fileName$4}`);
|
|
16
|
+
const targetPath$4 = fileHelper.findOrInitialsFile(`src/app/[locale]/${fileName$4}`);
|
|
15
17
|
const content$4 = `@import "tailwindcss";
|
|
16
18
|
@import "../../configs/THEME_CONFIG/index.css";
|
|
17
19
|
`;
|
|
18
|
-
writeFileSyncWithLog({ targetPath: targetPath$4, content: content$4, fileName: fileName$4 });
|
|
20
|
+
fileHelper.writeFileSyncWithLog({ targetPath: targetPath$4, content: content$4, fileName: fileName$4 });
|
|
19
21
|
|
|
20
22
|
const fileName$3 = `page.tsx`;
|
|
21
|
-
const targetPath$3 = findOrInitialsFile(`src/app/[locale]/${fileName$3}`);
|
|
23
|
+
const targetPath$3 = fileHelper.findOrInitialsFile(`src/app/[locale]/${fileName$3}`);
|
|
22
24
|
const content$3 = `import { t } from '@lingui/core/macro';
|
|
23
25
|
|
|
24
26
|
import { initLingui, PageLangParam } from '@/locales/init-lingui';
|
|
@@ -34,10 +36,10 @@ export default async function Page({ params }: PageLangParam) {
|
|
|
34
36
|
);
|
|
35
37
|
}
|
|
36
38
|
`;
|
|
37
|
-
writeFileSyncWithLog({ targetPath: targetPath$3, content: content$3, fileName: fileName$3 });
|
|
39
|
+
fileHelper.writeFileSyncWithLog({ targetPath: targetPath$3, content: content$3, fileName: fileName$3 });
|
|
38
40
|
|
|
39
41
|
const fileName$2 = `layout.tsx`;
|
|
40
|
-
const targetPath$2 = findOrInitialsFile(`src/app/[locale]/${fileName$2}`);
|
|
42
|
+
const targetPath$2 = fileHelper.findOrInitialsFile(`src/app/[locale]/${fileName$2}`);
|
|
41
43
|
const content$2 = `import { ReactNode } from 'react';
|
|
42
44
|
|
|
43
45
|
import { i18n as Lingui18n } from '@lingui/core';
|
|
@@ -71,10 +73,10 @@ export const metadata: Metadata = {
|
|
|
71
73
|
description: 'Test description',
|
|
72
74
|
};
|
|
73
75
|
`;
|
|
74
|
-
writeFileSyncWithLog({ targetPath: targetPath$2, content: content$2, fileName: fileName$2 });
|
|
76
|
+
fileHelper.writeFileSyncWithLog({ targetPath: targetPath$2, content: content$2, fileName: fileName$2 });
|
|
75
77
|
|
|
76
78
|
const fileName$1 = `middleware.ts`;
|
|
77
|
-
const targetPath$1 = findOrInitialsFile(`src/${fileName$1}`);
|
|
79
|
+
const targetPath$1 = fileHelper.findOrInitialsFile(`src/${fileName$1}`);
|
|
78
80
|
const content$1 = `import { NextRequest } from 'next/server';
|
|
79
81
|
|
|
80
82
|
import { middlewareConfig } from '@/configs/MIDDLEWARE_CONFIG';
|
|
@@ -87,10 +89,10 @@ export const config = {
|
|
|
87
89
|
matcher: '/((?!api|_next/data|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)',
|
|
88
90
|
};
|
|
89
91
|
`;
|
|
90
|
-
writeFileSyncWithLog({ targetPath: targetPath$1, content: content$1, fileName: fileName$1 });
|
|
92
|
+
fileHelper.writeFileSyncWithLog({ targetPath: targetPath$1, content: content$1, fileName: fileName$1 });
|
|
91
93
|
|
|
92
94
|
const fileName = `next.config.ts`;
|
|
93
|
-
const targetPath = findOrInitialsFile(fileName);
|
|
95
|
+
const targetPath = fileHelper.findOrInitialsFile(fileName);
|
|
94
96
|
const content = `import type { NextConfig } from 'next';
|
|
95
97
|
|
|
96
98
|
const nextConfig: NextConfig = {
|
|
@@ -111,10 +113,9 @@ const nextConfig: NextConfig = {
|
|
|
111
113
|
|
|
112
114
|
export default nextConfig;
|
|
113
115
|
`;
|
|
114
|
-
writeFileSyncWithLog({ targetPath, content, fileName });
|
|
116
|
+
fileHelper.writeFileSyncWithLog({ targetPath, content, fileName });
|
|
115
117
|
|
|
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-BDhnAS_n.mjs.map
|
|
118
|
+
fileHelper.deleteFile('src/app/page.tsx');
|
|
119
|
+
fileHelper.deleteFile('src/app/layout.tsx');
|
|
120
|
+
fileHelper.deleteFile('src/app/favicon.ico');
|
|
121
|
+
fileHelper.deleteFile('src/app/globals.css');
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
import { f as findOrInitialsFile, w as writeFileSyncWithLog, g as getFilePath, r as readUtf8File } from './file-helper-D3QczOlm.mjs';
|
|
3
|
-
import 'child_process';
|
|
4
|
-
import 'fs';
|
|
5
|
-
import 'path';
|
|
1
|
+
'use strict';
|
|
6
2
|
|
|
7
|
-
npmInstall(
|
|
3
|
+
var npmInstall = require('./npm-install-DR6c952D.js');
|
|
4
|
+
var fileHelper = require('./file-helper-CPVdSg32.js');
|
|
5
|
+
require('child_process');
|
|
6
|
+
require('fs');
|
|
7
|
+
require('path');
|
|
8
|
+
|
|
9
|
+
npmInstall.npmInstall([
|
|
8
10
|
{ name: '@lingui/cli', version: 'latest', dev: true },
|
|
9
11
|
{ name: '@lingui/swc-plugin', version: '5.7.0', dev: true },
|
|
10
12
|
{ name: '@lingui/loader', version: 'latest', dev: true },
|
|
@@ -13,7 +15,7 @@ npmInstall([
|
|
|
13
15
|
]);
|
|
14
16
|
|
|
15
17
|
const fileName$4 = `init-lingui.ts`;
|
|
16
|
-
const targetPath$4 = findOrInitialsFile(`src/locales/${fileName$4}`);
|
|
18
|
+
const targetPath$4 = fileHelper.findOrInitialsFile(`src/locales/${fileName$4}`);
|
|
17
19
|
const content$4 = `import { setI18n } from '@lingui/react/server';
|
|
18
20
|
|
|
19
21
|
import { getI18nInstance } from './lingui-server-instance';
|
|
@@ -28,10 +30,10 @@ export function initLingui(lang: string) {
|
|
|
28
30
|
return i18n;
|
|
29
31
|
}
|
|
30
32
|
`;
|
|
31
|
-
writeFileSyncWithLog({ targetPath: targetPath$4, content: content$4, fileName: fileName$4 });
|
|
33
|
+
fileHelper.writeFileSyncWithLog({ targetPath: targetPath$4, content: content$4, fileName: fileName$4 });
|
|
32
34
|
|
|
33
35
|
const fileName$3 = `linqui-client-provider.tsx`;
|
|
34
|
-
const targetPath$3 = findOrInitialsFile(`src/utils/${fileName$3}`);
|
|
36
|
+
const targetPath$3 = fileHelper.findOrInitialsFile(`src/utils/${fileName$3}`);
|
|
35
37
|
const content$3 = `'use client';
|
|
36
38
|
|
|
37
39
|
import { type ReactNode, useState } from 'react';
|
|
@@ -58,10 +60,10 @@ export function LinguiClientProvider({
|
|
|
58
60
|
return <I18nProvider i18n={i18n}>{children}</I18nProvider>;
|
|
59
61
|
}
|
|
60
62
|
`;
|
|
61
|
-
writeFileSyncWithLog({ targetPath: targetPath$3, content: content$3, fileName: fileName$3 });
|
|
63
|
+
fileHelper.writeFileSyncWithLog({ targetPath: targetPath$3, content: content$3, fileName: fileName$3 });
|
|
62
64
|
|
|
63
65
|
const fileName$2 = `lingui.config.js`;
|
|
64
|
-
const targetPath$2 = findOrInitialsFile(fileName$2);
|
|
66
|
+
const targetPath$2 = fileHelper.findOrInitialsFile(fileName$2);
|
|
65
67
|
const content$2 = `/** @type {import('@lingui/conf').LinguiConfig} */
|
|
66
68
|
module.exports = {
|
|
67
69
|
locales: ['en', 'mn'],
|
|
@@ -78,10 +80,10 @@ module.exports = {
|
|
|
78
80
|
compileNamespace: 'ts',
|
|
79
81
|
};
|
|
80
82
|
`;
|
|
81
|
-
writeFileSyncWithLog({ targetPath: targetPath$2, content: content$2, fileName: fileName$2 });
|
|
83
|
+
fileHelper.writeFileSyncWithLog({ targetPath: targetPath$2, content: content$2, fileName: fileName$2 });
|
|
82
84
|
|
|
83
85
|
const fileName$1 = `lingui-server-instance.ts`;
|
|
84
|
-
const targetPath$1 = findOrInitialsFile(`src/locales/${fileName$1}`);
|
|
86
|
+
const targetPath$1 = fileHelper.findOrInitialsFile(`src/locales/${fileName$1}`);
|
|
85
87
|
const content$1 = `import 'server-only';
|
|
86
88
|
|
|
87
89
|
import { I18n, Messages, setupI18n } from '@lingui/core';
|
|
@@ -123,12 +125,11 @@ export const getI18nInstance = (locale: SupportedLocales): I18n => {
|
|
|
123
125
|
return allI18nInstances[locale] || allI18nInstances['en']!;
|
|
124
126
|
};
|
|
125
127
|
`;
|
|
126
|
-
writeFileSyncWithLog({ targetPath: targetPath$1, content: content$1, fileName: fileName$1 });
|
|
128
|
+
fileHelper.writeFileSyncWithLog({ targetPath: targetPath$1, content: content$1, fileName: fileName$1 });
|
|
127
129
|
|
|
128
130
|
const fileName = `package.json`;
|
|
129
|
-
const targetPath = getFilePath(fileName);
|
|
130
|
-
const content = readUtf8File(targetPath);
|
|
131
|
+
const targetPath = fileHelper.getFilePath(fileName);
|
|
132
|
+
const content = fileHelper.readUtf8File(targetPath);
|
|
131
133
|
content.scripts['lingui:extract:clean'] = `lingui extract --clean`;
|
|
132
134
|
content.scripts['lingui:compile:typescript'] = `lingui compile --typescript`;
|
|
133
|
-
writeFileSyncWithLog({ targetPath, content: JSON.stringify(content, null, 2), fileName, option: 'utf-8' });
|
|
134
|
-
//# sourceMappingURL=index-BajZ1Zw6.mjs.map
|
|
135
|
+
fileHelper.writeFileSyncWithLog({ targetPath, content: JSON.stringify(content, null, 2), fileName, option: 'utf-8' });
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var fileHelper = require('./file-helper-CPVdSg32.js');
|
|
4
|
+
require('fs');
|
|
5
|
+
require('path');
|
|
4
6
|
|
|
5
7
|
const fileName$7 = `APP_CONFIG.d.ts`;
|
|
6
|
-
const targetPath$7 = findOrInitialsFile(`src/configs/${fileName$7}`);
|
|
8
|
+
const targetPath$7 = fileHelper.findOrInitialsFile(`src/configs/${fileName$7}`);
|
|
7
9
|
const content$7 = `export interface AppConfigProps {
|
|
8
10
|
appIndex: string;
|
|
9
11
|
tokens: {
|
|
@@ -17,10 +19,10 @@ const content$7 = `export interface AppConfigProps {
|
|
|
17
19
|
};
|
|
18
20
|
}
|
|
19
21
|
`;
|
|
20
|
-
writeFileSyncWithLog({ targetPath: targetPath$7, content: content$7, fileName: fileName$7 });
|
|
22
|
+
fileHelper.writeFileSyncWithLog({ targetPath: targetPath$7, content: content$7, fileName: fileName$7 });
|
|
21
23
|
|
|
22
24
|
const fileName$6 = `APP_CONFIG.ts`;
|
|
23
|
-
const targetPath$6 = findOrInitialsFile(`src/configs/${fileName$6}`);
|
|
25
|
+
const targetPath$6 = fileHelper.findOrInitialsFile(`src/configs/${fileName$6}`);
|
|
24
26
|
const content$6 = `import type { AppConfigProps } from './APP_CONFIG.d';
|
|
25
27
|
|
|
26
28
|
export const APP_CONFIG: AppConfigProps = {
|
|
@@ -29,10 +31,10 @@ export const APP_CONFIG: AppConfigProps = {
|
|
|
29
31
|
map: { googleMapApiKey: '', defaultCenter: { lat: 47.919045645074696, lng: 106.91752910614014 }, defaultZoom: 12 },
|
|
30
32
|
};
|
|
31
33
|
`;
|
|
32
|
-
writeFileSyncWithLog({ targetPath: targetPath$6, content: content$6, fileName: fileName$6 });
|
|
34
|
+
fileHelper.writeFileSyncWithLog({ targetPath: targetPath$6, content: content$6, fileName: fileName$6 });
|
|
33
35
|
|
|
34
36
|
const fileName$5 = `HOST_CONFIG.d.ts`;
|
|
35
|
-
const targetPath$5 = findOrInitialsFile(`src/configs/${fileName$5}`);
|
|
37
|
+
const targetPath$5 = fileHelper.findOrInitialsFile(`src/configs/${fileName$5}`);
|
|
36
38
|
const content$5 = `export interface HostConfigProps {
|
|
37
39
|
host: string;
|
|
38
40
|
elastic: {
|
|
@@ -42,10 +44,10 @@ const content$5 = `export interface HostConfigProps {
|
|
|
42
44
|
};
|
|
43
45
|
}
|
|
44
46
|
`;
|
|
45
|
-
writeFileSyncWithLog({ targetPath: targetPath$5, content: content$5, fileName: fileName$5 });
|
|
47
|
+
fileHelper.writeFileSyncWithLog({ targetPath: targetPath$5, content: content$5, fileName: fileName$5 });
|
|
46
48
|
|
|
47
49
|
const fileName$4 = `HOST_CONFIG.ts`;
|
|
48
|
-
const targetPath$4 = findOrInitialsFile(`src/configs/${fileName$4}`);
|
|
50
|
+
const targetPath$4 = fileHelper.findOrInitialsFile(`src/configs/${fileName$4}`);
|
|
49
51
|
const content$4 = `import type { HostConfigProps } from './HOST_CONFIG.d';
|
|
50
52
|
|
|
51
53
|
export const HOST_CONFIG: HostConfigProps = {
|
|
@@ -57,10 +59,10 @@ export const HOST_CONFIG: HostConfigProps = {
|
|
|
57
59
|
}
|
|
58
60
|
};
|
|
59
61
|
`;
|
|
60
|
-
writeFileSyncWithLog({ targetPath: targetPath$4, content: content$4, fileName: fileName$4 });
|
|
62
|
+
fileHelper.writeFileSyncWithLog({ targetPath: targetPath$4, content: content$4, fileName: fileName$4 });
|
|
61
63
|
|
|
62
64
|
const fileName$3 = `MIDDLEWARE_CONFIG.ts`;
|
|
63
|
-
const targetPath$3 = findOrInitialsFile(`src/configs/${fileName$3}`);
|
|
65
|
+
const targetPath$3 = fileHelper.findOrInitialsFile(`src/configs/${fileName$3}`);
|
|
64
66
|
const content$3 = `import { NextJSAuthMiddleware } from 'web-ggf/nextjs-middleware';
|
|
65
67
|
|
|
66
68
|
import { APP_CONFIG } from '@/configs/APP_CONFIG';
|
|
@@ -79,10 +81,10 @@ export const middlewareConfig = new NextJSAuthMiddleware({
|
|
|
79
81
|
locale: 'mn',
|
|
80
82
|
});
|
|
81
83
|
`;
|
|
82
|
-
writeFileSyncWithLog({ targetPath: targetPath$3, content: content$3, fileName: fileName$3 });
|
|
84
|
+
fileHelper.writeFileSyncWithLog({ targetPath: targetPath$3, content: content$3, fileName: fileName$3 });
|
|
83
85
|
|
|
84
86
|
const fileName$2 = `STORE_KEY_CONFIG.d.ts`;
|
|
85
|
-
const targetPath$2 = findOrInitialsFile(`src/configs/${fileName$2}`);
|
|
87
|
+
const targetPath$2 = fileHelper.findOrInitialsFile(`src/configs/${fileName$2}`);
|
|
86
88
|
const content$2 = `export interface StoreKeyConfigProps {
|
|
87
89
|
USER_TOKEN: string;
|
|
88
90
|
REFRESH_TOKEN: string;
|
|
@@ -90,10 +92,10 @@ const content$2 = `export interface StoreKeyConfigProps {
|
|
|
90
92
|
EXPIRES_IN: string;
|
|
91
93
|
}
|
|
92
94
|
`;
|
|
93
|
-
writeFileSyncWithLog({ targetPath: targetPath$2, content: content$2, fileName: fileName$2 });
|
|
95
|
+
fileHelper.writeFileSyncWithLog({ targetPath: targetPath$2, content: content$2, fileName: fileName$2 });
|
|
94
96
|
|
|
95
97
|
const fileName$1 = `STORE_KEY_CONFIG.ts`;
|
|
96
|
-
const targetPath$1 = findOrInitialsFile(`src/configs/${fileName$1}`);
|
|
98
|
+
const targetPath$1 = fileHelper.findOrInitialsFile(`src/configs/${fileName$1}`);
|
|
97
99
|
const content$1 = `import type { StoreKeyConfigProps } from './STORE_KEY_CONFIG.d';
|
|
98
100
|
|
|
99
101
|
import { APP_CONFIG } from '@/configs/APP_CONFIG';
|
|
@@ -105,10 +107,10 @@ export const STORE_KEY_CONFIG: StoreKeyConfigProps = {
|
|
|
105
107
|
EXPIRES_IN: \`\${APP_CONFIG.appIndex}EXPIRES_IN\`,
|
|
106
108
|
};
|
|
107
109
|
`;
|
|
108
|
-
writeFileSyncWithLog({ targetPath: targetPath$1, content: content$1, fileName: fileName$1 });
|
|
110
|
+
fileHelper.writeFileSyncWithLog({ targetPath: targetPath$1, content: content$1, fileName: fileName$1 });
|
|
109
111
|
|
|
110
112
|
const fileName = `index.css`;
|
|
111
|
-
const targetPath = findOrInitialsFile(`src/configs/THEME_CONFIG/${fileName}`);
|
|
113
|
+
const targetPath = fileHelper.findOrInitialsFile(`src/configs/THEME_CONFIG/${fileName}`);
|
|
112
114
|
const content = `@plugin "daisyui" {
|
|
113
115
|
/*noinspection CssUnknownProperty*/
|
|
114
116
|
themes: light --default, dark --prefersdark;
|
|
@@ -128,5 +130,4 @@ const content = `@plugin "daisyui" {
|
|
|
128
130
|
--color-secondary: teal;
|
|
129
131
|
}
|
|
130
132
|
`;
|
|
131
|
-
writeFileSyncWithLog({ targetPath, content, fileName });
|
|
132
|
-
//# sourceMappingURL=index-DuSBC4jV.mjs.map
|
|
133
|
+
fileHelper.writeFileSyncWithLog({ targetPath, content, fileName });
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var fileHelper = require('./file-helper-CPVdSg32.js');
|
|
4
|
+
var npmInstall = require('./npm-install-DR6c952D.js');
|
|
5
|
+
require('fs');
|
|
6
|
+
require('path');
|
|
7
|
+
require('child_process');
|
|
6
8
|
|
|
7
9
|
const fileName = `apollo-provider.tsx`;
|
|
8
|
-
const targetPath = findOrInitialsFile(`src/utils/${fileName}`);
|
|
10
|
+
const targetPath = fileHelper.findOrInitialsFile(`src/utils/${fileName}`);
|
|
9
11
|
const content = `'use client';
|
|
10
12
|
|
|
11
13
|
import { ReactNode } from 'react';
|
|
@@ -35,9 +37,9 @@ export function ApolloProvider({ children }: { children: ReactNode }) {
|
|
|
35
37
|
);
|
|
36
38
|
}
|
|
37
39
|
`;
|
|
38
|
-
writeFileSyncWithLog({ targetPath, content, fileName });
|
|
40
|
+
fileHelper.writeFileSyncWithLog({ targetPath, content, fileName });
|
|
39
41
|
|
|
40
|
-
npmInstall([
|
|
42
|
+
npmInstall.npmInstall([
|
|
41
43
|
{ name: '@apollo/client', version: '^4.1.6' },
|
|
42
44
|
{ name: '@apollo/client-integration-nextjs', version: '^0.14.4' },
|
|
43
45
|
{ name: 'rxjs', version: '^7.8.2' },
|
|
@@ -45,4 +47,3 @@ npmInstall([
|
|
|
45
47
|
{ name: 'apollo-upload-client', version: '^19.0.0' },
|
|
46
48
|
{ name: '@types/apollo-upload-client', version: '^19.0.0', dev: true },
|
|
47
49
|
]);
|
|
48
|
-
//# sourceMappingURL=index-CjXJh1ls.mjs.map
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var child_process = require('child_process');
|
|
2
4
|
|
|
3
5
|
//
|
|
4
6
|
function npmInstall(dependencies) {
|
|
5
7
|
try {
|
|
6
8
|
for (const dep of dependencies) {
|
|
7
9
|
process.stdout.write(`⌛ Installing "${dep.name}"...`);
|
|
8
|
-
execSync(`npm i${dep.dev ? ' -D' : ''} ${dep.name}@${dep.version} --silent`, { stdio: 'ignore', cwd: process.cwd() });
|
|
10
|
+
child_process.execSync(`npm i${dep.dev ? ' -D' : ''} ${dep.name}@${dep.version} --silent`, { stdio: 'ignore', cwd: process.cwd() });
|
|
9
11
|
process.stdout.write(`\r✅ Installed "${dep.name}@${dep.version}"\n`);
|
|
10
12
|
}
|
|
11
13
|
}
|
|
@@ -15,5 +17,4 @@ function npmInstall(dependencies) {
|
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
//# sourceMappingURL=npm-install-7LYQx09p.mjs.map
|
|
20
|
+
exports.npmInstall = npmInstall;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const init = process.argv[2];
|
|
4
|
+
console.warn('>>> , init >>>', init);
|
|
5
|
+
if (init !== 'nextjs' || !init) {
|
|
6
|
+
console.error('Invalid init. Usage: npx web-ggf nextjs');
|
|
7
|
+
process.exit(1);
|
|
8
|
+
}
|
|
9
|
+
function main() {
|
|
10
|
+
Promise.resolve().then(function () { return require('../_chunks/index-B6tEqrai.js'); });
|
|
11
|
+
Promise.resolve().then(function () { return require('../_chunks/index-DDL8vi6o.js'); });
|
|
12
|
+
Promise.resolve().then(function () { return require('../_chunks/index-BaQt8yVT.js'); });
|
|
13
|
+
Promise.resolve().then(function () { return require('../_chunks/index-m0G5jZTY.js'); });
|
|
14
|
+
Promise.resolve().then(function () { return require('../_chunks/index-CJwhB9ZM.js'); });
|
|
15
|
+
}
|
|
16
|
+
main();
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "web-ggf",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
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.
|
|
10
|
+
"nextjs15": "./bin/nextjs15/index.js"
|
|
11
11
|
},
|
|
12
12
|
"exports": {
|
|
13
13
|
"./apollo-nextjs-client": {
|
|
@@ -50,31 +50,33 @@
|
|
|
50
50
|
"keywords": [],
|
|
51
51
|
"author": "",
|
|
52
52
|
"license": "ISC",
|
|
53
|
-
"
|
|
53
|
+
"dependencies": {
|
|
54
54
|
"@apollo/client": "^4.1.6",
|
|
55
55
|
"@apollo/client-integration-nextjs": "^0.14.4",
|
|
56
|
+
"cookie": "^1.1.1",
|
|
57
|
+
"apollo-upload-client": "^19.0.0",
|
|
58
|
+
"@types/js-cookie": "^3.0.6",
|
|
59
|
+
"graphql": "^16.13.1",
|
|
60
|
+
"js-cookie": "^3.0.5",
|
|
61
|
+
"next": "15.5.12",
|
|
62
|
+
"react": "^19.2.4",
|
|
63
|
+
"rxjs": "7.3.0",
|
|
64
|
+
"sonner": "^2.0.7"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
56
67
|
"@rollup/plugin-commonjs": "^29.0.2",
|
|
57
68
|
"@rollup/plugin-json": "^6.1.0",
|
|
58
69
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
59
70
|
"@rollup/plugin-terser": "^1.0.0",
|
|
60
71
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
61
72
|
"@types/apollo-upload-client": "^19.0.0",
|
|
62
|
-
"@types/js-cookie": "^3.0.6",
|
|
63
|
-
"apollo-upload-client": "^19.0.0",
|
|
64
|
-
"cookie": "^1.1.1",
|
|
65
73
|
"eslint": "^9.39.4",
|
|
66
74
|
"eslint-config-sukedesu": "^2.1.1",
|
|
67
75
|
"eslint-plugin-react": "^7.37.5",
|
|
68
76
|
"globals": "^17.4.0",
|
|
69
|
-
"graphql": "^16.13.1",
|
|
70
|
-
"js-cookie": "^3.0.5",
|
|
71
|
-
"next": "15.5.12",
|
|
72
|
-
"react": "^19.2.4",
|
|
73
77
|
"rollup": "^4.59.0",
|
|
74
78
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
75
79
|
"rollup-plugin-postcss": "^4.0.2",
|
|
76
|
-
"rxjs": "7.3.0",
|
|
77
|
-
"sonner": "^2.0.7",
|
|
78
80
|
"vitest": "^4.1.0"
|
|
79
81
|
}
|
|
80
82
|
}
|
|
@@ -1,55 +0,0 @@
|
|
|
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.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-helper-D3QczOlm.mjs","sources":["../../src/bin/src/bin/nextjs15/helper/file-helper.ts"],"sourcesContent":["import type { WriteFileOptions } from 'fs';\nimport * as fs from 'fs';\nimport * as path from 'path';\n\nexport function findOrInitialsFile(pathWithNameExtension: string): string {\n if (isExist(pathWithNameExtension)) {\n console.warn(`❎ ${pathWithNameExtension} is existing`);\n return path.join(process.cwd(), pathWithNameExtension);\n }\n for (const pathName of pathWithNameExtension.split('/').reduce((acc: string[], cur, idx) => {\n if (idx === 0) return [cur];\n return [...acc, `${acc.slice(-1)[0]}/${cur}`];\n }, [])) {\n if (pathName.includes('.')) continue;\n if (!isExist(pathName)) {\n console.warn(`${pathName} is not exist`);\n mkdirSync(pathName);\n } else console.warn(`${pathName} is exist`);\n }\n return path.join(process.cwd(), pathWithNameExtension);\n}\n\nexport function deleteFile(filePath: string): void {\n if (isExist(filePath)) {\n fs.unlinkSync(getFilePath(filePath));\n console.warn(`${filePath} is removed`);\n }\n}\n\nexport function getFilePath(name: string) {\n return path.join(process.cwd(), name);\n}\n\nexport function isExist(name: string) {\n return fs.existsSync(getFilePath(name));\n}\nexport function mkdirSync(name: string) {\n fs.mkdirSync(getFilePath(name), { recursive: true });\n return console.warn(`🆗 ${name} directory created`);\n}\n\nexport function readUtf8File(filePath: string): Record<\n string,\n any // eslint-disable-line @typescript-eslint/no-explicit-any\n> {\n return JSON.parse(fs.readFileSync(filePath, 'utf-8'));\n}\n\nexport function writeFileSyncWithLog({ targetPath, content, fileName, option }: WriteFileSyncWithLogProps) {\n try {\n fs.writeFileSync(targetPath, content, option);\n console.warn(`🆗 -> ${fileName} successfully ${fs.existsSync(targetPath) ? 'updated' : 'created'}`);\n } catch (err) {\n console.error('❌ Error creating file:', err);\n }\n}\n\nexport interface WriteFileSyncWithLogProps {\n targetPath: string;\n content: string;\n fileName: string;\n option?: WriteFileOptions;\n}\n"],"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,GAAG,CAAC;YAAE;AAC5B,QAAA,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;AACtB,YAAA,OAAO,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAA,aAAA,CAAe,CAAC;YACxC,SAAS,CAAC,QAAQ,CAAC;QACrB;;AAAO,YAAA,OAAO,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAA,SAAA,CAAW,CAAC;IAC7C;IACA,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,qBAAqB,CAAC;AACxD;AAEM,SAAU,UAAU,CAAC,QAAgB,EAAA;AACzC,IAAA,IAAI,OAAO,CAAC,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3,"file":"index-BDhnAS_n.mjs","sources":["../../src/bin/src/bin/nextjs15/adjust-files/auth-page.ts","../../src/bin/src/bin/nextjs15/adjust-files/globalcss.ts","../../src/bin/src/bin/nextjs15/adjust-files/home-page.ts","../../src/bin/src/bin/nextjs15/adjust-files/layout.ts","../../src/bin/src/bin/nextjs15/adjust-files/middleware.ts","../../src/bin/src/bin/nextjs15/adjust-files/next-config.ts","../../src/bin/src/bin/nextjs15/adjust-files/unwanted.ts"],"sourcesContent":["import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `page.tsx`;\nconst targetPath = findOrInitialsFile(`src/app/[locale]/auth/${fileName}`);\nconst content = `export default function AuthPage() {\n return <div>AuthPage</div>;\n}\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `globals.css`;\nconst targetPath = findOrInitialsFile(`src/app/[locale]/${fileName}`);\nconst content = `@import \"tailwindcss\";\n@import \"../../configs/THEME_CONFIG/index.css\";\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `page.tsx`;\nconst targetPath = findOrInitialsFile(`src/app/[locale]/${fileName}`);\nconst content = `import { t } from '@lingui/core/macro';\n\nimport { initLingui, PageLangParam } from '@/locales/init-lingui';\n\nexport default async function Page({ params }: PageLangParam) {\n const { locale } = await params;\n initLingui(locale);\n\n return (\n <div>\n <p>{t\\`Hello world\\`}</p>\n </div>\n );\n}\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `layout.tsx`;\nconst targetPath = findOrInitialsFile(`src/app/[locale]/${fileName}`);\nconst content = `import { ReactNode } from 'react';\n\nimport { i18n as Lingui18n } from '@lingui/core';\nimport type { Metadata } from 'next';\n\nimport './globals.css';\n\nimport { allMessages } from '@/locales/lingui-server-instance';\nimport { ApolloProvider } from '@/utils/apollo-provider';\nimport { LinguiClientProvider } from '@/utils/linqui-client-provider';\n\nexport default async function RootLayout({ children, params }: Readonly<{ children: ReactNode; params: Promise<{ locale: string }> }>) {\n const { locale } = await params;\n Lingui18n.loadAndActivate({ locale, messages: allMessages[locale] });\n\n return (\n <html lang={locale}>\n <body>\n <LinguiClientProvider initialLocale={locale} initialMessages={allMessages[locale]!}>\n <ApolloProvider>\n <>{children}</>\n </ApolloProvider>\n </LinguiClientProvider>\n </body>\n </html>\n );\n}\n\nexport const metadata: Metadata = {\n title: 'Test title',\n description: 'Test description',\n};\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `middleware.ts`;\nconst targetPath = findOrInitialsFile(`src/${fileName}`);\nconst content = `import { NextRequest } from 'next/server';\n\nimport { middlewareConfig } from '@/configs/MIDDLEWARE_CONFIG';\n\nexport async function middleware(request: NextRequest) {\n return middlewareConfig.generateResponse(request as never);\n}\n\nexport const config = {\n matcher: '/((?!api|_next/data|_next/static|_next/image|favicon.ico|sitemap.xml|robots.txt).*)',\n};\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `next.config.ts`;\nconst targetPath = findOrInitialsFile(fileName);\nconst content = `import type { NextConfig } from 'next';\n\nconst nextConfig: NextConfig = {\n experimental: {\n swcPlugins: [['@lingui/swc-plugin', {}]],\n },\n webpack: (config) => {\n config.module.rules.push({\n test: /\\\\.po$/,\n use: {\n loader: '@lingui/loader',\n },\n });\n\n return config;\n },\n};\n\nexport default nextConfig;\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { deleteFile } from '../helper/file-helper';\n\ndeleteFile('src/app/page.tsx');\ndeleteFile('src/app/layout.tsx');\ndeleteFile('src/app/favicon.ico');\nd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EC,SAAO,YAAEF,UAAQ,EAAE,CAAC;;ACfvD,MAAM,QAAQ,GAAG,CAAA,cAAA,CAAgB;AACjC,MAAM,UAAU,GAAG,kBAAkB,CAAC,QAAQ,CAAC;AAC/C,MAAM,OAAO,GAAG,CAAA;;;;;;;;;;;;;;;;;;;CAmBf;AAED,oBAAoB,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;;ACvBvD,UAAU,CAAC,kBAAkB,CAAC;AAC9B,UAAU,CAAC,oBAAoB,CAAC;AAChC,UAAU,CAAC,qBAAqB,CAAC;AACjC,UAAU,CAAC,qBAAqB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-BajZ1Zw6.mjs","sources":["../../src/bin/src/bin/nextjs15/lingui/dependencies.ts","../../src/bin/src/bin/nextjs15/lingui/init-lingui.ts","../../src/bin/src/bin/nextjs15/lingui/lingui-client-provider.ts","../../src/bin/src/bin/nextjs15/lingui/lingui-config-js.ts","../../src/bin/src/bin/nextjs15/lingui/lingui-server-instance.ts","../../src/bin/src/bin/nextjs15/lingui/packagejson.ts"],"sourcesContent":["import { npmInstall } from '../helper/npm-install';\n\nnpmInstall([\n { name: '@lingui/cli', version: 'latest', dev: true },\n { name: '@lingui/swc-plugin', version: '5.7.0', dev: true },\n { name: '@lingui/loader', version: 'latest', dev: true },\n { name: '@lingui/react', version: 'latest' },\n { name: '@lingui/core', version: 'latest' },\n]);\n","import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `init-lingui.ts`;\nconst targetPath = findOrInitialsFile(`src/locales/${fileName}`);\nconst content = `import { setI18n } from '@lingui/react/server';\n\nimport { getI18nInstance } from './lingui-server-instance';\n\nexport type PageLangParam = {\n params: Promise<{ locale: string }>;\n};\n\nexport function initLingui(lang: string) {\n const i18n = getI18nInstance(lang);\n setI18n(i18n);\n return i18n;\n}\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `linqui-client-provider.tsx`;\nconst targetPath = findOrInitialsFile(`src/utils/${fileName}`);\nconst content = `'use client';\n\nimport { type ReactNode, useState } from 'react';\n\nimport { type Messages, setupI18n } from '@lingui/core';\nimport { I18nProvider } from '@lingui/react';\n\nexport function LinguiClientProvider({\n children,\n initialLocale,\n initialMessages,\n}: {\n children: ReactNode;\n initialLocale: string;\n initialMessages: Messages;\n}) {\n const [i18n] = useState(() =>\n setupI18n({\n locale: initialLocale,\n messages: { [initialLocale]: initialMessages },\n }),\n );\n\n return <I18nProvider i18n={i18n}>{children}</I18nProvider>;\n}\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `lingui.config.js`;\nconst targetPath = findOrInitialsFile(fileName);\nconst content = `/** @type {import('@lingui/conf').LinguiConfig} */\nmodule.exports = {\n locales: ['en', 'mn'],\n sourceLocale: 'en',\n fallbackLocales: { default: 'en' },\n catalogs: [\n {\n path: 'src/locales/{locale}',\n include: ['src/'],\n },\n ],\n format: 'po',\n orderBy: 'message',\n compileNamespace: 'ts',\n};\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `lingui-server-instance.ts`;\nconst targetPath = findOrInitialsFile(`src/locales/${fileName}`);\nconst content = `import 'server-only';\n\nimport { I18n, Messages, setupI18n } from '@lingui/core';\n\nimport linguiConfig from '../../lingui.config';\n\nconst { locales } = linguiConfig;\n// optionally use a stricter union type\ntype SupportedLocales = string;\n\nasync function loadCatalog(locale: SupportedLocales): Promise<{\n [k: string]: Messages;\n}> {\n const { messages } = await import(\\`./\\${locale}.po\\`);\n return {\n [locale]: messages,\n };\n}\nconst catalogs = await Promise.all(locales.map(loadCatalog));\n\n// transform array of catalogs into a single object\nexport const allMessages = catalogs.reduce((acc, oneCatalog) => ({ ...acc, ...oneCatalog }), {});\n\ntype AllI18nInstances = { [K in SupportedLocales]: I18n };\n\nexport const allI18nInstances: AllI18nInstances = locales.reduce((acc, locale) => {\n const messages = allMessages[locale] ?? {};\n const i18n = setupI18n({\n locale,\n messages: { [locale]: messages },\n });\n return { ...acc, [locale]: i18n };\n}, {});\n\nexport const getI18nInstance = (locale: SupportedLocales): I18n => {\n if (!allI18nInstances[locale]) {\n console.warn(\\`No i18n instance found for locale \"\\${locale}\"\\`);\n }\n return allI18nInstances[locale] || allI18nInstances['en']!;\n};\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { getFilePath, readUtf8File, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `package.json`;\nconst targetPath = getFilePath(fileName);\nconst content = readUtf8File(targetPath);\n\ncontent.scripts['lingui:extract:clean'] = `lingui extract --clean`;\ncontent.scripts['lingui:compile:typescript'] = `lingui compile --typescript`;\n\nwriteFileSyncWithLog({ targetPath, content: JSON.stringify(content, null, 2), fileName, option: 'utf-8' });\n"],"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,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE;AAC5C,IAAA,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE;AAC5C,CAAA,CAAC;;ACNF,MAAMA,UAAQ,GAAG,CAAA,cAAA,CAAgB;AACjC,MAAMC,YAAU,GAAG,kBAAkB,CAAC,eAAeD,UAAQ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CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-CjXJh1ls.mjs","sources":["../../src/bin/src/bin/nextjs15/graphql/apollo-provider.ts","../../src/bin/src/bin/nextjs15/graphql/dependencies.ts"],"sourcesContent":["import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `apollo-provider.tsx`;\nconst targetPath = findOrInitialsFile(`src/utils/${fileName}`);\n\nconst content = `'use client';\n\nimport { ReactNode } from 'react';\n\nimport cookies from 'js-cookie';\nimport { ApolloWrapper, GenerateMakeClient } from 'web-ggf/apollo-nextjs-wrapper';\n\nimport { HOST_CONFIG } from '@/configs/HOST_CONFIG';\nimport { STORE_KEY_CONFIG } from '@/configs/STORE_KEY_CONFIG';\n\nexport function ApolloProvider({ children }: { children: ReactNode }) {\n return (\n <ApolloWrapper\n makeClient={() =>\n new GenerateMakeClient({\n host: HOST_CONFIG.host,\n getToken: () => {\n const user = cookies.get(STORE_KEY_CONFIG.USER_TOKEN);\n const client = cookies.get(STORE_KEY_CONFIG.CLIENT_TOKEN);\n return user || client || '-';\n },\n })\n }\n >\n <>{children}</>\n </ApolloWrapper>\n );\n}\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { npmInstall } from '../helper/npm-install';\n\nnpmInstall([\n { name: '@apollo/client', version: '^4.1.6' },\n { name: '@apollo/client-integration-nextjs', version: '^0.14.4' },\n { name: 'rxjs', version: '^7.8.2' },\n { name: 'graphql', version: '^16.13.1' },\n { name: 'apollo-upload-client', version: '^19.0.0' },\n { name: '@types/apollo-upload-client', version: '^19.0.0', dev: true },\n]);\n"],"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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DgSqZr5v.mjs","sources":["../../src/bin/src/bin/nextjs15/base-dependencies/index.ts"],"sourcesContent":["import { npmInstall } from '../helper/npm-install';\n\nnpmInstall([\n { name: 'web-ggf', version: 'latest' },\n { name: 'js-cookie', version: '^3.0.5' },\n { name: 'daisyui', version: 'latest', dev: true },\n { name: '@types/js-cookie', version: '^3.0.6', dev: true },\n]);\n"],"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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-DuSBC4jV.mjs","sources":["../../src/bin/src/bin/nextjs15/configs/APP_CONFIG_D.ts","../../src/bin/src/bin/nextjs15/configs/APP_CONFIG.ts","../../src/bin/src/bin/nextjs15/configs/HOST_CONFIG_D.ts","../../src/bin/src/bin/nextjs15/configs/HOST_CONFIG.ts","../../src/bin/src/bin/nextjs15/configs/MIDDLEWARE_CONFIG.ts","../../src/bin/src/bin/nextjs15/configs/STORE_KEY_CONFIG_D.ts","../../src/bin/src/bin/nextjs15/configs/STORE_KEY_CONFIG.ts","../../src/bin/src/bin/nextjs15/configs/THEME_CONFIG.ts"],"sourcesContent":["import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `APP_CONFIG.d.ts`;\nconst targetPath = findOrInitialsFile(`src/configs/${fileName}`);\nconst content = `export interface AppConfigProps {\n appIndex: string;\n tokens: {\n uid: string;\n secret: string;\n };\n map: {\n googleMapApiKey: string;\n defaultCenter: { lat: number; lng: number };\n defaultZoom: number;\n };\n}\n`;\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `APP_CONFIG.ts`;\nconst targetPath = findOrInitialsFile(`src/configs/${fileName}`);\nconst content = `import type { AppConfigProps } from './APP_CONFIG.d';\n\nexport const APP_CONFIG: AppConfigProps = {\n appIndex: '<app_index>',\n tokens: { uid: '<uid>', secret: '<secret>' },\n map: { googleMapApiKey: '', defaultCenter: { lat: 47.919045645074696, lng: 106.91752910614014 }, defaultZoom: 12 },\n};\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `HOST_CONFIG.d.ts`;\nconst targetPath = findOrInitialsFile(`src/configs/${fileName}`);\nconst content = `export interface HostConfigProps {\n host: string;\n elastic: {\n host: string;\n username: string;\n password: string;\n };\n}\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `HOST_CONFIG.ts`;\nconst targetPath = findOrInitialsFile(`src/configs/${fileName}`);\nconst content = `import type { HostConfigProps } from './HOST_CONFIG.d';\n\nexport const HOST_CONFIG: HostConfigProps = {\n host: '<host_url>',\n elastic: {\n host: '<host_url>',\n username: '<username>',\n password: '<password>'\n }\n};\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `MIDDLEWARE_CONFIG.ts`;\nconst targetPath = findOrInitialsFile(`src/configs/${fileName}`);\nconst content = `import { NextJSAuthMiddleware } from 'web-ggf/nextjs-middleware';\n\nimport { APP_CONFIG } from '@/configs/APP_CONFIG';\nimport { HOST_CONFIG } from '@/configs/HOST_CONFIG';\nimport { STORE_KEY_CONFIG } from '@/configs/STORE_KEY_CONFIG';\n\nexport const middlewareConfig = new NextJSAuthMiddleware({\n userTokenKey: STORE_KEY_CONFIG.USER_TOKEN,\n clientTokenKey: STORE_KEY_CONFIG.CLIENT_TOKEN,\n refreshTokenKey: STORE_KEY_CONFIG.REFRESH_TOKEN,\n appKey: APP_CONFIG.tokens.uid,\n appSecret: APP_CONFIG.tokens.secret,\n host: HOST_CONFIG.host,\n protectedPaths: [/^(\\\\/\\\\w{2})?\\\\/account\\\\/?/, /^(\\\\/\\\\w{2})?\\\\/checkout\\\\/address\\\\/?/, /^(\\\\/\\\\w{2})?\\\\/checkout\\\\/confirm\\\\/?/],\n secure: process.env.NODE_ENV === 'production',\n locale: 'mn',\n});\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `STORE_KEY_CONFIG.d.ts`;\nconst targetPath = findOrInitialsFile(`src/configs/${fileName}`);\nconst content = `export interface StoreKeyConfigProps {\n USER_TOKEN: string;\n REFRESH_TOKEN: string;\n CLIENT_TOKEN: string;\n EXPIRES_IN: string;\n}\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `STORE_KEY_CONFIG.ts`;\nconst targetPath = findOrInitialsFile(`src/configs/${fileName}`);\nconst content = `import type { StoreKeyConfigProps } from './STORE_KEY_CONFIG.d';\n\nimport { APP_CONFIG } from '@/configs/APP_CONFIG';\n\nexport const STORE_KEY_CONFIG: StoreKeyConfigProps = {\n USER_TOKEN: \\`\\${APP_CONFIG.appIndex}_USER_TOKEN\\`,\n CLIENT_TOKEN: \\`\\${APP_CONFIG.appIndex}CLIENT_TOKEN\\`,\n REFRESH_TOKEN: \\`\\${APP_CONFIG.appIndex}REFRESH_TOKEN\\`,\n EXPIRES_IN: \\`\\${APP_CONFIG.appIndex}EXPIRES_IN\\`,\n};\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n","import { findOrInitialsFile, writeFileSyncWithLog } from '../helper/file-helper';\n\nconst fileName = `index.css`;\nconst targetPath = findOrInitialsFile(`src/configs/THEME_CONFIG/${fileName}`);\nconst content = `@plugin \"daisyui\" {\n /*noinspection CssUnknownProperty*/\n themes: light --default, dark --prefersdark;\n}\n@plugin \"daisyui/theme\" {\n /*noinspection CssUnknownProperty*/\n default: true;\n name: light;\n --color-primary: #EE3562;\n --color-secondary: teal;\n}\n@plugin \"daisyui/theme\" {\n /*noinspection CssUnknownProperty*/\n prefersdark: true;\n name: dark;\n --color-primary: #EE3562;\n --color-secondary: teal;\n}\n`;\n\nwriteFileSyncWithLog({ targetPath, content, fileName });\n"],"names":["fileName","targetPath","content"],"mappings":";;;;AAEA,MAAMA,UAAQ,GAAG,CAAA,eAAA,CAAiB;AAClC,MAAMC,YAAU,GAAG,kBAAkB,CAAC,eAAeD,UAAQ,C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AO,GAAG,CAAA;;;;;;CAMf;AAED,oBAAoB,CAAC,cAAED,YAAU,WAAEC,SAAO,YAAEF,UAAQ,EAAE,CAAC;;ACVvD,MAAMA,UAAQ,GAAG,CAAA,mBAAA,CAAqB;AACtC,MAAMC,YAAU,GAAG,kBAAkB,CAAC,eAAeD,UAAQ,CAAA,CAAE,CAAC;AAChE,MAAME,SAAO,GAAG,CAAA;;;;;;;;;;CAUf;AAED,oBAAoB,CAAC,cAAED,YAAU,WAAEC,SAAO,YAAEF,UAAQ,EAAE,CAAC;;ACdvD,MAAM,QAAQ,GAAG,CAAA,SAAA,CAAW;AAC5B,MAAM,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 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"npm-install-7LYQx09p.mjs","sources":["../../src/bin/src/bin/nextjs15/helper/npm-install.ts"],"sourcesContent":["import { execSync } from 'child_process';\n//\n\nexport function npmInstall(dependencies: { name: string; version: string; dev?: boolean }[]) {\n try {\n for (const dep of dependencies) {\n process.stdout.write(`⌛ Installing \"${dep.name}\"...`);\n\n execSync(`npm i${dep.dev ? ' -D' : ''} ${dep.name}@${dep.version} --silent`, { stdio: 'ignore', cwd: process.cwd() });\n process.stdout.write(`\\r✅ Installed \"${dep.name}@${dep.version}\"\\n`);\n }\n } catch (error) {\n console.error('❌ Failed to install dependencies:', (error as Error)?.message);\n process.exit(1);\n }\n}\n"],"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.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
const init = process.argv[2];
|
|
2
|
-
if (init !== 'nextjs' || !init) {
|
|
3
|
-
console.error('Invalid init. Usage: npx web-ggf nextjs');
|
|
4
|
-
process.exit(1);
|
|
5
|
-
}
|
|
6
|
-
function main() {
|
|
7
|
-
import('../_chunks/index-DgSqZr5v.mjs');
|
|
8
|
-
import('../_chunks/index-DuSBC4jV.mjs');
|
|
9
|
-
import('../_chunks/index-BDhnAS_n.mjs');
|
|
10
|
-
import('../_chunks/index-CjXJh1ls.mjs');
|
|
11
|
-
import('../_chunks/index-BajZ1Zw6.mjs');
|
|
12
|
-
}
|
|
13
|
-
main();
|
|
14
|
-
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/bin/src/bin/nextjs15/index.ts"],"sourcesContent":["const init = process.argv[2];\n\nif (init !== 'nextjs' || !init) {\n console.error('Invalid init. Usage: npx web-ggf nextjs');\n process.exit(1);\n}\n\nfunction main() {\n import('./base-dependencies');\n import('./configs');\n import('./adjust-files');\n import('./graphql');\n import('./lingui');\n}\n\nmain();\n"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AAE5B,IAAI,IAAI,KAAK,QAAQ,IAAI,CAAC,IAAI,EAAE;AAC9B,IAAA,OAAO,CAAC,KAAK,CAAC,yCAAyC,CAAC;AACxD,IAAA,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AACjB;AAEA,SAAS,IAAI,GAAA;IACX,OAAO,+BAAqB,CAAC;IAC7B,OAAO,+BAAW,CAAC;IACnB,OAAO,+BAAgB,CAAC;IACxB,OAAO,+BAAW,CAAC;IACnB,OAAO,+BAAU,CAAC;AACpB;AAEA,IAAI,EAAE"}
|