Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 0 additions & 5 deletions .changeset/better-geese-scream.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/bitter-rats-fail.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/clean-pants-yawn.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/crazy-eggs-jump.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/empty-badgers-wish.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/flat-ideas-stand.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/four-pens-serve.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/great-eels-grab.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/hungry-hornets-sin.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/late-plums-march.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/late-sloths-flash.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/mean-bushes-help.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/mean-suits-invite.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/rude-carpets-hammer.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/short-deer-sort.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/silent-worms-hear.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/social-cars-go.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tiny-dogs-do.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/yellow-ducks-pump.md

This file was deleted.

102 changes: 58 additions & 44 deletions devkit-schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "DevKit CLI Configuration",
"description": "JSON schema for the .devkitrc configuration file, providing autocompletion and validation. Only the 'javascript' language is currently supported.",
"description": "JSON schema for the .devkitrc configuration file, providing autocompletion and validation.",
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
Expand All @@ -11,7 +11,7 @@
"defaultPackageManager": {
"type": "string",
"description": "The default package manager to use for new projects.",
"enum": ["bun", "npm", "yarn", "deno", "pnpm"],
"enum": ["bun", "npm", "yarn", "pnpm"],
"default": "bun"
},
"cacheStrategy": {
Expand All @@ -32,56 +32,70 @@
},
"templates": {
"type": "object",
"description": "A collection of templates, currently only for JavaScript.",
"description": "A collection of templates, grouped by the canonical language key.",
"properties": {
"javascript": {
"$ref": "#/definitions/languageConfig"
},
"typescript": {
"$ref": "#/definitions/languageConfig"
},
"nodejs": {
"$ref": "#/definitions/languageConfig"
}
},
"additionalProperties": true
}
},
"required": ["settings", "templates"],
"additionalProperties": false,
"definitions": {
"templateConfig": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "A short description of the template."
},
"location": {
"type": "string",
"description": "The location of the template (e.g., local path, GitHub URL, or a CLI command with the {pm} placeholder)."
},
"alias": {
"type": "string",
"description": "A short alias for the template, used with the -t flag."
},
"cacheStrategy": {
"type": "string",
"description": "The caching strategy for this specific template. Overrides global setting.",
"enum": ["always-refresh", "never-refresh", "daily"]
},
"packageManager": {
"type": "string",
"description": "The package manager to use for this specific template. Overrides global setting.",
"enum": ["bun", "npm", "yarn", "pnpm"]
}
},
"required": ["description", "location"],
"additionalProperties": false
},
"languageConfig": {
"type": "object",
"description": "Templates for a specific programming language ecosystem.",
"properties": {
"templates": {
"type": "object",
"description": "Templates for the JavaScript ecosystem.",
"properties": {
"templates": {
"type": "object",
"description": "The available templates for JavaScript.",
"patternProperties": {
"^.*$": {
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "A short description of the template."
},
"location": {
"type": "string",
"description": "The location of the template (e.g., local path, GitHub URL, or a CLI command)."
},
"alias": {
"type": "string",
"description": "A short alias for the template."
},
"cacheStrategy": {
"type": "string",
"description": "The caching strategy for this specific template.",
"enum": ["always-refresh", "never-refresh", "daily"]
},
"packageManager": {
"type": "string",
"description": "The package manager to use for this specific template.",
"enum": ["bun", "npm", "yarn", "deno", "pnpm"]
}
},
"required": ["description", "location"],
"additionalProperties": false
}
},
"additionalProperties": false
"description": "The available templates for this language.",
"patternProperties": {
"^.*$": {
"$ref": "#/definitions/templateConfig"
}
},
"required": ["templates"],
"additionalProperties": false
}
},
"required": ["templates"],
"additionalProperties": false
}
},
"required": ["settings", "templates"],
"additionalProperties": false
}
}
30 changes: 30 additions & 0 deletions packages/devkit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# scaffolder-toolkit

## 2.0.0

### Major Changes

- fb453cd: feat: Centralize configuration management under new 'dk config' command and enhance 'dk list'

### Minor Changes

