@nuucognition/flint-cli 0.5.6-dev.4 → 0.5.6-dev.5

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.
@@ -1,4 +1,4 @@
1
- // ../../packages/flint/dist/chunk-53NZQOGM.js
1
+ // ../../packages/flint/dist/chunk-MAL7MTPY.js
2
2
  import { mkdir, readFile, writeFile } from "fs/promises";
3
3
  import { homedir } from "os";
4
4
  import { join, resolve } from "path";
@@ -182,7 +182,7 @@ async function cleanRegistryFile() {
182
182
  return result;
183
183
  }
184
184
  async function registerFlintByPath(path, options) {
185
- const { readFlintToml, hasFlintToml } = await import("./mesh-config-BAIYF4KD-Q3ZCQOCZ.js");
185
+ const { readFlintToml, hasFlintToml } = await import("./mesh-config-NTGFUNZL-BZ2GO3JY.js");
186
186
  const isFlint = await hasFlintToml(path);
187
187
  if (!isFlint) {
188
188
  throw new Error(`Not a valid flint: ${path}
@@ -824,7 +824,7 @@ function stringify(obj, { maxDepth = 1e3, numbersAsFloat = false } = {}) {
824
824
  return str;
825
825
  }
826
826
 
827
- // ../../packages/flint/dist/chunk-RYEBTVPB.js
827
+ // ../../packages/flint/dist/chunk-52SE24LG.js
828
828
  import { readFile, writeFile, stat as stat2, mkdir } from "fs/promises";
829
829
  import { join as join2 } from "path";
830
830
  import { randomUUID } from "crypto";
@@ -1073,7 +1073,9 @@ function formatFlintToml(config) {
1073
1073
  for (const [name, decl] of Object.entries(plateDecls)) {
1074
1074
  const fields = {};
1075
1075
  if (decl.title) fields.title = decl.title;
1076
- fields.path = decl.path;
1076
+ if (decl.source) fields.source = decl.source;
1077
+ if (decl.version) fields.version = decl.version;
1078
+ if (decl.path) fields.path = decl.path;
1077
1079
  if (decl.repo) fields.repo = decl.repo;
1078
1080
  lines.push(`${name} = ${inlineTable(fields)}`);
1079
1081
  }
@@ -1263,6 +1265,17 @@ async function addPlateDeclaration(flintPath, name, platePath, options = {}) {
1263
1265
  config.plates[name] = decl;
1264
1266
  await writeFlintToml(flintPath, config);
1265
1267
  }
1268
+ async function setPlateDeclaration(flintPath, name, declaration) {
1269
+ const config = await readFlintToml(flintPath);
1270
+ if (!config) {
1271
+ throw new Error("flint.toml not found");
1272
+ }
1273
+ if (!config.plates) {
1274
+ config.plates = {};
1275
+ }
1276
+ config.plates[name] = declaration;
1277
+ await writeFlintToml(flintPath, config);
1278
+ }
1266
1279
  async function removePlateDeclaration(flintPath, name) {
1267
1280
  const config = await readFlintToml(flintPath);
1268
1281
  if (!config?.plates?.[name]) {
@@ -1280,7 +1293,7 @@ function getPlateDeclarationsFromConfig(config) {
1280
1293
  if (!config?.plates) return {};
1281
1294
  const declarations = {};
1282
1295
  for (const [key, value] of Object.entries(config.plates)) {
1283
- if (value && typeof value === "object" && "path" in value) {
1296
+ if (value && typeof value === "object" && ("path" in value || "source" in value)) {
1284
1297
  declarations[key] = value;
1285
1298
  }
1286
1299
  }
@@ -1551,6 +1564,7 @@ export {
1551
1564
  getWorkspaceRepositories,
1552
1565
  getWorkspaceRepository,
1553
1566
  addPlateDeclaration,
1567
+ setPlateDeclaration,
1554
1568
  removePlateDeclaration,
1555
1569
  getPlateDeclarations,
1556
1570
  getPlateDeclarationsFromConfig,
@@ -2,9 +2,9 @@ import {
2
2
  getMeshExportSources,
3
3
  getSourceRepositories,
4
4
  nameFormats
5
- } from "./chunk-CBGQBE6C.js";
5
+ } from "./chunk-LLLVBA4Q.js";
6
6
 
7
- // ../../packages/flint/dist/chunk-S7VC3H7U.js
7
+ // ../../packages/flint/dist/chunk-7JTCEXQV.js
8
8
  import { readFile, writeFile, mkdir, stat, readdir, unlink } from "fs/promises";
9
9
  import { join } from "path";
10
10
  import { randomUUID } from "crypto";
@@ -15,13 +15,11 @@ import {
15
15
  answerQuestion,
16
16
  applyPresetTemplates,
17
17
  autoFulfillFlints,
18
- buildPlate,
19
18
  checkShardHealth,
20
19
  checkTinderbox,
21
20
  cleanupResolvedSource,
22
21
  clearPresetsCache,
23
22
  cloneObsidian,
24
- clonePlateFromRepo,
25
23
  cloneRepository,
26
24
  cloneShardToDev,
27
25
  cloneSourceRepository,
@@ -32,7 +30,6 @@ import {
32
30
  createIndexMd,
33
31
  createMediaDir,
34
32
  createPersonFile,
35
- createPlate,
36
33
  createRepository,
37
34
  createSession,
38
35
  createTag,
@@ -71,7 +68,6 @@ import {
71
68
  getOpenApps,
72
69
  getPendingQuestion,
73
70
  getPersonFilePath,
74
- getPlate,
75
71
  getPreset,
76
72
  getRebaseBranch,
77
73
  getReferencesMetadataDir,
@@ -102,8 +98,6 @@ import {
102
98
  healShard,
103
99
  healTinderbox,
104
100
  initGit,
105
- initPlateRepo,
106
- installPlateDeps,
107
101
  installShardFromSource,
108
102
  isGitHubSourceSpecifier,
109
103
  isGitInitialized,
@@ -114,8 +108,6 @@ import {
114
108
  isValidFlint,
115
109
  isValidStatus,
116
110
  listInstalledShards,
117
- listPlateTools,
118
- listPlates,
119
111
  listPresets,
120
112
  listRemoteVersionTags,
121
113
  listSessions,
@@ -138,7 +130,6 @@ import {
138
130
  readGlobalConfig,
139
131
  readGlobalConfigSync,
140
132
  readIdentityState,
141
- readPlateManifest,
142
133
  readReferencesState,
143
134
  readSession,
144
135
  readShardManifest,
@@ -153,14 +144,13 @@ import {
153
144
  removeSourceRepositoryFolder,
154
145
  removeTinderboxFlint,
155
146
  renameArtifact,
156
- resolve3,
147
+ resolve2,
157
148
  resolveInstalledShardInfo,
158
149
  resolveSession,
159
150
  resolveShardSource,
160
151
  resolveTinderboxConnections,
161
152
  resolveTranscriptPath,
162
153
  runGit,
163
- runPlateTool,
164
154
  runShardScript,
165
155
  scaffoldNewShard,
166
156
  scanTinderboxFlints,
@@ -170,10 +160,8 @@ import {
170
160
  setSessionInterface,
171
161
  setSessionStatus,
172
162
  setTinderboxIdentity,
173
- spawnPlateDevServer,
174
163
  stringifyShardSource,
175
164
  syncFlint,
176
- syncPlateRepos,
177
165
  syncReferenceMetadata,
178
166
  syncTinderbox,
179
167
  tagExists,
@@ -182,7 +170,6 @@ import {
182
170
  updateArtifactById,
183
171
  updateCurrentRun,
184
172
  updateGitignore,
185
- updatePlateFromRepo,
186
173
  updateRepository,
187
174
  updateSession,
188
175
  updateShards,
@@ -193,7 +180,7 @@ import {
193
180
  writeReferencesState,
194
181
  writeSession,
195
182
  writeTinderboxToml
196
- } from "./chunk-WMXC6KO6.js";
183
+ } from "./chunk-BF3SKNVR.js";
197
184
  import {
198
185
  cleanRegistryFile,
199
186
  findFlintByName,
@@ -208,7 +195,7 @@ import {
208
195
  unregisterFlint,
209
196
  updateFlintEntry,
210
197
  upsertFlintEntry
211
- } from "./chunk-X6OG5PEE.js";
198
+ } from "./chunk-JNIJ5JV6.js";
212
199
  import {
213
200
  runConcurrent
214
201
  } from "./chunk-V7YA5RXL.js";
@@ -225,7 +212,7 @@ import {
225
212
  resolveSource,
226
213
  syncSourceMeshExportMetadata,
227
214
  syncSourceRepoMetadata
228
- } from "./chunk-M3NSYVYR.js";
215
+ } from "./chunk-RD3WIRZN.js";
229
216
  import {
230
217
  buildAllExports,
231
218
  buildExport,
@@ -234,7 +221,27 @@ import {
234
221
  resolveDocument,
235
222
  scanExportEligible,
236
223
  scanExports
237
- } from "./chunk-6MPRSFXI.js";
224
+ } from "./chunk-IUKEMLPH.js";
225
+ import {
226
+ buildPlate,
227
+ clearPlateDevUrl,
228
+ clonePlateFromRepo,
229
+ createPlate,
230
+ getPlate,
231
+ initPlateRepo,
232
+ installPlate,
233
+ installPlateDeps,
234
+ listPlateTools,
235
+ listPlates,
236
+ readPlateManifest,
237
+ runPlateTool,
238
+ setPlateDevUrl,
239
+ spawnPlateDevServer,
240
+ syncDeclaredPlates,
241
+ syncPlateRepos,
242
+ updatePlate,
243
+ updatePlateFromRepo
244
+ } from "./chunk-JCALNZ4D.js";
238
245
  import {
239
246
  FLINT_CONFIG_FILENAME,
240
247
  FLINT_JSON_FILENAME,
@@ -289,6 +296,7 @@ import {
289
296
  removeSourceRepository,
290
297
  removeWorkspaceRepository,
291
298
  resolveShardMode,
299
+ setPlateDeclaration,
292
300
  setPlateRepo,
293
301
  stampSynced,
294
302
  stampVersion,
@@ -296,7 +304,7 @@ import {
296
304
  toSnakeCase,
297
305
  writeFlintJson,
298
306
  writeFlintToml
299
- } from "./chunk-CBGQBE6C.js";
307
+ } from "./chunk-LLLVBA4Q.js";
300
308
  import "./chunk-JSBRDJBE.js";
301
309
  export {
302
310
  FLINT_CONFIG_FILENAME,
@@ -334,6 +342,7 @@ export {
334
342
  cleanRegistryFile,
335
343
  cleanupResolvedSource,
336
344
  cleanupStaleExports,
345
+ clearPlateDevUrl,
337
346
  clearPresetsCache,
338
347
  cloneObsidian,
339
348
  clonePlateFromRepo,
@@ -456,6 +465,7 @@ export {
456
465
  healTinderbox,
457
466
  initGit,
458
467
  initPlateRepo,
468
+ installPlate,
459
469
  installPlateDeps,
460
470
  installShardFromSource,
461
471
  isFlint,
@@ -528,7 +538,7 @@ export {
528
538
  removeTinderboxFlint,
529
539
  removeWorkspaceRepository,
530
540
  renameArtifact,
531
- resolve3 as resolve,
541
+ resolve2 as resolve,
532
542
  resolveDocument,
533
543
  resolveInstalledShardInfo,
534
544
  resolveSession,
@@ -548,6 +558,8 @@ export {
548
558
  setConfigValue,
549
559
  setCurrentRunResult,
550
560
  setIdentity,
561
+ setPlateDeclaration,
562
+ setPlateDevUrl,
551
563
  setPlateRepo,
552
564
  setSessionInterface,
553
565
  setSessionStatus,
@@ -556,6 +568,7 @@ export {
556
568
  stampSynced,
557
569
  stampVersion,
558
570
  stringifyShardSource,
571
+ syncDeclaredPlates,
559
572
  syncFlint,
560
573
  syncPlateRepos,
561
574
  syncReferenceMetadata,
@@ -572,6 +585,7 @@ export {
572
585
  updateCurrentRun,
573
586
  updateFlintEntry,
574
587
  updateGitignore,
588
+ updatePlate,
575
589
  updatePlateFromRepo,
576
590
  updateRepository,
577
591
  updateSession,
@@ -6,8 +6,8 @@ import {
6
6
  resolveDocument,
7
7
  scanExportEligible,
8
8
  scanExports
9
- } from "./chunk-6MPRSFXI.js";
10
- import "./chunk-CBGQBE6C.js";
9
+ } from "./chunk-IUKEMLPH.js";
10
+ import "./chunk-LLLVBA4Q.js";
11
11
  import "./chunk-JSBRDJBE.js";
12
12
  export {
13
13
  buildAllExports,