@savvy-web/github-action-builder 2.4.21 → 2.4.22
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.
|
@@ -25,7 +25,7 @@ const rootCommand = Command.make("github-action-builder").pipe(Command.withSubco
|
|
|
25
25
|
/**
|
|
26
26
|
* CLI application: reads argv from the Stdio service provided by NodeServices.
|
|
27
27
|
*/
|
|
28
|
-
const cli = Command.run(rootCommand, { version: "2.4.
|
|
28
|
+
const cli = Command.run(rootCommand, { version: "2.4.22" });
|
|
29
29
|
/**
|
|
30
30
|
* Combined layer: AppLayer + the Node implementations of the CLI
|
|
31
31
|
* environment (FileSystem, Path, Terminal, Stdio, ChildProcessSpawner).
|
package/cli/commands/init.js
CHANGED
|
@@ -20,7 +20,7 @@ const forceOption = Flag.Boolean("force").pipe(Flag.withAlias("f"), Flag.withDes
|
|
|
20
20
|
* Get current package version (replaced at build time).
|
|
21
21
|
*/
|
|
22
22
|
const getPackageVersion = () => {
|
|
23
|
-
return "2.4.
|
|
23
|
+
return "2.4.22";
|
|
24
24
|
};
|
|
25
25
|
/**
|
|
26
26
|
* Generate package.json content.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/github-action-builder",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.22",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "A zero-config build tool for creating GitHub Actions from TypeScript. Bundles with rsbuild, validates action.yml against GitHub's schema, and outputs production-ready Node.js 24 actions.",
|
|
6
6
|
"keywords": [
|
|
@@ -49,6 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@effect/platform-node": "^4.0.6",
|
|
52
|
+
"@effected/env": "^0.6.0",
|
|
52
53
|
"@effected/yaml": "^0.25.1",
|
|
53
54
|
"@rsbuild/core": "^2.2.14",
|
|
54
55
|
"effect": "^4.0.6",
|
package/services/validation.js
CHANGED
|
@@ -2,10 +2,11 @@ import { ActionYmlMissing, ActionYmlSchemaError, ActionYmlSyntaxError, MainEntry
|
|
|
2
2
|
import { OptionalPathLikeSchema } from "../schemas/path.js";
|
|
3
3
|
import { ConfigService } from "./config.js";
|
|
4
4
|
import { ActionYml } from "../schemas/action-yml.js";
|
|
5
|
-
import { Context, Effect, Layer, Result, Schema } from "effect";
|
|
5
|
+
import { Context, Effect, Layer, Option, Result, Schema } from "effect";
|
|
6
6
|
import { existsSync, readFileSync } from "node:fs";
|
|
7
7
|
import { resolve } from "node:path";
|
|
8
8
|
import { Yaml } from "@effected/yaml";
|
|
9
|
+
import { RuntimeEnv } from "@effected/env";
|
|
9
10
|
|
|
10
11
|
// src/services/validation.ts
|
|
11
12
|
/**
|
|
@@ -81,12 +82,15 @@ const ActionYmlResultSchema = Schema.Struct({
|
|
|
81
82
|
/** Validation warnings. */
|
|
82
83
|
warnings: Schema.Array(ValidationWarningSchema)
|
|
83
84
|
});
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
/**
|
|
86
|
+
* Check if running in CI, by `@effected/env`'s one rule (a known provider's marker, or a truthy `CI` /
|
|
87
|
+
* `CONTINUOUS_INTEGRATION`) — the same rule `@savvy-web/bundler` and `@savvy-web/tsdown-plugins` use.
|
|
88
|
+
*
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
const isCI = (env = process.env) => Option.isSome(RuntimeEnv.fromRecord(env).ci);
|
|
87
92
|
/** Resolve strict mode from config or environment. */
|
|
88
93
|
const resolveStrict = (configStrict) => configStrict ?? isCI();
|
|
89
|
-
/* v8 ignore stop */
|
|
90
94
|
/** Create a validation warning, omitting undefined file. */
|
|
91
95
|
const makeWarning = (code, message, suggestion, file) => file !== void 0 ? {
|
|
92
96
|
code,
|
|
@@ -314,4 +318,4 @@ var ValidationService = class extends Context.Service()("ValidationService") {
|
|
|
314
318
|
}));
|
|
315
319
|
};
|
|
316
320
|
|
|
317
|
-
export { ActionYmlResultSchema, ValidateOptionsSchema, ValidationErrorSchema, ValidationResultSchema, ValidationService, ValidationWarningSchema };
|
|
321
|
+
export { ActionYmlResultSchema, ValidateOptionsSchema, ValidationErrorSchema, ValidationResultSchema, ValidationService, ValidationWarningSchema, isCI };
|