@savvy-web/github-action-builder 0.7.1 → 0.7.3
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/{677.js → 948.js} +3 -18
- package/bin/github-action-builder.js +3 -3
- package/index.js +2 -2
- package/package.json +8 -7
package/{677.js → 948.js}
RENAMED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Context, Data, Effect, Layer, ParseResult, Schema } from "effect";
|
|
2
|
-
import { copyFileSync, existsSync, mkdirSync,
|
|
3
|
-
import { tmpdir } from "node:os";
|
|
2
|
+
import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
4
3
|
import { dirname, join, relative, resolve } from "node:path";
|
|
5
4
|
import { createRsbuild } from "@rsbuild/core";
|
|
6
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -240,16 +239,8 @@ function bundleEntry(entry, config, cwd) {
|
|
|
240
239
|
const externalsSet = new Set(config.build.externals);
|
|
241
240
|
const ignoreSet = new Set(config.build.ignore);
|
|
242
241
|
const ignoreAlias = {};
|
|
243
|
-
let stubDir;
|
|
244
242
|
if (config.build.ignore.length > 0) {
|
|
245
|
-
|
|
246
|
-
try: ()=>mkdtempSync(join(tmpdir(), "github-action-builder-")),
|
|
247
|
-
catch: (error)=>new WriteError({
|
|
248
|
-
path: tmpdir(),
|
|
249
|
-
cause: error
|
|
250
|
-
})
|
|
251
|
-
});
|
|
252
|
-
const stubPath = resolve(stubDir, "ignore-stub.mjs");
|
|
243
|
+
const stubPath = resolve(cwd, "node_modules", ".cache", "github-action-builder", "ignore-stub.mjs");
|
|
253
244
|
yield* writeFile(stubPath, IGNORE_STUB_SOURCE);
|
|
254
245
|
for (const moduleName of config.build.ignore)ignoreAlias[`${moduleName}$`] = stubPath;
|
|
255
246
|
}
|
|
@@ -281,6 +272,7 @@ function bundleEntry(entry, config, cwd) {
|
|
|
281
272
|
return false;
|
|
282
273
|
},
|
|
283
274
|
cleanDistPath: false,
|
|
275
|
+
legalComments: "inline",
|
|
284
276
|
minify: config.build.minify,
|
|
285
277
|
sourceMap: config.build.sourceMap ? {
|
|
286
278
|
js: "source-map"
|
|
@@ -323,13 +315,6 @@ function bundleEntry(entry, config, cwd) {
|
|
|
323
315
|
cause: new Error(`rsbuild close() failed: ${error}`)
|
|
324
316
|
})
|
|
325
317
|
});
|
|
326
|
-
if (void 0 !== stubDir) {
|
|
327
|
-
const dir = stubDir;
|
|
328
|
-
yield* Effect.ignore(Effect["try"](()=>rmSync(dir, {
|
|
329
|
-
recursive: true,
|
|
330
|
-
force: true
|
|
331
|
-
})));
|
|
332
|
-
}
|
|
333
318
|
const outputPath = resolve(outputDir, `${entry.type}.js`);
|
|
334
319
|
const size = yield* Effect["try"]({
|
|
335
320
|
try: ()=>statSync(outputPath).size,
|
|
@@ -4,7 +4,7 @@ import { NodeContext, NodeRuntime } from "@effect/platform-node";
|
|
|
4
4
|
import { Cause, Console, Effect, Layer, Option } from "effect";
|
|
5
5
|
import { existsSync, mkdirSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { resolve } from "node:path";
|
|
7
|
-
import { PersistLocalService, ValidationService, AppLayer, BuildService, ConfigService, ValidationFailed, BuildFailed } from "../
|
|
7
|
+
import { PersistLocalService, ValidationService, AppLayer, BuildService, ConfigService, ValidationFailed, BuildFailed } from "../948.js";
|
|
8
8
|
const configOption = Options.file("config").pipe(Options.withAlias("c"), Options.withDescription("Path to configuration file"), Options.optional);
|
|
9
9
|
const quietOption = Options.boolean("quiet").pipe(Options.withAlias("q"), Options.withDescription("Suppress non-error output"), Options.withDefault(false));
|
|
10
10
|
const noValidateOption = Options.boolean("no-validate").pipe(Options.withDescription("Skip validation step"), Options.withDefault(false));
|
|
@@ -74,7 +74,7 @@ const actionNameArg = Args.text({
|
|
|
74
74
|
name: "action-name"
|
|
75
75
|
}).pipe(Args.withDescription("Name of the GitHub Action (also the output directory)"));
|
|
76
76
|
const forceOption = Options.boolean("force").pipe(Options.withAlias("f"), Options.withDescription("Overwrite existing files"), Options.withDefault(false));
|
|
77
|
-
const getPackageVersion = ()=>"0.7.
|
|
77
|
+
const getPackageVersion = ()=>"0.7.3";
|
|
78
78
|
const generatePackageJson = (name)=>{
|
|
79
79
|
const version = getPackageVersion();
|
|
80
80
|
const pkg = {
|
|
@@ -306,7 +306,7 @@ const rootCommand = Command.make("github-action-builder").pipe(Command.withSubco
|
|
|
306
306
|
]));
|
|
307
307
|
const cli = Command.run(rootCommand, {
|
|
308
308
|
name: "github-action-builder",
|
|
309
|
-
version: "0.7.
|
|
309
|
+
version: "0.7.3"
|
|
310
310
|
});
|
|
311
311
|
const CliLayer = Layer.merge(AppLayer, NodeContext.layer);
|
|
312
312
|
const main = Effect.suspend(()=>cli(process.argv)).pipe(Effect.provide(CliLayer), Effect.catchAllCause((cause)=>{
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect, ManagedRuntime, Schema } from "effect";
|
|
2
|
-
import { AppLayer, BuildService, ConfigService, ValidationService, ValidationResultSchema, BuildResultSchema, PersistLocalResultSchema, defineConfig, PersistLocalService } from "./
|
|
2
|
+
import { AppLayer, BuildService, ConfigService, ValidationService, ValidationResultSchema, BuildResultSchema, PersistLocalResultSchema, defineConfig, PersistLocalService } from "./948.js";
|
|
3
3
|
const GitHubActionBuildResultSchema = Schema.Struct({
|
|
4
4
|
success: Schema.Boolean,
|
|
5
5
|
build: Schema.optional(BuildResultSchema),
|
|
@@ -130,5 +130,5 @@ class GitHubAction {
|
|
|
130
130
|
await this.runtime.dispose();
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
|
-
export { ActionYmlMissing, ActionYmlMissingBase, ActionYmlPathError, ActionYmlPathErrorBase, ActionYmlResultSchema, ActionYmlSchemaError, ActionYmlSchemaErrorBase, ActionYmlSyntaxError, ActionYmlSyntaxErrorBase, AppLayer, BuildFailed, BuildFailedBase, BuildLayer, BuildOptionsSchema, BuildResultSchema, BuildRunnerOptionsSchema, BuildService, BundleFailed, BundleFailedBase, BundleResultSchema, BundleStatsSchema, CleanError, CleanErrorBase, ConfigInputSchema, ConfigInvalid, ConfigInvalidBase, ConfigLayer, ConfigLoadFailed, ConfigLoadFailedBase, ConfigNotFound, ConfigNotFoundBase, ConfigSchema, ConfigService, DetectEntriesResultSchema, DetectedEntrySchema, EntriesSchema, EntryFileMissing, EntryFileMissingBase, LoadConfigOptionsSchema, MainEntryMissing, MainEntryMissingBase, PersistLocalError, PersistLocalErrorBase, PersistLocalLayer, PersistLocalOptionsSchema, PersistLocalResultSchema, PersistLocalRunnerOptionsSchema, PersistLocalService, ValidateOptionsSchema, ValidationErrorSchema, ValidationFailed, ValidationFailedBase, ValidationLayer, ValidationOptionsSchema, ValidationResultSchema, ValidationService, ValidationWarningSchema, WriteError, WriteErrorBase, defineConfig } from "./
|
|
133
|
+
export { ActionYmlMissing, ActionYmlMissingBase, ActionYmlPathError, ActionYmlPathErrorBase, ActionYmlResultSchema, ActionYmlSchemaError, ActionYmlSchemaErrorBase, ActionYmlSyntaxError, ActionYmlSyntaxErrorBase, AppLayer, BuildFailed, BuildFailedBase, BuildLayer, BuildOptionsSchema, BuildResultSchema, BuildRunnerOptionsSchema, BuildService, BundleFailed, BundleFailedBase, BundleResultSchema, BundleStatsSchema, CleanError, CleanErrorBase, ConfigInputSchema, ConfigInvalid, ConfigInvalidBase, ConfigLayer, ConfigLoadFailed, ConfigLoadFailedBase, ConfigNotFound, ConfigNotFoundBase, ConfigSchema, ConfigService, DetectEntriesResultSchema, DetectedEntrySchema, EntriesSchema, EntryFileMissing, EntryFileMissingBase, LoadConfigOptionsSchema, MainEntryMissing, MainEntryMissingBase, PersistLocalError, PersistLocalErrorBase, PersistLocalLayer, PersistLocalOptionsSchema, PersistLocalResultSchema, PersistLocalRunnerOptionsSchema, PersistLocalService, ValidateOptionsSchema, ValidationErrorSchema, ValidationFailed, ValidationFailedBase, ValidationLayer, ValidationOptionsSchema, ValidationResultSchema, ValidationService, ValidationWarningSchema, WriteError, WriteErrorBase, defineConfig } from "./948.js";
|
|
134
134
|
export { GitHubAction, GitHubActionBuildResultSchema };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/github-action-builder",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.3",
|
|
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": [
|
|
@@ -18,13 +18,14 @@
|
|
|
18
18
|
"effect-ts",
|
|
19
19
|
"esm"
|
|
20
20
|
],
|
|
21
|
-
"homepage": "https://github.com/savvy-web/github-action-builder
|
|
21
|
+
"homepage": "https://github.com/savvy-web/systems/tree/main/packages/github-action-builder",
|
|
22
22
|
"bugs": {
|
|
23
|
-
"url": "https://github.com/savvy-web/
|
|
23
|
+
"url": "https://github.com/savvy-web/systems/issues"
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|
|
27
|
-
"url": "git+https://github.com/savvy-web/
|
|
27
|
+
"url": "git+https://github.com/savvy-web/systems.git",
|
|
28
|
+
"directory": "packages/github-action-builder"
|
|
28
29
|
},
|
|
29
30
|
"license": "MIT",
|
|
30
31
|
"author": {
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
"./tsconfig/action.json": "./tsconfig/action.json"
|
|
42
43
|
},
|
|
43
44
|
"bin": {
|
|
44
|
-
"github-action-builder": "
|
|
45
|
+
"github-action-builder": "bin/github-action-builder.js"
|
|
45
46
|
},
|
|
46
47
|
"dependencies": {
|
|
47
48
|
"@effect/cli": "^0.75.1",
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
"@effect/printer": "^0.49.0",
|
|
51
52
|
"@effect/printer-ansi": "^0.49.0",
|
|
52
53
|
"@effect/typeclass": "^0.40.0",
|
|
53
|
-
"@rsbuild/core": "^2.0.
|
|
54
|
+
"@rsbuild/core": "^2.0.9",
|
|
54
55
|
"effect": "^3.21.2",
|
|
55
56
|
"jiti": "^2.7.0",
|
|
56
57
|
"picocolors": "^1.1.1",
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
"!tsdoc.json",
|
|
79
80
|
"231.js",
|
|
80
81
|
"612.js",
|
|
81
|
-
"
|
|
82
|
+
"948.js",
|
|
82
83
|
"LICENSE",
|
|
83
84
|
"README.md",
|
|
84
85
|
"bin/github-action-builder.js",
|