@ankhorage/devtools 1.10.12 → 1.10.13

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.
@@ -3,15 +3,14 @@
3
3
  import { access, readdir, writeFile } from 'node:fs/promises';
4
4
  import { join, resolve } from 'node:path';
5
5
 
6
- import { loadOwnerApis } from './owner-api.mjs';
6
+ import { loadContractsApi } from './owner-api.mjs';
7
7
 
8
8
  const CATEGORY_ROOT = 'src/templates/categories';
9
9
 
10
10
  /*** Regenerate the portable template catalog from canonical template directories. */
11
11
  export async function generateTemplateCatalog(targetDirectory = process.cwd(), appCategories) {
12
12
  const root = resolve(targetDirectory);
13
- const canonicalAppCategories =
14
- appCategories ?? (await loadOwnerApis(root)).contracts.APP_CATEGORIES;
13
+ const canonicalAppCategories = appCategories ?? (await loadContractsApi(root)).APP_CATEGORIES;
15
14
  const categoriesRoot = join(root, CATEGORY_ROOT);
16
15
  const definitions = [];
17
16
 
@@ -71,6 +71,11 @@ export async function loadOwnerApis(targetDirectory = process.cwd()) {
71
71
  };
72
72
  }
73
73
 
74
+ /*** Load only Contracts for tooling that runs before another owner package has been built. */
75
+ export async function loadContractsApi(targetDirectory = process.cwd()) {
76
+ return (await loadOwnerModule(targetDirectory, OWNER_REQUIREMENTS.contracts)).module;
77
+ }
78
+
74
79
  /*** Return installed catalogs and metadata names without copying owner definitions. */
75
80
  export async function inspectOwnerApis(targetDirectory = process.cwd()) {
76
81
  const owners = await loadOwnerApis(targetDirectory);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ankhorage/devtools",
3
- "version": "1.10.12",
3
+ "version": "1.10.13",
4
4
  "description": "Shared development tools and repository standards for Ankhorage",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/ankhorage/devtools#readme",