@substrat-run/kernel 0.141.0 → 0.142.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.
- package/dist/async-invocation-log.d.ts +1 -1
- package/dist/async-invocation-log.d.ts.map +1 -1
- package/dist/async-invocation-log.js +1 -1
- package/dist/async-invocation-log.js.map +1 -1
- package/dist/capability.d.ts +123 -3
- package/dist/capability.d.ts.map +1 -1
- package/dist/capability.js +263 -13
- package/dist/capability.js.map +1 -1
- package/dist/connector-calls.d.ts +3 -72
- package/dist/connector-calls.d.ts.map +1 -1
- package/dist/connector-calls.js +3 -62
- package/dist/connector-calls.js.map +1 -1
- package/dist/index.d.ts +11 -91
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -59
- package/dist/index.js.map +1 -1
- package/dist/invocation-line.d.ts +211 -0
- package/dist/invocation-line.d.ts.map +1 -0
- package/dist/invocation-line.js +33 -0
- package/dist/invocation-line.js.map +1 -0
- package/dist/meters.d.ts +21 -1
- package/dist/meters.d.ts.map +1 -1
- package/dist/meters.js +0 -0
- package/dist/meters.js.map +1 -1
- package/dist/module-log.d.ts +5 -4
- package/dist/module-log.d.ts.map +1 -1
- package/dist/module-log.js +5 -4
- package/dist/module-log.js.map +1 -1
- package/dist/permission-checker.d.ts +23 -0
- package/dist/permission-checker.d.ts.map +1 -1
- package/dist/permission-checker.js.map +1 -1
- package/dist/permission-eval.d.ts.map +1 -1
- package/dist/permission-eval.js +77 -21
- package/dist/permission-eval.js.map +1 -1
- package/dist/platform-sweep.d.ts +81 -1
- package/dist/platform-sweep.d.ts.map +1 -1
- package/dist/platform-sweep.js +125 -0
- package/dist/platform-sweep.js.map +1 -1
- package/dist/scope-copy-ledger.d.ts +49 -0
- package/dist/scope-copy-ledger.d.ts.map +1 -1
- package/dist/scope-copy-ledger.js +43 -0
- package/dist/scope-copy-ledger.js.map +1 -1
- package/dist/scope-host.d.ts +56 -10
- package/dist/scope-host.d.ts.map +1 -1
- package/dist/scope-host.js.map +1 -1
- package/dist/storage-gauge.d.ts +125 -0
- package/dist/storage-gauge.d.ts.map +1 -0
- package/dist/storage-gauge.js +234 -0
- package/dist/storage-gauge.js.map +1 -0
- package/package.json +10 -2
- package/dist/invocation-log.d.ts +0 -447
- package/dist/invocation-log.d.ts.map +0 -1
- package/dist/invocation-log.js +0 -410
- package/dist/invocation-log.js.map +0 -1
- package/dist/platform-call.d.ts +0 -45
- package/dist/platform-call.d.ts.map +0 -1
- package/dist/platform-call.js +0 -63
- package/dist/platform-call.js.map +0 -1
- package/dist/provider-error.d.ts +0 -38
- package/dist/provider-error.d.ts.map +0 -1
- package/dist/provider-error.js +0 -65
- package/dist/provider-error.js.map +0 -1
- package/dist/routed-node.d.ts +0 -87
- package/dist/routed-node.d.ts.map +0 -1
- package/dist/routed-node.js +0 -67
- package/dist/routed-node.js.map +0 -1
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { STORAGE_EXCLUSIONS, scopeStorageSample, } from '@substrat-run/contracts';
|
|
2
|
+
import { assertRowLimit, boundedRetentionDelete } from './scope-host.js';
|
|
3
|
+
/**
|
|
4
|
+
* The stored storage gauge (#1524), as statements both adapters run against their directory:
|
|
5
|
+
* the SQLite host over better-sqlite3, the hosted one inside ControlPlaneDO. Written once so
|
|
6
|
+
* the two cannot keep different histories of the same fleet.
|
|
7
|
+
*
|
|
8
|
+
* One row per (scope, UTC day): the day's LATEST reading, replaced by a later one on the
|
|
9
|
+
* same day. A day holds one number per scope, which is what a byte-day sum needs and no
|
|
10
|
+
* more, so the table grows by at most one row per scope per day, and retention
|
|
11
|
+
* (`STORAGE_GAUGE_RETENTION_MONTHS`) bounds it in time.
|
|
12
|
+
*
|
|
13
|
+
* The rows are written by the scheduled pass (`runPlatformSweep`'s storage phase), which
|
|
14
|
+
* samples only scopes an earlier phase of the same pass already woke. Nothing here reads a
|
|
15
|
+
* scope; serving a figure is a directory read.
|
|
16
|
+
*
|
|
17
|
+
* Beside the samples, `_substrat_scope_storage_attempts` keeps one row per scope: when the
|
|
18
|
+
* phase last TRIED, and the error if the read failed. It is what the phase picks due scopes
|
|
19
|
+
* by. Without it a scope whose read keeps failing would stay due and be retried on every
|
|
20
|
+
* pass, ahead of every scope that can be read, and its error would reach every pass's
|
|
21
|
+
* failure digest. With it, a failing scope is tried once a day like any other, while its last
|
|
22
|
+
* good sample stands.
|
|
23
|
+
*/
|
|
24
|
+
export const SCOPE_STORAGE_DDL = `
|
|
25
|
+
CREATE TABLE IF NOT EXISTS _substrat_scope_storage (
|
|
26
|
+
scope_id TEXT NOT NULL,
|
|
27
|
+
day TEXT NOT NULL,
|
|
28
|
+
tenant_id TEXT NOT NULL,
|
|
29
|
+
bytes INTEGER NOT NULL,
|
|
30
|
+
read_at TEXT NOT NULL,
|
|
31
|
+
PRIMARY KEY (scope_id, day)
|
|
32
|
+
);
|
|
33
|
+
CREATE INDEX IF NOT EXISTS _substrat_scope_storage_tenant ON _substrat_scope_storage (tenant_id, day);
|
|
34
|
+
CREATE INDEX IF NOT EXISTS _substrat_scope_storage_day ON _substrat_scope_storage (day);
|
|
35
|
+
CREATE TABLE IF NOT EXISTS _substrat_scope_storage_attempts (
|
|
36
|
+
scope_id TEXT PRIMARY KEY,
|
|
37
|
+
tenant_id TEXT NOT NULL,
|
|
38
|
+
attempted_at TEXT NOT NULL,
|
|
39
|
+
error TEXT
|
|
40
|
+
);
|
|
41
|
+
`;
|
|
42
|
+
/**
|
|
43
|
+
* The statuses a scope that holds a store can be in: every status but `provisioning` (no
|
|
44
|
+
* store yet) and `reaped` (its store is gone). A non-serving scope (suspended, archiving,
|
|
45
|
+
* archived) still holds its storage until reap, so it is measured and belongs on the bill.
|
|
46
|
+
*/
|
|
47
|
+
export const STORED_SCOPE_STATUSES = ['active', 'suspended', 'archiving', 'archived'];
|
|
48
|
+
/**
|
|
49
|
+
* Whether a scope holds a store to measure (#1524): a `STORED_SCOPE_STATUSES` status, unless
|
|
50
|
+
* it was archived straight from `provisioning` (`archivedFromStatus`). That scope never held
|
|
51
|
+
* data, so it is neither read (a read would create the spine it never had) nor counted. A row
|
|
52
|
+
* archived before the column existed has a null `archivedFromStatus` and is measured, as
|
|
53
|
+
* before. `holdsStoreSql` is the same rule for the directory's SQL.
|
|
54
|
+
*/
|
|
55
|
+
export function holdsStore(scope) {
|
|
56
|
+
if (!STORED_SCOPE_STATUSES.includes(scope.status))
|
|
57
|
+
return false;
|
|
58
|
+
return !((scope.status === 'archived' || scope.status === 'archiving') && scope.archivedFromStatus === 'provisioning');
|
|
59
|
+
}
|
|
60
|
+
/** `holdsStore` over a `scopes` row, with an optional table alias (`'s.'`). */
|
|
61
|
+
export function holdsStoreSql(alias = '') {
|
|
62
|
+
return (`${alias}status IN ('active', 'suspended', 'archiving', 'archived') AND NOT ` +
|
|
63
|
+
`(${alias}status IN ('archiving', 'archived') AND ${alias}archived_from_status IS 'provisioning')`);
|
|
64
|
+
}
|
|
65
|
+
/** How long a day's sample is kept: thirteen months, so a year can be compared with the one before it. */
|
|
66
|
+
export const STORAGE_GAUGE_RETENTION_MONTHS = 13;
|
|
67
|
+
/** How many samples one `pruneScopeStorage` call deletes, by default. */
|
|
68
|
+
export const STORAGE_GAUGE_PRUNE_BATCH = 500;
|
|
69
|
+
/** The most history rows one `listScopeStorage` call returns, and its default. */
|
|
70
|
+
export const STORAGE_HISTORY_LIMIT_MAX = 10_000;
|
|
71
|
+
export const STORAGE_HISTORY_LIMIT_DEFAULT = 1_000;
|
|
72
|
+
/** The UTC day a reading belongs to. */
|
|
73
|
+
export function storageGaugeDay(readAt) {
|
|
74
|
+
return new Date(readAt).toISOString().slice(0, 10);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The first day retention keeps: thirteen calendar months before `nowMs`, as a UTC day. The
|
|
78
|
+
* day is clamped to the target month's last day, so the 31st of a month counts back to the
|
|
79
|
+
* 28th, 29th or 30th rather than rolling forward into the month after.
|
|
80
|
+
*/
|
|
81
|
+
export function storageRetentionHorizon(nowMs) {
|
|
82
|
+
const now = new Date(nowMs);
|
|
83
|
+
const month = now.getUTCMonth() - STORAGE_GAUGE_RETENTION_MONTHS;
|
|
84
|
+
// Day 0 of the following month is the last day of the target month.
|
|
85
|
+
const lastDay = new Date(Date.UTC(now.getUTCFullYear(), month + 1, 0)).getUTCDate();
|
|
86
|
+
return new Date(Date.UTC(now.getUTCFullYear(), month, Math.min(now.getUTCDate(), lastDay))).toISOString().slice(0, 10);
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Record attempts, a statement or two each. Every row is written only for a scope the
|
|
90
|
+
* directory holds UNDER THAT TENANT and has not reaped, so a reading can never land in another
|
|
91
|
+
* tenant's figure, and a scope reaped while its read was in flight leaves no row behind.
|
|
92
|
+
*
|
|
93
|
+
* Every attempt replaces the scope's attempt row. A successful one also upserts the day's
|
|
94
|
+
* sample, which replaces an older reading of that day and never a newer one; a failed one
|
|
95
|
+
* leaves the samples alone, so the last good reading stands. Returns how many SAMPLE rows
|
|
96
|
+
* were written.
|
|
97
|
+
*/
|
|
98
|
+
export function recordScopeStorageRows(sql, readings) {
|
|
99
|
+
let recorded = 0;
|
|
100
|
+
for (const r of readings) {
|
|
101
|
+
const readAt = new Date(r.readAt).toISOString();
|
|
102
|
+
const ok = r.bytes !== null && Number.isInteger(r.bytes) && r.bytes >= 0;
|
|
103
|
+
sql(`INSERT INTO _substrat_scope_storage_attempts (scope_id, tenant_id, attempted_at, error)
|
|
104
|
+
SELECT scope_id, tenant_id, ?, ? FROM scopes
|
|
105
|
+
WHERE scope_id = ? AND tenant_id = ? AND ${holdsStoreSql()}
|
|
106
|
+
ON CONFLICT (scope_id) DO UPDATE SET attempted_at = excluded.attempted_at, error = excluded.error
|
|
107
|
+
WHERE excluded.attempted_at >= _substrat_scope_storage_attempts.attempted_at`, [readAt, r.error ?? null, r.scopeId, r.tenantId]);
|
|
108
|
+
if (!ok)
|
|
109
|
+
continue;
|
|
110
|
+
recorded += sql(`INSERT INTO _substrat_scope_storage (scope_id, day, tenant_id, bytes, read_at)
|
|
111
|
+
SELECT scope_id, ?, tenant_id, ?, ? FROM scopes
|
|
112
|
+
WHERE scope_id = ? AND tenant_id = ? AND ${holdsStoreSql()}
|
|
113
|
+
ON CONFLICT (scope_id, day) DO UPDATE SET bytes = excluded.bytes, read_at = excluded.read_at
|
|
114
|
+
WHERE excluded.read_at >= _substrat_scope_storage.read_at
|
|
115
|
+
RETURNING 1`, [storageGaugeDay(readAt), r.bytes, readAt, r.scopeId, r.tenantId]).length;
|
|
116
|
+
}
|
|
117
|
+
return recorded;
|
|
118
|
+
}
|
|
119
|
+
/** Read samples — see `ScopeStorageFilter`. Every row is parsed on the way out. */
|
|
120
|
+
export function listScopeStorageRows(sql, filter = {}) {
|
|
121
|
+
const where = [holdsStoreSql('s.')];
|
|
122
|
+
const params = [];
|
|
123
|
+
if (filter.tenantId) {
|
|
124
|
+
where.push('s.tenant_id = ?');
|
|
125
|
+
params.push(filter.tenantId);
|
|
126
|
+
}
|
|
127
|
+
if (filter.scopeId) {
|
|
128
|
+
where.push('s.scope_id = ?');
|
|
129
|
+
params.push(filter.scopeId);
|
|
130
|
+
}
|
|
131
|
+
let tail = '';
|
|
132
|
+
// `latest` is joined on the scope's newest day, which the (scope_id, day) key answers with
|
|
133
|
+
// one seek per scope, so a meter read touches one sample per scope however much history
|
|
134
|
+
// retention holds, rather than reading every day and discarding all but the last.
|
|
135
|
+
let latestDay = '';
|
|
136
|
+
if (filter.latest) {
|
|
137
|
+
latestDay = ' AND g.day = (SELECT MAX(m.day) FROM _substrat_scope_storage m WHERE m.scope_id = s.scope_id)';
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
if (filter.since) {
|
|
141
|
+
where.push('g.day >= ?');
|
|
142
|
+
params.push(filter.since);
|
|
143
|
+
}
|
|
144
|
+
if (filter.until) {
|
|
145
|
+
where.push('g.day <= ?');
|
|
146
|
+
params.push(filter.until);
|
|
147
|
+
}
|
|
148
|
+
const limit = assertRowLimit('limit', filter.limit ?? STORAGE_HISTORY_LIMIT_DEFAULT);
|
|
149
|
+
tail = ' LIMIT ?';
|
|
150
|
+
params.push(Math.min(limit, STORAGE_HISTORY_LIMIT_MAX));
|
|
151
|
+
}
|
|
152
|
+
// The join to `scopes` is the belt to the reap's braces: a reaped scope's rows are
|
|
153
|
+
// deleted at reap, and any that survived are still never read.
|
|
154
|
+
const rows = sql(`SELECT g.tenant_id, g.scope_id, g.day, g.bytes, g.read_at
|
|
155
|
+
FROM scopes s
|
|
156
|
+
JOIN _substrat_scope_storage g ON g.scope_id = s.scope_id AND g.tenant_id = s.tenant_id${latestDay}
|
|
157
|
+
WHERE ${where.join(' AND ')}
|
|
158
|
+
ORDER BY g.scope_id, g.day${tail}`, params);
|
|
159
|
+
return rows.map((r) => scopeStorageSample.parse({
|
|
160
|
+
tenantId: r.tenant_id,
|
|
161
|
+
scopeId: r.scope_id,
|
|
162
|
+
day: r.day,
|
|
163
|
+
bytes: r.bytes,
|
|
164
|
+
readAt: r.read_at,
|
|
165
|
+
}));
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Every stored scope's latest attempt — what the storage phase picks due scopes by, and
|
|
169
|
+
* what a meter reading names failing scopes from. `tenantId` narrows to one tenant.
|
|
170
|
+
*/
|
|
171
|
+
export function listScopeStorageAttemptRows(sql, tenantId) {
|
|
172
|
+
const rows = sql(`SELECT a.tenant_id, a.scope_id, a.attempted_at, a.error
|
|
173
|
+
FROM _substrat_scope_storage_attempts a
|
|
174
|
+
JOIN scopes s ON s.scope_id = a.scope_id AND s.tenant_id = a.tenant_id
|
|
175
|
+
WHERE ${holdsStoreSql('s.')}${tenantId ? ' AND s.tenant_id = ?' : ''}
|
|
176
|
+
ORDER BY a.scope_id`, tenantId ? [tenantId] : []);
|
|
177
|
+
return rows.map((r) => ({
|
|
178
|
+
tenantId: r.tenant_id,
|
|
179
|
+
scopeId: r.scope_id,
|
|
180
|
+
attemptedAt: r.attempted_at,
|
|
181
|
+
error: r.error,
|
|
182
|
+
}));
|
|
183
|
+
}
|
|
184
|
+
/** Delete at most `limit` samples older than retention, oldest first. Returns how many went. */
|
|
185
|
+
export function pruneScopeStorageRows(sql, nowMs, limit) {
|
|
186
|
+
return sql(boundedRetentionDelete('_substrat_scope_storage', 'day'), [
|
|
187
|
+
storageRetentionHorizon(nowMs),
|
|
188
|
+
assertRowLimit('limit', limit),
|
|
189
|
+
]).length;
|
|
190
|
+
}
|
|
191
|
+
/** Drop a scope's samples and attempt: its storage is gone, so its history describes nothing billable. */
|
|
192
|
+
export function forgetScopeStorage(sql, scopeId) {
|
|
193
|
+
sql('DELETE FROM _substrat_scope_storage WHERE scope_id = ?', [scopeId]);
|
|
194
|
+
sql('DELETE FROM _substrat_scope_storage_attempts WHERE scope_id = ?', [scopeId]);
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Fold latest samples into one gauge. `total` is the caller's count of stored scopes
|
|
198
|
+
* (`STORED_SCOPE_STATUSES`); samples are expected to be the latest per stored scope
|
|
199
|
+
* (`listScopeStorage({ latest })`), and attempts the latest per stored scope
|
|
200
|
+
* (`listScopeStorageAttempts`).
|
|
201
|
+
*/
|
|
202
|
+
export function foldStorageGauge(samples, total, attempts = []) {
|
|
203
|
+
let failing = 0;
|
|
204
|
+
let lastFailed = null;
|
|
205
|
+
for (const a of attempts) {
|
|
206
|
+
if (a.error === null)
|
|
207
|
+
continue;
|
|
208
|
+
failing += 1;
|
|
209
|
+
if (lastFailed === null || a.attemptedAt > lastFailed)
|
|
210
|
+
lastFailed = a.attemptedAt;
|
|
211
|
+
}
|
|
212
|
+
let bytes = 0;
|
|
213
|
+
let oldest = null;
|
|
214
|
+
let newest = null;
|
|
215
|
+
for (const s of samples) {
|
|
216
|
+
bytes += s.bytes;
|
|
217
|
+
if (oldest === null || s.readAt < oldest)
|
|
218
|
+
oldest = s.readAt;
|
|
219
|
+
if (newest === null || s.readAt > newest)
|
|
220
|
+
newest = s.readAt;
|
|
221
|
+
}
|
|
222
|
+
return {
|
|
223
|
+
basis: 'scope-databases',
|
|
224
|
+
excluded: [...STORAGE_EXCLUSIONS],
|
|
225
|
+
bytes,
|
|
226
|
+
sampled: samples.length,
|
|
227
|
+
total,
|
|
228
|
+
oldestReadAt: oldest,
|
|
229
|
+
newestReadAt: newest,
|
|
230
|
+
failing,
|
|
231
|
+
lastFailedAt: lastFailed,
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
//# sourceMappingURL=storage-gauge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-gauge.js","sourceRoot":"","sources":["../src/storage-gauge.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,kBAAkB,GAKnB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzE;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;CAiBhC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,CAAU,CAAC;AAE/F;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CAAC,KAA6D;IACtF,IAAI,CAAE,qBAA2C,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC;QAAE,OAAO,KAAK,CAAC;IACvF,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,UAAU,IAAI,KAAK,CAAC,MAAM,KAAK,WAAW,CAAC,IAAI,KAAK,CAAC,kBAAkB,KAAK,cAAc,CAAC,CAAC;AACzH,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,aAAa,CAAC,KAAK,GAAG,EAAE;IACtC,OAAO,CACL,GAAG,KAAK,qEAAqE;QAC7E,IAAI,KAAK,2CAA2C,KAAK,yCAAy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I,CAAC,CAAC,KAAK,KAAK,IAAI;YAAE,SAAS;QAC/B,OAAO,IAAI,CAAC,CAAC;QACb,IAAI,UAAU,KAAK,IAAI,IAAI,CAAC,CAAC,WAAW,GAAG,UAAU;YAAE,UAAU,GAAG,CAAC,CAAC,WAAW,CAAC;IACpF,CAAC;IACD,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,MAAM,GAAkB,IAAI,CAAC;IACjC,IAAI,MAAM,GAAkB,IAAI,CAAC;IACjC,KAAK,MAAM,CAAC,IAAI,OAAO,EAAE,CAAC;QACxB,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC;QACjB,IAAI,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,GAAG,MAAM;YAAE,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QAC5D,IAAI,MAAM,KAAK,IAAI,IAAI,CAAC,CAAC,MAAM,GAAG,MAAM;YAAE,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;IAC9D,CAAC;IACD,OAAO;QACL,KAAK,EAAE,iBAAiB;QACxB,QAAQ,EAAE,CAAC,GAAG,kBAAkB,CAAC;QACjC,KAAK;QACL,OAAO,EAAE,OAAO,CAAC,MAAM;QACvB,KAAK;QACL,YAAY,EAAE,MAAsC;QACpD,YAAY,EAAE,MAAsC;QACpD,OAAO;QACP,YAAY,EAAE,UAA0C;KACzD,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@substrat-run/kernel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.142.0",
|
|
4
4
|
"description": "Substrat kernel contracts and services — pure TypeScript, no platform imports (D-14)",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -16,13 +16,21 @@
|
|
|
16
16
|
".": {
|
|
17
17
|
"types": "./dist/index.d.ts",
|
|
18
18
|
"default": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./invocation-line": {
|
|
21
|
+
"types": "./dist/invocation-line.d.ts",
|
|
22
|
+
"default": "./dist/invocation-line.js"
|
|
23
|
+
},
|
|
24
|
+
"./ulid": {
|
|
25
|
+
"types": "./dist/ulid.d.ts",
|
|
26
|
+
"default": "./dist/ulid.js"
|
|
19
27
|
}
|
|
20
28
|
},
|
|
21
29
|
"files": [
|
|
22
30
|
"dist"
|
|
23
31
|
],
|
|
24
32
|
"dependencies": {
|
|
25
|
-
"@substrat-run/contracts": "^0.
|
|
33
|
+
"@substrat-run/contracts": "^0.142.0"
|
|
26
34
|
},
|
|
27
35
|
"devDependencies": {
|
|
28
36
|
"@types/node": "^22.20.5",
|