Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
90 changes: 90 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,96 @@ updates:
update-types: [version-update:semver-minor]
- dependency-name: string-argv
update-types: [version-update:semver-minor]
- dependency-name: '@borewit/text-codec'
update-types: [version-update:semver-minor]
- dependency-name: '@eslint/config-array'
update-types: [version-update:semver-minor]
- dependency-name: '@eslint/config-helpers'
update-types: [version-update:semver-minor]
- dependency-name: '@eslint/core'
update-types: [version-update:semver-minor]
- dependency-name: '@eslint/plugin-kit'
update-types: [version-update:semver-minor]
- dependency-name: '@humanfs/core'
update-types: [version-update:semver-minor]
- dependency-name: '@humanfs/node'
update-types: [version-update:semver-minor]
- dependency-name: '@humanfs/types'
update-types: [version-update:semver-minor]
- dependency-name: '@humanwhocodes/retry'
update-types: [version-update:semver-minor]
- dependency-name: '@jridgewell/gen-mapping'
update-types: [version-update:semver-minor]
- dependency-name: '@jridgewell/trace-mapping'
update-types: [version-update:semver-minor]
- dependency-name: '@ota-meshi/ast-token-store'
update-types: [version-update:semver-minor]
- dependency-name: '@pkgr/core'
update-types: [version-update:semver-minor]
- dependency-name: '@tokenizer/inflate'
update-types: [version-update:semver-minor]
- dependency-name: '@tokenizer/token'
update-types: [version-update:semver-minor]
- dependency-name: '@tybys/wasm-util'
update-types: [version-update:semver-minor]
- dependency-name: '@types/json5'
update-types: [version-update:semver-minor]
- dependency-name: ast-types-flow
update-types: [version-update:semver-minor]
- dependency-name: buffer-crc32
update-types: [version-update:semver-minor]
- dependency-name: concat-map
update-types: [version-update:semver-minor]
- dependency-name: confbox
update-types: [version-update:semver-minor]
- dependency-name: deep-is
update-types: [version-update:semver-minor]
- dependency-name: eslint-import-resolver-node
update-types: [version-update:semver-minor]
- dependency-name: eslint-json-compat-utils
update-types: [version-update:semver-minor]
- dependency-name: fflate
update-types: [version-update:semver-minor]
- dependency-name: for-each
update-types: [version-update:semver-minor]
- dependency-name: hermes-estree
update-types: [version-update:semver-minor]
- dependency-name: hermes-parser
update-types: [version-update:semver-minor]
- dependency-name: imurmurhash
update-types: [version-update:semver-minor]
- dependency-name: is-unicode-supported
update-types: [version-update:semver-minor]
- dependency-name: json-schema-traverse
update-types: [version-update:semver-minor]
- dependency-name: language-subtag-registry
update-types: [version-update:semver-minor]
- dependency-name: levn
update-types: [version-update:semver-minor]
- dependency-name: napi-postinstall
update-types: [version-update:semver-minor]
- dependency-name: optionator
update-types: [version-update:semver-minor]
- dependency-name: quansync
update-types: [version-update:semver-minor]
- dependency-name: regexp-tree
update-types: [version-update:semver-minor]
- dependency-name: regjsparser
update-types: [version-update:semver-minor]
- dependency-name: stable-hash
update-types: [version-update:semver-minor]
- dependency-name: synckit
update-types: [version-update:semver-minor]
- dependency-name: tinyglobby
update-types: [version-update:semver-minor]
- dependency-name: type-check
update-types: [version-update:semver-minor]
- dependency-name: type-fest
update-types: [version-update:semver-minor]
- dependency-name: xz-decompress
update-types: [version-update:semver-minor]
- dependency-name: yocto-queue
update-types: [version-update:semver-minor]

- package-ecosystem: 'github-actions'
directory: '/'
Expand Down
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,5 @@
- [ ] Tested locally by running the modified `ddx` command against a sample workspace and verifying the terminal output.
- [ ] Added or updated unit/integration tests in the `tests/` directory.
- [ ] Verified ASCII/Unicode fallback formatting via the `--no-unicode` and `--no-color` flags.
- [ ] Verified Shellcheck and ESLint passing on all modified files.
- [ ] ...
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/commit-policy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7
with:
fetch-depth: 0

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v6
uses: actions/checkout@v7

