@pithy-sh/support 0.2.8 → 0.2.9

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.
@@ -1,5 +1,6 @@
1
1
  // SPDX-FileCopyrightText: 2026 Pithy
2
2
  // SPDX-License-Identifier: MIT
3
+ import type { FeatureIdentity } from "@pithy-sh/core/src/naming/feature";
3
4
  import { type WorkflowHostTemplate } from "@pithy-sh/core/src/workflow/host";
4
5
  import type { ManagedEnvironment } from "@pithy-sh/secrets/src/scope";
5
6
  import type { SupportConfig } from "../config/config";
@@ -31,6 +32,11 @@ export interface SupportConfigParams {
31
32
  project: string;
32
33
  /** The target environment. */
33
34
  env: ManagedEnvironment;
35
+ /**
36
+ * **The feature this host serves, when it serves one (#643).** Its Worker, its Workflows and every store
37
+ * entry it binds then take the feature's names, as every feature host's do; `env` is `feature`.
38
+ */
39
+ feature?: FeatureIdentity;
34
40
  /** The app database id for this environment — where the support tables live. */
35
41
  appDatabaseId: string;
36
42
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"resolveSupportConfig.d.ts","sourceRoot":"","sources":["../../src/provision/resolveSupportConfig.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyC,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACpH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD;;;;;;;;;;;;;;;;;;GAkBG;AAEH,8FAA8F;AAC9F,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,GAAG,EAAE,kBAAkB,CAAC;IACxB,gFAAgF;IAChF,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED,6CAA6C;AAC7C,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,oBAAoB,EAC9B,MAAM,EAAE,mBAAmB,GAC1B,oBAAoB,CAatB"}
1
+ {"version":3,"file":"resolveSupportConfig.d.ts","sourceRoot":"","sources":["../../src/provision/resolveSupportConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAyC,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACpH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGtD;;;;;;;;;;;;;;;;;;GAkBG;AAEH,8FAA8F;AAC9F,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,8BAA8B;IAC9B,GAAG,EAAE,kBAAkB,CAAC;IACxB;;;OAGG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,gFAAgF;IAChF,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;;OAMG;IACH,aAAa,EAAE,aAAa,CAAC;CAC9B;AAED,6CAA6C;AAC7C,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,oBAAoB,EAC9B,MAAM,EAAE,mBAAmB,GAC1B,oBAAoB,CAoBtB"}
@@ -5,18 +5,21 @@ import { hostWorkflowsFor, resolveWorkflowHost } from "@pithy-sh/core/src/workfl
5
5
  //#region src/provision/resolveSupportConfig.ts
6
6
  /** Fill the template for one environment. */
7
7
  function resolveSupportConfig(template, params) {
8
+ const feature = params.feature;
8
9
  const { project, env } = params;
9
10
  return resolveWorkflowHost(template, {
10
11
  project,
11
12
  capability: SUPPORT_CAPABILITY,
12
13
  env,
14
+ ...feature ? { feature } : {},
13
15
  databaseIds: { DB: params.appDatabaseId },
14
16
  remoteBindings: ["AI"],
15
17
  vars: { SUPPORT_CONFIG: JSON.stringify(params.supportConfig) },
16
18
  workflows: hostWorkflowsFor(supportWorkflowRegistry, {
17
19
  project,
18
20
  capability: SUPPORT_CAPABILITY,
19
- env
21
+ env,
22
+ ...feature ? { feature } : {}
20
23
  }).workflows
21
24
  });
22
25
  }
@@ -3,5 +3,5 @@
3
3
  /** This package's npm name — the join key against a release feed. */
4
4
  export declare const PACKAGE_NAME = "@pithy-sh/support";
5
5
  /** This package's version, stamped from its own package.json at generation time. */
6
- export declare const PACKAGE_VERSION = "0.2.8";
6
+ export declare const PACKAGE_VERSION = "0.2.9";
7
7
  //# sourceMappingURL=version.generated.d.ts.map
@@ -4,6 +4,6 @@
4
4
  /** This package's npm name — the join key against a release feed. */
5
5
  const PACKAGE_NAME = "@pithy-sh/support";
6
6
  /** This package's version, stamped from its own package.json at generation time. */
7
- const PACKAGE_VERSION = "0.2.8";
7
+ const PACKAGE_VERSION = "0.2.9";
8
8
  //#endregion
9
9
  export { PACKAGE_NAME, PACKAGE_VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pithy-sh/support",
3
- "version": "0.2.8",
3
+ "version": "0.2.9",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,11 +41,11 @@
41
41
  },
42
42
  "peerDependencies": {
43
43
  "@pithy-sh/auth": "^0.6.3",
44
- "@pithy-sh/core": "^0.7.3",
45
- "@pithy-sh/email": "^0.3.7",
46
- "@pithy-sh/payments": "^0.3.5",
47
- "@pithy-sh/secrets": "^0.2.6",
48
- "@pithy-sh/storage": "^0.2.6",
44
+ "@pithy-sh/core": "^0.7.4",
45
+ "@pithy-sh/email": "^0.3.8",
46
+ "@pithy-sh/payments": "^0.3.6",
47
+ "@pithy-sh/secrets": "^0.2.7",
48
+ "@pithy-sh/storage": "^0.2.7",
49
49
  "hono": "^4.13.2",
50
50
  "kysely": "^0.29.0",
51
51
  "zod": "^4.4.0"
@@ -1,6 +1,7 @@
1
1
  // SPDX-FileCopyrightText: 2026 Pithy
2
2
  // SPDX-License-Identifier: MIT
3
3
 
4
+ import type { FeatureIdentity } from "@pithy-sh/core/src/naming/feature";
4
5
  import { hostWorkflowsFor, resolveWorkflowHost, type WorkflowHostTemplate } from "@pithy-sh/core/src/workflow/host";
5
6
  import type { ManagedEnvironment } from "@pithy-sh/secrets/src/scope";
6
7
  import type { SupportConfig } from "../config/config";
@@ -35,6 +36,11 @@ export interface SupportConfigParams {
35
36
  project: string;
36
37
  /** The target environment. */
37
38
  env: ManagedEnvironment;
39
+ /**
40
+ * **The feature this host serves, when it serves one (#643).** Its Worker, its Workflows and every store
41
+ * entry it binds then take the feature's names, as every feature host's do; `env` is `feature`.
42
+ */
43
+ feature?: FeatureIdentity;
38
44
  /** The app database id for this environment — where the support tables live. */
39
45
  appDatabaseId: string;
40
46
  /**
@@ -52,16 +58,23 @@ export function resolveSupportConfig(
52
58
  template: WorkflowHostTemplate,
53
59
  params: SupportConfigParams,
54
60
  ): WorkflowHostTemplate {
61
+ const feature = params.feature;
55
62
  const { project, env } = params;
56
63
  return resolveWorkflowHost(template, {
57
64
  project,
58
65
  capability: SUPPORT_CAPABILITY,
59
66
  env,
67
+ ...(feature ? { feature } : {}),
60
68
  databaseIds: { DB: params.appDatabaseId },
61
69
  remoteBindings: ["AI"],
62
70
  vars: { SUPPORT_CONFIG: JSON.stringify(params.supportConfig) },
63
71
  // The classification Workflow, derived from support's own specs. A Workflow name is
64
72
  // account-scoped, so it has to carry the project, and only the registry knows the job.
65
- workflows: hostWorkflowsFor(supportWorkflowRegistry, { project, capability: SUPPORT_CAPABILITY, env }).workflows,
73
+ workflows: hostWorkflowsFor(supportWorkflowRegistry, {
74
+ project,
75
+ capability: SUPPORT_CAPABILITY,
76
+ env,
77
+ ...(feature ? { feature } : {}),
78
+ }).workflows,
66
79
  });
67
80
  }
@@ -13,4 +13,4 @@
13
13
  export const PACKAGE_NAME = "@pithy-sh/support";
14
14
 
15
15
  /** This package's version, stamped from its own package.json at generation time. */
16
- export const PACKAGE_VERSION = "0.2.8";
16
+ export const PACKAGE_VERSION = "0.2.9";