@frontera-sdk/cli 1.52.40 → 1.52.42

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.
@@ -151,7 +151,7 @@ function namesOf(directory: Directory): RemoteSnapshot['names'] {
151
151
  * brought nothing keeps it, so it is not stale for nothing.
152
152
  */
153
153
  export function snapshotId(snap: RemoteSnapshot): string {
154
- return hash(Object.keys(snap.items).sort().map((r) => `${r}\0${snap.items[r]!.revision ?? ''}\0${snap.items[r]!.hash}`).join('\n'))
154
+ return hash(Object.keys(snap.items).sort((a, b) => (String(a) < String(b) ? -1 : String(a) > String(b) ? 1 : 0)).map((r) => `${r}\0${snap.items[r]!.revision ?? ''}\0${snap.items[r]!.hash}`).join('\n'))
155
155
  }
156
156
 
157
157
  export function readSnapshot(root: string): RemoteSnapshot | null {
@@ -228,15 +228,15 @@ function toSnapshotItem(item: RemoteItem, revision?: string): SnapshotItem {
228
228
  ...(item.id ? { id: item.id } : {}),
229
229
  ...(revision ?? item.revision ? { revision: revision ?? item.revision } : {}),
230
230
  hash: itemHash(item.files),
231
- files: Object.keys(item.files).sort(),
231
+ files: Object.keys(item.files).sort((a, b) => (String(a) < String(b) ? -1 : String(a) > String(b) ? 1 : 0)),
232
232
  ...(item.version ? { version: item.version } : {}),
233
233
  unresolved: item.unresolved,
234
234
  notes: item.notes,
235
235
  requires: item.requires ?? [],
236
236
  ...(item.portability ? { portability: item.portability } : {}),
237
237
  ...(item.state ? { state: item.state } : {}),
238
- ...(item.assets?.length ? { assets: item.assets.map((a) => a.path).sort() } : {}),
239
- ...(item.recovered?.length ? { recovered: [...item.recovered].sort() } : {}),
238
+ ...(item.assets?.length ? { assets: item.assets.map((a) => a.path).sort((a, b) => (String(a) < String(b) ? -1 : String(a) > String(b) ? 1 : 0)) } : {}),
239
+ ...(item.recovered?.length ? { recovered: [...item.recovered].sort((a, b) => (String(a) < String(b) ? -1 : String(a) > String(b) ? 1 : 0)) } : {}),
240
240
  }
241
241
  }
242
242
 
package/src/scopes.ts CHANGED
@@ -54,7 +54,7 @@ export function commandScope(meta: {
54
54
 
55
55
  /** For prose: the organization-scoped nouns that actually reach the service. */
56
56
  export function orgScopedServiceNouns(): string[] {
57
- return [...ORG_SCOPED_NOUNS].filter((n) => n !== 'auth' && n !== 'kit').sort()
57
+ return [...ORG_SCOPED_NOUNS].filter((n) => n !== 'auth' && n !== 'kit').sort((a, b) => (String(a) < String(b) ? -1 : String(a) > String(b) ? 1 : 0))
58
58
  }
59
59
 
60
60
  /**