frogoe 0.3.1 → 0.3.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/dist/cli.js +14 -8
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -119,13 +119,18 @@ node_modules/
|
|
|
119
119
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
|
120
120
|
import path from "path";
|
|
121
121
|
import { fileURLToPath } from "url";
|
|
122
|
-
var here, CONTRACT_SOURCE, scaffold, registryRoot;
|
|
122
|
+
var here, contractSourceFor, CONTRACT_SOURCE, scaffold, registryRootFor, registryRoot;
|
|
123
123
|
var init_init = __esm({
|
|
124
124
|
"src/init.ts"() {
|
|
125
125
|
"use strict";
|
|
126
126
|
init_templates();
|
|
127
127
|
here = path.dirname(fileURLToPath(import.meta.url));
|
|
128
|
-
|
|
128
|
+
contractSourceFor = (base) => {
|
|
129
|
+
const repo = path.join(base, "../../contract/src/contract.js");
|
|
130
|
+
if (existsSync(repo)) return repo;
|
|
131
|
+
return path.join(base, "contract/contract.js");
|
|
132
|
+
};
|
|
133
|
+
CONTRACT_SOURCE = contractSourceFor(here);
|
|
129
134
|
scaffold = (name, options) => {
|
|
130
135
|
const root = options?.dir ?? process.cwd();
|
|
131
136
|
const target = path.resolve(root, name);
|
|
@@ -161,12 +166,12 @@ var init_init = __esm({
|
|
|
161
166
|
}
|
|
162
167
|
return { dir: target, files: files.map(([rel]) => rel) };
|
|
163
168
|
};
|
|
164
|
-
|
|
169
|
+
registryRootFor = (base) => {
|
|
165
170
|
const candidates = [
|
|
166
|
-
path.resolve(
|
|
171
|
+
path.resolve(base, "../../../registry"),
|
|
167
172
|
// repo source mode
|
|
168
|
-
path.resolve(
|
|
169
|
-
// dist mode
|
|
173
|
+
path.resolve(base, "registry")
|
|
174
|
+
// dist mode: beside the bundle
|
|
170
175
|
];
|
|
171
176
|
for (const candidate of candidates) {
|
|
172
177
|
if (existsSync(path.join(candidate, "registry.json"))) {
|
|
@@ -174,9 +179,10 @@ var init_init = __esm({
|
|
|
174
179
|
}
|
|
175
180
|
}
|
|
176
181
|
throw new Error(
|
|
177
|
-
"frogoe: registry not found (expected
|
|
182
|
+
"frogoe: registry not found (expected the repo registry or the packaged copy beside the CLI). Run from the repo or reinstall frogoe."
|
|
178
183
|
);
|
|
179
184
|
};
|
|
185
|
+
registryRoot = () => registryRootFor(here);
|
|
180
186
|
}
|
|
181
187
|
});
|
|
182
188
|
|
|
@@ -3635,7 +3641,7 @@ import { defineCommand as defineCommand9, runMain } from "citty";
|
|
|
3635
3641
|
// package.json
|
|
3636
3642
|
var package_default = {
|
|
3637
3643
|
name: "frogoe",
|
|
3638
|
-
version: "0.3.
|
|
3644
|
+
version: "0.3.2",
|
|
3639
3645
|
description: "froge CLI \u2014 the agent's hands: init, add, run, check, bundle",
|
|
3640
3646
|
homepage: "https://github.com/frogoe/engine#readme",
|
|
3641
3647
|
bugs: "https://github.com/frogoe/engine/issues",
|
package/package.json
CHANGED