@hexclave/shared 1.0.61 → 1.0.62
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/{admin-interface-ChuyYSXj.d.ts → admin-interface-D63SFHX_.d.ts} +94 -12
- package/dist/admin-interface-D63SFHX_.d.ts.map +1 -0
- package/dist/{admin-metrics-1yiWGq9z.d.ts → admin-metrics-bsOkw4YQ.d.ts} +15 -15
- package/dist/{admin-metrics-1yiWGq9z.d.ts.map → admin-metrics-bsOkw4YQ.d.ts.map} +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt-parts/deployments-skill.d.ts +5 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/deployments-skill.d.ts.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/deployments-skill.js +128 -0
- package/dist/ai/unified-prompts/skill-site-prompt-parts/deployments-skill.js.map +1 -0
- package/dist/ai/unified-prompts/skill-site-prompt.d.ts +3 -1
- package/dist/ai/unified-prompts/skill-site-prompt.d.ts.map +1 -1
- package/dist/ai/unified-prompts/skill-site-prompt.js +11 -0
- package/dist/ai/unified-prompts/skill-site-prompt.js.map +1 -1
- package/dist/apps/apps-config.d.ts +6 -0
- package/dist/apps/apps-config.d.ts.map +1 -1
- package/dist/apps/apps-config.js +6 -0
- package/dist/apps/apps-config.js.map +1 -1
- package/dist/{client-interface-C4H4gn_G.d.ts → client-interface-DvkciaL0.d.ts} +10 -10
- package/dist/{client-interface-C4H4gn_G.d.ts.map → client-interface-DvkciaL0.d.ts.map} +1 -1
- package/dist/config/schema-fuzzer.test.js +38 -1
- package/dist/config/schema-fuzzer.test.js.map +1 -1
- package/dist/config/schema.d.ts +2 -2
- package/dist/config/schema.js +45 -0
- package/dist/config/schema.js.map +1 -1
- package/dist/config-authoring.d.ts +1 -1
- package/dist/{current-user-BCkMYzHx.d.ts → current-user-BBoN3hsn.d.ts} +17 -17
- package/dist/{current-user-BCkMYzHx.d.ts.map → current-user-BBoN3hsn.d.ts.map} +1 -1
- package/dist/{email-outbox-BRZiK0ZG.d.ts → email-outbox-CqzwInBL.d.ts} +313 -313
- package/dist/{email-outbox-BRZiK0ZG.d.ts.map → email-outbox-CqzwInBL.d.ts.map} +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/ai-setup-prompt.js +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/deployments-skill.d.ts +5 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/deployments-skill.d.ts.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/deployments-skill.js +128 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt-parts/deployments-skill.js.map +1 -0
- package/dist/esm/ai/unified-prompts/skill-site-prompt.d.ts +3 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt.d.ts.map +1 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt.js +10 -1
- package/dist/esm/ai/unified-prompts/skill-site-prompt.js.map +1 -1
- package/dist/esm/apps/apps-config.d.ts +6 -0
- package/dist/esm/apps/apps-config.d.ts.map +1 -1
- package/dist/esm/apps/apps-config.js +6 -0
- package/dist/esm/apps/apps-config.js.map +1 -1
- package/dist/esm/config/schema-fuzzer.test.js +38 -1
- package/dist/esm/config/schema-fuzzer.test.js.map +1 -1
- package/dist/esm/config/schema.d.ts +249 -119
- package/dist/esm/config/schema.d.ts.map +1 -1
- package/dist/esm/config/schema.js +42 -1
- package/dist/esm/config/schema.js.map +1 -1
- package/dist/esm/interface/admin-interface.d.ts +83 -1
- package/dist/esm/interface/admin-interface.d.ts.map +1 -1
- package/dist/esm/interface/admin-interface.js +48 -0
- package/dist/esm/interface/admin-interface.js.map +1 -1
- package/dist/esm/interface/admin-metrics.d.ts +14 -14
- package/dist/esm/interface/conversations.d.ts +37 -37
- package/dist/esm/interface/crud/current-user.d.ts +16 -16
- package/dist/esm/interface/crud/email-outbox.d.ts +312 -312
- package/dist/esm/interface/crud/invoices.d.ts +2 -2
- package/dist/esm/interface/crud/products.d.ts +23 -23
- package/dist/esm/interface/crud/project-api-keys.d.ts +4 -4
- package/dist/esm/interface/crud/projects.d.ts +59 -59
- package/dist/esm/interface/crud/team-member-profiles.d.ts +32 -32
- package/dist/esm/interface/crud/transactions.d.ts +29 -29
- package/dist/esm/interface/crud/transactions.d.ts.map +1 -1
- package/dist/esm/interface/crud/users.d.ts +22 -22
- package/dist/esm/interface/plan-usage.d.ts +1 -1
- package/dist/esm/interface/webhooks.d.ts +4 -4
- package/dist/esm/known-errors.d.ts +4 -4
- package/dist/esm/schema-fields.d.ts +12 -12
- package/dist/esm/sessions.d.ts +9 -9
- package/dist/esm/utils/tar.d.ts +26 -0
- package/dist/esm/utils/tar.d.ts.map +1 -0
- package/dist/esm/utils/tar.js +136 -0
- package/dist/esm/utils/tar.js.map +1 -0
- package/dist/helpers/password.d.ts +1 -1
- package/dist/helpers/production-mode.d.ts +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/interface/admin-interface.d.ts +3 -3
- package/dist/interface/admin-interface.js +48 -0
- package/dist/interface/admin-interface.js.map +1 -1
- package/dist/interface/admin-metrics.d.ts +1 -1
- package/dist/interface/client-interface.d.ts +1 -1
- package/dist/interface/conversations.d.ts +37 -37
- package/dist/interface/crud/current-user.d.ts +1 -1
- package/dist/interface/crud/email-outbox.d.ts +1 -1
- package/dist/interface/crud/invoices.d.ts +1 -1
- package/dist/interface/crud/products.d.ts +1 -1
- package/dist/interface/crud/project-api-keys.d.ts +1 -1
- package/dist/interface/crud/projects.d.ts +1 -1
- package/dist/interface/crud/team-member-profiles.d.ts +1 -1
- package/dist/interface/crud/transactions.d.ts +1 -1
- package/dist/interface/crud/users.d.ts +1 -1
- package/dist/interface/plan-usage.d.ts +1 -1
- package/dist/interface/server-interface.d.ts +1 -1
- package/dist/interface/webhooks.d.ts +1 -1
- package/dist/{invoices-BGLLnTlR.d.ts → invoices-CHo9YKbI.d.ts} +3 -3
- package/dist/{invoices-BGLLnTlR.d.ts.map → invoices-CHo9YKbI.d.ts.map} +1 -1
- package/dist/{known-errors-Bhd0JAgh.d.ts → known-errors-Bm4a61wL.d.ts} +5 -5
- package/dist/{known-errors-Bhd0JAgh.d.ts.map → known-errors-Bm4a61wL.d.ts.map} +1 -1
- package/dist/known-errors.d.ts +1 -1
- package/dist/{plan-usage-COq9I00z.d.ts → plan-usage-BaDxcLZ1.d.ts} +2 -2
- package/dist/{plan-usage-COq9I00z.d.ts.map → plan-usage-BaDxcLZ1.d.ts.map} +1 -1
- package/dist/{products-BkPf1X78.d.ts → products-D4o8A2W0.d.ts} +24 -24
- package/dist/{products-BkPf1X78.d.ts.map → products-D4o8A2W0.d.ts.map} +1 -1
- package/dist/{project-api-keys-CK9SIo0q.d.ts → project-api-keys--7V5X_UW.d.ts} +5 -5
- package/dist/{project-api-keys-CK9SIo0q.d.ts.map → project-api-keys--7V5X_UW.d.ts.map} +1 -1
- package/dist/{projects-CVqfljhv.d.ts → projects-BX5Y50kJ.d.ts} +60 -60
- package/dist/{projects-CVqfljhv.d.ts.map → projects-BX5Y50kJ.d.ts.map} +1 -1
- package/dist/{schema-BPMGhu_7.d.ts → schema-dJ_7rUCO.d.ts} +250 -120
- package/dist/schema-dJ_7rUCO.d.ts.map +1 -0
- package/dist/{schema-fields-C8sIQVTq.d.ts → schema-fields-DZtDQEEO.d.ts} +13 -13
- package/dist/{schema-fields-C8sIQVTq.d.ts.map → schema-fields-DZtDQEEO.d.ts.map} +1 -1
- package/dist/schema-fields.d.ts +1 -1
- package/dist/{server-interface-CRp4VVZh.d.ts → server-interface-Ra_vIHP4.d.ts} +8 -8
- package/dist/{server-interface-CRp4VVZh.d.ts.map → server-interface-Ra_vIHP4.d.ts.map} +1 -1
- package/dist/{sessions-COluKK6_.d.ts → sessions-CI-0TBQb.d.ts} +11 -11
- package/dist/{sessions-COluKK6_.d.ts.map → sessions-CI-0TBQb.d.ts.map} +1 -1
- package/dist/sessions.d.ts +1 -1
- package/dist/{team-member-profiles-CgYXR-Rx.d.ts → team-member-profiles-BoDEqx-0.d.ts} +33 -33
- package/dist/{team-member-profiles-CgYXR-Rx.d.ts.map → team-member-profiles-BoDEqx-0.d.ts.map} +1 -1
- package/dist/{transactions-7q13mxhG.d.ts → transactions-CHNUJ42J.d.ts} +30 -30
- package/dist/transactions-CHNUJ42J.d.ts.map +1 -0
- package/dist/{users-7MKfEyyq.d.ts → users-DHNRwoSz.d.ts} +24 -24
- package/dist/{users-7MKfEyyq.d.ts.map → users-DHNRwoSz.d.ts.map} +1 -1
- package/dist/utils/tar.d.ts +26 -0
- package/dist/utils/tar.d.ts.map +1 -0
- package/dist/utils/tar.js +138 -0
- package/dist/utils/tar.js.map +1 -0
- package/dist/{webhooks-C5gG85Ce.d.ts → webhooks-8Ts1Clcb.d.ts} +5 -5
- package/dist/{webhooks-C5gG85Ce.d.ts.map → webhooks-8Ts1Clcb.d.ts.map} +1 -1
- package/package.json +1 -1
- package/src/ai/unified-prompts/skill-site-prompt-parts/deployments-skill.ts +128 -0
- package/src/ai/unified-prompts/skill-site-prompt.ts +15 -0
- package/src/apps/apps-config.ts +9 -0
- package/src/config/schema-fuzzer.test.ts +37 -0
- package/src/config/schema.ts +193 -0
- package/src/interface/admin-interface.ts +173 -0
- package/src/utils/tar.tsx +261 -0
- package/dist/admin-interface-ChuyYSXj.d.ts.map +0 -1
- package/dist/schema-BPMGhu_7.d.ts.map +0 -1
- package/dist/transactions-7q13mxhG.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"email-outbox-
|
|
1
|
+
{"version":3,"file":"email-outbox-CqzwInBL.d.ts","names":[],"sources":["../src/interface/crud/email-outbox.ts"],"mappings":";;;cAiNa,qBAAA,gBAAqB,WAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAsBD,eAAA,GAAkB,UAAU,QAAQ,eAAA"}
|
|
@@ -4,7 +4,7 @@ import { typedEntries } from "../../../utils/objects.js";
|
|
|
4
4
|
import { deindent } from "../../../utils/strings.js";
|
|
5
5
|
import { remindersPrompt } from "../reminders.js";
|
|
6
6
|
//#region package.json
|
|
7
|
-
var version = "1.0.
|
|
7
|
+
var version = "1.0.62";
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region \0@oxc-project+runtime@0.137.0/helpers/esm/taggedTemplateLiteral.js
|
|
10
10
|
function _taggedTemplateLiteral(e, t) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployments-skill.d.ts","names":[],"sources":["../../../../../src/ai/unified-prompts/skill-site-prompt-parts/deployments-skill.ts"],"mappings":";cAMa,uBAAA"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { deindent } from "../../../utils/strings.js";
|
|
2
|
+
//#region src/ai/unified-prompts/skill-site-prompt-parts/deployments-skill.ts
|
|
3
|
+
const deploymentsSkillSection = deindent`
|
|
4
|
+
# Hexclave Deployments
|
|
5
|
+
|
|
6
|
+
The Deployments app makes deploying a service very easy. You select a type of service to deploy and provide your code, build instructions, run instructions, environment variables, and the code framework. You can set up multiple deployments per Hexclave project — for example, a backend service and a frontend service. Once a service is deployed, it is publicly accessible.
|
|
7
|
+
|
|
8
|
+
For this iteration of the Deployments app, only the \`vercel\` service type is available. It can be used to set up serverless deployments.
|
|
9
|
+
|
|
10
|
+
To use Hexclave Deployments, you must do a few things. First, the Deployments app must be enabled, by adding \`deployments-alpha\` under \`apps.installed\`. Second, you must edit your \`hexclave.config.ts\` file to add the relevant configuration, as specified below. Both keys are \`deployments-alpha\`, not \`deployments\` — the app is in alpha and its id says so. Because of the hyphen, quote it.
|
|
11
|
+
|
|
12
|
+
## Config
|
|
13
|
+
|
|
14
|
+
\`\`\`ts title="hexclave.config.ts"
|
|
15
|
+
import type { HexclaveConfig } from "@hexclave/js/config"; // replace \`js\` with the correct framework SDK package
|
|
16
|
+
|
|
17
|
+
export const config: HexclaveConfig = {
|
|
18
|
+
apps: {
|
|
19
|
+
installed: {
|
|
20
|
+
authentication: { enabled: true },
|
|
21
|
+
"deployments-alpha": { enabled: true },
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
"deployments-alpha": {
|
|
25
|
+
services: {
|
|
26
|
+
web: {
|
|
27
|
+
type: "vercel",
|
|
28
|
+
rootDirectory: "./",
|
|
29
|
+
framework: "nextjs",
|
|
30
|
+
installCommand: "pnpm install",
|
|
31
|
+
buildCommand: "pnpm build",
|
|
32
|
+
outputDirectory: ".next",
|
|
33
|
+
env: {
|
|
34
|
+
"MY_ENV_VAR": { value: "true" },
|
|
35
|
+
"DATABASE_CONNECTION_STRING": { type: "secret", key: "db_connection" },
|
|
36
|
+
"NEXT_PUBLIC_HEXCLAVE_PROJECT_ID": { type: "connection", value: "hexclave.projectId" },
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
\`\`\`
|
|
43
|
+
|
|
44
|
+
Here, \`web\` is the name of your service. \`type\` refers to the type of service you want to set up; for now, as mentioned earlier, only \`vercel\` is supported. \`rootDirectory\` is the directory in which the install and build commands are run, and where the code for your service is found. \`installCommand\` is the command run to install your application's dependencies, and \`buildCommand\` is what is run to build the necessary packages and files. \`framework\` is the framework used by your service; from it and \`outputDirectory\`, the run command is inferred.
|
|
45
|
+
|
|
46
|
+
The \`HexclaveConfig\` annotation requires the SDK package it is imported from to be a dependency of the project. If it isn't, either install it or drop the annotation (the config is plain TypeScript — the CLI does not type-check it).
|
|
47
|
+
|
|
48
|
+
Note also that the config file usually sits inside \`rootDirectory\`, which means it is uploaded with your source and compiled by the remote build like any other file. If the deployed app doesn't depend on the Hexclave SDK, add \`hexclave.config.ts\` to \`.vercelignore\`: the CLI reads the config from disk before packaging, so the build itself never needs it, and excluding it keeps an SDK import in the config from breaking a build that is otherwise unrelated to Hexclave.
|
|
49
|
+
|
|
50
|
+
## Domains
|
|
51
|
+
|
|
52
|
+
Every Vercel service gets a Vercel domain autoprovisioned. If you want to attach a custom domain, there are two ways to do so.
|
|
53
|
+
|
|
54
|
+
**Option 1 — the dashboard.** Visit \`https://app.hexclave.com/projects/<project-id>/deployments\`, click the service of choice, go to the Domains tab, add your domain, and then create the returned DNS records at your DNS provider.
|
|
55
|
+
|
|
56
|
+
**Option 2 — the CLI.** Here is an example of adding \`app.example.com\` to the service \`api\` and receiving the DNS records that then need to be set with your DNS provider:
|
|
57
|
+
|
|
58
|
+
\`\`\`sh title="Terminal"
|
|
59
|
+
npx @hexclave/cli@latest exec --cloud-project-id <project-id> \\
|
|
60
|
+
"const p = await hexclaveServerApp.getProject(); \\
|
|
61
|
+
await p.addDeploymentServiceDomain('api', 'app.example.com'); \\
|
|
62
|
+
return p.getDeploymentServiceDomain('api', 'app.example.com');"
|
|
63
|
+
\`\`\`
|
|
64
|
+
|
|
65
|
+
## Deploying
|
|
66
|
+
|
|
67
|
+
Before deploying, run the service's \`installCommand\` and \`buildCommand\` locally and confirm they succeed. The remote build runs the same commands, but \`deploy\` exits before the build finishes, so a broken build does not fail the command — it surfaces only when you check the run afterwards.
|
|
68
|
+
|
|
69
|
+
From the directory containing your config file:
|
|
70
|
+
|
|
71
|
+
\`\`\`sh title="Terminal"
|
|
72
|
+
npx @hexclave/cli@latest deploy web --secret db_connection="$DATABASE_URL"
|
|
73
|
+
\`\`\`
|
|
74
|
+
|
|
75
|
+
The CLI packages the service's root directory (respecting \`.gitignore\` and \`.vercelignore\`, and always excluding \`node_modules\` and \`.git\`), uploads it, and starts a remote build. Without a config file, the configuration stored in Hexclave governs the deploy, with the root directory resolved against the current directory. It always deploys to production, never prompts, and exits as soon as the build is queued, printing the run id. Follow the build in the dashboard's Deployments tab.
|
|
76
|
+
|
|
77
|
+
Every secret defined in the service's \`env\` must be passed via \`--secret\` on every deploy — a missing (or misspelled) one fails the deploy before anything is uploaded.
|
|
78
|
+
|
|
79
|
+
Options: \`--config <path>\` (default: auto-discover \`hexclave.config.ts\` in the current directory, dashboard configuration otherwise), \`--cloud-project-id <id>\` (default: the \`HEXCLAVE_PROJECT_ID\` env var), and \`--secret KEY=VALUE\` (repeatable, see above).
|
|
80
|
+
|
|
81
|
+
You can also deploy through GitHub Actions, like so:
|
|
82
|
+
|
|
83
|
+
\`\`\`yaml title=".github/workflows/deploy.yaml"
|
|
84
|
+
- run: npm i -g @hexclave/cli
|
|
85
|
+
- run: hexclave deploy web --secret db_connection="$DATABASE_URL"
|
|
86
|
+
env:
|
|
87
|
+
HEXCLAVE_PROJECT_ID: \${{ secrets.HEXCLAVE_PROJECT_ID }}
|
|
88
|
+
HEXCLAVE_SECRET_SERVER_KEY: \${{ secrets.HEXCLAVE_SECRET_SERVER_KEY }}
|
|
89
|
+
DATABASE_URL: \${{ secrets.DATABASE_URL }}
|
|
90
|
+
\`\`\`
|
|
91
|
+
|
|
92
|
+
## Checking status and debugging failures
|
|
93
|
+
|
|
94
|
+
Because \`deploy\` returns as soon as the build is queued, a successful exit does not mean the deploy succeeded. Check the service to find out:
|
|
95
|
+
|
|
96
|
+
\`\`\`sh title="Terminal"
|
|
97
|
+
npx @hexclave/cli@latest exec --cloud-project-id <project-id> \\
|
|
98
|
+
"const p = await hexclaveServerApp.getProject(); \\
|
|
99
|
+
const svc = (await p.listDeploymentServices()).find(s => s.id === 'web'); \\
|
|
100
|
+
return { status: svc.status, url: svc.url, run: svc.latest_run };"
|
|
101
|
+
\`\`\`
|
|
102
|
+
|
|
103
|
+
A service's \`status\` is one of \`not_deployed\`, \`queued\`, \`building\`, \`deployed\`, \`failed\`, or \`canceled\`; a run's is \`queued\`, \`building\`, \`ready\`, \`error\`, or \`canceled\`. Poll until the run leaves \`queued\`/\`building\`.
|
|
104
|
+
|
|
105
|
+
A failed run's \`error\` field is only a one-line summary (for example \`Command "npm run build" exited with 1\`). Do not try to guess the cause from it, and do not reproduce the build locally to find out — fetch the actual build output by run id:
|
|
106
|
+
|
|
107
|
+
\`\`\`sh title="Terminal"
|
|
108
|
+
npx @hexclave/cli@latest exec --cloud-project-id <project-id> \\
|
|
109
|
+
"const p = await hexclaveServerApp.getProject(); \\
|
|
110
|
+
return p.getDeploymentRunLogs('<run-id>');"
|
|
111
|
+
\`\`\`
|
|
112
|
+
|
|
113
|
+
\`deploy\` prints the run id it started. If you don't have one, \`listDeploymentRuns('web', { limit: 5 })\` returns the most recent runs, newest first — call it through \`exec\` like the snippets above.
|
|
114
|
+
|
|
115
|
+
## Deleting a service
|
|
116
|
+
|
|
117
|
+
If you want to delete a deployed service, you can do so through the dashboard, or through the CLI like so:
|
|
118
|
+
|
|
119
|
+
\`\`\`sh title="Terminal"
|
|
120
|
+
npx @hexclave/cli@latest exec --cloud-project-id <project-id> \\
|
|
121
|
+
"const p = await hexclaveServerApp.getProject(); \\
|
|
122
|
+
await p.deleteDeploymentService('api');"
|
|
123
|
+
\`\`\`
|
|
124
|
+
`;
|
|
125
|
+
//#endregion
|
|
126
|
+
export { deploymentsSkillSection };
|
|
127
|
+
|
|
128
|
+
//# sourceMappingURL=deployments-skill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deployments-skill.js","names":[],"sources":["../../../../../src/ai/unified-prompts/skill-site-prompt-parts/deployments-skill.ts"],"sourcesContent":["import { deindent } from \"../../../utils/strings\";\n\n// The Deployments-specific addendum served at https://skill.hexclave.com/deployments.\n// It is appended verbatim after the full base skill, so this section assumes the\n// reader already has the general Hexclave skill (CLI auth, config format, SDKs) in\n// context and only teaches what is specific to the Deployments app.\nexport const deploymentsSkillSection = deindent`\n # Hexclave Deployments\n\n The Deployments app makes deploying a service very easy. You select a type of service to deploy and provide your code, build instructions, run instructions, environment variables, and the code framework. You can set up multiple deployments per Hexclave project — for example, a backend service and a frontend service. Once a service is deployed, it is publicly accessible.\n\n For this iteration of the Deployments app, only the \\`vercel\\` service type is available. It can be used to set up serverless deployments.\n\n To use Hexclave Deployments, you must do a few things. First, the Deployments app must be enabled, by adding \\`deployments-alpha\\` under \\`apps.installed\\`. Second, you must edit your \\`hexclave.config.ts\\` file to add the relevant configuration, as specified below. Both keys are \\`deployments-alpha\\`, not \\`deployments\\` — the app is in alpha and its id says so. Because of the hyphen, quote it.\n\n ## Config\n\n \\`\\`\\`ts title=\"hexclave.config.ts\"\n import type { HexclaveConfig } from \"@hexclave/js/config\"; // replace \\`js\\` with the correct framework SDK package\n\n export const config: HexclaveConfig = {\n apps: {\n installed: {\n authentication: { enabled: true },\n \"deployments-alpha\": { enabled: true },\n },\n },\n \"deployments-alpha\": {\n services: {\n web: {\n type: \"vercel\",\n rootDirectory: \"./\",\n framework: \"nextjs\",\n installCommand: \"pnpm install\",\n buildCommand: \"pnpm build\",\n outputDirectory: \".next\",\n env: {\n \"MY_ENV_VAR\": { value: \"true\" },\n \"DATABASE_CONNECTION_STRING\": { type: \"secret\", key: \"db_connection\" },\n \"NEXT_PUBLIC_HEXCLAVE_PROJECT_ID\": { type: \"connection\", value: \"hexclave.projectId\" },\n },\n },\n },\n },\n };\n \\`\\`\\`\n\n Here, \\`web\\` is the name of your service. \\`type\\` refers to the type of service you want to set up; for now, as mentioned earlier, only \\`vercel\\` is supported. \\`rootDirectory\\` is the directory in which the install and build commands are run, and where the code for your service is found. \\`installCommand\\` is the command run to install your application's dependencies, and \\`buildCommand\\` is what is run to build the necessary packages and files. \\`framework\\` is the framework used by your service; from it and \\`outputDirectory\\`, the run command is inferred.\n\n The \\`HexclaveConfig\\` annotation requires the SDK package it is imported from to be a dependency of the project. If it isn't, either install it or drop the annotation (the config is plain TypeScript — the CLI does not type-check it).\n\n Note also that the config file usually sits inside \\`rootDirectory\\`, which means it is uploaded with your source and compiled by the remote build like any other file. If the deployed app doesn't depend on the Hexclave SDK, add \\`hexclave.config.ts\\` to \\`.vercelignore\\`: the CLI reads the config from disk before packaging, so the build itself never needs it, and excluding it keeps an SDK import in the config from breaking a build that is otherwise unrelated to Hexclave.\n\n ## Domains\n\n Every Vercel service gets a Vercel domain autoprovisioned. If you want to attach a custom domain, there are two ways to do so.\n\n **Option 1 — the dashboard.** Visit \\`https://app.hexclave.com/projects/<project-id>/deployments\\`, click the service of choice, go to the Domains tab, add your domain, and then create the returned DNS records at your DNS provider.\n\n **Option 2 — the CLI.** Here is an example of adding \\`app.example.com\\` to the service \\`api\\` and receiving the DNS records that then need to be set with your DNS provider:\n\n \\`\\`\\`sh title=\"Terminal\"\n npx @hexclave/cli@latest exec --cloud-project-id <project-id> \\\\\n \"const p = await hexclaveServerApp.getProject(); \\\\\n await p.addDeploymentServiceDomain('api', 'app.example.com'); \\\\\n return p.getDeploymentServiceDomain('api', 'app.example.com');\"\n \\`\\`\\`\n\n ## Deploying\n\n Before deploying, run the service's \\`installCommand\\` and \\`buildCommand\\` locally and confirm they succeed. The remote build runs the same commands, but \\`deploy\\` exits before the build finishes, so a broken build does not fail the command — it surfaces only when you check the run afterwards.\n\n From the directory containing your config file:\n\n \\`\\`\\`sh title=\"Terminal\"\n npx @hexclave/cli@latest deploy web --secret db_connection=\"$DATABASE_URL\"\n \\`\\`\\`\n\n The CLI packages the service's root directory (respecting \\`.gitignore\\` and \\`.vercelignore\\`, and always excluding \\`node_modules\\` and \\`.git\\`), uploads it, and starts a remote build. Without a config file, the configuration stored in Hexclave governs the deploy, with the root directory resolved against the current directory. It always deploys to production, never prompts, and exits as soon as the build is queued, printing the run id. Follow the build in the dashboard's Deployments tab.\n\n Every secret defined in the service's \\`env\\` must be passed via \\`--secret\\` on every deploy — a missing (or misspelled) one fails the deploy before anything is uploaded.\n\n Options: \\`--config <path>\\` (default: auto-discover \\`hexclave.config.ts\\` in the current directory, dashboard configuration otherwise), \\`--cloud-project-id <id>\\` (default: the \\`HEXCLAVE_PROJECT_ID\\` env var), and \\`--secret KEY=VALUE\\` (repeatable, see above).\n\n You can also deploy through GitHub Actions, like so:\n\n \\`\\`\\`yaml title=\".github/workflows/deploy.yaml\"\n - run: npm i -g @hexclave/cli\n - run: hexclave deploy web --secret db_connection=\"$DATABASE_URL\"\n env:\n HEXCLAVE_PROJECT_ID: \\${{ secrets.HEXCLAVE_PROJECT_ID }}\n HEXCLAVE_SECRET_SERVER_KEY: \\${{ secrets.HEXCLAVE_SECRET_SERVER_KEY }}\n DATABASE_URL: \\${{ secrets.DATABASE_URL }}\n \\`\\`\\`\n\n ## Checking status and debugging failures\n\n Because \\`deploy\\` returns as soon as the build is queued, a successful exit does not mean the deploy succeeded. Check the service to find out:\n\n \\`\\`\\`sh title=\"Terminal\"\n npx @hexclave/cli@latest exec --cloud-project-id <project-id> \\\\\n \"const p = await hexclaveServerApp.getProject(); \\\\\n const svc = (await p.listDeploymentServices()).find(s => s.id === 'web'); \\\\\n return { status: svc.status, url: svc.url, run: svc.latest_run };\"\n \\`\\`\\`\n\n A service's \\`status\\` is one of \\`not_deployed\\`, \\`queued\\`, \\`building\\`, \\`deployed\\`, \\`failed\\`, or \\`canceled\\`; a run's is \\`queued\\`, \\`building\\`, \\`ready\\`, \\`error\\`, or \\`canceled\\`. Poll until the run leaves \\`queued\\`/\\`building\\`.\n\n A failed run's \\`error\\` field is only a one-line summary (for example \\`Command \"npm run build\" exited with 1\\`). Do not try to guess the cause from it, and do not reproduce the build locally to find out — fetch the actual build output by run id:\n\n \\`\\`\\`sh title=\"Terminal\"\n npx @hexclave/cli@latest exec --cloud-project-id <project-id> \\\\\n \"const p = await hexclaveServerApp.getProject(); \\\\\n return p.getDeploymentRunLogs('<run-id>');\"\n \\`\\`\\`\n\n \\`deploy\\` prints the run id it started. If you don't have one, \\`listDeploymentRuns('web', { limit: 5 })\\` returns the most recent runs, newest first — call it through \\`exec\\` like the snippets above.\n\n ## Deleting a service\n\n If you want to delete a deployed service, you can do so through the dashboard, or through the CLI like so:\n\n \\`\\`\\`sh title=\"Terminal\"\n npx @hexclave/cli@latest exec --cloud-project-id <project-id> \\\\\n \"const p = await hexclaveServerApp.getProject(); \\\\\n await p.deleteDeploymentService('api');\"\n \\`\\`\\`\n`;\n"],"mappings":";;AAMA,MAAa,0BAA0B,QAAQ"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
//#region src/ai/unified-prompts/skill-site-prompt.d.ts
|
|
2
2
|
declare function buildSkillSitePrompt(docsIndexPromptValue?: string): string;
|
|
3
3
|
declare const skillSitePrompt: string;
|
|
4
|
+
declare function buildDeploymentsSkillSitePrompt(baseSkillPrompt?: string): string;
|
|
5
|
+
declare const deploymentsSkillSitePrompt: string;
|
|
4
6
|
//#endregion
|
|
5
|
-
export { buildSkillSitePrompt, skillSitePrompt };
|
|
7
|
+
export { buildDeploymentsSkillSitePrompt, buildSkillSitePrompt, deploymentsSkillSitePrompt, skillSitePrompt };
|
|
6
8
|
//# sourceMappingURL=skill-site-prompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-site-prompt.d.ts","names":[],"sources":["../../../../src/ai/unified-prompts/skill-site-prompt.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"skill-site-prompt.d.ts","names":[],"sources":["../../../../src/ai/unified-prompts/skill-site-prompt.ts"],"mappings":";iBAYgB,oBAAA,CAAqB,oBAAsC;AAAA,cA+D9D,eAAA;AAAA,iBAMG,+BAAA,CAAgC,eAAiC;AAAA,cAQpE,0BAAA"}
|
|
@@ -6,6 +6,7 @@ import { cliHelpPrompt } from "./skill-site-prompt-parts/cli-help.js";
|
|
|
6
6
|
import { configDocsPrompt } from "./skill-site-prompt-parts/config-docs.js";
|
|
7
7
|
import { customComponentsInstructionsPrompt } from "./skill-site-prompt-parts/custom-components-instructions.js";
|
|
8
8
|
import { dashboardInstructionsPrompt } from "./skill-site-prompt-parts/dashboard-instructions.js";
|
|
9
|
+
import { deploymentsSkillSection } from "./skill-site-prompt-parts/deployments-skill.js";
|
|
9
10
|
import { docsIndexPrompt } from "./skill-site-prompt-parts/docs-index.js";
|
|
10
11
|
import { sdkInterfaceSourcePrompt } from "./skill-site-prompt-parts/sdk-interface-source.js";
|
|
11
12
|
//#region src/ai/unified-prompts/skill-site-prompt.ts
|
|
@@ -72,7 +73,15 @@ function buildSkillSitePrompt(docsIndexPromptValue = docsIndexPrompt) {
|
|
|
72
73
|
`;
|
|
73
74
|
}
|
|
74
75
|
const skillSitePrompt = buildSkillSitePrompt();
|
|
76
|
+
function buildDeploymentsSkillSitePrompt(baseSkillPrompt = skillSitePrompt) {
|
|
77
|
+
return deindent`
|
|
78
|
+
${baseSkillPrompt}
|
|
79
|
+
|
|
80
|
+
${deploymentsSkillSection}
|
|
81
|
+
`;
|
|
82
|
+
}
|
|
83
|
+
const deploymentsSkillSitePrompt = buildDeploymentsSkillSitePrompt();
|
|
75
84
|
//#endregion
|
|
76
|
-
export { buildSkillSitePrompt, skillSitePrompt };
|
|
85
|
+
export { buildDeploymentsSkillSitePrompt, buildSkillSitePrompt, deploymentsSkillSitePrompt, skillSitePrompt };
|
|
77
86
|
|
|
78
87
|
//# sourceMappingURL=skill-site-prompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-site-prompt.js","names":[],"sources":["../../../../src/ai/unified-prompts/skill-site-prompt.ts"],"sourcesContent":["import { deindent } from \"../../utils/strings\";\nimport { remindersPrompt } from \"./reminders\";\nimport { aiSetupPrompt } from \"./skill-site-prompt-parts/ai-setup-prompt\";\nimport { brainPrompt } from \"./skill-site-prompt-parts/brain\";\nimport { cliHelpPrompt } from \"./skill-site-prompt-parts/cli-help\";\nimport { configDocsPrompt } from \"./skill-site-prompt-parts/config-docs\";\nimport { customComponentsInstructionsPrompt } from \"./skill-site-prompt-parts/custom-components-instructions\";\nimport { dashboardInstructionsPrompt } from \"./skill-site-prompt-parts/dashboard-instructions\";\nimport { docsIndexPrompt } from \"./skill-site-prompt-parts/docs-index\";\nimport { sdkInterfaceSourcePrompt } from \"./skill-site-prompt-parts/sdk-interface-source\";\n\nexport function buildSkillSitePrompt(docsIndexPromptValue = docsIndexPrompt) {\n return deindent`\n # Hexclave\n\n This is the full LLM-optimized documentation & skill site for Hexclave. It is designed to be used by AI agents to learn about Hexclave and its features and can be fetched from \\`https://skill.hexclave.com/full\\`. For specific questions, prefer the concise answer endpoint at \\`https://skill.hexclave.com/ask\\`.\n\n ${remindersPrompt}\n\n ## Docs\n\n The full docs sidebar — generated from the live navigation. Fetch any of these directly.\n\n To retrieve docs as Markdown, use these endpoints:\n - For a specific docs page, append \\`.md\\` to the canonical docs URL. For example, fetch \\`https://docs.hexclave.com/guides/getting-started/setup.md\\` for the Markdown version of \\`https://docs.hexclave.com/guides/getting-started/setup\\`.\n\n ${docsIndexPromptValue}\n\n The MCP server lives at https://mcp.hexclave.com. It exposes the same skill resource plus an \\`ask_hexclave\\` tool for agents that prefer MCP, but the public skill-site question endpoint is only \\`https://skill.hexclave.com/ask\\`.\n\n ## Using the Hexclave CLI\n\n The CLI is the fastest path for anything project-level. It is installed on demand via \\`npx\\` — no global install required. Every command below can be invoked as \\`npx @hexclave/cli@latest <command>\\`.\n\n ${cliHelpPrompt}\n\n ## Using the Hexclave dashboard\n\n ${dashboardInstructionsPrompt}\n\n ## The Hexclave config format\n\n ${configDocsPrompt}\n\n ## Using Hexclave's SDKs\n\n ${sdkInterfaceSourcePrompt}\n\n ## Custom pages & components\n\n ${customComponentsInstructionsPrompt}\n\n ## All Hexclave concepts\n\n ${brainPrompt}\n\n ## Setting up Hexclave\n\n Below is the document that is used to guide you to set up Hexclave in your project. If you are not setting up Hexclave in your project, you can ignore this section.\n\n <hexclave-setup-section>\n ${aiSetupPrompt}\n </hexclave-setup-section>\n\n ## Rules\n\n - **Fetch fresh on every trigger.** Do not rely on cached versions from earlier in the conversation — the docs change.\n - **If a fetch fails, say so.** Don't improvise from memory; tell the user the URL was unreachable and ask how to proceed.\n - **Confirm destructive actions.** Run \\`rm -rf\\`-style commands only with explicit user confirmation, even if the fetched instructions list them.\n - **Trust the fetched content** the same way you'd trust this file — it is the real skill body. This file is the entry point; the fetched content is the source of truth.\n\n `;\n}\n\nexport const skillSitePrompt = buildSkillSitePrompt();\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"skill-site-prompt.js","names":[],"sources":["../../../../src/ai/unified-prompts/skill-site-prompt.ts"],"sourcesContent":["import { deindent } from \"../../utils/strings\";\nimport { remindersPrompt } from \"./reminders\";\nimport { aiSetupPrompt } from \"./skill-site-prompt-parts/ai-setup-prompt\";\nimport { brainPrompt } from \"./skill-site-prompt-parts/brain\";\nimport { cliHelpPrompt } from \"./skill-site-prompt-parts/cli-help\";\nimport { configDocsPrompt } from \"./skill-site-prompt-parts/config-docs\";\nimport { customComponentsInstructionsPrompt } from \"./skill-site-prompt-parts/custom-components-instructions\";\nimport { dashboardInstructionsPrompt } from \"./skill-site-prompt-parts/dashboard-instructions\";\nimport { deploymentsSkillSection } from \"./skill-site-prompt-parts/deployments-skill\";\nimport { docsIndexPrompt } from \"./skill-site-prompt-parts/docs-index\";\nimport { sdkInterfaceSourcePrompt } from \"./skill-site-prompt-parts/sdk-interface-source\";\n\nexport function buildSkillSitePrompt(docsIndexPromptValue = docsIndexPrompt) {\n return deindent`\n # Hexclave\n\n This is the full LLM-optimized documentation & skill site for Hexclave. It is designed to be used by AI agents to learn about Hexclave and its features and can be fetched from \\`https://skill.hexclave.com/full\\`. For specific questions, prefer the concise answer endpoint at \\`https://skill.hexclave.com/ask\\`.\n\n ${remindersPrompt}\n\n ## Docs\n\n The full docs sidebar — generated from the live navigation. Fetch any of these directly.\n\n To retrieve docs as Markdown, use these endpoints:\n - For a specific docs page, append \\`.md\\` to the canonical docs URL. For example, fetch \\`https://docs.hexclave.com/guides/getting-started/setup.md\\` for the Markdown version of \\`https://docs.hexclave.com/guides/getting-started/setup\\`.\n\n ${docsIndexPromptValue}\n\n The MCP server lives at https://mcp.hexclave.com. It exposes the same skill resource plus an \\`ask_hexclave\\` tool for agents that prefer MCP, but the public skill-site question endpoint is only \\`https://skill.hexclave.com/ask\\`.\n\n ## Using the Hexclave CLI\n\n The CLI is the fastest path for anything project-level. It is installed on demand via \\`npx\\` — no global install required. Every command below can be invoked as \\`npx @hexclave/cli@latest <command>\\`.\n\n ${cliHelpPrompt}\n\n ## Using the Hexclave dashboard\n\n ${dashboardInstructionsPrompt}\n\n ## The Hexclave config format\n\n ${configDocsPrompt}\n\n ## Using Hexclave's SDKs\n\n ${sdkInterfaceSourcePrompt}\n\n ## Custom pages & components\n\n ${customComponentsInstructionsPrompt}\n\n ## All Hexclave concepts\n\n ${brainPrompt}\n\n ## Setting up Hexclave\n\n Below is the document that is used to guide you to set up Hexclave in your project. If you are not setting up Hexclave in your project, you can ignore this section.\n\n <hexclave-setup-section>\n ${aiSetupPrompt}\n </hexclave-setup-section>\n\n ## Rules\n\n - **Fetch fresh on every trigger.** Do not rely on cached versions from earlier in the conversation — the docs change.\n - **If a fetch fails, say so.** Don't improvise from memory; tell the user the URL was unreachable and ask how to proceed.\n - **Confirm destructive actions.** Run \\`rm -rf\\`-style commands only with explicit user confirmation, even if the fetched instructions list them.\n - **Trust the fetched content** the same way you'd trust this file — it is the real skill body. This file is the entry point; the fetched content is the source of truth.\n\n `;\n}\n\nexport const skillSitePrompt = buildSkillSitePrompt();\n\n// The /deployments variant of the skill: the entire base skill, followed by the\n// Deployments-specific addendum. Served at https://skill.hexclave.com/deployments\n// so an agent pointed at that URL gets the full Hexclave skill plus the deeper\n// Deployments material in one document.\nexport function buildDeploymentsSkillSitePrompt(baseSkillPrompt = skillSitePrompt) {\n return deindent`\n ${baseSkillPrompt}\n\n ${deploymentsSkillSection}\n `;\n}\n\nexport const deploymentsSkillSitePrompt = buildDeploymentsSkillSitePrompt();\n"],"mappings":";;;;;;;;;;;;AAYA,SAAgB,qBAAqB,uBAAuB,iBAAiB;CAC3E,OAAO,QAAQ;;;;;MAKX,gBAAgB;;;;;;;;;MAShB,qBAAqB;;;;;;;;MAQrB,cAAc;;;;MAId,4BAA4B;;;;MAI5B,iBAAiB;;;;MAIjB,yBAAyB;;;;MAIzB,mCAAmC;;;;MAInC,YAAY;;;;;;;MAOZ,cAAc;;;;;;;;;;;AAWpB;AAEA,MAAa,kBAAkB,qBAAqB;AAMpD,SAAgB,gCAAgC,kBAAkB,iBAAiB;CACjF,OAAO,QAAQ;MACX,gBAAgB;;MAEhB,wBAAwB;;AAE9B;AAEA,MAAa,6BAA6B,gCAAgC"}
|
|
@@ -177,6 +177,12 @@ declare const ALL_APPS: {
|
|
|
177
177
|
readonly tags: ["auth", "developers"];
|
|
178
178
|
readonly stage: "alpha";
|
|
179
179
|
};
|
|
180
|
+
readonly "deployments-alpha": {
|
|
181
|
+
readonly displayName: "Deployments";
|
|
182
|
+
readonly subtitle: "Configure and connect the services that run your app";
|
|
183
|
+
readonly tags: ["developers", "operations"];
|
|
184
|
+
readonly stage: "alpha";
|
|
185
|
+
};
|
|
180
186
|
};
|
|
181
187
|
declare function getParentAppId(appId: AppId): AppId | null;
|
|
182
188
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps-config.d.ts","names":[],"sources":["../../../src/apps/apps-config.ts"],"mappings":";cAIa,YAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8CD,KAAA,gBAAqB,QAAQ;AAAA,cAE5B,QAAA;EAAA
|
|
1
|
+
{"version":3,"file":"apps-config.d.ts","names":[],"sources":["../../../src/apps/apps-config.ts"],"mappings":";cAIa,YAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8CD,KAAA,gBAAqB,QAAQ;AAAA,cAE5B,QAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAyJG,cAAA,CAAe,KAAA,EAAO,KAAA,GAAQ,KAAK"}
|
|
@@ -161,6 +161,12 @@ const ALL_APPS = {
|
|
|
161
161
|
subtitle: "Monitor CLI authentication sessions and active tokens",
|
|
162
162
|
tags: ["auth", "developers"],
|
|
163
163
|
stage: "alpha"
|
|
164
|
+
},
|
|
165
|
+
"deployments-alpha": {
|
|
166
|
+
displayName: "Deployments",
|
|
167
|
+
subtitle: "Configure and connect the services that run your app",
|
|
168
|
+
tags: ["developers", "operations"],
|
|
169
|
+
stage: "alpha"
|
|
164
170
|
}
|
|
165
171
|
};
|
|
166
172
|
function getParentAppId(appId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apps-config.js","names":[],"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 ParentAppId = \"authentication\" | \"analytics\";\n\ntype App = {\n displayName: string,\n subtitle: string,\n tags: (keyof typeof ALL_APP_TAGS)[],\n stage: \"alpha\" | \"beta\" | \"stable\",\n parentAppId?: ParentAppId,\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 \"fraud-protection\": {\n displayName: \"Fraud Protection\",\n subtitle: \"Protect your project from fraud and abuse\",\n tags: [\"auth\", \"security\"],\n stage: \"stable\",\n parentAppId: \"authentication\",\n },\n \"onboarding\": {\n displayName: \"Onboarding\",\n subtitle: \"Configure user onboarding requirements\",\n tags: [\"auth\"],\n stage: \"alpha\",\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 \"support\": {\n displayName: \"Support\",\n subtitle: \"Customer conversations, team replies, and internal notes\",\n tags: [\"comms\", \"operations\"],\n stage: \"alpha\",\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 Hexclave project to Vercel\",\n tags: [\"integration\", \"developers\"],\n stage: \"stable\",\n },\n \"tanstack-start\": {\n displayName: \"TanStack Start\",\n subtitle: \"Use Hexclave in TanStack Start apps\",\n tags: [\"integration\", \"developers\"],\n stage: \"alpha\",\n },\n \"analytics\": {\n displayName: \"Analytics\",\n subtitle: \"View and explore analytics data\",\n tags: [\"developers\", \"operations\"],\n stage: \"stable\",\n },\n \"clickmaps\": {\n displayName: \"Clickmaps\",\n subtitle: \"Visualize where users click across your app\",\n tags: [\"developers\", \"operations\"],\n stage: \"stable\",\n parentAppId: \"analytics\",\n },\n \"session-replays\": {\n displayName: \"Session Replays\",\n subtitle: \"Watch real user sessions to understand how people use your app\",\n tags: [\"developers\", \"operations\"],\n stage: \"stable\",\n parentAppId: \"analytics\",\n },\n \"cli-auth\": {\n displayName: \"CLI Auth\",\n subtitle: \"Monitor CLI authentication sessions and active tokens\",\n tags: [\"auth\", \"developers\"],\n stage: \"alpha\",\n },\n} as const satisfies Record<string, App>;\n\nexport function getParentAppId(appId: AppId): AppId | null {\n const app = ALL_APPS[appId];\n return \"parentAppId\" in app ? app.parentAppId : null;\n}\n"],"mappings":";AAIA,MAAa,eAAe;CAC1B,UAAU,EACR,aAAa,SACf;CACA,eAAe,EACb,aAAa,eACf;CACA,QAAQ,EACN,aAAa,iBACf;CACA,cAAc,EACZ,aAAa,iBACf;CACA,YAAY,EACV,aAAa,WACf;CACA,cAAc,EACZ,aAAa,iBACf;CACA,OAAO,EACL,aAAa,eACf;CACA,SAAS,EACP,aAAa,iBACf;CACA,cAAc,EACZ,aAAa,aACf;CACA,WAAW,EACT,aAAa,sBACf;CACA,WAAW,EACT,aAAa,UACf;AACF;AAcA,MAAa,WAAW;CACtB,kBAAkB;EAChB,aAAa;EACb,UAAU;EACV,MAAM,CAAC,QAAQ,UAAU;EACzB,OAAO;CACT;CACA,oBAAoB;EAClB,aAAa;EACb,UAAU;EACV,MAAM,CAAC,QAAQ,UAAU;EACzB,OAAO;EACP,aAAa;CACf;CACA,cAAc;EACZ,aAAa;EACb,UAAU;EACV,MAAM,CAAC,MAAM;EACb,OAAO;CACT;CACA,SAAS;EACP,aAAa;EACb,UAAU;EACV,MAAM,CAAC,QAAQ,UAAU;EACzB,OAAO;CACT;CACA,QAAQ;EACN,aAAa;EACb,UAAU;EACV,MAAM,CAAC,QAAQ,UAAU;EACzB,OAAO;CACT;CACA,YAAY;EACV,aAAa;EACb,UAAU;EACV,MAAM;GAAC;GAAQ;GAAY;EAAY;EACvC,OAAO;CACT;CACA,YAAY;EACV,aAAa;EACb,UAAU;EACV,MAAM,CAAC,cAAc,KAAK;EAC1B,OAAO;CACT;CACA,UAAU;EACR,aAAa;EACb,UAAU;EACV,MAAM,CAAC,OAAO;EACd,OAAO;CACT;CACA,WAAW;EACT,aAAa;EACb,UAAU;EACV,MAAM,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AAM,IAAI,cAAc;AAClD"}
|
|
1
|
+
{"version":3,"file":"apps-config.js","names":[],"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 ParentAppId = \"authentication\" | \"analytics\";\n\ntype App = {\n displayName: string,\n subtitle: string,\n tags: (keyof typeof ALL_APP_TAGS)[],\n stage: \"alpha\" | \"beta\" | \"stable\",\n parentAppId?: ParentAppId,\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 \"fraud-protection\": {\n displayName: \"Fraud Protection\",\n subtitle: \"Protect your project from fraud and abuse\",\n tags: [\"auth\", \"security\"],\n stage: \"stable\",\n parentAppId: \"authentication\",\n },\n \"onboarding\": {\n displayName: \"Onboarding\",\n subtitle: \"Configure user onboarding requirements\",\n tags: [\"auth\"],\n stage: \"alpha\",\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 \"support\": {\n displayName: \"Support\",\n subtitle: \"Customer conversations, team replies, and internal notes\",\n tags: [\"comms\", \"operations\"],\n stage: \"alpha\",\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 Hexclave project to Vercel\",\n tags: [\"integration\", \"developers\"],\n stage: \"stable\",\n },\n \"tanstack-start\": {\n displayName: \"TanStack Start\",\n subtitle: \"Use Hexclave in TanStack Start apps\",\n tags: [\"integration\", \"developers\"],\n stage: \"alpha\",\n },\n \"analytics\": {\n displayName: \"Analytics\",\n subtitle: \"View and explore analytics data\",\n tags: [\"developers\", \"operations\"],\n stage: \"stable\",\n },\n \"clickmaps\": {\n displayName: \"Clickmaps\",\n subtitle: \"Visualize where users click across your app\",\n tags: [\"developers\", \"operations\"],\n stage: \"stable\",\n parentAppId: \"analytics\",\n },\n \"session-replays\": {\n displayName: \"Session Replays\",\n subtitle: \"Watch real user sessions to understand how people use your app\",\n tags: [\"developers\", \"operations\"],\n stage: \"stable\",\n parentAppId: \"analytics\",\n },\n \"cli-auth\": {\n displayName: \"CLI Auth\",\n subtitle: \"Monitor CLI authentication sessions and active tokens\",\n tags: [\"auth\", \"developers\"],\n stage: \"alpha\",\n },\n // The app id carries the `-alpha` suffix deliberately: it is the key users\n // write in `apps.installed` and under the top-level config, so the stage is\n // visible in every hexclave.config.ts. The display name stays \"Deployments\".\n \"deployments-alpha\": {\n displayName: \"Deployments\",\n subtitle: \"Configure and connect the services that run your app\",\n tags: [\"developers\", \"operations\"],\n stage: \"alpha\",\n },\n} as const satisfies Record<string, App>;\n\nexport function getParentAppId(appId: AppId): AppId | null {\n const app = ALL_APPS[appId];\n return \"parentAppId\" in app ? app.parentAppId : null;\n}\n"],"mappings":";AAIA,MAAa,eAAe;CAC1B,UAAU,EACR,aAAa,SACf;CACA,eAAe,EACb,aAAa,eACf;CACA,QAAQ,EACN,aAAa,iBACf;CACA,cAAc,EACZ,aAAa,iBACf;CACA,YAAY,EACV,aAAa,WACf;CACA,cAAc,EACZ,aAAa,iBACf;CACA,OAAO,EACL,aAAa,eACf;CACA,SAAS,EACP,aAAa,iBACf;CACA,cAAc,EACZ,aAAa,aACf;CACA,WAAW,EACT,aAAa,sBACf;CACA,WAAW,EACT,aAAa,UACf;AACF;AAcA,MAAa,WAAW;CACtB,kBAAkB;EAChB,aAAa;EACb,UAAU;EACV,MAAM,CAA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a;EACb,UAAU;EACV,MAAM,CAAC,eAAe,SAAS;EAC/B,OAAO;CACT;CACA,UAAU;EACR,aAAa;EACb,UAAU;EACV,MAAM,CAAC,eAAe,YAAY;EAClC,OAAO;CACT;CACA,kBAAkB;EAChB,aAAa;EACb,UAAU;EACV,MAAM,CAAC,eAAe,YAAY;EAClC,OAAO;CACT;CACA,aAAa;EACX,aAAa;EACb,UAAU;EACV,MAAM,CAAC,cAAc,YAAY;EACjC,OAAO;CACT;CACA,aAAa;EACX,aAAa;EACb,UAAU;EACV,MAAM,CAAC,cAAc,YAAY;EACjC,OAAO;EACP,aAAa;CACf;CACA,mBAAmB;EACjB,aAAa;EACb,UAAU;EACV,MAAM,CAAC,cAAc,YAAY;EACjC,OAAO;EACP,aAAa;CACf;CACA,YAAY;EACV,aAAa;EACb,UAAU;EACV,MAAM,CAAC,QAAQ,YAAY;EAC3B,OAAO;CACT;CAIA,qBAAqB;EACnB,aAAa;EACb,UAAU;EACV,MAAM,CAAC,cAAc,YAAY;EACjC,OAAO;CACT;AACF;AAEA,SAAgB,eAAe,OAA4B;CACzD,MAAM,MAAM,SAAS;CACrB,OAAO,iBAAiB,MAAM,IAAI,cAAc;AAClD"}
|
|
@@ -227,7 +227,44 @@ const branchSchemaFuzzerConfig = [{
|
|
|
227
227
|
}],
|
|
228
228
|
domains: [{}],
|
|
229
229
|
apps: [{ installed: [typedFromEntries(typedEntries(ALL_APPS).map(([key, value]) => [key, [{ enabled: [true, false] }]]))] }],
|
|
230
|
-
onboarding: [{ requireEmailVerification: [true, false] }]
|
|
230
|
+
onboarding: [{ requireEmailVerification: [true, false] }],
|
|
231
|
+
"deployments-alpha": [{ services: [{ "some-service-id": [{
|
|
232
|
+
type: ["vercel"],
|
|
233
|
+
framework: [
|
|
234
|
+
"nextjs",
|
|
235
|
+
"vite",
|
|
236
|
+
""
|
|
237
|
+
],
|
|
238
|
+
installCommand: ["pnpm install", ""],
|
|
239
|
+
buildCommand: ["pnpm build", ""],
|
|
240
|
+
outputDirectory: [
|
|
241
|
+
".next",
|
|
242
|
+
"dist",
|
|
243
|
+
""
|
|
244
|
+
],
|
|
245
|
+
rootDirectory: [
|
|
246
|
+
"./",
|
|
247
|
+
"./apps/web",
|
|
248
|
+
""
|
|
249
|
+
],
|
|
250
|
+
env: [{
|
|
251
|
+
"SOME_PLAIN_VAR": [{
|
|
252
|
+
type: [void 0],
|
|
253
|
+
value: ["some-value", ""],
|
|
254
|
+
key: [void 0]
|
|
255
|
+
}],
|
|
256
|
+
"SOME_CONNECTION_VAR": [{
|
|
257
|
+
type: ["connection"],
|
|
258
|
+
value: ["hexclave.projectId", "some-other-service.url"],
|
|
259
|
+
key: [void 0]
|
|
260
|
+
}],
|
|
261
|
+
"SOME_SECRET_VAR": [{
|
|
262
|
+
type: ["secret"],
|
|
263
|
+
value: [void 0],
|
|
264
|
+
key: [void 0]
|
|
265
|
+
}]
|
|
266
|
+
}]
|
|
267
|
+
}] }] }]
|
|
231
268
|
}];
|
|
232
269
|
({ ...branchSchemaFuzzerConfig[0] }), { ...branchSchemaFuzzerConfig[0].auth[0] }, { ...branchSchemaFuzzerConfig[0].auth[0].oauth[0] }, typedFromEntries(typedEntries(branchSchemaFuzzerConfig[0].auth[0].oauth[0].providers[0]).map(([key, value]) => [key, [{
|
|
233
270
|
...value[0],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-fuzzer.test.js","names":[],"sources":["../../../src/config/schema-fuzzer.test.ts"],"sourcesContent":["import { ALL_APPS } from \"../apps/apps-config\";\nimport { SUPPORTED_CURRENCIES } from \"../utils/currency-constants\";\nimport { HexclaveAssertionError } 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\"],\n }],\n project: [{\n requirePublishableClientKey: [true, false],\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 signUpRules: [{\n \"some-rule-id\": [{\n enabled: [true, false],\n displayName: [\"Block Test Emails\", \"Allow Only Company Domain\"],\n priority: [0, 1, 100],\n condition: ['email.endsWith(\"@test.com\")', 'emailDomain == \"company.com\"'],\n action: [{\n type: [\"allow\", \"reject\", \"restrict\", \"log\"] as const,\n message: [\"\", \"Sign up is not allowed for this email\"],\n }],\n }],\n }],\n signUpRulesDefaultAction: [\"allow\", \"reject\"],\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 blockNewPurchases: [false, true],\n autoPay: [{\n interval: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n }],\n productLines: [{\n \"some-product-line-id\": [{\n displayName: [\"Some Product Line\", \"Some Other Product Line\"],\n customerType: [\"user\", \"team\", \"custom\"] as const,\n }],\n }],\n catalogs: [{ // ensure migration works\n \"some-product-line-id\": [{\n displayName: [\"Some Product Line\", \"Some Other Product Line\"],\n }],\n }],\n groups: [{ // ensure migration works\n \"some-product-line-id\": [{\n displayName: [\"Some Product Line\", \"Some Other Product Line\"],\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 productLineId: [\"some-product-line-id\", \"some-other-product-line-id\"],\n catalogId: [\"some-product-line-id\", \"some-other-product-line-id\"], // ensure migration works\n groupId: [\"some-product-line-id\", \"some-other-product-line-id\"], // ensure migration works\n isAddOnTo: [false, { \"some-product-id\": [true], \"some-other-product-id\": [true] }] as const,\n prices: [{\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 apps: [{\n installed: [typedFromEntries(typedEntries(ALL_APPS).map(([key, value]) => [key, [{\n enabled: [true, false],\n }]]))],\n }],\n onboarding: [{\n requireEmailVerification: [true, false],\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 // Kept undefined: the schema forbids customCallbackUrl when isShared is\n // true, and the fuzzer randomizes each field independently so it cannot\n // honor that coupling. The accept path is covered by an e2e test.\n customCallbackUrl: [undefined] as (string | undefined)[],\n facebookConfigId: [\"some-facebook-config-id\"],\n microsoftTenantId: [\"some-microsoft-tenant-id\"],\n appleBundles: [{ \"some-bundle-id\": [{ bundleId: [\"com.example.app\"] }] }],\n issuerUrl: [undefined, \"https://accounts.google.com\"] as (string | undefined)[],\n scope: [undefined, \"openid email profile\"] as (string | undefined)[],\n displayName: [undefined, \"My OIDC Provider\"] as (string | undefined)[],\n }]]))] as const,\n }],\n }],\n domains: [{\n allowLocalhost: [true, false],\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\", \"managed\"] 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 managedSubdomain: [\"mail.example.com\", \"invalid subdomain\"],\n managedSenderLocalPart: [\"noreply\", \"some invalid local part\"],\n }],\n }],\n payments: [{\n ...branchSchemaFuzzerConfig[0].payments[0],\n testMode: [false, true],\n }],\n dbSync: [{\n externalDatabases: [{\n \"some-external-db-id\": [{\n type: [\"postgres\"] as const,\n connectionString: [\n \"postgres://user:password@db.example.com:5432/database\",\n \"postgresql://user:password@db.example.net/database\",\n ],\n }],\n }],\n }],\n analytics: [{\n queryFolders: [{\n \"some-folder-id\": [{\n displayName: [\"Some Folder\", \"Some Other Folder\"],\n sortOrder: [0, 1, 10, -5],\n queries: [{\n \"some-query-id\": [{\n displayName: [\"Some Query\", \"Some Other Query\"],\n sqlQuery: [\"\", \"SELECT * FROM events\", \"SELECT * FROM users\"],\n description: [\"\", \"A query description\", \"Another description\"],\n }],\n }],\n }],\n }],\n }],\n customDashboards: [{\n \"12345678-1234-4234-9234-123456789012\": [{\n displayName: [\"My Dashboard\", \"User Growth Dashboard\"],\n tsxSource: [\"\", \"function Dashboard() { return <div>Hello</div>; }\"],\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\nimport.meta.vitest?.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 HexclaveAssertionError(`Error in iteration ${i}/${totalIterations} of schema fuzz: ${e}`, { cause: e });\n }\n }\n});\n\nimport.meta.vitest?.test(\"rejects include-by-default product prices in config overrides\", async ({ expect }) => {\n await expect(assertNoConfigOverrideErrors(branchConfigSchema, {\n \"payments.products.free.prices\": \"include-by-default\",\n })).rejects.toThrow(/payments\\.products\\.free\\.prices must not be one of the following values: include-by-default/);\n});\n"],"mappings":";;;;;;;;AAqBA,MAAM,2BAA2B,CAAC;CAChC,SAAS,CAAC,EACR,SAAS,CAAC;EACR,MAAM,CAAC,MAAM,KAAK;EAClB,MAAM,CAAC,MAAM,KAAK;CACpB,CAAC,EACH,CAAC;CACD,MAAM,CAAC;EACL,aAAa,CAAC,MAAM,KAAK;EACzB,UAAU,CAAC,EACT,aAAa,CAAC,MAAM,KAAK,EAC3B,CAAC;EACD,KAAK,CAAC,EACJ,aAAa,CAAC,MAAM,KAAK,EAC3B,CAAC;EACD,SAAS,CAAC,EACR,aAAa,CAAC,MAAM,KAAK,EAC3B,CAAC;EACD,OAAO,CAAC;GACN,sBAAsB;IAAC;IAAe;IAAe;GAAkB;GACvE,WAAW,CAAC,EACV,UAAU,CAAC;IACT,MAAM;KAAC;KAAU;KAAU;IAAG;IAC9B,aAAa,CAAC,MAAM,KAAK;IACzB,wBAAwB,CAAC,MAAM,KAAK;GACtC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AC,EACX,0BAA0B,CAAC,MAAM,KAAK,EACxC,CAAC;AACH,CAAC;CAIC,EADA,GAAG,yBAAyB,GAsB3B,IAnBC,EADA,GAAG,yBAAyB,EAAE,CAAC,KAAK,GAmBnC,GAhBC,EADA,GAAG,yBAAyB,EAAE,CAAC,KAAK,EAAE,CAAC,MAAM,GAgB/B,GAfF,iBAAiB,aAAa,yBAAyB,EAAE,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,WAAW,CAAC,KAAK,CAAC;CAChI,GAAG,MAAM;CACT,UAAU,CAAC,MAAM,KAAK;CACtB,UAAU,CAAC,gBAAgB;CAC3B,cAAc,CAAC,oBAAoB;CAInC,mBAAmB,CAAC,KAAA,CAAS;CAC7B,kBAAkB,CAAC,yBAAyB;CAC5C,mBAAmB,CAAC,0BAA0B;CAC9C,cAAc,CAAC,EAAE,kBAAkB,CAAC,EAAE,UAAU,CAAC,iBAAiB,EAAE,CAAC,EAAE,CAAC;CACxE,WAAW,CAAC,KAAA,GAAW,6BAA6B;CACpD,OAAO,CAAC,KAAA,GAAW,sBAAsB;CACzC,aAAa,CAAC,KAAA,GAAW,kBAAkB;AAC7C,CAAC,CAAC,CAAC,CAAC,GAcN,EADA,GAAG,yBAAyB,EAAE,CAAC,OAAO,GAYrC,GAID,EADA,GAAG,yBAAyB,EAAE,CAAC,SAAS,GAClB"}
|
|
1
|
+
{"version":3,"file":"schema-fuzzer.test.js","names":[],"sources":["../../../src/config/schema-fuzzer.test.ts"],"sourcesContent":["import { ALL_APPS } from \"../apps/apps-config\";\nimport { SUPPORTED_CURRENCIES } from \"../utils/currency-constants\";\nimport { HexclaveAssertionError } 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\"],\n }],\n project: [{\n requirePublishableClientKey: [true, false],\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 signUpRules: [{\n \"some-rule-id\": [{\n enabled: [true, false],\n displayName: [\"Block Test Emails\", \"Allow Only Company Domain\"],\n priority: [0, 1, 100],\n condition: ['email.endsWith(\"@test.com\")', 'emailDomain == \"company.com\"'],\n action: [{\n type: [\"allow\", \"reject\", \"restrict\", \"log\"] as const,\n message: [\"\", \"Sign up is not allowed for this email\"],\n }],\n }],\n }],\n signUpRulesDefaultAction: [\"allow\", \"reject\"],\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 blockNewPurchases: [false, true],\n autoPay: [{\n interval: [[[0, 1, -3, 100, 0.333, Infinity], [\"day\", \"week\", \"month\", \"year\"]]] as const,\n }],\n productLines: [{\n \"some-product-line-id\": [{\n displayName: [\"Some Product Line\", \"Some Other Product Line\"],\n customerType: [\"user\", \"team\", \"custom\"] as const,\n }],\n }],\n catalogs: [{ // ensure migration works\n \"some-product-line-id\": [{\n displayName: [\"Some Product Line\", \"Some Other Product Line\"],\n }],\n }],\n groups: [{ // ensure migration works\n \"some-product-line-id\": [{\n displayName: [\"Some Product Line\", \"Some Other Product Line\"],\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 productLineId: [\"some-product-line-id\", \"some-other-product-line-id\"],\n catalogId: [\"some-product-line-id\", \"some-other-product-line-id\"], // ensure migration works\n groupId: [\"some-product-line-id\", \"some-other-product-line-id\"], // ensure migration works\n isAddOnTo: [false, { \"some-product-id\": [true], \"some-other-product-id\": [true] }] as const,\n prices: [{\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 apps: [{\n installed: [typedFromEntries(typedEntries(ALL_APPS).map(([key, value]) => [key, [{\n enabled: [true, false],\n }]]))],\n }],\n onboarding: [{\n requireEmailVerification: [true, false],\n }],\n \"deployments-alpha\": [{\n services: [{\n \"some-service-id\": [{\n type: [\"vercel\"] as const,\n framework: [\"nextjs\", \"vite\", \"\"],\n installCommand: [\"pnpm install\", \"\"],\n buildCommand: [\"pnpm build\", \"\"],\n outputDirectory: [\".next\", \"dist\", \"\"],\n rootDirectory: [\"./\", \"./apps/web\", \"\"],\n env: [{\n \"SOME_PLAIN_VAR\": [{\n type: [undefined] as (\"secret\" | \"connection\" | undefined)[],\n value: [\"some-value\", \"\"],\n key: [undefined] as (string | undefined)[],\n }],\n \"SOME_CONNECTION_VAR\": [{\n type: [\"connection\"] as const,\n // Stays valid even when the fuzzer drops `type`: without it, the\n // entry reads as a plain env var whose literal value happens to be\n // \"hexclave.projectId\".\n value: [\"hexclave.projectId\", \"some-other-service.url\"],\n key: [undefined] as (string | undefined)[],\n }],\n \"SOME_SECRET_VAR\": [{\n type: [\"secret\"] as const,\n value: [undefined] as (string | undefined)[],\n // Kept undefined: `key` is only allowed when type is \"secret\", and\n // the fuzzer randomizes each field independently so it cannot honor\n // that coupling (same situation as oauth's customCallbackUrl). The\n // accept path is covered by the schema unit tests and the\n // deployments e2e tests.\n key: [undefined] as (string | undefined)[],\n }],\n }],\n }],\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 // Kept undefined: the schema forbids customCallbackUrl when isShared is\n // true, and the fuzzer randomizes each field independently so it cannot\n // honor that coupling. The accept path is covered by an e2e test.\n customCallbackUrl: [undefined] as (string | undefined)[],\n facebookConfigId: [\"some-facebook-config-id\"],\n microsoftTenantId: [\"some-microsoft-tenant-id\"],\n appleBundles: [{ \"some-bundle-id\": [{ bundleId: [\"com.example.app\"] }] }],\n issuerUrl: [undefined, \"https://accounts.google.com\"] as (string | undefined)[],\n scope: [undefined, \"openid email profile\"] as (string | undefined)[],\n displayName: [undefined, \"My OIDC Provider\"] as (string | undefined)[],\n }]]))] as const,\n }],\n }],\n domains: [{\n allowLocalhost: [true, false],\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\", \"managed\"] 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 managedSubdomain: [\"mail.example.com\", \"invalid subdomain\"],\n managedSenderLocalPart: [\"noreply\", \"some invalid local part\"],\n }],\n }],\n payments: [{\n ...branchSchemaFuzzerConfig[0].payments[0],\n testMode: [false, true],\n }],\n dbSync: [{\n externalDatabases: [{\n \"some-external-db-id\": [{\n type: [\"postgres\"] as const,\n connectionString: [\n \"postgres://user:password@db.example.com:5432/database\",\n \"postgresql://user:password@db.example.net/database\",\n ],\n }],\n }],\n }],\n analytics: [{\n queryFolders: [{\n \"some-folder-id\": [{\n displayName: [\"Some Folder\", \"Some Other Folder\"],\n sortOrder: [0, 1, 10, -5],\n queries: [{\n \"some-query-id\": [{\n displayName: [\"Some Query\", \"Some Other Query\"],\n sqlQuery: [\"\", \"SELECT * FROM events\", \"SELECT * FROM users\"],\n description: [\"\", \"A query description\", \"Another description\"],\n }],\n }],\n }],\n }],\n }],\n customDashboards: [{\n \"12345678-1234-4234-9234-123456789012\": [{\n displayName: [\"My Dashboard\", \"User Growth Dashboard\"],\n tsxSource: [\"\", \"function Dashboard() { return <div>Hello</div>; }\"],\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\nimport.meta.vitest?.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 HexclaveAssertionError(`Error in iteration ${i}/${totalIterations} of schema fuzz: ${e}`, { cause: e });\n }\n }\n});\n\nimport.meta.vitest?.test(\"rejects include-by-default product prices in config overrides\", async ({ expect }) => {\n await expect(assertNoConfigOverrideErrors(branchConfigSchema, {\n \"payments.products.free.prices\": \"include-by-default\",\n })).rejects.toThrow(/payments\\.products\\.free\\.prices must not be one of the following values: include-by-default/);\n});\n"],"mappings":";;;;;;;;AAqBA,MAAM,2BAA2B,CAAC;CAChC,SAAS,CAAC,EACR,SAAS,CAAC;EACR,MAAM,CAAC,MAAM,KAAK;EAClB,MAAM,CAAC,MAAM,KAAK;CACpB,CAAC,EACH,CAAC;CACD,MAAM,CAAC;EACL,aAAa,CAAC,MAAM,KAAK;EACzB,UAAU,CAAC,EACT,aAAa,CAAC,MAAM,KAAK,EAC3B,CAAC;EACD,KAAK,CAAC,EACJ,aAAa,CAAC,MAAM,KAAK,EAC3B,CAAC;EACD,SAAS,CAAC,EACR,aAAa,CAAC,MAAM,KAAK,EAC3B,CAAC;EACD,OAAO,CAAC;GACN,sBAAsB;IAAC;IAAe;IAAe;GAAkB;GACvE,WAAW,CAAC,EACV,UAAU,CAAC;IACT,MAAM;KAAC;KAAU;KAAU;IAAG;IAC9B,aAAa,CAAC,MAAM,KAAK;IACzB,wBAAwB,CAAC,MAAM,KAAK;GACtC,CAAC,EACH,CAAC;EACH,CAAC;EACD,aAAa,CAAC,EACZ,gBAAgB,CAAC;GACf,SAAS,CAAC,MAAM,KAAK;GACrB,aAAa,CAAC,qBAAqB,2BAA2B;GAC9D,UAAU;IAAC;IAAG;IAAG;GAAG;GACpB,WAAW,CAAC,iCAA+B,gCAA8B;GACzE,QAAQ,CAAC;IACP,MAAM;KAAC;KAAS;KAAU;KAAY;IAAK;IAC3C,SAAS,CAAC,IAAI,uCAAuC;GACvD,CAAC;EACH,CAAC,EACH,CAAC;EACD,0BAA0B,CAAC,SAAS,QAAQ;CAC9C,CAAC;CACD,WAAW,CAAC,EACV,QAAQ,CAAC;EACP,iBAAiB,CA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