@wtf/semantic-release-oci 2.0.0 → 2.1.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.
package/README.md CHANGED
@@ -33,7 +33,9 @@ export default {
33
33
  - `verifyConditions` checks the options, that `ecosystems` lists `'@wtf/release-oci'` or
34
34
  `'@wtf/semantic-release-oci/ecosystem'` (`EOCIECOSYSTEM`), and the train; reads the images git
35
35
  tracks; picks the images of the train; and names the repository of each, of the option `image` or
36
- `CI_REGISTRY_IMAGE` of the run (`EOCIIMAGE`). It asks the registry nothing.
36
+ `CI_REGISTRY_IMAGE` of the run (`EOCIIMAGE`). Then it asks GitLab once, with no effect, whether the
37
+ run's token may read the API of the container registry, which the links need (`EOCILINK`). A dry
38
+ run of no token, as of a merge request, only says so. It asks crane nothing.
37
39
  - `publish` finds the tested image of each image, `<sourceRepository>:<sourceTag>`, by its digest,
38
40
  of the platforms of `platforms` (`EOCISMOKE`); copies it by crane to the tag of the version, and of
39
41
  a release, to its minor and its major, which move. A version the registry has at the same digest
@@ -45,20 +47,28 @@ export default {
45
47
 
46
48
  A dry run runs `verifyConditions` alone of these, so it copies nothing.
47
49
 
50
+ The links need a token of GitLab's API, `GITLAB_TOKEN` or `GL_TOKEN` of the `read_api` or `api`
51
+ scope, protected and masked, as semantic-release takes it to push the release: the API of the
52
+ container registry refuses the job token, `CI_JOB_TOKEN`. A run of none fails in `verifyConditions`,
53
+ and in `publish` before anything is copied. `publish` then writes what it published to `oci.env`, for
54
+ a later job of the pipeline (`artifacts:reports:dotenv`): `oci_version`, `oci_images`, each
55
+ `<repository>@<digest>`, and `oci_tags`.
56
+
48
57
  crane runs on the path of the run, logged in to the registry, as `crane auth login` writes its
49
58
  config: of a pipeline of GitLab, `echo "$CI_REGISTRY_PASSWORD" | crane auth login --username
50
59
  "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY"`.
51
60
 
52
61
  ## Options
53
62
 
54
- | Option | Default | What it is |
55
- | ------------------ | ------------------------------- | --------------------------------------------------------------------------------- |
56
- | `image` | `CI_REGISTRY_IMAGE` of the run | The registry image of the project: the root's, and that and its folder of another |
57
- | `sourceRepository` | `{image}/snapshot` | The repository of the tested image, `{image}` the image's own |
58
- | `sourceTag` | `CI_COMMIT_REF_SLUG` of the run | The tag of the tested image: the snapshot of the pipeline of the tag |
59
- | `moving` | `true` | Whether a release moves its minor and its major |
60
- | `platforms` | any | The platforms each tested image must be of, as `linux/amd64` |
61
- | `crane` | `crane` | The command of crane |
63
+ | Option | Default | What it is |
64
+ | ------------------ | ------------------------------- | ----------------------------------------------------------------------------------- |
65
+ | `image` | `CI_REGISTRY_IMAGE` of the run | The registry image of the project: the root's, and that and its folder of another |
66
+ | `sourceRepository` | `{image}/snapshot` | The repository of the tested image, `{image}` the image's own |
67
+ | `sourceTag` | `CI_COMMIT_REF_SLUG` of the run | The tag of the tested image: the snapshot of the pipeline of the tag |
68
+ | `moving` | `true` | Whether a release moves its minor and its major |
69
+ | `platforms` | any | The platforms each tested image must be of, as `linux/amd64` |
70
+ | `crane` | `crane` | The command of crane |
71
+ | `dotenv` | `oci.env` | The dotenv file of the images published, from the root of the repo; none of `false` |
62
72
 
63
73
  `./schema` holds the validators of the options and of this package's part of a config;
64
74
  `schema.json` is its JSON Schema. `./ecosystem` is the ecosystem of `@wtf/release-oci`, beside the
package/dist/index.d.ts CHANGED
@@ -34,6 +34,13 @@ export interface OciPluginOptions {
34
34
  readonly platforms?: readonly string[] | undefined;
35
35
  /** The command of crane, by its name on the path or its path: `crane` by default. */
36
36
  readonly crane?: string | undefined;
37
+ /**
38
+ * The dotenv file `publish` writes of the images it published, from the root of the repo, for a
39
+ * job of the pipeline to read (`artifacts:reports:dotenv`): `oci_version`, `oci_images`, each
40
+ * `<repository>@<digest>`, and `oci_tags`, each space-separated; `oci.env` by default, none of
41
+ * `false`.
42
+ */
43
+ readonly dotenv?: string | false | undefined;
37
44
  /** The system the plugin runs by, over Node's. */
38
45
  readonly system?: SystemInput;
39
46
  }
@@ -53,8 +60,10 @@ type OfRun = {
53
60
  * Checks the options of the plugin, by `ociSchema` of `./schema` (`EOPTIONS`), that `ecosystems`
54
61
  * lists `@wtf/semantic-release-oci/ecosystem` or `@wtf/release-oci` (`EOCIECOSYSTEM`), and the train
55
62
  * of the run (`ETRAINNOTSELECTED`, `ETRAINUNKNOWN`); that no image is of two trains
56
- * (`ETRAINOVERLAP`); and that each image of the train has a repository (`EOCIIMAGE`). It asks the
57
- * registry nothing.
63
+ * (`ETRAINOVERLAP`); and that each image of the train has a repository (`EOCIIMAGE`). Then that
64
+ * the run may read the API of the container registry, which the links of `publish` need, by one
65
+ * request of no effect (`EOCILINK`): of a token of `GL_TOKEN` or `GITLAB_TOKEN`, which a dry run of
66
+ * none, as of a merge request, only warns of. It asks crane nothing.
58
67
  *
59
68
  * @param pluginConfig - The plugin's options of the config, with `trains` of its root.
60
69
  * @param context - The context of semantic-release's `verifyConditions` step: the folder, the
@@ -65,7 +74,9 @@ export declare function verifyConditions(pluginConfig: OciPluginOptions, context
65
74
  * Copies the tested image of each image of the release to the tags of the release: its version,
66
75
  * skipped of a registry that has it at the same digest, so a release that stopped part way is
67
76
  * finished by running it again; and of a release, its minor and its major. Then records each image
68
- * for the links of the release of the host, its page in the container registry of GitLab.
77
+ * for the links of the release of the host, its page in the container registry of GitLab, asked
78
+ * by a token of `GL_TOKEN` or `GITLAB_TOKEN`; and writes the images it published to the dotenv
79
+ * file of `dotenv`.
69
80
  *
70
81
  * @param pluginConfig - The plugin's options of the config, with `trains` of its root.
71
82
  * @param context - The context of semantic-release's `publish` step: the folder, the environment,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAU,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAI9D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAKjD,OAAO,KAAK,EAAE,cA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AE,MAAM,GAAG,SAAS,CAAA;IACnC;;;;;OAKG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;IAC5C,kDAAkD;IAClD,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;CAC9B;AAED,0EAA0E;AAC1E,MAAM,WAAW,UAAU;IACzB,oEAAoE;IACpE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,uEAAuE;IACvE,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,uFAAuF;AACvF,KAAK,KAAK,GAAG;IACX,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,CAAA;CAC3D,CAAA;AA2HD;;;;;;;;;;;;GAYG;AACH,wBAAsB,gBAAgB,CACpC,YAAY,EAAE,gBAAgB,EAC9B,OAAO,EAAE,uBAAuB,GAAG,KAAK,GACvC,OAAO,CAAC,IAAI,CAAC,CAef;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,OAAO,CAC3B,YAAY,EAAE,gBAAgB,EAC9B,OAAO,EAAE,cAAc,GAAG,KAAK,GAC9B,OAAO,CAAC,UAAU,GAAG,KAAK,CAAC,CAoE7B;;;;;AAED,wBAA4C"}
package/dist/index.js CHANGED
@@ -2,12 +2,13 @@ import { packagesOfImages } from '@wtf/release-oci/ecosystem';
2
2
  import { OciError } from '@wtf/release-oci/errors';
3
3
  import { readImages, registryImageOf } from '@wtf/release-oci/images';
4
4
  import { publishImages } from '@wtf/release-oci/publish';
5
- import { registryPageOf } from '@wtf/release-oci/registry';
5
+ import { checkRegistryAccess, registryPageOf } from '@wtf/release-oci/registry';
6
6
  import { releaseTagsOf } from '@wtf/release-oci/tags';
7
7
  import { throwAll } from '@wtf/release-system/errors';
8
8
  import { systemOf } from '@wtf/release-system/node';
9
+ import { joinPath } from '@wtf/release-system/posix';
9
10
  import { errorsOf } from '@wtf/release-system/validator';
10
- import { gitlabHeadersOf, gitlabProjectOf } from '@wtf/release-trains/gitlab';
11
+ import { gitlabProjectOf } from '@wtf/release-trains/gitlab';
11
12
  import { recordReleased } from '@wtf/release-trains/links';
12
13
  import { ownersOf } from '@wtf/release-trains/packages';
13
14
  import { selectTrain, trainOfRun } from '@wtf/release-trains/trains';
@@ -69,6 +70,21 @@ function repositoriesOf(release) {
69
70
  throwAll(errors);
70
71
  return repositories;
71
72
  }
73
+ /** The variables of a token of the API of GitLab, which the registry's API takes: no job token. */
74
+ const TOKEN_VARIABLES = ['GL_TOKEN', 'GITLAB_TOKEN'];
75
+ /**
76
+ * The headers the API of GitLab's container registry is asked by: a token of `GL_TOKEN` or
77
+ * `GITLAB_TOKEN`, as `PRIVATE-TOKEN`. Never the job token, `CI_JOB_TOKEN`, which that API refuses.
78
+ * Throws `EOCILINK` of a run of neither.
79
+ */
80
+ function registryHeadersOf(env) {
81
+ const token = TOKEN_VARIABLES.map((name) => env[name]).find((value) => value !== undefined && value !== '');
82
+ if (token === undefined)
83
+ throw new OciError('EOCILINK', `The run has no ${TOKEN_VARIABLES.join(' nor ')}: the release links each image to its page in the container registry of GitLab, whose API refuses the job token.`, 'Give the run a token of the `read_api` or `api` scope as `GITLAB_TOKEN`, protected and masked, as semantic-release takes it to push the release.');
84
+ return { 'PRIVATE-TOKEN': token };
85
+ }
86
+ /** The project of the run on GitLab, of its environment and of the URL of the repo. */
87
+ const projectOf = (context) => gitlabProjectOf({}, context.env, context.options?.repositoryUrl);
72
88
  /**
73
89
  * Whether the train of the run has no image to tag, as a train of npm packages alone of a repo of
74
90
  * several ecosystems, said in the log: each step of the plugin then does nothing.
@@ -83,8 +99,10 @@ function nothingOf(release, context) {
83
99
  * Checks the options of the plugin, by `ociSchema` of `./schema` (`EOPTIONS`), that `ecosystems`
84
100
  * lists `@wtf/semantic-release-oci/ecosystem` or `@wtf/release-oci` (`EOCIECOSYSTEM`), and the train
85
101
  * of the run (`ETRAINNOTSELECTED`, `ETRAINUNKNOWN`); that no image is of two trains
86
- * (`ETRAINOVERLAP`); and that each image of the train has a repository (`EOCIIMAGE`). It asks the
87
- * registry nothing.
102
+ * (`ETRAINOVERLAP`); and that each image of the train has a repository (`EOCIIMAGE`). Then that
103
+ * the run may read the API of the container registry, which the links of `publish` need, by one
104
+ * request of no effect (`EOCILINK`): of a token of `GL_TOKEN` or `GITLAB_TOKEN`, which a dry run of
105
+ * none, as of a merge request, only warns of. It asks crane nothing.
88
106
  *
89
107
  * @param pluginConfig - The plugin's options of the config, with `trains` of its root.
90
108
  * @param context - The context of semantic-release's `verifyConditions` step: the folder, the
@@ -96,12 +114,26 @@ export async function verifyConditions(pluginConfig, context) {
96
114
  if (nothingOf(release, context))
97
115
  return;
98
116
  context.logger.log(`Train ${release.train} tags ${repositoriesOf(release).join(', ')}.`);
117
+ const dryRun = context.options?.dryRun === true;
118
+ let headers;
119
+ try {
120
+ headers = registryHeadersOf(context.env);
121
+ }
122
+ catch (error) {
123
+ if (!dryRun)
124
+ throw error;
125
+ context.logger.log(`${error.message} A release of this run would fail here.`);
126
+ return;
127
+ }
128
+ await checkRegistryAccess({ fetch: fetch, project: projectOf(context), headers });
99
129
  }
100
130
  /**
101
131
  * Copies the tested image of each image of the release to the tags of the release: its version,
102
132
  * skipped of a registry that has it at the same digest, so a release that stopped part way is
103
133
  * finished by running it again; and of a release, its minor and its major. Then records each image
104
- * for the links of the release of the host, its page in the container registry of GitLab.
134
+ * for the links of the release of the host, its page in the container registry of GitLab, asked
135
+ * by a token of `GL_TOKEN` or `GITLAB_TOKEN`; and writes the images it published to the dotenv
136
+ * file of `dotenv`.
105
137
  *
106
138
  * @param pluginConfig - The plugin's options of the config, with `trains` of its root.
107
139
  * @param context - The context of semantic-release's `publish` step: the folder, the environment,
@@ -121,6 +153,8 @@ export async function publish(pluginConfig, context) {
121
153
  return false;
122
154
  }
123
155
  const repositories = repositoriesOf(release);
156
+ // The token of the links, before anything is copied: a run of none fails here, not after.
157
+ const headers = registryHeadersOf(context.env);
124
158
  const tag = pluginConfig.sourceTag ?? context.env['CI_COMMIT_REF_SLUG'];
125
159
  if (tag === undefined || tag === '')
126
160
  throw new OciError('EOCISOURCE', `The tested image of train ${release.train} has no tag: neither the option \`sourceTag\` nor \`CI_COMMIT_REF_SLUG\` of the run names it.`, 'Run the release in the pipeline of its tag, which gives `CI_COMMIT_REF_SLUG`, or give the plugin the option `sourceTag`, the tag the pipeline pushes the tested image as.');
@@ -144,9 +178,7 @@ export async function publish(pluginConfig, context) {
144
178
  platforms: pluginConfig.platforms,
145
179
  log: (line) => context.logger.log(line)
146
180
  });
147
- const repositoryUrl = context.options?.repositoryUrl;
148
- const project = gitlabProjectOf({}, context.env, repositoryUrl);
149
- const headers = gitlabHeadersOf(context.env);
181
+ const project = projectOf(context);
150
182
  const pages = await Promise.all(published.map(({ repository }) => registryPageOf({ fetch: fetch, project, repository, headers })));
151
183
  const released = published.map(({ repository }, index) => ({
152
184
  ecosystem: 'oci',
@@ -155,6 +187,15 @@ export async function publish(pluginConfig, context) {
155
187
  page: pages[index]
156
188
  }));
157
189
  recordReleased(run, 'oci', released);
190
+ if (pluginConfig.dotenv !== false) {
191
+ const file = joinPath(context.cwd, pluginConfig.dotenv ?? 'oci.env');
192
+ await release.system.fs.writeFile(file, [
193
+ `oci_version=${version}`,
194
+ `oci_images=${published.map(({ repository, digest }) => `${repository}@${digest}`).join(' ')}`,
195
+ `oci_tags=${[...new Set(published.flatMap(({ tags }) => tags))].join(' ')}`
196
+ ].join('\n') + '\n');
197
+ context.logger.log(`Wrote the images published to ${file}.`);
198
+ }
158
199
  const [first] = released;
159
200
  return {
160
201
  name: `OCI images (${published.map(({ repository }) => `${repository}:${version}`).join(', ')})`,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":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AE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;SAC5E,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CACpB,CAAA;QACD,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,iCAAiC,IAAI,GAAG,CAAC,CAAA;IAC9D,CAAC;IACD,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAA;IACxB,OAAO;QACL,IAAI,EAAE,eAAe,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,GAAG,UAAU,IAAI,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;QAChG,GAAG,CAAC,KAAK,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;KAC1D,CAAA;AACH,CAAC;AAED,eAAe,EAAE,gBAAgB,EAAE,OAAO,EAAE,CAAA"}
package/dist/schema.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * - {@link ociSchema}: the options the plugin is given, of the root of the config, `trains`,
6
6
  * `ecosystems`, `train` and `system`, and of its entry, as it checks them;
7
7
  * - {@link ociOptionsSchema}: the options of its entry, `image`, `sourceRepository`, `sourceTag`,
8
- * `moving`, `platforms` and `crane`, its own;
8
+ * `moving`, `platforms`, `crane` and `dotenv`, its own;
9
9
  * - {@link configSchema}: this package's part of a whole config of semantic-release, each entry of
10
10
  * `plugins` of the plugin, and anything else; its JSON Schema is {@link jsonSchema}, which the
11
11
  * package publishes as `schema.json`.
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAIL,KAAK,UAAU,EAIf,KAAK,SAAS,EACf,MAAM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2F;AAC3F,eAAO,MAAM,UAAU,EAAE,UAOxB,CAAA"}
package/dist/schema.js CHANGED
@@ -5,7 +5,7 @@
5
5
  * - {@link ociSchema}: the options the plugin is given, of the root of the config, `trains`,
6
6
  * `ecosystems`, `train` and `system`, and of its entry, as it checks them;
7
7
  * - {@link ociOptionsSchema}: the options of its entry, `image`, `sourceRepository`, `sourceTag`,
8
- * `moving`, `platforms` and `crane`, its own;
8
+ * `moving`, `platforms`, `crane` and `dotenv`, its own;
9
9
  * - {@link configSchema}: this package's part of a whole config of semantic-release, each entry of
10
10
  * `plugins` of the plugin, and anything else; its JSON Schema is {@link jsonSchema}, which the
11
11
  * package publishes as `schema.json`.
@@ -22,7 +22,7 @@
22
22
  * @packageDocumentation
23
23
  * @module @wtf/semantic-release-oci/schema
24
24
  */
25
- import { allOf, arrayOf, booleanOf, objectOf, pluginEntriesOf, stringOf } from '@wtf/release-system/validator';
25
+ import { allOf, anyOf, arrayOf, booleanOf, objectOf, oneOf, pluginEntriesOf, stringOf } from '@wtf/release-system/validator';
26
26
  import { rootOptionsSchema } from '@wtf/release-trains/schema';
27
27
  /** The validator of the options of an entry of the plugin, its own. */
28
28
  export const ociOptionsSchema = objectOf({
@@ -31,7 +31,11 @@ export const ociOptionsSchema = objectOf({
31
31
  sourceTag: { of: stringOf({ minLength: 1 }), optional: true },
32
32
  moving: { of: booleanOf(), optional: true },
33
33
  platforms: { of: arrayOf(stringOf({ minLength: 1 })), optional: true },
34
- crane: { of: stringOf({ minLength: 1 }), optional: true }
34
+ crane: { of: stringOf({ minLength: 1 }), optional: true },
35
+ dotenv: {
36
+ of: anyOf([stringOf({ minLength: 1 }), oneOf([false])], 'a file, or false'),
37
+ optional: true
38
+ }
35
39
  });
36
40
  /**
37
41
  * The validator of the options the plugin is given: the root's, `trains` and `ecosystems` required,
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;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SAAS,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,CAAC,CAAC,KAAK,CAAU,CAAC,CAAC,EACrD,kBAAkB,CACnB;QACD,QAAQ,EAAE,IAAI;KACf;CACF,CAAC,CAAA;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAwC,KAAK,CACjE,iBAAiB,EACjB,gBAAgB,CACjB,CAAA;AAED,wGAAwG;AACxG,MAAM,CAAC,MAAM,YAAY,GAAsB,eAAe,CAC5D,CAAC,2BAA2B,CAAC,EAC7B,gBAAgB,CACjB,CAAA;AAED,2FAA2F;AAC3F,MAAM,CAAC,MAAM,UAAU,GAAe;IACpC,OAAO,EAAE,8CAA8C;IACvD,GAAG,EAAE,aAAa;IAClB,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,8LAA8L;IAChM,GAAG,YAAY,CAAC,UAAU;CAC3B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wtf/semantic-release-oci",
3
- "version": "2.0.0",
3
+ "version": "2.1.0",
4
4
  "description": "The plugin of semantic-release that releases the OCI images of a train of a repo, by @wtf/release-oci, with no rebuild: in publish, the tested image of each, by default the snapshot of the pipeline of the tag, found by its digest and copied by crane to the tags of the release, its version and, of a release, its moving minor and major, a full version the registry has at the same digest skipped and at another refused, so a release that stopped part way is finished by running it again; each image linked to its page in the container registry of GitLab; and the schema of its options and of its part of a config (./schema, schema.json).",
5
5
  "keywords": [
6
6
  "container",
@@ -53,7 +53,7 @@
53
53
  },
54
54
  "dependencies": {
55
55
  "@standard-schema/spec": "^1.1.0",
56
- "@wtf/release-oci": "2.0.0",
56
+ "@wtf/release-oci": "2.1.0",
57
57
  "@wtf/release-system": "^1.0.1",
58
58
  "@wtf/release-trains": "^8.0.2"
59
59
  },
package/schema.json CHANGED
@@ -55,6 +55,17 @@
55
55
  "crane": {
56
56
  "type": "string",
57
57
  "minLength": 1
58
+ },
59
+ "dotenv": {
60
+ "anyOf": [
61
+ {
62
+ "type": "string",
63
+ "minLength": 1
64
+ },
65
+ {
66
+ "const": false
67
+ }
68
+ ]
58
69
  }
59
70
  }
60
71
  }