- name: Setup Node via Volta
uses: volta-cli/action@v5
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ handle_output() {
}

run_step "Verifying lockfile" "Lockfile is verified" yarn install --immutable --immutable-cache
run_step "Auditing unstable packages" "" yarn audit:fix --silent --meta
run_step "Formatting staged files" "Staged files are formatted" yarn lint-staged
1 change: 1 addition & 0 deletions .shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
disable=SC1091
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Run these commands from the root directory:
- `yarn setup` β€” Initialize the environment (installs dependencies and configures hooks).
- `yarn cleanup` β€” Perform a deep workspace purge.
- `yarn audit` β€” Run a dependency audit utilizing the internal CLI.
- `yarn new:command` β€” Scaffold a new CLI command structure and boilerplate using Hygen.

---

Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Initializes local environment files from distributed examples across the workspa
ddx env init -f .env.example -t .env
```

<!-- GEN:README:ENV -->

### `ddx deps install`

Installs all workspace dependencies and configures development hooks.
Expand All @@ -52,10 +54,13 @@ Scans lockfiles for unstable dependencies and maps structural risks.

- **Usage:** `ddx deps scan [options]`
- **Example:**

```bash
ddx deps scan --pin-unstable
```

<!-- GEN:README:DEPS -->

### `ddx node pin`

Updates and pins the target Node.js version across your project layers.
Expand All @@ -79,6 +84,8 @@ Validates the system's active Node.js version against workspace boundaries.
ddx node validate
```

<!-- GEN:README:NODE -->

### `ddx pm pin`

Locks and synchronizes the specified Package Manager engine version.
Expand All @@ -93,6 +100,8 @@ Locks and synchronizes the specified Package Manager engine version.
ddx pm pin -n yarn -v 4.17.0 --volta --package-json
```

<!-- GEN:README:PM -->

### `ddx symlink create`

Automates atomic generations of absolute filesystem symbolic links.
Expand All @@ -105,6 +114,10 @@ Automates atomic generations of absolute filesystem symbolic links.
ddx symlink create -ps "./foo ./foo_link ./bar ./bar_link"
```

<!-- GEN:README:SYMLINK -->

<!-- GEN:README:NEW_COMMAND -->

---

## Low-Level Utilities
Expand Down
10 changes: 10 additions & 0 deletions _templates/cli/command/inject_bin_readme_existing.ejs.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
inject: true
to: scripts/bin/README.md
before: "\\bGEN:BIN_README:<%= command_upper %>\\b"
skip_if: "^((?!\\bGEN:BIN_README:<%= command_upper %>\\b)[\\s\\S])*$"
---

### `<%= command %>/<%= subcommand %>.sh` β€” `ddx <%= command %> <%= subcommand %>`

<%= description %>
12 changes: 12 additions & 0 deletions _templates/cli/command/inject_bin_readme_new.ejs.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
inject: true
to: scripts/bin/README.md
before: "\\bGEN:BIN_README:NEW_COMMAND\\b"
skip_if: "\\bGEN:BIN_README:<%= command_upper %>\\b"
---

### `<%= command %>/<%= subcommand %>.sh` β€” `ddx <%= command %> <%= subcommand %>`

<%= description %>

