Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

Introduce a CLI #50

Merged
merged 31 commits into from
Jan 27, 2025
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
f81ac0c
feat!: setup oclif with a basic 'init' command
EmileRolley Sep 30, 2024
e398310
test: setup tests for the CLI
EmileRolley Oct 1, 2024
af5a39c
feat: install deps with the init command
EmileRolley Oct 1, 2024
66e5b6e
feat(commands/init): add the --pkg-manager flag
EmileRolley Oct 1, 2024
16081c3
ci: use bun to run tests files
EmileRolley Oct 1, 2024
8b035f0
fix(command/init): fix spinning in prod
EmileRolley Oct 1, 2024
b215bbe
feat(command/init): generate README and src/base.publicodes
EmileRolley Oct 1, 2024
9529f57
feat(command/init): ask to install deps
EmileRolley Oct 2, 2024
fb5e4c8
refactor(command): better error handling
EmileRolley Oct 2, 2024
5985901
refactor: typing nitpicks
EmileRolley Oct 2, 2024
32acb8e
refactor(command): better exitWithError API
EmileRolley Oct 2, 2024
bf5e641
feat(compilation): add resolveRuleTypes
EmileRolley Oct 2, 2024
9566a25
feat(command/compile): first version of the compile command
EmileRolley Oct 2, 2024
af207df
feat(command/init): add --yes flag
EmileRolley Oct 3, 2024
92baef5
refactor(command/init): try to have a simplier run function
EmileRolley Oct 3, 2024
bb364df
feat(command/init): setup test with vitest
EmileRolley Oct 3, 2024
ed49480
feat(command/compile): use publicodes object config from the package.…
EmileRolley Oct 24, 2024
853b44a
v1.3.0-0
EmileRolley Oct 24, 2024
5bce220
feat(command/compile): change default output dir and add comments for…
EmileRolley Oct 25, 2024
0bdc172
v1.3.0-1
EmileRolley Oct 25, 2024
3a3f986
nitpicks
EmileRolley Nov 15, 2024
7f15aa0
feat(command/compile): add RuleValue to the genereated d.ts file
EmileRolley Nov 18, 2024
af220eb
refactor(command/compile)!: serialized parsed rules instead of raw rules
EmileRolley Nov 18, 2024
e8ff6e9
v1.3.0-2
EmileRolley Nov 21, 2024
2e0f325
pkg: bump publicodes version
EmileRolley Jan 15, 2025
2ad8c4f
fix: fix package.json
johangirod Jan 27, 2025
e0cb330
fix: use publicodes-build/ instead of build/
EmileRolley Jan 27, 2025
5f3b969
fix(compilation): use the default build dir to find imported models
EmileRolley Jan 27, 2025
86bbf76
ci: setup pgk.pr.new
EmileRolley Jan 27, 2025
a9b6ced
feat: add a 'publicodes dev' command
johangirod Jan 27, 2025
9016817
Merge pull request #51 from publicodes/feat-cli-dev
johangirod Jan 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
nitpicks
  • Loading branch information
EmileRolley committed Nov 15, 2024
commit 3a3f98696de4744a09b665b0fbb065eb7c2f8fb0
10 changes: 5 additions & 5 deletions src/commands/compile.ts
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@ the package.json file under the \`publicodes\` key. For example:

await generateBaseFiles(rawRules, outputDir, pkgName)

p.outro('Compilation complete! 🎉')
p.outro('Compilation done.')
}

async generateDTS(engine: Engine, outputDir: string): Promise<void> {
@@ -130,10 +130,10 @@ export type PString = \`'\${string}'\`
/**
* Corresponding Publicodes situation with types inferred for each rule.
*
* @note
* This represents the situation as needed by the 'setSituation' method of the
* {@link Engine} class with raw values (i.e. string constants are enclosed in
* "''" and boolean values are 'oui' or 'non').
* @note
* This represents the situation as needed by the 'setSituation' method of the
* {@link Engine} class with raw values (i.e. string constants are enclosed in
* "''" and boolean values are 'oui' or 'non').
*/
export type Situation = Partial<{
${serializedRuleTypes}
Loading