@monosmith/plugin-sdk 2.0.0-beta.1 → 2.0.0-beta.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monosmith/plugin-sdk",
3
- "version": "2.0.0-beta.1",
3
+ "version": "2.0.0-beta.2",
4
4
  "description": "The TypeScript SDK for writing smith plugins: the protocol's types, the serve loop, a test host, the conformance checks, templating and key-order-keeping JSON editing. No runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -941,6 +941,28 @@ export const protocolSchema = {
941
941
  "projects"
942
942
  ]
943
943
  },
944
+ "DeclaredProject": {
945
+ "description": "DeclaredProject is a project smith.toml declares: a folder with no manifest.",
946
+ "type": "object",
947
+ "properties": {
948
+ "name": {
949
+ "type": "string",
950
+ "description": "Name is the project's name, the key of its [projects.<name>] table."
951
+ },
952
+ "root": {
953
+ "type": "string",
954
+ "description": "Root is the workspace-relative folder."
955
+ },
956
+ "kind": {
957
+ "$ref": "#/$defs/ProjectKind",
958
+ "description": "Kind is \"app\", \"lib\" or \"package\", or empty for the plugin's choice."
959
+ }
960
+ },
961
+ "required": [
962
+ "name",
963
+ "root"
964
+ ]
965
+ },
944
966
  "DeclaredResult": {
945
967
  "description": "DeclaredResult is every declaration, and the version installed of each name where the plugin can tell.",
946
968
  "type": "object",
@@ -1116,6 +1138,13 @@ export const protocolSchema = {
1116
1138
  "items": {
1117
1139
  "type": "string"
1118
1140
  }
1141
+ },
1142
+ "declared": {
1143
+ "type": "array",
1144
+ "items": {
1145
+ "$ref": "#/$defs/DeclaredProject"
1146
+ },
1147
+ "description": "Declared are the projects smith.toml declares for this plugin's language ([projects.<name>] with a root and a language): folders with no manifest of their own, such as a program that is a package of the Go module above it. The plugin describes each one in its result, or answers with an error saying why it cannot."
1119
1148
  }
1120
1149
  },
1121
1150
  "required": [
@@ -406,6 +406,15 @@ export interface Declaration {
406
406
  export interface DeclaredParams {
407
407
  projects: Project[];
408
408
  }
409
+ /** DeclaredProject is a project smith.toml declares: a folder with no manifest. */
410
+ export interface DeclaredProject {
411
+ /** Name is the project's name, the key of its [projects.<name>] table. */
412
+ name: string;
413
+ /** Root is the workspace-relative folder. */
414
+ root: string;
415
+ /** Kind is "app", "lib" or "package", or empty for the plugin's choice. */
416
+ kind?: ProjectKind;
417
+ }
409
418
  /**
410
419
  * DeclaredResult is every declaration, and the version installed of each name where the plugin can
411
420
  * tell.
@@ -502,6 +511,13 @@ export interface DevcontainerFeature {
502
511
  */
503
512
  export interface DiscoverParams {
504
513
  manifests: string[];
514
+ /**
515
+ * Declared are the projects smith.toml declares for this plugin's language ([projects.<name>]
516
+ * with a root and a language): folders with no manifest of their own, such as a program that is a
517
+ * package of the Go module above it. The plugin describes each one in its result, or answers with
518
+ * an error saying why it cannot.
519
+ */
520
+ declared?: DeclaredProject[];
505
521
  }
506
522
  /**
507
523
  * DiscoverResult describes every manifest that is a project of this plugin. A manifest the plugin