Derive a stable, per-project identifier for self-managed secret/config store
paths. Read from the project package.jsonname (sanitized) so it is
identical at CLI set-time and at deploy/runtime, and independent of the deploy
context (standalone vs pipeline stage). Falls back to app.
Parameters
projectDir: string
absolute path to the project root (the dir with package.json).
Derive a stable, per-project identifier for self-managed secret/config store paths. Read from the project
package.jsonname(sanitized) so it is identical at CLI set-time and at deploy/runtime, and independent of the deploy context (standalone vs pipeline stage). Falls back toapp.