owosk 0.3.0 → 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/index.js +8 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -283,6 +283,7 @@ function normalizePlan(plan, creditSystemSlugs) {
|
|
|
283
283
|
price: plan.price ?? 0,
|
|
284
284
|
currency: plan.currency ?? null,
|
|
285
285
|
interval: plan.interval ?? null,
|
|
286
|
+
billingType: plan.billingType ?? "recurring",
|
|
286
287
|
planGroup: plan.planGroup ?? null,
|
|
287
288
|
trialDays: plan.trialDays ?? 0,
|
|
288
289
|
isAddon: plan.isAddon ?? false,
|
|
@@ -346,6 +347,7 @@ function diffPlans(localPlans, remotePlans, localCreditSystems = [], remoteCredi
|
|
|
346
347
|
"price",
|
|
347
348
|
"currency",
|
|
348
349
|
"interval",
|
|
350
|
+
"billingType",
|
|
349
351
|
"planGroup",
|
|
350
352
|
"trialDays",
|
|
351
353
|
"isAddon",
|
|
@@ -998,6 +1000,9 @@ function generateConfig(plans, creditSystems = [], creditPacks = [], defaultProv
|
|
|
998
1000
|
configLines.push(`price: ${plan.price}`);
|
|
999
1001
|
configLines.push(`currency: ${JSON.stringify(plan.currency)}`);
|
|
1000
1002
|
configLines.push(`interval: ${JSON.stringify(plan.interval)}`);
|
|
1003
|
+
if (plan.billingType === "one_time") {
|
|
1004
|
+
configLines.push(`billingType: "one_time"`);
|
|
1005
|
+
}
|
|
1001
1006
|
if (plan.planGroup)
|
|
1002
1007
|
configLines.push(`planGroup: ${JSON.stringify(plan.planGroup)}`);
|
|
1003
1008
|
if (plan.trialDays && plan.trialDays > 0)
|
|
@@ -1179,7 +1184,9 @@ async function buildRemoteCatalogSnapshot(params) {
|
|
|
1179
1184
|
});
|
|
1180
1185
|
const creditSystems = await fetchCreditSystems(params.apiKey, params.apiUrl);
|
|
1181
1186
|
const creditPacks = await fetchCreditPacks(params.apiKey, params.apiUrl);
|
|
1182
|
-
const providers = new Set(
|
|
1187
|
+
const providers = new Set(
|
|
1188
|
+
plans.map((plan) => plan.provider).filter(Boolean)
|
|
1189
|
+
);
|
|
1183
1190
|
const defaultProvider = providers.size === 1 ? Array.from(providers)[0] : void 0;
|
|
1184
1191
|
return {
|
|
1185
1192
|
plans,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "owosk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "CLI for Owostack - sync catalog, manage billing infrastructure",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"commander": "^14.0.3",
|
|
25
25
|
"jiti": "^2.6.1",
|
|
26
26
|
"picocolors": "^1.1.1",
|
|
27
|
-
"@owostack/types": "0.3.
|
|
28
|
-
"owostack": "0.3.
|
|
27
|
+
"@owostack/types": "0.3.2",
|
|
28
|
+
"owostack": "0.3.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^22.19.10",
|