- 6a4efa2: feat(config): Implement schema validation when loading configuration
- 71930e4: feat: Introduces the new `dk info` command (alias `dk in`) to display comprehensive diagnostic information about the CLI environment. This command reports the CLI version, runtime details (Node.js/Bun), OS, and the existence and location of both global (`~/.devkitrc`) and local (`.devkit.json`) configuration files.
- 3407be6: feat(.github): configure GitHub Discussions for community feedback
- a8a222e: feat(config): Add --yes/-y option to dk init for non-interactive overwrite
- 9dc5384: feat(cli): Improve `add-template` command with interactive flow. Add validation to the `add-template` command to check if a repository or local path exists before saving the template to the configuration.
- e0862aa: feat(option): update 'dk list' filtering to '--where' with new advanced syntax
- c5260ed: feat: refactoring configuration command logic into dedicated, reusable files and adding comprehensive unit tests for init, remove, and update commands, including new wildcard (\*) template resolution.
- 962819a: feat: Add --include-defaults to list commands; enhance template config with {pm} token
- ef9dea7: feat(cli): Add support for language aliases (js, ts, n) in all relevant commands
- 8f1a5a4: feat: Add --mode option to `dk list` and strengthen logger table
- 759300a: feat(list): enhance list command with filter option and improved output

### Patch Changes

- fc5d1d0: refactor: restructure json translation for better organization
- f63786d: fix(scaffolding): Remove partially created project directory on failure
- d0f0683: fix(config): Update config command alias from 'cf' to 'conf'
- dedc1cf: refactor(utils): Complete utility reorganization and introduce core abstractions
- 4e86dee: refactor(cli): implement dynamic help text generation
- 0e259c3: feat: Add short aliases (pm, lang, cache) for configuration keys
- b05f20a: refactor: Move `chalk` and `ora` to a single, centralized file for better code organization.

## 1.0.11

### Patch Changes
Expand Down
6 changes: 4 additions & 2 deletions packages/devkit/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 🚀 Scaffolder-Toolkit (`dk`)

![License](https://img.shields.io/npm/l/scaffolder-toolkit?style=plastic) ![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/IT-WIBRC/dev-tools/ci.yaml?branch=develop&style=plastic) ![npm bundle size](https://img.shields.io/bundlephobia/min/dev-tools?style=plastic&color=green) ![NPM Downloads](https://img.shields.io/npm/dt/scaffolder-toolkit?style=plastic) ![NPM Version](https://img.shields.io/npm/v/scaffolder-toolkit?style=plastic)

A universal CLI for professional developers to automate project scaffolding and streamline workflows.

**Scaffolder-Toolkit** (`dk`) is a powerful command-line tool designed to boost your productivity by automating repetitive tasks. Whether you're setting up a new machine or starting a new project, `dk` is your essential solution for project automation.
Expand Down Expand Up @@ -446,7 +448,7 @@ This is the recommended approach for most developers. Simply add the `$schema` p

```json
{
"$schema": "https://gist.githubusercontent.com/IT-WIBRC/baab4cc74a28af5b23936f5cf576f8e6/raw/ed7445f123554cf5ed7fc6fb727d1faae22a9bed/devkit-schema.json",
"$schema": "https://gist.githubusercontent.com/IT-WIBRC/baab4cc74a28af5b23936f5cf576f8e6/raw/ac5d88b59dd12c0714cacff88711e52e6d5f0e90/devkit-schema.json",
"settings": {
"language": "fr",
"defaultPackageManager": "npm",
Expand Down Expand Up @@ -482,7 +484,7 @@ For VS Code, open your **`settings.json`** file and add the following entry:
"json.schemas": [
{
"fileMatch": [".devkit.json", ".devkitrc"],
"url": "https://gist.githubusercontent.com/IT-WIBRC/baab4cc74a28af5b23936f5cf576f8e6/raw/ed7445f123554cf5ed7fc6fb727d1faae22a9bed/devkit-schema.json"
"url": "https://gist.githubusercontent.com/IT-WIBRC/baab4cc74a28af5b23936f5cf576f8e6/raw/ac5d88b59dd12c0714cacff88711e52e6d5f0e90/devkit-schema.json"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion packages/devkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scaffolder-toolkit",
"version": "1.0.11",
"version": "2.0.0",
"description": "🚀 A universal command-line tool for developers to automate project scaffolding and streamline their workflows.",
"keywords": [
"devkit",
Expand Down
Loading