@effected/bundler 0.5.0 → 0.6.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/config/ActionConfig.js +90 -29
- package/config/BuildConfig.js +308 -104
- package/config/EffectedConfigSchema.js +37 -0
- package/index.d.ts +34 -0
- package/index.js +2 -1
- package/meta/og-satori.js +1 -1
- package/package.json +8 -8
package/config/ActionConfig.js
CHANGED
|
@@ -9,9 +9,12 @@ import { Effect, Schema } from "effect";
|
|
|
9
9
|
*
|
|
10
10
|
* @public
|
|
11
11
|
*/
|
|
12
|
-
var ActionWorker = class extends Schema.Class("ActionWorker")({
|
|
12
|
+
var ActionWorker = class extends Schema.Class("ActionWorker")(Schema.Struct({
|
|
13
13
|
/** The worker's source, relative to the package. */
|
|
14
|
-
source: Schema.String
|
|
14
|
+
source: Schema.String.annotate({
|
|
15
|
+
description: "The worker's source, relative to the package.",
|
|
16
|
+
examples: ["src/worker.ts"]
|
|
17
|
+
}),
|
|
15
18
|
/**
|
|
16
19
|
* Whether this worker's bundle is imported after the build to prove it loads.
|
|
17
20
|
*
|
|
@@ -20,8 +23,14 @@ var ActionWorker = class extends Schema.Class("ActionWorker")({
|
|
|
20
23
|
* action passes through the environment is missing. `[action.build] importCheck = false` still turns the check off
|
|
21
24
|
* for every bundle, this one included.
|
|
22
25
|
*/
|
|
23
|
-
importCheck: Schema.Boolean.
|
|
24
|
-
|
|
26
|
+
importCheck: Schema.Boolean.annotate({
|
|
27
|
+
description: "Whether this worker's bundle is imported after the build to prove it loads. [action.build] importCheck = false turns the check off for every bundle, this one included.",
|
|
28
|
+
default: true
|
|
29
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed(true)))
|
|
30
|
+
}).annotate({
|
|
31
|
+
title: "Action worker",
|
|
32
|
+
description: "A worker written as a table, for a worker that needs more than its source. A plain string is the source with every setting at its default."
|
|
33
|
+
})) {};
|
|
25
34
|
/**
|
|
26
35
|
* The bundles a GitHub Action ships, the `[action.entries]` table.
|
|
27
36
|
*
|
|
@@ -31,19 +40,29 @@ var ActionWorker = class extends Schema.Class("ActionWorker")({
|
|
|
31
40
|
*
|
|
32
41
|
* @public
|
|
33
42
|
*/
|
|
34
|
-
var ActionEntries = class extends Schema.Class("ActionEntries")({
|
|
43
|
+
var ActionEntries = class extends Schema.Class("ActionEntries")(Schema.Struct({
|
|
35
44
|
/** The main entry point's source. */
|
|
36
|
-
main: Schema.String.
|
|
45
|
+
main: Schema.String.annotate({
|
|
46
|
+
description: "The main entry point's source.",
|
|
47
|
+
default: "src/main.ts"
|
|
48
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed("src/main.ts"))),
|
|
37
49
|
/** The source of the entry that runs before `main`. */
|
|
38
|
-
pre: Schema.optionalKey(Schema.String),
|
|
50
|
+
pre: Schema.optionalKey(Schema.String.annotate({ description: "The source of the entry that runs before main. Absent, a conventional src/pre.ts builds when it exists." })),
|
|
39
51
|
/** The source of the entry that runs after `main`, for cleanup. */
|
|
40
|
-
post: Schema.optionalKey(Schema.String),
|
|
52
|
+
post: Schema.optionalKey(Schema.String.annotate({ description: "The source of the entry that runs after main, for cleanup. Absent, a conventional src/post.ts builds when it exists." })),
|
|
41
53
|
/**
|
|
42
54
|
* Extra bundles outside the lifecycle, each emitted as `dist/<name>.js`: a name to its source, or to an
|
|
43
55
|
* {@link ActionWorker} table.
|
|
44
56
|
*/
|
|
45
|
-
workers: Schema.Record(Schema.String, Schema.Union([Schema.String, ActionWorker])
|
|
46
|
-
|
|
57
|
+
workers: Schema.Record(Schema.String, Schema.Union([Schema.String, ActionWorker]).annotate({ description: "The worker's source, or a table of its settings." })).annotate({
|
|
58
|
+
description: "Extra bundles outside the lifecycle, each emitted as dist/<name>.js: a name to its source, or to a table of its own.",
|
|
59
|
+
default: {},
|
|
60
|
+
examples: [{ telemetry: "src/telemetry.ts" }]
|
|
61
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed({})))
|
|
62
|
+
}).annotate({
|
|
63
|
+
title: "Action entries",
|
|
64
|
+
description: "The bundles the action ships, the [action.entries] table. main, pre and post are the lifecycle entries action.yml runs; a worker is a bundle the action loads itself."
|
|
65
|
+
})) {};
|
|
47
66
|
/**
|
|
48
67
|
* How an action's bundles are built, the `[action.build]` table.
|
|
49
68
|
*
|
|
@@ -54,20 +73,32 @@ var ActionEntries = class extends Schema.Class("ActionEntries")({
|
|
|
54
73
|
*
|
|
55
74
|
* @public
|
|
56
75
|
*/
|
|
57
|
-
var ActionBuildOptions = class extends Schema.Class("ActionBuildOptions")({
|
|
76
|
+
var ActionBuildOptions = class extends Schema.Class("ActionBuildOptions")(Schema.Struct({
|
|
58
77
|
/** Whether to minify the bundles. */
|
|
59
|
-
minify: Schema.Boolean.
|
|
78
|
+
minify: Schema.Boolean.annotate({
|
|
79
|
+
description: "Whether to minify the bundles.",
|
|
80
|
+
default: true
|
|
81
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed(true))),
|
|
60
82
|
/** Whether to generate source maps. */
|
|
61
|
-
sourceMap: Schema.Boolean.
|
|
83
|
+
sourceMap: Schema.Boolean.annotate({
|
|
84
|
+
description: "Whether to generate source maps.",
|
|
85
|
+
default: false
|
|
86
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed(false))),
|
|
62
87
|
/** Packages left out of the bundles and imported at runtime, in addition to `node:` builtins. */
|
|
63
|
-
externals: Schema.Array(Schema.String).
|
|
88
|
+
externals: Schema.Array(Schema.String).annotate({
|
|
89
|
+
description: "Packages left out of the bundles and imported at runtime, beside node: builtins.",
|
|
90
|
+
default: []
|
|
91
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
|
|
64
92
|
/**
|
|
65
93
|
* Packages left out of the bundles and replaced with a stub that throws if it is ever loaded.
|
|
66
94
|
*
|
|
67
95
|
* @remarks
|
|
68
96
|
* For an optional transitive dependency the action never exercises, such as a native module.
|
|
69
97
|
*/
|
|
70
|
-
ignore: Schema.Array(Schema.String).
|
|
98
|
+
ignore: Schema.Array(Schema.String).annotate({
|
|
99
|
+
description: "Packages left out of the bundles and replaced with a stub that throws if loaded, for an optional dependency the action never exercises.",
|
|
100
|
+
default: []
|
|
101
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
|
|
71
102
|
/**
|
|
72
103
|
* Whether to import each bundle in a fresh Node after building it, which proves it loads.
|
|
73
104
|
*
|
|
@@ -76,34 +107,61 @@ var ActionBuildOptions = class extends Schema.Class("ActionBuildOptions")({
|
|
|
76
107
|
* with no `GITHUB_ACTIONS` guard around its program, because the import runs that program for real. To exempt one
|
|
77
108
|
* worker and keep the check on the rest, set `importCheck = false` in that worker's own table instead.
|
|
78
109
|
*/
|
|
79
|
-
importCheck: Schema.Boolean.
|
|
80
|
-
|
|
110
|
+
importCheck: Schema.Boolean.annotate({
|
|
111
|
+
description: "Whether to import each bundle in a fresh Node after building it, proving it loads. Turn it off for an action with no GITHUB_ACTIONS guard, because the import runs it for real.",
|
|
112
|
+
default: true
|
|
113
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed(true)))
|
|
114
|
+
}).annotate({
|
|
115
|
+
title: "Action build",
|
|
116
|
+
description: "How the action's bundles are built, the [action.build] table."
|
|
117
|
+
})) {};
|
|
81
118
|
/**
|
|
82
119
|
* What an action build checks before it builds, the `[action.validation]` table.
|
|
83
120
|
*
|
|
84
121
|
* @public
|
|
85
122
|
*/
|
|
86
|
-
var ActionValidationOptions = class extends Schema.Class("ActionValidationOptions")({
|
|
123
|
+
var ActionValidationOptions = class extends Schema.Class("ActionValidationOptions")(Schema.Struct({
|
|
87
124
|
/** Whether `action.yml` must exist and be valid. */
|
|
88
|
-
requireActionYml: Schema.Boolean.
|
|
125
|
+
requireActionYml: Schema.Boolean.annotate({
|
|
126
|
+
description: "Whether action.yml must exist and be valid.",
|
|
127
|
+
default: true
|
|
128
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed(true))),
|
|
89
129
|
/** The size past which a bundle is reported, such as `"5mb"` or `"500kb"`. */
|
|
90
|
-
maxBundleSize: Schema.optionalKey(Schema.String
|
|
130
|
+
maxBundleSize: Schema.optionalKey(Schema.String.annotate({
|
|
131
|
+
description: "The size past which a bundle is reported.",
|
|
132
|
+
examples: ["5mb", "500kb"]
|
|
133
|
+
})),
|
|
91
134
|
/** Whether a warning is an error. Absent means it is under CI and is not locally. */
|
|
92
|
-
strict: Schema.optionalKey(Schema.Boolean)
|
|
93
|
-
})
|
|
135
|
+
strict: Schema.optionalKey(Schema.Boolean.annotate({ description: "Whether a warning is an error. Absent, it is under CI and is not locally." }))
|
|
136
|
+
}).annotate({
|
|
137
|
+
title: "Action validation",
|
|
138
|
+
description: "What an action build checks before it builds, the [action.validation] table."
|
|
139
|
+
})) {};
|
|
94
140
|
/**
|
|
95
141
|
* The local copy of an action's build for testing with nektos/act, the `[action.persistLocal]` table.
|
|
96
142
|
*
|
|
97
143
|
* @public
|
|
98
144
|
*/
|
|
99
|
-
var ActionPersistLocalOptions = class extends Schema.Class("ActionPersistLocalOptions")({
|
|
145
|
+
var ActionPersistLocalOptions = class extends Schema.Class("ActionPersistLocalOptions")(Schema.Struct({
|
|
100
146
|
/** Whether to copy the build output locally. */
|
|
101
|
-
enabled: Schema.Boolean.
|
|
147
|
+
enabled: Schema.Boolean.annotate({
|
|
148
|
+
description: "Whether to copy the build output locally.",
|
|
149
|
+
default: true
|
|
150
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed(true))),
|
|
102
151
|
/** The local action directory, relative to the package. */
|
|
103
|
-
path: Schema.String.
|
|
152
|
+
path: Schema.String.annotate({
|
|
153
|
+
description: "The local action directory, relative to the package.",
|
|
154
|
+
default: ".github/actions/local"
|
|
155
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed(".github/actions/local"))),
|
|
104
156
|
/** Whether to generate the act boilerplate, `.actrc` and `act-test.yml`, when those files do not exist. */
|
|
105
|
-
actTemplate: Schema.Boolean.
|
|
106
|
-
|
|
157
|
+
actTemplate: Schema.Boolean.annotate({
|
|
158
|
+
description: "Whether to generate the act boilerplate, .actrc and act-test.yml, when those files do not exist.",
|
|
159
|
+
default: true
|
|
160
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed(true)))
|
|
161
|
+
}).annotate({
|
|
162
|
+
title: "Local action copy",
|
|
163
|
+
description: "The local copy of the action's build for testing with nektos/act, the [action.persistLocal] table."
|
|
164
|
+
})) {};
|
|
107
165
|
/**
|
|
108
166
|
* A GitHub Action's build settings, the `[action]` table of `effected.toml`.
|
|
109
167
|
*
|
|
@@ -113,7 +171,7 @@ var ActionPersistLocalOptions = class extends Schema.Class("ActionPersistLocalOp
|
|
|
113
171
|
*
|
|
114
172
|
* @public
|
|
115
173
|
*/
|
|
116
|
-
var ActionConfig = class extends Schema.Class("ActionConfig")({
|
|
174
|
+
var ActionConfig = class extends Schema.Class("ActionConfig")(Schema.Struct({
|
|
117
175
|
/** The bundles to build. */
|
|
118
176
|
entries: ActionEntries.pipe(Schema.withDecodingDefaultKey(Effect.succeed({}))),
|
|
119
177
|
/** How to build them. */
|
|
@@ -122,6 +180,9 @@ var ActionConfig = class extends Schema.Class("ActionConfig")({
|
|
|
122
180
|
validation: ActionValidationOptions.pipe(Schema.withDecodingDefaultKey(Effect.succeed({}))),
|
|
123
181
|
/** The local copy for testing with nektos/act. */
|
|
124
182
|
persistLocal: ActionPersistLocalOptions.pipe(Schema.withDecodingDefaultKey(Effect.succeed({})))
|
|
125
|
-
})
|
|
183
|
+
}).annotate({
|
|
184
|
+
title: "Action",
|
|
185
|
+
description: "A GitHub Action's build settings, the [action] table. Every key has a default, so an empty table is a complete config; a file with no [action] table is a library."
|
|
186
|
+
})) {};
|
|
126
187
|
|
|
127
188
|
export { ActionBuildOptions, ActionConfig, ActionEntries, ActionPersistLocalOptions, ActionValidationOptions, ActionWorker };
|
package/config/BuildConfig.js
CHANGED
|
@@ -7,7 +7,11 @@ import { Effect, Schema } from "effect";
|
|
|
7
7
|
*
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
|
10
|
-
const BuildFormat = Schema.Literals(["esm", "cjs"])
|
|
10
|
+
const BuildFormat = Schema.Literals(["esm", "cjs"]).annotate({
|
|
11
|
+
title: "Module format",
|
|
12
|
+
description: "A module format the build emits: esm or cjs.",
|
|
13
|
+
"x-taplo": { docs: { enumValues: ["ECMAScript modules.", "CommonJS modules."] } }
|
|
14
|
+
});
|
|
11
15
|
/**
|
|
12
16
|
* The platform a JS pass targets.
|
|
13
17
|
*
|
|
@@ -17,7 +21,15 @@ const BuildPlatform = Schema.Literals([
|
|
|
17
21
|
"node",
|
|
18
22
|
"browser",
|
|
19
23
|
"neutral"
|
|
20
|
-
])
|
|
24
|
+
]).annotate({
|
|
25
|
+
title: "Platform",
|
|
26
|
+
description: "The platform the JS pass targets.",
|
|
27
|
+
"x-taplo": { docs: { enumValues: [
|
|
28
|
+
"A Node.js runtime.",
|
|
29
|
+
"A browser runtime.",
|
|
30
|
+
"No platform: neither Node nor browser built-ins."
|
|
31
|
+
] } }
|
|
32
|
+
});
|
|
21
33
|
/**
|
|
22
34
|
* Format and bundling settings pinned to some of a package's export paths, layered onto the base build.
|
|
23
35
|
*
|
|
@@ -28,25 +40,28 @@ const BuildPlatform = Schema.Literals([
|
|
|
28
40
|
*
|
|
29
41
|
* @public
|
|
30
42
|
*/
|
|
31
|
-
var EntryOverride = class extends Schema.Class("EntryOverride")({
|
|
43
|
+
var EntryOverride = class extends Schema.Class("EntryOverride")(Schema.Struct({
|
|
32
44
|
/** Export paths to pin to this partition, e.g. `"./changesets/markdownlint"`, or `"."` for the root. */
|
|
33
|
-
entries: Schema.Array(Schema.String)
|
|
45
|
+
entries: Schema.Array(Schema.String).annotate({
|
|
46
|
+
description: "Export paths pinned to this partition, or \".\" for the root.",
|
|
47
|
+
examples: [["./changesets/markdownlint"], ["."]]
|
|
48
|
+
}),
|
|
34
49
|
/** Output module formats for this partition. */
|
|
35
|
-
format: Schema.optionalKey(Schema.Array(BuildFormat)),
|
|
50
|
+
format: Schema.optionalKey(Schema.Array(BuildFormat).annotate({ description: "Output module formats for this partition." })),
|
|
36
51
|
/** Packages force-bundled into this partition's JS output. */
|
|
37
|
-
bundle: Schema.optionalKey(Schema.Array(Schema.String)),
|
|
52
|
+
bundle: Schema.optionalKey(Schema.Array(Schema.String).annotate({ description: "Packages force-bundled into this partition's JS output." })),
|
|
38
53
|
/** Packages kept external in this partition. */
|
|
39
|
-
externals: Schema.optionalKey(Schema.Array(Schema.String)),
|
|
54
|
+
externals: Schema.optionalKey(Schema.Array(Schema.String).annotate({ description: "Packages kept external in this partition." })),
|
|
40
55
|
/** Whether this partition bundles its `node_modules` dependencies. */
|
|
41
|
-
bundleNodeModules: Schema.optionalKey(Schema.Boolean),
|
|
56
|
+
bundleNodeModules: Schema.optionalKey(Schema.Boolean.annotate({ description: "Whether this partition bundles its node_modules dependencies." })),
|
|
42
57
|
/** Packages whose declarations are inlined into this partition's `.d.ts`; a workspace sibling must be built first. */
|
|
43
|
-
bundledPackages: Schema.optionalKey(Schema.Array(Schema.String)),
|
|
58
|
+
bundledPackages: Schema.optionalKey(Schema.Array(Schema.String).annotate({ description: "Packages whose declarations are inlined into this partition's .d.ts. A workspace sibling must be built first." })),
|
|
44
59
|
/** Packages externalized in this partition's declaration pass only. */
|
|
45
|
-
dtsExternals: Schema.optionalKey(Schema.Array(Schema.String)),
|
|
60
|
+
dtsExternals: Schema.optionalKey(Schema.Array(Schema.String).annotate({ description: "Packages externalized in this partition's declaration pass only." })),
|
|
46
61
|
/** The JS pass's platform for this partition, `"node"` when absent. Use `"browser"` for a browser runtime. */
|
|
47
62
|
platform: Schema.optionalKey(BuildPlatform),
|
|
48
63
|
/** CSS handling forwarded to tsdown's `css` option on the JS pass; tsdown owns the shape. */
|
|
49
|
-
css: Schema.optionalKey(Schema.Unknown),
|
|
64
|
+
css: Schema.optionalKey(Schema.Unknown).annotateKey({ description: "CSS handling forwarded to tsdown's css option on the JS pass. tsdown owns the shape." }),
|
|
50
65
|
/**
|
|
51
66
|
* Builds this partition into a `pkg/<outSubdir>/` subdirectory as an isolated sub-package.
|
|
52
67
|
*
|
|
@@ -54,55 +69,85 @@ var EntryOverride = class extends Schema.Class("EntryOverride")({
|
|
|
54
69
|
* The export's built path becomes `./<outSubdir>/index.{js,d.ts}`. Exactly one export path may be pinned
|
|
55
70
|
* per `outSubdir` override.
|
|
56
71
|
*/
|
|
57
|
-
outSubdir: Schema.optionalKey(Schema.String
|
|
58
|
-
|
|
72
|
+
outSubdir: Schema.optionalKey(Schema.String.annotate({
|
|
73
|
+
description: "Builds this partition as an isolated sub-package in pkg/<outSubdir>/, so the export's built path becomes ./<outSubdir>/index.js. Pin exactly one export path.",
|
|
74
|
+
examples: ["browser"]
|
|
75
|
+
}))
|
|
76
|
+
}).annotate({
|
|
77
|
+
title: "Entry override",
|
|
78
|
+
description: "Format and bundling settings pinned to some export paths, layered onto the base build. Every setting but entries is absent unless written, and absent means the base build's value."
|
|
79
|
+
})) {};
|
|
59
80
|
/**
|
|
60
81
|
* One standalone output file's source and format.
|
|
61
82
|
*
|
|
62
83
|
* @public
|
|
63
84
|
*/
|
|
64
|
-
var LooseFileSpec = class extends Schema.Class("LooseFileSpec")({
|
|
85
|
+
var LooseFileSpec = class extends Schema.Class("LooseFileSpec")(Schema.Struct({
|
|
65
86
|
/** Source module to bundle into the file. */
|
|
66
|
-
source: Schema.String
|
|
87
|
+
source: Schema.String.annotate({
|
|
88
|
+
description: "The source module bundled into the file.",
|
|
89
|
+
examples: ["src/hook.ts"]
|
|
90
|
+
}),
|
|
67
91
|
/** Module format. Required only for an ambiguous `.js` key; inferred from `.mjs` and `.cjs`. */
|
|
68
92
|
format: Schema.optionalKey(BuildFormat)
|
|
69
|
-
})
|
|
93
|
+
}).annotate({
|
|
94
|
+
title: "Loose file",
|
|
95
|
+
description: "One standalone output file's source and format. The format is inferred from an .mjs or .cjs key and required only for a .js key."
|
|
96
|
+
})) {};
|
|
70
97
|
/**
|
|
71
98
|
* One non-module asset to copy into each publish group's `pkg/` directory, in the shape of tsdown's `copy` option.
|
|
72
99
|
*
|
|
73
100
|
* @public
|
|
74
101
|
*/
|
|
75
|
-
var CopyEntry = class extends Schema.Class("CopyEntry")({
|
|
102
|
+
var CopyEntry = class extends Schema.Class("CopyEntry")(Schema.Struct({
|
|
76
103
|
/**
|
|
77
104
|
* Source paths or globs, relative to the package directory. A directory is copied whole and keeps its own basename
|
|
78
105
|
* under `to`, so `{ from: "../../schemas", to: "schemas" }` emits `pkg/schemas/schemas/...`; use the bare string
|
|
79
106
|
* `"../../schemas"` to ship `schemas/` at the package root.
|
|
80
107
|
*/
|
|
81
|
-
from: Schema.Union([Schema.String, Schema.Array(Schema.String)])
|
|
108
|
+
from: Schema.Union([Schema.String, Schema.Array(Schema.String)]).annotate({
|
|
109
|
+
description: "Source paths or globs, relative to the package. A directory keeps its own basename under to, so from = \"../../schemas\" with to = \"schemas\" emits pkg/schemas/schemas/.",
|
|
110
|
+
examples: ["assets/**/*.json", ["LICENSE", "NOTICE"]]
|
|
111
|
+
}),
|
|
82
112
|
/** The destination directory, relative to the group's `pkg/` root, which is the default. It may not leave `pkg/`. */
|
|
83
|
-
to: Schema.optionalKey(Schema.String),
|
|
113
|
+
to: Schema.optionalKey(Schema.String.annotate({ description: "The destination directory, relative to the group's pkg/ root, which is the default. It may not leave pkg/." })),
|
|
84
114
|
/** Whether to drop each source's directory structure. tsdown defaults this to `true`. */
|
|
85
|
-
flatten: Schema.optionalKey(Schema.Boolean)
|
|
86
|
-
})
|
|
115
|
+
flatten: Schema.optionalKey(Schema.Boolean.annotate({ description: "Whether to drop each source's directory structure. tsdown defaults this to true." }))
|
|
116
|
+
}).annotate({
|
|
117
|
+
title: "Copy entry",
|
|
118
|
+
description: "A non-module asset copied into each group's pkg/ directory, in the shape of tsdown's copy option."
|
|
119
|
+
})) {};
|
|
87
120
|
/**
|
|
88
121
|
* JSX transform settings.
|
|
89
122
|
*
|
|
90
123
|
* @public
|
|
91
124
|
*/
|
|
92
|
-
var JsxConfig = class extends Schema.Class("JsxConfig")({
|
|
125
|
+
var JsxConfig = class extends Schema.Class("JsxConfig")(Schema.Struct({
|
|
93
126
|
/** `"automatic"` auto-imports the JSX factories; `"classic"` compiles to `React.createElement`. */
|
|
94
|
-
runtime: Schema.optionalKey(Schema.Literals(["automatic", "classic"])
|
|
127
|
+
runtime: Schema.optionalKey(Schema.Literals(["automatic", "classic"]).annotate({
|
|
128
|
+
description: "The JSX runtime.",
|
|
129
|
+
"x-taplo": { docs: { enumValues: ["Auto-imports the JSX factories from importSource.", "Compiles JSX to React.createElement."] } }
|
|
130
|
+
})),
|
|
95
131
|
/** The JSX import source for the automatic runtime, e.g. `"react"` or `"preact"`. */
|
|
96
|
-
importSource: Schema.optionalKey(Schema.String
|
|
97
|
-
|
|
132
|
+
importSource: Schema.optionalKey(Schema.String.annotate({
|
|
133
|
+
description: "The JSX import source for the automatic runtime.",
|
|
134
|
+
examples: ["react", "preact"]
|
|
135
|
+
}))
|
|
136
|
+
}).annotate({
|
|
137
|
+
title: "JSX",
|
|
138
|
+
description: "JSX transform settings. Inferred from the package's tsconfig when absent."
|
|
139
|
+
})) {};
|
|
98
140
|
/**
|
|
99
141
|
* What the build changes in the emitted `package.json`.
|
|
100
142
|
*
|
|
101
143
|
* @public
|
|
102
144
|
*/
|
|
103
|
-
var ManifestConfig = class extends Schema.Class("ManifestConfig")({
|
|
145
|
+
var ManifestConfig = class extends Schema.Class("ManifestConfig")(Schema.Struct({
|
|
104
146
|
/** Top-level manifest keys to drop from the emitted `package.json`, beyond the ones always stripped. */
|
|
105
|
-
drop: Schema.Array(Schema.String).
|
|
147
|
+
drop: Schema.Array(Schema.String).annotate({
|
|
148
|
+
description: "Top-level keys dropped from the emitted package.json, beyond the ones always stripped.",
|
|
149
|
+
default: []
|
|
150
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
|
|
106
151
|
/**
|
|
107
152
|
* Top-level string keys written over the emitted `package.json`, after `drop`.
|
|
108
153
|
*
|
|
@@ -112,8 +157,15 @@ var ManifestConfig = class extends Schema.Class("ManifestConfig")({
|
|
|
112
157
|
* release owns, such as `version`, `private`, `exports` and the dependency maps, fail validation, as does a key also
|
|
113
158
|
* listed in `drop`.
|
|
114
159
|
*/
|
|
115
|
-
set: Schema.Record(Schema.String, Schema.String).
|
|
116
|
-
|
|
160
|
+
set: Schema.Record(Schema.String, Schema.String).annotate({
|
|
161
|
+
description: "Top-level string keys written over the emitted package.json, after drop. name renames the package everywhere the build names it. Keys the build or the release owns, such as version, exports and the dependency maps, fail validation.",
|
|
162
|
+
default: {},
|
|
163
|
+
examples: [{ name: "@scope/published-name" }]
|
|
164
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed({})))
|
|
165
|
+
}).annotate({
|
|
166
|
+
title: "Manifest",
|
|
167
|
+
description: "What the build changes in the emitted package.json."
|
|
168
|
+
})) {};
|
|
117
169
|
/**
|
|
118
170
|
* An API Extractor message-suppression rule.
|
|
119
171
|
*
|
|
@@ -123,35 +175,54 @@ var ManifestConfig = class extends Schema.Class("ManifestConfig")({
|
|
|
123
175
|
*
|
|
124
176
|
* @public
|
|
125
177
|
*/
|
|
126
|
-
var WarningSuppressionRule = class extends Schema.Class("WarningSuppressionRule")({
|
|
178
|
+
var WarningSuppressionRule = class extends Schema.Class("WarningSuppressionRule")(Schema.Struct({
|
|
127
179
|
/** The exact API Extractor message id. */
|
|
128
|
-
messageId: Schema.optionalKey(Schema.String
|
|
180
|
+
messageId: Schema.optionalKey(Schema.String.annotate({
|
|
181
|
+
description: "The exact API Extractor message id.",
|
|
182
|
+
examples: ["ae-forgotten-export"]
|
|
183
|
+
})),
|
|
129
184
|
/** A regex or substring matched against the message text. */
|
|
130
|
-
pattern: Schema.optionalKey(Schema.String)
|
|
131
|
-
})
|
|
185
|
+
pattern: Schema.optionalKey(Schema.String.annotate({ description: "A regex or substring matched against the message text." }))
|
|
186
|
+
}).annotate({
|
|
187
|
+
title: "Warning suppression",
|
|
188
|
+
description: "An API Extractor message-suppression rule. A rule with both messageId and pattern needs both to match; a rule with neither matches nothing."
|
|
189
|
+
})) {};
|
|
132
190
|
/**
|
|
133
191
|
* A single TSDoc tag definition, as API Extractor's TSDoc config takes it.
|
|
134
192
|
*
|
|
135
193
|
* @public
|
|
136
194
|
*/
|
|
137
|
-
var TsdocTagDefinition = class extends Schema.Class("TsdocTagDefinition")({
|
|
195
|
+
var TsdocTagDefinition = class extends Schema.Class("TsdocTagDefinition")(Schema.Struct({
|
|
138
196
|
/** The tag's name, with its leading `@`. */
|
|
139
|
-
tagName: Schema.String
|
|
197
|
+
tagName: Schema.String.annotate({
|
|
198
|
+
description: "The tag's name, with its leading @.",
|
|
199
|
+
examples: ["@since"]
|
|
200
|
+
}),
|
|
140
201
|
/** The tag's syntax. */
|
|
141
202
|
syntaxKind: Schema.Literals([
|
|
142
203
|
"block",
|
|
143
204
|
"inline",
|
|
144
205
|
"modifier"
|
|
145
|
-
])
|
|
206
|
+
]).annotate({
|
|
207
|
+
description: "The tag's syntax.",
|
|
208
|
+
"x-taplo": { docs: { enumValues: [
|
|
209
|
+
"A block tag, which owns the text after it.",
|
|
210
|
+
"An inline tag, written inside braces.",
|
|
211
|
+
"A modifier tag, which carries no content."
|
|
212
|
+
] } }
|
|
213
|
+
}),
|
|
146
214
|
/** Whether a declaration may carry the tag more than once. */
|
|
147
|
-
allowMultiple: Schema.optionalKey(Schema.Boolean)
|
|
148
|
-
})
|
|
215
|
+
allowMultiple: Schema.optionalKey(Schema.Boolean.annotate({ description: "Whether a declaration may carry the tag more than once." }))
|
|
216
|
+
}).annotate({
|
|
217
|
+
title: "TSDoc tag",
|
|
218
|
+
description: "A custom TSDoc tag definition, as API Extractor's TSDoc config takes it."
|
|
219
|
+
})) {};
|
|
149
220
|
/**
|
|
150
221
|
* TSDoc and documentation-warning settings.
|
|
151
222
|
*
|
|
152
223
|
* @public
|
|
153
224
|
*/
|
|
154
|
-
var TsdocConfig = class extends Schema.Class("TsdocConfig")({
|
|
225
|
+
var TsdocConfig = class extends Schema.Class("TsdocConfig")(Schema.Struct({
|
|
155
226
|
/**
|
|
156
227
|
* API Extractor messages to suppress.
|
|
157
228
|
*
|
|
@@ -159,19 +230,31 @@ var TsdocConfig = class extends Schema.Class("TsdocConfig")({
|
|
|
159
230
|
* Defaults to the `_base` forgotten-export every `Schema.Class` synthesizes. A list replaces the default
|
|
160
231
|
* rather than adding to it, so an empty list suppresses nothing.
|
|
161
232
|
*/
|
|
162
|
-
suppressWarnings: Schema.Array(WarningSuppressionRule).
|
|
233
|
+
suppressWarnings: Schema.Array(WarningSuppressionRule).annotate({
|
|
234
|
+
description: "API Extractor messages to suppress. Defaults to the _base forgotten-export every Schema.Class synthesizes. A list replaces the default, so an empty list suppresses nothing.",
|
|
235
|
+
default: [{
|
|
236
|
+
messageId: "ae-forgotten-export",
|
|
237
|
+
pattern: "_base"
|
|
238
|
+
}]
|
|
239
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed([{
|
|
163
240
|
messageId: "ae-forgotten-export",
|
|
164
241
|
pattern: "_base"
|
|
165
242
|
}]))),
|
|
166
243
|
/** Custom TSDoc tags to register. */
|
|
167
|
-
tagDefinitions: Schema.Array(TsdocTagDefinition).
|
|
168
|
-
|
|
244
|
+
tagDefinitions: Schema.Array(TsdocTagDefinition).annotate({
|
|
245
|
+
description: "Custom TSDoc tags to register.",
|
|
246
|
+
default: []
|
|
247
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed([])))
|
|
248
|
+
}).annotate({
|
|
249
|
+
title: "TSDoc",
|
|
250
|
+
description: "TSDoc and documentation-warning settings for the API model."
|
|
251
|
+
})) {};
|
|
169
252
|
/**
|
|
170
253
|
* API model generation settings, the `[package.build.meta]` table.
|
|
171
254
|
*
|
|
172
255
|
* @public
|
|
173
256
|
*/
|
|
174
|
-
var MetaConfig = class extends Schema.Class("MetaConfig")({
|
|
257
|
+
var MetaConfig = class extends Schema.Class("MetaConfig")(Schema.Struct({
|
|
175
258
|
/**
|
|
176
259
|
* Directories, relative to the package directory, that the canonical group's API model is copied into.
|
|
177
260
|
*
|
|
@@ -179,7 +262,10 @@ var MetaConfig = class extends Schema.Class("MetaConfig")({
|
|
|
179
262
|
* For a docs site reading the model from its own tree. Each one receives the `.api.json`, the meta `package.json`
|
|
180
263
|
* and `tsconfig.json`, and `bundle.json` when one was emitted.
|
|
181
264
|
*/
|
|
182
|
-
localPaths: Schema.Array(Schema.String).
|
|
265
|
+
localPaths: Schema.Array(Schema.String).annotate({
|
|
266
|
+
description: "Directories, relative to the package, that the canonical group's API model is copied into, for a docs site that reads the model from its own tree.",
|
|
267
|
+
default: []
|
|
268
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
|
|
183
269
|
/**
|
|
184
270
|
* Forward-looks the meta bundle's own version and its workspace siblings' dependency versions to their
|
|
185
271
|
* next release versions from pending changesets.
|
|
@@ -187,55 +273,86 @@ var MetaConfig = class extends Schema.Class("MetaConfig")({
|
|
|
187
273
|
* @remarks
|
|
188
274
|
* `"auto"` is `false` under CI and `true` locally, so a local bundle matches the CI release build.
|
|
189
275
|
*/
|
|
190
|
-
optimistic: Schema.Union([Schema.Literal("auto"), Schema.Boolean]).
|
|
276
|
+
optimistic: Schema.Union([Schema.Literal("auto"), Schema.Boolean]).annotate({
|
|
277
|
+
description: "Forward-looks the meta bundle's versions to their next release versions from pending changesets. \"auto\" is false under CI and true locally.",
|
|
278
|
+
default: "auto"
|
|
279
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed("auto"))),
|
|
191
280
|
/** TSDoc and documentation-warning settings. */
|
|
192
281
|
tsdoc: TsdocConfig.pipe(Schema.withDecodingDefaultKey(Effect.succeed({})))
|
|
193
|
-
})
|
|
282
|
+
}).annotate({
|
|
283
|
+
title: "API model",
|
|
284
|
+
description: "API model generation settings, the [package.build.meta] table."
|
|
285
|
+
})) {};
|
|
194
286
|
/**
|
|
195
287
|
* A single-executable (SEA) target platform and architecture.
|
|
196
288
|
*
|
|
197
289
|
* @public
|
|
198
290
|
*/
|
|
199
|
-
var ExeTargetConfig = class extends Schema.Class("ExeTargetConfig")({
|
|
291
|
+
var ExeTargetConfig = class extends Schema.Class("ExeTargetConfig")(Schema.Struct({
|
|
200
292
|
/** The platform, using tsdown's `win` token rather than `win32`. */
|
|
201
293
|
platform: Schema.Literals([
|
|
202
294
|
"darwin",
|
|
203
295
|
"linux",
|
|
204
296
|
"win"
|
|
205
|
-
])
|
|
297
|
+
]).annotate({
|
|
298
|
+
description: "The platform, using tsdown's win token rather than win32.",
|
|
299
|
+
"x-taplo": { docs: { enumValues: [
|
|
300
|
+
"macOS.",
|
|
301
|
+
"Linux.",
|
|
302
|
+
"Windows."
|
|
303
|
+
] } }
|
|
304
|
+
}),
|
|
206
305
|
/** The CPU architecture. */
|
|
207
|
-
arch: Schema.Literals(["arm64", "x64"])
|
|
208
|
-
|
|
306
|
+
arch: Schema.Literals(["arm64", "x64"]).annotate({
|
|
307
|
+
description: "The CPU architecture.",
|
|
308
|
+
"x-taplo": { docs: { enumValues: ["64-bit ARM.", "64-bit x86."] } }
|
|
309
|
+
})
|
|
310
|
+
}).annotate({
|
|
311
|
+
title: "Executable target",
|
|
312
|
+
description: "A single-executable target platform and architecture."
|
|
313
|
+
})) {};
|
|
209
314
|
/**
|
|
210
315
|
* Single-executable `seaConfig` overrides, merged over the defaults.
|
|
211
316
|
*
|
|
212
317
|
* @public
|
|
213
318
|
*/
|
|
214
|
-
var ExeSeaConfig = class extends Schema.Class("ExeSeaConfig")({
|
|
319
|
+
var ExeSeaConfig = class extends Schema.Class("ExeSeaConfig")(Schema.Struct({
|
|
215
320
|
/** Whether to silence Node's experimental SEA warning. */
|
|
216
|
-
disableExperimentalSEAWarning: Schema.optionalKey(Schema.Boolean),
|
|
321
|
+
disableExperimentalSEAWarning: Schema.optionalKey(Schema.Boolean.annotate({ description: "Whether to silence Node's experimental SEA warning." })),
|
|
217
322
|
/** Whether to embed V8's code cache. */
|
|
218
|
-
useCodeCache: Schema.optionalKey(Schema.Boolean),
|
|
323
|
+
useCodeCache: Schema.optionalKey(Schema.Boolean.annotate({ description: "Whether to embed V8's code cache." })),
|
|
219
324
|
/** Whether to embed a V8 startup snapshot. */
|
|
220
|
-
useSnapshot: Schema.optionalKey(Schema.Boolean)
|
|
221
|
-
})
|
|
325
|
+
useSnapshot: Schema.optionalKey(Schema.Boolean.annotate({ description: "Whether to embed a V8 startup snapshot." }))
|
|
326
|
+
}).annotate({
|
|
327
|
+
title: "SEA config",
|
|
328
|
+
description: "Single-executable seaConfig overrides, merged over the defaults."
|
|
329
|
+
})) {};
|
|
222
330
|
/**
|
|
223
331
|
* One single-executable (SEA) binary to compile.
|
|
224
332
|
*
|
|
225
333
|
* @public
|
|
226
334
|
*/
|
|
227
|
-
var ExeConfig = class extends Schema.Class("ExeConfig")({
|
|
335
|
+
var ExeConfig = class extends Schema.Class("ExeConfig")(Schema.Struct({
|
|
228
336
|
/** Output binary basename, with no extension or suffix. */
|
|
229
|
-
fileName: Schema.String
|
|
337
|
+
fileName: Schema.String.annotate({
|
|
338
|
+
description: "The output binary's basename, with no extension or suffix.",
|
|
339
|
+
examples: ["effected"]
|
|
340
|
+
}),
|
|
230
341
|
/** The bin entry; `./src/bin.ts` when absent. */
|
|
231
|
-
entry: Schema.optionalKey(Schema.String
|
|
342
|
+
entry: Schema.optionalKey(Schema.String.annotate({
|
|
343
|
+
description: "The bin entry. ./src/bin.ts when absent.",
|
|
344
|
+
examples: ["./src/bin.ts"]
|
|
345
|
+
})),
|
|
232
346
|
/** The Node runtime to embed. */
|
|
233
|
-
nodeVersion: Schema.optionalKey(Schema.String),
|
|
347
|
+
nodeVersion: Schema.optionalKey(Schema.String.annotate({ description: "The Node runtime version to embed." })),
|
|
234
348
|
/** `seaConfig` overrides merged over the defaults. */
|
|
235
349
|
seaConfig: Schema.optionalKey(ExeSeaConfig),
|
|
236
350
|
/** Explicit targets; inferred from the package's `os` and `cpu` when absent. */
|
|
237
|
-
targets: Schema.optionalKey(Schema.Array(ExeTargetConfig))
|
|
238
|
-
})
|
|
351
|
+
targets: Schema.optionalKey(Schema.Array(ExeTargetConfig).annotate({ description: "Explicit targets. Inferred from the package's os and cpu fields when absent." }))
|
|
352
|
+
}).annotate({
|
|
353
|
+
title: "Executable",
|
|
354
|
+
description: "One single-executable (SEA) binary to compile."
|
|
355
|
+
})) {};
|
|
239
356
|
/**
|
|
240
357
|
* The build settings of one package, the `[package.build]` table.
|
|
241
358
|
*
|
|
@@ -244,11 +361,18 @@ var ExeConfig = class extends Schema.Class("ExeConfig")({
|
|
|
244
361
|
*
|
|
245
362
|
* @public
|
|
246
363
|
*/
|
|
247
|
-
var PackageBuildConfig = class extends Schema.Class("PackageBuildConfig")({
|
|
364
|
+
var PackageBuildConfig = class extends Schema.Class("PackageBuildConfig")(Schema.Struct({
|
|
248
365
|
/** Output module formats. ESM-only by default; add `"cjs"` for a dual-format build. */
|
|
249
|
-
format: Schema.Array(BuildFormat).
|
|
366
|
+
format: Schema.Array(BuildFormat).annotate({
|
|
367
|
+
description: "Output module formats. ESM-only by default; add \"cjs\" for a dual-format build.",
|
|
368
|
+
default: ["esm"],
|
|
369
|
+
examples: [["esm", "cjs"]]
|
|
370
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed(["esm"]))),
|
|
250
371
|
/** Packages kept external. */
|
|
251
|
-
externals: Schema.Array(Schema.String).
|
|
372
|
+
externals: Schema.Array(Schema.String).annotate({
|
|
373
|
+
description: "Packages kept external.",
|
|
374
|
+
default: []
|
|
375
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
|
|
252
376
|
/**
|
|
253
377
|
* Packages force-bundled into the JS output, even ones declared in `package.json` that would otherwise be
|
|
254
378
|
* external.
|
|
@@ -257,7 +381,10 @@ var PackageBuildConfig = class extends Schema.Class("PackageBuildConfig")({
|
|
|
257
381
|
* The inverse of `externals`. Declarations are not inlined by this; use `bundledPackages` to roll a
|
|
258
382
|
* package's types into the emitted `.d.ts` too.
|
|
259
383
|
*/
|
|
260
|
-
bundle: Schema.Array(Schema.String).
|
|
384
|
+
bundle: Schema.Array(Schema.String).annotate({
|
|
385
|
+
description: "Packages force-bundled into the JS output, even ones package.json declares. Declarations are not inlined; use bundledPackages for that.",
|
|
386
|
+
default: []
|
|
387
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
|
|
261
388
|
/**
|
|
262
389
|
* External packages whose declarations are inlined into the bundled `.d.ts`; all others stay external.
|
|
263
390
|
*
|
|
@@ -265,7 +392,10 @@ var PackageBuildConfig = class extends Schema.Class("PackageBuildConfig")({
|
|
|
265
392
|
* A workspace sibling inlines from its built declarations, so it has to be built first; the build fails naming it
|
|
266
393
|
* when they are absent.
|
|
267
394
|
*/
|
|
268
|
-
bundledPackages: Schema.Array(Schema.String).
|
|
395
|
+
bundledPackages: Schema.Array(Schema.String).annotate({
|
|
396
|
+
description: "External packages whose declarations are inlined into the bundled .d.ts. A workspace sibling inlines from its built declarations, so build it first.",
|
|
397
|
+
default: []
|
|
398
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
|
|
269
399
|
/**
|
|
270
400
|
* Packages externalized in the declaration pass only: imported from the emitted `.d.ts` rather than
|
|
271
401
|
* inlined, while the JS pass still bundles them per `bundleNodeModules`.
|
|
@@ -274,19 +404,28 @@ var PackageBuildConfig = class extends Schema.Class("PackageBuildConfig")({
|
|
|
274
404
|
* For a dependency whose types cannot be safely inlined, such as `effect`'s cross-module `declare module`
|
|
275
405
|
* augmentations. Declare these as package dependencies so consumers can resolve the emitted imports.
|
|
276
406
|
*/
|
|
277
|
-
dtsExternals: Schema.Array(Schema.String).
|
|
407
|
+
dtsExternals: Schema.Array(Schema.String).annotate({
|
|
408
|
+
description: "Packages externalized in the declaration pass only. Declare them as dependencies so consumers can resolve the emitted imports.",
|
|
409
|
+
default: []
|
|
410
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
|
|
278
411
|
/**
|
|
279
412
|
* Bundles `node_modules` and workspace dependencies that are not externalized into the JS output and the
|
|
280
413
|
* bundled declarations alike.
|
|
281
414
|
*/
|
|
282
|
-
bundleNodeModules: Schema.Boolean.
|
|
415
|
+
bundleNodeModules: Schema.Boolean.annotate({
|
|
416
|
+
description: "Bundles node_modules and workspace dependencies that are not external into the JS output and the declarations alike.",
|
|
417
|
+
default: false
|
|
418
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed(false))),
|
|
283
419
|
/**
|
|
284
420
|
* Minifies the output.
|
|
285
421
|
*
|
|
286
422
|
* @remarks
|
|
287
423
|
* Off by default: minified Node libraries trip security scanners and degrade stack traces.
|
|
288
424
|
*/
|
|
289
|
-
minify: Schema.Boolean.
|
|
425
|
+
minify: Schema.Boolean.annotate({
|
|
426
|
+
description: "Minifies the output. Off by default: minified Node libraries trip security scanners.",
|
|
427
|
+
default: false
|
|
428
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed(false))),
|
|
290
429
|
/**
|
|
291
430
|
* Runs the bundled `.d.ts` pass and, with it, the meta pass that reads those declarations.
|
|
292
431
|
*
|
|
@@ -294,18 +433,31 @@ var PackageBuildConfig = class extends Schema.Class("PackageBuildConfig")({
|
|
|
294
433
|
* `false` is for JS-only artifacts that never consume declarations. It differs from `meta = false`, which
|
|
295
434
|
* disables only the API model and still runs the declaration pass.
|
|
296
435
|
*/
|
|
297
|
-
emitDts: Schema.Boolean.
|
|
436
|
+
emitDts: Schema.Boolean.annotate({
|
|
437
|
+
description: "Runs the declaration pass and, with it, the meta pass. false is for JS-only artifacts; meta = false disables only the API model.",
|
|
438
|
+
default: true
|
|
439
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed(true))),
|
|
298
440
|
/**
|
|
299
441
|
* Compile-time global replacements forwarded to the build's `define`.
|
|
300
442
|
*
|
|
301
443
|
* @remarks
|
|
302
444
|
* Values are inserted verbatim, so a string literal must carry its own quotes.
|
|
303
445
|
*/
|
|
304
|
-
define: Schema.Record(Schema.String, Schema.String).
|
|
446
|
+
define: Schema.Record(Schema.String, Schema.String).annotate({
|
|
447
|
+
description: "Compile-time replacements forwarded to the build's define. Values are inserted verbatim, so a string literal carries its own quotes.",
|
|
448
|
+
default: {},
|
|
449
|
+
examples: [{ "process.env.FEATURE": "\"on\"" }]
|
|
450
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed({}))),
|
|
305
451
|
/** Modules whose default export is a rolldown plugin or a factory of one, as package-relative paths. */
|
|
306
|
-
plugins: Schema.Array(Schema.String).
|
|
452
|
+
plugins: Schema.Array(Schema.String).annotate({
|
|
453
|
+
description: "Package-relative modules whose default export is a rolldown plugin or a factory of one.",
|
|
454
|
+
default: []
|
|
455
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
|
|
307
456
|
/** Per-entry format and bundling overrides, layered onto the base build. */
|
|
308
|
-
overrides: Schema.Array(EntryOverride).
|
|
457
|
+
overrides: Schema.Array(EntryOverride).annotate({
|
|
458
|
+
description: "Format and bundling settings pinned to some export paths, layered onto the base build.",
|
|
459
|
+
default: []
|
|
460
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
|
|
309
461
|
/**
|
|
310
462
|
* Standalone bundled output files emitted at literal paths, outside the exports, declaration and meta graph.
|
|
311
463
|
*
|
|
@@ -313,7 +465,11 @@ var PackageBuildConfig = class extends Schema.Class("PackageBuildConfig")({
|
|
|
313
465
|
* Keys are literal output filenames; values are a source path or a {@link LooseFileSpec}. Pair with
|
|
314
466
|
* `bundleNodeModules` to make each file self-contained.
|
|
315
467
|
*/
|
|
316
|
-
looseFiles: Schema.Record(Schema.String, Schema.Union([Schema.String, LooseFileSpec])
|
|
468
|
+
looseFiles: Schema.Record(Schema.String, Schema.Union([Schema.String, LooseFileSpec]).annotate({ description: "A source path, or a table naming the source and its format." })).annotate({
|
|
469
|
+
description: "Standalone files at literal output paths, outside the exports, declaration and meta graph. Each key is an output filename.",
|
|
470
|
+
default: {},
|
|
471
|
+
examples: [{ "hook.mjs": "src/hook.ts" }]
|
|
472
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed({}))),
|
|
317
473
|
/**
|
|
318
474
|
* Non-module assets copied into each group's `pkg/` directory by the JS pass.
|
|
319
475
|
*
|
|
@@ -324,16 +480,23 @@ var PackageBuildConfig = class extends Schema.Class("PackageBuildConfig")({
|
|
|
324
480
|
* config; this is the explicit way, for files that live elsewhere. A package that compiles only a binary runs no JS
|
|
325
481
|
* pass, so setting this there fails validation.
|
|
326
482
|
*/
|
|
327
|
-
copy: Schema.Array(Schema.Union([Schema.String, CopyEntry])
|
|
483
|
+
copy: Schema.Array(Schema.Union([Schema.String, CopyEntry]).annotate({ description: "A path or glob copied into the pkg/ root, or a table with a destination." })).annotate({
|
|
484
|
+
description: "Non-module assets copied into each group's pkg/ directory. A directory keeps its basename. public/ is copied with no config.",
|
|
485
|
+
default: [],
|
|
486
|
+
examples: [["../../schemas"]]
|
|
487
|
+
}).pipe(Schema.withDecodingDefaultKey(Effect.succeed([]))),
|
|
328
488
|
/** JSX transform settings; inferred from the package's tsconfig when absent. */
|
|
329
489
|
jsx: Schema.optionalKey(JsxConfig),
|
|
330
490
|
/** What the build changes in the emitted `package.json`. */
|
|
331
491
|
manifest: ManifestConfig.pipe(Schema.withDecodingDefaultKey(Effect.succeed({}))),
|
|
332
492
|
/** API model generation: its settings, or `false` to opt out. Generated with defaults when absent. */
|
|
333
|
-
meta: Schema.Union([Schema.Literal(false), MetaConfig]).pipe(Schema.withDecodingDefaultKey(Effect.succeed({}))),
|
|
493
|
+
meta: Schema.Union([Schema.Literal(false), MetaConfig]).annotate({ description: "The API model's settings, or false to opt out and still run the declaration pass. Generated with defaults when absent." }).pipe(Schema.withDecodingDefaultKey(Effect.succeed({}))),
|
|
334
494
|
/** Single-executable binaries to compile: one, or a list. */
|
|
335
|
-
exe: Schema.optionalKey(Schema.Union([ExeConfig, Schema.Array(ExeConfig)]))
|
|
336
|
-
})
|
|
495
|
+
exe: Schema.optionalKey(Schema.Union([ExeConfig, Schema.Array(ExeConfig)]).annotate({ description: "Single-executable binaries to compile: one table, or a list of them." }))
|
|
496
|
+
}).annotate({
|
|
497
|
+
title: "Package build",
|
|
498
|
+
description: "The build settings of one package, the [package.build] table. Every key has a default or is absent, so an empty table is a complete config."
|
|
499
|
+
})) {};
|
|
337
500
|
/**
|
|
338
501
|
* One Open Graph image a package's API docs declare.
|
|
339
502
|
*
|
|
@@ -344,43 +507,75 @@ var PackageBuildConfig = class extends Schema.Class("PackageBuildConfig")({
|
|
|
344
507
|
*/
|
|
345
508
|
var BundleOpenGraphImage = class extends Schema.Class("BundleOpenGraphImage")(Schema.Struct({
|
|
346
509
|
/** Bundle-relative asset path. Mutually exclusive with `url`. */
|
|
347
|
-
path: Schema.optionalKey(Schema.String),
|
|
510
|
+
path: Schema.optionalKey(Schema.String.annotate({ description: "A bundle-relative asset path. Mutually exclusive with url." })),
|
|
348
511
|
/** Absolute external URL, used verbatim. Mutually exclusive with `path`. */
|
|
349
|
-
url: Schema.optionalKey(Schema.String),
|
|
512
|
+
url: Schema.optionalKey(Schema.String.annotate({ description: "An absolute external URL, used verbatim. Mutually exclusive with path." })),
|
|
350
513
|
/** MIME type; inferred from the extension when absent. */
|
|
351
|
-
type: Schema.optionalKey(Schema.String
|
|
514
|
+
type: Schema.optionalKey(Schema.String.annotate({
|
|
515
|
+
description: "The MIME type. Inferred from the extension when absent.",
|
|
516
|
+
examples: ["image/png"]
|
|
517
|
+
})),
|
|
352
518
|
/** Pixel width. */
|
|
353
|
-
width: Schema.optionalKey(Schema.Int),
|
|
519
|
+
width: Schema.optionalKey(Schema.Int.annotate({ description: "The width in pixels." })),
|
|
354
520
|
/** Pixel height. */
|
|
355
|
-
height: Schema.optionalKey(Schema.Int),
|
|
521
|
+
height: Schema.optionalKey(Schema.Int.annotate({ description: "The height in pixels." })),
|
|
356
522
|
/** Alt text; inferred when absent. */
|
|
357
|
-
alt: Schema.optionalKey(Schema.String)
|
|
358
|
-
}).
|
|
523
|
+
alt: Schema.optionalKey(Schema.String.annotate({ description: "The alt text. Inferred when absent." }))
|
|
524
|
+
}).annotate({
|
|
525
|
+
title: "Open Graph image",
|
|
526
|
+
description: "One Open Graph image the API docs declare. Exactly one of path and url must be present."
|
|
527
|
+
}).check(Schema.makeFilter((image) => image.path === void 0 !== (image.url === void 0) ? void 0 : "exactly one of \"path\" or \"url\" must be present", {
|
|
528
|
+
title: "openGraph image source",
|
|
529
|
+
toJsonSchema: () => ({ oneOf: [{
|
|
530
|
+
title: "By path",
|
|
531
|
+
properties: { path: { description: "The image is a bundle-relative asset." } },
|
|
532
|
+
required: ["path"]
|
|
533
|
+
}, {
|
|
534
|
+
title: "By url",
|
|
535
|
+
properties: { url: { description: "The image is an absolute external URL." } },
|
|
536
|
+
required: ["url"]
|
|
537
|
+
}] })
|
|
538
|
+
}))) {};
|
|
359
539
|
/**
|
|
360
540
|
* One registry a documented package is published to.
|
|
361
541
|
*
|
|
362
542
|
* @public
|
|
363
543
|
*/
|
|
364
|
-
var BundleRegistryRef = class extends Schema.Class("BundleRegistryRef")({
|
|
544
|
+
var BundleRegistryRef = class extends Schema.Class("BundleRegistryRef")(Schema.Struct({
|
|
365
545
|
/** The protocol family, e.g. `"npm"` or `"jsr"`. Unknown values are accepted. */
|
|
366
|
-
type: Schema.String
|
|
546
|
+
type: Schema.String.annotate({
|
|
547
|
+
description: "The protocol family. Unknown values are accepted.",
|
|
548
|
+
examples: ["npm", "jsr"]
|
|
549
|
+
}),
|
|
367
550
|
/** The human instance label, e.g. `"npm"`. */
|
|
368
|
-
name: Schema.String
|
|
551
|
+
name: Schema.String.annotate({
|
|
552
|
+
description: "The registry instance's human label.",
|
|
553
|
+
examples: ["npm"]
|
|
554
|
+
}),
|
|
369
555
|
/** The package's URL on that registry instance. */
|
|
370
|
-
url: Schema.String
|
|
371
|
-
})
|
|
556
|
+
url: Schema.String.annotate({ description: "The package's URL on that registry instance." })
|
|
557
|
+
}).annotate({
|
|
558
|
+
title: "Registry",
|
|
559
|
+
description: "One registry the documented package is published to."
|
|
560
|
+
})) {};
|
|
372
561
|
/**
|
|
373
562
|
* The Open Graph settings of a package's API docs.
|
|
374
563
|
*
|
|
375
564
|
* @public
|
|
376
565
|
*/
|
|
377
|
-
var BundleOpenGraphConfig = class extends Schema.Class("BundleOpenGraphConfig")({
|
|
566
|
+
var BundleOpenGraphConfig = class extends Schema.Class("BundleOpenGraphConfig")(Schema.Struct({
|
|
378
567
|
/** Static images, by path or url. Listed after a generated image. */
|
|
379
|
-
images: Schema.optionalKey(Schema.Array(BundleOpenGraphImage)),
|
|
568
|
+
images: Schema.optionalKey(Schema.Array(BundleOpenGraphImage).annotate({ description: "Static images, by path or url. Listed after a generated image." })),
|
|
380
569
|
/** Embed accent color, a CSS color string. */
|
|
381
|
-
themeColor: Schema.optionalKey(Schema.String
|
|
570
|
+
themeColor: Schema.optionalKey(Schema.String.annotate({
|
|
571
|
+
description: "The embed accent color, a CSS color string.",
|
|
572
|
+
examples: ["#3178c6"]
|
|
573
|
+
})),
|
|
382
574
|
/** Renders an image at build time, listed first. `"satori"` is the only renderer. */
|
|
383
|
-
generate: Schema.optionalKey(Schema.Literal("satori")
|
|
575
|
+
generate: Schema.optionalKey(Schema.Literal("satori").annotate({
|
|
576
|
+
description: "Renders an image at build time, listed first.",
|
|
577
|
+
"x-taplo": { docs: { enumValues: ["Renders the card with satori, the only renderer."] } }
|
|
578
|
+
})),
|
|
384
579
|
/**
|
|
385
580
|
* The cross-build image cache's salt.
|
|
386
581
|
*
|
|
@@ -388,36 +583,45 @@ var BundleOpenGraphConfig = class extends Schema.Class("BundleOpenGraphConfig")(
|
|
|
388
583
|
* A string caches under it, so change it whenever the renderer's output changes for the same input.
|
|
389
584
|
* `false` always regenerates. Absent, the renderer's own salt is used.
|
|
390
585
|
*/
|
|
391
|
-
cacheSalt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Literal(false)]))
|
|
392
|
-
})
|
|
586
|
+
cacheSalt: Schema.optionalKey(Schema.Union([Schema.String, Schema.Literal(false)]).annotate({ description: "The generated image cache's salt: change it when the renderer's output changes. false always regenerates; absent uses the renderer's own salt." }))
|
|
587
|
+
}).annotate({
|
|
588
|
+
title: "Open Graph",
|
|
589
|
+
description: "The Open Graph settings of the package's API docs."
|
|
590
|
+
})) {};
|
|
393
591
|
/**
|
|
394
592
|
* The config tier of a package's emitted `bundle.json`, the `[package.bundle]` table.
|
|
395
593
|
*
|
|
396
594
|
* @public
|
|
397
595
|
*/
|
|
398
|
-
var BundleConfig = class extends Schema.Class("BundleConfig")({
|
|
596
|
+
var BundleConfig = class extends Schema.Class("BundleConfig")(Schema.Struct({
|
|
399
597
|
/** The display name. */
|
|
400
|
-
name: Schema.optionalKey(Schema.String),
|
|
598
|
+
name: Schema.optionalKey(Schema.String.annotate({ description: "The display name." })),
|
|
401
599
|
/** A one-line tagline. */
|
|
402
|
-
tagline: Schema.optionalKey(Schema.String),
|
|
600
|
+
tagline: Schema.optionalKey(Schema.String.annotate({ description: "A one-line tagline." })),
|
|
403
601
|
/** A description. */
|
|
404
|
-
description: Schema.optionalKey(Schema.String),
|
|
602
|
+
description: Schema.optionalKey(Schema.String.annotate({ description: "A description of the package." })),
|
|
405
603
|
/** The Open Graph settings. */
|
|
406
604
|
openGraph: Schema.optionalKey(BundleOpenGraphConfig),
|
|
407
605
|
/** Registries; `false` disables the default derived from `targets.json`. */
|
|
408
|
-
registries: Schema.optionalKey(Schema.Union([Schema.Array(BundleRegistryRef), Schema.Literal(false)]))
|
|
409
|
-
})
|
|
606
|
+
registries: Schema.optionalKey(Schema.Union([Schema.Array(BundleRegistryRef), Schema.Literal(false)]).annotate({ description: "The registries the package is published to. false disables the default derived from targets.json." }))
|
|
607
|
+
}).annotate({
|
|
608
|
+
title: "Bundle",
|
|
609
|
+
description: "The config tier of the emitted bundle.json, the [package.bundle] table."
|
|
610
|
+
})) {};
|
|
410
611
|
/**
|
|
411
612
|
* The `[package]` table of `effected.toml`.
|
|
412
613
|
*
|
|
413
614
|
* @public
|
|
414
615
|
*/
|
|
415
|
-
var PackageConfig = class extends Schema.Class("PackageConfig")({
|
|
616
|
+
var PackageConfig = class extends Schema.Class("PackageConfig")(Schema.Struct({
|
|
416
617
|
/** The build settings. */
|
|
417
618
|
build: PackageBuildConfig.pipe(Schema.withDecodingDefaultKey(Effect.succeed({}))),
|
|
418
619
|
/** The `bundle.json` config tier. */
|
|
419
620
|
bundle: Schema.optionalKey(BundleConfig)
|
|
420
|
-
})
|
|
621
|
+
}).annotate({
|
|
622
|
+
title: "Package",
|
|
623
|
+
description: "The [package] table: the package's build settings and its bundle.json config tier."
|
|
624
|
+
})) {};
|
|
421
625
|
/**
|
|
422
626
|
* A decoded `effected.toml`.
|
|
423
627
|
*
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// src/config/EffectedConfigSchema.ts
|
|
2
|
+
/**
|
|
3
|
+
* Where the `effected.toml` JSON Schema is published, as data.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* One place for the identity, so the document the repository builds and the
|
|
7
|
+
* `#:schema` directive a scaffold writes can never name different URLs. `host`
|
|
8
|
+
* is the input to `@effected/schemastore`'s `HostedSchema.github`, whose
|
|
9
|
+
* derived `$id` is `url`. `directive` is the first line of an `effected.toml`
|
|
10
|
+
* that points tombi, taplo and other TOML editors at the schema; tombi wants a
|
|
11
|
+
* blank line after it.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* import { EffectedConfigSchema } from "@effected/bundler";
|
|
16
|
+
*
|
|
17
|
+
* const toml = `${EffectedConfigSchema.directive}\n\n[action.entries]\nmain = "src/main.ts"\n`;
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
const EffectedConfigSchema = {
|
|
23
|
+
/** The `HostedSchema.github` input that publishes the document. */
|
|
24
|
+
host: {
|
|
25
|
+
repo: "spencerbeggs/effected",
|
|
26
|
+
path: "schemas",
|
|
27
|
+
name: "config",
|
|
28
|
+
versions: ["1.0"],
|
|
29
|
+
appendVersion: false
|
|
30
|
+
},
|
|
31
|
+
/** The document's canonical URL, its `$id`. */
|
|
32
|
+
url: "https://raw.githubusercontent.com/spencerbeggs/effected/main/schemas/1.0/config.json",
|
|
33
|
+
/** The `#:schema` directive line naming {@link EffectedConfigSchema.url}. */
|
|
34
|
+
directive: "#:schema https://raw.githubusercontent.com/spencerbeggs/effected/main/schemas/1.0/config.json"
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { EffectedConfigSchema };
|
package/index.d.ts
CHANGED
|
@@ -2702,6 +2702,40 @@ export declare class EffectedConfigFile {
|
|
|
2702
2702
|
readonly root?: string;
|
|
2703
2703
|
}) => Effect.Effect<ResolvedEffectedConfig, EffectedConfigError, FileSystem.FileSystem | Path.Path | WorkspaceDiscovery>;
|
|
2704
2704
|
}
|
|
2705
|
+
/**
|
|
2706
|
+
* Where the `effected.toml` JSON Schema is published, as data.
|
|
2707
|
+
*
|
|
2708
|
+
* @remarks
|
|
2709
|
+
* One place for the identity, so the document the repository builds and the
|
|
2710
|
+
* `#:schema` directive a scaffold writes can never name different URLs. `host`
|
|
2711
|
+
* is the input to `@effected/schemastore`'s `HostedSchema.github`, whose
|
|
2712
|
+
* derived `$id` is `url`. `directive` is the first line of an `effected.toml`
|
|
2713
|
+
* that points tombi, taplo and other TOML editors at the schema; tombi wants a
|
|
2714
|
+
* blank line after it.
|
|
2715
|
+
*
|
|
2716
|
+
* @example
|
|
2717
|
+
* ```ts
|
|
2718
|
+
* import { EffectedConfigSchema } from "@effected/bundler";
|
|
2719
|
+
*
|
|
2720
|
+
* const toml = `${EffectedConfigSchema.directive}\n\n[action.entries]\nmain = "src/main.ts"\n`;
|
|
2721
|
+
* ```
|
|
2722
|
+
*
|
|
2723
|
+
* @public
|
|
2724
|
+
*/
|
|
2725
|
+
export declare const EffectedConfigSchema: {
|
|
2726
|
+
/** The `HostedSchema.github` input that publishes the document. */
|
|
2727
|
+
readonly host: {
|
|
2728
|
+
readonly repo: "spencerbeggs/effected";
|
|
2729
|
+
readonly path: "schemas";
|
|
2730
|
+
readonly name: "config";
|
|
2731
|
+
readonly versions: readonly ["1.0"];
|
|
2732
|
+
readonly appendVersion: false;
|
|
2733
|
+
};
|
|
2734
|
+
/** The document's canonical URL, its `$id`. */
|
|
2735
|
+
readonly url: "https://raw.githubusercontent.com/spencerbeggs/effected/main/schemas/1.0/config.json";
|
|
2736
|
+
/** The `#:schema` directive line naming {@link EffectedConfigSchema.url}. */
|
|
2737
|
+
readonly directive: "#:schema https://raw.githubusercontent.com/spencerbeggs/effected/main/schemas/1.0/config.json";
|
|
2738
|
+
};
|
|
2705
2739
|
/**
|
|
2706
2740
|
* Merges a package's raw `effected.toml` document over the workspace root's.
|
|
2707
2741
|
*
|
package/index.js
CHANGED
|
@@ -11,6 +11,7 @@ import { resolveNextVersions } from "./changesets/next-versions.js";
|
|
|
11
11
|
import { ActionBuildOptions, ActionConfig, ActionEntries, ActionPersistLocalOptions, ActionValidationOptions, ActionWorker } from "./config/ActionConfig.js";
|
|
12
12
|
import { BuildFormat, BuildPlatform, BundleConfig, BundleOpenGraphConfig, BundleOpenGraphImage, BundleRegistryRef, CopyEntry, EffectedConfig, EntryOverride, ExeConfig, ExeSeaConfig, ExeTargetConfig, JsxConfig, LooseFileSpec, ManifestConfig, MetaConfig, PackageBuildConfig, PackageConfig, TsdocConfig, TsdocTagDefinition, WarningSuppressionRule } from "./config/BuildConfig.js";
|
|
13
13
|
import { EffectedConfigError, EffectedConfigFile, ResolvedConfig, ResolvedEffectedConfig } from "./config/EffectedConfigFile.js";
|
|
14
|
+
import { EffectedConfigSchema } from "./config/EffectedConfigSchema.js";
|
|
14
15
|
import { merge } from "./config/merge.js";
|
|
15
16
|
import { PluginLoadError, loadPlugins } from "./config/plugins.js";
|
|
16
17
|
import { ConfigValidator } from "./config-validation/ConfigValidator.js";
|
|
@@ -54,4 +55,4 @@ import { RELEASE_CHANNELS, isTargetObject } from "./targets/config.js";
|
|
|
54
55
|
import { releaseWarnings, resolveTargets } from "./targets/resolve-targets.js";
|
|
55
56
|
import { BUNDLE_MANIFEST_FILENAME, BundleManifest, BundleManifestError, KNOWN_REGISTRY_TYPES, MANIFEST_SPEC, ManifestSource, OpenGraphConfig, OpenGraphImage, ProjectIdentity, RegistryRef, SbomRef, decodeBundleManifest, decodeManifestSource, encodeBundleManifest, isKnownRegistryType } from "@effected/manifest";
|
|
56
57
|
|
|
57
|
-
export { ActionBuildOptions, ActionBuildResult, ActionBuilder, ActionBundle, ActionConfig, ActionEntries, ActionPersistLocalOptions, ActionValidation, ActionValidationOptions, ActionWorker, ActionYml, ActionYmlBranding, ActionYmlBrandingColor, ActionYmlBrandingIcon, ActionYmlInput, ActionYmlOutput, ActionYmlPathError, ActionYmlRuns, BUNDLE_MANIFEST_FILENAME, BuildCollector, BuildCollectorTag, BuildFailed, BuildFormat, BuildIssuesSchema, BuildJournal, BuildPlatform, BuildReport, BuildResult, BundleConfig, BundleFailed, BundleManifest, BundleManifestEmitError, BundleManifestError, BundleManifestSourceError, BundleOpenGraphConfig, BundleOpenGraphImage, BundleRegistryRef, BundleResult, BundleStats, Bundler, BundlerBuildResult, BundlerError, BundlerPhase, CleanError, ConfigValidationError, ConfigValidator, CopyEntry, DEFAULT_EXE_NODE_VERSION, DiagnosticEntry, EffectedConfig, EffectedConfigError, EffectedConfigFile, EmittedFile, EntryOverride, ExeConfig, ExeSeaConfig, ExeTargetConfig, IssueJournal, JsxConfig, KNOWN_REGISTRY_TYPES, LooseFileSpec, MANIFEST_SPEC, ManifestConfig, ManifestSource, MetaConfig, MetaGenerationError, OgGenerateError, OpenGraphConfig, OpenGraphImage, PackageBuildConfig, PackageConfig, PassReport, PersistLocal, PersistLocalError, PersistLocalResult, PlainDiagnosticSchema, PluginLoadError, ProjectIdentity, RELEASE_CHANNELS, RegistryRef, ReportTimings, ResolvedConfig, ResolvedEffectedConfig, SbomRef, TargetGroupReport, TsdocConfig, TsdocTagDefinition, ValidationFailed, ValidationIssue, ValidationResult, WarningSuppressionRule, WriteError, ambientOutName, analyzeReexportBarrel, assertNoEntryCollisions, buildEmittedManifest, buildMetricsPlugin, buildResolvedTsconfig, buildTargetGroups, cjsDefaultInterop, classifyDtsExport, collectExportNames, composeBundleManifest, computeExeFileName, copyAmbientDts, copyPublicDir, createEntryName, createTimer, createTsdownLogger, declarationExt, declarationsDirFor, decodeBundleManifest, decodeManifestSource, defaultManifestTransform, deriveDeclarationsPassOptions, deriveDtsPassOptions, deriveExportPaths, deriveTargetGroupOptions, dtsPassDtsOptions, emitManifest, encodeBundleManifest, extractAmbientDts, extractEntries, findRelativeSpecifiers, flattenIssues, formatTime, githubOwnerRepo, isKnownRegistryType, isTargetObject, loadBundleManifestSources, loadPlugins, manifestNeedsCatalogResolution, merge, mixedDtsExportError, nodeBuiltinDefaultInterop, normalizeBinPaths, normalizeExeOptions, normalizeLooseFiles, normalizeMetaOptions, ogImageInfoOf, outDirFor, packageJsonEntries, readTsconfigJsx, registriesFromTargets, releaseWarnings, removeDeclarationMaps, renderCiAnnotations, renderReexportStub, resolveJsxConfig, resolveManifest, resolveNextVersions, resolveOgCacheSalt, resolveOgGenerator, resolvePortableTsconfig, resolveTargets, rewriteMetaVersions, runExeBuild, serializeIssues, transformBin, transformExports, transformManifest, writeDtsEmitTsconfig, writeGeneratedOgImage, writeIssuesArtifact, writeResolvedTsconfig, writeTargetsBinding };
|
|
58
|
+
export { ActionBuildOptions, ActionBuildResult, ActionBuilder, ActionBundle, ActionConfig, ActionEntries, ActionPersistLocalOptions, ActionValidation, ActionValidationOptions, ActionWorker, ActionYml, ActionYmlBranding, ActionYmlBrandingColor, ActionYmlBrandingIcon, ActionYmlInput, ActionYmlOutput, ActionYmlPathError, ActionYmlRuns, BUNDLE_MANIFEST_FILENAME, BuildCollector, BuildCollectorTag, BuildFailed, BuildFormat, BuildIssuesSchema, BuildJournal, BuildPlatform, BuildReport, BuildResult, BundleConfig, BundleFailed, BundleManifest, BundleManifestEmitError, BundleManifestError, BundleManifestSourceError, BundleOpenGraphConfig, BundleOpenGraphImage, BundleRegistryRef, BundleResult, BundleStats, Bundler, BundlerBuildResult, BundlerError, BundlerPhase, CleanError, ConfigValidationError, ConfigValidator, CopyEntry, DEFAULT_EXE_NODE_VERSION, DiagnosticEntry, EffectedConfig, EffectedConfigError, EffectedConfigFile, EffectedConfigSchema, EmittedFile, EntryOverride, ExeConfig, ExeSeaConfig, ExeTargetConfig, IssueJournal, JsxConfig, KNOWN_REGISTRY_TYPES, LooseFileSpec, MANIFEST_SPEC, ManifestConfig, ManifestSource, MetaConfig, MetaGenerationError, OgGenerateError, OpenGraphConfig, OpenGraphImage, PackageBuildConfig, PackageConfig, PassReport, PersistLocal, PersistLocalError, PersistLocalResult, PlainDiagnosticSchema, PluginLoadError, ProjectIdentity, RELEASE_CHANNELS, RegistryRef, ReportTimings, ResolvedConfig, ResolvedEffectedConfig, SbomRef, TargetGroupReport, TsdocConfig, TsdocTagDefinition, ValidationFailed, ValidationIssue, ValidationResult, WarningSuppressionRule, WriteError, ambientOutName, analyzeReexportBarrel, assertNoEntryCollisions, buildEmittedManifest, buildMetricsPlugin, buildResolvedTsconfig, buildTargetGroups, cjsDefaultInterop, classifyDtsExport, collectExportNames, composeBundleManifest, computeExeFileName, copyAmbientDts, copyPublicDir, createEntryName, createTimer, createTsdownLogger, declarationExt, declarationsDirFor, decodeBundleManifest, decodeManifestSource, defaultManifestTransform, deriveDeclarationsPassOptions, deriveDtsPassOptions, deriveExportPaths, deriveTargetGroupOptions, dtsPassDtsOptions, emitManifest, encodeBundleManifest, extractAmbientDts, extractEntries, findRelativeSpecifiers, flattenIssues, formatTime, githubOwnerRepo, isKnownRegistryType, isTargetObject, loadBundleManifestSources, loadPlugins, manifestNeedsCatalogResolution, merge, mixedDtsExportError, nodeBuiltinDefaultInterop, normalizeBinPaths, normalizeExeOptions, normalizeLooseFiles, normalizeMetaOptions, ogImageInfoOf, outDirFor, packageJsonEntries, readTsconfigJsx, registriesFromTargets, releaseWarnings, removeDeclarationMaps, renderCiAnnotations, renderReexportStub, resolveJsxConfig, resolveManifest, resolveNextVersions, resolveOgCacheSalt, resolveOgGenerator, resolvePortableTsconfig, resolveTargets, rewriteMetaVersions, runExeBuild, serializeIssues, transformBin, transformExports, transformManifest, writeDtsEmitTsconfig, writeGeneratedOgImage, writeIssuesArtifact, writeResolvedTsconfig, writeTargetsBinding };
|
package/meta/og-satori.js
CHANGED
|
@@ -117,7 +117,7 @@ const ogImage = { satori(options = {}) {
|
|
|
117
117
|
};
|
|
118
118
|
const cacheSalt = JSON.stringify({
|
|
119
119
|
renderer: "@effected/bundler/og#satori",
|
|
120
|
-
version: "0.
|
|
120
|
+
version: "0.6.0",
|
|
121
121
|
satori: peerVersion("satori"),
|
|
122
122
|
resvg: peerVersion("@resvg/resvg-js"),
|
|
123
123
|
colors
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effected/bundler",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The kit's build pipeline: effected.toml config, tsdown JS and declaration passes, API Extractor meta, SEA, GitHub Action bundles and build journals.",
|
|
6
6
|
"keywords": [
|
|
@@ -39,22 +39,22 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@effect/platform-node": "4.1.4",
|
|
42
|
-
"@effected/changesets": "0.5.
|
|
43
|
-
"@effected/config-file": "0.
|
|
42
|
+
"@effected/changesets": "0.5.1",
|
|
43
|
+
"@effected/config-file": "0.28.0",
|
|
44
44
|
"@effected/env": "0.12.0",
|
|
45
45
|
"@effected/files": "0.3.0",
|
|
46
|
-
"@effected/glob": "0.
|
|
46
|
+
"@effected/glob": "0.22.0",
|
|
47
47
|
"@effected/images": "0.10.0",
|
|
48
48
|
"@effected/jsonc": "0.25.0",
|
|
49
49
|
"@effected/jsonl": "0.19.0",
|
|
50
50
|
"@effected/manifest": "0.2.0",
|
|
51
|
-
"@effected/npm": "0.34.
|
|
51
|
+
"@effected/npm": "0.34.1",
|
|
52
52
|
"@effected/package-json": "0.32.1",
|
|
53
53
|
"@effected/semver": "0.24.0",
|
|
54
54
|
"@effected/toml": "0.20.0",
|
|
55
|
-
"@effected/tsconfig-json": "0.
|
|
56
|
-
"@effected/walker": "0.
|
|
57
|
-
"@effected/workspaces": "0.47.
|
|
55
|
+
"@effected/tsconfig-json": "0.22.0",
|
|
56
|
+
"@effected/walker": "0.29.0",
|
|
57
|
+
"@effected/workspaces": "0.47.1",
|
|
58
58
|
"@effected/yaml": "0.30.0",
|
|
59
59
|
"@jridgewell/sourcemap-codec": "^1.6.0",
|
|
60
60
|
"@microsoft/api-extractor": "^7.60.1",
|