@savvy-web/templates 0.1.1 → 0.1.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/index.d.ts +190 -203
- package/index.js +12 -491
- package/lib/biome/index.js +22 -0
- package/lib/changeset/index.js +36 -0
- package/lib/gitignore/index.js +38 -0
- package/lib/package-json/index.js +94 -0
- package/lib/pnpm/index.js +33 -0
- package/lib/readme/index.js +21 -0
- package/lib/tsconfig/index.js +27 -0
- package/lib/turbo/index.js +48 -0
- package/lib/vscode/index.js +66 -0
- package/lib/workspace/index.js +81 -0
- package/package.json +34 -45
- package/tsdoc-metadata.json +11 -11
package/index.d.ts
CHANGED
|
@@ -1,203 +1,190 @@
|
|
|
1
|
-
import { Schema } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}>;
|
|
192
|
-
features: Schema.optional<Schema.Struct<{
|
|
193
|
-
biome: Schema.optional<typeof Schema.Boolean>;
|
|
194
|
-
vitest: Schema.optional<typeof Schema.Boolean>;
|
|
195
|
-
turbo: Schema.optional<typeof Schema.Boolean>;
|
|
196
|
-
changesets: Schema.optional<typeof Schema.Boolean>;
|
|
197
|
-
vscode: Schema.optional<typeof Schema.Boolean>;
|
|
198
|
-
}>>;
|
|
199
|
-
}>;
|
|
200
|
-
|
|
201
|
-
export declare type WorkspaceOptionsType = typeof WorkspaceOptions.Type;
|
|
202
|
-
|
|
203
|
-
export { }
|
|
1
|
+
import { Schema } from "effect";
|
|
2
|
+
|
|
3
|
+
//#region src/lib/types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A generated content entry from a template.
|
|
6
|
+
*
|
|
7
|
+
* Templates produce content with a logical name and suggested filename.
|
|
8
|
+
* The consumer decides where (and whether) to write the content.
|
|
9
|
+
*/
|
|
10
|
+
interface TemplateEntry {
|
|
11
|
+
/** Logical name for this entry (e.g., "tsconfig", "biome", "vscode-settings") */
|
|
12
|
+
readonly name: string;
|
|
13
|
+
/** Suggested default filename (e.g., "tsconfig.json", ".vscode/settings.json") */
|
|
14
|
+
readonly filename: string;
|
|
15
|
+
/** The generated file content */
|
|
16
|
+
readonly content: string;
|
|
17
|
+
}
|
|
18
|
+
/** A template: typed options in, content entries out. */
|
|
19
|
+
type Template<O> = (options: O) => TemplateEntry[];
|
|
20
|
+
/** An update template: existing content + partial options in, content entries out. */
|
|
21
|
+
type UpdateTemplate<O> = (existing: string, options: Partial<O>) => TemplateEntry[];
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/lib/biome/index.d.ts
|
|
24
|
+
declare const BiomeOptions: Schema.Struct<{
|
|
25
|
+
version: typeof Schema.String;
|
|
26
|
+
extends: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
27
|
+
root: Schema.optional<typeof Schema.Boolean>;
|
|
28
|
+
}>;
|
|
29
|
+
type BiomeOptionsType = typeof BiomeOptions.Type;
|
|
30
|
+
declare function createBiome(options: unknown): TemplateEntry[];
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/lib/changeset/index.d.ts
|
|
33
|
+
declare const ChangesetOptions: Schema.Struct<{
|
|
34
|
+
access: Schema.optionalWith<Schema.Literal<["public", "restricted"]>, {
|
|
35
|
+
default: () => "restricted";
|
|
36
|
+
}>;
|
|
37
|
+
baseBranch: Schema.optionalWith<typeof Schema.String, {
|
|
38
|
+
default: () => string;
|
|
39
|
+
}>;
|
|
40
|
+
changelog: Schema.optionalWith<typeof Schema.String, {
|
|
41
|
+
default: () => string;
|
|
42
|
+
}>;
|
|
43
|
+
repo: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
44
|
+
}>;
|
|
45
|
+
type ChangesetOptionsType = typeof ChangesetOptions.Type;
|
|
46
|
+
declare function createChangeset(options: unknown): TemplateEntry[];
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/lib/gitignore/index.d.ts
|
|
49
|
+
declare const GitignoreOptions: Schema.Struct<{
|
|
50
|
+
sections: Schema.optional<Schema.Struct<{
|
|
51
|
+
node: Schema.optional<typeof Schema.Boolean>;
|
|
52
|
+
build: Schema.optional<typeof Schema.Boolean>;
|
|
53
|
+
env: Schema.optional<typeof Schema.Boolean>;
|
|
54
|
+
os: Schema.optional<typeof Schema.Boolean>;
|
|
55
|
+
silk: Schema.optional<typeof Schema.Boolean>;
|
|
56
|
+
}>>;
|
|
57
|
+
additional: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
58
|
+
}>;
|
|
59
|
+
type GitignoreOptionsType = typeof GitignoreOptions.Type;
|
|
60
|
+
declare function createGitignore(options: unknown): TemplateEntry[];
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/lib/package-json/index.d.ts
|
|
63
|
+
declare const PackageJsonOptions: Schema.Struct<{
|
|
64
|
+
name: typeof Schema.String;
|
|
65
|
+
version: Schema.optionalWith<typeof Schema.String, {
|
|
66
|
+
default: () => string;
|
|
67
|
+
}>;
|
|
68
|
+
private: Schema.optional<typeof Schema.Boolean>;
|
|
69
|
+
description: Schema.optional<typeof Schema.String>;
|
|
70
|
+
homepage: Schema.optional<typeof Schema.String>;
|
|
71
|
+
bugs: Schema.optional<Schema.Struct<{
|
|
72
|
+
url: typeof Schema.String;
|
|
73
|
+
}>>;
|
|
74
|
+
repository: Schema.optional<Schema.Struct<{
|
|
75
|
+
type: typeof Schema.String;
|
|
76
|
+
url: typeof Schema.String;
|
|
77
|
+
directory: Schema.optional<typeof Schema.String>;
|
|
78
|
+
}>>;
|
|
79
|
+
license: Schema.optional<typeof Schema.String>;
|
|
80
|
+
author: Schema.optional<Schema.Struct<{
|
|
81
|
+
name: typeof Schema.String;
|
|
82
|
+
email: Schema.optional<typeof Schema.String>;
|
|
83
|
+
url: Schema.optional<typeof Schema.String>;
|
|
84
|
+
}>>;
|
|
85
|
+
sideEffects: Schema.optional<typeof Schema.Boolean>;
|
|
86
|
+
type: Schema.optional<Schema.Literal<["module", "commonjs"]>>;
|
|
87
|
+
exports: Schema.optional<typeof Schema.Unknown>;
|
|
88
|
+
scripts: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
|
|
89
|
+
dependencies: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
|
|
90
|
+
devDependencies: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
|
|
91
|
+
peerDependencies: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
|
|
92
|
+
engines: Schema.optional<Schema.Struct<{
|
|
93
|
+
node: Schema.optional<typeof Schema.String>;
|
|
94
|
+
pnpm: Schema.optional<typeof Schema.String>;
|
|
95
|
+
}>>;
|
|
96
|
+
packageManager: Schema.optional<typeof Schema.String>;
|
|
97
|
+
devEngines: Schema.optional<typeof Schema.Unknown>;
|
|
98
|
+
publishConfig: Schema.optional<Schema.Struct<{
|
|
99
|
+
access: Schema.optional<typeof Schema.String>;
|
|
100
|
+
directory: Schema.optional<typeof Schema.String>;
|
|
101
|
+
linkDirectory: Schema.optional<typeof Schema.Boolean>;
|
|
102
|
+
targets: Schema.optional<typeof Schema.Unknown>;
|
|
103
|
+
}>>;
|
|
104
|
+
keywords: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
105
|
+
}>;
|
|
106
|
+
type PackageJsonOptionsType = typeof PackageJsonOptions.Type;
|
|
107
|
+
declare function createPackageJson(options: unknown): TemplateEntry[];
|
|
108
|
+
//#endregion
|
|
109
|
+
//#region src/lib/pnpm/index.d.ts
|
|
110
|
+
declare const PnpmWorkspaceOptions: Schema.Struct<{
|
|
111
|
+
packages: Schema.Array$<typeof Schema.String>;
|
|
112
|
+
autoInstallPeers: Schema.optional<typeof Schema.Boolean>;
|
|
113
|
+
catalogMode: Schema.optional<Schema.Literal<["strict", "prefer", "manual"]>>;
|
|
114
|
+
catalog: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.String>>;
|
|
115
|
+
}>;
|
|
116
|
+
type PnpmWorkspaceOptionsType = typeof PnpmWorkspaceOptions.Type;
|
|
117
|
+
declare function createPnpmWorkspace(options: unknown): TemplateEntry[];
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region src/lib/readme/index.d.ts
|
|
120
|
+
declare const ReadmeOptions: Schema.Struct<{
|
|
121
|
+
name: typeof Schema.String;
|
|
122
|
+
description: Schema.optional<typeof Schema.String>;
|
|
123
|
+
}>;
|
|
124
|
+
type ReadmeOptionsType = typeof ReadmeOptions.Type;
|
|
125
|
+
declare function createReadme(options: unknown): TemplateEntry[];
|
|
126
|
+
//#endregion
|
|
127
|
+
//#region src/lib/tsconfig/index.d.ts
|
|
128
|
+
declare const TsConfigOptions: Schema.Struct<{
|
|
129
|
+
extends: Schema.optional<Schema.Union<[typeof Schema.String, Schema.Array$<typeof Schema.String>]>>;
|
|
130
|
+
composite: Schema.optional<typeof Schema.Boolean>;
|
|
131
|
+
include: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
132
|
+
exclude: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
133
|
+
references: Schema.optional<Schema.Array$<Schema.Struct<{
|
|
134
|
+
path: typeof Schema.String;
|
|
135
|
+
}>>>;
|
|
136
|
+
}>;
|
|
137
|
+
type TsConfigOptionsType = typeof TsConfigOptions.Type;
|
|
138
|
+
declare function createTsConfig(options: unknown): TemplateEntry[];
|
|
139
|
+
//#endregion
|
|
140
|
+
//#region src/lib/turbo/index.d.ts
|
|
141
|
+
declare const TurboRootOptions: Schema.Struct<{
|
|
142
|
+
tasks: Schema.Record$<typeof Schema.String, typeof Schema.Unknown>;
|
|
143
|
+
globalDependencies: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
144
|
+
globalEnv: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
145
|
+
globalPassThroughEnv: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
146
|
+
ui: Schema.optional<Schema.Literal<["tui", "stream"]>>;
|
|
147
|
+
concurrency: Schema.optional<Schema.Union<[typeof Schema.String, typeof Schema.Number]>>;
|
|
148
|
+
}>;
|
|
149
|
+
type TurboRootOptionsType = typeof TurboRootOptions.Type;
|
|
150
|
+
declare const TurboWorkspaceOptions: Schema.Struct<{
|
|
151
|
+
tasks: Schema.optional<Schema.Record$<typeof Schema.String, typeof Schema.Unknown>>;
|
|
152
|
+
}>;
|
|
153
|
+
type TurboWorkspaceOptionsType = typeof TurboWorkspaceOptions.Type;
|
|
154
|
+
declare function createTurboRoot(options: unknown): TemplateEntry[];
|
|
155
|
+
declare function createTurboWorkspace(options: unknown): TemplateEntry[];
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region src/lib/vscode/index.d.ts
|
|
158
|
+
declare const VsCodeOptions: Schema.Struct<{
|
|
159
|
+
settings: Schema.optional<Schema.Struct<{
|
|
160
|
+
biome: Schema.optional<typeof Schema.Boolean>;
|
|
161
|
+
turbo: Schema.optional<typeof Schema.Boolean>;
|
|
162
|
+
vitest: Schema.optional<typeof Schema.Boolean>;
|
|
163
|
+
}>>;
|
|
164
|
+
extensions: Schema.optional<Schema.Array$<typeof Schema.String>>;
|
|
165
|
+
}>;
|
|
166
|
+
type VsCodeOptionsType = typeof VsCodeOptions.Type;
|
|
167
|
+
declare function createVsCode(options: unknown): TemplateEntry[];
|
|
168
|
+
//#endregion
|
|
169
|
+
//#region src/lib/workspace/index.d.ts
|
|
170
|
+
declare const WorkspaceOptions: Schema.Struct<{
|
|
171
|
+
name: typeof Schema.String;
|
|
172
|
+
packageManager: Schema.Literal<["pnpm", "npm", "bun"]>;
|
|
173
|
+
packageManagerVersion: typeof Schema.String;
|
|
174
|
+
nodeVersion: typeof Schema.String;
|
|
175
|
+
biomeVersion: Schema.optionalWith<typeof Schema.String, {
|
|
176
|
+
default: () => string;
|
|
177
|
+
}>;
|
|
178
|
+
features: Schema.optional<Schema.Struct<{
|
|
179
|
+
biome: Schema.optional<typeof Schema.Boolean>;
|
|
180
|
+
vitest: Schema.optional<typeof Schema.Boolean>;
|
|
181
|
+
turbo: Schema.optional<typeof Schema.Boolean>;
|
|
182
|
+
changesets: Schema.optional<typeof Schema.Boolean>;
|
|
183
|
+
vscode: Schema.optional<typeof Schema.Boolean>;
|
|
184
|
+
}>>;
|
|
185
|
+
}>;
|
|
186
|
+
type WorkspaceOptionsType = typeof WorkspaceOptions.Type;
|
|
187
|
+
declare function createWorkspace(options: unknown): TemplateEntry[];
|
|
188
|
+
//#endregion
|
|
189
|
+
export { BiomeOptions, type BiomeOptionsType, ChangesetOptions, type ChangesetOptionsType, GitignoreOptions, type GitignoreOptionsType, PackageJsonOptions, type PackageJsonOptionsType, PnpmWorkspaceOptions, type PnpmWorkspaceOptionsType, ReadmeOptions, type ReadmeOptionsType, type Template, type TemplateEntry, TsConfigOptions, type TsConfigOptionsType, TurboRootOptions, type TurboRootOptionsType, TurboWorkspaceOptions, type TurboWorkspaceOptionsType, type UpdateTemplate, VsCodeOptions, type VsCodeOptionsType, WorkspaceOptions, type WorkspaceOptionsType, createBiome, createChangeset, createGitignore, createPackageJson, createPnpmWorkspace, createReadme, createTsConfig, createTurboRoot, createTurboWorkspace, createVsCode, createWorkspace };
|
|
190
|
+
//# sourceMappingURL=index.d.ts.map
|