atmn 1.1.0 → 1.1.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/cli.js +24 -8
- package/dist/src/compose/models/planModels.d.ts +21 -6
- package/package.json +100 -95
package/dist/cli.js
CHANGED
|
@@ -44671,11 +44671,18 @@ var init_planItem = __esm(() => {
|
|
|
44671
44671
|
return;
|
|
44672
44672
|
return {
|
|
44673
44673
|
amount: api.price.amount,
|
|
44674
|
-
tiers: api.price.tiers
|
|
44674
|
+
tiers: api.price.tiers?.map((tier) => {
|
|
44675
|
+
const t = tier;
|
|
44676
|
+
return {
|
|
44677
|
+
to: t.to,
|
|
44678
|
+
amount: t.amount,
|
|
44679
|
+
...t.flat_amount !== undefined && { flatAmount: t.flat_amount }
|
|
44680
|
+
};
|
|
44681
|
+
}),
|
|
44675
44682
|
billingUnits: api.price.billing_units,
|
|
44676
44683
|
maxPurchase: api.price.max_purchase ?? undefined,
|
|
44677
44684
|
billingMethod: api.price.billing_method,
|
|
44678
|
-
|
|
44685
|
+
tierBehavior: api.price.tier_behavior,
|
|
44679
44686
|
interval: api.price.interval,
|
|
44680
44687
|
...api.price.interval_count !== undefined && {
|
|
44681
44688
|
intervalCount: api.price.interval_count
|
|
@@ -45005,8 +45012,8 @@ function buildPlanItemCode(planItem, _features, featureVarMap) {
|
|
|
45005
45012
|
if (priceWithBilling.maxPurchase !== undefined) {
|
|
45006
45013
|
lines.push(` maxPurchase: ${priceWithBilling.maxPurchase},`);
|
|
45007
45014
|
}
|
|
45008
|
-
if (priceWithBilling.
|
|
45009
|
-
lines.push(`
|
|
45015
|
+
if (priceWithBilling.tierBehavior !== undefined) {
|
|
45016
|
+
lines.push(` tierBehavior: '${priceWithBilling.tierBehavior}',`);
|
|
45010
45017
|
}
|
|
45011
45018
|
const priceWithInterval = planItem.price;
|
|
45012
45019
|
if (priceWithInterval.interval) {
|
|
@@ -45512,7 +45519,7 @@ var init_pull = __esm(() => {
|
|
|
45512
45519
|
});
|
|
45513
45520
|
|
|
45514
45521
|
// src/lib/version.ts
|
|
45515
|
-
var APP_VERSION = "1.1.
|
|
45522
|
+
var APP_VERSION = "1.1.1";
|
|
45516
45523
|
|
|
45517
45524
|
// ../node_modules/.pnpm/@tanstack+query-core@5.90.17/node_modules/@tanstack/query-core/build/modern/subscribable.js
|
|
45518
45525
|
var Subscribable = class {
|
|
@@ -61961,15 +61968,24 @@ function transformPlanItem(planItem) {
|
|
|
61961
61968
|
...planItem.price.amount !== undefined && {
|
|
61962
61969
|
amount: planItem.price.amount
|
|
61963
61970
|
},
|
|
61964
|
-
...planItem.price.tiers && {
|
|
61971
|
+
...planItem.price.tiers && {
|
|
61972
|
+
tiers: planItem.price.tiers.map((tier) => {
|
|
61973
|
+
const t = tier;
|
|
61974
|
+
return {
|
|
61975
|
+
to: t.to,
|
|
61976
|
+
amount: t.amount,
|
|
61977
|
+
...t.flatAmount !== undefined && { flat_amount: t.flatAmount }
|
|
61978
|
+
};
|
|
61979
|
+
})
|
|
61980
|
+
},
|
|
61965
61981
|
...intervalCount !== undefined && {
|
|
61966
61982
|
interval_count: intervalCount
|
|
61967
61983
|
},
|
|
61968
61984
|
...priceWithBilling.maxPurchase !== undefined && {
|
|
61969
61985
|
max_purchase: priceWithBilling.maxPurchase
|
|
61970
61986
|
},
|
|
61971
|
-
...priceWithBilling.
|
|
61972
|
-
|
|
61987
|
+
...priceWithBilling.tierBehavior !== undefined && {
|
|
61988
|
+
tier_behavior: priceWithBilling.tierBehavior
|
|
61973
61989
|
}
|
|
61974
61990
|
};
|
|
61975
61991
|
}
|
|
@@ -17,7 +17,7 @@ export declare const PlanItemSchema: z.ZodObject<{
|
|
|
17
17
|
to: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>;
|
|
18
18
|
amount: z.ZodNumber;
|
|
19
19
|
}, z.core.$strip>>>;
|
|
20
|
-
|
|
20
|
+
tier_behavior: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"graduated">, z.ZodLiteral<"volume">]>>;
|
|
21
21
|
interval: z.ZodUnion<readonly [z.ZodLiteral<"week">, z.ZodLiteral<"month">, z.ZodLiteral<"quarter">, z.ZodLiteral<"semi_annual">, z.ZodLiteral<"year">]>;
|
|
22
22
|
interval_count: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
23
23
|
billing_units: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
@@ -65,7 +65,7 @@ export declare const PlanSchema: z.ZodObject<{
|
|
|
65
65
|
to: z.ZodUnion<readonly [z.ZodNumber, z.ZodLiteral<"inf">]>;
|
|
66
66
|
amount: z.ZodNumber;
|
|
67
67
|
}, z.core.$strip>>>;
|
|
68
|
-
|
|
68
|
+
tier_behavior: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<"graduated">, z.ZodLiteral<"volume">]>>;
|
|
69
69
|
interval: z.ZodUnion<readonly [z.ZodLiteral<"week">, z.ZodLiteral<"month">, z.ZodLiteral<"quarter">, z.ZodLiteral<"semi_annual">, z.ZodLiteral<"year">]>;
|
|
70
70
|
interval_count: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
71
71
|
billing_units: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
@@ -149,17 +149,32 @@ type PriceWithAmount = PriceBaseFields & {
|
|
|
149
149
|
/** Cannot have tiers when using flat amount */
|
|
150
150
|
tiers?: never;
|
|
151
151
|
};
|
|
152
|
-
type
|
|
152
|
+
type PriceWithGraduatedTiers = PriceBaseFields & {
|
|
153
153
|
/** Cannot have flat amount when using tiers */
|
|
154
154
|
amount?: never;
|
|
155
|
-
/**
|
|
155
|
+
/** Graduated tiered pricing: each tier's amount applies only to units within that tier */
|
|
156
156
|
tiers: Array<{
|
|
157
157
|
to: number | "inf";
|
|
158
158
|
amount: number;
|
|
159
159
|
}>;
|
|
160
|
-
/**
|
|
161
|
-
|
|
160
|
+
/** Graduated: each tier's rate applies only to usage within that tier */
|
|
161
|
+
tierBehavior: "graduated";
|
|
162
162
|
};
|
|
163
|
+
type PriceWithVolumeTiers = Omit<PriceBaseFields, "billingMethod"> & {
|
|
164
|
+
/** Volume pricing does not support usage_based billing — use 'prepaid' */
|
|
165
|
+
billingMethod: Exclude<BillingMethod, "usage_based">;
|
|
166
|
+
/** Cannot have flat amount when using tiers */
|
|
167
|
+
amount?: never;
|
|
168
|
+
/** Volume tiered pricing: the tier the total usage falls into applies to all units */
|
|
169
|
+
tiers: Array<{
|
|
170
|
+
to: number | "inf";
|
|
171
|
+
amount: number;
|
|
172
|
+
flatAmount?: number;
|
|
173
|
+
}>;
|
|
174
|
+
/** Volume: the rate of the tier the total usage falls into applies to all units */
|
|
175
|
+
tierBehavior: "volume";
|
|
176
|
+
};
|
|
177
|
+
type PriceWithTiers = PriceWithGraduatedTiers | PriceWithVolumeTiers;
|
|
163
178
|
type PriceAmountOrTiers = PriceWithAmount | PriceWithTiers;
|
|
164
179
|
type PriceWithoutInterval = PriceAmountOrTiers & {
|
|
165
180
|
/** Cannot have interval when using top-level reset */
|
package/package.json
CHANGED
|
@@ -1,97 +1,102 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
2
|
+
"name": "atmn",
|
|
3
|
+
"version": "1.1.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"bin": {
|
|
6
|
+
"atmn": "dist/cli.js"
|
|
7
|
+
},
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/useautumn/typescript"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://docs.useautumn.com/api-reference/cli/getting-started",
|
|
13
|
+
"main": "dist/compose/index.js",
|
|
14
|
+
"types": "dist/src/compose/index.d.ts",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"engines": {
|
|
17
|
+
"node": ">=16"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "bun run bun.config.ts",
|
|
21
|
+
"dev": "nodemon -e ts,tsx --watch src --ignore dist --exec \"bun run bun.config.ts\"",
|
|
22
|
+
"dev:bun": "bun run dev.ts",
|
|
23
|
+
"test": "bun test",
|
|
24
|
+
"test:watch": "bun test --watch",
|
|
25
|
+
"test2": "prettier --check . && xo && ava",
|
|
26
|
+
"test-cli": "node --trace-deprecation -- ./dist/cli.js"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"package.json",
|
|
31
|
+
"README.md"
|
|
32
|
+
],
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@inkjs/ui": "^2.0.0",
|
|
35
|
+
"@inquirer/prompts": "^7.6.0",
|
|
36
|
+
"@mishieck/ink-titled-box": "^0.3.0",
|
|
37
|
+
"@tanstack/react-query": "^5.90.17",
|
|
38
|
+
"@types/prettier": "^3.0.0",
|
|
39
|
+
"arctic": "^3.7.0",
|
|
40
|
+
"axios": "^1.10.0",
|
|
41
|
+
"cfonts": "^3.3.1",
|
|
42
|
+
"chalk": "^5.2.0",
|
|
43
|
+
"clipboardy": "^5.0.2",
|
|
44
|
+
"commander": "^14.0.0",
|
|
45
|
+
"dotenv": "^17.2.0",
|
|
46
|
+
"ervy": "^1.0.7",
|
|
47
|
+
"ink": "^6.6.0",
|
|
48
|
+
"ink-big-text": "^2.0.0",
|
|
49
|
+
"ink-chart": "^0.1.1",
|
|
50
|
+
"ink-confirm-input": "^2.0.0",
|
|
51
|
+
"ink-scroll-list": "^0.4.1",
|
|
52
|
+
"ink-scroll-view": "^0.3.5",
|
|
53
|
+
"ink-select-input": "^6.2.0",
|
|
54
|
+
"ink-spinner": "^5.0.0",
|
|
55
|
+
"ink-table": "^3.1.0",
|
|
56
|
+
"ink-text-input": "^6.0.0",
|
|
57
|
+
"inquirer": "^12.7.0",
|
|
58
|
+
"jiti": "^2.4.2",
|
|
59
|
+
"open": "^10.1.2",
|
|
60
|
+
"prettier": "^3.6.2",
|
|
61
|
+
"react": "^19.2.3",
|
|
62
|
+
"yocto-spinner": "^1.0.0",
|
|
63
|
+
"zod": "^4.0.0",
|
|
64
|
+
"conf": "^13.0.1"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@sindresorhus/tsconfig": "^3.0.1",
|
|
68
|
+
"@types/bun": "^1.2.21",
|
|
69
|
+
"@types/node": "^24.0.10",
|
|
70
|
+
"@types/react": "^19.0.0",
|
|
71
|
+
"@vdemedes/prettier-config": "^2.0.1",
|
|
72
|
+
"ava": "^5.2.0",
|
|
73
|
+
"cli-testing-library": "^3.0.1",
|
|
74
|
+
"eslint-config-xo-react": "^0.27.0",
|
|
75
|
+
"eslint-plugin-react": "^7.32.2",
|
|
76
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
77
|
+
"ink-testing-library": "^3.0.0",
|
|
78
|
+
"nodemon": "^3.1.11",
|
|
79
|
+
"react-devtools-core": "^6.1.2",
|
|
80
|
+
"ts-node": "^10.9.1",
|
|
81
|
+
"tsup": "^8.5.0",
|
|
82
|
+
"typescript": "^5.0.3",
|
|
83
|
+
"xo": "^0.53.1"
|
|
84
|
+
},
|
|
85
|
+
"ava": {
|
|
86
|
+
"extensions": {
|
|
87
|
+
"ts": "module",
|
|
88
|
+
"tsx": "module"
|
|
89
|
+
},
|
|
90
|
+
"nodeArguments": [
|
|
91
|
+
"--loader=ts-node/esm"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"xo": {
|
|
95
|
+
"extends": "xo-react",
|
|
96
|
+
"prettier": true,
|
|
97
|
+
"rules": {
|
|
98
|
+
"react/prop-types": "off"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"prettier": "@vdemedes/prettier-config"
|
|
97
102
|
}
|