jopi-toolkit 3.0.5 → 3.0.11
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/README.md +1 -1
- package/dist/jk_crypto/jBundler_ifServer.d.ts +2 -2
- package/dist/jk_crypto/jBundler_ifServer.js +8 -8
- package/dist/jk_crypto/jBundler_ifServer.js.map +1 -1
- package/dist/jk_events/index.d.ts +5 -5
- package/dist/jk_events/index.js +20 -10
- package/dist/jk_events/index.js.map +1 -1
- package/dist/jk_fs/jBundler_ifBrowser.d.ts +2 -2
- package/dist/jk_fs/jBundler_ifBrowser.js +2 -2
- package/dist/jk_fs/jBundler_ifServer.d.ts +39 -3
- package/dist/jk_fs/jBundler_ifServer.js +152 -3
- package/dist/jk_fs/jBundler_ifServer.js.map +1 -1
- package/dist/jk_logs/index.d.ts +54 -0
- package/dist/jk_logs/index.js +316 -0
- package/dist/jk_logs/index.js.map +1 -0
- package/dist/jk_logs/jBundler_ifBrowser.js.map +1 -0
- package/dist/jk_logs/jBundler_ifServer.d.ts +2 -0
- package/dist/jk_logs/jBundler_ifServer.js +25 -0
- package/dist/jk_logs/jBundler_ifServer.js.map +1 -0
- package/dist/jk_schemas/index.js +2 -0
- package/dist/jk_schemas/index.js.map +1 -1
- package/dist/jk_timer/index.js +9 -4
- package/dist/jk_timer/index.js.map +1 -1
- package/dist/jk_tools/common.d.ts +29 -0
- package/{src/jk_tools/index.js → dist/jk_tools/common.js} +28 -21
- package/dist/jk_tools/common.js.map +1 -0
- package/dist/jk_tools/index.d.ts +1 -20
- package/dist/jk_tools/index.js +1 -71
- package/dist/jk_tools/index.js.map +1 -1
- package/dist/jk_tools/jBundler_ifBrowser.d.ts +1 -0
- package/dist/jk_tools/jBundler_ifBrowser.js +2 -0
- package/dist/jk_tools/jBundler_ifBrowser.js.map +1 -0
- package/dist/jk_tools/jBundler_ifServer.d.ts +22 -0
- package/dist/jk_tools/jBundler_ifServer.js +75 -0
- package/dist/jk_tools/jBundler_ifServer.js.map +1 -0
- package/package.json +11 -4
- package/src/jk_crypto/jBundler_ifServer.ts +8 -8
- package/src/jk_events/index.ts +24 -3
- package/src/jk_fs/jBundler_ifBrowser.ts +2 -2
- package/src/jk_fs/jBundler_ifServer.ts +171 -4
- package/src/jk_logs/index.ts +444 -0
- package/src/jk_logs/jBundler_ifBrowser.ts +2 -0
- package/src/jk_logs/jBundler_ifServer.ts +27 -0
- package/src/jk_tools/common.ts +99 -0
- package/src/jk_tools/index.ts +1 -82
- package/src/jk_tools/jBundler_ifBrowser.ts +1 -0
- package/src/jk_tools/jBundler_ifServer.ts +109 -0
- package/dist/jk_appResolver/common.d.ts +0 -40
- package/dist/jk_appResolver/common.js +0 -306
- package/dist/jk_appResolver/common.js.map +0 -1
- package/dist/jk_appResolver/index.d.ts +0 -30
- package/dist/jk_appResolver/index.js +0 -276
- package/dist/jk_appResolver/index.js.map +0 -1
- package/dist/jk_appResolver/jBundler_ifBrowser.js.map +0 -1
- package/dist/jk_appResolver/jBundler_ifServer.d.ts +0 -1
- package/dist/jk_appResolver/jBundler_ifServer.js +0 -9
- package/dist/jk_appResolver/jBundler_ifServer.js.map +0 -1
- package/dist/jk_linker/TypeComposite.d.ts +0 -12
- package/dist/jk_linker/TypeComposite.js +0 -112
- package/dist/jk_linker/TypeComposite.js.map +0 -1
- package/dist/jk_linker/arobaseType_List.d.ts +0 -44
- package/dist/jk_linker/arobaseType_List.js +0 -183
- package/dist/jk_linker/arobaseType_List.js.map +0 -1
- package/dist/jk_linker/arobaseTypes.d.ts +0 -45
- package/dist/jk_linker/arobaseTypes.js +0 -181
- package/dist/jk_linker/arobaseTypes.js.map +0 -1
- package/dist/jk_linker/binding.d.ts +0 -1
- package/dist/jk_linker/binding.js +0 -13
- package/dist/jk_linker/binding.js.map +0 -1
- package/dist/jk_linker/engine.d.ts +0 -119
- package/dist/jk_linker/engine.js +0 -553
- package/dist/jk_linker/engine.js.map +0 -1
- package/dist/jk_linker/index.d.ts +0 -1
- package/dist/jk_linker/index.js +0 -2
- package/dist/jk_linker/index.js.map +0 -1
- package/dist/jk_linker/install.d.ts +0 -4
- package/dist/jk_linker/install.js +0 -44
- package/dist/jk_linker/install.js.map +0 -1
- package/dist/jk_linker/jBundler_ifServer.d.ts +0 -3
- package/dist/jk_linker/jBundler_ifServer.js +0 -4
- package/dist/jk_linker/jBundler_ifServer.js.map +0 -1
- package/dist/jk_linker/modulesInitProcessor.d.ts +0 -7
- package/dist/jk_linker/modulesInitProcessor.js +0 -36
- package/dist/jk_linker/modulesInitProcessor.js.map +0 -1
- package/dist/jk_linker/typeChunks.d.ts +0 -15
- package/dist/jk_linker/typeChunks.js +0 -42
- package/dist/jk_linker/typeChunks.js.map +0 -1
- package/dist/jk_linker/typeComposites.d.ts +0 -13
- package/dist/jk_linker/typeComposites.js +0 -121
- package/dist/jk_linker/typeComposites.js.map +0 -1
- package/dist/jk_linker/typeEvents.d.ts +0 -5
- package/dist/jk_linker/typeEvents.js +0 -29
- package/dist/jk_linker/typeEvents.js.map +0 -1
- package/dist/jk_linker/typeList.d.ts +0 -30
- package/dist/jk_linker/typeList.js +0 -144
- package/dist/jk_linker/typeList.js.map +0 -1
- package/dist/jk_linker/typeListeners.d.ts +0 -21
- package/dist/jk_linker/typeListeners.js +0 -188
- package/dist/jk_linker/typeListeners.js.map +0 -1
- package/dist/jk_linker/typeReplaces.d.ts +0 -8
- package/dist/jk_linker/typeReplaces.js +0 -41
- package/dist/jk_linker/typeReplaces.js.map +0 -1
- package/dist/jk_registry/index.d.ts +0 -11
- package/dist/jk_registry/index.js +0 -36
- package/dist/jk_registry/index.js.map +0 -1
- package/src/jk_app/common.js +0 -442
- package/src/jk_events/index.js +0 -203
- package/src/jk_fs/index.js +0 -2
- package/src/jk_translate/index.js +0 -56
- /package/dist/{jk_appResolver → jk_logs}/jBundler_ifBrowser.d.ts +0 -0
- /package/dist/{jk_appResolver → jk_logs}/jBundler_ifBrowser.js +0 -0
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
// noinspection JSUnusedGlobalSymbols
|
|
2
|
-
import * as jk_thread from "jopi-toolkit/jk_thread";
|
|
3
|
-
import * as jk_fs from "jopi-toolkit/jk_fs";
|
|
4
|
-
import * as jk_timer from "jopi-toolkit/jk_timer";
|
|
5
|
-
import { isBunJS, isNodeJS } from "jopi-toolkit/jk_what";
|
|
6
|
-
import { isUsingWorker } from "jopi-toolkit/jk_thread";
|
|
7
|
-
const gOnHotReload = globalThis.jopiHotReload.onHotReload;
|
|
8
|
-
const gMemory = globalThis.jopiHotReload.memory;
|
|
9
|
-
export function onServerSideReady(listener) {
|
|
10
|
-
if (gIsServerSideReady)
|
|
11
|
-
listener();
|
|
12
|
-
else
|
|
13
|
-
gOnServerSideReady.push(listener);
|
|
14
|
-
}
|
|
15
|
-
export function waitServerSideReady() {
|
|
16
|
-
if (gIsServerSideReady) {
|
|
17
|
-
return Promise.resolve();
|
|
18
|
-
}
|
|
19
|
-
return new Promise(r => {
|
|
20
|
-
onServerSideReady(r);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
export async function declareServerSideReady() {
|
|
24
|
-
gIsServerSideReady = true;
|
|
25
|
-
await execListeners(gOnServerSideReady);
|
|
26
|
-
}
|
|
27
|
-
export function onAppStart(listener) {
|
|
28
|
-
if (gIsAppStarted)
|
|
29
|
-
listener();
|
|
30
|
-
else
|
|
31
|
-
gOnAppStart.push(listener);
|
|
32
|
-
}
|
|
33
|
-
export function onAppExiting(listener) {
|
|
34
|
-
if (gIsExited)
|
|
35
|
-
listener();
|
|
36
|
-
else
|
|
37
|
-
gOnAppExiting.push(listener);
|
|
38
|
-
}
|
|
39
|
-
export function onAppExited(listener) {
|
|
40
|
-
if (gIsExited)
|
|
41
|
-
listener();
|
|
42
|
-
else
|
|
43
|
-
gOnAppExited.push(listener);
|
|
44
|
-
}
|
|
45
|
-
export async function declareAppStarted() {
|
|
46
|
-
gIsAppStarted = true;
|
|
47
|
-
await execListeners(gOnAppStart);
|
|
48
|
-
}
|
|
49
|
-
export async function declareAppExiting() {
|
|
50
|
-
if (gIsExited)
|
|
51
|
-
return;
|
|
52
|
-
gIsExited = true;
|
|
53
|
-
if (isUsingWorker()) {
|
|
54
|
-
// Wait 1 sec, which allows the worker to correctly initialize.
|
|
55
|
-
await jk_timer.tick(1000);
|
|
56
|
-
}
|
|
57
|
-
gIsAppStarted = false;
|
|
58
|
-
await execListeners(gOnAppExiting);
|
|
59
|
-
if (isUsingWorker()) {
|
|
60
|
-
// Allows to worker to correctly stop their activity.
|
|
61
|
-
await jk_timer.tick(100);
|
|
62
|
-
}
|
|
63
|
-
if (!jk_thread.isMainThread) {
|
|
64
|
-
// Allows to worker to correctly stop their activity.
|
|
65
|
-
await jk_timer.tick(50);
|
|
66
|
-
}
|
|
67
|
-
await execListeners(gOnAppExited);
|
|
68
|
-
}
|
|
69
|
-
export async function executeApp(app) {
|
|
70
|
-
await waitServerSideReady();
|
|
71
|
-
declareAppStarted();
|
|
72
|
-
try {
|
|
73
|
-
const res = app();
|
|
74
|
-
if (res instanceof Promise)
|
|
75
|
-
await res;
|
|
76
|
-
}
|
|
77
|
-
finally {
|
|
78
|
-
declareAppExiting();
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
export function onHotReload(listener) {
|
|
82
|
-
gOnHotReload.push(listener);
|
|
83
|
-
}
|
|
84
|
-
export function keepOnHotReload(key, provider) {
|
|
85
|
-
let current = gMemory[key];
|
|
86
|
-
if (current !== undefined)
|
|
87
|
-
return current;
|
|
88
|
-
return gMemory[key] = provider();
|
|
89
|
-
}
|
|
90
|
-
export function clearHotReloadKey(key) {
|
|
91
|
-
delete (gMemory[key]);
|
|
92
|
-
}
|
|
93
|
-
export function getTempDir() {
|
|
94
|
-
if (!gTempDir) {
|
|
95
|
-
gTempDir = jk_fs.resolve(process.cwd(), "temp");
|
|
96
|
-
}
|
|
97
|
-
return gTempDir;
|
|
98
|
-
}
|
|
99
|
-
let gIsExited = false;
|
|
100
|
-
let gTempDir;
|
|
101
|
-
export function findNodePackageDir(packageName, useLinuxPathFormat = true) {
|
|
102
|
-
let currentDir = jk_fs.dirname(findPackageJson());
|
|
103
|
-
while (true) {
|
|
104
|
-
const packagePath = jk_fs.join(currentDir, 'node_modules', packageName);
|
|
105
|
-
if (jk_fs.isDirectorySync(packagePath)) {
|
|
106
|
-
if (useLinuxPathFormat)
|
|
107
|
-
return jk_fs.win32ToLinuxPath(packagePath);
|
|
108
|
-
return packagePath;
|
|
109
|
-
}
|
|
110
|
-
const parentDir = jk_fs.dirname(currentDir);
|
|
111
|
-
// Reached root directory
|
|
112
|
-
if (parentDir === currentDir) {
|
|
113
|
-
break;
|
|
114
|
-
}
|
|
115
|
-
currentDir = parentDir;
|
|
116
|
-
}
|
|
117
|
-
return undefined;
|
|
118
|
-
}
|
|
119
|
-
export function requireNodePackageDir(packageName, useLinuxPathFormat = true) {
|
|
120
|
-
let pkgDir = findNodePackageDir(packageName, useLinuxPathFormat);
|
|
121
|
-
if (!pkgDir)
|
|
122
|
-
throw new Error("Package '" + packageName + "' not found");
|
|
123
|
-
return pkgDir;
|
|
124
|
-
}
|
|
125
|
-
export function findPackageJsonDir(searchFromDir = getCodeSourceDirHint()) {
|
|
126
|
-
let pkgJsonPath = findPackageJson(searchFromDir);
|
|
127
|
-
return jk_fs.dirname(pkgJsonPath);
|
|
128
|
-
}
|
|
129
|
-
export function findPackageJson(searchFromDir = getCodeSourceDirHint()) {
|
|
130
|
-
if (!searchFromDir && (gPackageJsonPath !== undefined))
|
|
131
|
-
return gPackageJsonPath;
|
|
132
|
-
let currentDir = searchFromDir;
|
|
133
|
-
while (true) {
|
|
134
|
-
const packagePath = jk_fs.join(currentDir, 'package.json');
|
|
135
|
-
if (jk_fs.isFileSync(packagePath))
|
|
136
|
-
return gPackageJsonPath = packagePath;
|
|
137
|
-
const parentDir = jk_fs.dirname(currentDir);
|
|
138
|
-
// Reached root directory
|
|
139
|
-
if (parentDir === currentDir)
|
|
140
|
-
break;
|
|
141
|
-
currentDir = parentDir;
|
|
142
|
-
}
|
|
143
|
-
throw "No package.json found.";
|
|
144
|
-
}
|
|
145
|
-
//
|
|
146
|
-
let gPackageJsonPath;
|
|
147
|
-
export function setApplicationMainFile(applicationMainFile) {
|
|
148
|
-
gApplicationMainFile = applicationMainFile;
|
|
149
|
-
gCodeSourceDirHint = jk_fs.dirname(applicationMainFile);
|
|
150
|
-
}
|
|
151
|
-
export function getApplicationMainFile() {
|
|
152
|
-
return gApplicationMainFile;
|
|
153
|
-
}
|
|
154
|
-
export function getCodeSourceDirHint() {
|
|
155
|
-
if (!gCodeSourceDirHint)
|
|
156
|
-
return process.cwd();
|
|
157
|
-
return gCodeSourceDirHint;
|
|
158
|
-
}
|
|
159
|
-
export function getSourceCodeDir() {
|
|
160
|
-
if (gSourceCodeDir)
|
|
161
|
-
return gSourceCodeDir;
|
|
162
|
-
let pkgJsonPath = findPackageJson();
|
|
163
|
-
let dirName = jk_fs.join(jk_fs.dirname(pkgJsonPath), "src");
|
|
164
|
-
if (jk_fs.isDirectorySync(dirName)) {
|
|
165
|
-
return gSourceCodeDir = dirName;
|
|
166
|
-
}
|
|
167
|
-
return gSourceCodeDir = jk_fs.dirname(pkgJsonPath);
|
|
168
|
-
}
|
|
169
|
-
export function getCompiledCodeDir() {
|
|
170
|
-
if (gCompiledSourcesDir)
|
|
171
|
-
return gCompiledSourcesDir;
|
|
172
|
-
const sourceCodeDir = getSourceCodeDir();
|
|
173
|
-
if (!sourceCodeDir.endsWith("src")) {
|
|
174
|
-
return gCompiledSourcesDir = sourceCodeDir;
|
|
175
|
-
}
|
|
176
|
-
// This means that it's Bun.js, and it directly uses the TypeScript version.
|
|
177
|
-
if (gApplicationMainFile && isBunJS && gApplicationMainFile.startsWith(sourceCodeDir)) {
|
|
178
|
-
return gCompiledSourcesDir = sourceCodeDir;
|
|
179
|
-
}
|
|
180
|
-
let pkgJsonPath = findPackageJson();
|
|
181
|
-
let rootDir = jk_fs.dirname(pkgJsonPath);
|
|
182
|
-
for (let toTest of ["dist", "build", "out"]) {
|
|
183
|
-
if (jk_fs.isDirectorySync(jk_fs.join(rootDir, toTest))) {
|
|
184
|
-
return gCompiledSourcesDir = jk_fs.join(rootDir, toTest);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
// No output dir? Assume we compiled on the same dir.
|
|
188
|
-
return rootDir;
|
|
189
|
-
}
|
|
190
|
-
export function getCompiledFilePathFor(sourceFilePath) {
|
|
191
|
-
const compiledCodeDir = getCompiledCodeDir();
|
|
192
|
-
const sourceCodeDir = getSourceCodeDir();
|
|
193
|
-
if (!sourceFilePath.startsWith(sourceCodeDir)) {
|
|
194
|
-
throw new Error("jopi-loader - The source file must be in the source code directory: " + sourceFilePath);
|
|
195
|
-
}
|
|
196
|
-
let filePath = sourceFilePath.substring(sourceCodeDir.length);
|
|
197
|
-
if (isNodeJS && !filePath.endsWith(".js")) {
|
|
198
|
-
let idx = filePath.lastIndexOf(".");
|
|
199
|
-
if (idx !== -1)
|
|
200
|
-
filePath = filePath.substring(0, idx) + ".js";
|
|
201
|
-
}
|
|
202
|
-
return jk_fs.join(compiledCodeDir, filePath);
|
|
203
|
-
}
|
|
204
|
-
export function getSourcesCodePathFor(compiledFilePath) {
|
|
205
|
-
const compiledCodeDir = getCompiledCodeDir();
|
|
206
|
-
const sourceCodeDir = getSourceCodeDir();
|
|
207
|
-
if (!compiledFilePath.startsWith(compiledCodeDir)) {
|
|
208
|
-
throw new Error("jopi-loader - The compiled file must be in the compiled code directory: " + compiledFilePath);
|
|
209
|
-
}
|
|
210
|
-
let filePath = jk_fs.join(sourceCodeDir, compiledFilePath.substring(compiledCodeDir.length));
|
|
211
|
-
let idx = filePath.lastIndexOf(".");
|
|
212
|
-
if (idx !== -1)
|
|
213
|
-
filePath = filePath.substring(0, idx);
|
|
214
|
-
if (jk_fs.isFileSync(filePath + ".tsx")) {
|
|
215
|
-
return filePath + ".tsx";
|
|
216
|
-
}
|
|
217
|
-
if (jk_fs.isFileSync(filePath + ".ts")) {
|
|
218
|
-
return filePath + ".ts";
|
|
219
|
-
}
|
|
220
|
-
return filePath + ".js";
|
|
221
|
-
}
|
|
222
|
-
export function requireSourceOf(scriptPath) {
|
|
223
|
-
let src = searchSourceOf(scriptPath);
|
|
224
|
-
if (!src)
|
|
225
|
-
throw new Error("Cannot find source of " + scriptPath);
|
|
226
|
-
return src;
|
|
227
|
-
}
|
|
228
|
-
/**
|
|
229
|
-
* Search the source of the component if it's a JavaScript and not a TypeScript.
|
|
230
|
-
* Why? Because EsBuild doesn't work well on already transpiled code.
|
|
231
|
-
*/
|
|
232
|
-
export function searchSourceOf(scriptPath) {
|
|
233
|
-
function tryResolve(filePath, outDir) {
|
|
234
|
-
let out = jk_fs.sep + outDir + jk_fs.sep;
|
|
235
|
-
let idx = filePath.lastIndexOf(out);
|
|
236
|
-
if (idx !== -1) {
|
|
237
|
-
filePath = filePath.slice(0, idx) + jk_fs.sep + "src" + jk_fs.sep + filePath.slice(idx + out.length);
|
|
238
|
-
if (jk_fs.isFileSync(filePath))
|
|
239
|
-
return filePath;
|
|
240
|
-
}
|
|
241
|
-
return undefined;
|
|
242
|
-
}
|
|
243
|
-
let scriptExt = jk_fs.extname(scriptPath);
|
|
244
|
-
if ((scriptExt === ".ts") || (scriptExt === ".tsx")) {
|
|
245
|
-
// Is already the source.
|
|
246
|
-
return scriptPath;
|
|
247
|
-
}
|
|
248
|
-
const originalScriptPath = scriptPath;
|
|
249
|
-
let isJavascript = (scriptPath.endsWith(".js") || (scriptPath.endsWith(".jsx")));
|
|
250
|
-
if (isJavascript) {
|
|
251
|
-
// Remove his extension.
|
|
252
|
-
scriptPath = scriptPath.slice(0, -scriptExt.length);
|
|
253
|
-
}
|
|
254
|
-
let tryDirs = ["dist", "build"];
|
|
255
|
-
for (let toTry of tryDirs) {
|
|
256
|
-
if (isJavascript) {
|
|
257
|
-
let found = tryResolve(scriptPath + ".tsx", toTry);
|
|
258
|
-
if (found)
|
|
259
|
-
return found;
|
|
260
|
-
found = tryResolve(scriptPath + ".ts", toTry);
|
|
261
|
-
if (found)
|
|
262
|
-
return found;
|
|
263
|
-
}
|
|
264
|
-
else {
|
|
265
|
-
let found = tryResolve(scriptPath, toTry);
|
|
266
|
-
if (found)
|
|
267
|
-
return found;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
return originalScriptPath;
|
|
271
|
-
}
|
|
272
|
-
let gSourceCodeDir;
|
|
273
|
-
let gCodeSourceDirHint;
|
|
274
|
-
let gApplicationMainFile;
|
|
275
|
-
let gCompiledSourcesDir;
|
|
276
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/jk_appResolver/index.ts"],"names":[],"mappings":"AAAA,qCAAqC;AAErC,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,uBAAuB,CAAC;AAClD,OAAO,EAAC,OAAO,EAAE,QAAQ,EAAC,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAC,aAAa,EAAC,MAAM,wBAAwB,CAAC;AAGrD,MAAM,YAAY,GAAG,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC;AAC1D,MAAM,OAAO,GAAG,UAAU,CAAC,aAAa,CAAC,MAAM,CAAC;AAEhD,MAAM,UAAU,iBAAiB,CAAC,QAAkB;IAChD,IAAI,kBAAkB;QAAE,QAAQ,EAAE,CAAC;;QAC9B,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,UAAU,mBAAmB;IAC/B,IAAI,kBAAkB,EAAE,CAAC;QACrB,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED,OAAO,IAAI,OAAO,CAAO,CAAC,CAAC,EAAE;QACzB,iBAAiB,CAAC,CAAC,CA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AAC,CAAC;IAEhC,KAAK,IAAI,KAAK,IAAI,OAAO,EAAE,CAAC;QACxB,IAAI,YAAY,EAAE,CAAC;YACf,IAAI,KAAK,GAAG,UAAU,CAAC,UAAU,GAAG,MAAM,EAAE,KAAK,CAAC,CAAC;YACnD,IAAI,KAAK;gBAAE,OAAO,KAAK,CAAC;YAExB,KAAK,GAAG,UAAU,CAAC,UAAU,GAAG,KAAK,EAAE,KAAK,CAAC,CAAC;YAC9C,IAAI,KAAK;gBAAE,OAAO,KAAK,CAAC;QAC5B,CAAC;aAAM,CAAC;YACJ,IAAI,KAAK,GAAG,UAAU,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;YAC1C,IAAI,KAAK;gBAAE,OAAO,KAAK,CAAC;QAC5B,CAAC;IACL,CAAC;IAED,OAAO,kBAAkB,CAAC;AAC9B,CAAC;AAED,IAAI,cAAgC,CAAC;AACrC,IAAI,kBAAoC,CAAC;AACzC,IAAI,oBAAsC,CAAC;AAC3C,IAAI,mBAAqC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jBundler_ifBrowser.js","sourceRoot":"","sources":["../../src/jk_appResolver/jBundler_ifBrowser.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,IAAI;AACpB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function init(): void;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { declareServerSideReady, declareAppExiting } from "./common.js";
|
|
2
|
-
declareServerSideReady().then();
|
|
3
|
-
export function init() {
|
|
4
|
-
// When the program exits gracefully
|
|
5
|
-
process.on('exit', () => declareAppExiting());
|
|
6
|
-
// When the user wants to terminate the program (CTRL+C)
|
|
7
|
-
process.on('SIGINT', () => declareAppExiting());
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=jBundler_ifServer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jBundler_ifServer.js","sourceRoot":"","sources":["../../src/jk_appResolver/jBundler_ifServer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,sBAAsB,EAAE,iBAAiB,EAAC,MAAM,aAAa,CAAC;AAEtE,sBAAsB,EAAE,CAAC,IAAI,EAAE,CAAC;AAEhC,MAAM,UAAU,IAAI;IAChB,oCAAoC;IACpC,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAE9C,wDAAwD;IACxD,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,iBAAiB,EAAE,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { type TransformParams, type RegistryItem, ArobaseType } from "./engine.ts";
|
|
2
|
-
export default class extends ArobaseType {
|
|
3
|
-
processDir(p: {
|
|
4
|
-
moduleDir: string;
|
|
5
|
-
arobaseDir: string;
|
|
6
|
-
genDir: string;
|
|
7
|
-
}): Promise<void>;
|
|
8
|
-
generateCodeForItem(key: string, rItem: RegistryItem, infos: {
|
|
9
|
-
genDir: string;
|
|
10
|
-
}): Promise<void>;
|
|
11
|
-
processComposite(p: TransformParams): Promise<void>;
|
|
12
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import * as jk_fs from "jopi-toolkit/jk_fs";
|
|
2
|
-
import {} from "./typeChunks.js";
|
|
3
|
-
import { addToRegistry, declareError, genWriteFile, getRegistryItem, getSortedDirItem, PriorityLevel, requireRegistryItem, applyTypeRulesOnChildDir, applyTypeRulesOnDir, mustSkip_expectDir, ArobaseType } from "./engine.js";
|
|
4
|
-
export default class extends ArobaseType {
|
|
5
|
-
async processDir(p) {
|
|
6
|
-
let itemTypes = await jk_fs.listDir(p.arobaseDir);
|
|
7
|
-
for (let childDir of itemTypes) {
|
|
8
|
-
if (!childDir.isDirectory || (childDir.name[0] === "_") || (childDir.name[0] === "."))
|
|
9
|
-
continue;
|
|
10
|
-
await applyTypeRulesOnDir({
|
|
11
|
-
dirToScan: childDir.fullPath,
|
|
12
|
-
expectFsType: "dir",
|
|
13
|
-
itemDefRules: {
|
|
14
|
-
nameConstraint: "mustBeUid",
|
|
15
|
-
requireRefFile: false,
|
|
16
|
-
requirePriority: false,
|
|
17
|
-
rootDirName: childDir.name,
|
|
18
|
-
transform: (p) => this.processComposite(p)
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
async generateCodeForItem(key, rItem, infos) {
|
|
24
|
-
function sortByPriority(items) {
|
|
25
|
-
function addPriority(priority) {
|
|
26
|
-
let e = byPriority[priority];
|
|
27
|
-
if (e)
|
|
28
|
-
items.push(...e);
|
|
29
|
-
}
|
|
30
|
-
const byPriority = {};
|
|
31
|
-
for (let item of items) {
|
|
32
|
-
if (!byPriority[item.priority])
|
|
33
|
-
byPriority[item.priority] = [];
|
|
34
|
-
byPriority[item.priority].push(item);
|
|
35
|
-
}
|
|
36
|
-
items = [];
|
|
37
|
-
addPriority(PriorityLevel.veryHigh);
|
|
38
|
-
addPriority(PriorityLevel.high);
|
|
39
|
-
addPriority(PriorityLevel.default);
|
|
40
|
-
addPriority(PriorityLevel.low);
|
|
41
|
-
addPriority(PriorityLevel.veryLow);
|
|
42
|
-
return items;
|
|
43
|
-
}
|
|
44
|
-
const composite = rItem;
|
|
45
|
-
composite.items = sortByPriority(composite.items);
|
|
46
|
-
let source = "";
|
|
47
|
-
let count = 1;
|
|
48
|
-
let outDir = jk_fs.join(infos.genDir, "composites", composite.itemsType);
|
|
49
|
-
for (let item of composite.items) {
|
|
50
|
-
let entryPoint = item.entryPoint;
|
|
51
|
-
if (!entryPoint) {
|
|
52
|
-
let d = requireRegistryItem(item.ref);
|
|
53
|
-
entryPoint = d.entryPoint;
|
|
54
|
-
}
|
|
55
|
-
entryPoint = jk_fs.getRelativePath(outDir, entryPoint);
|
|
56
|
-
source += `import I${count++} from "${entryPoint}";\n`;
|
|
57
|
-
}
|
|
58
|
-
let max = composite.items.length;
|
|
59
|
-
source += "\nexport default [";
|
|
60
|
-
for (let i = 1; i <= max; i++)
|
|
61
|
-
source += `I${i},`;
|
|
62
|
-
source += "];";
|
|
63
|
-
let fileName = key.substring(key.indexOf("_") + 1) + ".ts";
|
|
64
|
-
await genWriteFile(jk_fs.join(outDir, fileName), source);
|
|
65
|
-
}
|
|
66
|
-
async processComposite(p) {
|
|
67
|
-
let compositeId = "composite_" + p.uid;
|
|
68
|
-
// > Extract the composite items.
|
|
69
|
-
const dirItems = await getSortedDirItem(p.itemPath);
|
|
70
|
-
let compositeItems = [];
|
|
71
|
-
const params = {
|
|
72
|
-
rootDirName: p.parentDirName,
|
|
73
|
-
nameConstraint: "mustNotBeUid",
|
|
74
|
-
requirePriority: true,
|
|
75
|
-
filesToResolve: {
|
|
76
|
-
"entryPoint": ["index.tsx", "index.ts"]
|
|
77
|
-
},
|
|
78
|
-
transform: async (item) => {
|
|
79
|
-
if (item.refTarget && item.resolved.entryPoint) {
|
|
80
|
-
throw declareError("The composite can't have both an index file and a .ref file", item.itemPath);
|
|
81
|
-
}
|
|
82
|
-
compositeItems.push({
|
|
83
|
-
priority: item.priority,
|
|
84
|
-
sortKey: item.itemName,
|
|
85
|
-
ref: item.refTarget,
|
|
86
|
-
entryPoint: item.resolved.entryPoint
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
for (let dirItem of dirItems) {
|
|
91
|
-
if (await mustSkip_expectDir(dirItem))
|
|
92
|
-
continue;
|
|
93
|
-
await applyTypeRulesOnChildDir(params, dirItem);
|
|
94
|
-
}
|
|
95
|
-
// > Add the composite.
|
|
96
|
-
let current = getRegistryItem(compositeId, this);
|
|
97
|
-
if (!current) {
|
|
98
|
-
const newItem = {
|
|
99
|
-
arobaseType: this, itemPath: p.itemPath,
|
|
100
|
-
items: compositeItems, itemsType: p.parentDirName, allDirPath: [p.itemPath]
|
|
101
|
-
};
|
|
102
|
-
addToRegistry(compositeId, newItem);
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
if (current.itemsType !== p.parentDirName) {
|
|
106
|
-
throw declareError(`The composite ${compositeId} is already defined and has a different type: ${current.itemsType}`, p.itemPath);
|
|
107
|
-
}
|
|
108
|
-
current.allDirPath.push(p.itemPath);
|
|
109
|
-
current.items.push(...compositeItems);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
//# sourceMappingURL=TypeComposite.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TypeComposite.js","sourceRoot":"","sources":["../../src/jk_linker/TypeComposite.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAgB,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EACH,aAAa,EAEb,YAAY,EAAE,YAAY,EAAE,eAAe,EAC3C,gBAAgB,EACM,aAAa,EAAqB,mBAAmB,EAAE,wBAAwB,EACrG,mBAAmB,EAAE,kBAAkB,EAAE,WAAW,EACvD,MAAM,aAAa,CAAC;AAerB,MAAM,CAAC,OAAO,MAAO,SAAQ,WAAW;IACpC,KAAK,CAAC,UAAU,CAAC,CAA6D;QAC1E,IAAI,SAAS,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;QAElD,KAAK,IAAI,QAAQ,IAAI,SAAS,EAAE,CAAC;YAC7B,IAAI,CAAC,QAAQ,CAAC,WAAW,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC;gBAAE,SAAS;YAEhG,MAAM,mBAAmB,CAAC;gBACtB,SAAS,EAAE,QAAQ,CAAC,QAAQ;gBAC5B,YAAY,EAAE,KAAK;gBAEnB,YAAY,EAAE;oBACV,cAAc,EAAE,WAAW;oBAC3B,cAAc,EAAE,KAAK;o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pC,OAAO;QACX,CAAC;QAED,IAAI,OAAO,CAAC,SAAS,KAAK,CAAC,CAAC,aAAa,EAAE,CAAC;YACxC,MAAM,YAAY,CAAC,iBAAiB,WAAW,iDAAiD,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;QACrI,CAAC;QAED,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;QACpC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,cAAc,CAAC,CAAC;IAC1C,CAAC;CACJ"}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { type TransformParams, PriorityLevel, type RegistryItem, ArobaseType, type RulesFor_Collection } from "./engine.ts";
|
|
2
|
-
export interface ArobaseList extends RegistryItem {
|
|
3
|
-
listName: string;
|
|
4
|
-
allDirPath: string[];
|
|
5
|
-
items: ArobaseListItem[];
|
|
6
|
-
itemsType: string;
|
|
7
|
-
conditions?: Set<string>;
|
|
8
|
-
}
|
|
9
|
-
export interface ArobaseListItem {
|
|
10
|
-
ref?: string;
|
|
11
|
-
entryPoint?: string;
|
|
12
|
-
priority: PriorityLevel;
|
|
13
|
-
sortKey: string;
|
|
14
|
-
}
|
|
15
|
-
export default class ArobaseType_List extends ArobaseType {
|
|
16
|
-
processDir(p: {
|
|
17
|
-
moduleDir: string;
|
|
18
|
-
arobaseDir: string;
|
|
19
|
-
genDir: string;
|
|
20
|
-
}): Promise<void>;
|
|
21
|
-
protected processList(listDirPath: string): Promise<void>;
|
|
22
|
-
processListItem(p: TransformParams): Promise<void>;
|
|
23
|
-
hookRootDirConstraints(p: RulesFor_Collection): RulesFor_Collection;
|
|
24
|
-
protected getGenOutputDir(genDir: string, list: ArobaseList): string;
|
|
25
|
-
generateCodeForItem(key: string, rItem: RegistryItem, infos: {
|
|
26
|
-
genDir: string;
|
|
27
|
-
}): Promise<void>;
|
|
28
|
-
protected resolveEntryPointFor(list: ArobaseList, item: ArobaseListItem, outDir: string): string;
|
|
29
|
-
protected generateCodeForList(key: string, list: ArobaseList, genDir: string): Promise<void>;
|
|
30
|
-
}
|
|
31
|
-
export interface ChunkRegistryItem extends RegistryItem {
|
|
32
|
-
entryPoint: string;
|
|
33
|
-
itemType: string;
|
|
34
|
-
}
|
|
35
|
-
export default class TypeChunks extends ArobaseType {
|
|
36
|
-
processDir(p: {
|
|
37
|
-
moduleDir: string;
|
|
38
|
-
arobaseDir: string;
|
|
39
|
-
genDir: string;
|
|
40
|
-
}): Promise<void>;
|
|
41
|
-
generateCodeForItem(key: string, rItem: RegistryItem, infos: {
|
|
42
|
-
genDir: string;
|
|
43
|
-
}): Promise<void>;
|
|
44
|
-
}
|
|
@@ -1,183 +0,0 @@
|
|
|
1
|
-
import * as jk_fs from "jopi-toolkit/jk_fs";
|
|
2
|
-
import {} from "./typeChunks.js";
|
|
3
|
-
import { addToRegistry, declareError, genWriteFile, getRegistryItem, getSortedDirItem, PriorityLevel, requireRegistryItem, applyTypeRulesOnChildDir, applyTypeRulesOnDir, mustSkip_expectDir, ArobaseType, createDirSymlink } from "./engine.js";
|
|
4
|
-
export default class ArobaseType_List extends ArobaseType {
|
|
5
|
-
processDir(p) {
|
|
6
|
-
return this.processList(p.arobaseDir);
|
|
7
|
-
}
|
|
8
|
-
async processList(listDirPath) {
|
|
9
|
-
await applyTypeRulesOnDir(this.hookRootDirConstraints({
|
|
10
|
-
dirToScan: listDirPath,
|
|
11
|
-
expectFsType: "dir",
|
|
12
|
-
itemDefRules: {
|
|
13
|
-
nameConstraint: "mustBeUid",
|
|
14
|
-
requireRefFile: false,
|
|
15
|
-
requirePriority: false,
|
|
16
|
-
rootDirName: jk_fs.basename(listDirPath),
|
|
17
|
-
transform: (p) => this.processListItem(p)
|
|
18
|
-
}
|
|
19
|
-
}));
|
|
20
|
-
}
|
|
21
|
-
async processListItem(p) {
|
|
22
|
-
let listId = this.typeName + "_" + p.itemName;
|
|
23
|
-
const listName = p.itemName;
|
|
24
|
-
// > Extract the list items.
|
|
25
|
-
const dirItems = await getSortedDirItem(p.itemPath);
|
|
26
|
-
let listItems = [];
|
|
27
|
-
const params = {
|
|
28
|
-
rootDirName: p.parentDirName,
|
|
29
|
-
nameConstraint: "mustNotBeUid",
|
|
30
|
-
requirePriority: true,
|
|
31
|
-
filesToResolve: {
|
|
32
|
-
"entryPoint": ["index.tsx", "index.ts"]
|
|
33
|
-
},
|
|
34
|
-
transform: async (item) => {
|
|
35
|
-
if (item.refTarget && item.resolved.entryPoint) {
|
|
36
|
-
throw declareError("The list item can't have both an index file and a .ref file", item.itemPath);
|
|
37
|
-
}
|
|
38
|
-
listItems.push({
|
|
39
|
-
priority: item.priority,
|
|
40
|
-
sortKey: item.itemName,
|
|
41
|
-
ref: item.refTarget,
|
|
42
|
-
entryPoint: item.resolved.entryPoint
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
for (let dirItem of dirItems) {
|
|
47
|
-
if (await mustSkip_expectDir(dirItem))
|
|
48
|
-
continue;
|
|
49
|
-
await applyTypeRulesOnChildDir(params, dirItem);
|
|
50
|
-
}
|
|
51
|
-
// > Add the list.
|
|
52
|
-
let current = getRegistryItem(listId, this);
|
|
53
|
-
if (!current) {
|
|
54
|
-
const newItem = {
|
|
55
|
-
listName, conditions: p.conditions,
|
|
56
|
-
arobaseType: this, itemPath: p.itemPath,
|
|
57
|
-
items: listItems, itemsType: p.parentDirName, allDirPath: [p.itemPath]
|
|
58
|
-
};
|
|
59
|
-
addToRegistry(listId, newItem);
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
if (p.conditions) {
|
|
64
|
-
if (current.conditions) {
|
|
65
|
-
for (let c of p.conditions) {
|
|
66
|
-
current.conditions.add(c);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
if (!current.conditions) {
|
|
71
|
-
current.conditions = p.conditions;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
if (current.itemsType !== p.parentDirName) {
|
|
77
|
-
throw declareError(`The list ${listId} is already defined and has a different type: ${current.itemsType}`, p.itemPath);
|
|
78
|
-
}
|
|
79
|
-
current.allDirPath.push(p.itemPath);
|
|
80
|
-
current.items.push(...listItems);
|
|
81
|
-
}
|
|
82
|
-
hookRootDirConstraints(p) {
|
|
83
|
-
return p;
|
|
84
|
-
}
|
|
85
|
-
getGenOutputDir(genDir, list) {
|
|
86
|
-
return jk_fs.join(genDir, this.typeName);
|
|
87
|
-
}
|
|
88
|
-
async generateCodeForItem(key, rItem, infos) {
|
|
89
|
-
function sortByPriority(items) {
|
|
90
|
-
function addPriority(priority) {
|
|
91
|
-
let e = byPriority[priority];
|
|
92
|
-
if (e)
|
|
93
|
-
items.push(...e);
|
|
94
|
-
}
|
|
95
|
-
const byPriority = {};
|
|
96
|
-
for (let item of items) {
|
|
97
|
-
if (!byPriority[item.priority])
|
|
98
|
-
byPriority[item.priority] = [];
|
|
99
|
-
byPriority[item.priority].push(item);
|
|
100
|
-
}
|
|
101
|
-
items = [];
|
|
102
|
-
addPriority(PriorityLevel.veryHigh);
|
|
103
|
-
addPriority(PriorityLevel.high);
|
|
104
|
-
addPriority(PriorityLevel.default);
|
|
105
|
-
addPriority(PriorityLevel.low);
|
|
106
|
-
addPriority(PriorityLevel.veryLow);
|
|
107
|
-
return items;
|
|
108
|
-
}
|
|
109
|
-
const list = rItem;
|
|
110
|
-
list.items = sortByPriority(list.items);
|
|
111
|
-
await this.generateCodeForList(key, list, infos.genDir);
|
|
112
|
-
}
|
|
113
|
-
resolveEntryPointFor(list, item, outDir) {
|
|
114
|
-
let entryPoint = item.entryPoint;
|
|
115
|
-
if (!entryPoint) {
|
|
116
|
-
let d = requireRegistryItem(item.ref);
|
|
117
|
-
if (d.itemType !== list.itemsType) {
|
|
118
|
-
throw declareError(`Type mismatch. Expect ${list.itemsType}`, d.itemPath);
|
|
119
|
-
}
|
|
120
|
-
if (!d.entryPoint) {
|
|
121
|
-
throw declareError(`Item if missing index.ts/index.tsx file`, d.itemPath);
|
|
122
|
-
}
|
|
123
|
-
entryPoint = d.entryPoint;
|
|
124
|
-
}
|
|
125
|
-
return jk_fs.getRelativePath(outDir, entryPoint);
|
|
126
|
-
}
|
|
127
|
-
async generateCodeForList(key, list, genDir) {
|
|
128
|
-
let source = "";
|
|
129
|
-
let count = 1;
|
|
130
|
-
let outDir = this.getGenOutputDir(genDir, list);
|
|
131
|
-
for (let item of list.items) {
|
|
132
|
-
let entryPoint = this.resolveEntryPointFor(list, item, outDir);
|
|
133
|
-
source += `import I${count++} from "${entryPoint}";\n`;
|
|
134
|
-
}
|
|
135
|
-
let max = list.items.length;
|
|
136
|
-
source += "\nexport default [";
|
|
137
|
-
for (let i = 1; i <= max; i++)
|
|
138
|
-
source += `I${i},`;
|
|
139
|
-
source += "];";
|
|
140
|
-
let fileName = key.substring(key.indexOf("_") + 1) + ".ts";
|
|
141
|
-
await genWriteFile(jk_fs.join(outDir, fileName), source);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
export default class TypeChunks extends ArobaseType {
|
|
145
|
-
async processDir(p) {
|
|
146
|
-
let allChildDir = await jk_fs.listDir(p.arobaseDir);
|
|
147
|
-
for (let childDir of allChildDir) {
|
|
148
|
-
if (!childDir.isDirectory || (childDir.name[0] === "_") || (childDir.name[0] === "."))
|
|
149
|
-
continue;
|
|
150
|
-
await applyTypeRulesOnDir({
|
|
151
|
-
dirToScan: childDir.fullPath,
|
|
152
|
-
expectFsType: "dir",
|
|
153
|
-
itemDefRules: {
|
|
154
|
-
rootDirName: childDir.name,
|
|
155
|
-
nameConstraint: "mustBeUid",
|
|
156
|
-
requireRefFile: false,
|
|
157
|
-
filesToResolve: {
|
|
158
|
-
"info": ["info.json"],
|
|
159
|
-
"entryPoint": ["index.tsx", "index.ts"]
|
|
160
|
-
},
|
|
161
|
-
transform: async (props) => {
|
|
162
|
-
if (!props.resolved?.entryPoint) {
|
|
163
|
-
throw declareError("No 'index.ts' or 'index.tsx' file found", props.itemPath);
|
|
164
|
-
}
|
|
165
|
-
const newItem = {
|
|
166
|
-
arobaseType: this,
|
|
167
|
-
entryPoint: props.resolved.entryPoint,
|
|
168
|
-
itemType: props.parentDirName,
|
|
169
|
-
itemPath: props.itemPath,
|
|
170
|
-
};
|
|
171
|
-
addToRegistry(props.uid, newItem);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
async generateCodeForItem(key, rItem, infos) {
|
|
178
|
-
const item = rItem;
|
|
179
|
-
const newFilePath = jk_fs.join(infos.genDir, "chunk", item.itemType, key);
|
|
180
|
-
await createDirSymlink(newFilePath, jk_fs.dirname(item.entryPoint));
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
//# sourceMappingURL=arobaseType_List.js.map
|