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