@savvy-web/github-action-builder 0.5.1 → 0.6.1

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/231.js ADDED
@@ -0,0 +1,5 @@
1
+ var __webpack_require__ = {};
2
+ (()=>{
3
+ __webpack_require__.j = "231";
4
+ })();
5
+ export { __webpack_require__ };
package/612.js ADDED
@@ -0,0 +1,5 @@
1
+ var __webpack_require__ = {};
2
+ (()=>{
3
+ __webpack_require__.j = "612";
4
+ })();
5
+ export { __webpack_require__ };
package/677.js CHANGED
@@ -3,8 +3,10 @@ import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, rmSync,
3
3
  import { dirname, join, relative, resolve } from "node:path";
4
4
  import { createRsbuild } from "@rsbuild/core";
5
5
  import { fileURLToPath } from "node:url";
6
+ import { createJiti } from "jiti";
6
7
  import { createHash } from "node:crypto";
7
8
  import { parse } from "yaml-effect";
9
+ import { __webpack_require__ } from "./231.js";
8
10
  const ConfigNotFoundBase = Data.TaggedError("ConfigNotFound");
9
11
  class ConfigNotFound extends ConfigNotFoundBase {
10
12
  }
@@ -18,7 +20,7 @@ const MainEntryMissingBase = Data.TaggedError("MainEntryMissing");
18
20
  class MainEntryMissing extends MainEntryMissingBase {
19
21
  }
20
22
  const EntryFileMissingBase = Data.TaggedError("EntryFileMissing");
21
- class EntryFileMissing extends EntryFileMissingBase {
23
+ class EntryFileMissing extends (231 == __webpack_require__.j ? EntryFileMissingBase : null) {
22
24
  }
23
25
  const ActionYmlMissingBase = Data.TaggedError("ActionYmlMissing");
24
26
  class ActionYmlMissing extends ActionYmlMissingBase {
@@ -388,7 +390,15 @@ const ConfigServiceLive = Layer.succeed(ConfigService, {
388
390
  }));
389
391
  const absolutePath = resolve(cwd, configPath);
390
392
  const configModule = yield* Effect.tryPromise({
391
- try: async ()=>import(absolutePath),
393
+ try: async ()=>{
394
+ if (absolutePath.endsWith(".ts")) {
395
+ const jiti = createJiti(absolutePath, {
396
+ interopDefault: true
397
+ });
398
+ return jiti.import(absolutePath);
399
+ }
400
+ return import(absolutePath);
401
+ },
392
402
  catch: (error)=>new ConfigLoadFailed({
393
403
  path: configPath,
394
404
  cause: error
@@ -881,7 +891,7 @@ const ValidationServiceLive = Layer.effect(ValidationService, Effect.gen(functio
881
891
  isStrict: (configStrict)=>Effect.succeed(resolveStrict(configStrict))
882
892
  };
883
893
  }));
884
- const ConfigLayer = ConfigServiceLive;
894
+ const ConfigLayer = 231 == __webpack_require__.j ? ConfigServiceLive : null;
885
895
  const ValidationLayer = ValidationServiceLive.pipe(Layer.provide(ConfigServiceLive));
886
896
  const BuildLayer = BuildServiceLive.pipe(Layer.provide(ConfigServiceLive));
887
897
  const PersistLocalLayer = PersistLocalServiceLive;
package/README.md CHANGED
@@ -149,6 +149,20 @@ if (result.success) {
149
149
  }
150
150
  ```
151
151
 
152
+ ## Shared TypeScript Configuration
153
+
154
+ The package exports a base `tsconfig.json` for GitHub Action projects:
155
+
156
+ ```json
157
+ {
158
+ "extends": ["@savvy-web/github-action-builder/tsconfig/action.json"]
159
+ }
160
+ ```
161
+
162
+ This provides sensible defaults for Node.js 24 ESM actions including strict
163
+ mode, ES2022 target, and bundler module resolution. Override or extend as
164
+ needed in your project's `tsconfig.json`.
165
+
152
166
  ## Requirements
153
167
 
154
168
  - Node.js 24+
@@ -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.5.1";
77
+ const getPackageVersion = ()=>"0.6.1";
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.5.1"
309
+ version: "0.6.1"
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvy-web/github-action-builder",
3
- "version": "0.5.1",
3
+ "version": "0.6.1",
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": [
@@ -37,7 +37,8 @@
37
37
  ".": {
38
38
  "types": "./index.d.ts",
39
39
  "import": "./index.js"
40
- }
40
+ },
41
+ "./tsconfig/action.json": "./tsconfig/action.json"
41
42
  },
42
43
  "bin": {
43
44
  "github-action-builder": "./bin/github-action-builder.js"
@@ -51,8 +52,9 @@
51
52
  "@effect/typeclass": "^0.40.0",
52
53
  "@rsbuild/core": "^1.7.3",
53
54
  "effect": "^3.21.0",
55
+ "jiti": "^2.6.1",
54
56
  "picocolors": "^1.1.1",
55
- "yaml-effect": "^0.1.5"
57
+ "yaml-effect": "^0.2.3"
56
58
  },
57
59
  "peerDependencies": {
58
60
  "@types/node": "^25.5.0",
@@ -74,6 +76,8 @@
74
76
  "!github-action-builder.api.json",
75
77
  "!tsconfig.json",
76
78
  "!tsdoc.json",
79
+ "231.js",
80
+ "612.js",
77
81
  "677.js",
78
82
  "LICENSE",
79
83
  "README.md",
@@ -81,6 +85,7 @@
81
85
  "index.d.ts",
82
86
  "index.js",
83
87
  "package.json",
88
+ "tsconfig/action.json",
84
89
  "tsdoc-metadata.json"
85
90
  ]
86
91
  }
@@ -0,0 +1,31 @@
1
+ {
2
+ "compilerOptions": {
3
+ "allowJs": true,
4
+ "esModuleInterop": true,
5
+ "forceConsistentCasingInFileNames": true,
6
+ "exactOptionalPropertyTypes": true,
7
+ "lib": ["ES2022"],
8
+ "module": "ESNext",
9
+ "moduleResolution": "bundler",
10
+ "resolveJsonModule": true,
11
+ "skipLibCheck": true,
12
+ "strict": true,
13
+ "target": "ES2022"
14
+ },
15
+ "exclude": ["node_modules", "dist"],
16
+ "include": [
17
+ "${configDir}/*.ts",
18
+ "${configDir}/*.mts",
19
+ "${configDir}/*.cts",
20
+ "${configDir}/src/**/*.ts",
21
+ "${configDir}/src/**/*.mts",
22
+ "${configDir}/src/**/*.cts",
23
+ "${configDir}/lib/**/*.ts",
24
+ "${configDir}/lib/**/*.mts",
25
+ "${configDir}/lib/**/*.cts",
26
+ "${configDir}/__test__/**/*.ts",
27
+ "${configDir}/__test__/**/*.mts",
28
+ "${configDir}/__test__/**/*.cts",
29
+ "${configDir}/types/**/*.d.ts"
30
+ ]
31
+ }