project-copy.ts 1.1 KB

123456789101112131415161718192021222324252627282930
  1. export * as ProjectCopy from "./project-copy"
  2. import { Schema } from "effect"
  3. import { optional } from "./schema"
  4. import { ProjectID } from "./project-id"
  5. import { AbsolutePath } from "./schema"
  6. export const StrategyID = Schema.Trim.pipe(Schema.check(Schema.isNonEmpty()), Schema.brand("ProjectCopy.StrategyID"))
  7. export type StrategyID = typeof StrategyID.Type
  8. export const CreateInput = Schema.Struct({
  9. projectID: ProjectID,
  10. strategy: StrategyID,
  11. sourceDirectory: AbsolutePath,
  12. directory: AbsolutePath,
  13. name: optional(Schema.String),
  14. }).annotate({ identifier: "ProjectCopy.CreateInput" })
  15. export interface CreateInput extends Schema.Schema.Type<typeof CreateInput> {}
  16. export const RemoveInput = Schema.Struct({
  17. projectID: ProjectID,
  18. directory: AbsolutePath,
  19. force: Schema.Boolean,
  20. }).annotate({ identifier: "ProjectCopy.RemoveInput" })
  21. export interface RemoveInput extends Schema.Schema.Type<typeof RemoveInput> {}
  22. export const Copy = Schema.Struct({
  23. directory: AbsolutePath,
  24. }).annotate({ identifier: "ProjectCopy.Copy" })
  25. export interface Copy extends Schema.Schema.Type<typeof Copy> {}