@savvy-web/github-action-builder 0.7.1 → 0.7.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.
@@ -1,6 +1,5 @@
1
1
  import { Context, Data, Effect, Layer, ParseResult, Schema } from "effect";
2
- import { copyFileSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, statSync, writeFileSync } from "node:fs";
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
- stubDir = yield* Effect["try"]({
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 "../677.js";
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.1";
77
+ const getPackageVersion = ()=>"0.7.2";
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.1"
309
+ version: "0.7.2"
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 "./677.js";
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 "./677.js";
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.1",
3
+ "version": "0.7.2",
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": [
@@ -41,7 +41,7 @@
41
41
  "./tsconfig/action.json": "./tsconfig/action.json"
42
42
  },
43
43
  "bin": {
44
- "github-action-builder": "./bin/github-action-builder.js"
44
+ "github-action-builder": "bin/github-action-builder.js"
45
45
  },
46
46
  "dependencies": {
47
47
  "@effect/cli": "^0.75.1",
@@ -78,7 +78,7 @@
78
78
  "!tsdoc.json",
79
79
  "231.js",
80
80
  "612.js",
81
- "677.js",
81
+ "948.js",
82
82
  "LICENSE",
83
83
  "README.md",
84
84
  "bin/github-action-builder.js",