<!-- GEN:BIN_README:<%= command_upper %> -->
7 changes: 7 additions & 0 deletions _templates/cli/command/inject_bin_readme_tree_existing.ejs.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
inject: true
to: scripts/bin/README.md
after: "^β”œβ”€β”€ <%= command %>\\b/"
skip_if: "^(?![\\s\\S]*β”œβ”€β”€ <%= command %>\\b/)"
---
β”‚ β”œβ”€β”€ <%= subcommand %>.sh<%- ' '.repeat(Math.max(1, 24 - subcommand.length - 3)) %># ddx <%= command %> <%= subcommand %>
9 changes: 9 additions & 0 deletions _templates/cli/command/inject_bin_readme_tree_new.ejs.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
inject: true
to: scripts/bin/README.md
before: "\\bGEN:TREE:NEW_COMMAND\\b"
skip_if: "β”œβ”€β”€ <%= command %>\\b/"
---
β”œβ”€β”€ <%= command %>/
β”‚ └── <%= subcommand %>.sh<%- ' '.repeat(Math.max(1, 24 - subcommand.length - 3)) %># ddx <%= command %> <%= subcommand %>
β”‚
7 changes: 7 additions & 0 deletions _templates/cli/command/inject_help_existing.ejs.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
inject: true
to: scripts/bin/cli.sh
before: "\\bGEN:HELP:<%= command_upper %>\\b"
skip_if: "^((?!\\bGEN:HELP:<%= command_upper %>\\b)[\\s\\S])*$"
---
print_root_help_command "" "<%= subcommand %><% if(alias){ %> (<%= alias %>)<% } %>" "<%= description %>"
8 changes: 8 additions & 0 deletions _templates/cli/command/inject_help_new.ejs.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
inject: true
to: scripts/bin/cli.sh
before: "\\bGEN:HELP:NEW_COMMAND\\b"
skip_if: "\\bGEN:HELP:<%= command_upper %>\\b"
---
print_root_help_command "<%= command %>" "<%= subcommand %><% if(alias){ %> (<%= alias %>)<% } %>" "<%= description %>"
# GEN:HELP:<%= command_upper %>
17 changes: 17 additions & 0 deletions _templates/cli/command/inject_readme_existing.ejs.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
inject: true
to: README.md
before: "\\bGEN:README:<%= command_upper %>\\b"
skip_if: "^((?!\\bGEN:README:<%= command_upper %>\\b)[\\s\\S])*$"
---

### `ddx <%= command %> <%= subcommand %>`

<%= description %>

- **Usage:** `ddx <%= command %> <%= subcommand %> -r <val> [options]`
- **Example:**
```bash
ddx <%= command %> <%= subcommand %> -r "value"
```

18 changes: 18 additions & 0 deletions _templates/cli/command/inject_readme_new.ejs.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
inject: true
to: README.md
before: "\\bGEN:README:NEW_COMMAND\\b"
skip_if: "\\bGEN:README:<%= command_upper %>\\b"
---

### `ddx <%= command %> <%= subcommand %>`

<%= description %>

- **Usage:** `ddx <%= command %> <%= subcommand %> -r <val> [options]`
- **Example:**
```bash
ddx <%= command %> <%= subcommand %> -r "value"
```

<!-- GEN:README:<%= command_upper %> -->
7 changes: 7 additions & 0 deletions _templates/cli/command/inject_router_existing.ejs.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
inject: true
to: scripts/bin/cli.sh
before: "\\bGEN:ROUTER:<%= command_upper %>\\b"
skip_if: "^((?!\\bGEN:ROUTER:<%= command_upper %>\\b)[\\s\\S])*$"
---
"<% if(alias){ %><%= alias %>" | "<% } %><%= subcommand %>") bash "$BIN_DIR/<%= command %>/<%= subcommand %>.sh" "$@" ;;
25 changes: 25 additions & 0 deletions _templates/cli/command/inject_router_new.ejs.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
inject: true
to: scripts/bin/cli.sh
before: "\\bGEN:ROUTER:NEW_COMMAND\\b"
skip_if: "\\bGEN:ROUTER:<%= command_upper %>\\b"
---
"<%= command %>")
SUBCOMMAND="$1"
shift

<%= command_upper %>_CONFIG="
CMD_<%= subcommand_upper %> | <%= subcommand %> |<%= alias ? ` ${alias} ` : ' ' %>| | | | <%= description %>
"

if [[ -z "$SUBCOMMAND" || "$SUBCOMMAND" == "--help" || "$SUBCOMMAND" == "-h" || "$SUBCOMMAND" == "help" ]]; then
print_help "ddx <%= command %>" "<%= command %> command Management" "ddx <%= command %> <subcommand> -r <val> [options]" "$<%= command_upper %>_CONFIG"
exit 0
fi

case "$SUBCOMMAND" in
"<% if(alias){ %><%= alias %>" | "<% } %><%= subcommand %>") bash "$BIN_DIR/<%= command %>/<%= subcommand %>.sh" "$@" ;;
# GEN:ROUTER:<%= command_upper %>
*) throw_unknown_command "$COMMAND $SUBCOMMAND" ;;
esac
;;
Loading
Loading