@eide/foir-cli 0.1.37 → 0.1.38

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 CHANGED
@@ -853,361 +853,9 @@ async function loadPullConfig(flags) {
853
853
  }
854
854
 
855
855
  // src/graphql/generated.ts
856
- var GetCustomerProfileSchemaDocument = {
857
- kind: "Document",
858
- definitions: [
859
- {
860
- kind: "OperationDefinition",
861
- operation: "query",
862
- name: { kind: "Name", value: "GetCustomerProfileSchema" },
863
- selectionSet: {
864
- kind: "SelectionSet",
865
- selections: [
866
- {
867
- kind: "Field",
868
- name: { kind: "Name", value: "customerProfileSchema" },
869
- selectionSet: {
870
- kind: "SelectionSet",
871
- selections: [
872
- { kind: "Field", name: { kind: "Name", value: "id" } },
873
- {
874
- kind: "Field",
875
- name: { kind: "Name", value: "fields" },
876
- selectionSet: {
877
- kind: "SelectionSet",
878
- selections: [
879
- { kind: "Field", name: { kind: "Name", value: "key" } },
880
- { kind: "Field", name: { kind: "Name", value: "type" } },
881
- { kind: "Field", name: { kind: "Name", value: "label" } },
882
- {
883
- kind: "Field",
884
- name: { kind: "Name", value: "required" }
885
- },
886
- {
887
- kind: "Field",
888
- name: { kind: "Name", value: "helpText" }
889
- },
890
- {
891
- kind: "Field",
892
- name: { kind: "Name", value: "defaultValue" }
893
- },
894
- {
895
- kind: "Field",
896
- name: { kind: "Name", value: "config" }
897
- },
898
- {
899
- kind: "Field",
900
- name: { kind: "Name", value: "validation" },
901
- selectionSet: {
902
- kind: "SelectionSet",
903
- selections: [
904
- {
905
- kind: "Field",
906
- name: { kind: "Name", value: "rule" }
907
- },
908
- {
909
- kind: "Field",
910
- name: { kind: "Name", value: "value" }
911
- },
912
- {
913
- kind: "Field",
914
- name: { kind: "Name", value: "message" }
915
- }
916
- ]
917
- }
918
- }
919
- ]
920
- }
921
- },
922
- {
923
- kind: "Field",
924
- name: { kind: "Name", value: "publicFields" }
925
- },
926
- { kind: "Field", name: { kind: "Name", value: "version" } },
927
- { kind: "Field", name: { kind: "Name", value: "createdAt" } },
928
- { kind: "Field", name: { kind: "Name", value: "updatedAt" } }
929
- ]
930
- }
931
- }
932
- ]
933
- }
934
- }
935
- ]
936
- };
937
- var ModelsForCodegenDocument = {
938
- kind: "Document",
939
- definitions: [
940
- {
941
- kind: "OperationDefinition",
942
- operation: "query",
943
- name: { kind: "Name", value: "ModelsForCodegen" },
944
- variableDefinitions: [
945
- {
946
- kind: "VariableDefinition",
947
- variable: {
948
- kind: "Variable",
949
- name: { kind: "Name", value: "search" }
950
- },
951
- type: { kind: "NamedType", name: { kind: "Name", value: "String" } }
952
- },
953
- {
954
- kind: "VariableDefinition",
955
- variable: {
956
- kind: "Variable",
957
- name: { kind: "Name", value: "limit" }
958
- },
959
- type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }
960
- },
961
- {
962
- kind: "VariableDefinition",
963
- variable: {
964
- kind: "Variable",
965
- name: { kind: "Name", value: "offset" }
966
- },
967
- type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }
968
- }
969
- ],
970
- selectionSet: {
971
- kind: "SelectionSet",
972
- selections: [
973
- {
974
- kind: "Field",
975
- name: { kind: "Name", value: "models" },
976
- arguments: [
977
- {
978
- kind: "Argument",
979
- name: { kind: "Name", value: "search" },
980
- value: {
981
- kind: "Variable",
982
- name: { kind: "Name", value: "search" }
983
- }
984
- },
985
- {
986
- kind: "Argument",
987
- name: { kind: "Name", value: "limit" },
988
- value: {
989
- kind: "Variable",
990
- name: { kind: "Name", value: "limit" }
991
- }
992
- },
993
- {
994
- kind: "Argument",
995
- name: { kind: "Name", value: "offset" },
996
- value: {
997
- kind: "Variable",
998
- name: { kind: "Name", value: "offset" }
999
- }
1000
- }
1001
- ],
1002
- selectionSet: {
1003
- kind: "SelectionSet",
1004
- selections: [
1005
- {
1006
- kind: "Field",
1007
- name: { kind: "Name", value: "items" },
1008
- selectionSet: {
1009
- kind: "SelectionSet",
1010
- selections: [
1011
- { kind: "Field", name: { kind: "Name", value: "id" } },
1012
- { kind: "Field", name: { kind: "Name", value: "key" } },
1013
- { kind: "Field", name: { kind: "Name", value: "name" } },
1014
- {
1015
- kind: "Field",
1016
- name: { kind: "Name", value: "pluralName" }
1017
- },
1018
- {
1019
- kind: "Field",
1020
- name: { kind: "Name", value: "description" }
1021
- },
1022
- {
1023
- kind: "Field",
1024
- name: { kind: "Name", value: "category" }
1025
- },
1026
- {
1027
- kind: "Field",
1028
- name: { kind: "Name", value: "fields" }
1029
- },
1030
- {
1031
- kind: "Field",
1032
- name: { kind: "Name", value: "config" }
1033
- },
1034
- { kind: "Field", name: { kind: "Name", value: "hooks" } },
1035
- {
1036
- kind: "Field",
1037
- name: { kind: "Name", value: "createdAt" }
1038
- },
1039
- {
1040
- kind: "Field",
1041
- name: { kind: "Name", value: "updatedAt" }
1042
- }
1043
- ]
1044
- }
1045
- },
1046
- { kind: "Field", name: { kind: "Name", value: "total" } }
1047
- ]
1048
- }
1049
- }
1050
- ]
1051
- }
1052
- }
1053
- ]
1054
- };
1055
- var GlobalSearchDocument = {
1056
- kind: "Document",
1057
- definitions: [
1058
- {
1059
- kind: "OperationDefinition",
1060
- operation: "query",
1061
- name: { kind: "Name", value: "GlobalSearch" },
1062
- variableDefinitions: [
1063
- {
1064
- kind: "VariableDefinition",
1065
- variable: {
1066
- kind: "Variable",
1067
- name: { kind: "Name", value: "query" }
1068
- },
1069
- type: {
1070
- kind: "NonNullType",
1071
- type: {
1072
- kind: "NamedType",
1073
- name: { kind: "Name", value: "String" }
1074
- }
1075
- }
1076
- },
1077
- {
1078
- kind: "VariableDefinition",
1079
- variable: {
1080
- kind: "Variable",
1081
- name: { kind: "Name", value: "limit" }
1082
- },
1083
- type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }
1084
- },
1085
- {
1086
- kind: "VariableDefinition",
1087
- variable: {
1088
- kind: "Variable",
1089
- name: { kind: "Name", value: "modelKeys" }
1090
- },
1091
- type: {
1092
- kind: "ListType",
1093
- type: {
1094
- kind: "NonNullType",
1095
- type: {
1096
- kind: "NamedType",
1097
- name: { kind: "Name", value: "String" }
1098
- }
1099
- }
1100
- }
1101
- },
1102
- {
1103
- kind: "VariableDefinition",
1104
- variable: {
1105
- kind: "Variable",
1106
- name: { kind: "Name", value: "includeMedia" }
1107
- },
1108
- type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } }
1109
- }
1110
- ],
1111
- selectionSet: {
1112
- kind: "SelectionSet",
1113
- selections: [
1114
- {
1115
- kind: "Field",
1116
- name: { kind: "Name", value: "globalSearch" },
1117
- arguments: [
1118
- {
1119
- kind: "Argument",
1120
- name: { kind: "Name", value: "query" },
1121
- value: {
1122
- kind: "Variable",
1123
- name: { kind: "Name", value: "query" }
1124
- }
1125
- },
1126
- {
1127
- kind: "Argument",
1128
- name: { kind: "Name", value: "limit" },
1129
- value: {
1130
- kind: "Variable",
1131
- name: { kind: "Name", value: "limit" }
1132
- }
1133
- },
1134
- {
1135
- kind: "Argument",
1136
- name: { kind: "Name", value: "modelKeys" },
1137
- value: {
1138
- kind: "Variable",
1139
- name: { kind: "Name", value: "modelKeys" }
1140
- }
1141
- },
1142
- {
1143
- kind: "Argument",
1144
- name: { kind: "Name", value: "includeMedia" },
1145
- value: {
1146
- kind: "Variable",
1147
- name: { kind: "Name", value: "includeMedia" }
1148
- }
1149
- }
1150
- ],
1151
- selectionSet: {
1152
- kind: "SelectionSet",
1153
- selections: [
1154
- {
1155
- kind: "Field",
1156
- name: { kind: "Name", value: "records" },
1157
- selectionSet: {
1158
- kind: "SelectionSet",
1159
- selections: [
1160
- { kind: "Field", name: { kind: "Name", value: "id" } },
1161
- {
1162
- kind: "Field",
1163
- name: { kind: "Name", value: "modelKey" }
1164
- },
1165
- { kind: "Field", name: { kind: "Name", value: "title" } },
1166
- {
1167
- kind: "Field",
1168
- name: { kind: "Name", value: "naturalKey" }
1169
- },
1170
- {
1171
- kind: "Field",
1172
- name: { kind: "Name", value: "subtitle" }
1173
- },
1174
- {
1175
- kind: "Field",
1176
- name: { kind: "Name", value: "updatedAt" }
1177
- }
1178
- ]
1179
- }
1180
- },
1181
- {
1182
- kind: "Field",
1183
- name: { kind: "Name", value: "media" },
1184
- selectionSet: {
1185
- kind: "SelectionSet",
1186
- selections: [
1187
- { kind: "Field", name: { kind: "Name", value: "id" } },
1188
- {
1189
- kind: "Field",
1190
- name: { kind: "Name", value: "fileName" }
1191
- },
1192
- {
1193
- kind: "Field",
1194
- name: { kind: "Name", value: "altText" }
1195
- },
1196
- {
1197
- kind: "Field",
1198
- name: { kind: "Name", value: "fileUrl" }
1199
- }
1200
- ]
1201
- }
1202
- }
1203
- ]
1204
- }
1205
- }
1206
- ]
1207
- }
1208
- }
1209
- ]
1210
- };
856
+ var GetCustomerProfileSchemaDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GetCustomerProfileSchema" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "customerProfileSchema" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "fields" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "type" } }, { "kind": "Field", "name": { "kind": "Name", "value": "label" } }, { "kind": "Field", "name": { "kind": "Name", "value": "required" } }, { "kind": "Field", "name": { "kind": "Name", "value": "helpText" } }, { "kind": "Field", "name": { "kind": "Name", "value": "defaultValue" } }, { "kind": "Field", "name": { "kind": "Name", "value": "config" } }, { "kind": "Field", "name": { "kind": "Name", "value": "validation" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "rule" } }, { "kind": "Field", "name": { "kind": "Name", "value": "value" } }, { "kind": "Field", "name": { "kind": "Name", "value": "message" } }] } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "publicFields" } }, { "kind": "Field", "name": { "kind": "Name", "value": "version" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }] } }] } }] };
857
+ var ModelsForCodegenDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ModelsForCodegen" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "search" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "offset" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "models" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "search" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "search" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "limit" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "offset" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "offset" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "items" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "key" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "pluralName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "description" } }, { "kind": "Field", "name": { "kind": "Name", "value": "category" } }, { "kind": "Field", "name": { "kind": "Name", "value": "fields" } }, { "kind": "Field", "name": { "kind": "Name", "value": "config" } }, { "kind": "Field", "name": { "kind": "Name", "value": "hooks" } }, { "kind": "Field", "name": { "kind": "Name", "value": "createdAt" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "total" } }] } }] } }] };
858
+ var GlobalSearchDocument = { "kind": "Document", "definitions": [{ "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "GlobalSearch" }, "variableDefinitions": [{ "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "query" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Int" } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "modelKeys" } }, "type": { "kind": "ListType", "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } } }, { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "includeMedia" } }, "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "Boolean" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "globalSearch" }, "arguments": [{ "kind": "Argument", "name": { "kind": "Name", "value": "query" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "query" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "limit" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "limit" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "modelKeys" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "modelKeys" } } }, { "kind": "Argument", "name": { "kind": "Name", "value": "includeMedia" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "includeMedia" } } }], "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "records" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "modelKey" } }, { "kind": "Field", "name": { "kind": "Name", "value": "title" } }, { "kind": "Field", "name": { "kind": "Name", "value": "naturalKey" } }, { "kind": "Field", "name": { "kind": "Name", "value": "subtitle" } }, { "kind": "Field", "name": { "kind": "Name", "value": "updatedAt" } }] } }, { "kind": "Field", "name": { "kind": "Name", "value": "media" }, "selectionSet": { "kind": "SelectionSet", "selections": [{ "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "fileName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "altText" } }, { "kind": "Field", "name": { "kind": "Name", "value": "fileUrl" } }] } }] } }] } }] };
1211
859
 
