@pixelvibing/cli 0.4.0 → 0.7.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/pixel-vibing-cli.js +5 -3
- package/package.json +1 -1
package/dist/pixel-vibing-cli.js
CHANGED
|
@@ -518,10 +518,11 @@ class TooFewCredits extends Error {
|
|
|
518
518
|
this.credits = credits;
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
-
function costIn(prices, kind, quality) {
|
|
521
|
+
function costIn(prices, kind, quality, frames) {
|
|
522
522
|
const price = prices.kinds[kind];
|
|
523
523
|
if (price === void 0) return null;
|
|
524
524
|
if ("credits" in price) return price.credits;
|
|
525
|
+
if ("byFrames" in price) return price.byFrames[String(frames ?? 8)] ?? null;
|
|
525
526
|
return price.byQuality[quality ?? "high"] ?? null;
|
|
526
527
|
}
|
|
527
528
|
const id = (value) => encodeURIComponent(value);
|
|
@@ -3017,7 +3018,8 @@ function jobWords(job) {
|
|
|
3017
3018
|
}
|
|
3018
3019
|
function costOf(prices, request) {
|
|
3019
3020
|
const quality = request.body.quality;
|
|
3020
|
-
|
|
3021
|
+
const frames = request.body.frameCount;
|
|
3022
|
+
return costIn(prices, request.kind, typeof quality === "string" ? quality : void 0, typeof frames === "number" ? frames : void 0);
|
|
3021
3023
|
}
|
|
3022
3024
|
async function startGeneration(api, project, request) {
|
|
3023
3025
|
const ids = {};
|
|
@@ -3758,7 +3760,7 @@ const seal = {
|
|
|
3758
3760
|
answer(context, { sealed: true, output: result.output }, result.output);
|
|
3759
3761
|
}
|
|
3760
3762
|
};
|
|
3761
|
-
const version = "0.
|
|
3763
|
+
const version = "0.7.0";
|
|
3762
3764
|
const manifest = {
|
|
3763
3765
|
version
|
|
3764
3766
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pixelvibing/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "PixelVibing: pixel art game assets from the command line, and the Skills that teach coding assistants to make them.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://pixelvibing.com",
|