-
Notifications
You must be signed in to change notification settings - Fork 2
/
constraints.pro
51 lines (39 loc) · 2.45 KB
/
constraints.pro
1
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
requires_specific_version(DependencyIdent, Version) :-
(DependencyIdent, Version) = ('@temporalio/activity', '1.7.4');
(DependencyIdent, Version) = ('@temporalio/worker', '1.7.4');
(DependencyIdent, Version) = ('@temporalio/workflow', '1.7.4');
(DependencyIdent, Version) = ('@temporalio/client', '1.7.4');
(DependencyIdent, Version) = ('@effect/io', '^0.40.3');
(DependencyIdent, Version) = ('@effect/data', '^0.18.5');
(DependencyIdent, Version) = ('@effect/schema', '^0.36.3');
(DependencyIdent, Version) = ('typescript', '5.2.2');
(DependencyIdent, Version) = ('prettier', '2.8.8');
(DependencyIdent, Version) = ('jest', '29.5.0');
(DependencyIdent, Version) = ('ts-jest', '29.1.0').
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange2, DependencyType) :-
workspace_has_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType),
requires_specific_version(DependencyIdent,DependencyRange2).
gen_enforced_field(WorkspaceCwd, 'main', 'dist/index.js').
gen_enforced_field(WorkspaceCwd, 'engines.node', '>=18').
gen_enforced_field(WorkspaceCwd, 'license', 'MIT').
gen_enforced_field(WorkspaceCwd, 'repository.type', 'git').
gen_enforced_field(WorkspaceCwd, 'repository.url', 'https://github.com/embedded-insurance/effect-use.git').
gen_enforced_field(WorkspaceCwd, 'repository.directory', WorkspaceCwd).
gen_enforced_field(WorkspaceCwd, 'publishConfig.access', 'public').
gen_enforced_field(WorkspaceCwd, 'scripts.format', 'prettier --write .') :- WorkspaceCwd \= '.'.
gen_enforced_field(WorkspaceCwd, 'scripts.clean', 'rimraf node_modules & rimraf dist & rimraf .turbo') :- WorkspaceCwd \= '.'.
gen_enforced_field(WorkspaceCwd, 'scripts.build', 'rimraf dist && tsc -p tsconfig.build.json') :- WorkspaceCwd \= '.'.
gen_enforced_field(WorkspaceCwd, 'scripts.typecheck', 'tsc --noEmit') :- WorkspaceCwd \= '.'.
% workspace_cwd_dirname(WorkspaceCwd, Dirname) :-
% split_atom(WorkspaceCwd, '/', '', XS),
% [_, Dirname].
% <folder-name> in 'packages/<folder-name>'
workspace_cwd_dirname(WorkspaceCwd, Dirname) :-
atomic_list_concat(['packages', Dirname], '/', WorkspaceCwd).
% Folders in "packages" have a package name "@effect-use/<folder-name>"
gen_enforced_field(WorkspaceCwd, 'name', PackageName) :-
% not the monorepo root
WorkspaceCwd \= '.',
% package name and folder name must match
workspace_cwd_dirname(WorkspaceCwd, Dirname),
atom_concat('@effect-use/', Dirname, PackageName).