xploitscan-shared-rules 2.4.19 → 2.4.21
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/ai-status-constants.cjs +99 -0
- package/dist/ai-status-constants.cjs.map +1 -0
- package/dist/ai-status-constants.d.cts +12 -0
- package/dist/ai-status-constants.d.ts +12 -0
- package/dist/ai-status-constants.js +69 -0
- package/dist/ai-status-constants.js.map +1 -0
- package/dist/index.cjs +821 -82
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +97 -3
- package/dist/index.d.ts +97 -3
- package/dist/index.js +801 -82
- package/dist/index.js.map +1 -1
- package/package.json +6 -1
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/ai-status-constants.ts
|
|
21
|
+
var ai_status_constants_exports = {};
|
|
22
|
+
__export(ai_status_constants_exports, {
|
|
23
|
+
AI_REASONS: () => AI_REASONS,
|
|
24
|
+
AI_STATUSES: () => AI_STATUSES,
|
|
25
|
+
AI_SURFACES: () => AI_SURFACES,
|
|
26
|
+
PLAN_CAUSES: () => PLAN_CAUSES,
|
|
27
|
+
WEBHOOK_EVENT_TYPES: () => WEBHOOK_EVENT_TYPES,
|
|
28
|
+
WEBHOOK_REASONS: () => WEBHOOK_REASONS
|
|
29
|
+
});
|
|
30
|
+
module.exports = __toCommonJS(ai_status_constants_exports);
|
|
31
|
+
var AI_STATUSES = ["reviewed", "partial", "skipped", "failed", "unknown"];
|
|
32
|
+
var AI_REASONS = [
|
|
33
|
+
"no_api_key",
|
|
34
|
+
"client_init",
|
|
35
|
+
"capped",
|
|
36
|
+
"budget_timeout",
|
|
37
|
+
"model_bad_output",
|
|
38
|
+
"model_error",
|
|
39
|
+
"missing_content",
|
|
40
|
+
"exception",
|
|
41
|
+
"opted_out",
|
|
42
|
+
"auth_failed",
|
|
43
|
+
"jti_missing",
|
|
44
|
+
"token_unverified",
|
|
45
|
+
"pro_rules_unavailable",
|
|
46
|
+
"engine_unavailable",
|
|
47
|
+
"upload_failed",
|
|
48
|
+
"upload_blocked",
|
|
49
|
+
"upload_duplicate",
|
|
50
|
+
"persist_failed",
|
|
51
|
+
"quality_unavailable",
|
|
52
|
+
"intent_unavailable",
|
|
53
|
+
"not_supported",
|
|
54
|
+
"token_secret_missing",
|
|
55
|
+
"rate_limited",
|
|
56
|
+
"jti_unavailable",
|
|
57
|
+
"credit_error",
|
|
58
|
+
"daily_limit",
|
|
59
|
+
"signed_out"
|
|
60
|
+
];
|
|
61
|
+
var AI_SURFACES = ["upload", "cli", "action", "app", "api", "mcp", "web", "save"];
|
|
62
|
+
var PLAN_CAUSES = [
|
|
63
|
+
"missing",
|
|
64
|
+
"malformed",
|
|
65
|
+
"expired",
|
|
66
|
+
"revoked",
|
|
67
|
+
"network",
|
|
68
|
+
"upstream_5xx",
|
|
69
|
+
"unknown"
|
|
70
|
+
];
|
|
71
|
+
var WEBHOOK_REASONS = [
|
|
72
|
+
"no_metadata_user",
|
|
73
|
+
"malformed_user",
|
|
74
|
+
"unknown_user",
|
|
75
|
+
"user_bound_other_customer",
|
|
76
|
+
"race_no_row",
|
|
77
|
+
"deleted_unmatched",
|
|
78
|
+
"clerk_lookup_failed"
|
|
79
|
+
];
|
|
80
|
+
var WEBHOOK_EVENT_TYPES = [
|
|
81
|
+
"checkout.session.completed",
|
|
82
|
+
"customer.subscription.created",
|
|
83
|
+
"customer.subscription.updated",
|
|
84
|
+
"customer.subscription.deleted",
|
|
85
|
+
"invoice.paid",
|
|
86
|
+
"invoice.payment_failed",
|
|
87
|
+
"created",
|
|
88
|
+
"updated"
|
|
89
|
+
];
|
|
90
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
91
|
+
0 && (module.exports = {
|
|
92
|
+
AI_REASONS,
|
|
93
|
+
AI_STATUSES,
|
|
94
|
+
AI_SURFACES,
|
|
95
|
+
PLAN_CAUSES,
|
|
96
|
+
WEBHOOK_EVENT_TYPES,
|
|
97
|
+
WEBHOOK_REASONS
|
|
98
|
+
});
|
|
99
|
+
//# sourceMappingURL=ai-status-constants.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ai-status-constants.ts"],"sourcesContent":["export const AI_STATUSES = [\"reviewed\", \"partial\", \"skipped\", \"failed\", \"unknown\"] as const;\nexport type AiStatus = (typeof AI_STATUSES)[number];\n\nexport const AI_REASONS = [\n \"no_api_key\",\n \"client_init\",\n \"capped\",\n \"budget_timeout\",\n \"model_bad_output\",\n \"model_error\",\n \"missing_content\",\n \"exception\",\n \"opted_out\",\n \"auth_failed\",\n \"jti_missing\",\n \"token_unverified\",\n \"pro_rules_unavailable\",\n \"engine_unavailable\",\n \"upload_failed\",\n \"upload_blocked\",\n \"upload_duplicate\",\n \"persist_failed\",\n \"quality_unavailable\",\n \"intent_unavailable\",\n \"not_supported\",\n \"token_secret_missing\",\n \"rate_limited\",\n \"jti_unavailable\",\n \"credit_error\",\n \"daily_limit\",\n \"signed_out\",\n] as const;\nexport type AiReason = (typeof AI_REASONS)[number];\n\nexport const AI_SURFACES = [\"upload\", \"cli\", \"action\", \"app\", \"api\", \"mcp\", \"web\", \"save\"] as const;\nexport type AiSurface = (typeof AI_SURFACES)[number];\n\nexport const PLAN_CAUSES = [\n \"missing\",\n \"malformed\",\n \"expired\",\n \"revoked\",\n \"network\",\n \"upstream_5xx\",\n \"unknown\",\n] as const;\nexport type PlanCause = (typeof PLAN_CAUSES)[number];\n\nexport const WEBHOOK_REASONS = [\n \"no_metadata_user\",\n \"malformed_user\",\n \"unknown_user\",\n \"user_bound_other_customer\",\n \"race_no_row\",\n \"deleted_unmatched\",\n \"clerk_lookup_failed\",\n] as const;\n\nexport const WEBHOOK_EVENT_TYPES = [\n \"checkout.session.completed\",\n \"customer.subscription.created\",\n \"customer.subscription.updated\",\n \"customer.subscription.deleted\",\n \"invoice.paid\",\n \"invoice.payment_failed\",\n \"created\",\n \"updated\",\n] as const;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAM,cAAc,CAAC,YAAY,WAAW,WAAW,UAAU,SAAS;AAG1E,IAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,IAAM,cAAc,CAAC,UAAU,OAAO,UAAU,OAAO,OAAO,OAAO,OAAO,MAAM;AAGlF,IAAM,cAAc;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,IAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,sBAAsB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const AI_STATUSES: readonly ["reviewed", "partial", "skipped", "failed", "unknown"];
|
|
2
|
+
type AiStatus = (typeof AI_STATUSES)[number];
|
|
3
|
+
declare const AI_REASONS: readonly ["no_api_key", "client_init", "capped", "budget_timeout", "model_bad_output", "model_error", "missing_content", "exception", "opted_out", "auth_failed", "jti_missing", "token_unverified", "pro_rules_unavailable", "engine_unavailable", "upload_failed", "upload_blocked", "upload_duplicate", "persist_failed", "quality_unavailable", "intent_unavailable", "not_supported", "token_secret_missing", "rate_limited", "jti_unavailable", "credit_error", "daily_limit", "signed_out"];
|
|
4
|
+
type AiReason = (typeof AI_REASONS)[number];
|
|
5
|
+
declare const AI_SURFACES: readonly ["upload", "cli", "action", "app", "api", "mcp", "web", "save"];
|
|
6
|
+
type AiSurface = (typeof AI_SURFACES)[number];
|
|
7
|
+
declare const PLAN_CAUSES: readonly ["missing", "malformed", "expired", "revoked", "network", "upstream_5xx", "unknown"];
|
|
8
|
+
type PlanCause = (typeof PLAN_CAUSES)[number];
|
|
9
|
+
declare const WEBHOOK_REASONS: readonly ["no_metadata_user", "malformed_user", "unknown_user", "user_bound_other_customer", "race_no_row", "deleted_unmatched", "clerk_lookup_failed"];
|
|
10
|
+
declare const WEBHOOK_EVENT_TYPES: readonly ["checkout.session.completed", "customer.subscription.created", "customer.subscription.updated", "customer.subscription.deleted", "invoice.paid", "invoice.payment_failed", "created", "updated"];
|
|
11
|
+
|
|
12
|
+
export { AI_REASONS, AI_STATUSES, AI_SURFACES, type AiReason, type AiStatus, type AiSurface, PLAN_CAUSES, type PlanCause, WEBHOOK_EVENT_TYPES, WEBHOOK_REASONS };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const AI_STATUSES: readonly ["reviewed", "partial", "skipped", "failed", "unknown"];
|
|
2
|
+
type AiStatus = (typeof AI_STATUSES)[number];
|
|
3
|
+
declare const AI_REASONS: readonly ["no_api_key", "client_init", "capped", "budget_timeout", "model_bad_output", "model_error", "missing_content", "exception", "opted_out", "auth_failed", "jti_missing", "token_unverified", "pro_rules_unavailable", "engine_unavailable", "upload_failed", "upload_blocked", "upload_duplicate", "persist_failed", "quality_unavailable", "intent_unavailable", "not_supported", "token_secret_missing", "rate_limited", "jti_unavailable", "credit_error", "daily_limit", "signed_out"];
|
|
4
|
+
type AiReason = (typeof AI_REASONS)[number];
|
|
5
|
+
declare const AI_SURFACES: readonly ["upload", "cli", "action", "app", "api", "mcp", "web", "save"];
|
|
6
|
+
type AiSurface = (typeof AI_SURFACES)[number];
|
|
7
|
+
declare const PLAN_CAUSES: readonly ["missing", "malformed", "expired", "revoked", "network", "upstream_5xx", "unknown"];
|
|
8
|
+
type PlanCause = (typeof PLAN_CAUSES)[number];
|
|
9
|
+
declare const WEBHOOK_REASONS: readonly ["no_metadata_user", "malformed_user", "unknown_user", "user_bound_other_customer", "race_no_row", "deleted_unmatched", "clerk_lookup_failed"];
|
|
10
|
+
declare const WEBHOOK_EVENT_TYPES: readonly ["checkout.session.completed", "customer.subscription.created", "customer.subscription.updated", "customer.subscription.deleted", "invoice.paid", "invoice.payment_failed", "created", "updated"];
|
|
11
|
+
|
|
12
|
+
export { AI_REASONS, AI_STATUSES, AI_SURFACES, type AiReason, type AiStatus, type AiSurface, PLAN_CAUSES, type PlanCause, WEBHOOK_EVENT_TYPES, WEBHOOK_REASONS };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
// src/ai-status-constants.ts
|
|
2
|
+
var AI_STATUSES = ["reviewed", "partial", "skipped", "failed", "unknown"];
|
|
3
|
+
var AI_REASONS = [
|
|
4
|
+
"no_api_key",
|
|
5
|
+
"client_init",
|
|
6
|
+
"capped",
|
|
7
|
+
"budget_timeout",
|
|
8
|
+
"model_bad_output",
|
|
9
|
+
"model_error",
|
|
10
|
+
"missing_content",
|
|
11
|
+
"exception",
|
|
12
|
+
"opted_out",
|
|
13
|
+
"auth_failed",
|
|
14
|
+
"jti_missing",
|
|
15
|
+
"token_unverified",
|
|
16
|
+
"pro_rules_unavailable",
|
|
17
|
+
"engine_unavailable",
|
|
18
|
+
"upload_failed",
|
|
19
|
+
"upload_blocked",
|
|
20
|
+
"upload_duplicate",
|
|
21
|
+
"persist_failed",
|
|
22
|
+
"quality_unavailable",
|
|
23
|
+
"intent_unavailable",
|
|
24
|
+
"not_supported",
|
|
25
|
+
"token_secret_missing",
|
|
26
|
+
"rate_limited",
|
|
27
|
+
"jti_unavailable",
|
|
28
|
+
"credit_error",
|
|
29
|
+
"daily_limit",
|
|
30
|
+
"signed_out"
|
|
31
|
+
];
|
|
32
|
+
var AI_SURFACES = ["upload", "cli", "action", "app", "api", "mcp", "web", "save"];
|
|
33
|
+
var PLAN_CAUSES = [
|
|
34
|
+
"missing",
|
|
35
|
+
"malformed",
|
|
36
|
+
"expired",
|
|
37
|
+
"revoked",
|
|
38
|
+
"network",
|
|
39
|
+
"upstream_5xx",
|
|
40
|
+
"unknown"
|
|
41
|
+
];
|
|
42
|
+
var WEBHOOK_REASONS = [
|
|
43
|
+
"no_metadata_user",
|
|
44
|
+
"malformed_user",
|
|
45
|
+
"unknown_user",
|
|
46
|
+
"user_bound_other_customer",
|
|
47
|
+
"race_no_row",
|
|
48
|
+
"deleted_unmatched",
|
|
49
|
+
"clerk_lookup_failed"
|
|
50
|
+
];
|
|
51
|
+
var WEBHOOK_EVENT_TYPES = [
|
|
52
|
+
"checkout.session.completed",
|
|
53
|
+
"customer.subscription.created",
|
|
54
|
+
"customer.subscription.updated",
|
|
55
|
+
"customer.subscription.deleted",
|
|
56
|
+
"invoice.paid",
|
|
57
|
+
"invoice.payment_failed",
|
|
58
|
+
"created",
|
|
59
|
+
"updated"
|
|
60
|
+
];
|
|
61
|
+
export {
|
|
62
|
+
AI_REASONS,
|
|
63
|
+
AI_STATUSES,
|
|
64
|
+
AI_SURFACES,
|
|
65
|
+
PLAN_CAUSES,
|
|
66
|
+
WEBHOOK_EVENT_TYPES,
|
|
67
|
+
WEBHOOK_REASONS
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=ai-status-constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/ai-status-constants.ts"],"sourcesContent":["export const AI_STATUSES = [\"reviewed\", \"partial\", \"skipped\", \"failed\", \"unknown\"] as const;\nexport type AiStatus = (typeof AI_STATUSES)[number];\n\nexport const AI_REASONS = [\n \"no_api_key\",\n \"client_init\",\n \"capped\",\n \"budget_timeout\",\n \"model_bad_output\",\n \"model_error\",\n \"missing_content\",\n \"exception\",\n \"opted_out\",\n \"auth_failed\",\n \"jti_missing\",\n \"token_unverified\",\n \"pro_rules_unavailable\",\n \"engine_unavailable\",\n \"upload_failed\",\n \"upload_blocked\",\n \"upload_duplicate\",\n \"persist_failed\",\n \"quality_unavailable\",\n \"intent_unavailable\",\n \"not_supported\",\n \"token_secret_missing\",\n \"rate_limited\",\n \"jti_unavailable\",\n \"credit_error\",\n \"daily_limit\",\n \"signed_out\",\n] as const;\nexport type AiReason = (typeof AI_REASONS)[number];\n\nexport const AI_SURFACES = [\"upload\", \"cli\", \"action\", \"app\", \"api\", \"mcp\", \"web\", \"save\"] as const;\nexport type AiSurface = (typeof AI_SURFACES)[number];\n\nexport const PLAN_CAUSES = [\n \"missing\",\n \"malformed\",\n \"expired\",\n \"revoked\",\n \"network\",\n \"upstream_5xx\",\n \"unknown\",\n] as const;\nexport type PlanCause = (typeof PLAN_CAUSES)[number];\n\nexport const WEBHOOK_REASONS = [\n \"no_metadata_user\",\n \"malformed_user\",\n \"unknown_user\",\n \"user_bound_other_customer\",\n \"race_no_row\",\n \"deleted_unmatched\",\n \"clerk_lookup_failed\",\n] as const;\n\nexport const WEBHOOK_EVENT_TYPES = [\n \"checkout.session.completed\",\n \"customer.subscription.created\",\n \"customer.subscription.updated\",\n \"customer.subscription.deleted\",\n \"invoice.paid\",\n \"invoice.payment_failed\",\n \"created\",\n \"updated\",\n] as const;\n"],"mappings":";AAAO,IAAM,cAAc,CAAC,YAAY,WAAW,WAAW,UAAU,SAAS;AAG1E,IAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,IAAM,cAAc,CAAC,UAAU,OAAO,UAAU,OAAO,OAAO,OAAO,OAAO,MAAM;AAGlF,IAAM,cAAc;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAGO,IAAM,kBAAkB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,IAAM,sBAAsB;AAAA,EACjC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}
|