javi-forge 1.22.0 → 1.22.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 JNZader
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -734,8 +734,8 @@ async function runStep(options) {
734
734
  "the image must be resolved before any step runs");
735
735
  }
736
736
  const workdir = runner.directory !== "."
737
- ? `/home/runner/work/${runner.directory}`
738
- : "/home/runner/work";
737
+ ? `${CONTAINER_WORKDIR}/${runner.directory}`
738
+ : CONTAINER_WORKDIR;
739
739
  const result = await runInContainer({
740
740
  projectDir,
741
741
  image,
@@ -10,8 +10,6 @@ export declare function backupIfExists(filePath: string): Promise<boolean>;
10
10
  export declare function ensureDirExists(dirPath: string): Promise<void>;
11
11
  /** Check if a directory is a git repository */
12
12
  export declare function isGitRepo(dir: string): Promise<boolean>;
13
- /** Resolve the forge assets root (the package root directory) */
14
- export declare function getForgeRoot(): string;
15
13
  /** Stack display names */
16
14
  export declare const STACK_LABELS: Record<Stack, string>;
17
15
  //# sourceMappingURL=common.d.ts.map
@@ -100,12 +100,6 @@ export async function ensureDirExists(dirPath) {
100
100
  export async function isGitRepo(dir) {
101
101
  return fs.pathExists(path.join(dir, ".git"));
102
102
  }
103
- /** Resolve the forge assets root (the package root directory) */
104
- export function getForgeRoot() {
105
- // When running from dist/, go up one level
106
- const thisDir = path.dirname(new URL(import.meta.url).pathname);
107
- return path.resolve(thisDir, "..");
108
- }
109
103
  /** Stack display names */
110
104
  export const STACK_LABELS = {
111
105
  node: "Node.js / TypeScript",
@@ -1,6 +1,7 @@
1
1
  import { spawn } from "node:child_process";
2
2
  import crypto from "node:crypto";
3
3
  import path from "node:path";
4
+ import { fileURLToPath } from "node:url";
4
5
  import fs from "fs-extra";
5
6
  import { execFileAsync } from "./exec.js";
6
7
  // =============================================================================
@@ -139,7 +140,7 @@ export async function ensureImage(options) {
139
140
  else {
140
141
  imageName = getImageName(stack);
141
142
  const dockerDir = dockerfilesDir ??
142
- path.join(path.dirname(new URL(import.meta.url).pathname), "../../ci-local/docker");
143
+ path.join(path.dirname(fileURLToPath(import.meta.url)), "../../ci-local/docker");
143
144
  dockerfilePath = path.join(dockerDir, `${stack}.Dockerfile`);
144
145
  contextDir = dockerDir;
145
146
  // Write Dockerfile if it doesn't exist yet (first run)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "javi-forge",
3
- "version": "1.22.0",
3
+ "version": "1.22.2",
4
4
  "description": "Project scaffolding and AI-ready CI bootstrap",
5
5
  "type": "module",
6
6
  "bin": {