@mccaskie-labs/workbench-config 0.1.41 → 0.2.0
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/CHANGELOG.md +6 -0
- package/README.md +0 -1
- package/capabilities/ai.json +1 -1
- package/capabilities/email.json +1 -1
- package/capabilities/gateway.json +3 -5
- package/capabilities/image-search.json +1 -1
- package/capabilities/images.json +1 -1
- package/dist/capabilities.gen.d.ts +7 -9
- package/dist/capabilities.gen.js +7 -11
- package/dist/env.d.ts +0 -1
- package/dist/env.js +0 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @mccaskie-labs/workbench-config
|
|
2
2
|
|
|
3
|
+
## 0.2.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Breaking: there is no built-in Gateway address any more (hard rule 13, `docs/install-plan.md`). `DEFAULT_GATEWAY_URL` is removed from workbench-config, `createAi` needs `url`, and `createMailer`'s gateway transport needs `gateway.url`. Pass the app's `WORKBENCH_GATEWAY_URL`, which Control writes into `wrangler.jsonc` when it creates a project. A missing address fails at start-up with `invalid_config` and the message "WORKBENCH_GATEWAY_URL is missing". The gateway manifest marks `WORKBENCH_GATEWAY_URL` required with no default.
|
|
8
|
+
|
|
3
9
|
## 0.1.41
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -30,7 +30,6 @@ const { WORKBENCH_GATEWAY_KEY } = config.parse(env)
|
|
|
30
30
|
| `defineBrand(json)`, `brandSchema`, `resolveBrand`, `BRAND_DEFAULTS`, `BRAND_FILE` | The app's brand file, `brand.json` at the repo root: `name`, `siteUrl` (https), `logo.url` (https PNG, JPEG or SVG; optional `alt`, `width`, `height`), `colours.primary` (`#rrggbb`; `text`, `background`, `muted` default), optional `fonts.heading`/`fonts.body` (`{ family, url? }`, `url` an https stylesheet), `supportEmail` and `footer`. Unknown keys fail. Account emails, PDFs and Supabase's sign-in emails all read it |
|
|
31
31
|
| `checkLogo(bytes)`, `placeholderLogo(name, colour)`, `colourForId(id)`, `parseColour`, `whiteContrast`, `shownSize`, `LOGO_PATHS`, `MAX_LOGO_BYTES`, `BrandAssetError` | Setting a brand from an upload: the logo is checked by its own bytes (PNG or JPEG, at most 256 KiB; SVG refused because Gmail and Outlook don't show it), a project with no logo gets its initials on its colour as a 96 × 96 PNG, and a project with no colour gets a steady one from its id that white text reads on (WCAG 4.5:1). Runs in Workers, the browser and Node |
|
|
32
32
|
| `VENDOR_SETTINGS`, `resolveVendorSettings(file, env)`, `vendorSettingsFileSchema`, `VENDOR_SETTINGS_FILE`, `SEND_EMAIL_HOOK`, `SEND_EMAIL_HOOK_PATH`, `SEND_EMAIL_HOOK_SECRET` | The vendor settings baseline: settings that live in a vendor dashboard (field, value, where it is, what breaks if it changes). A project changes a row in `vendor-settings.json` at its repo root, with a reason. Control applies it with `vendor_settings_apply` and compares it every day |
|
|
33
|
-
| `DEFAULT_GATEWAY_URL` | `https://gateway.mccaskielabs.dev` |
|
|
34
33
|
|
|
35
34
|
`npx workbench-config check [dir]` compares the variable names in `.dev.vars` with `.dev.vars.example` and prints names only.
|
|
36
35
|
|
package/capabilities/ai.json
CHANGED
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"title": "One-shot text",
|
|
96
96
|
"lang": "ts",
|
|
97
97
|
"probe": "ai.text.claude-default",
|
|
98
|
-
"code": "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env) })\nconst r = await ai.text({ model: 'claude-default', job: 'article.write', prompt })\nawait save({ text: r.text, model: r.model, requestId: r.requestId })"
|
|
98
|
+
"code": "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env), url: env.WORKBENCH_GATEWAY_URL })\nconst r = await ai.text({ model: 'claude-default', job: 'article.write', prompt })\nawait save({ text: r.text, model: r.model, requestId: r.requestId })"
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
101
|
"id": "ai.example.voice",
|
package/capabilities/email.json
CHANGED
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"title": "Send a transactional mail with an inline logo",
|
|
53
53
|
"lang": "ts",
|
|
54
54
|
"probe": "email.send.inline-attachment",
|
|
55
|
-
"code": "const env = workbenchEnv(process.env)\nconst mailer = createMailer({ env, transport: selectTransport(env), from: { address: 'hello@mail.example.com', name: 'Example' }, gateway: { key: process.env.WORKBENCH_GATEWAY_KEY! } })\nawait mailer.send({ to: user.email, subject: 'Welcome', text, html: '<img src=\"cid:logo\"> ...', template: 'welcome', idempotencyKey: `welcome:${user.id}`, attachments: [{ filename: 'logo.png', mimeType: 'image/png', bytes: logo, contentId: 'logo' }] })"
|
|
55
|
+
"code": "const env = workbenchEnv(process.env)\nconst mailer = createMailer({ env, transport: selectTransport(env), from: { address: 'hello@mail.example.com', name: 'Example' }, gateway: { key: process.env.WORKBENCH_GATEWAY_KEY!, url: process.env.WORKBENCH_GATEWAY_URL! } })\nawait mailer.send({ to: user.email, subject: 'Welcome', text, html: '<img src=\"cid:logo\"> ...', template: 'welcome', idempotencyKey: `welcome:${user.id}`, attachments: [{ filename: 'logo.png', mimeType: 'image/png', bytes: logo, contentId: 'logo' }] })"
|
|
56
56
|
}
|
|
57
57
|
],
|
|
58
58
|
"probes": [
|
|
@@ -6,8 +6,7 @@
|
|
|
6
6
|
"summary": "What every Gateway endpoint shares: project keys by environment and scope, the request and response headers, the monthly budget check and the error codes. Apps hold one Workbench key and never a vendor key.",
|
|
7
7
|
"status": "built",
|
|
8
8
|
"surfaces": {
|
|
9
|
-
"gateway": ["GET /v1/health", "GET /v1/usage", "GET /v1/capabilities", "GET /v1/calls"]
|
|
10
|
-
"package": ["DEFAULT_GATEWAY_URL"]
|
|
9
|
+
"gateway": ["GET /v1/health", "GET /v1/usage", "GET /v1/capabilities", "GET /v1/calls"]
|
|
11
10
|
},
|
|
12
11
|
"config": [
|
|
13
12
|
{
|
|
@@ -19,11 +18,10 @@
|
|
|
19
18
|
},
|
|
20
19
|
{
|
|
21
20
|
"name": "WORKBENCH_GATEWAY_URL",
|
|
22
|
-
"required":
|
|
21
|
+
"required": true,
|
|
23
22
|
"secret": false,
|
|
24
|
-
"default": "https://gateway.mccaskielabs.dev",
|
|
25
23
|
"environments": ["development", "staging", "production"],
|
|
26
|
-
"description": "Gateway
|
|
24
|
+
"description": "The address of this Workbench install's Gateway. Control writes it into wrangler.jsonc when it creates the project; there is no built-in address"
|
|
27
25
|
}
|
|
28
26
|
],
|
|
29
27
|
"allowed": {
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"title": "Search for images",
|
|
121
121
|
"lang": "ts",
|
|
122
122
|
"probe": "image-search.serper",
|
|
123
|
-
"code": "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env) })\nconst results = await ai.images.search({ q: 'Mayon volcano', job: 'editor.image-search', num: 10 })"
|
|
123
|
+
"code": "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env), url: env.WORKBENCH_GATEWAY_URL })\nconst results = await ai.images.search({ q: 'Mayon volcano', job: 'editor.image-search', num: 10 })"
|
|
124
124
|
}
|
|
125
125
|
],
|
|
126
126
|
"probes": [
|
package/capabilities/images.json
CHANGED
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
"title": "Generate one image",
|
|
167
167
|
"lang": "ts",
|
|
168
168
|
"probe": "images.generate.image-default",
|
|
169
|
-
"code": "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env) })\nconst img = await ai.images.generate({ prompt, aspectRatio: '3:2', job: 'article.hero' })\nawait env.IMAGES.put(key, img.bytes, { httpMetadata: { contentType: img.mimeType }, customMetadata: { model: img.model, requestId: img.requestId } })"
|
|
169
|
+
"code": "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env), url: env.WORKBENCH_GATEWAY_URL })\nconst img = await ai.images.generate({ prompt, aspectRatio: '3:2', job: 'article.hero' })\nawait env.IMAGES.put(key, img.bytes, { httpMetadata: { contentType: img.mimeType }, customMetadata: { model: img.model, requestId: img.requestId } })"
|
|
170
170
|
},
|
|
171
171
|
{
|
|
172
172
|
"id": "images.example.reference",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const MANIFEST_VERSION: "
|
|
1
|
+
export declare const MANIFEST_VERSION: "5f4a5d2dad37";
|
|
2
2
|
export declare const capabilities: {
|
|
3
3
|
readonly ai: {
|
|
4
4
|
readonly $schema: "./schema.json";
|
|
@@ -119,7 +119,7 @@ export declare const capabilities: {
|
|
|
119
119
|
readonly id: "ai.example.text";
|
|
120
120
|
readonly title: "One-shot text";
|
|
121
121
|
readonly lang: "ts";
|
|
122
|
-
readonly code: "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env) })\nconst r = await ai.text({ model: 'claude-default', job: 'article.write', prompt })\nawait save({ text: r.text, model: r.model, requestId: r.requestId })";
|
|
122
|
+
readonly code: "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env), url: env.WORKBENCH_GATEWAY_URL })\nconst r = await ai.text({ model: 'claude-default', job: 'article.write', prompt })\nawait save({ text: r.text, model: r.model, requestId: r.requestId })";
|
|
123
123
|
readonly probe: "ai.text.claude-default";
|
|
124
124
|
}, {
|
|
125
125
|
readonly id: "ai.example.voice";
|
|
@@ -816,7 +816,7 @@ export declare const capabilities: {
|
|
|
816
816
|
readonly id: "email.example.send";
|
|
817
817
|
readonly title: "Send a transactional mail with an inline logo";
|
|
818
818
|
readonly lang: "ts";
|
|
819
|
-
readonly code: "const env = workbenchEnv(process.env)\nconst mailer = createMailer({ env, transport: selectTransport(env), from: { address: 'hello@mail.example.com', name: 'Example' }, gateway: { key: process.env.WORKBENCH_GATEWAY_KEY! } })\nawait mailer.send({ to: user.email, subject: 'Welcome', text, html: '<img src=\"cid:logo\"> ...', template: 'welcome', idempotencyKey: `welcome:${user.id}`, attachments: [{ filename: 'logo.png', mimeType: 'image/png', bytes: logo, contentId: 'logo' }] })";
|
|
819
|
+
readonly code: "const env = workbenchEnv(process.env)\nconst mailer = createMailer({ env, transport: selectTransport(env), from: { address: 'hello@mail.example.com', name: 'Example' }, gateway: { key: process.env.WORKBENCH_GATEWAY_KEY!, url: process.env.WORKBENCH_GATEWAY_URL! } })\nawait mailer.send({ to: user.email, subject: 'Welcome', text, html: '<img src=\"cid:logo\"> ...', template: 'welcome', idempotencyKey: `welcome:${user.id}`, attachments: [{ filename: 'logo.png', mimeType: 'image/png', bytes: logo, contentId: 'logo' }] })";
|
|
820
820
|
readonly probe: "email.send.inline-attachment";
|
|
821
821
|
}];
|
|
822
822
|
readonly probes: readonly [{
|
|
@@ -1366,7 +1366,6 @@ export declare const capabilities: {
|
|
|
1366
1366
|
readonly status: "built";
|
|
1367
1367
|
readonly surfaces: {
|
|
1368
1368
|
readonly gateway: readonly ["GET /v1/health", "GET /v1/usage", "GET /v1/capabilities", "GET /v1/calls"];
|
|
1369
|
-
readonly package: readonly ["DEFAULT_GATEWAY_URL"];
|
|
1370
1369
|
};
|
|
1371
1370
|
readonly config: readonly [{
|
|
1372
1371
|
readonly name: "WORKBENCH_GATEWAY_KEY";
|
|
@@ -1376,11 +1375,10 @@ export declare const capabilities: {
|
|
|
1376
1375
|
readonly description: "The project's Gateway key for this environment, delivered as a Worker secret by gw_key_issue. Never in code, .dev.vars.example or logs";
|
|
1377
1376
|
}, {
|
|
1378
1377
|
readonly name: "WORKBENCH_GATEWAY_URL";
|
|
1379
|
-
readonly required:
|
|
1378
|
+
readonly required: true;
|
|
1380
1379
|
readonly secret: false;
|
|
1381
|
-
readonly default: "https://gateway.mccaskielabs.dev";
|
|
1382
1380
|
readonly environments: readonly ["development", "staging", "production"];
|
|
1383
|
-
readonly description: "Gateway
|
|
1381
|
+
readonly description: "The address of this Workbench install's Gateway. Control writes it into wrangler.jsonc when it creates the project; there is no built-in address";
|
|
1384
1382
|
}];
|
|
1385
1383
|
readonly allowed: {
|
|
1386
1384
|
readonly scopes: readonly ["ai", "images", "search", "email"];
|
|
@@ -1679,7 +1677,7 @@ export declare const capabilities: {
|
|
|
1679
1677
|
readonly id: "image-search.example.search";
|
|
1680
1678
|
readonly title: "Search for images";
|
|
1681
1679
|
readonly lang: "ts";
|
|
1682
|
-
readonly code: "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env) })\nconst results = await ai.images.search({ q: 'Mayon volcano', job: 'editor.image-search', num: 10 })";
|
|
1680
|
+
readonly code: "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env), url: env.WORKBENCH_GATEWAY_URL })\nconst results = await ai.images.search({ q: 'Mayon volcano', job: 'editor.image-search', num: 10 })";
|
|
1683
1681
|
readonly probe: "image-search.serper";
|
|
1684
1682
|
}];
|
|
1685
1683
|
readonly probes: readonly [{
|
|
@@ -1809,7 +1807,7 @@ export declare const capabilities: {
|
|
|
1809
1807
|
readonly id: "images.example.generate";
|
|
1810
1808
|
readonly title: "Generate one image";
|
|
1811
1809
|
readonly lang: "ts";
|
|
1812
|
-
readonly code: "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env) })\nconst img = await ai.images.generate({ prompt, aspectRatio: '3:2', job: 'article.hero' })\nawait env.IMAGES.put(key, img.bytes, { httpMetadata: { contentType: img.mimeType }, customMetadata: { model: img.model, requestId: img.requestId } })";
|
|
1810
|
+
readonly code: "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env), url: env.WORKBENCH_GATEWAY_URL })\nconst img = await ai.images.generate({ prompt, aspectRatio: '3:2', job: 'article.hero' })\nawait env.IMAGES.put(key, img.bytes, { httpMetadata: { contentType: img.mimeType }, customMetadata: { model: img.model, requestId: img.requestId } })";
|
|
1813
1811
|
readonly probe: "images.generate.image-default";
|
|
1814
1812
|
}, {
|
|
1815
1813
|
readonly id: "images.example.reference";
|
package/dist/capabilities.gen.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Generated by `npm run capabilities:build` from capabilities/*.json. Do not edit.
|
|
2
2
|
// check:capabilities fails in Checks when this file is stale.
|
|
3
|
-
export const MANIFEST_VERSION = "
|
|
3
|
+
export const MANIFEST_VERSION = "5f4a5d2dad37";
|
|
4
4
|
export const capabilities = {
|
|
5
5
|
"ai": {
|
|
6
6
|
"$schema": "./schema.json",
|
|
@@ -204,7 +204,7 @@ export const capabilities = {
|
|
|
204
204
|
"id": "ai.example.text",
|
|
205
205
|
"title": "One-shot text",
|
|
206
206
|
"lang": "ts",
|
|
207
|
-
"code": "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env) })\nconst r = await ai.text({ model: 'claude-default', job: 'article.write', prompt })\nawait save({ text: r.text, model: r.model, requestId: r.requestId })",
|
|
207
|
+
"code": "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env), url: env.WORKBENCH_GATEWAY_URL })\nconst r = await ai.text({ model: 'claude-default', job: 'article.write', prompt })\nawait save({ text: r.text, model: r.model, requestId: r.requestId })",
|
|
208
208
|
"probe": "ai.text.claude-default"
|
|
209
209
|
},
|
|
210
210
|
{
|
|
@@ -1139,7 +1139,7 @@ export const capabilities = {
|
|
|
1139
1139
|
"id": "email.example.send",
|
|
1140
1140
|
"title": "Send a transactional mail with an inline logo",
|
|
1141
1141
|
"lang": "ts",
|
|
1142
|
-
"code": "const env = workbenchEnv(process.env)\nconst mailer = createMailer({ env, transport: selectTransport(env), from: { address: 'hello@mail.example.com', name: 'Example' }, gateway: { key: process.env.WORKBENCH_GATEWAY_KEY! } })\nawait mailer.send({ to: user.email, subject: 'Welcome', text, html: '<img src=\"cid:logo\"> ...', template: 'welcome', idempotencyKey: `welcome:${user.id}`, attachments: [{ filename: 'logo.png', mimeType: 'image/png', bytes: logo, contentId: 'logo' }] })",
|
|
1142
|
+
"code": "const env = workbenchEnv(process.env)\nconst mailer = createMailer({ env, transport: selectTransport(env), from: { address: 'hello@mail.example.com', name: 'Example' }, gateway: { key: process.env.WORKBENCH_GATEWAY_KEY!, url: process.env.WORKBENCH_GATEWAY_URL! } })\nawait mailer.send({ to: user.email, subject: 'Welcome', text, html: '<img src=\"cid:logo\"> ...', template: 'welcome', idempotencyKey: `welcome:${user.id}`, attachments: [{ filename: 'logo.png', mimeType: 'image/png', bytes: logo, contentId: 'logo' }] })",
|
|
1143
1143
|
"probe": "email.send.inline-attachment"
|
|
1144
1144
|
}
|
|
1145
1145
|
],
|
|
@@ -1861,9 +1861,6 @@ export const capabilities = {
|
|
|
1861
1861
|
"GET /v1/usage",
|
|
1862
1862
|
"GET /v1/capabilities",
|
|
1863
1863
|
"GET /v1/calls"
|
|
1864
|
-
],
|
|
1865
|
-
"package": [
|
|
1866
|
-
"DEFAULT_GATEWAY_URL"
|
|
1867
1864
|
]
|
|
1868
1865
|
},
|
|
1869
1866
|
"config": [
|
|
@@ -1879,15 +1876,14 @@ export const capabilities = {
|
|
|
1879
1876
|
},
|
|
1880
1877
|
{
|
|
1881
1878
|
"name": "WORKBENCH_GATEWAY_URL",
|
|
1882
|
-
"required":
|
|
1879
|
+
"required": true,
|
|
1883
1880
|
"secret": false,
|
|
1884
|
-
"default": "https://gateway.mccaskielabs.dev",
|
|
1885
1881
|
"environments": [
|
|
1886
1882
|
"development",
|
|
1887
1883
|
"staging",
|
|
1888
1884
|
"production"
|
|
1889
1885
|
],
|
|
1890
|
-
"description": "Gateway
|
|
1886
|
+
"description": "The address of this Workbench install's Gateway. Control writes it into wrangler.jsonc when it creates the project; there is no built-in address"
|
|
1891
1887
|
}
|
|
1892
1888
|
],
|
|
1893
1889
|
"allowed": {
|
|
@@ -2278,7 +2274,7 @@ export const capabilities = {
|
|
|
2278
2274
|
"id": "image-search.example.search",
|
|
2279
2275
|
"title": "Search for images",
|
|
2280
2276
|
"lang": "ts",
|
|
2281
|
-
"code": "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env) })\nconst results = await ai.images.search({ q: 'Mayon volcano', job: 'editor.image-search', num: 10 })",
|
|
2277
|
+
"code": "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env), url: env.WORKBENCH_GATEWAY_URL })\nconst results = await ai.images.search({ q: 'Mayon volcano', job: 'editor.image-search', num: 10 })",
|
|
2282
2278
|
"probe": "image-search.serper"
|
|
2283
2279
|
}
|
|
2284
2280
|
],
|
|
@@ -2459,7 +2455,7 @@ export const capabilities = {
|
|
|
2459
2455
|
"id": "images.example.generate",
|
|
2460
2456
|
"title": "Generate one image",
|
|
2461
2457
|
"lang": "ts",
|
|
2462
|
-
"code": "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env) })\nconst img = await ai.images.generate({ prompt, aspectRatio: '3:2', job: 'article.hero' })\nawait env.IMAGES.put(key, img.bytes, { httpMetadata: { contentType: img.mimeType }, customMetadata: { model: img.model, requestId: img.requestId } })",
|
|
2458
|
+
"code": "const ai = createAi({ key: env.WORKBENCH_GATEWAY_KEY, env: workbenchEnv(env), url: env.WORKBENCH_GATEWAY_URL })\nconst img = await ai.images.generate({ prompt, aspectRatio: '3:2', job: 'article.hero' })\nawait env.IMAGES.put(key, img.bytes, { httpMetadata: { contentType: img.mimeType }, customMetadata: { model: img.model, requestId: img.requestId } })",
|
|
2463
2459
|
"probe": "images.generate.image-default"
|
|
2464
2460
|
},
|
|
2465
2461
|
{
|
package/dist/env.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export declare const WORKBENCH_ENVS: readonly ["development", "staging", "production"];
|
|
2
2
|
export type WorkbenchEnv = (typeof WORKBENCH_ENVS)[number];
|
|
3
|
-
export declare const DEFAULT_GATEWAY_URL = "https://gateway.mccaskielabs.dev";
|
|
4
3
|
/**
|
|
5
4
|
* Reads `WORKBENCH_ENV`. Throws if it is missing or not one of the three
|
|
6
5
|
* environments. Never falls back to `NODE_ENV` or a default (audit F9, F18).
|
package/dist/env.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { invalid, missing } from "./errors.js";
|
|
2
2
|
export const WORKBENCH_ENVS = ["development", "staging", "production"];
|
|
3
|
-
export const DEFAULT_GATEWAY_URL = "https://gateway.mccaskielabs.dev";
|
|
4
3
|
/**
|
|
5
4
|
* Reads `WORKBENCH_ENV`. Throws if it is missing or not one of the three
|
|
6
5
|
* environments. Never falls back to `NODE_ENV` or a default (audit F9, F18).
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { WORKBENCH_ENVS,
|
|
1
|
+
export { WORKBENCH_ENVS, workbenchEnv, type WorkbenchEnv } from "./env.ts";
|
|
2
2
|
export { defineConfig, type Config } from "./define-config.ts";
|
|
3
3
|
export { sharedSecret, workerSecret, redact, redactAll, type SecretsStoreSecretLike } from "./secrets.ts";
|
|
4
4
|
export { WorkbenchConfigError, type ConfigErrorCode, type ConfigProblem } from "./errors.ts";
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { WORKBENCH_ENVS,
|
|
1
|
+
export { WORKBENCH_ENVS, workbenchEnv } from "./env.js";
|
|
2
2
|
export { defineConfig } from "./define-config.js";
|
|
3
3
|
export { sharedSecret, workerSecret, redact, redactAll } from "./secrets.js";
|
|
4
4
|
export { WorkbenchConfigError } from "./errors.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mccaskie-labs/workbench-config",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Workbench app configuration: WORKBENCH_ENV, typed variables that fail by name, secrets that are never printed, and the capabilities manifest.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|