@savvy-web/templates 0.1.7 → 1.0.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/index.d.ts +83 -94
- package/lib/changeset/index.js +5 -5
- package/lib/package-json/index.js +7 -19
- package/lib/pnpm/index.js +8 -7
- package/lib/tsconfig/index.js +1 -1
- package/lib/turbo/index.js +4 -10
- package/lib/workspace/index.js +7 -3
- package/package.json +6 -5
- package/tsdoc-metadata.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
|
|
3
2
|
//#region src/lib/types.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* A generated content entry from a template.
|
|
@@ -37,9 +36,9 @@ type UpdateTemplate<O> = (existing: string, options: Partial<O>) => TemplateEntr
|
|
|
37
36
|
* @public
|
|
38
37
|
*/
|
|
39
38
|
declare const BiomeOptions: Schema.Struct<{
|
|
40
|
-
version:
|
|
41
|
-
extends: Schema.optional<Schema
|
|
42
|
-
root: Schema.optional<
|
|
39
|
+
readonly version: Schema.String;
|
|
40
|
+
readonly extends: Schema.optional<Schema.$Array<Schema.String>>;
|
|
41
|
+
readonly root: Schema.optional<Schema.Boolean>;
|
|
43
42
|
}>;
|
|
44
43
|
/**
|
|
45
44
|
* The decoded type of {@link BiomeOptions}.
|
|
@@ -63,16 +62,10 @@ declare function createBiome(options: unknown): TemplateEntry[];
|
|
|
63
62
|
* @public
|
|
64
63
|
*/
|
|
65
64
|
declare const ChangesetOptions: Schema.Struct<{
|
|
66
|
-
access: Schema.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
default: () => string;
|
|
71
|
-
}>;
|
|
72
|
-
changelog: Schema.optionalWith<typeof Schema.String, {
|
|
73
|
-
default: () => string;
|
|
74
|
-
}>;
|
|
75
|
-
repo: Schema.optional<Schema.filter<typeof Schema.String>>;
|
|
65
|
+
readonly access: Schema.withDecodingDefaultType<Schema.Literals<readonly ["public", "restricted"]>, never>;
|
|
66
|
+
readonly baseBranch: Schema.withDecodingDefaultType<Schema.String, never>;
|
|
67
|
+
readonly changelog: Schema.withDecodingDefaultType<Schema.String, never>;
|
|
68
|
+
readonly repo: Schema.optional<Schema.String>;
|
|
76
69
|
}>;
|
|
77
70
|
/**
|
|
78
71
|
* The decoded type of {@link ChangesetOptions}.
|
|
@@ -96,14 +89,14 @@ declare function createChangeset(options: unknown): TemplateEntry[];
|
|
|
96
89
|
* @public
|
|
97
90
|
*/
|
|
98
91
|
declare const GitignoreOptions: Schema.Struct<{
|
|
99
|
-
sections: Schema.optional<Schema.Struct<{
|
|
100
|
-
node: Schema.optional<
|
|
101
|
-
build: Schema.optional<
|
|
102
|
-
env: Schema.optional<
|
|
103
|
-
os: Schema.optional<
|
|
104
|
-
silk: Schema.optional<
|
|
92
|
+
readonly sections: Schema.optional<Schema.Struct<{
|
|
93
|
+
readonly node: Schema.optional<Schema.Boolean>;
|
|
94
|
+
readonly build: Schema.optional<Schema.Boolean>;
|
|
95
|
+
readonly env: Schema.optional<Schema.Boolean>;
|
|
96
|
+
readonly os: Schema.optional<Schema.Boolean>;
|
|
97
|
+
readonly silk: Schema.optional<Schema.Boolean>;
|
|
105
98
|
}>>;
|
|
106
|
-
additional: Schema.optional<Schema
|
|
99
|
+
readonly additional: Schema.optional<Schema.$Array<Schema.String>>;
|
|
107
100
|
}>;
|
|
108
101
|
/**
|
|
109
102
|
* The decoded type of {@link GitignoreOptions}.
|
|
@@ -127,47 +120,45 @@ declare function createGitignore(options: unknown): TemplateEntry[];
|
|
|
127
120
|
* @public
|
|
128
121
|
*/
|
|
129
122
|
declare const PackageJsonOptions: Schema.Struct<{
|
|
130
|
-
name:
|
|
131
|
-
version: Schema.
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
bugs: Schema.optional<Schema.Struct<{
|
|
138
|
-
url: typeof Schema.String;
|
|
123
|
+
readonly name: Schema.String;
|
|
124
|
+
readonly version: Schema.withDecodingDefaultType<Schema.String, never>;
|
|
125
|
+
readonly private: Schema.optional<Schema.Boolean>;
|
|
126
|
+
readonly description: Schema.optional<Schema.String>;
|
|
127
|
+
readonly homepage: Schema.optional<Schema.String>;
|
|
128
|
+
readonly bugs: Schema.optional<Schema.Struct<{
|
|
129
|
+
readonly url: Schema.String;
|
|
139
130
|
}>>;
|
|
140
|
-
repository: Schema.optional<Schema.Struct<{
|
|
141
|
-
type:
|
|
142
|
-
url:
|
|
143
|
-
directory: Schema.optional<
|
|
131
|
+
readonly repository: Schema.optional<Schema.Struct<{
|
|
132
|
+
readonly type: Schema.String;
|
|
133
|
+
readonly url: Schema.String;
|
|
134
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
144
135
|
}>>;
|
|
145
|
-
license: Schema.optional<
|
|
146
|
-
author: Schema.optional<Schema.Struct<{
|
|
147
|
-
name:
|
|
148
|
-
email: Schema.optional<
|
|
149
|
-
url: Schema.optional<
|
|
136
|
+
readonly license: Schema.optional<Schema.String>;
|
|
137
|
+
readonly author: Schema.optional<Schema.Struct<{
|
|
138
|
+
readonly name: Schema.String;
|
|
139
|
+
readonly email: Schema.optional<Schema.String>;
|
|
140
|
+
readonly url: Schema.optional<Schema.String>;
|
|
150
141
|
}>>;
|
|
151
|
-
sideEffects: Schema.optional<
|
|
152
|
-
type: Schema.optional<Schema.
|
|
153
|
-
exports: Schema.optional<
|
|
154
|
-
scripts: Schema.optional<Schema
|
|
155
|
-
dependencies: Schema.optional<Schema
|
|
156
|
-
devDependencies: Schema.optional<Schema
|
|
157
|
-
peerDependencies: Schema.optional<Schema
|
|
158
|
-
engines: Schema.optional<Schema.Struct<{
|
|
159
|
-
node: Schema.optional<
|
|
160
|
-
pnpm: Schema.optional<
|
|
142
|
+
readonly sideEffects: Schema.optional<Schema.Boolean>;
|
|
143
|
+
readonly type: Schema.optional<Schema.Literals<readonly ["module", "commonjs"]>>;
|
|
144
|
+
readonly exports: Schema.optional<Schema.Unknown>;
|
|
145
|
+
readonly scripts: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
146
|
+
readonly dependencies: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
147
|
+
readonly devDependencies: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
148
|
+
readonly peerDependencies: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
149
|
+
readonly engines: Schema.optional<Schema.Struct<{
|
|
150
|
+
readonly node: Schema.optional<Schema.String>;
|
|
151
|
+
readonly pnpm: Schema.optional<Schema.String>;
|
|
161
152
|
}>>;
|
|
162
|
-
packageManager: Schema.optional<
|
|
163
|
-
devEngines: Schema.optional<
|
|
164
|
-
publishConfig: Schema.optional<Schema.Struct<{
|
|
165
|
-
access: Schema.optional<
|
|
166
|
-
directory: Schema.optional<
|
|
167
|
-
linkDirectory: Schema.optional<
|
|
168
|
-
targets: Schema.optional<
|
|
153
|
+
readonly packageManager: Schema.optional<Schema.String>;
|
|
154
|
+
readonly devEngines: Schema.optional<Schema.Unknown>;
|
|
155
|
+
readonly publishConfig: Schema.optional<Schema.Struct<{
|
|
156
|
+
readonly access: Schema.optional<Schema.String>;
|
|
157
|
+
readonly directory: Schema.optional<Schema.String>;
|
|
158
|
+
readonly linkDirectory: Schema.optional<Schema.Boolean>;
|
|
159
|
+
readonly targets: Schema.optional<Schema.Unknown>;
|
|
169
160
|
}>>;
|
|
170
|
-
keywords: Schema.optional<Schema
|
|
161
|
+
readonly keywords: Schema.optional<Schema.$Array<Schema.String>>;
|
|
171
162
|
}>;
|
|
172
163
|
/**
|
|
173
164
|
* The decoded type of {@link PackageJsonOptions}.
|
|
@@ -191,10 +182,10 @@ declare function createPackageJson(options: unknown): TemplateEntry[];
|
|
|
191
182
|
* @public
|
|
192
183
|
*/
|
|
193
184
|
declare const PnpmWorkspaceOptions: Schema.Struct<{
|
|
194
|
-
packages: Schema
|
|
195
|
-
autoInstallPeers: Schema.optional<
|
|
196
|
-
catalogMode: Schema.optional<Schema.
|
|
197
|
-
catalog: Schema.optional<Schema
|
|
185
|
+
readonly packages: Schema.$Array<Schema.String>;
|
|
186
|
+
readonly autoInstallPeers: Schema.optional<Schema.Boolean>;
|
|
187
|
+
readonly catalogMode: Schema.optional<Schema.Literals<readonly ["strict", "prefer", "manual"]>>;
|
|
188
|
+
readonly catalog: Schema.optional<Schema.$Record<Schema.String, Schema.String>>;
|
|
198
189
|
}>;
|
|
199
190
|
/**
|
|
200
191
|
* The decoded type of {@link PnpmWorkspaceOptions}.
|
|
@@ -218,8 +209,8 @@ declare function createPnpmWorkspace(options: unknown): TemplateEntry[];
|
|
|
218
209
|
* @public
|
|
219
210
|
*/
|
|
220
211
|
declare const ReadmeOptions: Schema.Struct<{
|
|
221
|
-
name:
|
|
222
|
-
description: Schema.optional<
|
|
212
|
+
readonly name: Schema.String;
|
|
213
|
+
readonly description: Schema.optional<Schema.String>;
|
|
223
214
|
}>;
|
|
224
215
|
/**
|
|
225
216
|
* The decoded type of {@link ReadmeOptions}.
|
|
@@ -243,12 +234,12 @@ declare function createReadme(options: unknown): TemplateEntry[];
|
|
|
243
234
|
* @public
|
|
244
235
|
*/
|
|
245
236
|
declare const TsConfigOptions: Schema.Struct<{
|
|
246
|
-
extends: Schema.optional<Schema.Union<[
|
|
247
|
-
composite: Schema.optional<
|
|
248
|
-
include: Schema.optional<Schema
|
|
249
|
-
exclude: Schema.optional<Schema
|
|
250
|
-
references: Schema.optional<Schema
|
|
251
|
-
path:
|
|
237
|
+
readonly extends: Schema.optional<Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>>;
|
|
238
|
+
readonly composite: Schema.optional<Schema.Boolean>;
|
|
239
|
+
readonly include: Schema.optional<Schema.$Array<Schema.String>>;
|
|
240
|
+
readonly exclude: Schema.optional<Schema.$Array<Schema.String>>;
|
|
241
|
+
readonly references: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
242
|
+
readonly path: Schema.String;
|
|
252
243
|
}>>>;
|
|
253
244
|
}>;
|
|
254
245
|
/**
|
|
@@ -273,12 +264,12 @@ declare function createTsConfig(options: unknown): TemplateEntry[];
|
|
|
273
264
|
* @public
|
|
274
265
|
*/
|
|
275
266
|
declare const TurboRootOptions: Schema.Struct<{
|
|
276
|
-
tasks: Schema
|
|
277
|
-
globalDependencies: Schema.optional<Schema
|
|
278
|
-
globalEnv: Schema.optional<Schema
|
|
279
|
-
globalPassThroughEnv: Schema.optional<Schema
|
|
280
|
-
ui: Schema.optional<Schema.
|
|
281
|
-
concurrency: Schema.optional<Schema.Union<[
|
|
267
|
+
readonly tasks: Schema.$Record<Schema.String, Schema.Unknown>;
|
|
268
|
+
readonly globalDependencies: Schema.optional<Schema.$Array<Schema.String>>;
|
|
269
|
+
readonly globalEnv: Schema.optional<Schema.$Array<Schema.String>>;
|
|
270
|
+
readonly globalPassThroughEnv: Schema.optional<Schema.$Array<Schema.String>>;
|
|
271
|
+
readonly ui: Schema.optional<Schema.Literals<readonly ["tui", "stream"]>>;
|
|
272
|
+
readonly concurrency: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Number]>>;
|
|
282
273
|
}>;
|
|
283
274
|
/**
|
|
284
275
|
* The decoded type of {@link TurboRootOptions}.
|
|
@@ -292,7 +283,7 @@ type TurboRootOptionsType = typeof TurboRootOptions.Type;
|
|
|
292
283
|
* @public
|
|
293
284
|
*/
|
|
294
285
|
declare const TurboWorkspaceOptions: Schema.Struct<{
|
|
295
|
-
tasks: Schema.optional<Schema
|
|
286
|
+
readonly tasks: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
296
287
|
}>;
|
|
297
288
|
/**
|
|
298
289
|
* The decoded type of {@link TurboWorkspaceOptions}.
|
|
@@ -324,12 +315,12 @@ declare function createTurboWorkspace(options: unknown): TemplateEntry[];
|
|
|
324
315
|
* @public
|
|
325
316
|
*/
|
|
326
317
|
declare const VsCodeOptions: Schema.Struct<{
|
|
327
|
-
settings: Schema.optional<Schema.Struct<{
|
|
328
|
-
biome: Schema.optional<
|
|
329
|
-
turbo: Schema.optional<
|
|
330
|
-
vitest: Schema.optional<
|
|
318
|
+
readonly settings: Schema.optional<Schema.Struct<{
|
|
319
|
+
readonly biome: Schema.optional<Schema.Boolean>;
|
|
320
|
+
readonly turbo: Schema.optional<Schema.Boolean>;
|
|
321
|
+
readonly vitest: Schema.optional<Schema.Boolean>;
|
|
331
322
|
}>>;
|
|
332
|
-
extensions: Schema.optional<Schema
|
|
323
|
+
readonly extensions: Schema.optional<Schema.$Array<Schema.String>>;
|
|
333
324
|
}>;
|
|
334
325
|
/**
|
|
335
326
|
* The decoded type of {@link VsCodeOptions}.
|
|
@@ -353,19 +344,17 @@ declare function createVsCode(options: unknown): TemplateEntry[];
|
|
|
353
344
|
* @public
|
|
354
345
|
*/
|
|
355
346
|
declare const WorkspaceOptions: Schema.Struct<{
|
|
356
|
-
name:
|
|
357
|
-
packageManager: Schema.
|
|
358
|
-
packageManagerVersion:
|
|
359
|
-
nodeVersion:
|
|
360
|
-
biomeVersion: Schema.
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
changesets: Schema.optional<typeof Schema.Boolean>;
|
|
368
|
-
vscode: Schema.optional<typeof Schema.Boolean>;
|
|
347
|
+
readonly name: Schema.String;
|
|
348
|
+
readonly packageManager: Schema.Literals<readonly ["pnpm", "npm", "bun"]>;
|
|
349
|
+
readonly packageManagerVersion: Schema.String;
|
|
350
|
+
readonly nodeVersion: Schema.String;
|
|
351
|
+
readonly biomeVersion: Schema.withDecodingDefaultType<Schema.String, never>;
|
|
352
|
+
readonly features: Schema.optional<Schema.Struct<{
|
|
353
|
+
readonly biome: Schema.optional<Schema.Boolean>;
|
|
354
|
+
readonly vitest: Schema.optional<Schema.Boolean>;
|
|
355
|
+
readonly turbo: Schema.optional<Schema.Boolean>;
|
|
356
|
+
readonly changesets: Schema.optional<Schema.Boolean>;
|
|
357
|
+
readonly vscode: Schema.optional<Schema.Boolean>;
|
|
369
358
|
}>>;
|
|
370
359
|
}>;
|
|
371
360
|
/**
|
package/lib/changeset/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Schema } from "effect";
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/lib/changeset/index.ts
|
|
4
|
-
const RepoPattern = Schema.String.
|
|
4
|
+
const RepoPattern = Schema.String.check(Schema.isPattern(/^[^/\s]+\/[^/\s]+$/));
|
|
5
5
|
/**
|
|
6
6
|
* Options for generating a Changesets configuration file.
|
|
7
7
|
*
|
|
8
8
|
* @public
|
|
9
9
|
*/
|
|
10
10
|
const ChangesetOptions = Schema.Struct({
|
|
11
|
-
access: Schema.
|
|
12
|
-
baseBranch: Schema.
|
|
13
|
-
changelog: Schema.
|
|
11
|
+
access: Schema.Literals(["public", "restricted"]).pipe(Schema.withDecodingDefaultType(Effect.succeed("restricted"))),
|
|
12
|
+
baseBranch: Schema.String.pipe(Schema.withDecodingDefaultType(Effect.succeed("main"))),
|
|
13
|
+
changelog: Schema.String.pipe(Schema.withDecodingDefaultType(Effect.succeed("@savvy-web/changesets/changelog"))),
|
|
14
14
|
repo: Schema.optional(RepoPattern)
|
|
15
15
|
});
|
|
16
16
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Schema } from "effect";
|
|
1
|
+
import { Effect, Schema } from "effect";
|
|
2
2
|
import { sortPackageJson } from "sort-package-json";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/package-json/index.ts
|
|
@@ -26,7 +26,7 @@ const PublishConfig = Schema.Struct({
|
|
|
26
26
|
*/
|
|
27
27
|
const PackageJsonOptions = Schema.Struct({
|
|
28
28
|
name: Schema.String,
|
|
29
|
-
version: Schema.
|
|
29
|
+
version: Schema.String.pipe(Schema.withDecodingDefaultType(Effect.succeed("0.0.0"))),
|
|
30
30
|
private: Schema.optional(Schema.Boolean),
|
|
31
31
|
description: Schema.optional(Schema.String),
|
|
32
32
|
homepage: Schema.optional(Schema.String),
|
|
@@ -35,24 +35,12 @@ const PackageJsonOptions = Schema.Struct({
|
|
|
35
35
|
license: Schema.optional(Schema.String),
|
|
36
36
|
author: Schema.optional(Author),
|
|
37
37
|
sideEffects: Schema.optional(Schema.Boolean),
|
|
38
|
-
type: Schema.optional(Schema.
|
|
38
|
+
type: Schema.optional(Schema.Literals(["module", "commonjs"])),
|
|
39
39
|
exports: Schema.optional(Schema.Unknown),
|
|
40
|
-
scripts: Schema.optional(Schema.Record(
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
dependencies: Schema.optional(Schema.Record({
|
|
45
|
-
key: Schema.String,
|
|
46
|
-
value: Schema.String
|
|
47
|
-
})),
|
|
48
|
-
devDependencies: Schema.optional(Schema.Record({
|
|
49
|
-
key: Schema.String,
|
|
50
|
-
value: Schema.String
|
|
51
|
-
})),
|
|
52
|
-
peerDependencies: Schema.optional(Schema.Record({
|
|
53
|
-
key: Schema.String,
|
|
54
|
-
value: Schema.String
|
|
55
|
-
})),
|
|
40
|
+
scripts: Schema.optional(Schema.Record(Schema.String, Schema.String)),
|
|
41
|
+
dependencies: Schema.optional(Schema.Record(Schema.String, Schema.String)),
|
|
42
|
+
devDependencies: Schema.optional(Schema.Record(Schema.String, Schema.String)),
|
|
43
|
+
peerDependencies: Schema.optional(Schema.Record(Schema.String, Schema.String)),
|
|
56
44
|
engines: Schema.optional(Schema.Struct({
|
|
57
45
|
node: Schema.optional(Schema.String),
|
|
58
46
|
pnpm: Schema.optional(Schema.String)
|
package/lib/pnpm/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Effect, Schema } from "effect";
|
|
2
|
-
import {
|
|
2
|
+
import { Yaml } from "@effected/yaml";
|
|
3
3
|
|
|
4
4
|
//#region src/lib/pnpm/index.ts
|
|
5
5
|
/**
|
|
@@ -10,11 +10,12 @@ import { stringify } from "yaml-effect";
|
|
|
10
10
|
const PnpmWorkspaceOptions = Schema.Struct({
|
|
11
11
|
packages: Schema.Array(Schema.String),
|
|
12
12
|
autoInstallPeers: Schema.optional(Schema.Boolean),
|
|
13
|
-
catalogMode: Schema.optional(Schema.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
catalogMode: Schema.optional(Schema.Literals([
|
|
14
|
+
"strict",
|
|
15
|
+
"prefer",
|
|
16
|
+
"manual"
|
|
17
|
+
])),
|
|
18
|
+
catalog: Schema.optional(Schema.Record(Schema.String, Schema.String))
|
|
18
19
|
});
|
|
19
20
|
/**
|
|
20
21
|
* Generates a `pnpm-workspace.yaml` file entry.
|
|
@@ -32,7 +33,7 @@ function createPnpmWorkspace(options) {
|
|
|
32
33
|
return [{
|
|
33
34
|
name: "pnpm-workspace",
|
|
34
35
|
filename: "pnpm-workspace.yaml",
|
|
35
|
-
content: Effect.runSync(stringify(config))
|
|
36
|
+
content: Effect.runSync(Yaml.stringify(config))
|
|
36
37
|
}];
|
|
37
38
|
}
|
|
38
39
|
|
package/lib/tsconfig/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { Schema } from "effect";
|
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
9
|
const TsConfigOptions = Schema.Struct({
|
|
10
|
-
extends: Schema.optional(Schema.Union(Schema.String, Schema.Array(Schema.String))),
|
|
10
|
+
extends: Schema.optional(Schema.Union([Schema.String, Schema.Array(Schema.String)])),
|
|
11
11
|
composite: Schema.optional(Schema.Boolean),
|
|
12
12
|
include: Schema.optional(Schema.Array(Schema.String)),
|
|
13
13
|
exclude: Schema.optional(Schema.Array(Schema.String)),
|
package/lib/turbo/index.js
CHANGED
|
@@ -7,25 +7,19 @@ import { Schema } from "effect";
|
|
|
7
7
|
* @public
|
|
8
8
|
*/
|
|
9
9
|
const TurboRootOptions = Schema.Struct({
|
|
10
|
-
tasks: Schema.Record(
|
|
11
|
-
key: Schema.String,
|
|
12
|
-
value: Schema.Unknown
|
|
13
|
-
}),
|
|
10
|
+
tasks: Schema.Record(Schema.String, Schema.Unknown),
|
|
14
11
|
globalDependencies: Schema.optional(Schema.Array(Schema.String)),
|
|
15
12
|
globalEnv: Schema.optional(Schema.Array(Schema.String)),
|
|
16
13
|
globalPassThroughEnv: Schema.optional(Schema.Array(Schema.String)),
|
|
17
|
-
ui: Schema.optional(Schema.
|
|
18
|
-
concurrency: Schema.optional(Schema.Union(Schema.String, Schema.Number))
|
|
14
|
+
ui: Schema.optional(Schema.Literals(["tui", "stream"])),
|
|
15
|
+
concurrency: Schema.optional(Schema.Union([Schema.String, Schema.Number]))
|
|
19
16
|
});
|
|
20
17
|
/**
|
|
21
18
|
* Options for generating a workspace-level `turbo.json` file.
|
|
22
19
|
*
|
|
23
20
|
* @public
|
|
24
21
|
*/
|
|
25
|
-
const TurboWorkspaceOptions = Schema.Struct({ tasks: Schema.optional(Schema.Record(
|
|
26
|
-
key: Schema.String,
|
|
27
|
-
value: Schema.Unknown
|
|
28
|
-
})) });
|
|
22
|
+
const TurboWorkspaceOptions = Schema.Struct({ tasks: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)) });
|
|
29
23
|
/**
|
|
30
24
|
* Generates a root `turbo.json` file entry.
|
|
31
25
|
*
|
package/lib/workspace/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { createReadme } from "../readme/index.js";
|
|
|
7
7
|
import { createTsConfig } from "../tsconfig/index.js";
|
|
8
8
|
import { createTurboRoot } from "../turbo/index.js";
|
|
9
9
|
import { createVsCode } from "../vscode/index.js";
|
|
10
|
-
import { Schema } from "effect";
|
|
10
|
+
import { Effect, Schema } from "effect";
|
|
11
11
|
|
|
12
12
|
//#region src/lib/workspace/index.ts
|
|
13
13
|
const Features = Schema.Struct({
|
|
@@ -24,10 +24,14 @@ const Features = Schema.Struct({
|
|
|
24
24
|
*/
|
|
25
25
|
const WorkspaceOptions = Schema.Struct({
|
|
26
26
|
name: Schema.String,
|
|
27
|
-
packageManager: Schema.
|
|
27
|
+
packageManager: Schema.Literals([
|
|
28
|
+
"pnpm",
|
|
29
|
+
"npm",
|
|
30
|
+
"bun"
|
|
31
|
+
]),
|
|
28
32
|
packageManagerVersion: Schema.String,
|
|
29
33
|
nodeVersion: Schema.String,
|
|
30
|
-
biomeVersion: Schema.
|
|
34
|
+
biomeVersion: Schema.String.pipe(Schema.withDecodingDefaultType(Effect.succeed("2.3.3"))),
|
|
31
35
|
features: Schema.optional(Features)
|
|
32
36
|
});
|
|
33
37
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/templates",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Pure TypeScript templates for Silk Suite project scaffolding",
|
|
6
6
|
"homepage": "https://github.com/savvy-web/systems/tree/main/packages/templates",
|
|
@@ -23,15 +23,16 @@
|
|
|
23
23
|
"exports": {
|
|
24
24
|
".": {
|
|
25
25
|
"types": "./index.d.ts",
|
|
26
|
-
"import": "./index.js"
|
|
26
|
+
"import": "./index.js",
|
|
27
|
+
"default": "./index.js"
|
|
27
28
|
},
|
|
28
29
|
"./package.json": "./package.json"
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|
|
31
|
-
"
|
|
32
|
-
"
|
|
32
|
+
"@effected/yaml": "^0.2.0",
|
|
33
|
+
"sort-package-json": "^4.0.0"
|
|
33
34
|
},
|
|
34
35
|
"peerDependencies": {
|
|
35
|
-
"effect": "
|
|
36
|
+
"effect": "4.0.0-beta.98"
|
|
36
37
|
}
|
|
37
38
|
}
|