Skip to content

Commit 5433a0e

Browse files
committed
chore: renamed references to codify.json to codify.jsonc
1 parent cac456b commit 5433a0e

File tree

12 files changed

+22
-22
lines changed

12 files changed

+22
-22
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ USAGE
3737

3838
## `codify apply`
3939

40-
Install or update resources on the system based on a codify.json file.
40+
Install or update resources on the system based on a codify.jsonc file.
4141

4242
```
4343
USAGE
@@ -51,7 +51,7 @@ FLAGS
5151
--debug Print additional debug logs.
5252
5353
DESCRIPTION
54-
Install or update resources on the system based on a codify.json file.
54+
Install or update resources on the system based on a codify.jsonc file.
5555
5656
Codify first generates a plan to determine the necessary execution steps. See
5757
codify plan --help for more details.
@@ -95,7 +95,7 @@ DESCRIPTION
9595
Use Codify to uninstall a supported package or setting on the system.
9696
9797
This command will only work for resources with Codify support. This command
98-
can work with or without a codify.json file.
98+
can work with or without a codify.jsonc file.
9999
100100
Modes:
101101
• If a codify.json file exists, destroy the resource specified in the Codify.json file

src/commands/apply.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ApplyOrchestrator } from '../orchestrators/apply.js';
66

77
export default class Apply extends BaseCommand {
88
static description =
9-
`Install or update resources on the system based on a codify.json file.
9+
`Install or update resources on the system based on a codify.jsonc file.
1010
1111
Codify first generates a plan to determine the necessary execution steps. See
1212
${chalk.bold.bgMagenta(' codify plan --help ')} for more details.

src/commands/destroy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ export default class Destroy extends BaseCommand {
1010
`Use Codify to uninstall a supported package or setting on the system.
1111
1212
This command will only work for resources with Codify support. This command
13-
can work with or without a codify.json file.
13+
can work with or without a codify.jsonc file.
1414
1515
${chalk.bold('Modes:')}
16-
• If a codify.json file exists, destroy the resource specified in the Codify.json file
16+
• If a codify.jsonc file exists, destroy the resource specified in the Codify.jsonc file
1717
with a matching type.
18-
• If a codify.json file doesn't exist, additional information may be asked to identify
18+
• If a codify.jsonc file doesn't exist, additional information may be asked to identify
1919
the specific resource to destroy.
2020
2121
For more information, visit: https://docs.codifycli.com/commands/destory`

src/commands/import.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ export default class Import extends BaseCommand {
1212
`Generate Codify configurations from already installed packages.
1313
1414
Use a space-separated list of arguments to specify the resource types to import.
15-
If a codify.json file already exists, omit arguments to update the file to match the system.
15+
If a codify.jsonc file already exists, omit arguments to update the file to match the system.
1616
1717
${chalk.bold('Modes:')}
18-
1. ${chalk.bold('No args:')} If no args are specified and an *.codify.json already exists, Codify
18+
1. ${chalk.bold('No args:')} If no args are specified and an *.codify.jsonc already exists, Codify
1919
will update the existing file with new changes on the system.
2020
2121
${chalk.underline('Command:')}
@@ -30,7 +30,7 @@ codify import nvm asdf*
3030
codify import \\* (for importing all supported resources)
3131
3232
The results can be saved in one of three ways:
33-
a. To an existing *.codify.json file
33+
a. To an existing *.codify.jsonc file
3434
b. To a new file
3535
c. Printed to the console only
3636

src/commands/init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default class Init extends BaseCommand {
1111
1212
Use this command to automatically generate Codify configs based on
1313
the currently installed system resources. By default, the new file
14-
will be written to ${chalk.bold.bgMagenta(' ~/codify.json ')}.
14+
will be written to ${chalk.bold.bgMagenta(' ~/codify.jsonc ')}.
1515
1616
For more information, visit: https://docs.codifycli.com/commands/init`
1717

src/commands/plan.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import { PlanOrchestrator } from '../orchestrators/plan.js';
44

55
export default class Plan extends BaseCommand {
66
static description =
7-
`Generate an execution plan to apply changes from a codify.json file.
7+
`Generate an execution plan to apply changes from a codify.jsonc file.
88
9-
This plan lists all the changes Codify needs to make to apply the codify.json file.
9+
This plan lists all the changes Codify needs to make to apply the codify.jsonc file.
1010
The plan will not be executed. Behind the scenes, Codify performs a refresh scan to
1111
determine the current configuration and installed resources, then compares them with
1212
the desired configuration to compute the execution plan.

src/common/initialize-plugins.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,19 @@ export class PluginInitOrchestrator {
5858
if (!pathToParse && !allowEmptyProject) {
5959
ctx.subprocessFinished(SubProcessName.PARSE);
6060
ctx.subprocessStarted(SubProcessName.CREATE_ROOT_FILE)
61-
const createRootCodifyFile = await reporter.promptConfirmation('\nNo codify file found. Do you want to create a root file at ~/codify.json?');
61+
const createRootCodifyFile = await reporter.promptConfirmation('\nNo codify file found. Do you want to create a root file at ~/codify.jsonc?');
6262

6363
if (createRootCodifyFile) {
6464
await fs.writeFile(
65-
path.resolve(os.homedir(), 'codify.json'),
65+
path.resolve(os.homedir(), 'codify.jsonc'),
6666
'[]',
6767
{ encoding: 'utf8', flag: 'wx' }
6868
); // flag: 'wx' prevents overwrites if the file exists
6969
}
7070

7171
ctx.subprocessFinished(SubProcessName.CREATE_ROOT_FILE)
7272

73-
console.log('Created ~/codify.json file')
73+
console.log('Created ~/codify.jsonc file')
7474
process.exit(0);
7575
}
7676

src/orchestrators/init.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ Enjoy!
7575

7676
while (!isValidSaveLocation) {
7777
input = (await reporter.promptInput(
78-
`Where to save the new Codify configs? ${chalk.grey.dim('(leave blank for ~/codify.json)')}`,
78+
`Where to save the new Codify configs? ${chalk.grey.dim('(leave blank for ~/codify.jsonc)')}`,
7979
error ? `Invalid location: ${input} already exists` : undefined)
8080
)
81-
input = input ? input : '~/codify.json';
81+
input = input ? input : '~/codify.jsonc';
8282

8383
locationToSave = path.resolve(untildify(resolvePathWithVariables(input)));
8484

src/parser/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Parser {
4242
if (!isDirectory) {
4343
const fileName = path.basename(dirOrFile);
4444
if (!CODIFY_FILE_REGEX.test(fileName)) {
45-
throw new Error(`Invalid file path provided ${dirOrFile} ${fileName}. Expected the file to be *codify.json or *codify.yaml `)
45+
throw new Error(`Invalid file path provided ${dirOrFile} ${fileName}. Expected the file to be *codify.jsonc, *codify.json5, *codify.json, or *codify.yaml `)
4646
}
4747

4848
return [dirOrFile];

src/ui/components/default-component.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ describe('DefaultComponent', () => {
3737

3838
it('Renders the init completed message', () => {
3939
const reporter = new DefaultReporter();
40-
const locationToSave = '~/codify.json'
40+
const locationToSave = '~/codify.jsonc'
4141

4242
reporter.displayMessage(`
4343
🎉🎉 Codify successfully initialized. 🎉🎉

0 commit comments

Comments
 (0)