@volter/twin-fly 0.1.0 → 0.1.1
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.
- package/dist/src/fly-machines.js +2 -2
- package/package.json +3 -3
- package/src/fly-machines.ts +2 -2
package/dist/src/fly-machines.js
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
// speaks): e.g. lease responses are WRAPPED `{status:"success", data:{...}}` (fly-go MachineLease),
|
|
41
41
|
// not the OpenAPI's bare Lease schema. See spec-sources.json for the full citation + every
|
|
42
42
|
// ⚠ doc-unverified modeling choice.
|
|
43
|
-
import { applyTwinWrite, projectResources } from '@volter/world-core';
|
|
43
|
+
import { applyTwinWrite, projectResources, worldNow } from '@volter/world-core';
|
|
44
44
|
import { createHash } from 'node:crypto';
|
|
45
45
|
export const SERVICE = 'fly';
|
|
46
46
|
/**
|
|
@@ -96,7 +96,7 @@ export const FLY_MACHINE_STATES = [
|
|
|
96
96
|
// (created_at, instance_id, image_ref, …) so nothing collides; the bare vendor id is re-attached
|
|
97
97
|
// AFTER projection, never written inside `fields`.
|
|
98
98
|
export function nowIso(occurredAt) {
|
|
99
|
-
return occurredAt ??
|
|
99
|
+
return occurredAt ?? worldNow();
|
|
100
100
|
}
|
|
101
101
|
export function nowEpochMs(occurredAt) {
|
|
102
102
|
return Date.parse(nowIso(occurredAt));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volter/twin-fly",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Local Fly.io Machines API twin (api.machines.dev v1: apps/machines/volumes/secrets CRUD, machine lifecycle states+events, leases, wait) whose execution plane is REAL local Docker — control plane twinned, containers genuinely run. Built on @volter/world-core.",
|
|
5
5
|
"author": "Volter (https://github.com/volter-ai)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,12 +36,12 @@
|
|
|
36
36
|
"postpack": "node ../../../scripts/publish/prepare-publish.mjs postpack"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@volter/world-core": "2.0.
|
|
39
|
+
"@volter/world-core": "2.0.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/bun": "^1.2.20",
|
|
43
43
|
"@types/node": "^24.0.0",
|
|
44
|
-
"@volter/world-core": "2.0.
|
|
44
|
+
"@volter/world-core": "2.0.1",
|
|
45
45
|
"@volter/world-tooling": "0.1.0",
|
|
46
46
|
"typescript": "^5.9.0"
|
|
47
47
|
},
|
package/src/fly-machines.ts
CHANGED
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
// speaks): e.g. lease responses are WRAPPED `{status:"success", data:{...}}` (fly-go MachineLease),
|
|
41
41
|
// not the OpenAPI's bare Lease schema. See spec-sources.json for the full citation + every
|
|
42
42
|
// ⚠ doc-unverified modeling choice.
|
|
43
|
-
import { applyTwinWrite, projectResources } from '@volter/world-core';
|
|
43
|
+
import { applyTwinWrite, projectResources, worldNow } from '@volter/world-core';
|
|
44
44
|
import { createHash } from 'node:crypto';
|
|
45
45
|
|
|
46
46
|
export const SERVICE = 'fly';
|
|
@@ -172,7 +172,7 @@ export type FlyMachineState = typeof FLY_MACHINE_STATES[number];
|
|
|
172
172
|
// AFTER projection, never written inside `fields`.
|
|
173
173
|
|
|
174
174
|
export function nowIso(occurredAt?: string): string {
|
|
175
|
-
return occurredAt ??
|
|
175
|
+
return occurredAt ?? worldNow();
|
|
176
176
|
}
|
|
177
177
|
export function nowEpochMs(occurredAt?: string): number {
|
|
178
178
|
return Date.parse(nowIso(occurredAt));
|