@mannyc1/ts-release 0.0.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.
Files changed (125) hide show
  1. package/README.md +249 -0
  2. package/SPEC.md +254 -0
  3. package/dist/cli/command.d.ts +4 -0
  4. package/dist/cli/command.d.ts.map +1 -0
  5. package/dist/cli/command.js +90 -0
  6. package/dist/cli/command.js.map +1 -0
  7. package/dist/cli/main.d.ts +3 -0
  8. package/dist/cli/main.d.ts.map +1 -0
  9. package/dist/cli/main.js +12 -0
  10. package/dist/cli/main.js.map +1 -0
  11. package/dist/cli/programmatic.d.ts +25 -0
  12. package/dist/cli/programmatic.d.ts.map +1 -0
  13. package/dist/cli/programmatic.js +48 -0
  14. package/dist/cli/programmatic.js.map +1 -0
  15. package/dist/config/errors.d.ts +23 -0
  16. package/dist/config/errors.d.ts.map +1 -0
  17. package/dist/config/errors.js +18 -0
  18. package/dist/config/errors.js.map +1 -0
  19. package/dist/config/load.d.ts +9 -0
  20. package/dist/config/load.d.ts.map +1 -0
  21. package/dist/config/load.js +27 -0
  22. package/dist/config/load.js.map +1 -0
  23. package/dist/config/schema.d.ts +8 -0
  24. package/dist/config/schema.d.ts.map +1 -0
  25. package/dist/config/schema.js +6 -0
  26. package/dist/config/schema.js.map +1 -0
  27. package/dist/domain/artifact.d.ts +36 -0
  28. package/dist/domain/artifact.d.ts.map +1 -0
  29. package/dist/domain/artifact.js +29 -0
  30. package/dist/domain/artifact.js.map +1 -0
  31. package/dist/domain/evidence.d.ts +58 -0
  32. package/dist/domain/evidence.d.ts.map +1 -0
  33. package/dist/domain/evidence.js +50 -0
  34. package/dist/domain/evidence.js.map +1 -0
  35. package/dist/domain/operation.d.ts +98 -0
  36. package/dist/domain/operation.d.ts.map +1 -0
  37. package/dist/domain/operation.js +133 -0
  38. package/dist/domain/operation.js.map +1 -0
  39. package/dist/domain/release.d.ts +66 -0
  40. package/dist/domain/release.d.ts.map +1 -0
  41. package/dist/domain/release.js +56 -0
  42. package/dist/domain/release.js.map +1 -0
  43. package/dist/domain/target.d.ts +75 -0
  44. package/dist/domain/target.d.ts.map +1 -0
  45. package/dist/domain/target.js +67 -0
  46. package/dist/domain/target.js.map +1 -0
  47. package/dist/host/bun.d.ts +9 -0
  48. package/dist/host/bun.d.ts.map +1 -0
  49. package/dist/host/bun.js +156 -0
  50. package/dist/host/bun.js.map +1 -0
  51. package/dist/host/host.d.ts +47 -0
  52. package/dist/host/host.d.ts.map +1 -0
  53. package/dist/host/host.js +42 -0
  54. package/dist/host/host.js.map +1 -0
  55. package/dist/host/test.d.ts +19 -0
  56. package/dist/host/test.d.ts.map +1 -0
  57. package/dist/host/test.js +76 -0
  58. package/dist/host/test.js.map +1 -0
  59. package/dist/index.d.ts +2 -0
  60. package/dist/index.d.ts.map +1 -0
  61. package/dist/index.js +2 -0
  62. package/dist/index.js.map +1 -0
  63. package/dist/planner/create-release-plan.d.ts +5 -0
  64. package/dist/planner/create-release-plan.d.ts.map +1 -0
  65. package/dist/planner/create-release-plan.js +25 -0
  66. package/dist/planner/create-release-plan.js.map +1 -0
  67. package/dist/planner/errors.d.ts +37 -0
  68. package/dist/planner/errors.d.ts.map +1 -0
  69. package/dist/planner/errors.js +30 -0
  70. package/dist/planner/errors.js.map +1 -0
  71. package/dist/planner/evidence-recorder.d.ts +18 -0
  72. package/dist/planner/evidence-recorder.d.ts.map +1 -0
  73. package/dist/planner/evidence-recorder.js +95 -0
  74. package/dist/planner/evidence-recorder.js.map +1 -0
  75. package/dist/planner/executor.d.ts +19 -0
  76. package/dist/planner/executor.d.ts.map +1 -0
  77. package/dist/planner/executor.js +59 -0
  78. package/dist/planner/executor.js.map +1 -0
  79. package/dist/planner/normalize-release.d.ts +7 -0
  80. package/dist/planner/normalize-release.d.ts.map +1 -0
  81. package/dist/planner/normalize-release.js +101 -0
  82. package/dist/planner/normalize-release.js.map +1 -0
  83. package/dist/planner/render-plan.d.ts +5 -0
  84. package/dist/planner/render-plan.d.ts.map +1 -0
  85. package/dist/planner/render-plan.js +49 -0
  86. package/dist/planner/render-plan.js.map +1 -0
  87. package/dist/targets/adapter.d.ts +15 -0
  88. package/dist/targets/adapter.d.ts.map +1 -0
  89. package/dist/targets/adapter.js +2 -0
  90. package/dist/targets/adapter.js.map +1 -0
  91. package/dist/targets/github.d.ts +11 -0
  92. package/dist/targets/github.d.ts.map +1 -0
  93. package/dist/targets/github.js +174 -0
  94. package/dist/targets/github.js.map +1 -0
  95. package/dist/targets/homebrew.d.ts +11 -0
  96. package/dist/targets/homebrew.d.ts.map +1 -0
  97. package/dist/targets/homebrew.js +153 -0
  98. package/dist/targets/homebrew.js.map +1 -0
  99. package/dist/targets/live.d.ts +5 -0
  100. package/dist/targets/live.d.ts.map +1 -0
  101. package/dist/targets/live.js +31 -0
  102. package/dist/targets/live.js.map +1 -0
  103. package/dist/targets/npm.d.ts +11 -0
  104. package/dist/targets/npm.d.ts.map +1 -0
  105. package/dist/targets/npm.js +105 -0
  106. package/dist/targets/npm.js.map +1 -0
  107. package/dist/targets/registry.d.ts +25 -0
  108. package/dist/targets/registry.d.ts.map +1 -0
  109. package/dist/targets/registry.js +34 -0
  110. package/dist/targets/registry.js.map +1 -0
  111. package/dist/types/effect-internal.d.ts +5 -0
  112. package/dist/types/effect-internal.d.ts.map +1 -0
  113. package/dist/types/effect-internal.js +2 -0
  114. package/dist/types/effect-internal.js.map +1 -0
  115. package/examples/README.md +15 -0
  116. package/examples/github-release/artifacts/release-example-github-0.1.0.tgz +1 -0
  117. package/examples/github-release/release.config.json +31 -0
  118. package/examples/homebrew-tap/artifacts/release-example-homebrew-0.1.0.tgz +1 -0
  119. package/examples/homebrew-tap/release.config.json +34 -0
  120. package/examples/non-strict-skips/artifacts/release-example-skips-0.1.0.tgz +1 -0
  121. package/examples/non-strict-skips/release.config.json +29 -0
  122. package/examples/npm-only/index.js +1 -0
  123. package/examples/npm-only/package.json +8 -0
  124. package/examples/npm-only/release.config.json +30 -0
  125. package/package.json +176 -0
