@akanjs/cli 0.9.18 → 0.9.19

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/cjs/index.js CHANGED
@@ -2632,7 +2632,7 @@ var extractDependencies = (filepaths, pacakgeJson, defaultDependencies = []) =>
2632
2632
  ...pacakgeJson.devDependencies ?? {}
2633
2633
  };
2634
2634
  const requireRegex = /(?:require\s*\(|import\s*(?:[\w\s{},*]*\s+from\s*)?|import\s*\()\s*['"`]([^'"`]+)['"`]/g;
2635
- for (const { text } of filepaths.filter(({ path: path9 }) => path9.endsWith(".js"))) {
2635
+ for (const { text } of filepaths.filter(({ path: path9 }) => path9.endsWith(".js") || path9.endsWith(".ts"))) {
2636
2636
  let requireMatch;
2637
2637
  while ((requireMatch = requireRegex.exec(text)) !== null) {
2638
2638
  const moduleName = requireMatch[1];
@@ -4049,20 +4049,16 @@ var ApplicationRunner = class {
4049
4049
  const { env } = await this.#prepareCommand(app, "build", "frontend");
4050
4050
  const akanConfig = await app.getConfig("build");
4051
4051
  await app.spawn("npx", ["next", "build", "--no-lint"], { env, ...spawnOptions });
4052
- const buildResult = process.env.USE_AKANJS_PKGS === "true" ? await esbuild2.build({
4052
+ const buildResult = await esbuild2.build({
4053
4053
  entryPoints: [`${app.cwdPath}/next.config.ts`],
4054
- outdir: `${app.dist.cwdPath}/frontend`,
4054
+ outfile: `${app.dist.cwdPath}/frontend/next.config.ts`,
4055
4055
  bundle: true,
4056
4056
  packages: "external",
4057
4057
  platform: "node",
4058
4058
  format: "esm",
4059
4059
  write: false,
4060
4060
  logLevel: "warning"
4061
- }) : {
4062
- outputFiles: [
4063
- { path: `${app.dist.cwdPath}/frontend/next.config.ts`, text: app.readFile("next.config.ts") }
4064
- ]
4065
- };
4061
+ });
4066
4062
  const rootPackageJson = app.workspace.readJson("package.json");
4067
4063
  const dependencies = extractDependencies(buildResult.outputFiles, rootPackageJson, ["next", "react", "react-dom"]);
4068
4064
  buildResult.outputFiles.map((file) => app.dist.writeFile(file.path, file.text));
package/esm/index.js CHANGED
@@ -2611,7 +2611,7 @@ var extractDependencies = (filepaths, pacakgeJson, defaultDependencies = []) =>
2611
2611
  ...pacakgeJson.devDependencies ?? {}
2612
2612
  };
2613
2613
  const requireRegex = /(?:require\s*\(|import\s*(?:[\w\s{},*]*\s+from\s*)?|import\s*\()\s*['"`]([^'"`]+)['"`]/g;
2614
- for (const { text } of filepaths.filter(({ path: path9 }) => path9.endsWith(".js"))) {
2614
+ for (const { text } of filepaths.filter(({ path: path9 }) => path9.endsWith(".js") || path9.endsWith(".ts"))) {
2615
2615
  let requireMatch;
2616
2616
  while ((requireMatch = requireRegex.exec(text)) !== null) {
2617
2617
  const moduleName = requireMatch[1];
@@ -4031,20 +4031,16 @@ var ApplicationRunner = class {
4031
4031
  const { env } = await this.#prepareCommand(app, "build", "frontend");
4032
4032
  const akanConfig = await app.getConfig("build");
4033
4033
  await app.spawn("npx", ["next", "build", "--no-lint"], { env, ...spawnOptions });
4034
- const buildResult = process.env.USE_AKANJS_PKGS === "true" ? await esbuild2.build({
4034
+ const buildResult = await esbuild2.build({
4035
4035
  entryPoints: [`${app.cwdPath}/next.config.ts`],
4036
- outdir: `${app.dist.cwdPath}/frontend`,
4036
+ outfile: `${app.dist.cwdPath}/frontend/next.config.ts`,
4037
4037
  bundle: true,
4038
4038
  packages: "external",
4039
4039
  platform: "node",
4040
4040
  format: "esm",
4041
4041
  write: false,
4042
4042
  logLevel: "warning"
4043
- }) : {
4044
- outputFiles: [
4045
- { path: `${app.dist.cwdPath}/frontend/next.config.ts`, text: app.readFile("next.config.ts") }
4046
- ]
4047
- };
4043
+ });
4048
4044
  const rootPackageJson = app.workspace.readJson("package.json");
4049
4045
  const dependencies = extractDependencies(buildResult.outputFiles, rootPackageJson, ["next", "react", "react-dom"]);
4050
4046
  buildResult.outputFiles.map((file) => app.dist.writeFile(file.path, file.text));
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "type": "module",
3
3
  "sourceType": "module",
4
4
  "name": "@akanjs/cli",
5
- "version": "0.9.18",
5
+ "version": "0.9.19",
6
6
  "bin": {
7
7
  "akan": "esm/index.js"
8
8
  },