#Configuration?

1 messages · Page 1 of 1 (latest)

frail olive
#

Here it is 🙂

frail olive
#

Maybe we could keep "environment" as the runtime sandbox, the scope for all your other operations. But stop using it to also designate the external code and configuration that you push to github, load, package as an extension etc.

frail olive
#

Maybe something like:

extend type Query {
  "Initialize an environment. If no initial configuration  is provided, the environment will be blank"
  environment(configuration:Artifact): Environment!

  "Search the Daggerverse for reusable configurations"
  daggerverse: Daggerverse!
}

"A scope for Dagger operations"
type Environment {
  "Load an extension into the environment"
  withExtension(extension: Artifact!): Environment!

  "Load a mod into the environment"
  withMod(mod: Artifact!)

  "Set the environment's context directory"
  withContext(workdir: Directory!): Environment!

  // all entrypoints go here
}

"The Daggerverse is a universe of reusable configurations"
type Daggerverse {
  """
  Search the Daggerverse for reusable configurations.
  """
  configurations(
   keywords: [String!]!,

   "Include mods in the search"
   mods: Boolean=true): [Artifact!]!

  extensions(keywords: [String!]!): [Artifact!]!
}
#

Alternatively, if we want an intermediary type for the environment config, after it's loaded from the inert artifact, but before it's instantiated into an environment - we could have a Configuration type, where we could basically introspect the contents of the dagger.json post-loading