@stackframe/stack-shared 2.8.47 → 2.8.48

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.
Files changed (36) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/apps/apps-config.d.mts +8 -8
  3. package/dist/apps/apps-config.d.ts +8 -8
  4. package/dist/apps/apps-config.js +8 -8
  5. package/dist/apps/apps-config.js.map +1 -1
  6. package/dist/config/schema-fuzzer.test.js +0 -9
  7. package/dist/config/schema-fuzzer.test.js.map +1 -1
  8. package/dist/config/schema.d.mts +204 -274
  9. package/dist/config/schema.d.ts +204 -274
  10. package/dist/config/schema.js +1 -19
  11. package/dist/config/schema.js.map +1 -1
  12. package/dist/esm/apps/apps-config.js +8 -8
  13. package/dist/esm/apps/apps-config.js.map +1 -1
  14. package/dist/esm/config/schema-fuzzer.test.js +0 -9
  15. package/dist/esm/config/schema-fuzzer.test.js.map +1 -1
  16. package/dist/esm/config/schema.js +1 -19
  17. package/dist/esm/config/schema.js.map +1 -1
  18. package/dist/esm/interface/client-interface.js.map +1 -1
  19. package/dist/esm/known-errors.js +1 -21
  20. package/dist/esm/known-errors.js.map +1 -1
  21. package/dist/esm/schema-fields.js +17 -1
  22. package/dist/esm/schema-fields.js.map +1 -1
  23. package/dist/interface/client-interface.d.mts +1 -1
  24. package/dist/interface/client-interface.d.ts +1 -1
  25. package/dist/interface/client-interface.js.map +1 -1
  26. package/dist/interface/crud/products.d.mts +9 -0
  27. package/dist/interface/crud/products.d.ts +9 -0
  28. package/dist/known-errors.d.mts +0 -6
  29. package/dist/known-errors.d.ts +0 -6
  30. package/dist/known-errors.js +1 -21
  31. package/dist/known-errors.js.map +1 -1
  32. package/dist/schema-fields.d.mts +53 -1
  33. package/dist/schema-fields.d.ts +53 -1
  34. package/dist/schema-fields.js +21 -1
  35. package/dist/schema-fields.js.map +1 -1
  36. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @stackframe/stack-shared
2
2
 
3
+ ## 2.8.48
4
+
5
+ ### Patch Changes
6
+
7
+ - Various changes
8
+
3
9
  ## 2.8.47
4
10
 
5
11
  ### Patch Changes
@@ -83,12 +83,6 @@ declare const ALL_APPS: {
83
83
  readonly tags: ["security", "storage"];
84
84
  readonly stage: "beta";
85
85
  };
86
- readonly workflows: {
87
- readonly displayName: "Workflows";
88
- readonly subtitle: "Automated business process orchestration";
89
- readonly tags: ["automation"];
90
- readonly stage: "beta";
91
- };
92
86
  readonly webhooks: {
93
87
  readonly displayName: "Webhooks";
94
88
  readonly subtitle: "Real-time event notifications and integrations";
@@ -114,17 +108,23 @@ declare const ALL_APPS: {
114
108
  readonly stage: "alpha";
115
109
  };
116
110
  readonly neon: {
117
- readonly displayName: "Neon";
111
+ readonly displayName: "Neon Integration";
118
112
  readonly subtitle: "Serverless Postgres database integration";
119
113
  readonly tags: ["integration", "storage"];
120
114
  readonly stage: "alpha";
121
115
  };
122
116
  readonly convex: {
123
- readonly displayName: "Convex";
117
+ readonly displayName: "Convex Integration";
124
118
  readonly subtitle: "Real-time backend platform integration";
125
119
  readonly tags: ["integration", "storage"];
126
120
  readonly stage: "alpha";
127
121
  };
122
+ readonly vercel: {
123
+ readonly displayName: "Vercel Integration";
124
+ readonly subtitle: "Deploy your Stack Auth project to Vercel";
125
+ readonly tags: ["integration", "developers"];
126
+ readonly stage: "stable";
127
+ };
128
128
  };
129
129
 
130
130
  export { ALL_APPS, ALL_APP_TAGS, type AppId };
@@ -83,12 +83,6 @@ declare const ALL_APPS: {
83
83
  readonly tags: ["security", "storage"];
84
84
  readonly stage: "beta";
85
85
  };
86
- readonly workflows: {
87
- readonly displayName: "Workflows";
88
- readonly subtitle: "Automated business process orchestration";
89
- readonly tags: ["automation"];
90
- readonly stage: "beta";
91
- };
92
86
  readonly webhooks: {
93
87
  readonly displayName: "Webhooks";
94
88
  readonly subtitle: "Real-time event notifications and integrations";
@@ -114,17 +108,23 @@ declare const ALL_APPS: {
114
108
  readonly stage: "alpha";
115
109
  };
116
110
  readonly neon: {
117
- readonly displayName: "Neon";
111
+ readonly displayName: "Neon Integration";
118
112
  readonly subtitle: "Serverless Postgres database integration";
119
113
  readonly tags: ["integration", "storage"];
120
114
  readonly stage: "alpha";
121
115
  };
122
116
  readonly convex: {
123
- readonly displayName: "Convex";
117
+ readonly displayName: "Convex Integration";
124
118
  readonly subtitle: "Real-time backend platform integration";
125
119
  readonly tags: ["integration", "storage"];
126
120
  readonly stage: "alpha";
127
121
  };
122
+ readonly vercel: {
123
+ readonly displayName: "Vercel Integration";
124
+ readonly subtitle: "Deploy your Stack Auth project to Vercel";
125
+ readonly tags: ["integration", "developers"];
126
+ readonly stage: "stable";
127
+ };
128
128
  };
129
129
 
130
130
  export { ALL_APPS, ALL_APP_TAGS, type AppId };
@@ -108,12 +108,6 @@ var ALL_APPS = {
108
108
  tags: ["security", "storage"],
109
109
  stage: "beta"
110
110
  },
