@penvhq/launcher 0.12.0 → 0.14.0
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/bin.cjs +21 -9
- package/dist/bin.cjs.map +1 -1
- package/dist/bin.js +1 -1
- package/dist/{chunk-A5LJQPYS.js → chunk-WA5LM767.js} +26 -14
- package/dist/chunk-WA5LM767.js.map +1 -0
- package/dist/index.cjs +21 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-A5LJQPYS.js.map +0 -1
package/dist/bin.cjs
CHANGED
|
@@ -1254,27 +1254,39 @@ function chooseEnvironments(answer, offered) {
|
|
|
1254
1254
|
}
|
|
1255
1255
|
return { chosen, unknown };
|
|
1256
1256
|
}
|
|
1257
|
+
function quoted(environments) {
|
|
1258
|
+
return environments.map((environment) => `\`${environment}\``).join(", ");
|
|
1259
|
+
}
|
|
1260
|
+
function configAdvice(name, pointing, unpointed) {
|
|
1261
|
+
const add2 = `Add \`type: ${JSON.stringify(name)}\``;
|
|
1262
|
+
if (pointing.length === 0) {
|
|
1263
|
+
return `${add2} to an environment in penv.config.ts.`;
|
|
1264
|
+
}
|
|
1265
|
+
return `${quoted(pointing)} already ${pointing.length === 1 ? "points" : "point"} at ${name}. ${add2} to ${quoted(unpointed)} in penv.config.ts if ${unpointed.length === 1 ? "it" : "they"} should too.`;
|
|
1266
|
+
}
|
|
1257
1267
|
async function offerConfigEdit(options, name, ask) {
|
|
1258
1268
|
const { io: io2, root } = options;
|
|
1259
1269
|
const configFile = (0, import_core6.findConfigFile)(root);
|
|
1260
|
-
const
|
|
1270
|
+
const blind = `Add \`type: ${JSON.stringify(name)}\` to an environment in penv.config.ts.`;
|
|
1261
1271
|
if (configFile === void 0) {
|
|
1262
|
-
io2.out(
|
|
1272
|
+
io2.out(blind);
|
|
1263
1273
|
return;
|
|
1264
1274
|
}
|
|
1265
1275
|
const shown = (0, import_node_path5.relative)(root, configFile).split(import_node_path5.sep).join("/");
|
|
1266
1276
|
let current = (0, import_node_fs5.readFileSync)(configFile, "utf8");
|
|
1267
1277
|
const entries = readProviderEntries(current);
|
|
1268
1278
|
if (entries === void 0 || entries.length === 0) {
|
|
1269
|
-
io2.out(
|
|
1279
|
+
io2.out(blind);
|
|
1270
1280
|
return;
|
|
1271
1281
|
}
|
|
1282
|
+
const pointing = entries.filter((entry) => entry.type === name).map((entry) => entry.environment);
|
|
1272
1283
|
const offered = entries.filter((entry) => entry.type !== name).map((entry) => entry.environment);
|
|
1273
1284
|
if (offered.length === 0) {
|
|
1274
1285
|
return;
|
|
1275
1286
|
}
|
|
1287
|
+
const advice = configAdvice(name, pointing, offered);
|
|
1276
1288
|
if (!ask) {
|
|
1277
|
-
io2.out(
|
|
1289
|
+
io2.out(advice);
|
|
1278
1290
|
return;
|
|
1279
1291
|
}
|
|
1280
1292
|
const { chosen, unknown } = chooseEnvironments(
|
|
@@ -1283,7 +1295,7 @@ async function offerConfigEdit(options, name, ask) {
|
|
|
1283
1295
|
);
|
|
1284
1296
|
if (unknown.length > 0) {
|
|
1285
1297
|
io2.out(`${shown} declares no ${unknown.join(", ")}, so nothing was repointed.`);
|
|
1286
|
-
io2.out(
|
|
1298
|
+
io2.out(advice);
|
|
1287
1299
|
return;
|
|
1288
1300
|
}
|
|
1289
1301
|
for (const environment of chosen) {
|
|
@@ -1507,8 +1519,8 @@ var DEV_PIN_INTEGRITY = "sha512-development-build-not-a-published-release";
|
|
|
1507
1519
|
var DEV_PIN_VERSION = "0.0.0-dev";
|
|
1508
1520
|
var BUNDLED_ENGINE_PIN = {
|
|
1509
1521
|
package: import_core8.ENGINE_PACKAGE,
|
|
1510
|
-
version: "0.
|
|
1511
|
-
integrity: "sha512-
|
|
1522
|
+
version: "0.14.0",
|
|
1523
|
+
integrity: "sha512-2EJHq5DSuqyfscjhFZmaszT4dZdYfboJJzyFwTZkJPWdcVZmXODhsqF2xtG+9U/MYojo6rmQzVlHXhVQRnooXg=="
|
|
1512
1524
|
};
|
|
1513
1525
|
function assertReleasePin(pin) {
|
|
1514
1526
|
if (pin.integrity === DEV_PIN_INTEGRITY || pin.version === DEV_PIN_VERSION) {
|
|
@@ -1638,8 +1650,8 @@ async function upgrade(options) {
|
|
|
1638
1650
|
} catch {
|
|
1639
1651
|
throw new UpgradeInstallFailedError(plan.manager, release.version);
|
|
1640
1652
|
}
|
|
1641
|
-
for (const
|
|
1642
|
-
io2.out(`\u2713 ${
|
|
1653
|
+
for (const landed of (0, import_install2.installedByManifest)(plan)) {
|
|
1654
|
+
io2.out(`\u2713 ${landed.manifest} depends on ${landed.packages}`);
|
|
1643
1655
|
}
|
|
1644
1656
|
}
|
|
1645
1657
|
(0, import_node_fs7.writeFileSync)(manifestFile, manifestText);
|