@ontrails/core 1.0.0-beta.14 → 1.0.0-beta.16
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/CHANGELOG.md +74 -0
- package/README.md +73 -24
- package/package.json +11 -4
- package/src/activation-provenance.ts +111 -0
- package/src/activation-source-compatibility.ts +430 -0
- package/src/activation-source-projection.ts +221 -0
- package/src/activation-source.ts +91 -0
- package/src/blob-ref.ts +51 -0
- package/src/branded.ts +1 -1
- package/src/context.ts +28 -4
- package/src/contour.ts +344 -0
- package/src/cross-batch.ts +69 -0
- package/src/cross-schema.ts +36 -0
- package/src/detours.ts +8 -0
- package/src/draft.ts +60 -52
- package/src/error-projection.ts +51 -0
- package/src/errors.ts +245 -48
- package/src/execute.ts +1250 -40
- package/src/fire.ts +1169 -0
- package/src/index.ts +383 -49
- package/src/internal/fork-ctx.ts +69 -0
- package/src/layer-projection.ts +192 -0
- package/src/layer.ts +81 -0
- package/src/observe.ts +361 -0
- package/src/path-security.ts +1 -1
- package/src/permits.ts +12 -0
- package/src/redaction/patterns.ts +6 -3
- package/src/resilience.ts +11 -11
- package/src/resource-config.ts +792 -0
- package/src/resource.ts +175 -0
- package/src/result.ts +18 -0
- package/src/run.ts +7 -6
- package/src/schedule-runtime.ts +689 -0
- package/src/schedule.ts +324 -0
- package/src/serialization.ts +90 -55
- package/src/signal-diagnostics.ts +633 -0
- package/src/signal-ref.ts +87 -0
- package/src/signal.ts +37 -0
- package/src/store/accessor-protocol.ts +56 -0
- package/src/store/index.ts +4 -0
- package/src/structured-examples.ts +245 -0
- package/src/surface-derivation.ts +91 -0
- package/src/surface-filter.ts +176 -0
- package/src/topo.ts +710 -59
- package/src/tracing.ts +345 -0
- package/src/trail.ts +347 -33
- package/src/trails/derive-trail.ts +842 -0
- package/src/trails/index.ts +9 -0
- package/src/trails/ingest.ts +138 -0
- package/src/{internal/trails-db.ts → trails-db.ts} +50 -31
- package/src/transport-error-map.ts +174 -0
- package/src/type-utils.ts +17 -2
- package/src/types.ts +208 -17
- package/src/validate-established-topo.ts +8 -2
- package/src/validate-topo.ts +244 -13
- package/src/validation.ts +58 -1
- package/src/webhook.ts +276 -0
- package/src/workspace.ts +1 -1
- package/src/zod-wrappers.ts +72 -0
- package/.turbo/turbo-build.log +0 -1
- package/.turbo/turbo-lint.log +0 -3
- package/.turbo/turbo-typecheck.log +0 -1
- package/dist/adapters.d.ts +0 -39
- package/dist/adapters.d.ts.map +0 -1
- package/dist/adapters.js +0 -2
- package/dist/adapters.js.map +0 -1
- package/dist/blob-ref.d.ts +0 -20
- package/dist/blob-ref.d.ts.map +0 -1
- package/dist/blob-ref.js +0 -22
- package/dist/blob-ref.js.map +0 -1
- package/dist/branded.d.ts +0 -36
- package/dist/branded.d.ts.map +0 -1
- package/dist/branded.js +0 -89
- package/dist/branded.js.map +0 -1
- package/dist/collections.d.ts +0 -31
- package/dist/collections.d.ts.map +0 -1
- package/dist/collections.js +0 -60
- package/dist/collections.js.map +0 -1
- package/dist/context.d.ts +0 -10
- package/dist/context.d.ts.map +0 -1
- package/dist/context.js +0 -21
- package/dist/context.js.map +0 -1
- package/dist/derive.d.ts +0 -44
- package/dist/derive.d.ts.map +0 -1
- package/dist/derive.js +0 -149
- package/dist/derive.js.map +0 -1
- package/dist/dispatch.d.ts +0 -27
- package/dist/dispatch.d.ts.map +0 -1
- package/dist/dispatch.js +0 -34
- package/dist/dispatch.js.map +0 -1
- package/dist/draft.d.ts +0 -28
- package/dist/draft.d.ts.map +0 -1
- package/dist/draft.js +0 -156
- package/dist/draft.js.map +0 -1
- package/dist/errors.d.ts +0 -83
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js +0 -142
- package/dist/errors.js.map +0 -1
- package/dist/event.d.ts +0 -8
- package/dist/event.d.ts.map +0 -1
- package/dist/event.js +0 -7
- package/dist/event.js.map +0 -1
- package/dist/execute.d.ts +0 -35
- package/dist/execute.d.ts.map +0 -1
- package/dist/execute.js +0 -90
- package/dist/execute.js.map +0 -1
- package/dist/fetch.d.ts +0 -15
- package/dist/fetch.d.ts.map +0 -1
- package/dist/fetch.js +0 -102
- package/dist/fetch.js.map +0 -1
- package/dist/gate.d.ts +0 -17
- package/dist/gate.d.ts.map +0 -1
- package/dist/gate.js +0 -21
- package/dist/gate.js.map +0 -1
- package/dist/guards.d.ts +0 -17
- package/dist/guards.d.ts.map +0 -1
- package/dist/guards.js +0 -25
- package/dist/guards.js.map +0 -1
- package/dist/health.d.ts +0 -18
- package/dist/health.d.ts.map +0 -1
- package/dist/health.js +0 -5
- package/dist/health.js.map +0 -1
- package/dist/index.d.ts +0 -48
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -51
- package/dist/index.js.map +0 -1
- package/dist/internal/topo-saves.d.ts +0 -47
- package/dist/internal/topo-saves.d.ts.map +0 -1
- package/dist/internal/topo-saves.js +0 -310
- package/dist/internal/topo-saves.js.map +0 -1
- package/dist/internal/topo-store-read.d.ts +0 -67
- package/dist/internal/topo-store-read.d.ts.map +0 -1
- package/dist/internal/topo-store-read.js +0 -222
- package/dist/internal/topo-store-read.js.map +0 -1
- package/dist/internal/topo-store.d.ts +0 -12
- package/dist/internal/topo-store.d.ts.map +0 -1
- package/dist/internal/topo-store.js +0 -571
- package/dist/internal/topo-store.js.map +0 -1
- package/dist/internal/trails-db.d.ts +0 -16
- package/dist/internal/trails-db.d.ts.map +0 -1
- package/dist/internal/trails-db.js +0 -118
- package/dist/internal/trails-db.js.map +0 -1
- package/dist/job.d.ts +0 -24
- package/dist/job.d.ts.map +0 -1
- package/dist/job.js +0 -17
- package/dist/job.js.map +0 -1
- package/dist/layer.d.ts +0 -6
- package/dist/layer.d.ts.map +0 -1
- package/dist/layer.js +0 -4
- package/dist/layer.js.map +0 -1
- package/dist/path-security.d.ts +0 -28
- package/dist/path-security.d.ts.map +0 -1
- package/dist/path-security.js +0 -63
- package/dist/path-security.js.map +0 -1
- package/dist/patterns/bulk.d.ts +0 -15
- package/dist/patterns/bulk.d.ts.map +0 -1
- package/dist/patterns/bulk.js +0 -14
- package/dist/patterns/bulk.js.map +0 -1
- package/dist/patterns/change.d.ts +0 -10
- package/dist/patterns/change.d.ts.map +0 -1
- package/dist/patterns/change.js +0 -10
- package/dist/patterns/change.js.map +0 -1
- package/dist/patterns/date-range.d.ts +0 -10
- package/dist/patterns/date-range.d.ts.map +0 -1
- package/dist/patterns/date-range.js +0 -10
- package/dist/patterns/date-range.js.map +0 -1
- package/dist/patterns/index.d.ts +0 -9
- package/dist/patterns/index.d.ts.map +0 -1
- package/dist/patterns/index.js +0 -9
- package/dist/patterns/index.js.map +0 -1
- package/dist/patterns/pagination.d.ts +0 -18
- package/dist/patterns/pagination.d.ts.map +0 -1
- package/dist/patterns/pagination.js +0 -18
- package/dist/patterns/pagination.js.map +0 -1
- package/dist/patterns/progress.d.ts +0 -11
- package/dist/patterns/progress.d.ts.map +0 -1
- package/dist/patterns/progress.js +0 -11
- package/dist/patterns/progress.js.map +0 -1
- package/dist/patterns/sorting.d.ts +0 -13
- package/dist/patterns/sorting.d.ts.map +0 -1
- package/dist/patterns/sorting.js +0 -10
- package/dist/patterns/sorting.js.map +0 -1
- package/dist/patterns/status.d.ts +0 -15
- package/dist/patterns/status.d.ts.map +0 -1
- package/dist/patterns/status.js +0 -9
- package/dist/patterns/status.js.map +0 -1
- package/dist/patterns/timestamps.d.ts +0 -10
- package/dist/patterns/timestamps.d.ts.map +0 -1
- package/dist/patterns/timestamps.js +0 -10
- package/dist/patterns/timestamps.js.map +0 -1
- package/dist/provision-config.d.ts +0 -22
- package/dist/provision-config.d.ts.map +0 -1
- package/dist/provision-config.js +0 -210
- package/dist/provision-config.js.map +0 -1
- package/dist/provision.d.ts +0 -71
- package/dist/provision.d.ts.map +0 -1
- package/dist/provision.js +0 -56
- package/dist/provision.js.map +0 -1
- package/dist/redaction/index.d.ts +0 -4
- package/dist/redaction/index.d.ts.map +0 -1
- package/dist/redaction/index.js +0 -3
- package/dist/redaction/index.js.map +0 -1
- package/dist/redaction/patterns.d.ts +0 -9
- package/dist/redaction/patterns.d.ts.map +0 -1
- package/dist/redaction/patterns.js +0 -39
- package/dist/redaction/patterns.js.map +0 -1
- package/dist/redaction/redactor.d.ts +0 -27
- package/dist/redaction/redactor.d.ts.map +0 -1
- package/dist/redaction/redactor.js +0 -89
- package/dist/redaction/redactor.js.map +0 -1
- package/dist/resilience.d.ts +0 -34
- package/dist/resilience.d.ts.map +0 -1
- package/dist/resilience.js +0 -164
- package/dist/resilience.js.map +0 -1
- package/dist/result.d.ts +0 -57
- package/dist/result.d.ts.map +0 -1
- package/dist/result.js +0 -156
- package/dist/result.js.map +0 -1
- package/dist/run.d.ts +0 -27
- package/dist/run.d.ts.map +0 -1
- package/dist/run.js +0 -34
- package/dist/run.js.map +0 -1
- package/dist/serialization.d.ts +0 -27
- package/dist/serialization.d.ts.map +0 -1
- package/dist/serialization.js +0 -153
- package/dist/serialization.js.map +0 -1
- package/dist/service-config.d.ts +0 -22
- package/dist/service-config.d.ts.map +0 -1
- package/dist/service-config.js +0 -210
- package/dist/service-config.js.map +0 -1
- package/dist/service.d.ts +0 -71
- package/dist/service.d.ts.map +0 -1
- package/dist/service.js +0 -56
- package/dist/service.js.map +0 -1
- package/dist/signal.d.ts +0 -33
- package/dist/signal.d.ts.map +0 -1
- package/dist/signal.js +0 -17
- package/dist/signal.js.map +0 -1
- package/dist/topo-store.d.ts +0 -48
- package/dist/topo-store.d.ts.map +0 -1
- package/dist/topo-store.js +0 -175
- package/dist/topo-store.js.map +0 -1
- package/dist/topo.d.ts +0 -25
- package/dist/topo.d.ts.map +0 -1
- package/dist/topo.js +0 -112
- package/dist/topo.js.map +0 -1
- package/dist/trail.d.ts +0 -96
- package/dist/trail.d.ts.map +0 -1
- package/dist/trail.js +0 -20
- package/dist/trail.js.map +0 -1
- package/dist/type-utils.d.ts +0 -24
- package/dist/type-utils.d.ts.map +0 -1
- package/dist/type-utils.js +0 -12
- package/dist/type-utils.js.map +0 -1
- package/dist/types.d.ts +0 -71
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
- package/dist/validate-established-topo.d.ts +0 -76
- package/dist/validate-established-topo.d.ts.map +0 -1
- package/dist/validate-established-topo.js +0 -43
- package/dist/validate-established-topo.js.map +0 -1
- package/dist/validate-topo.d.ts +0 -24
- package/dist/validate-topo.d.ts.map +0 -1
- package/dist/validate-topo.js +0 -176
- package/dist/validate-topo.js.map +0 -1
- package/dist/validation.d.ts +0 -27
- package/dist/validation.d.ts.map +0 -1
- package/dist/validation.js +0 -165
- package/dist/validation.js.map +0 -1
- package/dist/workspace.d.ts +0 -25
- package/dist/workspace.d.ts.map +0 -1
- package/dist/workspace.js +0 -57
- package/dist/workspace.js.map +0 -1
- package/src/__tests__/blob-ref.test.ts +0 -103
- package/src/__tests__/branded.test.ts +0 -148
- package/src/__tests__/collections.test.ts +0 -126
- package/src/__tests__/context.test.ts +0 -77
- package/src/__tests__/derive.test.ts +0 -260
- package/src/__tests__/errors.test.ts +0 -309
- package/src/__tests__/execute.test.ts +0 -525
- package/src/__tests__/fetch.test.ts +0 -217
- package/src/__tests__/gate.test.ts +0 -125
- package/src/__tests__/guards.test.ts +0 -102
- package/src/__tests__/path-security.test.ts +0 -114
- package/src/__tests__/patterns.test.ts +0 -273
- package/src/__tests__/redaction.test.ts +0 -244
- package/src/__tests__/resilience.test.ts +0 -246
- package/src/__tests__/result.test.ts +0 -155
- package/src/__tests__/run.test.ts +0 -181
- package/src/__tests__/serialization.test.ts +0 -401
- package/src/__tests__/service-config.test.ts +0 -228
- package/src/__tests__/service.test.ts +0 -197
- package/src/__tests__/signal.test.ts +0 -82
- package/src/__tests__/topo-store-read.test.ts +0 -251
- package/src/__tests__/topo-store.test.ts +0 -469
- package/src/__tests__/topo.test.ts +0 -277
- package/src/__tests__/trail-permit.test.ts +0 -60
- package/src/__tests__/trail.test.ts +0 -261
- package/src/__tests__/trails-db.test.ts +0 -191
- package/src/__tests__/type-utils.test.ts +0 -90
- package/src/__tests__/validate-topo.test.ts +0 -489
- package/src/__tests__/validation.test.ts +0 -336
- package/src/__tests__/workspace.test.ts +0 -183
- package/src/event.ts +0 -15
- package/src/gate.ts +0 -44
- package/src/internal/topo-saves.ts +0 -429
- package/src/internal/topo-store-read.ts +0 -473
- package/src/internal/topo-store.ts +0 -1087
- package/src/provision-config.ts +0 -373
- package/src/provision.ts +0 -148
- package/src/topo-store.ts +0 -301
- package/tsconfig.json +0 -9
- package/tsconfig.tsbuildinfo +0 -1
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import { Database } from 'bun:sqlite';
|
|
2
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
3
|
-
import { dirname, join, resolve } from 'node:path';
|
|
4
|
-
import { NotFoundError } from '../errors.js';
|
|
5
|
-
const TRAILS_DIR = '.trails';
|
|
6
|
-
const TRAILS_DB_FILE = 'trails.db';
|
|
7
|
-
const SCHEMA_VERSION_TABLE = 'meta_schema_versions';
|
|
8
|
-
const WORKSPACE_SUBDIRS = ['config', 'dev', 'generated'];
|
|
9
|
-
const REQUIRED_GITIGNORE_LINES = [
|
|
10
|
-
'# Local config overrides',
|
|
11
|
-
'config/',
|
|
12
|
-
'',
|
|
13
|
-
'# Development state',
|
|
14
|
-
'dev/',
|
|
15
|
-
'',
|
|
16
|
-
'# Generated artifacts',
|
|
17
|
-
'generated/',
|
|
18
|
-
'',
|
|
19
|
-
'# Shared Trails database',
|
|
20
|
-
'trails.db',
|
|
21
|
-
'trails.db-shm',
|
|
22
|
-
'trails.db-wal',
|
|
23
|
-
'',
|
|
24
|
-
];
|
|
25
|
-
const resolveRootDir = (rootDir) => resolve(rootDir ?? process.cwd());
|
|
26
|
-
export const resolveTrailsDir = (options) => join(resolveRootDir(options?.rootDir), TRAILS_DIR);
|
|
27
|
-
export const resolveTrailsDbPath = (options) => options?.path
|
|
28
|
-
? resolve(options.path)
|
|
29
|
-
: join(resolveTrailsDir(options), TRAILS_DB_FILE);
|
|
30
|
-
const ensureDbParentDir = (dbPath) => {
|
|
31
|
-
mkdirSync(dirname(dbPath), { recursive: true });
|
|
32
|
-
};
|
|
33
|
-
const GITIGNORE_TEMPLATE = `${REQUIRED_GITIGNORE_LINES.join('\n').trimEnd()}\n`;
|
|
34
|
-
const appendMissingGitignoreLines = (gitignorePath, content) => {
|
|
35
|
-
const existingLines = new Set(content.split('\n').map((l) => l.trim()));
|
|
36
|
-
const missing = REQUIRED_GITIGNORE_LINES.filter((line) => line !== '' && !existingLines.has(line));
|
|
37
|
-
if (missing.length === 0) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
const next = `${content.trimEnd()}\n\n${missing.join('\n')}`;
|
|
41
|
-
writeFileSync(gitignorePath, `${next.trimEnd()}\n`);
|
|
42
|
-
};
|
|
43
|
-
const ensureWorkspaceGitignore = (trailsDir) => {
|
|
44
|
-
const gitignorePath = join(trailsDir, '.gitignore');
|
|
45
|
-
if (!existsSync(gitignorePath)) {
|
|
46
|
-
writeFileSync(gitignorePath, GITIGNORE_TEMPLATE);
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
appendMissingGitignoreLines(gitignorePath, readFileSync(gitignorePath, 'utf8'));
|
|
50
|
-
};
|
|
51
|
-
const ensureWorkspaceDir = (rootDir) => {
|
|
52
|
-
const trailsDir = resolveTrailsDir({ rootDir });
|
|
53
|
-
mkdirSync(trailsDir, { recursive: true });
|
|
54
|
-
for (const subdir of WORKSPACE_SUBDIRS) {
|
|
55
|
-
mkdirSync(join(trailsDir, subdir), { recursive: true });
|
|
56
|
-
}
|
|
57
|
-
ensureWorkspaceGitignore(trailsDir);
|
|
58
|
-
};
|
|
59
|
-
const initializeWritePragmas = (db) => {
|
|
60
|
-
db.run('PRAGMA journal_mode = WAL');
|
|
61
|
-
db.run('PRAGMA synchronous = NORMAL');
|
|
62
|
-
db.run('PRAGMA foreign_keys = ON');
|
|
63
|
-
};
|
|
64
|
-
const ensureSchemaVersionTable = (db) => {
|
|
65
|
-
db.run(`CREATE TABLE IF NOT EXISTS ${SCHEMA_VERSION_TABLE} (
|
|
66
|
-
subsystem TEXT PRIMARY KEY,
|
|
67
|
-
version INTEGER NOT NULL,
|
|
68
|
-
updated_at TEXT NOT NULL
|
|
69
|
-
)`);
|
|
70
|
-
};
|
|
71
|
-
const readSubsystemVersion = (db, subsystem) => {
|
|
72
|
-
const row = db
|
|
73
|
-
.query(`SELECT version FROM ${SCHEMA_VERSION_TABLE} WHERE subsystem = ?`)
|
|
74
|
-
.get(subsystem);
|
|
75
|
-
return row?.version ?? 0;
|
|
76
|
-
};
|
|
77
|
-
const writeSubsystemVersion = (db, subsystem, version) => {
|
|
78
|
-
db.run(`INSERT INTO ${SCHEMA_VERSION_TABLE} (subsystem, version, updated_at)
|
|
79
|
-
VALUES (?, ?, ?)
|
|
80
|
-
ON CONFLICT(subsystem) DO UPDATE SET
|
|
81
|
-
version = excluded.version,
|
|
82
|
-
updated_at = excluded.updated_at`, [subsystem, version, new Date().toISOString()]);
|
|
83
|
-
};
|
|
84
|
-
export const openWriteTrailsDb = (options) => {
|
|
85
|
-
const rootDir = resolveRootDir(options?.rootDir);
|
|
86
|
-
const dbPath = resolveTrailsDbPath(options?.path ? { path: options.path, rootDir } : { rootDir });
|
|
87
|
-
if (options?.path === undefined) {
|
|
88
|
-
ensureWorkspaceDir(rootDir);
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
ensureDbParentDir(dbPath);
|
|
92
|
-
}
|
|
93
|
-
const db = new Database(dbPath, { create: true });
|
|
94
|
-
initializeWritePragmas(db);
|
|
95
|
-
ensureSchemaVersionTable(db);
|
|
96
|
-
return db;
|
|
97
|
-
};
|
|
98
|
-
export const openReadTrailsDb = (options) => {
|
|
99
|
-
const dbPath = resolveTrailsDbPath(options);
|
|
100
|
-
if (!existsSync(dbPath)) {
|
|
101
|
-
throw new NotFoundError(`Trails database not found at "${dbPath}". Run a write operation first to initialize it.`);
|
|
102
|
-
}
|
|
103
|
-
const db = new Database(dbPath, { readonly: true });
|
|
104
|
-
db.run('PRAGMA foreign_keys = ON');
|
|
105
|
-
return db;
|
|
106
|
-
};
|
|
107
|
-
export const ensureSubsystemSchema = (db, options) => {
|
|
108
|
-
ensureSchemaVersionTable(db);
|
|
109
|
-
db.transaction(() => {
|
|
110
|
-
const currentVersion = readSubsystemVersion(db, options.subsystem);
|
|
111
|
-
if (currentVersion >= options.version) {
|
|
112
|
-
return;
|
|
113
|
-
}
|
|
114
|
-
options.migrate(currentVersion);
|
|
115
|
-
writeSubsystemVersion(db, options.subsystem, options.version);
|
|
116
|
-
})();
|
|
117
|
-
};
|
|
118
|
-
//# sourceMappingURL=trails-db.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"trails-db.js","sourceRoot":"","sources":["../../src/internal/trails-db.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,UAAU,GAAG,SAAS,CAAC;AAC7B,MAAM,cAAc,GAAG,WAAW,CAAC;AACnC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC;AACpD,MAAM,iBAAiB,GAAG,CAAC,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAU,CAAC;AAClE,MAAM,wBAAwB,GAAG;IAC/B,0BAA0B;IAC1B,SAAS;IACT,EAAE;IACF,qBAAqB;IACrB,MAAM;IACN,EAAE;IACF,uBAAuB;IACvB,YAAY;IACZ,EAAE;IACF,0BAA0B;IAC1B,WAAW;IACX,eAAe;IACf,eAAe;IACf,EAAE;CACH,CAAC;AAiBF,MA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AAC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,OAAiC,EACvB,EAAE;IACZ,MAAM,MAAM,GAAG,mBAAmB,CAAC,OAAO,CAAC,CAAC;IAC5C,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;QACxB,MAAM,IAAI,aAAa,CACrB,iCAAiC,MAAM,kDAAkD,CAC1F,CAAC;IACJ,CAAC;IACD,MAAM,EAAE,GAAG,IAAI,QAAQ,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;IACpD,EAAE,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC;IACnC,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,EAAY,EACZ,OAAqC,EAC/B,EAAE;IACR,wBAAwB,CAAC,EAAE,CAAC,CAAC;IAE7B,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE;QAClB,MAAM,cAAc,GAAG,oBAAoB,CAAC,EAAE,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;QACnE,IAAI,cAAc,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;YACtC,OAAO;QACT,CAAC;QAED,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAChC,qBAAqB,CAAC,EAAE,EAAE,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAChE,CAAC,CAAC,EAAE,CAAC;AACP,CAAC,CAAC"}
|
package/dist/job.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
/**
|
|
3
|
-
* Proof: job-style output schema composes from existing pattern helpers.
|
|
4
|
-
* No dedicated `kind: "job"` needed — regular trails with status+progress output work.
|
|
5
|
-
*/
|
|
6
|
-
export declare const jobOutputSchema: z.ZodObject<{
|
|
7
|
-
completedAt: z.ZodOptional<z.ZodString>;
|
|
8
|
-
error: z.ZodOptional<z.ZodString>;
|
|
9
|
-
jobId: z.ZodString;
|
|
10
|
-
result: z.ZodOptional<z.ZodUnknown>;
|
|
11
|
-
startedAt: z.ZodOptional<z.ZodString>;
|
|
12
|
-
status: z.ZodEnum<{
|
|
13
|
-
cancelled: "cancelled";
|
|
14
|
-
pending: "pending";
|
|
15
|
-
running: "running";
|
|
16
|
-
completed: "completed";
|
|
17
|
-
failed: "failed";
|
|
18
|
-
}>;
|
|
19
|
-
current: z.ZodNumber;
|
|
20
|
-
percentage: z.ZodOptional<z.ZodNumber>;
|
|
21
|
-
total: z.ZodNumber;
|
|
22
|
-
}, z.core.$strip>;
|
|
23
|
-
export type JobOutput = z.infer<typeof jobOutputSchema>;
|
|
24
|
-
//# sourceMappingURL=job.d.ts.map
|
package/dist/job.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"job.d.ts","sourceRoot":"","sources":["../src/job.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;;GAGG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;iBAQ1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
package/dist/job.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { progressFields } from './patterns/progress.js';
|
|
3
|
-
import { statusFields } from './patterns/status.js';
|
|
4
|
-
/**
|
|
5
|
-
* Proof: job-style output schema composes from existing pattern helpers.
|
|
6
|
-
* No dedicated `kind: "job"` needed — regular trails with status+progress output work.
|
|
7
|
-
*/
|
|
8
|
-
export const jobOutputSchema = z.object({
|
|
9
|
-
...progressFields().shape,
|
|
10
|
-
...statusFields().shape,
|
|
11
|
-
completedAt: z.string().optional(),
|
|
12
|
-
error: z.string().optional(),
|
|
13
|
-
jobId: z.string(),
|
|
14
|
-
result: z.unknown().optional(),
|
|
15
|
-
startedAt: z.string().optional(),
|
|
16
|
-
});
|
|
17
|
-
//# sourceMappingURL=job.js.map
|
package/dist/job.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"job.js","sourceRoot":"","sources":["../src/job.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACtC,GAAG,cAAc,EAAE,CAAC,KAAK;IACzB,GAAG,YAAY,EAAE,CAAC,KAAK;IACvB,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,MAAM,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;IAC9B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC"}
|
package/dist/layer.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Gate } from './gate.js';
|
|
2
|
-
/** Backward-compatible alias while `Layer` migrates to `Gate`. */
|
|
3
|
-
export type Layer = Gate;
|
|
4
|
-
/** Backward-compatible alias while `composeLayers()` migrates to `composeGates()`. */
|
|
5
|
-
export declare const composeLayers: <I, O>(gates: readonly Gate[], trail: import("./trail.js").Trail<I, O>, implementation: import("./types.js").Implementation<I, O>) => import("./types.js").Implementation<I, O>;
|
|
6
|
-
//# sourceMappingURL=layer.d.ts.map
|
package/dist/layer.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layer.d.ts","sourceRoot":"","sources":["../src/layer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC,kEAAkE;AAClE,MAAM,MAAM,KAAK,GAAG,IAAI,CAAC;AAEzB,sFAAsF;AACtF,eAAO,MAAM,aAAa,iLAAe,CAAC"}
|
package/dist/layer.js
DELETED
package/dist/layer.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"layer.js","sourceRoot":"","sources":["../src/layer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAMzC,sFAAsF;AACtF,MAAM,CAAC,MAAM,aAAa,GAAG,YAAY,CAAC"}
|
package/dist/path-security.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Path security utilities for preventing path traversal attacks.
|
|
3
|
-
*
|
|
4
|
-
* All functions are runtime-agnostic (Node / Bun compatible).
|
|
5
|
-
*/
|
|
6
|
-
import { PermissionError } from './errors.js';
|
|
7
|
-
import { Result } from './result.js';
|
|
8
|
-
/**
|
|
9
|
-
* Resolves `userPath` relative to `basePath` and ensures it stays within
|
|
10
|
-
* the base directory. Returns the resolved absolute path on success, or a
|
|
11
|
-
* `PermissionError` if the path escapes.
|
|
12
|
-
*
|
|
13
|
-
* Uses lexical path comparison (not `realpath`). Does not follow symlinks —
|
|
14
|
-
* if an attacker can create symlinks inside `basePath`, those could point
|
|
15
|
-
* outside the base. Use `realpath` before calling in symlink-sensitive environments.
|
|
16
|
-
*/
|
|
17
|
-
export declare const securePath: (basePath: string, userPath: string) => Result<string, PermissionError>;
|
|
18
|
-
/**
|
|
19
|
-
* Returns `true` if `userPath` (resolved against `basePath`) stays within
|
|
20
|
-
* `basePath`.
|
|
21
|
-
*/
|
|
22
|
-
export declare const isPathSafe: (basePath: string, userPath: string) => boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Joins multiple path segments, resolves them against `basePath`, and
|
|
25
|
-
* validates the result stays within the base directory.
|
|
26
|
-
*/
|
|
27
|
-
export declare const resolveSafePath: (basePath: string, ...segments: string[]) => Result<string, PermissionError>;
|
|
28
|
-
//# sourceMappingURL=path-security.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path-security.d.ts","sourceRoot":"","sources":["../src/path-security.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAmBrC;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,GACrB,UAAU,MAAM,EAChB,UAAU,MAAM,KACf,MAAM,CAAC,MAAM,EAAE,eAAe,CAgBhC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,GAAI,UAAU,MAAM,EAAE,UAAU,MAAM,KAAG,OAI/D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,GAC1B,UAAU,MAAM,EAChB,GAAG,UAAU,MAAM,EAAE,KACpB,MAAM,CAAC,MAAM,EAAE,eAAe,CAchC,CAAC"}
|
package/dist/path-security.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Path security utilities for preventing path traversal attacks.
|
|
3
|
-
*
|
|
4
|
-
* All functions are runtime-agnostic (Node / Bun compatible).
|
|
5
|
-
*/
|
|
6
|
-
import { resolve, relative, normalize, isAbsolute } from 'node:path';
|
|
7
|
-
import { PermissionError } from './errors.js';
|
|
8
|
-
import { Result } from './result.js';
|
|
9
|
-
// ---------------------------------------------------------------------------
|
|
10
|
-
// Internal
|
|
11
|
-
// ---------------------------------------------------------------------------
|
|
12
|
-
/** Returns true when `target` is equal to or a descendant of `base`. */
|
|
13
|
-
const isWithin = (base, target) => {
|
|
14
|
-
const rel = relative(base, target);
|
|
15
|
-
// Empty string means they are the same directory.
|
|
16
|
-
// A relative path starting with ".." means it escapes.
|
|
17
|
-
// An absolute path means a completely different tree.
|
|
18
|
-
return rel === '' || (!rel.startsWith('..') && !isAbsolute(rel));
|
|
19
|
-
};
|
|
20
|
-
// ---------------------------------------------------------------------------
|
|
21
|
-
// Public API
|
|
22
|
-
// ---------------------------------------------------------------------------
|
|
23
|
-
/**
|
|
24
|
-
* Resolves `userPath` relative to `basePath` and ensures it stays within
|
|
25
|
-
* the base directory. Returns the resolved absolute path on success, or a
|
|
26
|
-
* `PermissionError` if the path escapes.
|
|
27
|
-
*
|
|
28
|
-
* Uses lexical path comparison (not `realpath`). Does not follow symlinks —
|
|
29
|
-
* if an attacker can create symlinks inside `basePath`, those could point
|
|
30
|
-
* outside the base. Use `realpath` before calling in symlink-sensitive environments.
|
|
31
|
-
*/
|
|
32
|
-
export const securePath = (basePath, userPath) => {
|
|
33
|
-
const base = resolve(basePath);
|
|
34
|
-
const resolved = resolve(base, userPath);
|
|
35
|
-
if (!isWithin(base, resolved)) {
|
|
36
|
-
return Result.err(new PermissionError(`Path traversal detected: "${userPath}" escapes "${basePath}"`, {
|
|
37
|
-
context: { basePath: base, resolved, userPath },
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
return Result.ok(resolved);
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Returns `true` if `userPath` (resolved against `basePath`) stays within
|
|
44
|
-
* `basePath`.
|
|
45
|
-
*/
|
|
46
|
-
export const isPathSafe = (basePath, userPath) => {
|
|
47
|
-
const base = resolve(basePath);
|
|
48
|
-
const resolved = resolve(base, userPath);
|
|
49
|
-
return isWithin(base, resolved);
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* Joins multiple path segments, resolves them against `basePath`, and
|
|
53
|
-
* validates the result stays within the base directory.
|
|
54
|
-
*/
|
|
55
|
-
export const resolveSafePath = (basePath, ...segments) => {
|
|
56
|
-
const base = resolve(basePath);
|
|
57
|
-
const joined = resolve(base, ...segments.map((s) => normalize(s)));
|
|
58
|
-
if (!isWithin(base, joined)) {
|
|
59
|
-
return Result.err(new PermissionError(`Path traversal detected: segments escape "${basePath}"`, { context: { basePath: base, resolved: joined, segments } }));
|
|
60
|
-
}
|
|
61
|
-
return Result.ok(joined);
|
|
62
|
-
};
|
|
63
|
-
//# sourceMappingURL=path-security.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path-security.js","sourceRoot":"","sources":["../src/path-security.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAErE,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,8EAA8E;AAC9E,WAAW;AACX,8EAA8E;AAE9E,wEAAwE;AACxE,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,MAAc,EAAW,EAAE;IACzD,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IACnC,kDAAkD;IAClD,uDAAuD;IACvD,sDAAsD;IACtD,OAAO,GAAG,KAAK,EAAE,IAAI,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;AACnE,CAAC,CAAC;AAEF,8EAA8E;AAC9E,aAAa;AACb,8EAA8E;AAE9E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,QAAgB,EAChB,QAAgB,EACiB,EAAE;IACnC,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;IAC/B,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAEzC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,CAAC;QAC9B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ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bulk operation schema helpers for @ontrails/core/patterns
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/** Bulk operation output wrapper for a given item schema. */
|
|
6
|
-
export declare const bulkOutput: <T>(itemSchema: z.ZodType<T>) => z.ZodObject<{
|
|
7
|
-
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8
|
-
index: z.ZodNumber;
|
|
9
|
-
message: z.ZodString;
|
|
10
|
-
}, z.core.$strip>>>;
|
|
11
|
-
failed: z.ZodNumber;
|
|
12
|
-
items: z.ZodArray<z.ZodType<T, unknown, z.core.$ZodTypeInternals<T, unknown>>>;
|
|
13
|
-
succeeded: z.ZodNumber;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
//# sourceMappingURL=bulk.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bulk.d.ts","sourceRoot":"","sources":["../../src/patterns/bulk.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,6DAA6D;AAC7D,eAAO,MAAM,UAAU,GAAI,CAAC,EAAE,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;;;;;;;;iBAQlD,CAAC"}
|
package/dist/patterns/bulk.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Bulk operation schema helpers for @ontrails/core/patterns
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/** Bulk operation output wrapper for a given item schema. */
|
|
6
|
-
export const bulkOutput = (itemSchema) => z.object({
|
|
7
|
-
errors: z
|
|
8
|
-
.array(z.object({ index: z.number(), message: z.string() }))
|
|
9
|
-
.optional(),
|
|
10
|
-
failed: z.number(),
|
|
11
|
-
items: z.array(itemSchema),
|
|
12
|
-
succeeded: z.number(),
|
|
13
|
-
});
|
|
14
|
-
//# sourceMappingURL=bulk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bulk.js","sourceRoot":"","sources":["../../src/patterns/bulk.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,6DAA6D;AAC7D,MAAM,CAAC,MAAM,UAAU,GAAG,CAAI,UAAwB,EAAE,EAAE,CACxD,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC;SACN,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;SAC3D,QAAQ,EAAE;IACb,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;IAC1B,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Change-tracking schema helpers for @ontrails/core/patterns
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/** Before/after change output for a given schema. */
|
|
6
|
-
export declare const changeOutput: <T>(schema: z.ZodType<T>) => z.ZodObject<{
|
|
7
|
-
after: z.ZodType<T, unknown, z.core.$ZodTypeInternals<T, unknown>>;
|
|
8
|
-
before: z.ZodOptional<z.ZodType<T, unknown, z.core.$ZodTypeInternals<T, unknown>>>;
|
|
9
|
-
}, z.core.$strip>;
|
|
10
|
-
//# sourceMappingURL=change.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"change.d.ts","sourceRoot":"","sources":["../../src/patterns/change.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qDAAqD;AACrD,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,QAAQ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;;;iBAIhD,CAAC"}
|
package/dist/patterns/change.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Change-tracking schema helpers for @ontrails/core/patterns
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/** Before/after change output for a given schema. */
|
|
6
|
-
export const changeOutput = (schema) => z.object({
|
|
7
|
-
after: schema,
|
|
8
|
-
before: schema.optional(),
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=change.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"change.js","sourceRoot":"","sources":["../../src/patterns/change.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,qDAAqD;AACrD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAI,MAAoB,EAAE,EAAE,CACtD,CAAC,CAAC,MAAM,CAAC;IACP,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE;CAC1B,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Date-range schema helpers for @ontrails/core/patterns
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/** Optional since/until date-range fields. */
|
|
6
|
-
export declare const dateRangeFields: () => z.ZodObject<{
|
|
7
|
-
since: z.ZodOptional<z.ZodString>;
|
|
8
|
-
until: z.ZodOptional<z.ZodString>;
|
|
9
|
-
}, z.core.$strip>;
|
|
10
|
-
//# sourceMappingURL=date-range.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date-range.d.ts","sourceRoot":"","sources":["../../src/patterns/date-range.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8CAA8C;AAC9C,eAAO,MAAM,eAAe;;;iBAIxB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Date-range schema helpers for @ontrails/core/patterns
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/** Optional since/until date-range fields. */
|
|
6
|
-
export const dateRangeFields = () => z.object({
|
|
7
|
-
since: z.string().optional(),
|
|
8
|
-
until: z.string().optional(),
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=date-range.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"date-range.js","sourceRoot":"","sources":["../../src/patterns/date-range.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,8CAA8C;AAC9C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAClC,CAAC,CAAC,MAAM,CAAC;IACP,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7B,CAAC,CAAC"}
|
package/dist/patterns/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { paginationFields, paginatedOutput } from './pagination.js';
|
|
2
|
-
export { bulkOutput } from './bulk.js';
|
|
3
|
-
export { timestampFields } from './timestamps.js';
|
|
4
|
-
export { dateRangeFields } from './date-range.js';
|
|
5
|
-
export { sortFields } from './sorting.js';
|
|
6
|
-
export { statusFields } from './status.js';
|
|
7
|
-
export { changeOutput } from './change.js';
|
|
8
|
-
export { progressFields } from './progress.js';
|
|
9
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/patterns/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/patterns/index.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { paginationFields, paginatedOutput } from './pagination.js';
|
|
2
|
-
export { bulkOutput } from './bulk.js';
|
|
3
|
-
export { timestampFields } from './timestamps.js';
|
|
4
|
-
export { dateRangeFields } from './date-range.js';
|
|
5
|
-
export { sortFields } from './sorting.js';
|
|
6
|
-
export { statusFields } from './status.js';
|
|
7
|
-
export { changeOutput } from './change.js';
|
|
8
|
-
export { progressFields } from './progress.js';
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/patterns/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pagination schema helpers for @ontrails/core/patterns
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/** Common pagination input fields. */
|
|
6
|
-
export declare const paginationFields: () => z.ZodObject<{
|
|
7
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
8
|
-
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
9
|
-
offset: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
10
|
-
}, z.core.$strip>;
|
|
11
|
-
/** Paginated output wrapper for a given item schema. */
|
|
12
|
-
export declare const paginatedOutput: <T>(itemSchema: z.ZodType<T>) => z.ZodObject<{
|
|
13
|
-
hasMore: z.ZodBoolean;
|
|
14
|
-
items: z.ZodArray<z.ZodType<T, unknown, z.core.$ZodTypeInternals<T, unknown>>>;
|
|
15
|
-
nextCursor: z.ZodOptional<z.ZodString>;
|
|
16
|
-
total: z.ZodNumber;
|
|
17
|
-
}, z.core.$strip>;
|
|
18
|
-
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/patterns/pagination.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sCAAsC;AACtC,eAAO,MAAM,gBAAgB;;;;iBAKzB,CAAC;AAEL,wDAAwD;AACxD,eAAO,MAAM,eAAe,GAAI,CAAC,EAAE,YAAY,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;;;;;iBAMvD,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pagination schema helpers for @ontrails/core/patterns
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/** Common pagination input fields. */
|
|
6
|
-
export const paginationFields = () => z.object({
|
|
7
|
-
cursor: z.string().optional(),
|
|
8
|
-
limit: z.number().optional().default(20),
|
|
9
|
-
offset: z.number().optional().default(0),
|
|
10
|
-
});
|
|
11
|
-
/** Paginated output wrapper for a given item schema. */
|
|
12
|
-
export const paginatedOutput = (itemSchema) => z.object({
|
|
13
|
-
hasMore: z.boolean(),
|
|
14
|
-
items: z.array(itemSchema),
|
|
15
|
-
nextCursor: z.string().optional(),
|
|
16
|
-
total: z.number(),
|
|
17
|
-
});
|
|
18
|
-
//# sourceMappingURL=pagination.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../src/patterns/pagination.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sCAAsC;AACtC,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE,CACnC,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,CAAC;IACxC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;CACzC,CAAC,CAAC;AAEL,wDAAwD;AACxD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAI,UAAwB,EAAE,EAAE,CAC7D,CAAC,CAAC,MAAM,CAAC;IACP,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;IACpB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC;IAC1B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Progress schema helpers for @ontrails/core/patterns
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/** Progress tracking fields. */
|
|
6
|
-
export declare const progressFields: () => z.ZodObject<{
|
|
7
|
-
current: z.ZodNumber;
|
|
8
|
-
percentage: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
total: z.ZodNumber;
|
|
10
|
-
}, z.core.$strip>;
|
|
11
|
-
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../src/patterns/progress.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gCAAgC;AAChC,eAAO,MAAM,cAAc;;;;iBAKvB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Progress schema helpers for @ontrails/core/patterns
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/** Progress tracking fields. */
|
|
6
|
-
export const progressFields = () => z.object({
|
|
7
|
-
current: z.number(),
|
|
8
|
-
percentage: z.number().optional(),
|
|
9
|
-
total: z.number(),
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=progress.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../src/patterns/progress.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gCAAgC;AAChC,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE,CACjC,CAAC,CAAC,MAAM,CAAC;IACP,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE;IACnB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;CAClB,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sorting schema helpers for @ontrails/core/patterns
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/** Sort fields constrained to a set of allowed column names. */
|
|
6
|
-
export declare const sortFields: <const T extends string>(allowedFields: [T, ...T[]]) => z.ZodObject<{
|
|
7
|
-
sortBy: z.ZodOptional<z.ZodEnum<{ [k_1 in T]: k_1; } extends infer T_1 ? { [k in keyof T_1]: T_1[k]; } : never>>;
|
|
8
|
-
sortOrder: z.ZodDefault<z.ZodOptional<z.ZodEnum<{
|
|
9
|
-
asc: "asc";
|
|
10
|
-
desc: "desc";
|
|
11
|
-
}>>>;
|
|
12
|
-
}, z.core.$strip>;
|
|
13
|
-
//# sourceMappingURL=sorting.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sorting.d.ts","sourceRoot":"","sources":["../../src/patterns/sorting.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gEAAgE;AAChE,eAAO,MAAM,UAAU,GAAI,KAAK,CAAC,CAAC,SAAS,MAAM,EAC/C,eAAe,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;;;;;;iBAKxB,CAAC"}
|
package/dist/patterns/sorting.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sorting schema helpers for @ontrails/core/patterns
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/** Sort fields constrained to a set of allowed column names. */
|
|
6
|
-
export const sortFields = (allowedFields) => z.object({
|
|
7
|
-
sortBy: z.enum(allowedFields).optional(),
|
|
8
|
-
sortOrder: z.enum(['asc', 'desc']).optional().default('asc'),
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=sorting.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sorting.js","sourceRoot":"","sources":["../../src/patterns/sorting.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gEAAgE;AAChE,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,aAA0B,EAC1B,EAAE,CACF,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,QAAQ,EAAE;IACxC,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;CAC7D,CAAC,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Status schema helpers for @ontrails/core/patterns
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/** Standard workflow status field. */
|
|
6
|
-
export declare const statusFields: () => z.ZodObject<{
|
|
7
|
-
status: z.ZodEnum<{
|
|
8
|
-
cancelled: "cancelled";
|
|
9
|
-
failed: "failed";
|
|
10
|
-
pending: "pending";
|
|
11
|
-
running: "running";
|
|
12
|
-
completed: "completed";
|
|
13
|
-
}>;
|
|
14
|
-
}, z.core.$strip>;
|
|
15
|
-
//# sourceMappingURL=status.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/patterns/status.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sCAAsC;AACtC,eAAO,MAAM,YAAY;;;;;;;;iBAGrB,CAAC"}
|
package/dist/patterns/status.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Status schema helpers for @ontrails/core/patterns
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/** Standard workflow status field. */
|
|
6
|
-
export const statusFields = () => z.object({
|
|
7
|
-
status: z.enum(['pending', 'running', 'completed', 'failed', 'cancelled']),
|
|
8
|
-
});
|
|
9
|
-
//# sourceMappingURL=status.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/patterns/status.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sCAAsC;AACtC,MAAM,CAAC,MAAM,YAAY,GAAG,GAAG,EAAE,CAC/B,CAAC,CAAC,MAAM,CAAC;IACP,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC;CAC3E,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Timestamp schema helpers for @ontrails/core/patterns
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/** Standard createdAt / updatedAt fields. */
|
|
6
|
-
export declare const timestampFields: () => z.ZodObject<{
|
|
7
|
-
createdAt: z.ZodString;
|
|
8
|
-
updatedAt: z.ZodString;
|
|
9
|
-
}, z.core.$strip>;
|
|
10
|
-
//# sourceMappingURL=timestamps.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timestamps.d.ts","sourceRoot":"","sources":["../../src/patterns/timestamps.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,6CAA6C;AAC7C,eAAO,MAAM,eAAe;;;iBAIxB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Timestamp schema helpers for @ontrails/core/patterns
|
|
3
|
-
*/
|
|
4
|
-
import { z } from 'zod';
|
|
5
|
-
/** Standard createdAt / updatedAt fields. */
|
|
6
|
-
export const timestampFields = () => z.object({
|
|
7
|
-
createdAt: z.string(),
|
|
8
|
-
updatedAt: z.string(),
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=timestamps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"timestamps.js","sourceRoot":"","sources":["../../src/patterns/timestamps.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,6CAA6C;AAC7C,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE,CAClC,CAAC,CAAC,MAAM,CAAC;IACP,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;CACtB,CAAC,CAAC"}
|