@_linked/cli 1.30.0 → 1.31.0

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.
@@ -1065,7 +1065,9 @@ export const createOntology = (prefix_1, uriBase_1, ...args_1) => __awaiter(void
1065
1065
  //if this is not a lincd app (but a lincd package instead)
1066
1066
  if (!sourceFolder.includes('frontend')) {
1067
1067
  //then also add an import to index
1068
- let indexPath = addLineToIndex(`import './ontologies/${hyphenName}.js';`, 'ontologies');
1068
+ // Import the register sibling, not the terms module: only the sibling calls
1069
+ // linkedOntology(). See the comment in example-ontology.register.ts.
1070
+ let indexPath = addLineToIndex(`import './ontologies/${hyphenName}.register.js';`, 'ontologies');
1069
1071
  log(`Added an import of this file from ${chalk.magenta(indexPath)}`);
1070
1072
  }
1071
1073
  });
@@ -1865,6 +1867,7 @@ export const createPackage = (name_1, uriBase_1, ...args_1) => __awaiter(void 0,
1865
1867
  'Gruntfile.js',
1866
1868
  'src/package.ts',
1867
1869
  'src/ontologies/example-ontology.ts',
1870
+ 'src/ontologies/example-ontology.register.ts',
1868
1871
  'src/data/example-ontology.json',
1869
1872
  ]
1870
1873
  .map((f) => path.join(targetFolder, f))
@@ -1874,6 +1877,10 @@ export const createPackage = (name_1, uriBase_1, ...args_1) => __awaiter(void 0,
1874
1877
  //rename these to a file name similar to the pkg name
1875
1878
  [
1876
1879
  'src/ontologies/example-ontology.ts',
1880
+ // The register sibling is what index.ts imports; without it here the scaffold keeps a
1881
+ // literal `example-ontology.register.ts` full of unsubstituted `${...}` placeholders and
1882
+ // nothing ever calls linkedOntology().
1883
+ 'src/ontologies/example-ontology.register.ts',
1877
1884
  'src/data/example-ontology.json',
1878
1885
  'src/data/example-ontology.json.d.ts',
1879
1886
  ].forEach((f) => {