1212
860
  // src/codegen/fetch-models.ts
1213
861
  function normalizeConfig(raw) {
@@ -202,6 +202,7 @@ type Query {
202
202
  billingCustomPackage(id: ID!): BillingCustomPackage
203
203
  billingSubscription: BillingSubscription
204
204
  billingUsageSummary(projectId: ID): BillingUsageSummary!
205
+ billingUsageAlerts: [UsageAlert!]!
205
206
  tenantBillingStatus(status: String, limit: Int, offset: Int): TenantBillingStatusResult!
206
207
  segments(isActive: Boolean, limit: Int, offset: Int): [Segment!]!
207
208
  segment(id: ID!): Segment
@@ -852,8 +853,13 @@ type Mutation {
852
853
  assignBillingCustomPackage(tenantId: ID!, customPackageId: ID!): BillingSubscription!
853
854
  cancelBillingSubscription(immediate: Boolean): BillingSubscription!
854
855
  reactivateBillingSubscription: BillingSubscription!
855
- createPaymentMethodSetupIntent: SetupIntentResult!
856
+
857
+ """
858
+ Create a Stripe Checkout Session for paid plan subscription. Returns URL to redirect to.
859
+ """
860
+ createCheckoutSession(planSlug: String!, successUrl: String!, cancelUrl: String!): CheckoutSessionResult!
856
861
  createBillingPortalSession(returnUrl: String): BillingPortalSession!
862
+ dismissBillingUsageAlert(id: ID!): Boolean!
857
863
  selfServiceSignup(input: SelfServiceSignupInput!): SelfServiceSignupResult!
858
864
  createSignupSession(input: CreateSignupSessionInput!): CreateSignupSessionResult!
859
865
  createSegment(input: CreateSegmentInput!): Segment!
@@ -2856,8 +2862,8 @@ type UsageLimitStatus {
2856
2862
  percentUsed: Float!
2857
2863
  }
2858
2864
 
2859
- type SetupIntentResult {
2860
- clientSecret: String!
2865
+ type CheckoutSessionResult {
2866
+ url: String!
2861
2867
  }
2862
2868
 
2863
2869
  type BillingPortalSession {
@@ -2936,6 +2942,16 @@ type TenantBillingStatusResult {
2936
2942
  total: Int!
2937
2943
  }
2938
2944
 
2945
+ type UsageAlert {
2946
+ id: ID!
2947
+ metric: BillingMetric!
2948
+ threshold: Int!
2949
+ currentUsage: Float!
2950
+ limitValue: Float!
2951
+ percentUsed: Int!
2952
+ createdAt: DateTime!
2953
+ }
2954
+
2939
2955
  input CreateCustomPackageInput {
2940
2956
  tenantId: ID!
2941
2957
  projectId: ID
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eide/foir-cli",
3
- "version": "0.1.37",
3
+ "version": "0.1.38",
4
4
  "description": "Universal platform CLI for EIDE — scriptable, composable resource management",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -35,21 +35,6 @@
35
35
  "dist",
36
36
  "README.md"
37
37
  ],
38
- "scripts": {
39
- "build": "tsup",
40
- "dev:cli": "tsx src/cli.ts",
41
- "check-types": "tsc --noEmit",
42
- "lint": "eslint src/",
43
- "lint:fix": "eslint src/ --fix",
44
- "test": "vitest run",
45
- "test:watch": "vitest watch",
46
- "codegen": "graphql-codegen --config codegen.ts",
47
- "codegen:watch": "graphql-codegen --config codegen.ts --watch",
48
- "prepublishOnly": "pnpm run build",
49
- "release:patch": "pnpm version patch",
50
- "release:minor": "pnpm version minor",
51
- "release:major": "pnpm version major"
52
- },
53
38
  "keywords": [
54
39
  "foir",
55
40
  "eide",
@@ -73,19 +58,19 @@
73
58
  "prettier": "^3.4.2"
74
59
  },
75
60
  "devDependencies": {
76
- "@foir/platform": "workspace:*",
77
61
  "@graphql-codegen/cli": "^5.0.3",
78
62
  "@graphql-codegen/typed-document-node": "^5.0.12",
79
63
  "@graphql-codegen/typescript": "^4.1.2",
80
64
  "@graphql-codegen/typescript-operations": "^4.4.0",
81
65
  "@graphql-typed-document-node/core": "^3.2.0",
82
66
  "@types/inquirer": "^9.0.7",
83
- "@eide/command-registry": "workspace:*",
84
67
  "@types/node": "^22.5.0",
85
68
  "tsup": "^8.5.1",
86
69
  "tsx": "^4.20.0",
87
70
  "typescript": "5.9.2",
88
- "vitest": "^3.2.4"
71
+ "vitest": "^3.2.4",
72
+ "@foir/platform": "1.0.0",
73
+ "@eide/command-registry": "0.1.0"
89
74
  },
90
75
  "engines": {
91
76
  "node": ">=18.0.0"
@@ -94,5 +79,19 @@
94
79
  "type": "git",
95
80
  "url": "https://github.com/eidebuild/eide.git",
96
81
  "directory": "packages/cli"
82
+ },
83
+ "scripts": {
84
+ "build": "tsup",
85
+ "dev:cli": "tsx src/cli.ts",
86
+ "check-types": "tsc --noEmit",
87
+ "lint": "eslint src/",
88
+ "lint:fix": "eslint src/ --fix",
89
+ "test": "vitest run",
90
+ "test:watch": "vitest watch",
91
+ "codegen": "graphql-codegen --config codegen.ts",
92
+ "codegen:watch": "graphql-codegen --config codegen.ts --watch",
93
+ "release:patch": "pnpm version patch",
94
+ "release:minor": "pnpm version minor",
95
+ "release:major": "pnpm version major"
97
96
  }
98
- }
97
+ }