Commit 486d906
Publish @umbraco-cms/search types-only npm package (#133)
* Publish @umbraco-cms/search types-only npm package
Adds TypeScript declaration publishing for the Core Client so third-party
package authors get type safety when importing @umbraco-cms/search/global
and @umbraco-cms/search/settings.
- tsconfig.types.json: uses emitDeclarationOnly so tsc emits .d.ts files
into dist-types/ without touching the existing dev/build config
- package.json: renamed to @umbraco-cms/search, made public, added exports
map (types-only, no JS — runtime resolution stays via Umbraco importmap),
files: ["dist-types"], peerDependencies for @umbraco-cms/backoffice
- .gitignore: ignores Client/dist-types/
- azure-pipeline.yml: generates declarations, versions with nbgv, packs and
publishes as npm-types artifact; adds Deploy_Npm stage using npmAuthenticate@0
with the existing "NPM - Umbraco Backoffice" service connection, matching
the pattern used in the main CMS pipeline
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Update package-lock.json after renaming Core Client package
npm ci fails when the lock file doesn't match package.json. The
package rename from @umbraco-cms/search-core-client to @umbraco-cms/search
requires a lock file regeneration.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix boolean parameter comparison in Deploy_Npm condition
ADO template boolean parameters expand to true/false (lowercase),
so comparing against the string 'True' never matches. Use the
unquoted boolean form instead.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Remove automatic npm deploy trigger on main/release tags
Deploy_Npm now only runs when the npmDeploy parameter is explicitly set
to true, consistent with how NuGet publishing works for this project.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Remove Deploy_Npm stage in favor of release pipeline
The npm publish will be handled by a classic release pipeline configured
in the DevOps UI, consuming the npm-types artifact published by the
build stage.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Run nbgv cloud upfront to set pipeline build number
Installs nbgv right after the .NET SDK setup and runs nbgv cloud so the
pipeline build number reflects the package version. The npm version
step now reuses the already-installed tool to fetch NpmPackageVersion.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Simplify npm pack pipeline steps
- Add prepack script so npm pack always regenerates types, making the
package self-consistent regardless of who runs it
- Drop the explicit types:generate pipeline step (prepack handles it)
- Merge version + pack into a single bash step with workingDirectory
pointing directly at the workspace
- Reuse the NBGV_NpmPackageVersion variable set by nbgv cloud instead
of re-invoking nbgv get-version
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Fix nbgv cloud variable export and pack destination dir
- nbgv cloud needs -a (--all-vars) to expose computed versions as ADO
pipeline variables; without it, only the build number is updated and
\$(NBGV_NpmPackageVersion) stays unresolved
- npm pack --pack-destination does not create the target directory, so
restore the mkdir -p that was incorrectly trimmed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Expose manifest types, rename Examine workspace, and document npm package
- Re-export ManifestSearchIndexDetailBox + MetaSearchIndexDetailBox from
@umbraco-cms/search/global so extension authors can both reference the
manifest type and have searchIndexDetailBox registered on the global
UmbExtensionManifestMap
- Drop declarationMap from tsconfig.types.json: maps reference src/
paths that are not shipped, so they cannot resolve in consumer
node_modules and were dead weight (cuts published file count ~50%)
- Rename the Examine workspace package from @umbraco-cms/search-examine-client
to @umbraco-cms/search-examine to match the @umbraco-cms/search naming
even while the package stays private
- Add an installation section to docs/backoffice-extensions.md covering
the npm package, the two entry points, and the peer dependency
Verified by packing the tarball, installing it in a fresh test project
alongside @umbraco-cms/backoffice, writing a searchIndexDetailBox
extension, and confirming tsc --noEmit passes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Type ManifestSearchIndexDetailBox conditions as the full config union
ManifestWithDynamicConditions defaults its conditions array to
UmbConditionConfigBase, which strips away the typed properties contributed
by augmentations like UmbSearchIndexProviderNameConditionConfig. Passing
UmbExtensionConditionConfig (the global union of every registered
condition config) restores narrowing so extension authors can write
\`{ alias: 'Umb.Search.Condition.IndexProviderName', oneOf: [...] }\`
inline without an explicit cast.
Found via end-to-end test against an installed @umbraco-cms/search
tarball.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 1a17317 commit 486d906
8 files changed
Lines changed: 57 additions & 9 deletions
File tree
- build
- src
- Umbraco.Cms.Search.Core.Client
- Client
- src
- bundle
- global
- Umbraco.Cms.Search.Provider.Examine/Client
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
| |||
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
69 | 88 | | |
70 | 89 | | |
71 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
4 | 3 | | |
5 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
6 | 17 | | |
7 | 18 | | |
8 | 19 | | |
| 20 | + | |
| 21 | + | |
9 | 22 | | |
10 | 23 | | |
11 | 24 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments