@ambasada/cli 0.3.0 → 0.3.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/dist/ambasada.mjs +4 -4
- package/package.json +1 -1
package/dist/ambasada.mjs
CHANGED
|
@@ -2252,7 +2252,7 @@ function findRoot(from = process.cwd()) {
|
|
|
2252
2252
|
}
|
|
2253
2253
|
}
|
|
2254
2254
|
async function importTs(file) {
|
|
2255
|
-
const url = pathToFileURL(file).href
|
|
2255
|
+
const url = `${pathToFileURL(file).href}?t=${Date.now()}`;
|
|
2256
2256
|
try {
|
|
2257
2257
|
return (await import(url)).default;
|
|
2258
2258
|
} catch (error) {
|
|
@@ -2266,7 +2266,7 @@ async function importTs(file) {
|
|
|
2266
2266
|
const tmp = file.replace(/\.ts$/, `.village-${process.pid}.mjs`);
|
|
2267
2267
|
await writeFile2(tmp, strip(await readFile2(file, "utf8")));
|
|
2268
2268
|
try {
|
|
2269
|
-
return (await import(pathToFileURL(tmp).href)).default;
|
|
2269
|
+
return (await import(`${pathToFileURL(tmp).href}?t=${Date.now()}`)).default;
|
|
2270
2270
|
} finally {
|
|
2271
2271
|
await rm(tmp, { force: true });
|
|
2272
2272
|
}
|
|
@@ -2313,7 +2313,7 @@ async function setProductUrl(root, url) {
|
|
|
2313
2313
|
const file = join2(root, CONFIG_FILE);
|
|
2314
2314
|
const source = await readFile2(file, "utf8");
|
|
2315
2315
|
const next = source.replace(/(product\s*:\s*\{\s*url\s*:\s*)(["'`])[^"'`]*\2/, `$1"${url}"`);
|
|
2316
|
-
if (next === source) return
|
|
2316
|
+
if (next === source) return source.includes(`url: "${url}"`) || source.includes(`url: '${url}'`);
|
|
2317
2317
|
await writeFile2(file, next);
|
|
2318
2318
|
return true;
|
|
2319
2319
|
}
|
|
@@ -3117,7 +3117,7 @@ ${output.slice(-3e3)}` : ""}`));
|
|
|
3117
3117
|
var kb = (n) => n > 1024 * 1024 ? `${(n / 1024 / 1024).toFixed(1)} MB` : `${Math.ceil(n / 1024)} KB`;
|
|
3118
3118
|
|
|
3119
3119
|
// src/main.ts
|
|
3120
|
-
var VERSION = true ? "0.3.
|
|
3120
|
+
var VERSION = true ? "0.3.1" : "0.1.0-dev";
|
|
3121
3121
|
var HELP = `${c.bold("ambasada")} ${VERSION}: build a company for the Hack A Ton village
|
|
3122
3122
|
|
|
3123
3123
|
ambasada init [dir] [--template next|spa|worker] [--name "Name"] [--id slug]
|
package/package.json
CHANGED