@akanjs/cli 2.3.10-rc.0 → 2.3.10-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/incrementalBuilder.proc.js +13 -11
- package/index.js +13 -11
- package/package.json +2 -2
|
@@ -2794,8 +2794,8 @@ class Executor {
|
|
|
2794
2794
|
return filePath;
|
|
2795
2795
|
if (filePath.startsWith("."))
|
|
2796
2796
|
return path7.join(this.cwdPath, filePath);
|
|
2797
|
-
const baseParts = this.cwdPath.split(
|
|
2798
|
-
const targetParts = filePath.split(
|
|
2797
|
+
const baseParts = this.cwdPath.split(/[\\/]/).filter(Boolean);
|
|
2798
|
+
const targetParts = filePath.split(/[\\/]/).filter(Boolean);
|
|
2799
2799
|
let overlapLength = 0;
|
|
2800
2800
|
for (let i = 1;i <= Math.min(baseParts.length, targetParts.length); i++) {
|
|
2801
2801
|
let isOverlap = true;
|
|
@@ -2807,8 +2807,7 @@ class Executor {
|
|
|
2807
2807
|
if (isOverlap)
|
|
2808
2808
|
overlapLength = i;
|
|
2809
2809
|
}
|
|
2810
|
-
|
|
2811
|
-
return result.replace(/\/+/g, "/");
|
|
2810
|
+
return path7.join(this.cwdPath, ...targetParts.slice(overlapLength));
|
|
2812
2811
|
}
|
|
2813
2812
|
async mkdir(dirPath) {
|
|
2814
2813
|
const writePath = this.getPath(dirPath);
|
|
@@ -10285,8 +10284,8 @@ class PagesEntrySourceGenerator {
|
|
|
10285
10284
|
}
|
|
10286
10285
|
generate() {
|
|
10287
10286
|
const lines = this.#pageEntries.map(({ key, moduleAbsPath }) => {
|
|
10288
|
-
const
|
|
10289
|
-
return ` ${JSON.stringify(key)}: () => import(${JSON.stringify(
|
|
10287
|
+
const specifier = PagesEntrySourceGenerator.#toImportSpecifier(moduleAbsPath);
|
|
10288
|
+
return ` ${JSON.stringify(key)}: () => import(${JSON.stringify(specifier)}),`;
|
|
10290
10289
|
});
|
|
10291
10290
|
return `export const pages = {
|
|
10292
10291
|
${lines.join(`
|
|
@@ -10299,8 +10298,8 @@ ${lines.join(`
|
|
|
10299
10298
|
}
|
|
10300
10299
|
generateStatic() {
|
|
10301
10300
|
const imports = this.#pageEntries.map(({ moduleAbsPath }, index) => {
|
|
10302
|
-
const
|
|
10303
|
-
return `import * as page${index} from ${JSON.stringify(
|
|
10301
|
+
const specifier = PagesEntrySourceGenerator.#toImportSpecifier(moduleAbsPath);
|
|
10302
|
+
return `import * as page${index} from ${JSON.stringify(specifier)};`;
|
|
10304
10303
|
});
|
|
10305
10304
|
const entries = this.#pageEntries.map(({ key, moduleAbsPath }, index) => {
|
|
10306
10305
|
const isAsyncDefault = PagesEntrySourceGenerator.#hasAsyncDefaultExport(moduleAbsPath);
|
|
@@ -10314,6 +10313,9 @@ ${entries.join(`
|
|
|
10314
10313
|
};
|
|
10315
10314
|
`;
|
|
10316
10315
|
}
|
|
10316
|
+
static #toImportSpecifier(moduleAbsPath) {
|
|
10317
|
+
return path23.resolve(moduleAbsPath).split(path23.sep).join("/");
|
|
10318
|
+
}
|
|
10317
10319
|
static #hasAsyncDefaultExport(moduleAbsPath) {
|
|
10318
10320
|
try {
|
|
10319
10321
|
const source2 = fs3.readFileSync(path23.resolve(moduleAbsPath), "utf8");
|
|
@@ -12180,11 +12182,11 @@ class SsrBaseArtifactBuilder {
|
|
|
12180
12182
|
}
|
|
12181
12183
|
async#buildRuntimeClientEntries() {
|
|
12182
12184
|
const akanServerPath = await this.#resolveAkanServerPath();
|
|
12183
|
-
const rscClientEntry =
|
|
12184
|
-
const rscSegmentOutletEntry =
|
|
12185
|
+
const rscClientEntry = path35.resolve(akanServerPath, "rscClient.tsx");
|
|
12186
|
+
const rscSegmentOutletEntry = path35.resolve(akanServerPath, "rscSegmentOutlet.tsx");
|
|
12185
12187
|
const vendorEntries = VENDOR_SPECIFIERS.map((specifier) => ({
|
|
12186
12188
|
specifier,
|
|
12187
|
-
absPath:
|
|
12189
|
+
absPath: path35.resolve(akanServerPath, "vendor", `${specifier.replaceAll("/", "-").replaceAll(".", "-")}.ts`)
|
|
12188
12190
|
}));
|
|
12189
12191
|
const entries = [rscClientEntry, rscSegmentOutletEntry, ...vendorEntries.map((v) => v.absPath)];
|
|
12190
12192
|
const clientBundle = await new ClientEntriesBundler({ app: this.#app, entries, command: this.#command }).bundle();
|
package/index.js
CHANGED
|
@@ -2792,8 +2792,8 @@ class Executor {
|
|
|
2792
2792
|
return filePath;
|
|
2793
2793
|
if (filePath.startsWith("."))
|
|
2794
2794
|
return path7.join(this.cwdPath, filePath);
|
|
2795
|
-
const baseParts = this.cwdPath.split(
|
|
2796
|
-
const targetParts = filePath.split(
|
|
2795
|
+
const baseParts = this.cwdPath.split(/[\\/]/).filter(Boolean);
|
|
2796
|
+
const targetParts = filePath.split(/[\\/]/).filter(Boolean);
|
|
2797
2797
|
let overlapLength = 0;
|
|
2798
2798
|
for (let i = 1;i <= Math.min(baseParts.length, targetParts.length); i++) {
|
|
2799
2799
|
let isOverlap = true;
|
|
@@ -2805,8 +2805,7 @@ class Executor {
|
|
|
2805
2805
|
if (isOverlap)
|
|
2806
2806
|
overlapLength = i;
|
|
2807
2807
|
}
|
|
2808
|
-
|
|
2809
|
-
return result.replace(/\/+/g, "/");
|
|
2808
|
+
return path7.join(this.cwdPath, ...targetParts.slice(overlapLength));
|
|
2810
2809
|
}
|
|
2811
2810
|
async mkdir(dirPath) {
|
|
2812
2811
|
const writePath = this.getPath(dirPath);
|
|
@@ -10283,8 +10282,8 @@ class PagesEntrySourceGenerator {
|
|
|
10283
10282
|
}
|
|
10284
10283
|
generate() {
|
|
10285
10284
|
const lines = this.#pageEntries.map(({ key, moduleAbsPath }) => {
|
|
10286
|
-
const
|
|
10287
|
-
return ` ${JSON.stringify(key)}: () => import(${JSON.stringify(
|
|
10285
|
+
const specifier = PagesEntrySourceGenerator.#toImportSpecifier(moduleAbsPath);
|
|
10286
|
+
return ` ${JSON.stringify(key)}: () => import(${JSON.stringify(specifier)}),`;
|
|
10288
10287
|
});
|
|
10289
10288
|
return `export const pages = {
|
|
10290
10289
|
${lines.join(`
|
|
@@ -10297,8 +10296,8 @@ ${lines.join(`
|
|
|
10297
10296
|
}
|
|
10298
10297
|
generateStatic() {
|
|
10299
10298
|
const imports = this.#pageEntries.map(({ moduleAbsPath }, index) => {
|
|
10300
|
-
const
|
|
10301
|
-
return `import * as page${index} from ${JSON.stringify(
|
|
10299
|
+
const specifier = PagesEntrySourceGenerator.#toImportSpecifier(moduleAbsPath);
|
|
10300
|
+
return `import * as page${index} from ${JSON.stringify(specifier)};`;
|
|
10302
10301
|
});
|
|
10303
10302
|
const entries = this.#pageEntries.map(({ key, moduleAbsPath }, index) => {
|
|
10304
10303
|
const isAsyncDefault = PagesEntrySourceGenerator.#hasAsyncDefaultExport(moduleAbsPath);
|
|
@@ -10312,6 +10311,9 @@ ${entries.join(`
|
|
|
10312
10311
|
};
|
|
10313
10312
|
`;
|
|
10314
10313
|
}
|
|
10314
|
+
static #toImportSpecifier(moduleAbsPath) {
|
|
10315
|
+
return path23.resolve(moduleAbsPath).split(path23.sep).join("/");
|
|
10316
|
+
}
|
|
10315
10317
|
static #hasAsyncDefaultExport(moduleAbsPath) {
|
|
10316
10318
|
try {
|
|
10317
10319
|
const source2 = fs3.readFileSync(path23.resolve(moduleAbsPath), "utf8");
|
|
@@ -12178,11 +12180,11 @@ class SsrBaseArtifactBuilder {
|
|
|
12178
12180
|
}
|
|
12179
12181
|
async#buildRuntimeClientEntries() {
|
|
12180
12182
|
const akanServerPath = await this.#resolveAkanServerPath();
|
|
12181
|
-
const rscClientEntry =
|
|
12182
|
-
const rscSegmentOutletEntry =
|
|
12183
|
+
const rscClientEntry = path35.resolve(akanServerPath, "rscClient.tsx");
|
|
12184
|
+
const rscSegmentOutletEntry = path35.resolve(akanServerPath, "rscSegmentOutlet.tsx");
|
|
12183
12185
|
const vendorEntries = VENDOR_SPECIFIERS.map((specifier) => ({
|
|
12184
12186
|
specifier,
|
|
12185
|
-
absPath:
|
|
12187
|
+
absPath: path35.resolve(akanServerPath, "vendor", `${specifier.replaceAll("/", "-").replaceAll(".", "-")}.ts`)
|
|
12186
12188
|
}));
|
|
12187
12189
|
const entries = [rscClientEntry, rscSegmentOutletEntry, ...vendorEntries.map((v) => v.absPath)];
|
|
12188
12190
|
const clientBundle = await new ClientEntriesBundler({ app: this.#app, entries, command: this.#command }).bundle();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akanjs/cli",
|
|
3
|
-
"version": "2.3.10-rc.
|
|
3
|
+
"version": "2.3.10-rc.2",
|
|
4
4
|
"sourceType": "module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@langchain/openai": "^1.4.6",
|
|
35
35
|
"@tailwindcss/node": "^4.3.0",
|
|
36
36
|
"@trapezedev/project": "^7.1.4",
|
|
37
|
-
"akanjs": "2.3.10-rc.
|
|
37
|
+
"akanjs": "2.3.10-rc.2",
|
|
38
38
|
"chalk": "^5.6.2",
|
|
39
39
|
"commander": "^14.0.3",
|
|
40
40
|
"daisyui": "5.5.23",
|