@datadog/create-apps 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/dist/bin.js +55 -44
- package/dist/datadog-app.config.schema.json +20 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -66,10 +66,10 @@ Validate the bundled templates and exit. Intended for CI / development of this C
|
|
|
66
66
|
|
|
67
67
|
## Monorepos
|
|
68
68
|
|
|
69
|
-
Use the
|
|
69
|
+
Use the latest release to create an npm workspace and its first Datadog App:
|
|
70
70
|
|
|
71
71
|
```bash
|
|
72
|
-
npm create @datadog/apps@
|
|
72
|
+
npm create @datadog/apps@latest -- my-workspace --monorepo \
|
|
73
73
|
--app-directory first-app --name "First App" --site datadoghq.com
|
|
74
74
|
```
|
|
75
75
|
|
|
@@ -78,7 +78,7 @@ The workspace keeps apps under `apps/*`, shared packages under `packages/*`, sha
|
|
|
78
78
|
When the command detects an existing generated workspace, it adds the requested app to that workspace instead of creating a nested repository:
|
|
79
79
|
|
|
80
80
|
```bash
|
|
81
|
-
npm create @datadog/apps@
|
|
81
|
+
npm create @datadog/apps@latest -- another-app --name "Another App"
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
Each app declares its own site. Interactive app creation prompts for it when `--site` is omitted; non-interactive creation uses `datadoghq.com` unless `--site` is passed.
|
|
@@ -86,7 +86,7 @@ Each app declares its own site. Interactive app creation prompts for it when `--
|
|
|
86
86
|
Create a shared package from inside the workspace with:
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
|
-
npm create @datadog/apps@
|
|
89
|
+
npm create @datadog/apps@latest -- --package shared-utils
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
### `--monorepo`
|
|
@@ -113,7 +113,7 @@ For a new monorepo, create a private GitHub repository with `gh`, set it as `ori
|
|
|
113
113
|
|
|
114
114
|
Set or update `DATADOG_API_KEY` and `DATADOG_APP_KEY` on an existing workspace repository. The repository is read from `--github-repo` or the current `origin` remote.
|
|
115
115
|
|
|
116
|
-
New monorepos include `.github/workflows/validate-datadog-apps.yml` for unconditional pull-request checks and `.github/workflows/deploy-datadog-apps.yml` for path-filtered default-branch uploads. Both execute `.github/scripts/validate-workspace.mjs` for React dependency alignment. The deployment workflow detects affected apps
|
|
116
|
+
New monorepos include `.github/workflows/validate-datadog-apps.yml` for unconditional pull-request checks and `.github/workflows/deploy-datadog-apps.yml` for path-filtered default-branch uploads. Both execute `.github/scripts/validate-workspace.mjs` for React dependency alignment. The deployment workflow detects affected apps, installs the workspace once from the root lockfile, and runs [`DataDog/apps-github-action`](https://github.com/DataDog/apps-github-action) for each selected app directory with the root-installed CLI, each app's own site, and the Git commit as its version name, without requiring an app-owned `upload` script. The repository variable `DD_SITE` overrides every app's site when set.
|
|
117
117
|
|
|
118
118
|
## What Gets Created
|
|
119
119
|
|
|
@@ -121,7 +121,7 @@ The CLI will:
|
|
|
121
121
|
|
|
122
122
|
- Create a new directory for your app
|
|
123
123
|
- Generate all necessary files from the selected template, including:
|
|
124
|
-
- `datadog-app.config.json` — app definition and configuration (`datadogSite`, `id`, `name`)
|
|
124
|
+
- `datadog-app.config.json` — app definition and configuration (`datadogSite`, `id`, `name`, `tags`)
|
|
125
125
|
- `vite.config.ts` — imports `datadog-app.config.json` and maps the flat fields into the `datadogVitePlugin(...)` call, layering env-dependent values on top
|
|
126
126
|
- `package.json` (using the slugified directory name), source files, docs, and agent instructions
|
|
127
127
|
- Integrate Datadog features like ErrorTracking, Metrics, and more... thanks to our [build-plugins](https://github.com/DataDog/build-plugins).
|