@domain-first/project-structure 8.8.0 → 8.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/{526.js → 115.js} +210 -2
- package/dist/{947.js → 201.js} +483 -2
- package/dist/287.js +243 -298
- package/dist/38.js +1 -2
- package/dist/561.js +2 -3
- package/dist/agent-cli.d.ts +2 -1
- package/dist/agent-requests.d.ts +2 -0
- package/dist/graph.cjs +4 -0
- package/dist/graph.js +1 -2
- package/dist/in-memory-db.d.ts +9 -0
- package/dist/index.cjs +407 -258
- package/dist/index.js +1 -1
- package/dist/init.cjs +47 -45
- package/dist/init.js +1 -1
- package/dist/integration.cjs +408 -259
- package/dist/integration.js +1 -1
- package/dist/integrations/drizzle.d.ts +8 -0
- package/dist/integrations/drizzle.spec.d.ts +1 -0
- package/dist/integrations/index.d.ts +1 -0
- package/dist/integrations/testcontainers.d.ts +1 -1
- package/dist/lint.cjs +4 -0
- package/dist/lint.js +1 -1
- package/dist/react.cjs +407 -258
- package/dist/react.js +1 -1
- package/dist/upgrade-in-memory-db.d.ts +7 -0
- package/dist/upgrade-in-memory-db.spec.d.ts +1 -0
- package/dist/upgrade.cjs +93 -27
- package/dist/upgrade.js +25 -3
- package/dist/use-cases/add-integration.d.ts +3 -3
- package/package.json +1 -1
- package/skills/df-ps-project-scripts/SKILL.md +22 -5
- package/skills/df-ps-scaffold/references/agent-operations.md +2 -1
- package/skills/df-ps-scaffold/references/generators.md +1 -1
- package/dist/780.js +0 -481
package/dist/agent-cli.d.ts
CHANGED
|
@@ -290,6 +290,7 @@ export declare const describeAgentCommand: (command: AgentCommand) => {
|
|
|
290
290
|
operation: z.ZodLiteral<"add">;
|
|
291
291
|
integrations: z.ZodArray<z.ZodEnum<{
|
|
292
292
|
prisma: "prisma";
|
|
293
|
+
drizzle: "drizzle";
|
|
293
294
|
openapi: "openapi";
|
|
294
295
|
orval: "orval";
|
|
295
296
|
"rest-endpoint-generator": "rest-endpoint-generator";
|
|
@@ -417,7 +418,7 @@ export declare const describeAgentCommand: (command: AgentCommand) => {
|
|
|
417
418
|
} | undefined;
|
|
418
419
|
}[];
|
|
419
420
|
integrations: {
|
|
420
|
-
id: "prisma" | "openapi" | "orval" | "rest-endpoint-generator" | "storybook" | "vitest" | "testcontainers" | "in-memory-db" | "playwright";
|
|
421
|
+
id: "prisma" | "drizzle" | "openapi" | "orval" | "rest-endpoint-generator" | "storybook" | "vitest" | "testcontainers" | "in-memory-db" | "playwright";
|
|
421
422
|
name: string;
|
|
422
423
|
group: "backend" | "frontend";
|
|
423
424
|
available: boolean;
|
package/dist/agent-requests.d.ts
CHANGED
|
@@ -270,6 +270,7 @@ export declare const integrationRequestSchema: z.ZodObject<{
|
|
|
270
270
|
operation: z.ZodLiteral<"add">;
|
|
271
271
|
integrations: z.ZodArray<z.ZodEnum<{
|
|
272
272
|
prisma: "prisma";
|
|
273
|
+
drizzle: "drizzle";
|
|
273
274
|
openapi: "openapi";
|
|
274
275
|
orval: "orval";
|
|
275
276
|
"rest-endpoint-generator": "rest-endpoint-generator";
|
|
@@ -571,6 +572,7 @@ export declare const requestSchemaFor: (command: AgentCommand) => z.ZodDiscrimin
|
|
|
571
572
|
operation: z.ZodLiteral<"add">;
|
|
572
573
|
integrations: z.ZodArray<z.ZodEnum<{
|
|
573
574
|
prisma: "prisma";
|
|
575
|
+
drizzle: "drizzle";
|
|
574
576
|
openapi: "openapi";
|
|
575
577
|
orval: "orval";
|
|
576
578
|
"rest-endpoint-generator": "rest-endpoint-generator";
|
package/dist/graph.cjs
CHANGED
package/dist/graph.js
CHANGED
|
@@ -4,9 +4,8 @@ import node_fs from "node:fs";
|
|
|
4
4
|
import node_os from "node:os";
|
|
5
5
|
import node_path from "node:path";
|
|
6
6
|
import { parseArgs } from "node:util";
|
|
7
|
-
import {
|
|
7
|
+
import { namedImportFiles, wiring_layers, findWiredModules, outdatedConfigMessage, ConfigFile, File, ProjectRoot, wiredDependencyNames } from "./201.js";
|
|
8
8
|
import { readAliases, resolveSpecifier } from "./38.js";
|
|
9
|
-
import { namedImportFiles, wiring_layers, findWiredModules, wiredDependencyNames } from "./947.js";
|
|
10
9
|
const sharedKernel = 'shared-kernel';
|
|
11
10
|
const contextsOf = (contextsFolder)=>node_fs.existsSync(contextsFolder) ? node_fs.readdirSync(contextsFolder, {
|
|
12
11
|
withFileTypes: true
|
package/dist/in-memory-db.d.ts
CHANGED
|
@@ -5,6 +5,15 @@ import { type WiredModule } from './wiring';
|
|
|
5
5
|
* Implementations of this type get the in-memory DB.
|
|
6
6
|
*/
|
|
7
7
|
export declare const inMemoryImplementationType = "in-memory";
|
|
8
|
+
/**
|
|
9
|
+
* `withId` of 8.9.0 and earlier: it compared the stored items' `id`,
|
|
10
|
+
* so items saved as an `[id, item]` tuple were never found.
|
|
11
|
+
*/
|
|
12
|
+
export declare const legacyWithIdLookup = " withId: (id: TId): T | null =>\n items().find(\n (x: T) => hasId(x) && idsAreEqual(x.id as TId, id)\n ) ?? null,\n";
|
|
13
|
+
export declare const legacyHasId = "const hasId = (x: unknown): x is { id: unknown } =>\n typeof x === 'object' && x !== null && 'id' in x;\n\n";
|
|
14
|
+
/** Looks up the id saved with the item, as `save` and `deleteById` do. */
|
|
15
|
+
export declare const withIdLookup = " withId: (id: TId): T | null =>\n globalThis.___SHARED_IN_MEMORY_DB___![key].find((entry) =>\n idsAreEqual(entry.id as TId, id)\n )?.item ?? null,\n";
|
|
16
|
+
export declare const inMemoryDbService = "type Entry = {\n id: unknown;\n item: any;\n};\n\ndeclare global {\n var ___SHARED_IN_MEMORY_DB___: Record<string, Array<Entry>> | undefined;\n}\n\ntype Section<T, TId> = {\n all: (predicate?: (x: T) => boolean) => T[];\n first: (predicate: (x: T) => boolean) => T | null;\n withId: (id: TId) => T | null;\n lastAddedItem: () => T | null;\n save: (payload: T extends { id: TId } ? T : [TId, T]) => void;\n deleteById: (id: TId) => void;\n delete: (predicate: (x: T) => boolean) => void;\n};\n\ntype IdsAreEqual<TId> = (a: TId, b: TId) => boolean;\n\nconst comparisonMethodNames = ['equals', 'same', 'isSame', 'isEqual'] as const;\n\nconst defaultIdsAreEqual = (a: unknown, b: unknown): boolean => {\n if (typeof a !== 'object' || a === null) {\n return Object.is(a, b);\n }\n\n for (const methodName of comparisonMethodNames) {\n const method: unknown = (a as Record<string, unknown>)[methodName];\n if (typeof method === 'function') {\n return Boolean(method.call(a, b));\n }\n }\n\n return Object.is(a, b);\n};\n\nexport class InMemoryDbInfrastructureService {\n protected section<T extends { id: unknown }>(\n key: string,\n idsAreEqual?: IdsAreEqual<T['id']>\n ): Section<T, T['id']>;\n protected section<T, TId>(\n key: string,\n idsAreEqual?: IdsAreEqual<TId>\n ): Section<T, TId>;\n protected section<T, TId>(\n key: string,\n idsAreEqual: IdsAreEqual<TId> = defaultIdsAreEqual\n ): Section<T, TId> {\n if (!globalThis.___SHARED_IN_MEMORY_DB___) {\n globalThis.___SHARED_IN_MEMORY_DB___ = {};\n }\n\n if (!globalThis.___SHARED_IN_MEMORY_DB___[key]) {\n globalThis.___SHARED_IN_MEMORY_DB___[key] = [];\n }\n\n const items = (): T[] =>\n globalThis.___SHARED_IN_MEMORY_DB___![key].map(\n (entry) => entry.item\n );\n\n return {\n all: (predicate: (x: T) => boolean = () => true): T[] =>\n items().filter(predicate),\n first: (predicate: (x: T) => boolean): T | null =>\n items().find(predicate) ?? null,\n withId: (id: TId): T | null =>\n globalThis.___SHARED_IN_MEMORY_DB___![key].find((entry) =>\n idsAreEqual(entry.id as TId, id)\n )?.item ?? null,\n lastAddedItem: (): T | null =>\n globalThis.___SHARED_IN_MEMORY_DB___![key].at(-1)?.item ?? null,\n save: (payload: T extends { id: TId } ? T : [TId, T]) => {\n const id = Array.isArray(payload) ? payload[0] : payload.id;\n const item = Array.isArray(payload) ? payload[1] : payload;\n const entries = globalThis.___SHARED_IN_MEMORY_DB___![key];\n const existing = entries.find((entry) =>\n idsAreEqual(entry.id as TId, id)\n );\n if (existing) {\n existing.item = item;\n return;\n }\n entries.push({ id, item });\n },\n deleteById: (id: TId) => {\n globalThis.___SHARED_IN_MEMORY_DB___![key] =\n globalThis.___SHARED_IN_MEMORY_DB___![key].filter(\n (entry) => !idsAreEqual(entry.id as TId, id)\n );\n },\n delete: (predicate: (x: T) => boolean) => {\n globalThis.___SHARED_IN_MEMORY_DB___![key] =\n globalThis.___SHARED_IN_MEMORY_DB___![key].filter(\n (entry) => !predicate(entry.item)\n );\n }\n };\n }\n}\n";
|
|
8
17
|
/**
|
|
9
18
|
* The shared in-memory DB with its wire, as the config says.
|
|
10
19
|
*/
|