111
- "workflows": {
112
- displayName: "Workflows",
113
- subtitle: "Automated business process orchestration",
114
- tags: ["automation"],
115
- stage: "beta"
116
- },
117
111
  "webhooks": {
118
112
  displayName: "Webhooks",
119
113
  subtitle: "Real-time event notifications and integrations",
@@ -139,16 +133,22 @@ var ALL_APPS = {
139
133
  stage: "alpha"
140
134
  },
141
135
  "neon": {
142
- displayName: "Neon",
136
+ displayName: "Neon Integration",
143
137
  subtitle: "Serverless Postgres database integration",
144
138
  tags: ["integration", "storage"],
145
139
  stage: "alpha"
146
140
  },
147
141
  "convex": {
148
- displayName: "Convex",
142
+ displayName: "Convex Integration",
149
143
  subtitle: "Real-time backend platform integration",
150
144
  tags: ["integration", "storage"],
151
145
  stage: "alpha"
146
+ },
147
+ "vercel": {
148
+ displayName: "Vercel Integration",
149
+ subtitle: "Deploy your Stack Auth project to Vercel",
150
+ tags: ["integration", "developers"],
151
+ stage: "stable"
152
152
  }
153
153
  };
154
154
  // Annotate the CommonJS export names for ESM import in node:
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/apps/apps-config.ts"],"sourcesContent":["type AppTag = {\n displayName: string,\n};\n\nexport const ALL_APP_TAGS = {\n \"expert\": {\n displayName: \"Expert\",\n },\n \"integration\": {\n displayName: \"Integrations\",\n },\n \"auth\": {\n displayName: \"Authentication\",\n },\n \"developers\": {\n displayName: \"For Developers\",\n },\n \"security\": {\n displayName: \"Security\",\n },\n \"operations\": {\n displayName: \"For Operations\",\n },\n \"gtm\": {\n displayName: \"Go-to-market\",\n },\n \"comms\": {\n displayName: \"Communications\",\n },\n \"automation\": {\n displayName: \"Automation\",\n },\n \"storage\": {\n displayName: \"Storage & Databases\",\n },\n \"various\": {\n displayName: \"Various\",\n },\n} as const satisfies Record<string, AppTag>;\n\ntype App = {\n displayName: string,\n subtitle: string,\n tags: (keyof typeof ALL_APP_TAGS)[],\n stage: \"alpha\" | \"beta\" | \"stable\",\n};\n\nexport type AppId = keyof typeof ALL_APPS;\n\nexport const ALL_APPS = {\n \"authentication\": {\n displayName: \"Authentication\",\n subtitle: \"User sign-in and account management\",\n tags: [\"auth\", \"security\"],\n stage: \"stable\",\n },\n \"teams\": {\n displayName: \"Teams\",\n subtitle: \"Team collaboration and management\",\n tags: [\"auth\", \"security\"],\n stage: \"stable\",\n },\n \"rbac\": {\n displayName: \"RBAC\",\n subtitle: \"Role-based access control and permissions\",\n tags: [\"auth\", \"security\"],\n stage: \"stable\",\n },\n \"api-keys\": {\n displayName: \"API Keys\",\n subtitle: \"API key generation and management\",\n tags: [\"auth\", \"security\", \"developers\"],\n stage: \"stable\",\n },\n \"payments\": {\n displayName: \"Payments\",\n subtitle: \"Payment processing and subscription management\",\n tags: [\"operations\", \"gtm\"],\n stage: \"stable\",\n },\n \"emails\": {\n displayName: \"Emails\",\n subtitle: \"Email template configuration and management\",\n tags: [\"comms\"],\n stage: \"stable\",\n },\n \"email-api\": {\n displayName: \"Email API\",\n subtitle: \"Programmatic email sending and delivery\",\n tags: [\"comms\", \"developers\", \"expert\"],\n stage: \"alpha\",\n },\n \"data-vault\": {\n displayName: \"Data Vault\",\n subtitle: \"Secure storage for sensitive user data\",\n tags: [\"security\", \"storage\"],\n stage: \"beta\",\n },\n \"workflows\": {\n displayName: \"Workflows\",\n subtitle: \"Automated business process orchestration\",\n tags: [\"automation\"],\n stage: \"beta\",\n },\n \"webhooks\": {\n displayName: \"Webhooks\",\n subtitle: \"Real-time event notifications and integrations\",\n tags: [\"developers\"],\n stage: \"stable\",\n },\n \"tv-mode\": {\n displayName: \"TV mode\",\n subtitle: \"Dashboard display for large screens\",\n tags: [\"various\"],\n stage: \"alpha\",\n },\n \"launch-checklist\": {\n displayName: \"Launch Checklist\",\n subtitle: \"Pre-launch verification and readiness checks\",\n tags: [\"various\"],\n stage: \"stable\",\n },\n \"catalyst\": {\n displayName: \"Catalyst\",\n subtitle: \"Project scaffolding and rapid development\",\n tags: [\"various\"],\n stage: \"alpha\",\n },\n \"neon\": {\n displayName: \"Neon\",\n subtitle: \"Serverless Postgres database integration\",\n tags: [\"integration\", \"storage\"],\n stage: \"alpha\",\n },\n \"convex\": {\n displayName: \"Convex\",\n subtitle: \"Real-time backend platform integration\",\n tags: [\"integration\", \"storage\"],\n stage: \"alpha\",\n },\n} as const satisfies Record<string, App>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAM,eAAe;AAAA,EAC1B,UAAU;AAAA,IACR,aAAa;AAAA,EACf;AAAA,EACA,eAAe;AAAA,IACb,aAAa;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,cAAc;AAAA,IACZ,aAAa;AAAA,EACf;AAAA,EACA,YAAY;AAAA,IACV,aAAa;AAAA,EACf;AAAA,EACA,cAAc;AAAA,IACZ,aAAa;AAAA,EACf;AAAA,EACA,OAAO;AAAA,IACL,aAAa;AAAA,EACf;AAAA,EACA,SAAS;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA,cAAc;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U;AAAA,IACV,MAAM,CAAC,YAAY;AAAA,IACnB,OAAO;AAAA,EACT;AAAA,EACA,WAAW;AAAA,IACT,aAAa;AAAA,IACb,UAAU;AAAA,IACV,MAAM,CAAC,SAAS;AAAA,IAChB,OAAO;AAAA,EACT;AAAA,EACA,oBAAoB;AAAA,IAClB,aAAa;AAAA,IACb,UAAU;AAAA,IACV,MAAM,CAAC,SAAS;AAAA,IAChB,OAAO;AAAA,EACT;AAAA,EACA,YAAY;AAAA,IACV,aAAa;AAAA,IACb,UAAU;AAAA,IACV,MAAM,CAAC,SAAS;AAAA,IAChB,OAAO;AAAA,EACT;AAAA,EACA,QAAQ;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,MAAM,CAAC,eAAe,SAAS;AAAA,IAC/B,OAAO;AAAA,EACT;AAAA,EACA,UAAU;AAAA,IACR,aAAa;AAAA,IACb,UAAU;AAAA,IACV,MAAM,CAAC,eAAe,SAAS;AAAA,IAC/B,OAAO;AAAA,EACT;AACF;","names":[]}
1
+ {"version":3,"sources":["../../src/apps/apps-config.ts"],"sourcesContent":["type AppTag = {\n displayName: string,\n};\n\nexport const ALL_APP_TAGS = {\n \"expert\": {\n displayName: \"Expert\",\n },\n \"integration\": {\n displayName: \"Integrations\",\n },\n \"auth\": {\n displayName: \"Authentication\",\n },\n \"developers\": {\n displayName: \"For Developers\",\n },\n \"security\": {\n displayName: \"Security\",\n },\n \"operations\": {\n displayName: \"For Operations\",\n },\n \"gtm\": {\n displayName: \"Go-to-market\",\n },\n \"comms\": {\n displayName: \"Communications\",\n },\n \"automation\": {\n displayName: \"Automation\",\n },\n \"storage\": {\n displayName: \"Storage & Databases\",\n },\n \"various\": {\n displayName: \"Various\",\n },\n} as const satisfies Record<string, AppTag>;\n\ntype App = {\n displayName: string,\n subtitle: string,\n tags: (keyof typeof ALL_APP_TAGS)[],\n stage: \"alpha\" | \"beta\" | \"stable\",\n};\n\nexport type AppId = keyof typeof ALL_APPS;\n\nexport const ALL_APPS = {\n \"authentication\": {\n displayName: \"Authentication\",\n subtitle: \"User sign-in and account management\",\n tags: [\"auth\", \"security\"],\n stage: \"stable\",\n },\n \"teams\": {\n displayName: \"Teams\",\n subtitle: \"Team collaboration and management\",\n tags: [\"auth\", \"security\"],\n stage: \"stable\",\n },\n \"rbac\": {\n displayName: \"RBAC\",\n subtitle: \"Role-based access control and permissions\",\n tags: [\"auth\", \"security\"],\n stage: \"stable\",\n },\n \"api-keys\": {\n displayName: \"API Keys\",\n subtitle: \"API key generation and management\",\n tags: [\"auth\", \"security\", \"developers\"],\n stage: \"stable\",\n },\n \"payments\": {\n displayName: \"Payments\",\n subtitle: \"Payment processing and subscription management\",\n tags: [\"operations\", \"gtm\"],\n stage: \"stable\",\n },\n \"emails\": {\n displayName: \"Emails\",\n subtitle: \"Email template configuration and management\",\n tags: [\"comms\"],\n stage: \"stable\",\n },\n \"email-api\": {\n displayName: \"Email API\",\n subtitle: \"Programmatic email sending and delivery\",\n tags: [\"comms\", \"developers\", \"expert\"],\n stage: \"alpha\",\n },\n \"data-vault\": {\n displayName: \"Data Vault\",\n subtitle: \"Secure storage for sensitive user data\",\n tags: [\"security\", \"storage\"],\n stage: \"beta\",\n },\n \"webhooks\": {\n displayName: \"Webhooks\",\n subtitle: \"Real-time event notifications and integrations\",\n tags: [\"developers\"],\n stage: \"stable\",\n },\n \"tv-mode\": {\n displayName: \"TV mode\",\n subtitle: \"Dashboard display for large screens\",\n tags: [\"various\"],\n stage: \"alpha\",\n },\n \"launch-checklist\": {\n displayName: \"Launch Checklist\",\n subtitle: \"Pre-launch verification and readiness checks\",\n tags: [\"various\"],\n stage: \"stable\",\n },\n \"catalyst\": {\n displayName: \"Catalyst\",\n subtitle: \"Project scaffolding and rapid development\",\n tags: [\"various\"],\n stage: \"alpha\",\n },\n \"neon\": {\n displayName: \"Neon Integration\",\n subtitle: \"Serverless Postgres database integration\",\n tags: [\"integration\", \"storage\"],\n stage: \"alpha\",\n },\n \"convex\": {\n displayName: \"Convex Integration\",\n subtitle: \"Real-time backend platform integration\",\n tags: [\"integration\", \"storage\"],\n stage: \"alpha\",\n },\n \"vercel\": {\n displayName: \"Vercel Integration\",\n subtitle: \"Deploy your Stack Auth project to Vercel\",\n tags: [\"integration\", \"developers\"],\n stage: \"stable\",\n },\n} as const satisfies Record<string, App>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAIO,IAAM,eAAe;AAAA,EAC1B,UAAU;AAAA,IACR,aAAa;AAAA,EACf;AAAA,EACA,eAAe;AAAA,IACb,aAAa;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,cAAc;AAAA,IACZ,aAAa;AAAA,EACf;AAAA,EACA,YAAY;AAAA,IACV,aAAa;AAAA,EACf;AAAA,EACA,cAAc;AAAA,IACZ,aAAa;AAAA,EACf;AAAA,EACA,OAAO;AAAA,IACL,aAAa;AAAA,EACf;AAAA,EACA,SAAS;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA,cAAc;AAAA,IACZ,aAAa;AAAA,EACf;AAAA,EACA,WAAW;AAAA,IACT,aAAa;AAAA,EACf;AAAA,EACA,WAAW;AAAA,IACT,aAAa;AAAA,EACf;AACF;AAWO,IAAM,WAAW;AAAA,EACtB,kBAAkB;AAAA,IAChB,aAAa;AAAA,IACb,UAAU;AAAA,IACV,MAAM,CAAC,QAAQ,UAAU;AAAA,IACzB,OAAO;AAAA,EACT;AAAA,EACA,SAAS;AAAA,IACP,aAAa;AAAA,IACb,UAAU;AAAA,IACV,MAAM,CAAC,QAAQ,UAAU;AAAA,IACzB,OAAO;AAAA,EACT;AAAA,EACA,QAAQ;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,MAAM,CAAC,QAAQ,UAAU;AAAA,IACzB,OAAO;AAAA,EACT;AAAA,EACA,YAAY;AAAA,IACV,aAAa;AAAA,IACb,UAAU;AAAA,IACV,MA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UAAU;AAAA,IACV,MAAM,CAAC,eAAe,YAAY;AAAA,IAClC,OAAO;AAAA,EACT;AACF;","names":[]}
@@ -113,15 +113,6 @@ var branchSchemaFuzzerConfig = [{
113
113
  }]
114
114
  }]
