@raisenow/tamaro-cli 3.1.0-dev.0 → 3.1.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/cli.js +9 -14
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -564,21 +564,16 @@ const TAMARO_CORE_REGISTRY_URL = "https://registry.npmjs.org/@raisenow/tamaro-co
|
|
|
564
564
|
* Check that the configured version exists for "@raisenow/tamaro-core" on npm:
|
|
565
565
|
* as a dist-tag (e.g. "latest", "lts_2026"), an exact version, or a partial
|
|
566
566
|
* version ("2", "2.15") matching at least one published version.
|
|
567
|
-
*
|
|
568
|
-
* Returns undefined when the registry is unreachable, so offline builds are
|
|
569
|
-
* not blocked by this check.
|
|
570
567
|
*/
|
|
571
568
|
const coreVersionExists = async (version) => {
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
return;
|
|
581
|
-
}
|
|
569
|
+
const metadata = await ky.get(TAMARO_CORE_REGISTRY_URL, {
|
|
570
|
+
headers: { accept: "application/vnd.npm.install-v1+json" },
|
|
571
|
+
retry: 0,
|
|
572
|
+
timeout: DEFAULT_HTTP_TIMEOUT
|
|
573
|
+
}).json();
|
|
574
|
+
const distTags = Object.keys(metadata["dist-tags"] ?? {});
|
|
575
|
+
const versions = Object.keys(metadata.versions ?? {});
|
|
576
|
+
return distTags.includes(version) || versions.includes(version) || versions.some((existing) => existing.startsWith(`${version}.`));
|
|
582
577
|
};
|
|
583
578
|
/**
|
|
584
579
|
* Locate the line of a `KEY=` assignment in the .env source, so the error can
|
|
@@ -1329,7 +1324,7 @@ const promptBucketTamaroEmailConfig = async () => {
|
|
|
1329
1324
|
//#endregion
|
|
1330
1325
|
//#region package.json
|
|
1331
1326
|
var name = "@raisenow/tamaro-cli";
|
|
1332
|
-
var version = "3.1.0
|
|
1327
|
+
var version = "3.1.0";
|
|
1333
1328
|
//#endregion
|
|
1334
1329
|
//#region src/cli.ts
|
|
1335
1330
|
const cli = createCommand().name(name).description("CLI for Tamaro Customer Configurations development").version(version, "-v, --version");
|