@jini-ai/devops 0.6.15-rc.1 → 0.6.15
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/agent-jobs/jobs.js +3 -2
- package/dist/checks/hardwiring-node.js +16 -6
- package/dist/checks/hardwiring.js +38 -16
- package/dist/checks/memory-soak.js +2 -1
- package/dist/checks/node.d.ts +0 -1
- package/dist/checks/node.js +7 -1
- package/dist/checks/published-types/index.js +5 -2
- package/dist/deploy/naming.js +4 -5
- package/dist/deploy/node.js +4 -2
- package/dist/deploy/reachability.js +26 -23
- package/dist/dns/plan.js +2 -1
- package/dist/dns/records.js +7 -3
- package/dist/dns/registry.js +4 -2
- package/dist/local-dev/index.js +7 -3
- package/dist/packaging/electron/imports.js +5 -3
- package/dist/packaging/electron/node.js +7 -1
- package/dist/packaging/electron/staging.js +23 -16
- package/dist/packaging/electron/typescript.js +8 -3
- package/dist/source-control/repository-target.js +6 -3
- package/dist/static-export/contracts.d.ts +4 -5
- package/dist/static-export/css-urls.d.ts +16 -0
- package/dist/static-export/css-urls.js +66 -0
- package/dist/static-export/html-url-locations.js +6 -2
- package/dist/static-export/node-adapters.js +8 -3
- package/dist/static-export/runner.js +40 -30
- package/dist/static-export/transforms.js +45 -29
- package/package.json +6 -6
package/dist/agent-jobs/jobs.js
CHANGED
|
@@ -64,7 +64,7 @@ export async function runAgentJobs(required, optional = {}) {
|
|
|
64
64
|
ids.add(job.id);
|
|
65
65
|
}
|
|
66
66
|
await fs.mkdir({ path: options.outputDirectory });
|
|
67
|
-
const results =
|
|
67
|
+
const results = Array.from({ length: jobs.length });
|
|
68
68
|
let cursor = 0;
|
|
69
69
|
async function runOne(job) {
|
|
70
70
|
const base = path.join(options.outputDirectory, job.id);
|
|
@@ -101,7 +101,8 @@ export async function runAgentJobs(required, optional = {}) {
|
|
|
101
101
|
}
|
|
102
102
|
async function worker() {
|
|
103
103
|
while (cursor < jobs.length) {
|
|
104
|
-
const index = cursor
|
|
104
|
+
const index = cursor;
|
|
105
|
+
cursor += 1;
|
|
105
106
|
results[index] = await runOne(jobs[index]);
|
|
106
107
|
}
|
|
107
108
|
}
|
|
@@ -5,6 +5,12 @@ import { existsSync, readFileSync, readdirSync, writeFileSync } from 'node:fs';
|
|
|
5
5
|
import { dirname, join, relative, resolve } from 'node:path';
|
|
6
6
|
import { isBuiltin } from 'node:module';
|
|
7
7
|
import { diffHardwiringDebt, HARDWIRING_RULES, syntaxError } from './hardwiring.js';
|
|
8
|
+
const SKIPPED_DIRECTORY_NAMES = new Set(['node_modules', 'dist', 'build', 'coverage', 'release', 'release-verify', 'staging', '__tests__', '__measurements__', 'fixtures', 'vendor', '.git', '.build']);
|
|
9
|
+
/** JS/TS source that is not a test; declaration files only when asked for. */
|
|
10
|
+
function isAuthoredSource({ file, declarations }) {
|
|
11
|
+
const includesDeclarations = declarations || !/\.d\.[cm]?ts$/.test(file);
|
|
12
|
+
return /\.[cm]?[jt]sx?$/.test(file) && !/\.(?:test|spec)\./.test(file) && includesDeclarations;
|
|
13
|
+
}
|
|
8
14
|
/** Authored inventory excludes generated output, fixtures and tests. O(directory entries). */
|
|
9
15
|
export function sourceFiles({ directory, declarations = false }, _options = {}) {
|
|
10
16
|
const found = [];
|
|
@@ -12,12 +18,13 @@ export function sourceFiles({ directory, declarations = false }, _options = {})
|
|
|
12
18
|
if (!existsSync(dir))
|
|
13
19
|
return;
|
|
14
20
|
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
15
|
-
if (
|
|
21
|
+
if (SKIPPED_DIRECTORY_NAMES.has(entry.name))
|
|
16
22
|
continue;
|
|
17
23
|
const file = join(dir, entry.name);
|
|
18
|
-
|
|
24
|
+
const isDirectory = entry.isDirectory();
|
|
25
|
+
if (isDirectory)
|
|
19
26
|
visit(file);
|
|
20
|
-
|
|
27
|
+
if (!isDirectory && isAuthoredSource({ file, declarations }))
|
|
21
28
|
found.push(file);
|
|
22
29
|
}
|
|
23
30
|
}
|
|
@@ -103,14 +110,17 @@ function publicTargets(directory, exports) {
|
|
|
103
110
|
select(record[condition]);
|
|
104
111
|
}
|
|
105
112
|
function select(value) {
|
|
106
|
-
if (typeof value === 'string')
|
|
113
|
+
if (typeof value === 'string') {
|
|
107
114
|
selectPath(value);
|
|
108
|
-
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (Array.isArray(value)) {
|
|
109
118
|
const candidate = value.find(item => item !== null);
|
|
110
119
|
if (candidate !== undefined)
|
|
111
120
|
select(candidate);
|
|
121
|
+
return;
|
|
112
122
|
}
|
|
113
|
-
|
|
123
|
+
if (value && typeof value === 'object')
|
|
114
124
|
selectRecord(value);
|
|
115
125
|
}
|
|
116
126
|
select(exports);
|
|
@@ -11,21 +11,38 @@ export const HARDWIRING_RULES = [
|
|
|
11
11
|
'HW1-env-default', 'HW2-vendor-adapter', 'HW3-module-state', 'HW4-injected-fetch',
|
|
12
12
|
'HW5-jini-export', 'HW6-boot-default', 'HW7-public-react', 'HW8-provider-url', 'HW9-plugin-import',
|
|
13
13
|
];
|
|
14
|
+
/** Vendor SDK packages matched by exact name (or a subpath of it). Scoped vendors are in VENDOR_SCOPES. */
|
|
15
|
+
const VENDOR_PACKAGES = new Set([
|
|
16
|
+
'better-sqlite3', 'pg', 'postgres', 'mysql', 'mysql2', 'sqlite3', '@electric-sql/pglite', 'openai', '@anthropic-ai/sdk',
|
|
17
|
+
'@google/genai', '@google/generative-ai', '@supabase/supabase-js', '@libsql/client', 'composio-core', 'resend', 'stripe',
|
|
18
|
+
'replicate', '@fal-ai/client', 'sharp', 'undici', 'node-pty', 'playwright', 'playwright-core', 'puppeteer', 'puppeteer-core',
|
|
19
|
+
]);
|
|
20
|
+
const VENDOR_SCOPES = /^@(?:aws-sdk|azure|google-cloud|ai-sdk|tavily|composio|e2b)\//;
|
|
21
|
+
/** The package a bare specifier names: its first segment, or first two for a scoped package. */
|
|
22
|
+
function packageName(specifier) {
|
|
23
|
+
return specifier.split('/').slice(0, specifier.startsWith('@') ? 2 : 1).join('/');
|
|
24
|
+
}
|
|
14
25
|
/** Bind the installed compiler, keeping this optional parser out of the runtime dependency graph.
|
|
15
26
|
* Inspection is O(n) AST nodes, plus lexical-scope scans for bare fetch calls; no external I/O.
|
|
16
27
|
* Only the rule-identifying value is hashed for debt identity and never included in diagnostics (it may contain secrets).
|
|
17
28
|
*/
|
|
18
29
|
export function createHardwiringInspector({ compiler: c }, _options = {}) {
|
|
19
30
|
function parse({ file, source }, _options = {}) {
|
|
20
|
-
const tree = c.createSourceFile(file, source, c.ScriptTarget.Latest, true,
|
|
31
|
+
const tree = c.createSourceFile(file, source, c.ScriptTarget.Latest, true, scriptKind(file));
|
|
21
32
|
const failure = syntaxError({ tree, file });
|
|
22
33
|
if (failure)
|
|
23
34
|
throw failure;
|
|
24
35
|
return tree;
|
|
25
36
|
}
|
|
37
|
+
function scriptKind(file) {
|
|
38
|
+
if (/\.[jt]sx$/.test(file))
|
|
39
|
+
return c.ScriptKind.TSX;
|
|
40
|
+
return /\.[cm]?js$/.test(file) ? c.ScriptKind.JS : c.ScriptKind.TS;
|
|
41
|
+
}
|
|
26
42
|
function member(node, name) {
|
|
27
|
-
|
|
28
|
-
|
|
43
|
+
if (c.isPropertyAccessExpression(node))
|
|
44
|
+
return node.name.text === name;
|
|
45
|
+
return c.isElementAccessExpression(node) && c.isStringLiteralLike(node.argumentExpression) && node.argumentExpression.text === name;
|
|
29
46
|
}
|
|
30
47
|
function env(node) {
|
|
31
48
|
return member(node, 'env') && 'expression' in node && c.isIdentifier(node.expression) &&
|
|
@@ -121,15 +138,14 @@ export function createHardwiringInspector({ compiler: c }, _options = {}) {
|
|
|
121
138
|
}
|
|
122
139
|
// `provider-plugins/` holds provider plugin sources: each is a vendor adapter by definition.
|
|
123
140
|
function adapter(file) {
|
|
124
|
-
return /(?:^|\/)(?:adapters?|kernel|providers?|provider-plugins)(
|
|
141
|
+
return /(?:^|\/)(?:adapters?|kernel|providers?|provider-plugins)[/.]/.test(file) || /\.adapter\.[^.]+$/.test(file);
|
|
125
142
|
}
|
|
126
143
|
function urlOwner(file) {
|
|
127
|
-
return adapter(file) || /(?:^|\/)catalogs?
|
|
144
|
+
return adapter(file) || /(?:^|\/)catalogs?[/.]/.test(file);
|
|
128
145
|
}
|
|
129
146
|
function vendor(specifier) {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
/^(?:node-pty|playwright(?:-core)?|puppeteer(?:-core)?)(?:$|\/)/.test(specifier) ||
|
|
147
|
+
// A vendor scope matches any of its packages; the named packages match themselves and their subpaths.
|
|
148
|
+
return VENDOR_PACKAGES.has(packageName(specifier)) || VENDOR_SCOPES.test(specifier) ||
|
|
133
149
|
/^(?:@[^/]+\/(?:sdk|[^/]+-sdk)|[^@/]+-sdk)(?:$|\/)/.test(specifier);
|
|
134
150
|
}
|
|
135
151
|
function moduleScope(node) {
|
|
@@ -160,14 +176,17 @@ export function createHardwiringInspector({ compiler: c }, _options = {}) {
|
|
|
160
176
|
return true;
|
|
161
177
|
return false;
|
|
162
178
|
}
|
|
179
|
+
function isGlobalThisFetch(value) {
|
|
180
|
+
if (!value || !member(value, 'fetch') || !('expression' in value))
|
|
181
|
+
return false;
|
|
182
|
+
const target = value.expression;
|
|
183
|
+
return c.isIdentifier(target) && target.text === 'globalThis';
|
|
184
|
+
}
|
|
163
185
|
function statementBindsFetch(statement) {
|
|
164
186
|
if (c.isVariableStatement(statement))
|
|
165
187
|
return statement.declarationList.declarations.some((d) => {
|
|
166
188
|
// Renaming the global to a local `fetch` is still a global call, not an injected port.
|
|
167
|
-
|
|
168
|
-
const nativeAlias = value && member(value, 'fetch') && 'expression' in value &&
|
|
169
|
-
c.isIdentifier(value.expression) && value.expression.text === 'globalThis';
|
|
170
|
-
return bindsFetch(d.name) && !nativeAlias;
|
|
189
|
+
return bindsFetch(d.name) && !isGlobalThisFetch(d.initializer);
|
|
171
190
|
});
|
|
172
191
|
if (c.isFunctionDeclaration(statement))
|
|
173
192
|
return statement.name?.text === 'fetch';
|
|
@@ -183,8 +202,9 @@ export function createHardwiringInspector({ compiler: c }, _options = {}) {
|
|
|
183
202
|
while (c.isParenthesizedExpression(expression.parent))
|
|
184
203
|
expression = expression.parent;
|
|
185
204
|
const parent = expression.parent;
|
|
186
|
-
|
|
187
|
-
|
|
205
|
+
if (c.isBinaryExpression(parent))
|
|
206
|
+
return parent.operatorToken.kind === c.SyntaxKind.QuestionQuestionToken && parent.right === expression;
|
|
207
|
+
return (c.isParameter(parent) || c.isBindingElement(parent)) && parent.initializer === expression;
|
|
188
208
|
}
|
|
189
209
|
/** Binding defaults and initializers are implementation; debt identity is only the declared names.
|
|
190
210
|
* Array holes retain their slots so moving a name changes its positional identity. */
|
|
@@ -196,7 +216,9 @@ export function createHardwiringInspector({ compiler: c }, _options = {}) {
|
|
|
196
216
|
function mutableModuleState(node, tree) {
|
|
197
217
|
if (!c.isVariableDeclaration(node) || !moduleScope(node) || !c.isVariableDeclarationList(node.parent))
|
|
198
218
|
return false;
|
|
199
|
-
|
|
219
|
+
// A flag test, not a boolean `&&`: the Const bit marks `const` (and `await using`) lists.
|
|
220
|
+
const constBinding = (node.parent.flags & c.NodeFlags.Const) !== 0;
|
|
221
|
+
if (!constBinding)
|
|
200
222
|
return true;
|
|
201
223
|
if (!node.initializer || !c.isNewExpression(node.initializer) || !c.isIdentifier(node.initializer.expression))
|
|
202
224
|
return false;
|
|
@@ -256,7 +278,7 @@ export function createHardwiringInspector({ compiler: c }, _options = {}) {
|
|
|
256
278
|
const found = inspectImports(input, tree, refs);
|
|
257
279
|
const report = (node, rule, reason, identity) => found.push(violation(tree, node, rule, reason, identity));
|
|
258
280
|
const jini = input.mode === 'jini';
|
|
259
|
-
const envExempt = /(?:^|\/)(?:bin|cli|testing)
|
|
281
|
+
const envExempt = /(?:^|\/)(?:bin|cli|testing)[/.]/.test(input.file);
|
|
260
282
|
const ownsUrls = urlOwner(input.file);
|
|
261
283
|
if (!jini && !refs.some((ref) => ref.specifier.startsWith('@jini-ai/'))) {
|
|
262
284
|
for (const item of exportedFunctions({ tree }))
|
|
@@ -45,7 +45,8 @@ export function evaluateMemoryFloors({ baselineSamples, checkpoints }, { limit =
|
|
|
45
45
|
if (tailGrowth > limit / 2)
|
|
46
46
|
failures.push('rising tail');
|
|
47
47
|
}
|
|
48
|
-
|
|
48
|
+
// Without a slope check, every checkpoint is held to the limit instead.
|
|
49
|
+
if (!checkSlope && floors.some(floor => (floor - baselineFloor) / baselineFloor > limit))
|
|
49
50
|
failures.push('checkpoint floor');
|
|
50
51
|
return { pass: failures.length === 0, baselineFloor, floors, growth, tailGrowth, failures };
|
|
51
52
|
}
|
package/dist/checks/node.d.ts
CHANGED
|
@@ -7,7 +7,6 @@ export type { HardwiringSource, HardwiringViolation } from './hardwiring.js';
|
|
|
7
7
|
export declare function createNodeFilesystem(_args: Record<string, never>): FilesystemPort;
|
|
8
8
|
/** Uses Node's environment precedence: exported variables win over file values. Requires Node 20.12+. */
|
|
9
9
|
export declare function createNodeEnvLoader(_args: Record<string, never>): EnvLoaderPort;
|
|
10
|
-
/** Shell-free runner; captures compiler output and reports signals/spawn failures as null exits. */
|
|
11
10
|
export declare function createNodeProcessRunner(_args: Record<string, never>, { maxBuffer, timeoutMs }?: {
|
|
12
11
|
maxBuffer?: number;
|
|
13
12
|
timeoutMs?: number;
|
package/dist/checks/node.js
CHANGED
|
@@ -29,11 +29,17 @@ export function createNodeEnvLoader(_args) {
|
|
|
29
29
|
return { load: ({ path: file }) => { process.loadEnvFile(file); } };
|
|
30
30
|
}
|
|
31
31
|
/** Shell-free runner; captures compiler output and reports signals/spawn failures as null exits. */
|
|
32
|
+
/** 0 on success, the child's numeric exit status on failure, or null when it never exited normally. */
|
|
33
|
+
function processExitCode(error) {
|
|
34
|
+
if (!error)
|
|
35
|
+
return 0;
|
|
36
|
+
return typeof error.code === 'number' ? error.code : null;
|
|
37
|
+
}
|
|
32
38
|
export function createNodeProcessRunner(_args, { maxBuffer = 32 * 1024 * 1024, timeoutMs = 300_000 } = {}) {
|
|
33
39
|
return {
|
|
34
40
|
run: ({ command, args, cwd }) => new Promise((resolve) => {
|
|
35
41
|
execFile(command, [...args], { cwd, encoding: 'utf8', maxBuffer, timeout: timeoutMs }, (error, stdout, stderr) => {
|
|
36
|
-
const exitCode =
|
|
42
|
+
const exitCode = processExitCode(error);
|
|
37
43
|
resolve({ exitCode, stdout, stderr: stderr || error?.message || '' });
|
|
38
44
|
});
|
|
39
45
|
}),
|
|
@@ -21,12 +21,15 @@ export function parseDiagnosticBlocks({ output }) {
|
|
|
21
21
|
const blocks = [];
|
|
22
22
|
let current = [];
|
|
23
23
|
for (const line of output.replace(/\r\n/g, '\n').split('\n')) {
|
|
24
|
-
|
|
24
|
+
const startsDiagnostic = /^\S.*\(\d+,\d+\): error TS\d+:/.test(line) || /^error TS\d+:/.test(line);
|
|
25
|
+
if (startsDiagnostic) {
|
|
25
26
|
if (current.length)
|
|
26
27
|
blocks.push(current.join('\n').trimEnd());
|
|
27
28
|
current = [line];
|
|
29
|
+
continue;
|
|
28
30
|
}
|
|
29
|
-
|
|
31
|
+
// Continuation lines belong to the open diagnostic; lines before the first one are dropped.
|
|
32
|
+
if (current.length)
|
|
30
33
|
current.push(line);
|
|
31
34
|
}
|
|
32
35
|
if (current.length)
|
package/dist/deploy/naming.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { trimChars, trimCharsEnd } from '@jini-ai/core/primitives';
|
|
1
2
|
/**
|
|
2
3
|
* Shared label-sanitizing helpers deploy targets use to turn a caller-supplied `projectName` into a
|
|
3
4
|
* provider-safe identifier (lowercase, hyphenated, length-capped). Lifted
|
|
@@ -11,14 +12,12 @@
|
|
|
11
12
|
* @overallScore 100/100
|
|
12
13
|
*/
|
|
13
14
|
export function safeProjectLabel({ raw, maxLength }) {
|
|
14
|
-
|
|
15
|
+
const collapsed = String(raw)
|
|
15
16
|
.normalize('NFKD')
|
|
16
17
|
.toLowerCase()
|
|
17
18
|
.replace(/[^a-z0-9-]/g, '-')
|
|
18
|
-
.replace(/-+/g, '-')
|
|
19
|
-
|
|
20
|
-
.slice(0, maxLength)
|
|
21
|
-
.replace(/-+$/g, '');
|
|
19
|
+
.replace(/-+/g, '-');
|
|
20
|
+
return trimCharsEnd({ text: trimChars({ text: collapsed, chars: '-' }).slice(0, maxLength), chars: '-' });
|
|
22
21
|
}
|
|
23
22
|
/** DNS-label-safe variant (63-char cap, the DNS label limit). */
|
|
24
23
|
export function safeDnsLabel({ raw }) {
|
package/dist/deploy/node.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Agent } from 'undici';
|
|
2
2
|
import { assertSafePublicUrl, createValidatingLookup } from '@jini-ai/platform';
|
|
3
3
|
function isLookupAddress(value) {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
if (value === null || typeof value !== 'object')
|
|
5
|
+
return false;
|
|
6
|
+
const hasAddress = 'address' in value && typeof value.address === 'string';
|
|
7
|
+
return hasAddress && 'family' in value && typeof value.family === 'number';
|
|
6
8
|
}
|
|
7
9
|
/**
|
|
8
10
|
* Socket-level lookup for deployment probes: platform's validating lookup (private-address
|
|
@@ -201,6 +201,7 @@ function remainingBudget(ctx) {
|
|
|
201
201
|
*/
|
|
202
202
|
async function sweepCandidates(ctx, { lastMessage }) {
|
|
203
203
|
let protectedResult;
|
|
204
|
+
let message = lastMessage;
|
|
204
205
|
for (const url of ctx.candidates) {
|
|
205
206
|
const remainingMs = remainingBudget(ctx);
|
|
206
207
|
if (remainingMs <= 0)
|
|
@@ -216,27 +217,28 @@ async function sweepCandidates(ctx, { lastMessage }) {
|
|
|
216
217
|
url,
|
|
217
218
|
statusMessage: result.statusMessage || `${ctx.providerLabel} is gating this link behind its own auth wall.`,
|
|
218
219
|
};
|
|
219
|
-
continue;
|
|
220
220
|
}
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
221
|
+
else {
|
|
222
|
+
// Real refactor, not a padded test: `result.statusMessage` is
|
|
223
|
+
// unconditionally truthy by this point. `result` comes from
|
|
224
|
+
// `checkDeploymentUrl`, which — for every `reachable: false`,
|
|
225
|
+
// non-`'protected'` shape it can produce (the empty-URL guard, and
|
|
226
|
+
// both `requestDeploymentUrl`-derived returns after the dead-branch
|
|
227
|
+
// refactor just above) — always sets a non-empty `statusMessage`. The
|
|
228
|
+
// `reachable: true` and `status === 'protected'` shapes are both
|
|
229
|
+
// handled by the `return` and the protected branch above, so neither
|
|
230
|
+
// can reach here. `|| lastMessage` (falling back to the *previous*
|
|
231
|
+
// sweep's message) could therefore never actually be selected — see
|
|
232
|
+
// the archived extraction source map's 2026-07-22 addition for the proof.
|
|
233
|
+
// Non-null assertion (not `||`/`??`, which would just reintroduce the
|
|
234
|
+
// same dead branch): the type is `string | undefined` because
|
|
235
|
+
// `DeploymentUrlCheck.statusMessage` is optional in general, but this
|
|
236
|
+
// exact call site's result is always defined per the proof above.
|
|
237
|
+
message = result.statusMessage;
|
|
238
|
+
}
|
|
237
239
|
}
|
|
238
240
|
// A protected candidate is a fallback only after the other candidates had their turn.
|
|
239
|
-
return protectedResult ? { done: protectedResult } : { lastMessage };
|
|
241
|
+
return protectedResult ? { done: protectedResult } : { lastMessage: message };
|
|
240
242
|
}
|
|
241
243
|
/**
|
|
242
244
|
* Polls deployment candidates until one becomes reachable or `timeoutMs` elapses.
|
|
@@ -278,16 +280,17 @@ function uniqueCandidates({ urls }) {
|
|
|
278
280
|
*/
|
|
279
281
|
async function pollCandidates(ctx, { sleep, intervalMs }) {
|
|
280
282
|
let lastMessage = '';
|
|
281
|
-
|
|
283
|
+
let keepPolling = remainingBudget(ctx) > 0;
|
|
284
|
+
while (keepPolling) {
|
|
282
285
|
const sweep = await sweepCandidates(ctx, { lastMessage });
|
|
283
286
|
if ('done' in sweep)
|
|
284
287
|
return sweep.done;
|
|
285
288
|
lastMessage = sweep.lastMessage;
|
|
286
289
|
const remainingMs = remainingBudget(ctx);
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
290
|
+
// Stop when the budget is spent, the sleep is cut short, or the sleep consumed the rest.
|
|
291
|
+
keepPolling = remainingMs > 0 &&
|
|
292
|
+
await sleepWithinBudget({ sleep, ms: Math.min(intervalMs, remainingMs), timeoutMs: remainingMs }) &&
|
|
293
|
+
remainingBudget(ctx) > 0;
|
|
291
294
|
}
|
|
292
295
|
return {
|
|
293
296
|
status: 'link-delayed',
|
package/dist/dns/plan.js
CHANGED
|
@@ -18,7 +18,8 @@ const OP_ORDER = { delete: 0, update: 1, create: 2 };
|
|
|
18
18
|
export { canonicalJson };
|
|
19
19
|
/** sha-256 hex over the canonical plan, excluding any fingerprint it already carries. */
|
|
20
20
|
export function fingerprintPlan(required, _optional = {}) {
|
|
21
|
-
const
|
|
21
|
+
const body = { ...required.plan };
|
|
22
|
+
delete body.fingerprint;
|
|
22
23
|
return createHash('sha256').update(canonicalJson({ value: body })).digest('hex');
|
|
23
24
|
}
|
|
24
25
|
function finalize(plan) {
|
package/dist/dns/records.js
CHANGED
|
@@ -93,10 +93,14 @@ export function parseMxText(required, _optional = {}) {
|
|
|
93
93
|
}
|
|
94
94
|
/** `0 issue "letsencrypt.org"` → CAA value (quotes optional). */
|
|
95
95
|
export function parseCaaText(required, _optional = {}) {
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
// Same as /^(\d+)\s+(issue|issuewild|iodef)\s+"?([^"]*)"?$/i, split so the separator run and the
|
|
97
|
+
// value cannot backtrack against each other.
|
|
98
|
+
const text = required.text.trim();
|
|
99
|
+
const head = /^(\d+)\s+(issue|issuewild|iodef)(?=\s)/i.exec(text);
|
|
100
|
+
const value = head ? /^"?([^"]*)"?$/.exec(text.slice(head[0].length).trimStart()) : null;
|
|
101
|
+
if (!head || !value)
|
|
98
102
|
return undefined;
|
|
99
|
-
return { flags: Number(
|
|
103
|
+
return { flags: Number(head[1]), tag: head[2].toLowerCase(), value: value[1] };
|
|
100
104
|
}
|
|
101
105
|
/** Join quoted character-strings (`"a" "b"` → `ab`); an unquoted value is already logical. */
|
|
102
106
|
export function unquoteTxt(required, _optional = {}) {
|
package/dist/dns/registry.js
CHANGED
|
@@ -18,8 +18,10 @@ function isStringList(value) {
|
|
|
18
18
|
return Array.isArray(value) && value.every(entry => typeof entry === 'string');
|
|
19
19
|
}
|
|
20
20
|
function capabilitiesValid(value) {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
if (!isObject(value))
|
|
22
|
+
return false;
|
|
23
|
+
const flagsValid = typeof value.apexFlattening === 'boolean' && typeof value.proxy === 'boolean';
|
|
24
|
+
return typeof value.automatic === 'boolean' && isStringList(value.recordTypes) && flagsValid;
|
|
23
25
|
}
|
|
24
26
|
function optionalFunction(value) {
|
|
25
27
|
return value === undefined || typeof value === 'function';
|
package/dist/local-dev/index.js
CHANGED
|
@@ -10,9 +10,11 @@ export function parseLsofListeners({ stdout }) {
|
|
|
10
10
|
const found = [];
|
|
11
11
|
let pid;
|
|
12
12
|
for (const line of stdout.replace(/\r\n/g, '\n').split('\n')) {
|
|
13
|
-
if (line.startsWith('p'))
|
|
13
|
+
if (line.startsWith('p')) {
|
|
14
14
|
pid = line.slice(1);
|
|
15
|
-
|
|
15
|
+
continue;
|
|
16
|
+
}
|
|
17
|
+
if (line.startsWith('c') && pid) {
|
|
16
18
|
found.push({ pid, command: line.slice(1) });
|
|
17
19
|
pid = undefined;
|
|
18
20
|
}
|
|
@@ -36,7 +38,9 @@ export async function listenersOn({ port, runner, listenerCommand }) {
|
|
|
36
38
|
}
|
|
37
39
|
function validListenRange(required) {
|
|
38
40
|
const { port, attempts } = required;
|
|
39
|
-
|
|
41
|
+
const validAttempts = Number.isInteger(attempts) && attempts >= 1;
|
|
42
|
+
const validPorts = Number.isInteger(port) && port >= 0 && port + attempts - 1 <= 65535;
|
|
43
|
+
return validAttempts && validPorts;
|
|
40
44
|
}
|
|
41
45
|
/** One bind attempt; both one-shot handlers are removed however it ends, including a synchronous throw. */
|
|
42
46
|
function bindOnce(required, optional) {
|
|
@@ -42,10 +42,12 @@ export function undeclaredDistImports(required) {
|
|
|
42
42
|
const source = Buffer.from(fs.read({ path: file })).toString('utf8');
|
|
43
43
|
for (const specifier of imports.imports({ file, source })) {
|
|
44
44
|
const target = localTarget({ specifier, file, distDir, aliases });
|
|
45
|
-
|
|
46
|
-
if (target !== undefined)
|
|
45
|
+
if (target !== undefined) {
|
|
47
46
|
visit(target, specifier, relative);
|
|
48
|
-
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
const name = undeclaredPackage({ specifier, declared });
|
|
50
|
+
if (name !== undefined)
|
|
49
51
|
problems.push(`${name} (${relative})`);
|
|
50
52
|
}
|
|
51
53
|
};
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { existsSync, readFileSync, lstatSync, readdirSync, realpathSync, mkdirSync, cpSync, rmSync, statSync, openSync, readSync, closeSync } from 'node:fs';
|
|
2
2
|
import path from 'node:path';
|
|
3
|
+
/** lstat kind: symlinks and special files are 'other'. */
|
|
4
|
+
function entryKind(info) {
|
|
5
|
+
if (info.isFile())
|
|
6
|
+
return 'file';
|
|
7
|
+
return info.isDirectory() ? 'directory' : 'other';
|
|
8
|
+
}
|
|
3
9
|
/** Explicit Node filesystem adapter. No effects occur until a port method is called. */
|
|
4
10
|
export function createNodePackagingFilesystem(_required) {
|
|
5
11
|
return {
|
|
@@ -18,7 +24,7 @@ export function createNodePackagingFilesystem(_required) {
|
|
|
18
24
|
closeSync(fd);
|
|
19
25
|
}
|
|
20
26
|
},
|
|
21
|
-
stat: ({ path }) => { const info = lstatSync(path); return { kind:
|
|
27
|
+
stat: ({ path }) => { const info = lstatSync(path); return { kind: entryKind(info), mtimeMs: info.mtimeMs, diskBytes: info.blocks * 512 }; },
|
|
22
28
|
entries: ({ path }) => readdirSync(path), realpath: ({ path }) => realpathSync(path),
|
|
23
29
|
copy: ({ from, to }, optional = {}) => {
|
|
24
30
|
const source = realpathSync(from);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { isBundleInput, prebuildTarget, strippableReason } from './policies.js';
|
|
3
|
+
const PACKAGE_JSON = 'package.json';
|
|
3
4
|
function manifest(directory, fs) {
|
|
4
|
-
const file = path.join(directory,
|
|
5
|
+
const file = path.join(directory, PACKAGE_JSON);
|
|
5
6
|
return fs.exists({ path: file }) ? JSON.parse(Buffer.from(fs.read({ path: file })).toString('utf8')) : {};
|
|
6
7
|
}
|
|
7
8
|
function safePackageName(name) {
|
|
@@ -32,7 +33,7 @@ function resolveDependency(required) {
|
|
|
32
33
|
*/
|
|
33
34
|
function assertFlattenable(required) {
|
|
34
35
|
const { name, planned: { directory, version }, existing, destination, fs } = required;
|
|
35
|
-
const destinationVersion = fs.exists({ path: path.join(destination,
|
|
36
|
+
const destinationVersion = fs.exists({ path: path.join(destination, PACKAGE_JSON) }) ? manifest(destination, fs).version : undefined;
|
|
36
37
|
const plannedConflict = existing !== undefined && existing.directory !== directory && (!version || existing.version !== version);
|
|
37
38
|
const stagedConflict = fs.exists({ path: destination }) && (!version || destinationVersion !== version);
|
|
38
39
|
if (plannedConflict || stagedConflict)
|
|
@@ -83,8 +84,8 @@ export function stagedPackageDirs({ modulesDir, fs }) {
|
|
|
83
84
|
return fs.entries({ path: modulesDir }).filter(entry => !entry.startsWith('.')).flatMap(entry => {
|
|
84
85
|
const full = path.join(modulesDir, entry);
|
|
85
86
|
if (!entry.startsWith('@'))
|
|
86
|
-
return fs.exists({ path: path.join(full,
|
|
87
|
-
return fs.entries({ path: full }).map(scoped => path.join(full, scoped)).filter(dir => fs.exists({ path: path.join(dir,
|
|
87
|
+
return fs.exists({ path: path.join(full, PACKAGE_JSON) }) ? [full] : [];
|
|
88
|
+
return fs.entries({ path: full }).map(scoped => path.join(full, scoped)).filter(dir => fs.exists({ path: path.join(dir, PACKAGE_JSON) }));
|
|
88
89
|
});
|
|
89
90
|
}
|
|
90
91
|
/** Check nested/hoisted dependencies only inside shipped modules; ancestors cannot fill gaps. */
|
|
@@ -95,7 +96,7 @@ export function assertClosureComplete(required) {
|
|
|
95
96
|
if (!fs.exists({ path: modulesDir }))
|
|
96
97
|
throw new Error('staged node_modules tree is missing');
|
|
97
98
|
// Hoisted beside the package, or nested inside it: the only two places a shipped require can land.
|
|
98
|
-
const shipped = (directory, name) => fs.exists({ path: path.join(modulesDir, name,
|
|
99
|
+
const shipped = (directory, name) => fs.exists({ path: path.join(modulesDir, name, PACKAGE_JSON) }) || fs.exists({ path: path.join(directory, 'node_modules', name, PACKAGE_JSON) });
|
|
99
100
|
for (const directory of stagedPackageDirs({ modulesDir, fs })) {
|
|
100
101
|
for (const name of declaredDependencies({ packageDir: directory, fs })) {
|
|
101
102
|
safePackageName(name);
|
|
@@ -153,20 +154,22 @@ export function stripNonRuntimeFiles(required) {
|
|
|
153
154
|
tally.coverage++;
|
|
154
155
|
fs.remove({ path: coverage });
|
|
155
156
|
}
|
|
157
|
+
function stripFile(full, diskBytes) {
|
|
158
|
+
const reason = strippableReason({ relPath: path.relative(modulesDir, full).split(path.sep).join('/'), keepScopes });
|
|
159
|
+
if (!reason)
|
|
160
|
+
return;
|
|
161
|
+
tally.bytes += diskBytes;
|
|
162
|
+
tally[reason]++;
|
|
163
|
+
fs.remove({ path: full });
|
|
164
|
+
}
|
|
156
165
|
function walk(directory) {
|
|
157
166
|
for (const name of fs.entries({ path: directory })) {
|
|
158
167
|
const full = path.join(directory, name);
|
|
159
168
|
const info = fs.stat({ path: full });
|
|
160
|
-
if (info.kind === 'directory')
|
|
169
|
+
if (info.kind === 'directory')
|
|
161
170
|
walk(full);
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
const reason = strippableReason({ relPath: path.relative(modulesDir, full).split(path.sep).join('/'), keepScopes });
|
|
165
|
-
if (!reason)
|
|
166
|
-
continue;
|
|
167
|
-
tally.bytes += info.diskBytes;
|
|
168
|
-
tally[reason]++;
|
|
169
|
-
fs.remove({ path: full });
|
|
171
|
+
else
|
|
172
|
+
stripFile(full, info.diskBytes);
|
|
170
173
|
}
|
|
171
174
|
}
|
|
172
175
|
walk(modulesDir);
|
|
@@ -237,6 +240,10 @@ export function stageBundledNpm(required) {
|
|
|
237
240
|
throw new Error('stageBundledNpm: bounded prefix-read port is required');
|
|
238
241
|
const readPrefix = fs.readPrefix.bind(fs);
|
|
239
242
|
const excluded = ({ path: full, directory }) => directory ? droppedDirectoryNames.has(path.basename(full)) : droppedFileSuffixes.some(suffix => full.endsWith(suffix));
|
|
243
|
+
function assertNotNativeBinary(full) {
|
|
244
|
+
if (hasNativeBinaryMagic({ bytes: readPrefix({ path: full, maxBytes: 4 }) }))
|
|
245
|
+
throw new Error(`stageBundledNpm: ${path.relative(source, full)} starts with native-binary magic bytes`);
|
|
246
|
+
}
|
|
240
247
|
function inspect(directory) {
|
|
241
248
|
for (const entry of fs.entries({ path: directory })) {
|
|
242
249
|
const full = path.join(directory, entry);
|
|
@@ -247,8 +254,8 @@ export function stageBundledNpm(required) {
|
|
|
247
254
|
continue;
|
|
248
255
|
if (info.kind === 'directory')
|
|
249
256
|
inspect(full);
|
|
250
|
-
else
|
|
251
|
-
|
|
257
|
+
else
|
|
258
|
+
assertNotNativeBinary(full);
|
|
252
259
|
}
|
|
253
260
|
}
|
|
254
261
|
inspect(source);
|
|
@@ -3,10 +3,15 @@ export function createTypeScriptImportReader({ compiler }) {
|
|
|
3
3
|
return { imports({ file, source }) {
|
|
4
4
|
const tree = compiler.createSourceFile(file, source, compiler.ScriptTarget.Latest, false, compiler.ScriptKind.JS);
|
|
5
5
|
const found = [];
|
|
6
|
+
function moduleSpecifierOf(node) {
|
|
7
|
+
if (compiler.isImportDeclaration(node) || compiler.isExportDeclaration(node))
|
|
8
|
+
return node.moduleSpecifier;
|
|
9
|
+
if (compiler.isCallExpression(node) && node.expression.kind === compiler.SyntaxKind.ImportKeyword)
|
|
10
|
+
return node.arguments[0];
|
|
11
|
+
return undefined;
|
|
12
|
+
}
|
|
6
13
|
function visit(node) {
|
|
7
|
-
const literal =
|
|
8
|
-
? node.moduleSpecifier
|
|
9
|
-
: compiler.isCallExpression(node) && node.expression.kind === compiler.SyntaxKind.ImportKeyword ? node.arguments[0] : undefined;
|
|
14
|
+
const literal = moduleSpecifierOf(node);
|
|
10
15
|
if (literal !== undefined && compiler.isStringLiteral(literal))
|
|
11
16
|
found.push(literal.text);
|
|
12
17
|
compiler.forEachChild(node, visit);
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/** Owner and repo, whatever the host: one URL path segment each, so never empty, never `.`/`..`,
|
|
2
2
|
* never a slash, whitespace or control character. */
|
|
3
|
-
|
|
3
|
+
// \s already covers \x09-\x0d, so the control ranges skip them.
|
|
4
|
+
const GENERIC_SEGMENT_PATTERN = /^[^\s/\\\x00-\x08\x0e-\x1f\x7f]{1,100}$/;
|
|
4
5
|
const BRANCH_PATTERN = /^[A-Za-z0-9._/-]{1,250}$/;
|
|
5
6
|
function isGenericSegment(value) {
|
|
6
|
-
|
|
7
|
+
// The pattern itself refuses whitespace and control characters anywhere in the value.
|
|
8
|
+
return GENERIC_SEGMENT_PATTERN.test(value) && value !== '.' && value !== '..';
|
|
7
9
|
}
|
|
8
10
|
/** Host rules precede the common one-URL-segment rule. Returns caller-safe refusal text. */
|
|
9
11
|
export function repositoryTargetError(required, optional = {}) {
|
|
@@ -21,7 +23,8 @@ export function validateCommitTarget(required, optional = {}) {
|
|
|
21
23
|
const error = repositoryTargetError({ owner: required.owner, repo: required.repo }, optional);
|
|
22
24
|
if (error !== null)
|
|
23
25
|
return error;
|
|
24
|
-
|
|
26
|
+
// BRANCH_PATTERN's allow-list already excludes whitespace and control characters.
|
|
27
|
+
if (optional.branch !== undefined && !BRANCH_PATTERN.test(optional.branch))
|
|
25
28
|
return `invalid branch name '${optional.branch.slice(0, 60)}'`;
|
|
26
29
|
if (required.commitMessage.trim() === '' || required.commitMessage.length > 500)
|
|
27
30
|
return 'commitMessage must be 1-500 characters';
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/** Kinds describe the host's routes; only redirect/not-found/well-known affect writing. */
|
|
2
|
-
export type ManifestRouteKind = string;
|
|
3
1
|
export interface ManifestRoute {
|
|
4
2
|
path: string;
|
|
5
|
-
|
|
3
|
+
/** Kinds describe the host's routes; only redirect/not-found/well-known affect writing. */
|
|
4
|
+
kind: string;
|
|
6
5
|
label: string;
|
|
7
6
|
redirectTarget?: string;
|
|
8
7
|
redirectStatusCode?: number;
|
|
@@ -59,14 +58,14 @@ export interface ThemeLayoutPort {
|
|
|
59
58
|
}
|
|
60
59
|
export interface ExportedRoute {
|
|
61
60
|
path: string;
|
|
62
|
-
kind:
|
|
61
|
+
kind: string;
|
|
63
62
|
outputFile: string;
|
|
64
63
|
data: string;
|
|
65
64
|
contentType?: string | null;
|
|
66
65
|
}
|
|
67
66
|
export interface FailedRoute {
|
|
68
67
|
path: string;
|
|
69
|
-
kind:
|
|
68
|
+
kind: string;
|
|
70
69
|
reason: string;
|
|
71
70
|
}
|
|
72
71
|
export interface ExportedAsset {
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/** One CSS `url(...)` token: its span in the source, the quote it used ('' when bare) and the raw value. */
|
|
2
|
+
export interface CssUrlToken {
|
|
3
|
+
start: number;
|
|
4
|
+
end: number;
|
|
5
|
+
quote: string;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Every `url(...)` token, exactly as `css.matchAll(/url\(\s*(['"]?)([^'")]+)\1\s*\)/g)` finds them
|
|
10
|
+
* (including that pattern's corner case where `url( )` captures the last space as the value), but
|
|
11
|
+
* scanned in linear time: the regex backtracks quadratically because its whitespace runs and value
|
|
12
|
+
* run overlap.
|
|
13
|
+
* @complexity O(css length).
|
|
14
|
+
*/
|
|
15
|
+
export declare function cssUrlTokens(css: string): CssUrlToken[];
|
|
16
|
+
//# sourceMappingURL=css-urls.d.ts.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
const VALUE_STOP = "'\")";
|
|
2
|
+
const isSpace = (char) => char !== undefined && /\s/.test(char);
|
|
3
|
+
/**
|
|
4
|
+
* Every `url(...)` token, exactly as `css.matchAll(/url\(\s*(['"]?)([^'")]+)\1\s*\)/g)` finds them
|
|
5
|
+
* (including that pattern's corner case where `url( )` captures the last space as the value), but
|
|
6
|
+
* scanned in linear time: the regex backtracks quadratically because its whitespace runs and value
|
|
7
|
+
* run overlap.
|
|
8
|
+
* @complexity O(css length).
|
|
9
|
+
*/
|
|
10
|
+
export function cssUrlTokens(css) {
|
|
11
|
+
const tokens = [];
|
|
12
|
+
const stops = createStopFinder(css);
|
|
13
|
+
let from = css.indexOf('url(');
|
|
14
|
+
while (from !== -1) {
|
|
15
|
+
const token = cssUrlTokenAt(css, from, stops);
|
|
16
|
+
if (token)
|
|
17
|
+
tokens.push(token);
|
|
18
|
+
from = css.indexOf('url(', token ? token.end : from + 1);
|
|
19
|
+
}
|
|
20
|
+
return tokens;
|
|
21
|
+
}
|
|
22
|
+
/** Index of the first `'`, `"` or `)` at or after a position; positions only grow, so one scan serves all. */
|
|
23
|
+
function createStopFinder(css) {
|
|
24
|
+
let found = -1;
|
|
25
|
+
return (position) => {
|
|
26
|
+
if (found >= position)
|
|
27
|
+
return found;
|
|
28
|
+
found = position;
|
|
29
|
+
while (found < css.length && !VALUE_STOP.includes(css.charAt(found)))
|
|
30
|
+
found += 1;
|
|
31
|
+
return found;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function skipSpaces(css, position) {
|
|
35
|
+
let index = position;
|
|
36
|
+
while (isSpace(css[index]))
|
|
37
|
+
index += 1;
|
|
38
|
+
return index;
|
|
39
|
+
}
|
|
40
|
+
function cssUrlTokenAt(css, start, stopAt) {
|
|
41
|
+
const open = start + 'url('.length;
|
|
42
|
+
const valueStart = skipSpaces(css, open);
|
|
43
|
+
const quote = css.charAt(valueStart);
|
|
44
|
+
if (quote === "'" || quote === '"')
|
|
45
|
+
return quotedToken({ css, start, quote, valueStart: valueStart + 1, stopAt });
|
|
46
|
+
const valueEnd = stopAt(valueStart);
|
|
47
|
+
if (css[valueEnd] !== ')')
|
|
48
|
+
return null;
|
|
49
|
+
if (valueEnd > valueStart)
|
|
50
|
+
return { start, end: valueEnd + 1, quote: '', value: css.slice(valueStart, valueEnd) };
|
|
51
|
+
// An empty value can only borrow the last leading space, as the regex's backtracking does.
|
|
52
|
+
if (valueStart > open)
|
|
53
|
+
return { start, end: valueEnd + 1, quote: '', value: css.charAt(valueStart - 1) };
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
function quotedToken(input) {
|
|
57
|
+
const { css, start, quote, valueStart, stopAt } = input;
|
|
58
|
+
const valueEnd = stopAt(valueStart);
|
|
59
|
+
if (valueEnd === valueStart || css[valueEnd] !== quote)
|
|
60
|
+
return null;
|
|
61
|
+
const close = skipSpaces(css, valueEnd + 1);
|
|
62
|
+
if (css[close] !== ')')
|
|
63
|
+
return null;
|
|
64
|
+
return { start, end: close + 1, quote, value: css.slice(valueStart, valueEnd) };
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=css-urls.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { parse } from 'parse5';
|
|
2
|
+
import { cssUrlTokens } from './css-urls.js';
|
|
2
3
|
const URL_ATTRIBUTES = new Set(['src', 'href', 'poster']);
|
|
3
4
|
/** The exact attribute value range, preserving quotes, spacing and all surrounding source bytes. */
|
|
4
5
|
function attributeLocation({ html, start, end, kind }, _optional = {}) {
|
|
@@ -18,7 +19,7 @@ function isImageMetadata({ element }, _optional = {}) {
|
|
|
18
19
|
/** Attribute kinds are shared by rewriting, crawling and diagnostic references. Script-read
|
|
19
20
|
* `data-*-href`/`-src` values (the see-more button's batch URL) are URLs too; references skip them. */
|
|
20
21
|
function attributeKind({ element, name }, _optional = {}) {
|
|
21
|
-
const urlName =
|
|
22
|
+
const urlName = normalizedUrlAttribute(name);
|
|
22
23
|
if (URL_ATTRIBUTES.has(urlName))
|
|
23
24
|
return 'url';
|
|
24
25
|
if (urlName === 'srcset')
|
|
@@ -31,6 +32,9 @@ function attributeKind({ element, name }, _optional = {}) {
|
|
|
31
32
|
return 'url';
|
|
32
33
|
return undefined;
|
|
33
34
|
}
|
|
35
|
+
function normalizedUrlAttribute(name) {
|
|
36
|
+
return /^data-(?:[\w-]*-)?(href|src|srcset|poster)$/.exec(name)?.[1] ?? name;
|
|
37
|
+
}
|
|
34
38
|
/** Style text is CSS; every other element's text remains untouched. */
|
|
35
39
|
function styleLocations({ element }, _optional = {}) {
|
|
36
40
|
if (element.tagName !== 'style')
|
|
@@ -75,7 +79,7 @@ export function exportUrlLocations({ body, contentType }, _optional = {}) {
|
|
|
75
79
|
if (/^text\/html\b/i.test(contentType))
|
|
76
80
|
return htmlUrlLocations({ html: body });
|
|
77
81
|
if (/^text\/css\b/i.test(contentType))
|
|
78
|
-
return
|
|
82
|
+
return cssUrlTokens(body).map(({ start, end }) => ({ start, end, kind: 'css' }));
|
|
79
83
|
if (/\bxml\b/i.test(contentType))
|
|
80
84
|
return [...body.matchAll(/<((?:[\w-]+:)?loc)>([^<]*)<\/\1>/g)].map(match => ({ start: match.index + match[1].length + 2, end: match.index + match[0].length - match[1].length - 3, kind: 'url' }));
|
|
81
85
|
if (!/\bjson\b/i.test(contentType))
|
|
@@ -83,6 +83,9 @@ export function createNodeArtifactWriter(_required, _optional = {}) {
|
|
|
83
83
|
},
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
+
function closeServer(server) {
|
|
87
|
+
return new Promise(resolve => { server.close(() => resolve()); });
|
|
88
|
+
}
|
|
86
89
|
/** Independent Node loopback adapter. The app factory is required and remains owned by the host. */
|
|
87
90
|
export function createNodeAppFactory(required, _optional = {}) {
|
|
88
91
|
return { async open() {
|
|
@@ -93,7 +96,7 @@ export function createNodeAppFactory(required, _optional = {}) {
|
|
|
93
96
|
return;
|
|
94
97
|
closed = true;
|
|
95
98
|
server.closeAllConnections();
|
|
96
|
-
await
|
|
99
|
+
await closeServer(server);
|
|
97
100
|
};
|
|
98
101
|
try {
|
|
99
102
|
server.listen(0, '127.0.0.1');
|
|
@@ -113,9 +116,11 @@ export function createNodeAssetSource(_required, _optional = {}) {
|
|
|
113
116
|
const files = [];
|
|
114
117
|
for (const entry of await readdir(directory, { withFileTypes: true })) {
|
|
115
118
|
const relative = prefix + entry.name;
|
|
116
|
-
if (entry.isDirectory())
|
|
119
|
+
if (entry.isDirectory()) {
|
|
117
120
|
files.push(...await list(path.join(directory, entry.name), relative + '/'));
|
|
118
|
-
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
if (entry.isFile())
|
|
119
124
|
files.push(relative);
|
|
120
125
|
}
|
|
121
126
|
return files;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ExportPathError } from "./contracts.js";
|
|
2
2
|
import { extractAssetUrls, extractHtmlReferences, extractCssUrls, normalizeBasePath, outputFileForUrl, redirectOutcomeFor, renderRedirectStub, rewriteRouteBodyForBasePath, rewriteAssetBodyForBasePath, safeRelativeOutputFile } from './transforms.js';
|
|
3
|
+
import { trimCharsEnd } from '@jini-ai/core/primitives';
|
|
3
4
|
const BASE_PATH_REWRITE_WARNING = "base-path rewriting is a best-effort TEXT rewrite over already-rendered responses — it cannot rewrite a path a theme's own JavaScript constructs at runtime from a string (same category of gap as the unreferenced-theme-file warning, just invisible to this rewrite instead of to the asset crawl).";
|
|
4
5
|
async function request(ctx, url) {
|
|
5
6
|
// Redirects are observed, never followed off the caller's app, for routes and assets alike.
|
|
@@ -66,10 +67,11 @@ function enqueueDiscovered(required) {
|
|
|
66
67
|
state.queued.add(next.path);
|
|
67
68
|
if (state.discovered >= MAX_DISCOVERED_ROUTES) {
|
|
68
69
|
state.skipped.push({ reason: 'discovered-route-cap', detail: `${next.path} (over ${MAX_DISCOVERED_ROUTES} discovered routes)` });
|
|
69
|
-
continue;
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
else {
|
|
72
|
+
state.discovered += 1;
|
|
73
|
+
state.queue.push(next);
|
|
74
|
+
}
|
|
73
75
|
}
|
|
74
76
|
}
|
|
75
77
|
/** Discovery uses the response route's format, so prose cannot masquerade as a manifest. */
|
|
@@ -86,18 +88,7 @@ async function writeRoutes(ctx, routes) {
|
|
|
86
88
|
for (let index = 0; index < state.queue.length; index++) {
|
|
87
89
|
const route = state.queue[index];
|
|
88
90
|
try {
|
|
89
|
-
|
|
90
|
-
if ('reason' in outcome) {
|
|
91
|
-
failed.push({ path: route.path, kind: route.kind, reason: outcome.reason });
|
|
92
|
-
continue;
|
|
93
|
-
}
|
|
94
|
-
succeeded.push(outcome.route);
|
|
95
|
-
const html = outcome.crawlHtml;
|
|
96
|
-
if (html === undefined)
|
|
97
|
-
continue;
|
|
98
|
-
for (const url of extractAssetUrls({ html, prefixes: ctx.args.assetUrlPrefixes }, { format: routeAssetFormat({ path: route.path }) }))
|
|
99
|
-
assets.add(url);
|
|
100
|
-
enqueueDiscovered({ state, routes: ctx.args.discoverRoutes?.({ path: route.path, html }) ?? [] });
|
|
91
|
+
await writeAndScanRoute({ ctx, route, state }, { succeeded, failed, assets });
|
|
101
92
|
}
|
|
102
93
|
catch (error) {
|
|
103
94
|
failed.push({ path: route.path, kind: route.kind, reason: failureReason(ctx, route.path, error) });
|
|
@@ -105,6 +96,21 @@ async function writeRoutes(ctx, routes) {
|
|
|
105
96
|
}
|
|
106
97
|
return { succeeded, failed, assets, skipped: state.skipped };
|
|
107
98
|
}
|
|
99
|
+
/** Writes one route, then crawls its HTML (when any) for assets and further routes. */
|
|
100
|
+
async function writeAndScanRoute({ ctx, route, state }, out) {
|
|
101
|
+
const outcome = await writeRoute(ctx, route);
|
|
102
|
+
if ('reason' in outcome) {
|
|
103
|
+
out.failed.push({ path: route.path, kind: route.kind, reason: outcome.reason });
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
out.succeeded.push(outcome.route);
|
|
107
|
+
const html = outcome.crawlHtml;
|
|
108
|
+
if (html === undefined)
|
|
109
|
+
return;
|
|
110
|
+
for (const url of extractAssetUrls({ html, prefixes: ctx.args.assetUrlPrefixes }, { format: routeAssetFormat({ path: route.path }) }))
|
|
111
|
+
out.assets.add(url);
|
|
112
|
+
enqueueDiscovered({ state, routes: ctx.args.discoverRoutes?.({ path: route.path, html }) ?? [] });
|
|
113
|
+
}
|
|
108
114
|
async function fetchAsset(required) {
|
|
109
115
|
const { ctx, url } = required;
|
|
110
116
|
const outputFile = outputFileForUrl({ url });
|
|
@@ -137,6 +143,17 @@ function assetFailureReason(required) {
|
|
|
137
143
|
const { ctx, url, error } = required;
|
|
138
144
|
return error instanceof ExportPathError && ctx.args.assetPathFailureReason !== undefined ? ctx.args.assetPathFailureReason : failureReason(ctx, url, error);
|
|
139
145
|
}
|
|
146
|
+
/** Fetches one asset; a crawled stylesheet's children join the queue without further crawling. */
|
|
147
|
+
async function fetchAndQueueAsset({ ctx, url, crawlCss, queue }, out) {
|
|
148
|
+
const outcome = await fetchAsset({ ctx, url, crawlCss });
|
|
149
|
+
if ('reason' in outcome) {
|
|
150
|
+
out.failed.push({ url, reason: outcome.reason });
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
out.succeeded.push(outcome.asset);
|
|
154
|
+
for (const child of outcome.children)
|
|
155
|
+
queue.push({ url: child, crawlCss: false });
|
|
156
|
+
}
|
|
140
157
|
async function writeAssets(ctx, initial) {
|
|
141
158
|
const succeeded = [], failed = [];
|
|
142
159
|
const seen = new Set();
|
|
@@ -147,14 +164,7 @@ async function writeAssets(ctx, initial) {
|
|
|
147
164
|
continue;
|
|
148
165
|
seen.add(url);
|
|
149
166
|
try {
|
|
150
|
-
|
|
151
|
-
if ('reason' in outcome) {
|
|
152
|
-
failed.push({ url, reason: outcome.reason });
|
|
153
|
-
continue;
|
|
154
|
-
}
|
|
155
|
-
succeeded.push(outcome.asset);
|
|
156
|
-
for (const child of outcome.children)
|
|
157
|
-
queue.push({ url: child, crawlCss: false });
|
|
167
|
+
await fetchAndQueueAsset({ ctx, url, crawlCss, queue }, { succeeded, failed });
|
|
158
168
|
}
|
|
159
169
|
catch (error) {
|
|
160
170
|
failed.push({ url, reason: assetFailureReason({ ctx, url, error }) });
|
|
@@ -182,7 +192,7 @@ async function unreferenced(ctx, manifest, assets) {
|
|
|
182
192
|
const MAX_DROPPED_REFERENCES = 200;
|
|
183
193
|
/** Site path normalization shared by written outputs and references: no trailing slashes, root as '/'. */
|
|
184
194
|
function pathNormalizer(required) {
|
|
185
|
-
return url => new URL(url, required.origin).pathname
|
|
195
|
+
return url => trimCharsEnd({ text: new URL(url, required.origin).pathname, chars: '/' }) || '/';
|
|
186
196
|
}
|
|
187
197
|
/** Every path this run wrote: artifact paths (and index.html directory aliases), route paths except the error-page probe, and asset URLs. */
|
|
188
198
|
function writtenPaths(required) {
|
|
@@ -244,11 +254,9 @@ function droppedReference(required) {
|
|
|
244
254
|
function recordDrop(required) {
|
|
245
255
|
const { dropped, drop } = required;
|
|
246
256
|
const key = drop.page + '\n' + drop.url;
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}
|
|
251
|
-
else if (dropped.size < MAX_DROPPED_REFERENCES)
|
|
257
|
+
const replacesEarlier = dropped.has(key) && drop.reason === 'needs-server';
|
|
258
|
+
const addsNew = !dropped.has(key) && dropped.size < MAX_DROPPED_REFERENCES;
|
|
259
|
+
if (replacesEarlier || addsNew)
|
|
252
260
|
dropped.set(key, drop);
|
|
253
261
|
}
|
|
254
262
|
/** Compare written HTML with this run's outputs only; no requests or filesystem reads.
|
|
@@ -272,7 +280,9 @@ function droppedReferences(required) {
|
|
|
272
280
|
/** The app session's origin. Anything but a bare http(s) origin without credentials is refused. */
|
|
273
281
|
function sessionOrigin(required) {
|
|
274
282
|
const origin = new URL(required.baseUrl);
|
|
275
|
-
|
|
283
|
+
const hasCredentials = Boolean(origin.username || origin.password);
|
|
284
|
+
const hasPathOrQuery = origin.pathname !== '/' || Boolean(origin.search || origin.hash);
|
|
285
|
+
if (!['http:', 'https:'].includes(origin.protocol) || hasCredentials || hasPathOrQuery)
|
|
276
286
|
throw new Error('App session baseUrl must be an HTTP origin without credentials.');
|
|
277
287
|
return origin.origin;
|
|
278
288
|
}
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import { htmlUrlLocations } from './html-url-locations.js';
|
|
2
2
|
export { exportUrlLocations } from './html-url-locations.js';
|
|
3
3
|
import { ExportPathError } from './contracts.js';
|
|
4
|
+
import { cssUrlTokens } from './css-urls.js';
|
|
5
|
+
import { trimCharsEnd } from '@jini-ai/core/primitives';
|
|
6
|
+
// Reserved `.invalid` origins used only to resolve and compare URLs locally; never fetched. Both
|
|
7
|
+
// schemes are "special" to the URL parser, so https resolves exactly as http did.
|
|
8
|
+
const SAFE_HREF_ORIGIN = 'https://export-safehref.invalid';
|
|
9
|
+
const LOCAL_CSS_ORIGIN = 'https://export-local.invalid';
|
|
10
|
+
/** JSON keys whose string values are links. */
|
|
11
|
+
const LINK_KEYS = new Set(['href', 'url', 'src']);
|
|
4
12
|
function escapeHtml(value) { return value.replace(/[&<>"']/g, char => ({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' })[char]); }
|
|
5
13
|
function safeHref(value) {
|
|
6
14
|
const href = value.trim();
|
|
7
15
|
if (href.startsWith('#') || /^https?:\/\//i.test(href) || /^mailto:/i.test(href))
|
|
8
16
|
return href;
|
|
9
17
|
if (href.startsWith('/')) {
|
|
10
|
-
// eslint-disable-next-line sonarjs/no-clear-text-protocols -- Reserved .invalid sentinel used only for local URL resolution/origin comparison; never fetched.
|
|
11
18
|
try {
|
|
12
|
-
if (new URL(href,
|
|
19
|
+
if (new URL(href, `${SAFE_HREF_ORIGIN}/`).origin === SAFE_HREF_ORIGIN)
|
|
13
20
|
return href;
|
|
14
21
|
}
|
|
15
22
|
catch {
|
|
@@ -20,7 +27,7 @@ function safeHref(value) {
|
|
|
20
27
|
}
|
|
21
28
|
/** Normalize the optional output URL prefix; no product layout is implied. */
|
|
22
29
|
export function normalizeBasePath(required) {
|
|
23
|
-
const trimmed = required.raw.trim()
|
|
30
|
+
const trimmed = trimCharsEnd({ text: required.raw.trim(), chars: '/' });
|
|
24
31
|
if (trimmed === '' || trimmed === '/')
|
|
25
32
|
return '';
|
|
26
33
|
if (/[\\\x00-\x20\x7f?#"'<>]/.test(trimmed) || trimmed.startsWith('//'))
|
|
@@ -77,7 +84,7 @@ function rewriteJson(body, basePath) {
|
|
|
77
84
|
catch {
|
|
78
85
|
return body;
|
|
79
86
|
}
|
|
80
|
-
return JSON.stringify(parsed, (key, value) => (typeof value === 'string' && (key
|
|
87
|
+
return JSON.stringify(parsed, (key, value) => (typeof value === 'string' && LINK_KEYS.has(key) ? prefix(value, basePath) : value));
|
|
81
88
|
}
|
|
82
89
|
function rewriteHtml(html, basePath) {
|
|
83
90
|
const output = [];
|
|
@@ -102,7 +109,14 @@ function rewriteHtml(html, basePath) {
|
|
|
102
109
|
}
|
|
103
110
|
/** Root-relative CSS URLs keep working in inline styles and stylesheets under an export prefix. */
|
|
104
111
|
function rewriteCss(body, basePath) {
|
|
105
|
-
|
|
112
|
+
const output = [];
|
|
113
|
+
let offset = 0;
|
|
114
|
+
for (const { start, end, quote, value } of cssUrlTokens(body)) {
|
|
115
|
+
output.push(body.slice(offset, start), `url(${quote}${prefix(value.trim(), basePath)}${quote})`);
|
|
116
|
+
offset = end;
|
|
117
|
+
}
|
|
118
|
+
output.push(body.slice(offset));
|
|
119
|
+
return output.join('');
|
|
106
120
|
}
|
|
107
121
|
/** Same bounded text transforms as the exporter origin; crawl the raw body before applying these. */
|
|
108
122
|
export function rewriteRouteBodyForBasePath(required, _optional = {}) {
|
|
@@ -157,7 +171,7 @@ function jsonUrls({ body }, _optional = {}) {
|
|
|
157
171
|
const urls = [];
|
|
158
172
|
try {
|
|
159
173
|
JSON.parse(body, (key, value) => {
|
|
160
|
-
if (typeof value === 'string' &&
|
|
174
|
+
if (typeof value === 'string' && LINK_KEYS.has(key))
|
|
161
175
|
urls.push(value);
|
|
162
176
|
return value;
|
|
163
177
|
});
|
|
@@ -173,11 +187,10 @@ function assetCandidates(required, optional = {}) {
|
|
|
173
187
|
return [...required.html.matchAll(/<(?:[\w-]+:)?(?:loc|url)>([^<]+)<\//g)].map(match => match[1]);
|
|
174
188
|
const candidates = [];
|
|
175
189
|
for (const { start, end, kind } of htmlUrlLocations(required)) {
|
|
190
|
+
if (kind === 'action')
|
|
191
|
+
continue;
|
|
176
192
|
const value = required.html.slice(start, end);
|
|
177
|
-
|
|
178
|
-
candidates.push(...extractCssUrls({ css: value, cssUrl: '/', prefixes: required.prefixes }));
|
|
179
|
-
else if (kind !== 'action')
|
|
180
|
-
candidates.push(...attributeUrls(kind, value));
|
|
193
|
+
candidates.push(...(kind === 'css' ? extractCssUrls({ css: value, cssUrl: '/', prefixes: required.prefixes }) : attributeUrls(kind, value)));
|
|
181
194
|
}
|
|
182
195
|
return candidates;
|
|
183
196
|
}
|
|
@@ -193,26 +206,26 @@ export function extractAssetUrls(required, optional = {}) {
|
|
|
193
206
|
/** A single CSS hop, resolved against the stylesheet URL and restricted to the same synthetic origin. */
|
|
194
207
|
export function extractCssUrls(required) {
|
|
195
208
|
const found = new Set();
|
|
196
|
-
for (const
|
|
197
|
-
const
|
|
198
|
-
if (
|
|
199
|
-
|
|
200
|
-
let resolved;
|
|
201
|
-
// eslint-disable-next-line sonarjs/no-clear-text-protocols -- Reserved .invalid sentinel used only for local URL resolution/origin comparison; never fetched.
|
|
202
|
-
try {
|
|
203
|
-
resolved = new URL(ref, 'http://export-local.invalid' + required.cssUrl);
|
|
204
|
-
}
|
|
205
|
-
catch {
|
|
206
|
-
continue;
|
|
207
|
-
}
|
|
208
|
-
// eslint-disable-next-line sonarjs/no-clear-text-protocols -- Reserved .invalid sentinel used only for local URL resolution/origin comparison; never fetched.
|
|
209
|
-
if (resolved.origin !== 'http://export-local.invalid')
|
|
210
|
-
continue;
|
|
211
|
-
if (required.prefixes.some(prefix => resolved.pathname.startsWith(prefix)))
|
|
212
|
-
found.add(resolved.pathname);
|
|
209
|
+
for (const { value } of cssUrlTokens(required.css)) {
|
|
210
|
+
const pathname = localCssPath({ ref: value.trim(), cssUrl: required.cssUrl });
|
|
211
|
+
if (pathname !== undefined && required.prefixes.some(prefix => pathname.startsWith(prefix)))
|
|
212
|
+
found.add(pathname);
|
|
213
213
|
}
|
|
214
214
|
return [...found];
|
|
215
215
|
}
|
|
216
|
+
/** The same-origin path a stylesheet reference resolves to; data URIs, unparsable and foreign refs have none. */
|
|
217
|
+
function localCssPath({ ref, cssUrl }) {
|
|
218
|
+
if (!ref || ref.startsWith('data:'))
|
|
219
|
+
return undefined;
|
|
220
|
+
let resolved;
|
|
221
|
+
try {
|
|
222
|
+
resolved = new URL(ref, LOCAL_CSS_ORIGIN + cssUrl);
|
|
223
|
+
}
|
|
224
|
+
catch {
|
|
225
|
+
return undefined;
|
|
226
|
+
}
|
|
227
|
+
return resolved.origin === LOCAL_CSS_ORIGIN ? resolved.pathname : undefined;
|
|
228
|
+
}
|
|
216
229
|
/** Reject path escapes and separators before HTTP or writing; returns forward-slash relative output. */
|
|
217
230
|
export function safeRelativeOutputFile(required) {
|
|
218
231
|
const { value } = required;
|
|
@@ -222,6 +235,9 @@ export function safeRelativeOutputFile(required) {
|
|
|
222
235
|
throw new ExportPathError('Output path resolved outside the output directory — refused');
|
|
223
236
|
return value;
|
|
224
237
|
}
|
|
238
|
+
function contentIndexFile(relative) {
|
|
239
|
+
return relative ? relative + '/index.html' : 'index.html';
|
|
240
|
+
}
|
|
225
241
|
/** URL request path to portable artifact path, with decoded traversal refusal. */
|
|
226
242
|
export function outputFileForUrl(required, optional = {}) {
|
|
227
243
|
if (!required.url.startsWith('/') || required.url.startsWith('//') || /[\\\x00-\x1f\x7f]/.test(required.url))
|
|
@@ -233,10 +249,10 @@ export function outputFileForUrl(required, optional = {}) {
|
|
|
233
249
|
catch {
|
|
234
250
|
throw new ExportPathError('Invalid URL encoding — refused');
|
|
235
251
|
}
|
|
236
|
-
const relative = decoded.
|
|
252
|
+
const relative = trimCharsEnd({ text: decoded.startsWith('/') ? decoded.slice(1) : decoded, chars: '/' });
|
|
237
253
|
if (relative)
|
|
238
254
|
safeRelativeOutputFile({ value: relative });
|
|
239
|
-
const output = optional.contentRoute && !isJsonRoute(relative) ? (relative
|
|
255
|
+
const output = optional.contentRoute && !isJsonRoute(relative) ? contentIndexFile(relative) : relative;
|
|
240
256
|
return safeRelativeOutputFile({ value: output });
|
|
241
257
|
}
|
|
242
258
|
//# sourceMappingURL=transforms.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jini-ai/devops",
|
|
3
|
-
"version": "0.6.15
|
|
3
|
+
"version": "0.6.15",
|
|
4
4
|
"description": "DevOps capabilities for deployment, source control, and CI/CD, exposed through independent subpaths.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -148,16 +148,16 @@
|
|
|
148
148
|
"@vitest/coverage-v8": "^2.1.9",
|
|
149
149
|
"undici": "^7.25.0",
|
|
150
150
|
"parse5": "7.3.0",
|
|
151
|
-
"@jini-ai/daemon": "0.6.15
|
|
152
|
-
"@jini-ai/core": "^0.6.15
|
|
153
|
-
"@jini-ai/platform": "^0.6.15
|
|
151
|
+
"@jini-ai/daemon": "0.6.15",
|
|
152
|
+
"@jini-ai/core": "^0.6.15",
|
|
153
|
+
"@jini-ai/platform": "^0.6.15"
|
|
154
154
|
},
|
|
155
155
|
"dependencies": {
|
|
156
|
-
"@jini-ai/core": "^0.6.15
|
|
156
|
+
"@jini-ai/core": "^0.6.15"
|
|
157
157
|
},
|
|
158
158
|
"peerDependencies": {
|
|
159
159
|
"typescript": "^5.6.0",
|
|
160
|
-
"@jini-ai/platform": "^0.6.
|
|
160
|
+
"@jini-ai/platform": "^0.6.10",
|
|
161
161
|
"undici": "^7.25.0",
|
|
162
162
|
"parse5": "7.3.0"
|
|
163
163
|
},
|