@akanjs/cli 2.3.10-rc.0 → 2.3.10-rc.1
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 +11 -11
- package/index.js +11 -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);
|
|
@@ -10273,6 +10272,7 @@ import path24 from "path";
|
|
|
10273
10272
|
// pkgs/@akanjs/devkit/frontendBuild/pagesEntrySourceGenerator.ts
|
|
10274
10273
|
import fs3 from "fs";
|
|
10275
10274
|
import path23 from "path";
|
|
10275
|
+
import { pathToFileURL } from "url";
|
|
10276
10276
|
import ts8 from "typescript";
|
|
10277
10277
|
|
|
10278
10278
|
class PagesEntrySourceGenerator {
|
|
@@ -10285,8 +10285,8 @@ class PagesEntrySourceGenerator {
|
|
|
10285
10285
|
}
|
|
10286
10286
|
generate() {
|
|
10287
10287
|
const lines = this.#pageEntries.map(({ key, moduleAbsPath }) => {
|
|
10288
|
-
const
|
|
10289
|
-
return ` ${JSON.stringify(key)}: () => import(${JSON.stringify(
|
|
10288
|
+
const specifier = pathToFileURL(path23.resolve(moduleAbsPath)).href;
|
|
10289
|
+
return ` ${JSON.stringify(key)}: () => import(${JSON.stringify(specifier)}),`;
|
|
10290
10290
|
});
|
|
10291
10291
|
return `export const pages = {
|
|
10292
10292
|
${lines.join(`
|
|
@@ -10299,8 +10299,8 @@ ${lines.join(`
|
|
|
10299
10299
|
}
|
|
10300
10300
|
generateStatic() {
|
|
10301
10301
|
const imports = this.#pageEntries.map(({ moduleAbsPath }, index) => {
|
|
10302
|
-
const
|
|
10303
|
-
return `import * as page${index} from ${JSON.stringify(
|
|
10302
|
+
const specifier = pathToFileURL(path23.resolve(moduleAbsPath)).href;
|
|
10303
|
+
return `import * as page${index} from ${JSON.stringify(specifier)};`;
|
|
10304
10304
|
});
|
|
10305
10305
|
const entries = this.#pageEntries.map(({ key, moduleAbsPath }, index) => {
|
|
10306
10306
|
const isAsyncDefault = PagesEntrySourceGenerator.#hasAsyncDefaultExport(moduleAbsPath);
|
|
@@ -12180,11 +12180,11 @@ class SsrBaseArtifactBuilder {
|
|
|
12180
12180
|
}
|
|
12181
12181
|
async#buildRuntimeClientEntries() {
|
|
12182
12182
|
const akanServerPath = await this.#resolveAkanServerPath();
|
|
12183
|
-
const rscClientEntry =
|
|
12184
|
-
const rscSegmentOutletEntry =
|
|
12183
|
+
const rscClientEntry = path35.resolve(akanServerPath, "rscClient.tsx");
|
|
12184
|
+
const rscSegmentOutletEntry = path35.resolve(akanServerPath, "rscSegmentOutlet.tsx");
|
|
12185
12185
|
const vendorEntries = VENDOR_SPECIFIERS.map((specifier) => ({
|
|
12186
12186
|
specifier,
|
|
12187
|
-
absPath:
|
|
12187
|
+
absPath: path35.resolve(akanServerPath, "vendor", `${specifier.replaceAll("/", "-").replaceAll(".", "-")}.ts`)
|
|
12188
12188
|
}));
|
|
12189
12189
|
const entries = [rscClientEntry, rscSegmentOutletEntry, ...vendorEntries.map((v) => v.absPath)];
|
|
12190
12190
|
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);
|
|
@@ -10271,6 +10270,7 @@ import path24 from "path";
|
|
|
10271
10270
|
// pkgs/@akanjs/devkit/frontendBuild/pagesEntrySourceGenerator.ts
|
|
10272
10271
|
import fs3 from "fs";
|
|
10273
10272
|
import path23 from "path";
|
|
10273
|
+
import { pathToFileURL } from "url";
|
|
10274
10274
|
import ts8 from "typescript";
|
|
10275
10275
|
|
|
10276
10276
|
class PagesEntrySourceGenerator {
|
|
@@ -10283,8 +10283,8 @@ class PagesEntrySourceGenerator {
|
|
|
10283
10283
|
}
|
|
10284
10284
|
generate() {
|
|
10285
10285
|
const lines = this.#pageEntries.map(({ key, moduleAbsPath }) => {
|
|
10286
|
-
const
|
|
10287
|
-
return ` ${JSON.stringify(key)}: () => import(${JSON.stringify(
|
|
10286
|
+
const specifier = pathToFileURL(path23.resolve(moduleAbsPath)).href;
|
|
10287
|
+
return ` ${JSON.stringify(key)}: () => import(${JSON.stringify(specifier)}),`;
|
|
10288
10288
|
});
|
|
10289
10289
|
return `export const pages = {
|
|
10290
10290
|
${lines.join(`
|
|
@@ -10297,8 +10297,8 @@ ${lines.join(`
|
|
|
10297
10297
|
}
|
|
10298
10298
|
generateStatic() {
|
|
10299
10299
|
const imports = this.#pageEntries.map(({ moduleAbsPath }, index) => {
|
|
10300
|
-
const
|
|
10301
|
-
return `import * as page${index} from ${JSON.stringify(
|
|
10300
|
+
const specifier = pathToFileURL(path23.resolve(moduleAbsPath)).href;
|
|
10301
|
+
return `import * as page${index} from ${JSON.stringify(specifier)};`;
|
|
10302
10302
|
});
|
|
10303
10303
|
const entries = this.#pageEntries.map(({ key, moduleAbsPath }, index) => {
|
|
10304
10304
|
const isAsyncDefault = PagesEntrySourceGenerator.#hasAsyncDefaultExport(moduleAbsPath);
|
|
@@ -12178,11 +12178,11 @@ class SsrBaseArtifactBuilder {
|
|
|
12178
12178
|
}
|
|
12179
12179
|
async#buildRuntimeClientEntries() {
|
|
12180
12180
|
const akanServerPath = await this.#resolveAkanServerPath();
|
|
12181
|
-
const rscClientEntry =
|
|
12182
|
-
const rscSegmentOutletEntry =
|
|
12181
|
+
const rscClientEntry = path35.resolve(akanServerPath, "rscClient.tsx");
|
|
12182
|
+
const rscSegmentOutletEntry = path35.resolve(akanServerPath, "rscSegmentOutlet.tsx");
|
|
12183
12183
|
const vendorEntries = VENDOR_SPECIFIERS.map((specifier) => ({
|
|
12184
12184
|
specifier,
|
|
12185
|
-
absPath:
|
|
12185
|
+
absPath: path35.resolve(akanServerPath, "vendor", `${specifier.replaceAll("/", "-").replaceAll(".", "-")}.ts`)
|
|
12186
12186
|
}));
|
|
12187
12187
|
const entries = [rscClientEntry, rscSegmentOutletEntry, ...vendorEntries.map((v) => v.absPath)];
|
|
12188
12188
|
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.1",
|
|
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.1",
|
|
38
38
|
"chalk": "^5.6.2",
|
|
39
39
|
"commander": "^14.0.3",
|
|
40
40
|
"daisyui": "5.5.23",
|