115
115
  }],
116
- workflows: [{
117
- availableWorkflows: [{
118
- "some-workflow-id": [{
119
- displayName: ["Some Workflow", "Some Other Workflow"],
120
- tsSource: ["", "some typescript source code"],
121
- enabled: [true, false]
122
- }]
123
- }]
124
- }],
125
116
  teams: [{
126
117
  createPersonalTeamOnSignUp: [true, false],
127
118
  allowClientTeamCreation: [true, false]
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/config/schema-fuzzer.test.ts"],"sourcesContent":["import { ALL_APPS } from \"../apps/apps-config\";\nimport { SUPPORTED_CURRENCIES } from \"../utils/currency-constants\";\nimport { StackAssertionError } from \"../utils/errors\";\nimport { getOrUndefined, isObjectLike, set, typedEntries, typedFromEntries } from \"../utils/objects\";\nimport { nicify } from \"../utils/strings\";\nimport { normalize, override } from \"./format\";\nimport { BranchConfigNormalizedOverride, EnvironmentConfigNormalizedOverride, OrganizationConfigNormalizedOverride, ProjectConfigNormalizedOverride, applyBranchDefaults, applyEnvironmentDefaults, applyOrganizationDefaults, applyProjectDefaults, assertNoConfigOverrideErrors, branchConfigSchema, environmentConfigSchema, migrateConfigOverride, organizationConfigSchema, projectConfigSchema, sanitizeBranchConfig, sanitizeEnvironmentConfig, sanitizeOrganizationConfig, sanitizeProjectConfig } from \"./schema\";\n\ntype FuzzerConfig<T> = ReadonlyArray<T extends object ? ([T] extends [any[]] ? { readonly [K in keyof T]: FuzzerConfig<T[K]> } : Required<{\n [K in keyof T]: FuzzerConfig<T[K]>;\n}> & Record<string, FuzzerConfig<any>>) : T>;\n\nconst projectSchemaFuzzerConfig = [{\n sourceOfTruth: [{\n type: [\"hosted\", \"neon\", \"postgres\"],\n connectionString: [\"\", \"postgres://user:password@host:port/database\", \"THIS IS A STRING LOLOL\"],\n connectionStrings: [{\n \"123-some-branch-id\": [\"\", \"THIS IS A CONNECTION STRING OR SO\"],\n }],\n }],\n}] satisfies FuzzerConfig<ProjectConfigNormalizedOverride>;\n\nconst branchSchemaFuzzerConfig = [{\n apiKeys: [{\n enabled: [{\n team: [true, false],\n user: [true, false],\n }],\n }],\n auth: [{\n allowSignUp: [true, false],\n password: [{\n allowSignIn: [true, false],\n }],\n otp: [{\n allowSignIn: [true, false],\n }],\n passkey: [{\n allowSignIn: [true, false],\n }],\n oauth: [{\n accountMergeStrategy: [\"link_method\", \"raise_error\", \"allow_duplicates\"],\n providers: [{\n \"google\": [{\n type: [\"google\", \"github\", \"x\"] as const,\n allowSignIn: [true, false],\n allowConnectedAccounts: [true, false],\n }],\n }],\n }],\n }],\n dataVault: [{\n stores: [{\n \"some-store-id\": [{\n displayName: [\"Some Store\", \"Some Other Store\"],\n }],\n \"some-other-store-id\": [{\n displayName: [\"Some Store\", \"Some Other Store\"],\n }],\n }],\n }],\n payments: [{\n testMode: [false, true],\n autoPay: [{\n interval: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n }],\n catalogs: [{\n \"some-catalog-id\": [{\n displayName: [\"Some Catalog\", \"Some Other Catalog\"],\n }],\n }],\n groups: [{\n \"some-catalog-id\": [{\n displayName: [\"Some Catalog\", \"Some Other Catalog\"],\n }],\n }],\n items: [{\n \"some-item-id\": [{\n customerType: [\"user\", \"team\", \"custom\"] as const,\n displayName: [\"Some Item\", \"Some Other Item\"],\n }],\n }],\n products: [{\n \"some-product-id\": [{\n displayName: [\"Some Product\", \"Some Other Product\"],\n customerType: [\"user\", \"team\", \"custom\"] as const,\n freeTrial: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n serverOnly: [true, false],\n stackable: [true, false],\n catalogId: [\"some-catalog-id\", \"some-other-catalog-id\"],\n groupId: [\"some-catalog-id\", \"some-other-catalog-id\"], // ensure migration works\n isAddOnTo: [false, { \"some-product-id\": [true], \"some-other-product-id\": [true] }] as const,\n prices: [\"include-by-default\" as \"include-by-default\", {\n \"some-price-id\": [{\n ...typedFromEntries(SUPPORTED_CURRENCIES.map(currency => [currency.code, [\"100_00\", \"not a number\", \"Infinity\", \"0\"]])),\n interval: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n serverOnly: [true, false],\n freeTrial: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n }],\n }],\n includedItems: [{\n \"some-item-id\": [{\n quantity: [0, 1, -3, 100, 0.333, Infinity],\n repeat: [\"never\", [[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n expires: [\"never\", \"when-purchase-expires\", \"when-repeated\"] as const,\n }],\n }],\n }],\n }],\n }],\n emails: [{\n themes: [{\n \"12345678-1234-4234-9234-123456789012\": [{\n displayName: [\"Some Theme\", \"Some Other Theme\"],\n tsxSource: [\"\", \"some typescript source code\"],\n }],\n }],\n selectedThemeId: [\"some-theme-id\", \"some-other-theme-id\"],\n templates: [{\n \"12345678-1234-4234-9234-123456789012\": [{\n themeId: [\"some-theme-id\", \"some-other-theme-id\"],\n displayName: [\"Some Template\", \"Some Other Template\"],\n tsxSource: [\"\", \"some typescript source code\"],\n }],\n }],\n }],\n workflows: [{\n availableWorkflows: [{\n \"some-workflow-id\": [{\n displayName: [\"Some Workflow\", \"Some Other Workflow\"],\n tsSource: [\"\", \"some typescript source code\"],\n enabled: [true, false],\n }],\n }],\n }],\n teams: [{\n createPersonalTeamOnSignUp: [true, false],\n allowClientTeamCreation: [true, false],\n }],\n users: [{\n allowClientUserDeletion: [true, false],\n }],\n rbac: [{\n permissions: [{\n \"some_permission_id\": [{\n containedPermissionIds: [{\n \"some_permission_id\": [true],\n \"$some_other_permission_id\": [true],\n }] as const,\n description: [\"Some Permission\", \"Some Other Permission\"],\n scope: [\"team\", \"project\"] as const,\n }],\n }],\n defaultPermissions: [{\n teamCreator: [{\n \"some_permission_id\": [true],\n \"$some_other_permission_id\": [true],\n }] as const,\n teamMember: [{\n \"some_permission_id\": [true],\n \"$some_other_permission_id\": [true],\n }] as const,\n signUp: [{\n \"some_permission_id\": [true],\n \"$some_other_permission_id\": [true],\n }] as const,\n }],\n }],\n domains: [{\n allowLocalhost: [true, false],\n }],\n apps: [{\n installed: [typedFromEntries(typedEntries(ALL_APPS).map(([key, value]) => [key, [{\n enabled: [true, false],\n }]]))],\n }],\n}] satisfies FuzzerConfig<BranchConfigNormalizedOverride>;\n\nconst environmentSchemaFuzzerConfig = [{\n ...branchSchemaFuzzerConfig[0],\n auth: [{\n ...branchSchemaFuzzerConfig[0].auth[0],\n oauth: [{\n ...branchSchemaFuzzerConfig[0].auth[0].oauth[0],\n providers: [typedFromEntries(typedEntries(branchSchemaFuzzerConfig[0].auth[0].oauth[0].providers[0]).map(([key, value]) => [key, [{\n ...value[0],\n isShared: [true, false],\n clientId: [\"some-client-id\"],\n clientSecret: [\"some-client-secret\"],\n facebookConfigId: [\"some-facebook-config-id\"],\n microsoftTenantId: [\"some-microsoft-tenant-id\"],\n }]]))] as const,\n }],\n }],\n domains: [{\n ...branchSchemaFuzzerConfig[0].domains[0],\n trustedDomains: [{\n \"some-domain-id\": [{\n baseUrl: [\"https://example.com/something-here\"],\n handlerPath: [\"/something-here\"],\n }],\n }],\n }],\n emails: [{\n ...branchSchemaFuzzerConfig[0].emails[0],\n server: [{\n isShared: [true, false],\n provider: [\"resend\", \"smtp\"] as const,\n host: [\"example.com\", \"://super weird host that's not valid\"],\n port: [1234, 0.12543, -100, Infinity],\n username: [\"some-username\", \"some username with a space\"],\n password: [\"some-password\", \"some password with a space\"],\n senderName: [\"Some Sender\"],\n senderEmail: [\"some-sender@example.com\", \"some invalid email\"],\n }],\n }],\n}] satisfies FuzzerConfig<EnvironmentConfigNormalizedOverride>;\n\nconst organizationSchemaFuzzerConfig = environmentSchemaFuzzerConfig satisfies FuzzerConfig<OrganizationConfigNormalizedOverride>;\n\nfunction setDeep<T>(obj: T, path: string[], value: any) {\n if (!isObjectLike(obj)) return obj;\n\n if (path.length === 0) {\n throw new Error(\"Path is empty\");\n } else if (path.length === 1) {\n set(obj as any, path[0], value);\n } else {\n const [key, ...rest] = path;\n setDeep(getOrUndefined(obj as any, key), rest, value);\n }\n}\n\nfunction createFuzzerInput<T>(config: FuzzerConfig<T>, progress: number): T {\n progress = Math.min(1, 2 * progress);\n const createShouldRandom = (strength: number) => {\n const chance = Math.random() * strength * 1.2 - 0.1;\n return () => Math.random() < chance;\n };\n const createShouldObjectDependent = (strength: number) => {\n const objectChance = Math.random() * strength * 1.2 - 0.1;\n const primitiveChance = Math.random() * strength * 1.2 - 0.1;\n return (v: any) => Math.random() * Math.random() < (isObjectLike(v) ? objectChance : primitiveChance);\n };\n\n const shouldKeep = createShouldObjectDependent(progress * 1);\n const shouldMakeNested = createShouldObjectDependent(1.25);\n const shouldNull = createShouldRandom(0.25);\n\n let res: any;\n const recurse = <U>(outputPath: string[], config: FuzzerConfig<U>, forceNested: boolean, forceNonNull: boolean) => {\n let subConfig: any = config[Math.floor(Math.random() * config.length)];\n const originalValue = isObjectLike(subConfig) ? (Array.isArray(subConfig) ? [] : {}) : subConfig;\n\n const newValue = forceNonNull || !shouldNull() ? originalValue : null;\n const newOutputPath = forceNested || shouldMakeNested(originalValue) || outputPath.length === 0 ? outputPath : [outputPath.join(\".\")];\n if (outputPath.length === 0) {\n res = newValue;\n } else {\n if (forceNested || shouldKeep(originalValue)) {\n setDeep(res, newOutputPath, newValue);\n }\n }\n if (isObjectLike(subConfig)) {\n for (const [key, newValue] of typedEntries(subConfig)) {\n recurse([...newOutputPath, key], newValue, Array.isArray(subConfig), Array.isArray(subConfig));\n }\n }\n };\n recurse<T>([], config, false, true);\n return res;\n}\n\nundefined?.test(\"fuzz schemas\", async ({ expect }) => {\n const totalIterations = process.env.CI ? 1000 : 200;\n for (let i = 0; i < totalIterations; i++) {\n const projectInput = createFuzzerInput<ProjectConfigNormalizedOverride>(projectSchemaFuzzerConfig, i / totalIterations);\n const branchInput = createFuzzerInput<BranchConfigNormalizedOverride>(branchSchemaFuzzerConfig, i / totalIterations);\n const environmentInput = createFuzzerInput<EnvironmentConfigNormalizedOverride>(environmentSchemaFuzzerConfig, i / totalIterations);\n const organizationInput = createFuzzerInput<OrganizationConfigNormalizedOverride>(organizationSchemaFuzzerConfig, i / totalIterations);\n\n try {\n const projectMigrated = migrateConfigOverride(\"project\", projectInput);\n await assertNoConfigOverrideErrors(projectConfigSchema, projectMigrated);\n const projectOverridden = override({}, projectMigrated);\n await sanitizeProjectConfig(normalize(applyProjectDefaults(projectOverridden), { onDotIntoNonObject: \"ignore\" }) as any);\n\n const branchMigrated = migrateConfigOverride(\"branch\", branchInput);\n await assertNoConfigOverrideErrors(branchConfigSchema, branchMigrated);\n const branchOverridden = override(projectOverridden, branchMigrated);\n await sanitizeBranchConfig(normalize(applyBranchDefaults(branchOverridden), { onDotIntoNonObject: \"ignore\" }) as any);\n\n const environmentMigrated = migrateConfigOverride(\"environment\", environmentInput);\n await assertNoConfigOverrideErrors(environmentConfigSchema, environmentMigrated);\n const environmentOverridden = override(branchOverridden, environmentMigrated);\n await sanitizeEnvironmentConfig(normalize(applyEnvironmentDefaults(environmentOverridden), { onDotIntoNonObject: \"ignore\" }) as any);\n\n const organizationMigrated = migrateConfigOverride(\"organization\", organizationInput);\n await assertNoConfigOverrideErrors(organizationConfigSchema, organizationMigrated);\n const organizationOverridden = override(environmentOverridden, organizationMigrated);\n await sanitizeOrganizationConfig(normalize(applyOrganizationDefaults(organizationOverridden), { onDotIntoNonObject: \"ignore\" }) as any);\n\n } catch (e) {\n const data = {\n cause: e,\n inputs: {\n projectInput,\n branchInput,\n environmentInput,\n organizationInput,\n },\n } as const;\n console.error(\"Failed to fuzz schema in iteration ${i}/${totalIterations}!\", nicify(data));\n throw new StackAssertionError(`Error in iteration ${i}/${totalIterations} of schema fuzz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,MAAM,CAAC,eAAe,sCAAsC;AAAA,MAC5D,MAAM,CAAC,MAAM,SAAS,MAAM,QAAQ;AAAA,MACpC,UAAU,CAAC,iBAAiB,4BAA4B;AAAA,MACxD,UAAU,CAAC,iBAAiB,4BAA4B;AAAA,MACxD,YAAY,CAAC,aAAa;AAAA,MAC1B,aAAa,CAAC,2BAA2B,oBAAoB;AAAA,IAC/D,CAAC;AAAA,EACH,CAAC;AACH,CAAC;","names":[]}
1
+ {"version":3,"sources":["../../src/config/schema-fuzzer.test.ts"],"sourcesContent":["import { ALL_APPS } from \"../apps/apps-config\";\nimport { SUPPORTED_CURRENCIES } from \"../utils/currency-constants\";\nimport { StackAssertionError } from \"../utils/errors\";\nimport { getOrUndefined, isObjectLike, set, typedEntries, typedFromEntries } from \"../utils/objects\";\nimport { nicify } from \"../utils/strings\";\nimport { normalize, override } from \"./format\";\nimport { BranchConfigNormalizedOverride, EnvironmentConfigNormalizedOverride, OrganizationConfigNormalizedOverride, ProjectConfigNormalizedOverride, applyBranchDefaults, applyEnvironmentDefaults, applyOrganizationDefaults, applyProjectDefaults, assertNoConfigOverrideErrors, branchConfigSchema, environmentConfigSchema, migrateConfigOverride, organizationConfigSchema, projectConfigSchema, sanitizeBranchConfig, sanitizeEnvironmentConfig, sanitizeOrganizationConfig, sanitizeProjectConfig } from \"./schema\";\n\ntype FuzzerConfig<T> = ReadonlyArray<T extends object ? ([T] extends [any[]] ? { readonly [K in keyof T]: FuzzerConfig<T[K]> } : Required<{\n [K in keyof T]: FuzzerConfig<T[K]>;\n}> & Record<string, FuzzerConfig<any>>) : T>;\n\nconst projectSchemaFuzzerConfig = [{\n sourceOfTruth: [{\n type: [\"hosted\", \"neon\", \"postgres\"],\n connectionString: [\"\", \"postgres://user:password@host:port/database\", \"THIS IS A STRING LOLOL\"],\n connectionStrings: [{\n \"123-some-branch-id\": [\"\", \"THIS IS A CONNECTION STRING OR SO\"],\n }],\n }],\n}] satisfies FuzzerConfig<ProjectConfigNormalizedOverride>;\n\nconst branchSchemaFuzzerConfig = [{\n apiKeys: [{\n enabled: [{\n team: [true, false],\n user: [true, false],\n }],\n }],\n auth: [{\n allowSignUp: [true, false],\n password: [{\n allowSignIn: [true, false],\n }],\n otp: [{\n allowSignIn: [true, false],\n }],\n passkey: [{\n allowSignIn: [true, false],\n }],\n oauth: [{\n accountMergeStrategy: [\"link_method\", \"raise_error\", \"allow_duplicates\"],\n providers: [{\n \"google\": [{\n type: [\"google\", \"github\", \"x\"] as const,\n allowSignIn: [true, false],\n allowConnectedAccounts: [true, false],\n }],\n }],\n }],\n }],\n dataVault: [{\n stores: [{\n \"some-store-id\": [{\n displayName: [\"Some Store\", \"Some Other Store\"],\n }],\n \"some-other-store-id\": [{\n displayName: [\"Some Store\", \"Some Other Store\"],\n }],\n }],\n }],\n payments: [{\n testMode: [false, true],\n autoPay: [{\n interval: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n }],\n catalogs: [{\n \"some-catalog-id\": [{\n displayName: [\"Some Catalog\", \"Some Other Catalog\"],\n }],\n }],\n groups: [{\n \"some-catalog-id\": [{\n displayName: [\"Some Catalog\", \"Some Other Catalog\"],\n }],\n }],\n items: [{\n \"some-item-id\": [{\n customerType: [\"user\", \"team\", \"custom\"] as const,\n displayName: [\"Some Item\", \"Some Other Item\"],\n }],\n }],\n products: [{\n \"some-product-id\": [{\n displayName: [\"Some Product\", \"Some Other Product\"],\n customerType: [\"user\", \"team\", \"custom\"] as const,\n freeTrial: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n serverOnly: [true, false],\n stackable: [true, false],\n catalogId: [\"some-catalog-id\", \"some-other-catalog-id\"],\n groupId: [\"some-catalog-id\", \"some-other-catalog-id\"], // ensure migration works\n isAddOnTo: [false, { \"some-product-id\": [true], \"some-other-product-id\": [true] }] as const,\n prices: [\"include-by-default\" as \"include-by-default\", {\n \"some-price-id\": [{\n ...typedFromEntries(SUPPORTED_CURRENCIES.map(currency => [currency.code, [\"100_00\", \"not a number\", \"Infinity\", \"0\"]])),\n interval: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n serverOnly: [true, false],\n freeTrial: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n }],\n }],\n includedItems: [{\n \"some-item-id\": [{\n quantity: [0, 1, -3, 100, 0.333, Infinity],\n repeat: [\"never\", [[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n expires: [\"never\", \"when-purchase-expires\", \"when-repeated\"] as const,\n }],\n }],\n }],\n }],\n }],\n emails: [{\n themes: [{\n \"12345678-1234-4234-9234-123456789012\": [{\n displayName: [\"Some Theme\", \"Some Other Theme\"],\n tsxSource: [\"\", \"some typescript source code\"],\n }],\n }],\n selectedThemeId: [\"some-theme-id\", \"some-other-theme-id\"],\n templates: [{\n \"12345678-1234-4234-9234-123456789012\": [{\n themeId: [\"some-theme-id\", \"some-other-theme-id\"],\n displayName: [\"Some Template\", \"Some Other Template\"],\n tsxSource: [\"\", \"some typescript source code\"],\n }],\n }],\n }],\n teams: [{\n createPersonalTeamOnSignUp: [true, false],\n allowClientTeamCreation: [true, false],\n }],\n users: [{\n allowClientUserDeletion: [true, false],\n }],\n rbac: [{\n permissions: [{\n \"some_permission_id\": [{\n containedPermissionIds: [{\n \"some_permission_id\": [true],\n \"$some_other_permission_id\": [true],\n }] as const,\n description: [\"Some Permission\", \"Some Other Permission\"],\n scope: [\"team\", \"project\"] as const,\n }],\n }],\n defaultPermissions: [{\n teamCreator: [{\n \"some_permission_id\": [true],\n \"$some_other_permission_id\": [true],\n }] as const,\n teamMember: [{\n \"some_permission_id\": [true],\n \"$some_other_permission_id\": [true],\n }] as const,\n signUp: [{\n \"some_permission_id\": [true],\n \"$some_other_permission_id\": [true],\n }] as const,\n }],\n }],\n domains: [{\n allowLocalhost: [true, false],\n }],\n apps: [{\n installed: [typedFromEntries(typedEntries(ALL_APPS).map(([key, value]) => [key, [{\n enabled: [true, false],\n }]]))],\n }],\n}] satisfies FuzzerConfig<BranchConfigNormalizedOverride>;\n\nconst environmentSchemaFuzzerConfig = [{\n ...branchSchemaFuzzerConfig[0],\n auth: [{\n ...branchSchemaFuzzerConfig[0].auth[0],\n oauth: [{\n ...branchSchemaFuzzerConfig[0].auth[0].oauth[0],\n providers: [typedFromEntries(typedEntries(branchSchemaFuzzerConfig[0].auth[0].oauth[0].providers[0]).map(([key, value]) => [key, [{\n ...value[0],\n isShared: [true, false],\n clientId: [\"some-client-id\"],\n clientSecret: [\"some-client-secret\"],\n facebookConfigId: [\"some-facebook-config-id\"],\n microsoftTenantId: [\"some-microsoft-tenant-id\"],\n }]]))] as const,\n }],\n }],\n domains: [{\n ...branchSchemaFuzzerConfig[0].domains[0],\n trustedDomains: [{\n \"some-domain-id\": [{\n baseUrl: [\"https://example.com/something-here\"],\n handlerPath: [\"/something-here\"],\n }],\n }],\n }],\n emails: [{\n ...branchSchemaFuzzerConfig[0].emails[0],\n server: [{\n isShared: [true, false],\n provider: [\"resend\", \"smtp\"] as const,\n host: [\"example.com\", \"://super weird host that's not valid\"],\n port: [1234, 0.12543, -100, Infinity],\n username: [\"some-username\", \"some username with a space\"],\n password: [\"some-password\", \"some password with a space\"],\n senderName: [\"Some Sender\"],\n senderEmail: [\"some-sender@example.com\", \"some invalid email\"],\n }],\n }],\n}] satisfies FuzzerConfig<EnvironmentConfigNormalizedOverride>;\n\nconst organizationSchemaFuzzerConfig = environmentSchemaFuzzerConfig satisfies FuzzerConfig<OrganizationConfigNormalizedOverride>;\n\nfunction setDeep<T>(obj: T, path: string[], value: any) {\n if (!isObjectLike(obj)) return obj;\n\n if (path.length === 0) {\n throw new Error(\"Path is empty\");\n } else if (path.length === 1) {\n set(obj as any, path[0], value);\n } else {\n const [key, ...rest] = path;\n setDeep(getOrUndefined(obj as any, key), rest, value);\n }\n}\n\nfunction createFuzzerInput<T>(config: FuzzerConfig<T>, progress: number): T {\n progress = Math.min(1, 2 * progress);\n const createShouldRandom = (strength: number) => {\n const chance = Math.random() * strength * 1.2 - 0.1;\n return () => Math.random() < chance;\n };\n const createShouldObjectDependent = (strength: number) => {\n const objectChance = Math.random() * strength * 1.2 - 0.1;\n const primitiveChance = Math.random() * strength * 1.2 - 0.1;\n return (v: any) => Math.random() * Math.random() < (isObjectLike(v) ? objectChance : primitiveChance);\n };\n\n const shouldKeep = createShouldObjectDependent(progress * 1);\n const shouldMakeNested = createShouldObjectDependent(1.25);\n const shouldNull = createShouldRandom(0.25);\n\n let res: any;\n const recurse = <U>(outputPath: string[], config: FuzzerConfig<U>, forceNested: boolean, forceNonNull: boolean) => {\n let subConfig: any = config[Math.floor(Math.random() * config.length)];\n const originalValue = isObjectLike(subConfig) ? (Array.isArray(subConfig) ? [] : {}) : subConfig;\n\n const newValue = forceNonNull || !shouldNull() ? originalValue : null;\n const newOutputPath = forceNested || shouldMakeNested(originalValue) || outputPath.length === 0 ? outputPath : [outputPath.join(\".\")];\n if (outputPath.length === 0) {\n res = newValue;\n } else {\n if (forceNested || shouldKeep(originalValue)) {\n setDeep(res, newOutputPath, newValue);\n }\n }\n if (isObjectLike(subConfig)) {\n for (const [key, newValue] of typedEntries(subConfig)) {\n recurse([...newOutputPath, key], newValue, Array.isArray(subConfig), Array.isArray(subConfig));\n }\n }\n };\n recurse<T>([], config, false, true);\n return res;\n}\n\nundefined?.test(\"fuzz schemas\", async ({ expect }) => {\n const totalIterations = process.env.CI ? 1000 : 200;\n for (let i = 0; i < totalIterations; i++) {\n const projectInput = createFuzzerInput<ProjectConfigNormalizedOverride>(projectSchemaFuzzerConfig, i / totalIterations);\n const branchInput = createFuzzerInput<BranchConfigNormalizedOverride>(branchSchemaFuzzerConfig, i / totalIterations);\n const environmentInput = createFuzzerInput<EnvironmentConfigNormalizedOverride>(environmentSchemaFuzzerConfig, i / totalIterations);\n const organizationInput = createFuzzerInput<OrganizationConfigNormalizedOverride>(organizationSchemaFuzzerConfig, i / totalIterations);\n\n try {\n const projectMigrated = migrateConfigOverride(\"project\", projectInput);\n await assertNoConfigOverrideErrors(projectConfigSchema, projectMigrated);\n const projectOverridden = override({}, projectMigrated);\n await sanitizeProjectConfig(normalize(applyProjectDefaults(projectOverridden), { onDotIntoNonObject: \"ignore\" }) as any);\n\n const branchMigrated = migrateConfigOverride(\"branch\", branchInput);\n await assertNoConfigOverrideErrors(branchConfigSchema, branchMigrated);\n const branchOverridden = override(projectOverridden, branchMigrated);\n await sanitizeBranchConfig(normalize(applyBranchDefaults(branchOverridden), { onDotIntoNonObject: \"ignore\" }) as any);\n\n const environmentMigrated = migrateConfigOverride(\"environment\", environmentInput);\n await assertNoConfigOverrideErrors(environmentConfigSchema, environmentMigrated);\n const environmentOverridden = override(branchOverridden, environmentMigrated);\n await sanitizeEnvironmentConfig(normalize(applyEnvironmentDefaults(environmentOverridden), { onDotIntoNonObject: \"ignore\" }) as any);\n\n const organizationMigrated = migrateConfigOverride(\"organization\", organizationInput);\n await assertNoConfigOverrideErrors(organizationConfigSchema, organizationMigrated);\n const organizationOverridden = override(environmentOverridden, organizationMigrated);\n await sanitizeOrganizationConfig(normalize(applyOrganizationDefaults(organizationOverridden), { onDotIntoNonObject: \"ignore\" }) as any);\n\n } catch (e) {\n const data = {\n cause: e,\n inputs: {\n projectInput,\n branchInput,\n environmentInput,\n organizationInput,\n },\n } as const;\n console.error(\"Failed to fuzz schema in iteration ${i}/${totalIterations}!\", nicify(data));\n throw new StackAssertionError(`Error in iteration ${i}/${totalIterations} of schema fuzz: ${e}`, { cause: e });\n }\n }\n});\n"],"mappings":";;;AAAA,yBAAyB;AACzB,gCAAqC;AACrC,oBAAoC;AACpC,qBAAkF;AAClF,qBAAuB;AACvB,oBAAoC;AACpC,oBAAgf;AAgBhf,IAAM,2BAA2B,CAAC;AAAA,EAChC,SAAS,CAAC;AAAA,IACR,SAAS,CAAC;AAAA,MACR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