veryfront 0.1.1063 → 0.1.1065
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/esm/cli/commands/pull/command-help.d.ts.map +1 -1
- package/esm/cli/commands/pull/command-help.js +7 -2
- package/esm/cli/commands/push/command-help.d.ts.map +1 -1
- package/esm/cli/commands/push/command-help.js +2 -0
- package/esm/cli/commands/push/command.d.ts.map +1 -1
- package/esm/cli/commands/push/command.js +39 -24
- package/esm/deno.js +1 -1
- package/esm/src/react/components/chat/chat/app-mode-chat.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/app-mode-chat.js +2 -3
- package/esm/src/react/components/chat/chat/contexts/message-context.d.ts +4 -4
- package/esm/src/react/components/chat/chat/contexts/message-context.d.ts.map +1 -1
- package/esm/src/react/components/chat/chat/contexts/message-context.js +3 -3
- package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.d.ts +2 -3
- package/esm/src/react/components/chat/chat/hooks/use-conversation-chat.d.ts.map +1 -1
- package/esm/src/schedule/factory.d.ts.map +1 -1
- package/esm/src/schedule/factory.js +105 -0
- package/esm/src/schedule/index.d.ts +1 -1
- package/esm/src/schedule/index.d.ts.map +1 -1
- package/esm/src/schedule/types.d.ts +20 -1
- package/esm/src/schedule/types.d.ts.map +1 -1
- package/esm/src/schedule/types.js +65 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.d.ts.map +1 -1
- package/esm/src/server/handlers/dev/framework-candidates.generated.js +2 -16
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/pull/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/pull/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,QAAQ,EAAE,WA4EtB,CAAC"}
|
|
@@ -66,7 +66,12 @@ export const pullHelp = {
|
|
|
66
66
|
"With --projects, each project is pulled into a subdirectory named after the slug",
|
|
67
67
|
'Projects list can also be specified in veryfront.json: { "projects": ["slug1", "slug2"] }',
|
|
68
68
|
"Priority order: --env > --release > --branch > main",
|
|
69
|
-
"--prune
|
|
70
|
-
"--prune
|
|
69
|
+
"--prune applies a full managed-source snapshot; it does not perform a Git merge",
|
|
70
|
+
"Mutating --prune requires a clean Git worktree; --yes and --force skip confirmation only",
|
|
71
|
+
"--prune --dry-run can preview anywhere and never writes or deletes local files",
|
|
72
|
+
"Only supported text files are managed; ignored, unsupported, and binary files remain unchanged",
|
|
73
|
+
"Pull preserves remote bytes exactly, including line endings and a missing final newline",
|
|
74
|
+
"Invalid, duplicate, reserved, or symlink-traversing remote paths fail before local writes",
|
|
75
|
+
"A fetch failure causes no writes or pruning; a local write or delete failure exits with an error",
|
|
71
76
|
],
|
|
72
77
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/push/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/push/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,QAAQ,EAAE,WAiDtB,CAAC"}
|
|
@@ -44,5 +44,7 @@ export const pushHelp = {
|
|
|
44
44
|
"Use --branch main to update the existing Veryfront main branch",
|
|
45
45
|
"Uploads supported text source files using their relative paths",
|
|
46
46
|
".vfignore controls which supported files are excluded",
|
|
47
|
+
"--dry-run never creates a project or branch, changes remote files, or writes a Push receipt",
|
|
48
|
+
"If an upload fails, Push does not delete remote files",
|
|
47
49
|
],
|
|
48
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/push/command.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yCAAyC,CAAC;AAK3E,OAAO,EACL,KAAK,SAAS,EAId,KAAK,cAAc,EAEpB,MAAM,wBAAwB,CAAC;AAKhC,OAAO,EAAuB,KAAK,aAAa,EAAsB,MAAM,sBAAsB,CAAC;AACnG,OAAO,EAAgB,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EAKL,KAAK,SAAS,EAIf,MAAM,uCAAuC,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;GAS7B,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;GAAgC,CAAC;AAE5D,MAAM,MAAM,QAAQ,GAAG,WAAW,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;;;GAOxB,CAAC;AAEH;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0CAA0C;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wDAAwD;IACxD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,oDAAoD;IACpD,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH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gB,WAAW,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAsQpE"}
|
|
@@ -305,38 +305,47 @@ export function pushCommand(options = {}) {
|
|
|
305
305
|
const client = createApiClient(config);
|
|
306
306
|
const branchName = branch || generateBranchName();
|
|
307
307
|
const isMainBranch = branchName === "main";
|
|
308
|
-
// First-push: If project doesn't exist on server yet, create it
|
|
308
|
+
// First-push: If project doesn't exist on server yet, create it unless this is a dry run.
|
|
309
309
|
let mainFiles = [];
|
|
310
|
+
let projectExists = true;
|
|
310
311
|
try {
|
|
311
312
|
mainFiles = await listAllFiles(client, config.projectSlug, { type: "main" });
|
|
312
313
|
}
|
|
313
314
|
catch (error) {
|
|
314
315
|
// Project doesn't exist yet - create it on first push
|
|
315
316
|
if (getErrorStatus(error) === 404) {
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
}
|
|
321
|
-
catch (reserveError) {
|
|
322
|
-
spinner.stop();
|
|
323
|
-
if (reserveError instanceof ProjectSlugConflictError) {
|
|
324
|
-
throw projectSlugConflictError(reserveError, projectReferenceSource);
|
|
317
|
+
if (dryRun) {
|
|
318
|
+
projectExists = false;
|
|
319
|
+
if (!quiet) {
|
|
320
|
+
logInfo(`Project "${config.projectSlug}" does not exist. Dry run will not create it.`);
|
|
325
321
|
}
|
|
326
|
-
throw reserveError;
|
|
327
|
-
}
|
|
328
|
-
if (reserveResult.slug !== config.projectSlug) {
|
|
329
|
-
await writeProjectSlug(projectDir, reserveResult.slug);
|
|
330
|
-
logInfo(`Project slug: ${reserveResult.slug}`);
|
|
331
322
|
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
323
|
+
else {
|
|
324
|
+
spinner.update("Creating project...");
|
|
325
|
+
let reserveResult;
|
|
326
|
+
try {
|
|
327
|
+
reserveResult = await reserveProjectSlug(config.projectSlug, config.apiToken, undefined, config.apiUrl, { allowAlternativeSlug: canPersistAlternativeSlug(projectReferenceSource) });
|
|
328
|
+
}
|
|
329
|
+
catch (reserveError) {
|
|
330
|
+
spinner.stop();
|
|
331
|
+
if (reserveError instanceof ProjectSlugConflictError) {
|
|
332
|
+
throw projectSlugConflictError(reserveError, projectReferenceSource);
|
|
333
|
+
}
|
|
334
|
+
throw reserveError;
|
|
335
|
+
}
|
|
336
|
+
if (reserveResult.slug !== config.projectSlug) {
|
|
337
|
+
await writeProjectSlug(projectDir, reserveResult.slug);
|
|
338
|
+
logInfo(`Project slug: ${reserveResult.slug}`);
|
|
339
|
+
}
|
|
340
|
+
config = { ...config, projectSlug: reserveResult.slug };
|
|
341
|
+
// Now try to get files again (should be empty for new project)
|
|
342
|
+
try {
|
|
343
|
+
mainFiles = await listAllFiles(client, config.projectSlug, { type: "main" });
|
|
344
|
+
}
|
|
345
|
+
catch {
|
|
346
|
+
// Project just created, no files yet
|
|
347
|
+
mainFiles = [];
|
|
348
|
+
}
|
|
340
349
|
}
|
|
341
350
|
}
|
|
342
351
|
else {
|
|
@@ -354,7 +363,13 @@ export function pushCommand(options = {}) {
|
|
|
354
363
|
}
|
|
355
364
|
const ops = sourceSnapshot.files;
|
|
356
365
|
const localPaths = new Set(ops.map((op) => op.path));
|
|
357
|
-
const target =
|
|
366
|
+
const target = projectExists
|
|
367
|
+
? await resolvePushRemoteFiles(client, config.projectSlug, branchName, mainFiles)
|
|
368
|
+
: {
|
|
369
|
+
branchId: null,
|
|
370
|
+
remoteFiles: mainFiles,
|
|
371
|
+
source: { type: "main" },
|
|
372
|
+
};
|
|
358
373
|
const toDelete = target.remoteFiles.map((f) => f.path).filter((p) => !localPaths.has(p));
|
|
359
374
|
if (ops.length === 0 && toDelete.length === 0) {
|
|
360
375
|
try {
|
package/esm/deno.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-mode-chat.d.ts","sourceRoot":"","sources":["../../../../../../src/src/react/components/chat/chat/app-mode-chat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"app-mode-chat.d.ts","sourceRoot":"","sources":["../../../../../../src/src/react/components/chat/chat/app-mode-chat.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AA0KjD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,SAAS,GAAG,KAAK,CAAC,YAAY,CAY1E;yBAZe,qBAAqB"}
|
|
@@ -32,9 +32,8 @@ function UncontrolledChat({ agentId, api = "/api/ag-ui", initialMessages, onErro
|
|
|
32
32
|
// upload endpoint (multipart `file` → `{ url }`) for real users + a project.
|
|
33
33
|
uploadApi, onAttach: userOnAttach, onDrop: userOnDrop, attachments: userAttachments, onRemoveAttachment: userOnRemoveAttachment, ref, ...rest }) {
|
|
34
34
|
// Seed + persistence are the library's job, not app code's: `useConversationChat`
|
|
35
|
-
// does `useChat` + conversation seeding + the persist bridge internally
|
|
36
|
-
//
|
|
37
|
-
// presenter of the resulting session.
|
|
35
|
+
// does `useChat` + conversation seeding + the persist bridge internally. This
|
|
36
|
+
// component stays a presenter of the resulting session.
|
|
38
37
|
const { chat, resolvedAgentId } = useConversationChat({
|
|
39
38
|
api,
|
|
40
39
|
agentId,
|
|
@@ -31,7 +31,7 @@ export interface MessageContextValue {
|
|
|
31
31
|
export declare function useMessageContext(): MessageContextValue;
|
|
32
32
|
/** React hook for message context optional. */
|
|
33
33
|
export declare function useMessageContextOptional(): MessageContextValue | null;
|
|
34
|
-
/** The message's parts as headless data
|
|
34
|
+
/** The message's grouped parts exposed as headless data. */
|
|
35
35
|
export interface MessagePartsData {
|
|
36
36
|
/** Parts grouped in render order (text / reasoning / tool / source …). */
|
|
37
37
|
parts: MessageContextValue["parts"];
|
|
@@ -40,9 +40,9 @@ export interface MessagePartsData {
|
|
|
40
40
|
}
|
|
41
41
|
/**
|
|
42
42
|
* `useMessageParts` — read the current message's parts as data, so a consumer
|
|
43
|
-
* can render them however they like (the
|
|
44
|
-
* `Message.Part` is the leaf
|
|
45
|
-
* `Message`.
|
|
43
|
+
* can render them however they like (the headless access point to parts;
|
|
44
|
+
* `Message.Part` is the leaf and `Message.Content` provides the default
|
|
45
|
+
* rendering). Throws outside a `Message`.
|
|
46
46
|
*/
|
|
47
47
|
export declare function useMessageParts(): MessagePartsData;
|
|
48
48
|
/** Render message context provider. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-context.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/contexts/message-context.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qDAAqD;AACrD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC/C,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IAGpB,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAG1B,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,mFAAmF;IACnF,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CACjC;AAID,+BAA+B;AAC/B,wBAAgB,iBAAiB,IAAI,mBAAmB,CAQvD;AAED,+CAA+C;AAC/C,wBAAgB,yBAAyB,IAAI,mBAAmB,GAAG,IAAI,CAEtE;AAED,
|
|
1
|
+
{"version":3,"file":"message-context.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/contexts/message-context.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AACnF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAE3D,qDAAqD;AACrD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC/C,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IAGpB,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAG1B,MAAM,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5B,mFAAmF;IACnF,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC5C,QAAQ,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;CACjC;AAID,+BAA+B;AAC/B,wBAAgB,iBAAiB,IAAI,mBAAmB,CAQvD;AAED,+CAA+C;AAC/C,wBAAgB,yBAAyB,IAAI,mBAAmB,GAAG,IAAI,CAEtE;AAED,4DAA4D;AAC5D,MAAM,WAAW,gBAAgB;IAC/B,0EAA0E;IAC1E,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACpC,yDAAyD;IACzD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,IAAI,gBAAgB,CAGlD;AAED,uCAAuC;AACvC,eAAO,MAAM,sBAAsB,KAA0B,CAAC"}
|
|
@@ -25,9 +25,9 @@ export function useMessageContextOptional() {
|
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* `useMessageParts` — read the current message's parts as data, so a consumer
|
|
28
|
-
* can render them however they like (the
|
|
29
|
-
* `Message.Part` is the leaf
|
|
30
|
-
* `Message`.
|
|
28
|
+
* can render them however they like (the headless access point to parts;
|
|
29
|
+
* `Message.Part` is the leaf and `Message.Content` provides the default
|
|
30
|
+
* rendering). Throws outside a `Message`.
|
|
31
31
|
*/
|
|
32
32
|
export function useMessageParts() {
|
|
33
33
|
const { parts, textContent } = useMessageContext();
|
|
@@ -2,9 +2,8 @@ import type { ChatMessage, UseChatResult } from "../../../../../agent/react/inde
|
|
|
2
2
|
import type { Conversation } from "../persistence/conversation-store.js";
|
|
3
3
|
/**
|
|
4
4
|
* `useConversationChat` — the library primitive that binds a `useChat` session
|
|
5
|
-
* to conversation persistence, so
|
|
6
|
-
* persistence
|
|
7
|
-
* provider/hook", not "sync state up with an effect").
|
|
5
|
+
* to conversation persistence, so application code does not need to duplicate
|
|
6
|
+
* the persistence effect.
|
|
8
7
|
*
|
|
9
8
|
* Inside a `ConversationsProvider` it seeds the session from the active
|
|
10
9
|
* conversation and saves changes back to the store; standalone, an explicit
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-conversation-chat.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/hooks/use-conversation-chat.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAQtF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAMzE
|
|
1
|
+
{"version":3,"file":"use-conversation-chat.d.ts","sourceRoot":"","sources":["../../../../../../../src/src/react/components/chat/chat/hooks/use-conversation-chat.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAQtF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAMzE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,WAAW,0BAA0B;IACzC,qEAAqE;IACrE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iFAAiF;IACjF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,eAAe,CAAC,EAAE,WAAW,EAAE,CAAC;IAChC,8CAA8C;IAC9C,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,KAAK,IAAI,CAAC;CACjD;AAED,sDAAsD;AACtD,MAAM,WAAW,yBAAyB;IACxC,iEAAiE;IACjE,IAAI,EAAE,aAAa,CAAC;IACpB,gFAAgF;IAChF,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAC3B,+EAA+E;IAC/E,eAAe,EAAE,MAAM,GAAG,SAAS,CAAC;CACrC;AAED,qFAAqF;AACrF,wBAAgB,mBAAmB,CACjC,OAAO,GAAE,0BAA+B,GACvC,yBAAyB,CAmL3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/src/schedule/factory.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/src/schedule/factory.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,cAAc,EACd,kBAAkB,EAInB,MAAM,YAAY,CAAC;AA8LpB,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,kBAAkB,CAwCnE"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { isTriggerTarget } from "../trigger/target.js";
|
|
2
2
|
import { assertSerializable, validateTriggerId } from "../trigger/validation.js";
|
|
3
3
|
const CONCURRENCY_POLICIES = new Set(["Allow", "Forbid", "Replace"]);
|
|
4
|
+
const INTEGRATION_NAME_PATTERN = /^[a-z0-9][a-z0-9_-]*$/;
|
|
5
|
+
const REQUIREMENT_KIND_PATTERN = /^[a-z][a-z0-9_-]*$/;
|
|
4
6
|
function requireString(value, label) {
|
|
5
7
|
if (typeof value !== "string" || value.trim().length === 0) {
|
|
6
8
|
throw new Error(`${label} is required.`);
|
|
@@ -14,6 +16,107 @@ function validatePositiveInteger(value, label) {
|
|
|
14
16
|
throw new Error(`${label} must be a positive integer.`);
|
|
15
17
|
}
|
|
16
18
|
}
|
|
19
|
+
function requireContractString(value, label, maxLength) {
|
|
20
|
+
const normalized = requireString(value, label).trim();
|
|
21
|
+
if (normalized.length > maxLength) {
|
|
22
|
+
throw new Error(`${label} must be at most ${maxLength} characters.`);
|
|
23
|
+
}
|
|
24
|
+
return normalized;
|
|
25
|
+
}
|
|
26
|
+
function requireIntegrationName(value, label) {
|
|
27
|
+
const normalized = requireContractString(value, label, 255);
|
|
28
|
+
if (!INTEGRATION_NAME_PATTERN.test(normalized)) {
|
|
29
|
+
throw new Error(`${label} must use a lowercase integration identifier.`);
|
|
30
|
+
}
|
|
31
|
+
return normalized;
|
|
32
|
+
}
|
|
33
|
+
function requireRequirementKind(value, label) {
|
|
34
|
+
const normalized = requireContractString(value, label, 64);
|
|
35
|
+
if (!REQUIREMENT_KIND_PATTERN.test(normalized)) {
|
|
36
|
+
throw new Error(`${label} must use a lowercase resource kind.`);
|
|
37
|
+
}
|
|
38
|
+
return normalized;
|
|
39
|
+
}
|
|
40
|
+
function assertOnlyKeys(record, allowedKeys, label) {
|
|
41
|
+
const allowed = new Set(allowedKeys);
|
|
42
|
+
const unknownKey = Object.keys(record).find((key) => !allowed.has(key));
|
|
43
|
+
if (unknownKey) {
|
|
44
|
+
throw new Error(`${label}.${unknownKey} is not supported.`);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
function normalizeIntegrationRequirements(value) {
|
|
48
|
+
if (value === undefined)
|
|
49
|
+
return undefined;
|
|
50
|
+
if (!Array.isArray(value)) {
|
|
51
|
+
throw new Error("Schedule integrationRequirements must be an array.");
|
|
52
|
+
}
|
|
53
|
+
if (value.length > 20) {
|
|
54
|
+
throw new Error("Schedule integrationRequirements must contain at most 20 entries.");
|
|
55
|
+
}
|
|
56
|
+
const integrations = new Set();
|
|
57
|
+
return value.map((requirement, index) => {
|
|
58
|
+
if (!requirement || typeof requirement !== "object" || Array.isArray(requirement)) {
|
|
59
|
+
throw new Error(`Schedule integrationRequirements[${index}] must be an object.`);
|
|
60
|
+
}
|
|
61
|
+
const record = requirement;
|
|
62
|
+
const label = `Schedule integrationRequirements[${index}]`;
|
|
63
|
+
assertOnlyKeys(record, ["integration", "requiredScopes", "resources"], label);
|
|
64
|
+
const integration = requireIntegrationName(record.integration, `${label}.integration`);
|
|
65
|
+
const integrationKey = integration.toLowerCase();
|
|
66
|
+
if (integrations.has(integrationKey)) {
|
|
67
|
+
throw new Error(`Schedule integrationRequirements contains duplicate integration ${integration}.`);
|
|
68
|
+
}
|
|
69
|
+
integrations.add(integrationKey);
|
|
70
|
+
const rawRequiredScopes = record.requiredScopes ?? [];
|
|
71
|
+
if (!Array.isArray(rawRequiredScopes)) {
|
|
72
|
+
throw new Error(`${label}.requiredScopes must be an array.`);
|
|
73
|
+
}
|
|
74
|
+
if (rawRequiredScopes.length > 50) {
|
|
75
|
+
throw new Error(`${label}.requiredScopes must contain at most 50 entries.`);
|
|
76
|
+
}
|
|
77
|
+
const requiredScopes = rawRequiredScopes.map((scope, scopeIndex) => requireContractString(scope, `${label}.requiredScopes[${scopeIndex}]`, 255));
|
|
78
|
+
const rawResources = record.resources ?? [];
|
|
79
|
+
if (!Array.isArray(rawResources)) {
|
|
80
|
+
throw new Error(`${label}.resources must be an array.`);
|
|
81
|
+
}
|
|
82
|
+
if (rawResources.length > 50) {
|
|
83
|
+
throw new Error(`${label}.resources must contain at most 50 entries.`);
|
|
84
|
+
}
|
|
85
|
+
const resources = rawResources.map((resource, resourceIndex) => normalizeIntegrationResource(resource, index, resourceIndex));
|
|
86
|
+
return { integration, requiredScopes, resources };
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
function normalizeIntegrationResource(resource, requirementIndex, resourceIndex) {
|
|
90
|
+
if (!resource || typeof resource !== "object" || Array.isArray(resource)) {
|
|
91
|
+
throw new Error(`Schedule integrationRequirements[${requirementIndex}].resources[${resourceIndex}] must be an object.`);
|
|
92
|
+
}
|
|
93
|
+
const record = resource;
|
|
94
|
+
const label = `Schedule integrationRequirements[${requirementIndex}].resources[${resourceIndex}]`;
|
|
95
|
+
assertOnlyKeys(record, ["kind", "id", "parent"], label);
|
|
96
|
+
const kind = requireRequirementKind(record.kind, `${label}.kind`);
|
|
97
|
+
const id = requireContractString(record.id, `${label}.id`, 512);
|
|
98
|
+
const parent = record.parent;
|
|
99
|
+
const normalizedParent = normalizeIntegrationResourceParent(parent, requirementIndex, resourceIndex);
|
|
100
|
+
return {
|
|
101
|
+
kind,
|
|
102
|
+
id,
|
|
103
|
+
...(normalizedParent === undefined ? {} : { parent: normalizedParent }),
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function normalizeIntegrationResourceParent(value, requirementIndex, resourceIndex) {
|
|
107
|
+
if (value === undefined)
|
|
108
|
+
return undefined;
|
|
109
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
110
|
+
throw new Error(`Schedule integrationRequirements[${requirementIndex}].resources[${resourceIndex}].parent must be an object.`);
|
|
111
|
+
}
|
|
112
|
+
const record = value;
|
|
113
|
+
const label = `Schedule integrationRequirements[${requirementIndex}].resources[${resourceIndex}].parent`;
|
|
114
|
+
assertOnlyKeys(record, ["kind", "id"], label);
|
|
115
|
+
return {
|
|
116
|
+
kind: requireRequirementKind(record.kind, `${label}.kind`),
|
|
117
|
+
id: requireContractString(record.id, `${label}.id`, 512),
|
|
118
|
+
};
|
|
119
|
+
}
|
|
17
120
|
export function schedule(config) {
|
|
18
121
|
const id = requireString(config.id, "Schedule id");
|
|
19
122
|
validateTriggerId(id, "Schedule");
|
|
@@ -30,6 +133,7 @@ export function schedule(config) {
|
|
|
30
133
|
validatePositiveInteger(config.backoffLimit, "Schedule backoffLimit");
|
|
31
134
|
validatePositiveInteger(config.maxRuns, "Schedule maxRuns");
|
|
32
135
|
assertSerializable(config.input, "Schedule input");
|
|
136
|
+
const integrationRequirements = normalizeIntegrationRequirements(config.integrationRequirements);
|
|
33
137
|
return {
|
|
34
138
|
id,
|
|
35
139
|
...(config.name === undefined ? {} : { name: config.name }),
|
|
@@ -44,5 +148,6 @@ export function schedule(config) {
|
|
|
44
148
|
? {}
|
|
45
149
|
: { concurrencyPolicy: config.concurrencyPolicy }),
|
|
46
150
|
...(config.maxRuns === undefined ? {} : { maxRuns: config.maxRuns }),
|
|
151
|
+
...(integrationRequirements === undefined ? {} : { integrationRequirements }),
|
|
47
152
|
};
|
|
48
153
|
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
*/
|
|
19
19
|
import "../../_dnt.polyfills.js";
|
|
20
20
|
export { schedule } from "./factory.js";
|
|
21
|
-
export type { ScheduleConcurrencyPolicy, ScheduleConfig, ScheduleDefinition } from "./types.js";
|
|
21
|
+
export type { ScheduleConcurrencyPolicy, ScheduleConfig, ScheduleDefinition, ScheduleIntegrationRequirement, ScheduleIntegrationRequirementConfig, ScheduleIntegrationResource, ScheduleIntegrationResourceIdentity, } from "./types.js";
|
|
22
22
|
export { isScheduleDefinition } from "./types.js";
|
|
23
23
|
export { discoverSchedules } from "./discovery.js";
|
|
24
24
|
export type { ScheduleDiscoveryOptions, ScheduleDiscoveryResult } from "./discovery.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/schedule/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/src/schedule/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,yBAAyB,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,YAAY,EACV,yBAAyB,EACzB,cAAc,EACd,kBAAkB,EAClB,8BAA8B,EAC9B,oCAAoC,EACpC,2BAA2B,EAC3B,mCAAmC,GACpC,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,YAAY,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
import type { TriggerTarget } from "../trigger/target.js";
|
|
2
2
|
export type ScheduleConcurrencyPolicy = "Allow" | "Forbid" | "Replace";
|
|
3
|
+
export interface ScheduleIntegrationResourceIdentity {
|
|
4
|
+
kind: string;
|
|
5
|
+
id: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ScheduleIntegrationResource extends ScheduleIntegrationResourceIdentity {
|
|
8
|
+
parent?: ScheduleIntegrationResourceIdentity;
|
|
9
|
+
}
|
|
10
|
+
export interface ScheduleIntegrationRequirement {
|
|
11
|
+
integration: string;
|
|
12
|
+
requiredScopes: string[];
|
|
13
|
+
resources: ScheduleIntegrationResource[];
|
|
14
|
+
}
|
|
15
|
+
export interface ScheduleIntegrationRequirementConfig {
|
|
16
|
+
integration: string;
|
|
17
|
+
requiredScopes?: string[];
|
|
18
|
+
resources?: ScheduleIntegrationResource[];
|
|
19
|
+
}
|
|
3
20
|
export interface ScheduleDefinition {
|
|
4
21
|
id: string;
|
|
5
22
|
name?: string;
|
|
@@ -12,10 +29,12 @@ export interface ScheduleDefinition {
|
|
|
12
29
|
backoffLimit?: number;
|
|
13
30
|
concurrencyPolicy?: ScheduleConcurrencyPolicy;
|
|
14
31
|
maxRuns?: number;
|
|
32
|
+
integrationRequirements?: ScheduleIntegrationRequirement[];
|
|
15
33
|
}
|
|
16
|
-
export type ScheduleConfig = Omit<ScheduleDefinition, "schedule"> & {
|
|
34
|
+
export type ScheduleConfig = Omit<ScheduleDefinition, "schedule" | "integrationRequirements"> & {
|
|
17
35
|
cron?: string;
|
|
18
36
|
schedule?: string;
|
|
37
|
+
integrationRequirements?: ScheduleIntegrationRequirementConfig[];
|
|
19
38
|
};
|
|
20
39
|
export declare function isScheduleDefinition(value: unknown): value is ScheduleDefinition;
|
|
21
40
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/src/schedule/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,MAAM,yBAAyB,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEvE,MAAM,WAAW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B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,aAAa,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,yBAAyB,CAAC;IAC9C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uBAAuB,CAAC,EAAE,8BAA8B,EAAE,CAAC;CAC5D;AAED,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,kBAAkB,EAAE,UAAU,GAAG,yBAAyB,CAAC,GAAG;IAC9F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uBAAuB,CAAC,EAAE,oCAAoC,EAAE,CAAC;CAClE,CAAC;AAEF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB,CAUhF"}
|
|
@@ -5,5 +5,69 @@ export function isScheduleDefinition(value) {
|
|
|
5
5
|
return (typeof definition.id === "string" &&
|
|
6
6
|
typeof definition.schedule === "string" &&
|
|
7
7
|
definition.target !== null &&
|
|
8
|
-
typeof definition.target === "object"
|
|
8
|
+
typeof definition.target === "object" &&
|
|
9
|
+
isScheduleIntegrationRequirements(definition.integrationRequirements));
|
|
10
|
+
}
|
|
11
|
+
function isScheduleIntegrationRequirements(value) {
|
|
12
|
+
if (value === undefined)
|
|
13
|
+
return true;
|
|
14
|
+
if (!Array.isArray(value) || value.length > 20)
|
|
15
|
+
return false;
|
|
16
|
+
const integrations = new Set();
|
|
17
|
+
for (const requirement of value) {
|
|
18
|
+
if (!requirement || typeof requirement !== "object" || Array.isArray(requirement)) {
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
const record = requirement;
|
|
22
|
+
const integration = isIntegrationName(record.integration) ? record.integration : undefined;
|
|
23
|
+
if (integration === undefined ||
|
|
24
|
+
!hasOnlyKeys(record, ["integration", "requiredScopes", "resources"]) ||
|
|
25
|
+
integrations.has(integration.toLowerCase()) ||
|
|
26
|
+
!isStringArray(record.requiredScopes) ||
|
|
27
|
+
!isScheduleIntegrationResources(record.resources)) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
integrations.add(integration.toLowerCase());
|
|
31
|
+
}
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
function isScheduleIntegrationResources(value) {
|
|
35
|
+
if (!Array.isArray(value) || value.length > 50)
|
|
36
|
+
return false;
|
|
37
|
+
return value.every((resource) => {
|
|
38
|
+
if (!resource || typeof resource !== "object" || Array.isArray(resource))
|
|
39
|
+
return false;
|
|
40
|
+
const record = resource;
|
|
41
|
+
return (hasOnlyKeys(record, ["kind", "id", "parent"]) &&
|
|
42
|
+
isRequirementKind(record.kind) &&
|
|
43
|
+
isBoundedString(record.id, 512) &&
|
|
44
|
+
(record.parent === undefined || isScheduleIntegrationResourceIdentity(record.parent)));
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function isScheduleIntegrationResourceIdentity(value) {
|
|
48
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
49
|
+
return false;
|
|
50
|
+
const record = value;
|
|
51
|
+
return hasOnlyKeys(record, ["kind", "id"]) &&
|
|
52
|
+
isRequirementKind(record.kind) && isBoundedString(record.id, 512);
|
|
53
|
+
}
|
|
54
|
+
function hasOnlyKeys(record, allowedKeys) {
|
|
55
|
+
const allowed = new Set(allowedKeys);
|
|
56
|
+
return Object.keys(record).every((key) => allowed.has(key));
|
|
57
|
+
}
|
|
58
|
+
function isStringArray(value) {
|
|
59
|
+
return Array.isArray(value) && value.length <= 50 &&
|
|
60
|
+
value.every((item) => isBoundedString(item, 255));
|
|
61
|
+
}
|
|
62
|
+
function isNonEmptyString(value) {
|
|
63
|
+
return typeof value === "string" && value.trim().length > 0;
|
|
64
|
+
}
|
|
65
|
+
function isBoundedString(value, maxLength) {
|
|
66
|
+
return isNonEmptyString(value) && value.trim().length <= maxLength;
|
|
67
|
+
}
|
|
68
|
+
function isIntegrationName(value) {
|
|
69
|
+
return isBoundedString(value, 255) && /^[a-z0-9][a-z0-9_-]*$/.test(value.trim());
|
|
70
|
+
}
|
|
71
|
+
function isRequirementKind(value) {
|
|
72
|
+
return isBoundedString(value, 64) && /^[a-z][a-z0-9_-]*$/.test(value.trim());
|
|
9
73
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"framework-candidates.generated.d.ts","sourceRoot":"","sources":["../../../../../src/src/server/handlers/dev/framework-candidates.generated.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,
|
|
1
|
+
{"version":3,"file":"framework-candidates.generated.d.ts","sourceRoot":"","sources":["../../../../../src/src/server/handlers/dev/framework-candidates.generated.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAktajD,CAAC"}
|
|
@@ -526,7 +526,6 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
526
526
|
"2.19.93",
|
|
527
527
|
"2.2914",
|
|
528
528
|
"2.2914-5.9456",
|
|
529
|
-
"2.3",
|
|
530
529
|
"2.3408",
|
|
531
530
|
"2.3655-1.9728V11.6a.7664.7664",
|
|
532
531
|
"2.49",
|
|
@@ -664,7 +663,6 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
664
663
|
"4V5a2",
|
|
665
664
|
"4h.01M21",
|
|
666
665
|
"4px",
|
|
667
|
-
"4th,",
|
|
668
666
|
"5",
|
|
669
667
|
"5).",
|
|
670
668
|
"5.125A3",
|
|
@@ -2661,7 +2659,6 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
2661
2659
|
"Java",
|
|
2662
2660
|
"JavaScript",
|
|
2663
2661
|
"Joe",
|
|
2664
|
-
"K",
|
|
2665
2662
|
"KB",
|
|
2666
2663
|
"Keep",
|
|
2667
2664
|
"KeyboardEvent)",
|
|
@@ -3905,7 +3902,6 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
3905
3902
|
"Searchable",
|
|
3906
3903
|
"Secondary",
|
|
3907
3904
|
"Section",
|
|
3908
|
-
"See",
|
|
3909
3905
|
"Seed",
|
|
3910
3906
|
"Select",
|
|
3911
3907
|
"Select({",
|
|
@@ -5164,7 +5160,6 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
5164
5160
|
"answerParts,",
|
|
5165
5161
|
"anthropic",
|
|
5166
5162
|
"anthropic:",
|
|
5167
|
-
"anti-pattern",
|
|
5168
5163
|
"any",
|
|
5169
5164
|
"any)",
|
|
5170
5165
|
"any.",
|
|
@@ -5467,7 +5462,6 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
5467
5462
|
"basic).",
|
|
5468
5463
|
"batching",
|
|
5469
5464
|
"batteries",
|
|
5470
|
-
"batteries).",
|
|
5471
5465
|
"batteries-included",
|
|
5472
5466
|
"batteries-included)",
|
|
5473
5467
|
"be",
|
|
@@ -6318,7 +6312,6 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
6318
6312
|
"composing",
|
|
6319
6313
|
"composition",
|
|
6320
6314
|
"composition)",
|
|
6321
|
-
"composition-patterns",
|
|
6322
6315
|
"composition/agent-avatar.tsx",
|
|
6323
6316
|
"composition/api.tsx",
|
|
6324
6317
|
"composition/chat-composer.tsx",
|
|
@@ -6751,6 +6744,7 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
6751
6744
|
"data-vf-appshell=",
|
|
6752
6745
|
"data-vf-chat",
|
|
6753
6746
|
"data-vf-chat=",
|
|
6747
|
+
"data.",
|
|
6754
6748
|
"data:",
|
|
6755
6749
|
"data;",
|
|
6756
6750
|
"dataInvalid,",
|
|
@@ -6981,7 +6975,6 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
6981
6975
|
"docks",
|
|
6982
6976
|
"docs",
|
|
6983
6977
|
"docs)",
|
|
6984
|
-
"docs/plans/K0-collections-house-rule.md.",
|
|
6985
6978
|
"document",
|
|
6986
6979
|
"document.",
|
|
6987
6980
|
"document.activeElement",
|
|
@@ -8099,7 +8092,6 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
8099
8092
|
"honours",
|
|
8100
8093
|
"hook",
|
|
8101
8094
|
"hook's",
|
|
8102
|
-
"hook).",
|
|
8103
8095
|
"hook,",
|
|
8104
8096
|
"hook.",
|
|
8105
8097
|
"hook:",
|
|
@@ -8553,7 +8545,6 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
8553
8545
|
"items]);",
|
|
8554
8546
|
"its",
|
|
8555
8547
|
"itself",
|
|
8556
|
-
"itself**",
|
|
8557
8548
|
"itself,",
|
|
8558
8549
|
"itself.",
|
|
8559
8550
|
"itself:",
|
|
@@ -8745,7 +8736,6 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
8745
8736
|
"leading-tight",
|
|
8746
8737
|
"leads",
|
|
8747
8738
|
"leaf",
|
|
8748
|
-
"leaf,",
|
|
8749
8739
|
"leaf.",
|
|
8750
8740
|
"leak",
|
|
8751
8741
|
"leans",
|
|
@@ -8793,7 +8783,6 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
8793
8783
|
"lifecycle",
|
|
8794
8784
|
"lifecycle.",
|
|
8795
8785
|
"lifetime.",
|
|
8796
|
-
"lift",
|
|
8797
8786
|
"lifted",
|
|
8798
8787
|
"light",
|
|
8799
8788
|
"light-only",
|
|
@@ -10542,7 +10531,6 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
10542
10531
|
"provider-grouped",
|
|
10543
10532
|
"provider.",
|
|
10544
10533
|
"provider.save",
|
|
10545
|
-
"provider/hook",
|
|
10546
10534
|
"provider/model",
|
|
10547
10535
|
"provider:",
|
|
10548
10536
|
"provider:unbound",
|
|
@@ -10995,6 +10983,7 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
10995
10983
|
"renderers,",
|
|
10996
10984
|
"renderers.",
|
|
10997
10985
|
"rendering",
|
|
10986
|
+
"rendering).",
|
|
10998
10987
|
"rendering.",
|
|
10999
10988
|
"renders",
|
|
11000
10989
|
"renders)",
|
|
@@ -11107,7 +11096,6 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
11107
11096
|
"return;",
|
|
11108
11097
|
"returned",
|
|
11109
11098
|
"returns",
|
|
11110
|
-
"reusable",
|
|
11111
11099
|
"reuse",
|
|
11112
11100
|
"reused:",
|
|
11113
11101
|
"reused;",
|
|
@@ -12508,7 +12496,6 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
12508
12496
|
"thumbnails),",
|
|
12509
12497
|
"tick",
|
|
12510
12498
|
"tick.",
|
|
12511
|
-
"tier-1).",
|
|
12512
12499
|
"tight",
|
|
12513
12500
|
"tight.",
|
|
12514
12501
|
"tightened)",
|
|
@@ -13102,7 +13089,6 @@ export const FRAMEWORK_CANDIDATES = [
|
|
|
13102
13089
|
"useDropZone(",
|
|
13103
13090
|
"useDropZone(withFocus(onDrop",
|
|
13104
13091
|
"useDropZone}.",
|
|
13105
|
-
"useEffect",
|
|
13106
13092
|
"useInlineCitation():",
|
|
13107
13093
|
"useInlineCitation();",
|
|
13108
13094
|
"useInlineFileUpload",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1065",
|
|
4
4
|
"description": "The simplest way to build AI-powered apps",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -328,10 +328,10 @@
|
|
|
328
328
|
"@types/react": "19.2.14",
|
|
329
329
|
"@types/react-dom": "19.2.3",
|
|
330
330
|
"ws": "8.21.0",
|
|
331
|
-
"@veryfront/ext-bundler-esbuild": "0.1.
|
|
332
|
-
"@veryfront/ext-content-mdx": "0.1.
|
|
333
|
-
"@veryfront/ext-css-tailwind": "0.1.
|
|
334
|
-
"@veryfront/ext-parser-babel": "0.1.
|
|
331
|
+
"@veryfront/ext-bundler-esbuild": "0.1.1065",
|
|
332
|
+
"@veryfront/ext-content-mdx": "0.1.1065",
|
|
333
|
+
"@veryfront/ext-css-tailwind": "0.1.1065",
|
|
334
|
+
"@veryfront/ext-parser-babel": "0.1.1065"
|
|
335
335
|
},
|
|
336
336
|
"devDependencies": {
|
|
337
337
|
"@types/node": "20.9.0"
|