@@ -0,0 +1,66 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { ArtifactIntent, ArtifactInventoryItem } from "./artifact.js";
3
+ import { TargetCapabilities } from "./target.js";
4
+ export type * from "../types/effect-internal.js";
5
+ export declare const ReleaseName: Schema.String;
6
+ export type ReleaseName = typeof ReleaseName.Type;
7
+ export declare const ReleaseVersion: Schema.String;
8
+ export type ReleaseVersion = typeof ReleaseVersion.Type;
9
+ export declare const GitCommit: Schema.String;
10
+ export type GitCommit = typeof GitCommit.Type;
11
+ export declare const GitTag: Schema.String;
12
+ export type GitTag = typeof GitTag.Type;
13
+ declare const ReleaseIdentity_base: Schema.Class<ReleaseIdentity, Schema.Struct<{
14
+ readonly name: Schema.String;
15
+ readonly version: Schema.String;
16
+ readonly commit: Schema.String;
17
+ readonly tag: Schema.optionalKey<Schema.String>;
18
+ readonly notes: Schema.optionalKey<Schema.String>;
19
+ }>, {}>;
20
+ export declare class ReleaseIdentity extends ReleaseIdentity_base {
21
+ }
22
+ declare const SourceMetadata_base: Schema.Class<SourceMetadata, Schema.Struct<{
23
+ readonly root: Schema.String;
24
+ readonly configPath: Schema.optionalKey<Schema.String>;
25
+ }>, {}>;
26
+ export declare class SourceMetadata extends SourceMetadata_base {
27
+ }
28
+ declare const ReleaseIntent_base: Schema.Class<ReleaseIntent, Schema.Struct<{
29
+ readonly identity: typeof ReleaseIdentity;
30
+ readonly artifacts: Schema.$Array<typeof ArtifactIntent>;
31
+ readonly targets: Schema.$Array<Schema.Union<readonly [typeof import("./target.js").NpmRegistryTarget, typeof import("./target.js").GitHubReleaseTarget, typeof import("./target.js").HomebrewTapTarget]>>;
32
+ readonly strict: Schema.optionalKey<Schema.Boolean>;
33
+ readonly evidenceDirectory: Schema.optionalKey<Schema.String>;
34
+ }>, {}>;
35
+ export declare class ReleaseIntent extends ReleaseIntent_base {
36
+ }
37
+ declare const ReleaseModel_base: Schema.Class<ReleaseModel, Schema.Struct<{
38
+ readonly identity: typeof ReleaseIdentity;
39
+ readonly source: typeof SourceMetadata;
40
+ readonly artifacts: Schema.$Array<typeof ArtifactInventoryItem>;
41
+ readonly targets: Schema.$Array<Schema.Union<readonly [typeof import("./target.js").NpmRegistryTarget, typeof import("./target.js").GitHubReleaseTarget, typeof import("./target.js").HomebrewTapTarget]>>;
42
+ readonly strict: Schema.Boolean;
43
+ readonly evidenceDirectory: Schema.String;
44
+ }>, {}>;
45
+ export declare class ReleaseModel extends ReleaseModel_base {
46
+ }
47
+ declare const PlannerMetadata_base: Schema.Class<PlannerMetadata, Schema.Struct<{
48
+ readonly createdBy: Schema.String;
49
+ readonly planSchemaVersion: Schema.Literal<"release-plan/v1">;
50
+ }>, {}>;
51
+ export declare class PlannerMetadata extends PlannerMetadata_base {
52
+ }
53
+ declare const ReleasePlan_base: Schema.Class<ReleasePlan, Schema.Struct<{
54
+ readonly schemaVersion: Schema.Literal<"release-plan/v1">;
55
+ readonly identity: typeof ReleaseIdentity;
56
+ readonly source: typeof SourceMetadata;
57
+ readonly artifacts: Schema.$Array<typeof ArtifactInventoryItem>;
58
+ readonly targets: Schema.$Array<Schema.Union<readonly [typeof import("./target.js").NpmRegistryTarget, typeof import("./target.js").GitHubReleaseTarget, typeof import("./target.js").HomebrewTapTarget]>>;
59
+ readonly targetCapabilities: Schema.$Array<typeof TargetCapabilities>;
60
+ readonly operations: Schema.$Array<Schema.Union<readonly [typeof import("./operation.js").RenderFileOperation, typeof import("./operation.js").ValidateCommandOperation, typeof import("./operation.js").ValidationNoteOperation, typeof import("./operation.js").PublishCommandOperation, typeof import("./operation.js").VerifyRemoteOperation]>>;
61
+ readonly evidenceDirectory: Schema.String;
62
+ readonly metadata: typeof PlannerMetadata;
63
+ }>, {}>;
64
+ export declare class ReleasePlan extends ReleasePlan_base {
65
+ }
66
+ //# sourceMappingURL=release.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../src/domain/release.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAErE,OAAO,EAAE,kBAAkB,EAAgB,MAAM,aAAa,CAAA;AAE9D,mBAAmB,6BAA6B,CAAA;AAEhD,eAAO,MAAM,WAAW,eAAgB,CAAA;AACxC,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAA;AAEjD,eAAO,MAAM,cAAc,eAAgB,CAAA;AAC3C,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAA;AAEvD,eAAO,MAAM,SAAS,eAAgB,CAAA;AACtC,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA;AAE7C,eAAO,MAAM,MAAM,eAAgB,CAAA;AACnC,MAAM,MAAM,MAAM,GAAG,OAAO,MAAM,CAAC,IAAI,CAAA;;;;;;;;AAEvC,qBAAa,eAAgB,SAAQ,oBAMnC;CAAG;;;;;AAEL,qBAAa,cAAe,SAAQ,mBAGlC;CAAG;;;;;;;;AAEL,qBAAa,aAAc,SAAQ,kBAMjC;CAAG;;;;;;;;;AAEL,qBAAa,YAAa,SAAQ,iBAOhC;CAAG;;;;;AAEL,qBAAa,eAAgB,SAAQ,oBAGnC;CAAG;;;;;;;;;;;;AAEL,qBAAa,WAAY,SAAQ,gBAU/B;CAAG"}
@@ -0,0 +1,56 @@
1
+ import * as Schema from "effect/Schema";
2
+ import { ArtifactIntent, ArtifactInventoryItem } from "./artifact.js";
3
+ import { Operation } from "./operation.js";
4
+ import { TargetCapabilities, TargetConfig } from "./target.js";
5
+ export const ReleaseName = Schema.String;
6
+ export const ReleaseVersion = Schema.String;
7
+ export const GitCommit = Schema.String;
8
+ export const GitTag = Schema.String;
9
+ export class ReleaseIdentity extends Schema.Class("ReleaseIdentity")({
10
+ name: ReleaseName,
11
+ version: ReleaseVersion,
12
+ commit: GitCommit,
13
+ tag: Schema.optionalKey(GitTag),
14
+ notes: Schema.optionalKey(Schema.String)
15
+ }) {
16
+ }
17
+ export class SourceMetadata extends Schema.Class("SourceMetadata")({
18
+ root: Schema.String,
19
+ configPath: Schema.optionalKey(Schema.String)
20
+ }) {
21
+ }
22
+ export class ReleaseIntent extends Schema.Class("ReleaseIntent")({
23
+ identity: ReleaseIdentity,
24
+ artifacts: Schema.Array(ArtifactIntent),
25
+ targets: Schema.Array(TargetConfig),
26
+ strict: Schema.optionalKey(Schema.Boolean),
27
+ evidenceDirectory: Schema.optionalKey(Schema.String)
28
+ }) {
29
+ }
30
+ export class ReleaseModel extends Schema.Class("ReleaseModel")({
31
+ identity: ReleaseIdentity,
32
+ source: SourceMetadata,
33
+ artifacts: Schema.Array(ArtifactInventoryItem),
34
+ targets: Schema.Array(TargetConfig),
35
+ strict: Schema.Boolean,
36
+ evidenceDirectory: Schema.String
37
+ }) {
38
+ }
39
+ export class PlannerMetadata extends Schema.Class("PlannerMetadata")({
40
+ createdBy: Schema.String,
41
+ planSchemaVersion: Schema.Literal("release-plan/v1")
42
+ }) {
43
+ }
44
+ export class ReleasePlan extends Schema.Class("ReleasePlan")({
45
+ schemaVersion: Schema.Literal("release-plan/v1"),
46
+ identity: ReleaseIdentity,
47
+ source: SourceMetadata,
48
+ artifacts: Schema.Array(ArtifactInventoryItem),
49
+ targets: Schema.Array(TargetConfig),
50
+ targetCapabilities: Schema.Array(TargetCapabilities),
51
+ operations: Schema.Array(Operation),
52
+ evidenceDirectory: Schema.String,
53
+ metadata: PlannerMetadata
54
+ }) {
55
+ }
56
+ //# sourceMappingURL=release.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"release.js","sourceRoot":"","sources":["../../src/domain/release.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AA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;IAC3E,QAAQ,EAAE,eAAe;IACzB,MAAM,EAAE,cAAc;IACtB,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC;IAC9C,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC,OAAO;IACtB,iBAAiB,EAAE,MAAM,CAAC,MAAM;CACjC,CAAC;CAAG;AAEL,MAAM,OAAO,eAAgB,SAAQ,MAAM,CAAC,KAAK,CAAkB,iBAAiB,CAAC,CAAC;IACpF,SAAS,EAAE,MAAM,CAAC,MAAM;IACxB,iBAAiB,EAAE,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC;CACrD,CAAC;CAAG;AAEL,MAAM,OAAO,WAAY,SAAQ,MAAM,CAAC,KAAK,CAAc,aAAa,CAAC,CAAC;IACxE,aAAa,EAAE,MAAM,CAAC,OAAO,CAAC,iBAAiB,CAAC;IAChD,QAAQ,EAAE,eAAe;IACzB,MAAM,EAAE,cAAc;IACtB,SAAS,EAAE,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC;IAC9C,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC;IACnC,kBAAkB,EAAE,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC;IACpD,UAAU,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC;IACnC,iBAAiB,EAAE,MAAM,CAAC,MAAM;IAChC,QAAQ,EAAE,eAAe;CAC1B,CAAC;CAAG"}
@@ -0,0 +1,75 @@
1
+ import * as Schema from "effect/Schema";
2
+ export type * from "../types/effect-internal.js";
3
+ export declare const TargetId: Schema.String;
4
+ export type TargetId = typeof TargetId.Type;
5
+ export declare const TargetAuthRequirement: Schema.Literals<readonly ["none", "env-token", "cli-auth"]>;
6
+ export type TargetAuthRequirement = typeof TargetAuthRequirement.Type;
7
+ export declare const TargetDryRunSupport: Schema.Literals<readonly ["none", "native", "simulated"]>;
8
+ export type TargetDryRunSupport = typeof TargetDryRunSupport.Type;
9
+ export declare const TargetMutability: Schema.Literals<readonly ["immutable", "mutable-release", "mutable-index"]>;
10
+ export type TargetMutability = typeof TargetMutability.Type;
11
+ export declare const TargetRecovery: Schema.Literals<readonly ["publish-new-version", "delete-and-recreate", "manual"]>;
12
+ export type TargetRecovery = typeof TargetRecovery.Type;
13
+ export declare const TargetValidationStrategy: Schema.Literals<readonly ["native-command", "simulated-plan", "skipped"]>;
14
+ export type TargetValidationStrategy = typeof TargetValidationStrategy.Type;
15
+ export declare const NpmAccess: Schema.Literals<readonly ["public", "restricted"]>;
16
+ export type NpmAccess = typeof NpmAccess.Type;
17
+ declare const NpmRegistryTarget_base: Schema.Class<NpmRegistryTarget, Schema.TaggedStruct<"NpmRegistryTarget", {
18
+ readonly id: Schema.String;
19
+ readonly registry: Schema.String;
20
+ readonly packagePath: Schema.String;
21
+ readonly tokenEnv: Schema.optionalKey<Schema.String>;
22
+ readonly access: Schema.optionalKey<Schema.Literals<readonly ["public", "restricted"]>>;
23
+ readonly provenance: Schema.optionalKey<Schema.Boolean>;
24
+ readonly dryRunSupport: Schema.Literals<readonly ["none", "native", "simulated"]>;
25
+ readonly mutability: Schema.Literals<readonly ["immutable", "mutable-release", "mutable-index"]>;
26
+ readonly recovery: Schema.Literals<readonly ["publish-new-version", "delete-and-recreate", "manual"]>;
27
+ }>, {}>;
28
+ export declare class NpmRegistryTarget extends NpmRegistryTarget_base {
29
+ }
30
+ declare const GitHubReleaseTarget_base: Schema.Class<GitHubReleaseTarget, Schema.TaggedStruct<"GitHubReleaseTarget", {
31
+ readonly id: Schema.String;
32
+ readonly repository: Schema.String;
33
+ readonly tokenEnv: Schema.optionalKey<Schema.String>;
34
+ readonly draft: Schema.optionalKey<Schema.Boolean>;
35
+ readonly prerelease: Schema.optionalKey<Schema.Boolean>;
36
+ readonly dryRunSupport: Schema.Literals<readonly ["none", "native", "simulated"]>;
37
+ readonly mutability: Schema.Literals<readonly ["immutable", "mutable-release", "mutable-index"]>;
38
+ readonly recovery: Schema.Literals<readonly ["publish-new-version", "delete-and-recreate", "manual"]>;
39
+ }>, {}>;
40
+ export declare class GitHubReleaseTarget extends GitHubReleaseTarget_base {
41
+ }
42
+ declare const HomebrewTapTarget_base: Schema.Class<HomebrewTapTarget, Schema.TaggedStruct<"HomebrewTapTarget", {
43
+ readonly id: Schema.String;
44
+ readonly repository: Schema.String;
45
+ readonly formulaName: Schema.String;
46
+ readonly formulaPath: Schema.String;
47
+ readonly artifactId: Schema.String;
48
+ readonly homepage: Schema.optionalKey<Schema.String>;
49
+ readonly url: Schema.optionalKey<Schema.String>;
50
+ readonly tapDirectory: Schema.optionalKey<Schema.String>;
51
+ readonly installPath: Schema.optionalKey<Schema.String>;
52
+ readonly tokenEnv: Schema.optionalKey<Schema.String>;
53
+ readonly dryRunSupport: Schema.Literals<readonly ["none", "native", "simulated"]>;
54
+ readonly mutability: Schema.Literals<readonly ["immutable", "mutable-release", "mutable-index"]>;
55
+ readonly recovery: Schema.Literals<readonly ["publish-new-version", "delete-and-recreate", "manual"]>;
56
+ }>, {}>;
57
+ export declare class HomebrewTapTarget extends HomebrewTapTarget_base {
58
+ }
59
+ export declare const TargetConfig: Schema.Union<readonly [typeof NpmRegistryTarget, typeof GitHubReleaseTarget, typeof HomebrewTapTarget]>;
60
+ export type TargetConfig = typeof TargetConfig.Type;
61
+ declare const TargetCapabilities_base: Schema.Class<TargetCapabilities, Schema.Struct<{
62
+ readonly targetId: Schema.String;
63
+ readonly targetTag: Schema.String;
64
+ readonly authRequirement: Schema.Literals<readonly ["none", "env-token", "cli-auth"]>;
65
+ readonly dryRunSupport: Schema.Literals<readonly ["none", "native", "simulated"]>;
66
+ readonly mutability: Schema.Literals<readonly ["immutable", "mutable-release", "mutable-index"]>;
67
+ readonly recovery: Schema.Literals<readonly ["publish-new-version", "delete-and-recreate", "manual"]>;
68
+ readonly validationStrategy: Schema.Literals<readonly ["native-command", "simulated-plan", "skipped"]>;
69
+ }>, {}>;
70
+ export declare class TargetCapabilities extends TargetCapabilities_base {
71
+ }
72
+ export declare const targetOrder: (left: TargetConfig, right: TargetConfig) => number;
73
+ export declare const targetCapabilitiesOrder: (left: TargetCapabilities, right: TargetCapabilities) => number;
74
+ export declare const targetAuthRequirement: (target: TargetConfig) => TargetAuthRequirement;
75
+ //# sourceMappingURL=target.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../src/domain/target.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAEvC,mBAAmB,6BAA6B,CAAA;AAEhD,eAAO,MAAM,QAAQ,eAAgB,CAAA;AACrC,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC,IAAI,CAAA;AAE3C,eAAO,MAAM,qBAAqB,6DAAqD,CAAA;AACvF,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC,IAAI,CAAA;AAErE,eAAO,MAAM,mBAAmB,2DAAmD,CAAA;AACnF,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAC,IAAI,CAAA;AAEjE,eAAO,MAAM,gBAAgB,6EAAqE,CAAA;AAClG,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAC,IAAI,CAAA;AAE3D,eAAO,MAAM,cAAc,oFAA4E,CAAA;AACvG,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC,IAAI,CAAA;AAEvD,eAAO,MAAM,wBAAwB,2EAAmE,CAAA;AACxG,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAC,IAAI,CAAA;AAE3E,eAAO,MAAM,SAAS,oDAA4C,CAAA;AAClE,MAAM,MAAM,SAAS,GAAG,OAAO,SAAS,CAAC,IAAI,CAAA;;;;;;;;;;;;AAE7C,qBAAa,iBAAkB,SAAQ,sBAUrC;CAAG;;;;;;;;;;;AAEL,qBAAa,mBAAoB,SAAQ,wBASvC;CAAG;;;;;;;;;;;;;;;;AAEL,qBAAa,iBAAkB,SAAQ,sBAcrC;CAAG;AAEL,eAAO,MAAM,YAAY,yGAA4E,CAAA;AACrG,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAA;;;;;;;;;;AAEnD,qBAAa,kBAAmB,SAAQ,uBAQtC;CAAG;AAEL,eAAO,MAAM,WAAW,GAAI,MAAM,YAAY,EAAE,OAAO,YAAY,KAAG,MACrC,CAAA;AAEjC,eAAO,MAAM,uBAAuB,GAAI,MAAM,kBAAkB,EAAE,OAAO,kBAAkB,KAAG,MACjD,CAAA;AAE7C,eAAO,MAAM,qBAAqB,GAAI,QAAQ,YAAY,KAAG,qBAK5D,CAAA"}
@@ -0,0 +1,67 @@
1
+ import * as Schema from "effect/Schema";
2
+ export const TargetId = Schema.String;
3
+ export const TargetAuthRequirement = Schema.Literals(["none", "env-token", "cli-auth"]);
4
+ export const TargetDryRunSupport = Schema.Literals(["none", "native", "simulated"]);
5
+ export const TargetMutability = Schema.Literals(["immutable", "mutable-release", "mutable-index"]);
6
+ export const TargetRecovery = Schema.Literals(["publish-new-version", "delete-and-recreate", "manual"]);
7
+ export const TargetValidationStrategy = Schema.Literals(["native-command", "simulated-plan", "skipped"]);
8
+ export const NpmAccess = Schema.Literals(["public", "restricted"]);
9
+ export class NpmRegistryTarget extends Schema.TaggedClass()("NpmRegistryTarget", {
10
+ id: TargetId,
11
+ registry: Schema.String,
12
+ packagePath: Schema.String,
13
+ tokenEnv: Schema.optionalKey(Schema.String),
14
+ access: Schema.optionalKey(NpmAccess),
15
+ provenance: Schema.optionalKey(Schema.Boolean),
16
+ dryRunSupport: TargetDryRunSupport,
17
+ mutability: TargetMutability,
18
+ recovery: TargetRecovery
19
+ }) {
20
+ }
21
+ export class GitHubReleaseTarget extends Schema.TaggedClass()("GitHubReleaseTarget", {
22
+ id: TargetId,
23
+ repository: Schema.String,
24
+ tokenEnv: Schema.optionalKey(Schema.String),
25
+ draft: Schema.optionalKey(Schema.Boolean),
26
+ prerelease: Schema.optionalKey(Schema.Boolean),
27
+ dryRunSupport: TargetDryRunSupport,
28
+ mutability: TargetMutability,
29
+ recovery: TargetRecovery
30
+ }) {
31
+ }
32
+ export class HomebrewTapTarget extends Schema.TaggedClass()("HomebrewTapTarget", {
33
+ id: TargetId,
34
+ repository: Schema.String,
35
+ formulaName: Schema.String,
36
+ formulaPath: Schema.String,
37
+ artifactId: Schema.String,
38
+ homepage: Schema.optionalKey(Schema.String),
39
+ url: Schema.optionalKey(Schema.String),
40
+ tapDirectory: Schema.optionalKey(Schema.String),
41
+ installPath: Schema.optionalKey(Schema.String),
42
+ tokenEnv: Schema.optionalKey(Schema.String),
43
+ dryRunSupport: TargetDryRunSupport,
44
+ mutability: TargetMutability,
45
+ recovery: TargetRecovery
46
+ }) {
47
+ }
48
+ export const TargetConfig = Schema.Union([NpmRegistryTarget, GitHubReleaseTarget, HomebrewTapTarget]);
49
+ export class TargetCapabilities extends Schema.Class("TargetCapabilities")({
50
+ targetId: TargetId,
51
+ targetTag: Schema.String,
52
+ authRequirement: TargetAuthRequirement,
53
+ dryRunSupport: TargetDryRunSupport,
54
+ mutability: TargetMutability,
55
+ recovery: TargetRecovery,
56
+ validationStrategy: TargetValidationStrategy
57
+ }) {
58
+ }
59
+ export const targetOrder = (left, right) => left.id.localeCompare(right.id);
60
+ export const targetCapabilitiesOrder = (left, right) => left.targetId.localeCompare(right.targetId);
61
+ export const targetAuthRequirement = (target) => {
62
+ if (target._tag === "NpmRegistryTarget") {
63
+ return target.tokenEnv === undefined ? "cli-auth" : "env-token";
64
+ }
65
+ return target.tokenEnv === undefined ? "cli-auth" : "env-token";
66
+ };
67
+ //# sourceMappingURL=target.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"target.js","sourceRoot":"","sources":["../../src/domain/target.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAIvC,MAAM,CAAC,MAAM,QAAQ,GAAG,MAAM,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AO,kBAAmB,SAAQ,MAAM,CAAC,KAAK,CAAqB,oBAAoB,CAAC,CAAC;IAC7F,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,MAAM,CAAC,MAAM;IACxB,eAAe,EAAE,qBAAqB;IACtC,aAAa,EAAE,mBAAmB;IAClC,UAAU,EAAE,gBAAgB;IAC5B,QAAQ,EAAE,cAAc;IACxB,kBAAkB,EAAE,wBAAwB;CAC7C,CAAC;CAAG;AAEL,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAkB,EAAE,KAAmB,EAAU,EAAE,CAC7E,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,CAAA;AAEjC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,IAAwB,EAAE,KAAyB,EAAU,EAAE,CACrG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;AAE7C,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,MAAoB,EAAyB,EAAE;IACnF,IAAI,MAAM,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;QACxC,OAAO,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAA;IACjE,CAAC;IACD,OAAO,MAAM,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,WAAW,CAAA;AACjE,CAAC,CAAA"}
@@ -0,0 +1,9 @@
1
+ import * as Layer from "effect/Layer";
2
+ import { ReleaseHost } from "./host.js";
3
+ export type * from "../types/effect-internal.js";
4
+ export interface BunReleaseHostOptions {
5
+ readonly root?: string | undefined;
6
+ }
7
+ export declare const makeBunReleaseHostLayer: (options?: BunReleaseHostOptions) => Layer.Layer<ReleaseHost>;
8
+ export declare const BunReleaseHostLayer: Layer.Layer<ReleaseHost>;
9
+ //# sourceMappingURL=bun.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bun.d.ts","sourceRoot":"","sources":["../../src/host/bun.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAKrC,OAAO,EAAsC,WAAW,EAAE,MAAM,WAAW,CAAA;AAE3E,mBAAmB,6BAA6B,CAAA;AAKhD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CACnC;AAmED,eAAO,MAAM,uBAAuB,GAAI,UAAS,qBAA0B,KAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAoHpG,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW,CAA6B,CAAA"}
@@ -0,0 +1,156 @@
1
+ import * as Effect from "effect/Effect";
2
+ import * as Layer from "effect/Layer";
3
+ import { mkdir, stat as fsStat } from "node:fs/promises";
4
+ import { dirname, isAbsolute, resolve } from "node:path";
5
+ import { CommandResult, FileInfo, HostError, ReleaseHost } from "./host.js";
6
+ const formatUnknown = (cause) => cause instanceof Error ? cause.message : String(cause);
7
+ const checksumName = (algorithm) => algorithm === "sha256" ? "SHA-256" : "SHA-512";
8
+ const toHex = (bytes) => {
9
+ let output = "";
10
+ for (const byte of bytes) {
11
+ output += byte.toString(16).padStart(2, "0");
12
+ }
13
+ return output;
14
+ };
15
+ const streamText = async (stream) => {
16
+ if (stream === null) {
17
+ return "";
18
+ }
19
+ return await new Response(stream).text();
20
+ };
21
+ const inheritedEnvNames = [
22
+ "PATH",
23
+ "HOME",
24
+ "USERPROFILE",
25
+ "SystemRoot",
26
+ "TEMP",
27
+ "TMP"
28
+ ];
29
+ const commandEnv = (command) => {
30
+ const names = new Set([
31
+ ...inheritedEnvNames,
32
+ ...command.requiredEnv,
33
+ ...command.redactedEnv
34
+ ]);
35
+ const env = {};
36
+ for (const name of names) {
37
+ const value = Bun.env[name];
38
+ if (value !== undefined) {
39
+ env[name] = value;
40
+ }
41
+ }
42
+ return env;
43
+ };
44
+ const validateEnv = (command) => Effect.sync(() => {
45
+ const missing = [];
46
+ for (const name of command.requiredEnv) {
47
+ if (Bun.env[name] === undefined) {
48
+ missing.push(name);
49
+ }
50
+ }
51
+ return missing;
52
+ }).pipe(Effect.flatMap((missing) => missing.length === 0
53
+ ? Effect.void
54
+ : Effect.fail(HostError.make({
55
+ operation: "runCommand",
56
+ reason: `Missing required environment variables: ${missing.join(", ")}`
57
+ }))));
58
+ export const makeBunReleaseHostLayer = (options = {}) => {
59
+ const hostPath = (path) => options.root === undefined || isAbsolute(path) ? path : resolve(options.root, path);
60
+ const commandCwd = (command) => command.cwd === undefined
61
+ ? options.root
62
+ : hostPath(command.cwd);
63
+ return Layer.succeed(ReleaseHost)({
64
+ readFileString: (path) => Effect.tryPromise({
65
+ try: () => Bun.file(hostPath(path)).text(),
66
+ catch: (cause) => HostError.make({
67
+ operation: "readFileString",
68
+ path,
69
+ reason: formatUnknown(cause)
70
+ })
71
+ }),
72
+ writeFileString: (path, contents) => Effect.tryPromise({
73
+ try: async () => {
74
+ const targetPath = hostPath(path);
75
+ await mkdir(dirname(targetPath), { recursive: true });
76
+ await Bun.write(targetPath, contents);
77
+ },
78
+ catch: (cause) => HostError.make({
79
+ operation: "writeFileString",
80
+ path,
81
+ reason: formatUnknown(cause)
82
+ })
83
+ }),
84
+ stat: (path) => Effect.tryPromise({
85
+ try: async () => {
86
+ const info = await fsStat(hostPath(path));
87
+ return FileInfo.make({
88
+ path,
89
+ sizeBytes: Number(info.size),
90
+ kind: info.isDirectory() ? "directory" : info.isFile() ? "file" : "other"
91
+ });
92
+ },
93
+ catch: (cause) => HostError.make({
94
+ operation: "stat",
95
+ path,
96
+ reason: formatUnknown(cause)
97
+ })
98
+ }),
99
+ hashFile: (path, algorithm) => Effect.tryPromise({
100
+ try: async () => {
101
+ const targetPath = hostPath(path);
102
+ const info = await fsStat(targetPath);
103
+ if (!info.isFile()) {
104
+ throw new Error("Only file artifacts can be hashed");
105
+ }
106
+ const buffer = await Bun.file(targetPath).arrayBuffer();
107
+ const hash = await crypto.subtle.digest(checksumName(algorithm), buffer);
108
+ return toHex(new Uint8Array(hash));
109
+ },
110
+ catch: (cause) => HostError.make({
111
+ operation: "hashFile",
112
+ path,
113
+ reason: formatUnknown(cause)
114
+ })
115
+ }),
116
+ readEnv: (name) => Effect.sync(() => Bun.env[name]),
117
+ runCommand: (command) => Effect.gen(function* () {
118
+ yield* validateEnv(command);
119
+ const startedAt = new Date().toISOString();
120
+ const started = performance.now();
121
+ return yield* Effect.tryPromise({
122
+ try: async () => {
123
+ const cwd = commandCwd(command);
124
+ const subprocess = Bun.spawn([command.executable, ...command.args], {
125
+ ...(cwd === undefined ? {} : { cwd }),
126
+ env: commandEnv(command),
127
+ stdout: "pipe",
128
+ stderr: "pipe"
129
+ });
130
+ const stdoutPromise = streamText(subprocess.stdout);
131
+ const stderrPromise = streamText(subprocess.stderr);
132
+ const exitCode = await subprocess.exited;
133
+ const stdout = await stdoutPromise;
134
+ const stderr = await stderrPromise;
135
+ const endedAt = new Date().toISOString();
136
+ return CommandResult.make({
137
+ command,
138
+ exitCode,
139
+ stdout,
140
+ stderr,
141
+ startedAt,
142
+ endedAt,
143
+ durationMillis: Math.round(performance.now() - started)
144
+ });
145
+ },
146
+ catch: (cause) => HostError.make({
147
+ operation: "runCommand",
148
+ reason: formatUnknown(cause)
149
+ })
150
+ });
151
+ }),
152
+ now: Effect.sync(() => new Date().toISOString())
153
+ });
154
+ };
155
+ export const BunReleaseHostLayer = makeBunReleaseHostLayer();
156
+ //# sourceMappingURL=bun.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bun.js","sourceRoot":"","sources":["../../src/host/bun.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,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,CAAC,MAAM,CAAC,CAAA;oBACnD,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC,MAAM,CAAA;oBACxC,MAAM,MAAM,GAAG,MAAM,aAAa,CAAA;oBAClC,MAAM,MAAM,GAAG,MAAM,aAAa,CAAA;oBAClC,MAAM,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAA;oBACxC,OAAO,aAAa,CAAC,IAAI,CAAC;wBACxB,OAAO;wBACP,QAAQ;wBACR,MAAM;wBACN,MAAM;wBACN,SAAS;wBACT,OAAO;wBACP,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC;qBACxD,CAAC,CAAA;gBACJ,CAAC;gBACD,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CACf,SAAS,CAAC,IAAI,CAAC;oBACb,SAAS,EAAE,YAAY;oBACvB,MAAM,EAAE,aAAa,CAAC,KAAK,CAAC;iBAC7B,CAAC;aACL,CAAC,CAAA;QACJ,CAAC,CAAC;QAEJ,GAAG,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;KACjD,CAAC,CAAA;AACJ,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAA6B,uBAAuB,EAAE,CAAA"}
@@ -0,0 +1,47 @@
1
+ import * as Context from "effect/Context";
2
+ import * as Effect from "effect/Effect";
3
+ import * as Layer from "effect/Layer";
4
+ import * as Schema from "effect/Schema";
5
+ import { ChecksumAlgorithm } from "../domain/artifact.js";
6
+ import { CommandSpec } from "../domain/operation.js";
7
+ export type * from "../types/effect-internal.js";
8
+ declare const HostError_base: Schema.Class<HostError, Schema.TaggedStruct<"HostError", {
9
+ readonly operation: Schema.String;
10
+ readonly path: Schema.optionalKey<Schema.String>;
11
+ readonly reason: Schema.String;
12
+ }>, import("effect/Cause").YieldableError>;
13
+ export declare class HostError extends HostError_base {
14
+ }
15
+ declare const FileInfo_base: Schema.Class<FileInfo, Schema.Struct<{
16
+ readonly path: Schema.String;
17
+ readonly sizeBytes: Schema.Number;
18
+ readonly kind: Schema.Literals<readonly ["file", "directory", "other"]>;
19
+ }>, {}>;
20
+ export declare class FileInfo extends FileInfo_base {
21
+ }
22
+ declare const CommandResult_base: Schema.Class<CommandResult, Schema.Struct<{
23
+ readonly command: typeof CommandSpec;
24
+ readonly exitCode: Schema.Number;
25
+ readonly stdout: Schema.String;
26
+ readonly stderr: Schema.String;
27
+ readonly startedAt: Schema.String;
28
+ readonly endedAt: Schema.String;
29
+ readonly durationMillis: Schema.Number;
30
+ }>, {}>;
31
+ export declare class CommandResult extends CommandResult_base {
32
+ }
33
+ export interface ReleaseHostShape {
34
+ readonly readFileString: (path: string) => Effect.Effect<string, HostError>;
35
+ readonly writeFileString: (path: string, contents: string) => Effect.Effect<void, HostError>;
36
+ readonly stat: (path: string) => Effect.Effect<FileInfo, HostError>;
37
+ readonly hashFile: (path: string, algorithm: ChecksumAlgorithm) => Effect.Effect<string, HostError>;
38
+ readonly readEnv: (name: string) => Effect.Effect<string | undefined, never>;
39
+ readonly runCommand: (command: CommandSpec) => Effect.Effect<CommandResult, HostError>;
40
+ readonly now: Effect.Effect<string, never>;
41
+ }
42
+ declare const ReleaseHost_base: Context.ServiceClass<ReleaseHost, "ReleaseHost", ReleaseHostShape>;
43
+ export declare class ReleaseHost extends ReleaseHost_base {
44
+ }
45
+ export declare const ReleaseHostTest: (host: ReleaseHostShape) => Layer.Layer<ReleaseHost>;
46
+ export declare const missingEnvNames: (command: CommandSpec) => Effect.Effect<string[], never, ReleaseHost>;
47
+ //# sourceMappingURL=host.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../../src/host/host.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;A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AAA;CAC3C;;AAED,qBAAa,WAAY,SAAQ,gBAA+D;CAAG;AAEnG,eAAO,MAAM,eAAe,GAAI,MAAM,gBAAgB,KAAG,KAAK,CAAC,KAAK,CAAC,WAAW,CAC9C,CAAA;AAElC,eAAO,MAAM,eAAe,uEAU1B,CAAA"}
@@ -0,0 +1,42 @@
1
+ import * as Context from "effect/Context";
2
+ import * as Effect from "effect/Effect";
3
+ import * as Layer from "effect/Layer";
4
+ import * as Schema from "effect/Schema";
5
+ import { CommandSpec } from "../domain/operation.js";
6
+ export class HostError extends Schema.TaggedErrorClass()("HostError", {
7
+ operation: Schema.String,
8
+ path: Schema.optionalKey(Schema.String),
9
+ reason: Schema.String
10
+ }) {
11
+ }
12
+ export class FileInfo extends Schema.Class("FileInfo")({
13
+ path: Schema.String,
14
+ sizeBytes: Schema.Number,
15
+ kind: Schema.Literals(["file", "directory", "other"])
16
+ }) {
17
+ }
18
+ export class CommandResult extends Schema.Class("CommandResult")({
19
+ command: CommandSpec,
20
+ exitCode: Schema.Number,
21
+ stdout: Schema.String,
22
+ stderr: Schema.String,
23
+ startedAt: Schema.String,
24
+ endedAt: Schema.String,
25
+ durationMillis: Schema.Number
26
+ }) {
27
+ }
28
+ export class ReleaseHost extends Context.Service()("ReleaseHost") {
29
+ }
30
+ export const ReleaseHostTest = (host) => Layer.succeed(ReleaseHost)(host);
31
+ export const missingEnvNames = Effect.fn("missingEnvNames")(function* (command) {
32
+ const host = yield* ReleaseHost;
33
+ const missing = [];
34
+ for (const name of command.requiredEnv) {
35
+ const value = yield* host.readEnv(name);
36
+ if (value === undefined) {
37
+ missing.push(name);
38
+ }
39
+ }
40
+ return missing;
41
+ });
42
+ //# sourceMappingURL=host.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"host.js","sourceRoot":"","sources":["../../src/host/host.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;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C,iBAAiB,CAAC,CAAC,QAAQ,CAAC,EAAC,OAAoB;IACxF,MAAM,IAAI,GAAG,KAAK,CAAC,CAAC,WAAW,CAAA;IAC/B,MAAM,OAAO,GAAkB,EAAE,CAAA;IACjC,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;QACvC,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;QACvC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACpB,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAC,CAAA"}
@@ -0,0 +1,19 @@
1
+ import * as Layer from "effect/Layer";
2
+ import { CommandSpec } from "../domain/operation.js";
3
+ import { ReleaseHost } from "./host.js";
4
+ export type * from "../types/effect-internal.js";
5
+ export interface TestCommandResponse {
6
+ readonly exitCode: number;
7
+ readonly stdout: string;
8
+ readonly stderr: string;
9
+ }
10
+ export interface TestReleaseHostOptions {
11
+ readonly files?: ReadonlyMap<string, string> | undefined;
12
+ readonly directories?: ReadonlySet<string> | undefined;
13
+ readonly env?: ReadonlyMap<string, string> | undefined;
14
+ readonly commands?: ReadonlyMap<string, TestCommandResponse> | undefined;
15
+ readonly timestamps?: ReadonlyArray<string> | undefined;
16
+ }
17
+ export declare const commandKey: (command: CommandSpec) => string;
18
+ export declare const makeTestReleaseHostLayer: (options?: TestReleaseHostOptions) => Layer.Layer<ReleaseHost>;
19
+ //# sourceMappingURL=test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/host/test.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,cAAc,CAAA;AAErC,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAA;AACpD,OAAO,EAAsC,WAAW,EAAE,MAAM,WAAW,CAAA;AAE3E,mBAAmB,6BAA6B,CAAA;AAEhD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAA;IACxD,QAAQ,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;IACtD,QAAQ,CAAC,GAAG,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAA;IACtD,QAAQ,CAAC,QAAQ,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,mBAAmB,CAAC,GAAG,SAAS,CAAA;IACxE,QAAQ,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,SAAS,CAAA;CACxD;AAED,eAAO,MAAM,UAAU,GAAI,SAAS,WAAW,KAAG,MACI,CAAA;AAKtD,eAAO,MAAM,wBAAwB,GACnC,UAAS,sBAA2B,KACnC,KAAK,CAAC,KAAK,CAAC,WAAW,CAgGzB,CAAA"}