@pikku/cli 0.12.42 → 0.12.44
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/cli.schema.json +1 -1
- package/console-app/assets/index-CRLT8CXr.js +254 -0
- package/console-app/assets/index-DwyRdRuZ.css +1 -0
- package/console-app/index.html +2 -2
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.js +11 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +10 -0
- package/dist/.pikku/cli/pikku-cli-client.gen.js +73 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +56 -26
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +2 -2
- package/dist/.pikku/function/pikku-function-types.gen.js +3 -2
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +134 -96
- package/dist/.pikku/function/pikku-functions.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
- package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
- package/dist/.pikku/pikku-meta-service.gen.js +1 -1
- package/dist/.pikku/pikku-services.gen.d.ts +2 -2
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +4 -2
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +13 -5
- package/dist/.pikku/schemas/schemas/DeployApplyInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/DeployPlanInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/FabricAddInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricAddOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricPublishInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/FabricPublishOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/bin/pikku-bin.mjs +2 -2
- package/dist/src/cli.wiring.js +12 -0
- package/dist/src/deploy/build-pipeline.d.ts +2 -0
- package/dist/src/deploy/build-pipeline.js +7 -1
- package/dist/src/deploy/bundler/bundler.d.ts +2 -0
- package/dist/src/deploy/bundler/bundler.js +8 -5
- package/dist/src/fabric/fabric-commands.d.ts +61 -3
- package/dist/src/fabric/fabric-commands.js +27 -1
- package/dist/src/fabric/functions/add.function.d.ts +50 -0
- package/dist/src/fabric/functions/add.function.js +144 -0
- package/dist/src/fabric/functions/publish.function.d.ts +45 -0
- package/dist/src/fabric/functions/publish.function.js +85 -0
- package/dist/src/fabric/functions/validate-core.d.ts +1 -1
- package/dist/src/fabric/functions/validate.function.d.ts +4 -4
- package/dist/src/fabric/functions/validate.function.js +119 -0
- package/dist/src/functions/commands/deploy-apply.d.ts +3 -0
- package/dist/src/functions/commands/deploy-apply.js +1 -0
- package/dist/src/functions/commands/deploy-plan.d.ts +3 -0
- package/dist/src/functions/commands/deploy-plan.js +1 -0
- package/dist/src/functions/commands/pikku-command-summary.js +3 -2
- package/dist/src/functions/commands/versions-update.js +10 -4
- package/dist/src/functions/commands/workspace-validate.d.ts +3 -3
- package/dist/src/functions/db/better-auth-schema.js +15 -2
- package/dist/src/functions/db/sqlite/sqlite-kysely.js +11 -3
- package/dist/src/functions/validate/workspace-validate.d.ts +2 -2
- package/dist/src/functions/validate/workspace-validate.js +4 -0
- package/dist/src/functions/wirings/auth/pikku-command-auth.js +6 -1
- package/dist/src/functions/wirings/auth/serialize-auth-gen.d.ts +4 -1
- package/dist/src/functions/wirings/auth/serialize-auth-gen.js +36 -12
- package/dist/src/functions/wirings/emails/pikku-command-emails.js +48 -19
- package/dist/src/functions/wirings/functions/pikku-command-services.js +5 -4
- package/dist/src/functions/wirings/functions/serialize-function-types.js +3 -2
- package/dist/src/scaffold/rpc-remote.gen.js +1 -1
- package/dist/src/services/cli-logger-forwarder.service.d.ts +4 -1
- package/dist/src/services/cli-logger-forwarder.service.js +20 -2
- package/dist/src/services/cli-logger.service.d.ts +16 -2
- package/dist/src/services/cli-logger.service.js +33 -5
- package/dist/src/services.d.ts +6 -1
- package/dist/src/services.js +13 -12
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/skills/pikku-emails/SKILL.md +157 -0
- package/console-app/assets/index-D9Z9rySK.js +0 -233
- package/console-app/assets/index-DwUzVI5k.css +0 -1
|
@@ -2,9 +2,9 @@ import { z } from 'zod';
|
|
|
2
2
|
export declare const FindingSchema: z.ZodObject<{
|
|
3
3
|
id: z.ZodString;
|
|
4
4
|
severity: z.ZodEnum<{
|
|
5
|
-
info: "info";
|
|
6
5
|
warn: "warn";
|
|
7
6
|
error: "error";
|
|
7
|
+
info: "info";
|
|
8
8
|
}>;
|
|
9
9
|
message: z.ZodString;
|
|
10
10
|
path: z.ZodString;
|
|
@@ -18,9 +18,9 @@ export declare const WorkspaceValidateOutput: z.ZodObject<{
|
|
|
18
18
|
findings: z.ZodArray<z.ZodObject<{
|
|
19
19
|
id: z.ZodString;
|
|
20
20
|
severity: z.ZodEnum<{
|
|
21
|
-
info: "info";
|
|
22
21
|
warn: "warn";
|
|
23
22
|
error: "error";
|
|
23
|
+
info: "info";
|
|
24
24
|
}>;
|
|
25
25
|
message: z.ZodString;
|
|
26
26
|
path: z.ZodString;
|
|
@@ -95,6 +95,10 @@ export async function runWorkspaceValidate(startDir = process.cwd()) {
|
|
|
95
95
|
if (!pikkuConfig.clientFiles) {
|
|
96
96
|
info('pikku-config-no-client-files', 'pikku.config.json missing "clientFiles" — generated RPC client files and React Query hooks will not be written', pikkuConfigPath, 'Add clientFiles.rpcMapDeclarationFile and clientFiles.reactQueryFile pointing to packages/functions-sdk/src/pikku/ (for example: rpc-map.gen.d.ts and api.gen.ts)');
|
|
97
97
|
}
|
|
98
|
+
const scaffold = pikkuConfig.scaffold;
|
|
99
|
+
if (!scaffold?.console) {
|
|
100
|
+
e('pikku-config-no-console-scaffold', 'pikku.config.json missing "scaffold.console" — Fabric cannot introspect the running app (console:getFunctionsMeta and friends 404), so the sandbox builder shows no functions', pikkuConfigPath, 'Add "console": "no-auth" under "scaffold" in pikku.config.json (use "auth" to require a session)');
|
|
101
|
+
}
|
|
98
102
|
}
|
|
99
103
|
const rootPkgPath = join(root, 'package.json');
|
|
100
104
|
const rootPkg = await readJsonSafe(rootPkgPath);
|
|
@@ -16,13 +16,18 @@ export const pikkuAuth = pikkuSessionlessFunc({
|
|
|
16
16
|
// has no OAuth providers — still generates its /auth/* wiring.
|
|
17
17
|
if (!state.auth.definition)
|
|
18
18
|
return;
|
|
19
|
-
const { wiring, secrets } = serializeAuthGen(state.auth.definition, state.auth.providers, authFile, typesDeclarationFile, packageMappings ?? {});
|
|
19
|
+
const { wiring, secrets, middleware } = serializeAuthGen(state.auth.definition, state.auth.providers, authFile, typesDeclarationFile, packageMappings ?? {});
|
|
20
20
|
// The secrets file sits alongside authFile so re-inspection rediscovers it.
|
|
21
21
|
// It is kept separate from the wiring file because the CLI forbids Zod
|
|
22
22
|
// schemas and HTTP wiring (wireHTTPRoutes) in the same file (PKU490).
|
|
23
23
|
const secretsFile = join(dirname(authFile), 'auth-secrets.gen.ts');
|
|
24
24
|
await writeFileInDir(logger, authFile, wiring);
|
|
25
25
|
await writeFileInDir(logger, secretsFile, secrets);
|
|
26
|
+
// Stateless split: session middleware in its own file (see serializeAuthGen).
|
|
27
|
+
const middlewareFile = join(dirname(authFile), 'auth-middleware.gen.ts');
|
|
28
|
+
if (middleware) {
|
|
29
|
+
await writeFileInDir(logger, middlewareFile, middleware);
|
|
30
|
+
}
|
|
26
31
|
// Static metadata of the enabled providers/plugins for the console SSO page,
|
|
27
32
|
// following the `*-meta.gen.json` convention. Read at runtime by the console
|
|
28
33
|
// getAuthProviders function instead of a runtime registry.
|
|
@@ -10,10 +10,13 @@ import type { AuthDefinition } from '@pikku/inspector';
|
|
|
10
10
|
* separated out.
|
|
11
11
|
*/
|
|
12
12
|
export interface AuthGenOutput {
|
|
13
|
-
/**
|
|
13
|
+
/** Handler + catch-all routes (+ session middleware, unless split out). */
|
|
14
14
|
wiring: string;
|
|
15
15
|
/** The secrets file: Zod schemas + wireSecret/wireVariable. */
|
|
16
16
|
secrets: string;
|
|
17
|
+
/** Global session-middleware registration, split into its own file only when
|
|
18
|
+
* `session.cookieCache` is enabled (stateless path); undefined otherwise. */
|
|
19
|
+
middleware?: string;
|
|
17
20
|
}
|
|
18
21
|
/**
|
|
19
22
|
* Generates the `auth.gen.ts` (HTTP wiring) and `auth-secrets.gen.ts` (schemas +
|
|
@@ -111,15 +111,20 @@ export const serializeAuthGen = (definition, providers, authFile, typesDeclarati
|
|
|
111
111
|
secrets.push('');
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
//
|
|
115
|
-
//
|
|
116
|
-
//
|
|
117
|
-
//
|
|
114
|
+
// Wiring file: handler + catch-all routes. When cookieCache is enabled the
|
|
115
|
+
// global session middleware is split into its own file (see below) so this
|
|
116
|
+
// file's auth.wiring import (the full better-auth server) isn't dragged into
|
|
117
|
+
// every unit — only the auth unit bundles it.
|
|
118
|
+
const stateless = definition.cookieCache;
|
|
118
119
|
const wiring = [
|
|
119
120
|
'// AUTO-GENERATED by pikku CLI — do not edit',
|
|
120
121
|
'',
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
stateless
|
|
123
|
+
? `import { pikkuSessionlessFunc, wireHTTPRoutes } from '${pikkuTypesImportPath}'`
|
|
124
|
+
: `import { pikkuSessionlessFunc, wireHTTPRoutes, addHTTPMiddleware } from '${pikkuTypesImportPath}'`,
|
|
125
|
+
stateless
|
|
126
|
+
? `import { createAuthHandler } from '@pikku/better-auth'`
|
|
127
|
+
: `import { createAuthHandler, betterAuthSession } from '@pikku/better-auth'`,
|
|
123
128
|
`import '${configImportPath}'`,
|
|
124
129
|
'',
|
|
125
130
|
// createAuthHandler is called once at module load; the exported handler is a
|
|
@@ -132,12 +137,13 @@ export const serializeAuthGen = (definition, providers, authFile, typesDeclarati
|
|
|
132
137
|
` authConfigHandler.func(services, data, interaction),`,
|
|
133
138
|
`})`,
|
|
134
139
|
'',
|
|
135
|
-
// Bridge the better-auth session into the Pikku session on every request.
|
|
136
|
-
`addHTTPMiddleware('*', [betterAuthSession()])`,
|
|
137
|
-
'',
|
|
138
|
-
`wireHTTPRoutes({`,
|
|
139
|
-
` routes: {`,
|
|
140
140
|
];
|
|
141
|
+
if (!stateless) {
|
|
142
|
+
// Stateful: betterAuthSession calls services.auth(), so it stays here with
|
|
143
|
+
// the auth.wiring import.
|
|
144
|
+
wiring.push(`addHTTPMiddleware('*', [betterAuthSession()])`, '');
|
|
145
|
+
}
|
|
146
|
+
wiring.push(`wireHTTPRoutes({`, ` routes: {`);
|
|
141
147
|
// One catch-all route per method. `{/*splat}` matches both the bare basePath
|
|
142
148
|
// and every sub-path under it, so better-auth's internal router sees the full
|
|
143
149
|
// request and handles all of its own endpoints.
|
|
@@ -147,5 +153,23 @@ export const serializeAuthGen = (definition, providers, authFile, typesDeclarati
|
|
|
147
153
|
wiring.push(` },`);
|
|
148
154
|
wiring.push(`})`);
|
|
149
155
|
wiring.push('');
|
|
150
|
-
|
|
156
|
+
const output = {
|
|
157
|
+
wiring: wiring.join('\n'),
|
|
158
|
+
secrets: secrets.join('\n'),
|
|
159
|
+
};
|
|
160
|
+
if (stateless) {
|
|
161
|
+
// Stateless session middleware in its own file — imports neither auth.wiring
|
|
162
|
+
// nor the better-auth server, so every unit's bootstrap stays lean.
|
|
163
|
+
const middleware = [
|
|
164
|
+
'// AUTO-GENERATED by pikku CLI — do not edit',
|
|
165
|
+
'',
|
|
166
|
+
`import { addHTTPMiddleware } from '${pikkuTypesImportPath}'`,
|
|
167
|
+
`import { betterAuthStatelessSession } from '@pikku/better-auth'`,
|
|
168
|
+
'',
|
|
169
|
+
`addHTTPMiddleware('*', [betterAuthStatelessSession()])`,
|
|
170
|
+
'',
|
|
171
|
+
];
|
|
172
|
+
output.middleware = middleware.join('\n');
|
|
173
|
+
}
|
|
174
|
+
return output;
|
|
151
175
|
};
|
|
@@ -8,18 +8,57 @@ import { serializeEmailsModule } from './serialize-emails.js';
|
|
|
8
8
|
function sha256(input) {
|
|
9
9
|
return createHash('sha256').update(input).digest('hex');
|
|
10
10
|
}
|
|
11
|
-
function
|
|
11
|
+
function resolveLocaleString(strings, dottedPath) {
|
|
12
|
+
let current = strings;
|
|
13
|
+
for (const segment of dottedPath.split('.')) {
|
|
14
|
+
if (!current || typeof current !== 'object' || !(segment in current))
|
|
15
|
+
return undefined;
|
|
16
|
+
current = current[segment];
|
|
17
|
+
}
|
|
18
|
+
return typeof current === 'string' ? current : undefined;
|
|
19
|
+
}
|
|
20
|
+
// Variables a template actually references — scoped to the locale keys and
|
|
21
|
+
// partials it uses (transitively), not every string in the shared locale file.
|
|
22
|
+
function collectTemplateVariables(rootSources, locales, partials) {
|
|
12
23
|
const variables = new Set();
|
|
13
|
-
|
|
24
|
+
const visited = new Set();
|
|
25
|
+
const queue = [...rootSources];
|
|
26
|
+
while (queue.length > 0) {
|
|
27
|
+
const source = queue.shift();
|
|
28
|
+
if (!source)
|
|
29
|
+
continue;
|
|
14
30
|
for (const match of source.matchAll(/\{\{\s*([^}]+?)\s*\}\}/g)) {
|
|
15
31
|
const key = String(match[1]).trim();
|
|
16
|
-
if (!key
|
|
32
|
+
if (!key)
|
|
33
|
+
continue;
|
|
34
|
+
if (key.startsWith('>')) {
|
|
35
|
+
const name = key.slice(1).trim();
|
|
36
|
+
if (!visited.has(`partial:${name}`)) {
|
|
37
|
+
visited.add(`partial:${name}`);
|
|
38
|
+
if (partials[name])
|
|
39
|
+
queue.push(partials[name]);
|
|
40
|
+
}
|
|
17
41
|
continue;
|
|
42
|
+
}
|
|
18
43
|
const rootKey = key.split('.')[0];
|
|
19
|
-
if (rootKey === '
|
|
44
|
+
if (rootKey === 'content' ||
|
|
45
|
+
rootKey === 'subject' ||
|
|
46
|
+
rootKey === 'theme' ||
|
|
47
|
+
rootKey === 'locale') {
|
|
20
48
|
continue;
|
|
21
|
-
|
|
49
|
+
}
|
|
50
|
+
if (rootKey === 't') {
|
|
51
|
+
const path = key.split('.').slice(1).join('.');
|
|
52
|
+
if (!path || visited.has(`t:${path}`))
|
|
53
|
+
continue;
|
|
54
|
+
visited.add(`t:${path}`);
|
|
55
|
+
for (const strings of Object.values(locales)) {
|
|
56
|
+
const resolved = resolveLocaleString(strings, path);
|
|
57
|
+
if (resolved)
|
|
58
|
+
queue.push(resolved);
|
|
59
|
+
}
|
|
22
60
|
continue;
|
|
61
|
+
}
|
|
23
62
|
variables.add(rootKey);
|
|
24
63
|
}
|
|
25
64
|
}
|
|
@@ -37,18 +76,6 @@ function stableStringify(value) {
|
|
|
37
76
|
}
|
|
38
77
|
return JSON.stringify(value);
|
|
39
78
|
}
|
|
40
|
-
function collectStringLeaves(value) {
|
|
41
|
-
if (typeof value === 'string') {
|
|
42
|
-
return [value];
|
|
43
|
-
}
|
|
44
|
-
if (Array.isArray(value)) {
|
|
45
|
-
return value.flatMap((item) => collectStringLeaves(item));
|
|
46
|
-
}
|
|
47
|
-
if (value && typeof value === 'object') {
|
|
48
|
-
return Object.values(value).flatMap((nested) => collectStringLeaves(nested));
|
|
49
|
-
}
|
|
50
|
-
return [];
|
|
51
|
-
}
|
|
52
79
|
export const pikkuEmails = pikkuSessionlessFunc({
|
|
53
80
|
func: async ({ logger, config }) => {
|
|
54
81
|
return generateEmailsArtifacts(logger, config);
|
|
@@ -116,8 +143,10 @@ export async function generateEmailsArtifacts(logger, config) {
|
|
|
116
143
|
readFile(join(emailDir, 'templates', `${templateName}.subject.txt`), 'utf8'),
|
|
117
144
|
readFile(join(emailDir, 'templates', `${templateName}.text.txt`), 'utf8').catch(() => ''),
|
|
118
145
|
]);
|
|
119
|
-
|
|
120
|
-
|
|
146
|
+
// layout.html wraps every template at render time (see serialize-emails),
|
|
147
|
+
// so include it as a discovery root or layout-only variables get dropped.
|
|
148
|
+
const layout = partials.layout ?? '';
|
|
149
|
+
const variables = collectTemplateVariables([html, subject, text, layout], locales, partials);
|
|
121
150
|
const hashes = Object.fromEntries(Object.entries(locales).map(([locale, strings]) => {
|
|
122
151
|
const localePayload = stableStringify({
|
|
123
152
|
templateName,
|
|
@@ -34,8 +34,9 @@ export const serializeServicesMap = (allSingletonServices, allWireServices, requ
|
|
|
34
34
|
defaultServices.forEach((service) => usedServices.add(service));
|
|
35
35
|
// When a pikkuBetterAuth factory is present, the generated `pikkuServices`
|
|
36
36
|
// wrapper always injects a resolved `auth` singleton. Mark it required so
|
|
37
|
-
// RequiredSingletonServices
|
|
38
|
-
// to a SingletonServices type that types `auth` from the
|
|
37
|
+
// RequiredSingletonServices can mark `auth` as a required property and stay
|
|
38
|
+
// assignable to a SingletonServices type that types `auth` from the
|
|
39
|
+
// factory's return.
|
|
39
40
|
if (authInjected) {
|
|
40
41
|
usedServices.add('auth');
|
|
41
42
|
}
|
|
@@ -79,11 +80,11 @@ export const serializeServicesMap = (allSingletonServices, allWireServices, requ
|
|
|
79
80
|
'',
|
|
80
81
|
'// Type exports',
|
|
81
82
|
requiredSingletonServiceNames.length > 0
|
|
82
|
-
? `export type RequiredSingletonServices = Pick<SingletonServices, ${requiredSingletonServiceNames.map((key) => `'${key}'`).join(' | ')}
|
|
83
|
+
? `export type RequiredSingletonServices = Required<Pick<SingletonServices, ${requiredSingletonServiceNames.map((key) => `'${key}'`).join(' | ')}>> & Partial<Omit<SingletonServices, ${requiredSingletonServiceNames.map((key) => `'${key}'`).join(' | ')}>>`
|
|
83
84
|
: 'export type RequiredSingletonServices = Partial<SingletonServices>',
|
|
84
85
|
'',
|
|
85
86
|
requiredWireServiceNames.length > 0
|
|
86
|
-
? `export type RequiredWireServices = Pick<Services, ${requiredWireServiceNames.map((key) => `'${key}'`).join(' | ')}
|
|
87
|
+
? `export type RequiredWireServices = Required<Pick<Services, ${requiredWireServiceNames.map((key) => `'${key}'`).join(' | ')}>> & Partial<Omit<Services, ${requiredWireServiceNames.map((key) => `'${key}'`).join(' | ')}>>`
|
|
87
88
|
: 'export type RequiredWireServices = Partial<Services>',
|
|
88
89
|
'',
|
|
89
90
|
...(addonRequiredParentServices.length > 0
|
|
@@ -629,10 +629,11 @@ export const pikkuConfig = (
|
|
|
629
629
|
* \`\`\`
|
|
630
630
|
*/
|
|
631
631
|
export const pikkuServices = (
|
|
632
|
-
func: (config: Config, existingServices: Partial<SingletonServices>) => Promise<Omit<RequiredSingletonServices, 'auth'
|
|
632
|
+
func: (config: Config, existingServices: Partial<SingletonServices>) => Promise<Partial<Omit<RequiredSingletonServices, 'auth'>>>
|
|
633
633
|
) => {
|
|
634
634
|
return async (config: Config, existingServices: Partial<SingletonServices> = {}) => {
|
|
635
|
-
const
|
|
635
|
+
const createdServices = await func(config, existingServices)
|
|
636
|
+
const services = { ...existingServices, ...createdServices }
|
|
636
637
|
const authFactory = __pikkuState(null, 'package', 'authFactory')
|
|
637
638
|
if (authFactory) {
|
|
638
639
|
let authInstance: Promise<unknown> | undefined
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Logger } from '@pikku/core/services';
|
|
2
2
|
import { LogLevel } from '@pikku/core/services';
|
|
3
3
|
import type { PikkuChannel } from '@pikku/core/channel';
|
|
4
|
-
import type { ErrorCode } from '@pikku/inspector';
|
|
4
|
+
import type { ErrorCode, CodedDiagnostic, DiagnosticSeverity } from '@pikku/inspector';
|
|
5
5
|
/**
|
|
6
6
|
* Log message structure sent through the channel
|
|
7
7
|
*/
|
|
@@ -29,6 +29,9 @@ export declare class CLILoggerForwarder implements Logger {
|
|
|
29
29
|
warn(messageOrObj: string | Record<string, any>, ..._meta: any[]): void;
|
|
30
30
|
debug(message: string, ..._meta: any[]): void;
|
|
31
31
|
trace(message: string, ..._meta: any[]): void;
|
|
32
|
+
diagnostic({ severity, code, message }: CodedDiagnostic): void;
|
|
32
33
|
critical(code: ErrorCode, message: string): void;
|
|
33
34
|
hasCriticalErrors(): boolean;
|
|
35
|
+
hasBlockingDiagnostics(): boolean;
|
|
36
|
+
blockingSeverities(): DiagnosticSeverity[];
|
|
34
37
|
}
|
|
@@ -59,13 +59,31 @@ export class CLILoggerForwarder {
|
|
|
59
59
|
trace(message, ..._meta) {
|
|
60
60
|
this.log('trace', LogLevel.trace, message);
|
|
61
61
|
}
|
|
62
|
-
|
|
62
|
+
diagnostic({ severity, code, message }) {
|
|
63
|
+
// Delegate tracking to the underlying CLILogger so the build gate still
|
|
64
|
+
// sees diagnostics emitted through the forwarder, then forward to the
|
|
65
|
+
// channel for display.
|
|
66
|
+
;
|
|
67
|
+
this.logger.diagnostic?.({ severity, code, message });
|
|
63
68
|
const url = `https://pikku.dev/docs/pikku-cli/errors/${code.toLowerCase()}`;
|
|
64
69
|
const formattedMessage = `[${code}] ${message}\n → ${url}`;
|
|
65
|
-
|
|
70
|
+
if (severity === 'warn')
|
|
71
|
+
this.warn(formattedMessage);
|
|
72
|
+
else
|
|
73
|
+
this.error(formattedMessage);
|
|
74
|
+
}
|
|
75
|
+
critical(code, message) {
|
|
76
|
+
this.diagnostic({ severity: 'critical', code, message });
|
|
66
77
|
}
|
|
67
78
|
hasCriticalErrors() {
|
|
68
79
|
// The underlying logger (CLILogger) tracks critical errors
|
|
69
80
|
return this.logger.hasCriticalErrors?.() ?? false;
|
|
70
81
|
}
|
|
82
|
+
hasBlockingDiagnostics() {
|
|
83
|
+
// The underlying logger (CLILogger) owns failOn + diagnostic tracking
|
|
84
|
+
return this.logger.hasBlockingDiagnostics?.() ?? false;
|
|
85
|
+
}
|
|
86
|
+
blockingSeverities() {
|
|
87
|
+
return this.logger.blockingSeverities?.() ?? [];
|
|
88
|
+
}
|
|
71
89
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { Logger } from '@pikku/core/services';
|
|
2
2
|
import { LogLevel } from '@pikku/core/services';
|
|
3
|
-
import type { ErrorCode } from '@pikku/inspector';
|
|
3
|
+
import type { ErrorCode, DiagnosticSeverity, CodedDiagnostic } from '@pikku/inspector';
|
|
4
4
|
export type CLIOutputMode = 'text' | 'json';
|
|
5
5
|
export declare class CLILogger implements Logger {
|
|
6
6
|
private silent;
|
|
7
7
|
private level;
|
|
8
|
-
private
|
|
8
|
+
private diagnostics;
|
|
9
|
+
private failOn;
|
|
9
10
|
private outputMode;
|
|
10
11
|
private jsonFlushHookRegistered;
|
|
11
12
|
constructor({ logLogo, silent, }: {
|
|
@@ -42,7 +43,20 @@ export declare class CLILogger implements Logger {
|
|
|
42
43
|
type?: string;
|
|
43
44
|
data?: Record<string, unknown>;
|
|
44
45
|
}): void;
|
|
46
|
+
diagnostic({ severity, code, message }: CodedDiagnostic): void;
|
|
47
|
+
/** Sugar for `diagnostic({ severity: 'critical', code, message })`. */
|
|
45
48
|
critical(code: ErrorCode, message: string): void;
|
|
49
|
+
/**
|
|
50
|
+
* Configure which severities fail the build. Critical is always included.
|
|
51
|
+
*/
|
|
52
|
+
setFailOn(severities: Iterable<DiagnosticSeverity>): void;
|
|
46
53
|
hasCriticalErrors(): boolean;
|
|
54
|
+
/**
|
|
55
|
+
* True if any tracked diagnostic matches a severity configured to fail the
|
|
56
|
+
* build (default: critical only).
|
|
57
|
+
*/
|
|
58
|
+
hasBlockingDiagnostics(): boolean;
|
|
59
|
+
/** Distinct severities among tracked diagnostics that would fail the build. */
|
|
60
|
+
blockingSeverities(): DiagnosticSeverity[];
|
|
47
61
|
logLogo(): void;
|
|
48
62
|
}
|
|
@@ -9,7 +9,12 @@ const ANSI_ESCAPE_REGEX = /\x1B\[[0-?]*[ -/]*[@-~]/g;
|
|
|
9
9
|
export class CLILogger {
|
|
10
10
|
silent;
|
|
11
11
|
level = LogLevel.info; // default to info level
|
|
12
|
-
|
|
12
|
+
diagnostics = [];
|
|
13
|
+
// Severities that should fail the build. Critical always blocks; error/warn
|
|
14
|
+
// are opt-in via --fail-on-error / --fail-on-warn.
|
|
15
|
+
failOn = new Set([
|
|
16
|
+
'critical',
|
|
17
|
+
]);
|
|
13
18
|
outputMode = 'text';
|
|
14
19
|
jsonFlushHookRegistered = false;
|
|
15
20
|
constructor({ logLogo, silent = false, }) {
|
|
@@ -138,14 +143,37 @@ export class CLILogger {
|
|
|
138
143
|
const data = typeof message === 'string' ? undefined : message.data;
|
|
139
144
|
this.emit('debug', msg, type, undefined, data);
|
|
140
145
|
}
|
|
141
|
-
|
|
146
|
+
diagnostic({ severity, code, message }) {
|
|
142
147
|
const url = `${BASE_ERROR_URL}/${code.toLowerCase()}`;
|
|
143
148
|
const formattedMessage = `[${code}] ${message}\n → ${url}`;
|
|
144
|
-
this.
|
|
145
|
-
|
|
149
|
+
this.diagnostics.push({ severity, code, message });
|
|
150
|
+
// critical → bold red, error → red, warn → yellow. Always printed so the
|
|
151
|
+
// issue surfaces even when it doesn't fail the build.
|
|
152
|
+
this.emit(severity, formattedMessage, undefined, code);
|
|
153
|
+
}
|
|
154
|
+
/** Sugar for `diagnostic({ severity: 'critical', code, message })`. */
|
|
155
|
+
critical(code, message) {
|
|
156
|
+
this.diagnostic({ severity: 'critical', code, message });
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Configure which severities fail the build. Critical is always included.
|
|
160
|
+
*/
|
|
161
|
+
setFailOn(severities) {
|
|
162
|
+
this.failOn = new Set(['critical', ...severities]);
|
|
146
163
|
}
|
|
147
164
|
hasCriticalErrors() {
|
|
148
|
-
return this.
|
|
165
|
+
return this.diagnostics.some((d) => d.severity === 'critical');
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* True if any tracked diagnostic matches a severity configured to fail the
|
|
169
|
+
* build (default: critical only).
|
|
170
|
+
*/
|
|
171
|
+
hasBlockingDiagnostics() {
|
|
172
|
+
return this.diagnostics.some((d) => this.failOn.has(d.severity));
|
|
173
|
+
}
|
|
174
|
+
/** Distinct severities among tracked diagnostics that would fail the build. */
|
|
175
|
+
blockingSeverities() {
|
|
176
|
+
return [...this.failOn].filter((s) => this.diagnostics.some((d) => d.severity === s));
|
|
149
177
|
}
|
|
150
178
|
logLogo() {
|
|
151
179
|
if (this.silent || this.outputMode === 'json')
|
package/dist/src/services.d.ts
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import type { Config, Services, SingletonServices, UserSession } from '../types/application-types.js';
|
|
2
2
|
import type { CreateConfig } from '@pikku/core';
|
|
3
3
|
import type { CreateWireServices, CreateSingletonServices } from '@pikku/core/internal';
|
|
4
|
+
import { LogLevel } from '@pikku/core/services';
|
|
4
5
|
import type { PikkuCLIConfig } from '../types/config.js';
|
|
5
6
|
import type { ForwardedLogMessage } from './services/cli-logger-forwarder.service.js';
|
|
6
7
|
/**
|
|
7
8
|
* Default CLI renderer that logs output using the logger
|
|
8
9
|
*/
|
|
9
|
-
export declare const defaultCLIRenderer: import("@pikku/core/cli").CorePikkuCLIRender<ForwardedLogMessage,
|
|
10
|
+
export declare const defaultCLIRenderer: import("@pikku/core/cli").CorePikkuCLIRender<ForwardedLogMessage, import("@pikku/core").CoreSingletonServices<{
|
|
11
|
+
logLevel?: LogLevel;
|
|
12
|
+
secrets?: {};
|
|
13
|
+
workflow?: import("@pikku/core/workflow").WorkflowServiceConfig;
|
|
14
|
+
}>, import("@pikku/core").CoreUserSession>;
|
|
10
15
|
export declare const createConfig: CreateConfig<Config, [PikkuCLIConfig]>;
|
|
11
16
|
/**
|
|
12
17
|
* Singleton services factory for the Pikku CLI
|
package/dist/src/services.js
CHANGED
|
@@ -32,7 +32,7 @@ const logger = new CLILogger({ logLogo: false, silent: false });
|
|
|
32
32
|
/**
|
|
33
33
|
* Default CLI renderer that logs output using the logger
|
|
34
34
|
*/
|
|
35
|
-
export const defaultCLIRenderer = pikkuCLIRender((
|
|
35
|
+
export const defaultCLIRenderer = pikkuCLIRender((_services, data) => {
|
|
36
36
|
if (!data)
|
|
37
37
|
return;
|
|
38
38
|
const validLevels = [
|
|
@@ -46,17 +46,6 @@ export const defaultCLIRenderer = pikkuCLIRender(({ logger }, data) => {
|
|
|
46
46
|
return;
|
|
47
47
|
logger[data.level]({ message: data.message, type: data.type });
|
|
48
48
|
});
|
|
49
|
-
// /**
|
|
50
|
-
// * Client-safe CLI renderer that outputs to console (no service dependencies)
|
|
51
|
-
// * This renderer can be used in CLI-over-channel clients
|
|
52
|
-
// */
|
|
53
|
-
// export const clientCLIRenderer = pikkuCLIRender<ForwardedLogMessage>(
|
|
54
|
-
// ({ logger }, data) => {
|
|
55
|
-
// if (data) {
|
|
56
|
-
// logger[data.level]?.({ message: data.message, type: data.type } as any)
|
|
57
|
-
// }
|
|
58
|
-
// }
|
|
59
|
-
// )
|
|
60
49
|
export const createConfig = async (_variablesService, data) => {
|
|
61
50
|
// Determine log level based on CLI flags with precedence:
|
|
62
51
|
// --silent > --loglevel > --verbose > --info > default (info)
|
|
@@ -90,6 +79,13 @@ export const createConfig = async (_variablesService, data) => {
|
|
|
90
79
|
}
|
|
91
80
|
logger.setLevel(logLevel);
|
|
92
81
|
logger.setSilent(isSilent);
|
|
82
|
+
// Build gate: critical always fails; --fail-on-warn implies --fail-on-error.
|
|
83
|
+
const extraFailOn = [];
|
|
84
|
+
if (data.failOnWarn)
|
|
85
|
+
extraFailOn.push('warn', 'error');
|
|
86
|
+
else if (data.failOnError)
|
|
87
|
+
extraFailOn.push('error');
|
|
88
|
+
logger.setFailOn(extraFailOn);
|
|
93
89
|
// Display logo unless in silent mode
|
|
94
90
|
if (!isSilent && outputMode !== 'json') {
|
|
95
91
|
logger.logLogo();
|
|
@@ -195,6 +191,11 @@ export const createSingletonServices = async (config) => {
|
|
|
195
191
|
config.authFile
|
|
196
192
|
? path.join(path.dirname(config.authFile), 'auth-secrets.gen.ts')
|
|
197
193
|
: undefined,
|
|
194
|
+
// Stateless-session split: middleware-only file nothing imports, so it's
|
|
195
|
+
// unreachable via the import graph — add it explicitly to get inspected.
|
|
196
|
+
config.authFile
|
|
197
|
+
? path.join(path.dirname(config.authFile), 'auth-middleware.gen.ts')
|
|
198
|
+
: undefined,
|
|
198
199
|
];
|
|
199
200
|
for (const file of scaffoldFiles) {
|
|
200
201
|
if (file && !wiringFiles.includes(file) && existsSync(file)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../bin/pikku.ts","../src/cli.wiring.ts","../src/services.ts","../src/deploy/build-pipeline.ts","../src/deploy/provider-adapter.ts","../src/deploy/server-entry.ts","../src/deploy/analyzer/analyzer.ts","../src/deploy/analyzer/index.ts","../src/deploy/analyzer/manifest.ts","../src/deploy/bundler/bundler.ts","../src/deploy/bundler/dep-extractor.ts","../src/deploy/bundler/index.ts","../src/deploy/bundler/types.ts","../src/deploy/codegen/index.ts","../src/deploy/codegen/per-unit-codegen.ts","../src/deploy/plan/executor.ts","../src/deploy/plan/formatter.ts","../src/deploy/plan/index.ts","../src/deploy/plan/planner.ts","../src/deploy/plan/provider.ts","../src/deploy/plan/types.ts","../src/fabric/fabric-commands.ts","../src/fabric/functions/db-schema.function.ts","../src/fabric/functions/deploy-list.function.ts","../src/fabric/functions/deploy-units.function.ts","../src/fabric/functions/deploy.function.ts","../src/fabric/functions/domains-add.function.ts","../src/fabric/functions/domains-list.function.ts","../src/fabric/functions/domains-remove.function.ts","../src/fabric/functions/errors.function.ts","../src/fabric/functions/init.function.ts","../src/fabric/functions/link.function.ts","../src/fabric/functions/llm-key.function.ts","../src/fabric/functions/login.function.ts","../src/fabric/functions/logs.function.ts","../src/fabric/functions/metrics.function.ts","../src/fabric/functions/rollback.function.ts","../src/fabric/functions/secrets-list.function.ts","../src/fabric/functions/secrets-set.function.ts","../src/fabric/functions/smoke.function.ts","../src/fabric/functions/status.function.ts","../src/fabric/functions/trace.function.ts","../src/fabric/functions/validate-core.ts","../src/fabric/functions/validate.function.ts","../src/fabric/lib/config.ts","../src/fabric/lib/console-url.ts","../src/fabric/lib/git.ts","../src/fabric/lib/http.ts","../src/fabric/lib/not-implemented.ts","../src/fabric/lib/output.ts","../src/fabric/lib/prompt.ts","../src/fabric/lib/stage.ts","../src/fabric/sdk/http-map.gen.d.ts","../src/fabric/sdk/pikku-fetch.gen.ts","../src/fabric/sdk/pikku-rpc.gen.ts","../src/fabric/sdk/rpc-map.gen.d.ts","../src/functions/commands/all.ts","../src/functions/commands/binary.ts","../src/functions/commands/bootstrap.ts","../src/functions/commands/console.ts","../src/functions/commands/db-audit.ts","../src/functions/commands/db-generate.ts","../src/functions/commands/db-migrate.ts","../src/functions/commands/db-reset.ts","../src/functions/commands/db-seed.ts","../src/functions/commands/db-shared.ts","../src/functions/commands/deploy-apply.ts","../src/functions/commands/deploy-info.ts","../src/functions/commands/deploy-plan.ts","../src/functions/commands/dev.ts","../src/functions/commands/emails-init.ts","../src/functions/commands/enable.ts","../src/functions/commands/info.ts","../src/functions/commands/load-user-project.ts","../src/functions/commands/login.ts","../src/functions/commands/meta.ts","../src/functions/commands/new-addon.ts","../src/functions/commands/new-function.ts","../src/functions/commands/new-middleware.ts","../src/functions/commands/new-permission.ts","../src/functions/commands/new-wiring.ts","../src/functions/commands/pikku-command-bootstrap.ts","../src/functions/commands/pikku-command-summary.ts","../src/functions/commands/skills.ts","../src/functions/commands/tests-coverage.ts","../src/functions/commands/tests-init.ts","../src/functions/commands/versions-check.ts","../src/functions/commands/versions-init.ts","../src/functions/commands/versions-update.ts","../src/functions/commands/watch.ts","../src/functions/commands/workspace-validate.ts","../src/functions/db/annotation-parser.ts","../src/functions/db/better-auth-schema.ts","../src/functions/db/coercion-plugin.ts","../src/functions/db/db-codegen.ts","../src/functions/db/db-introspector.ts","../src/functions/db/db-migrator.ts","../src/functions/db/local-db.ts","../src/functions/db/zod-codegen.ts","../src/functions/db/postgres/pglite-kysely.ts","../src/functions/db/postgres/postgres-introspector.ts","../src/functions/db/postgres/postgres-migrator.ts","../src/functions/db/sqlite/seed.ts","../src/functions/db/sqlite/sqlite-introspector.ts","../src/functions/db/sqlite/sqlite-kysely.ts","../src/functions/db/sqlite/sqlite-migrator.ts","../src/functions/db/sqlite/sqlite-runtime-bun.ts","../src/functions/db/sqlite/sqlite-runtime-node.ts","../src/functions/db/sqlite/sqlite-runtime.ts","../src/functions/runtimes/fetch/index.ts","../src/functions/runtimes/nextjs/pikku-command-nextjs.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-worker-rpc-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.ts","../src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.ts","../src/functions/runtimes/tanstack-start/serialize-tanstack-start-shim.ts","../src/functions/runtimes/websocket/pikku-command-websocket-typed.ts","../src/functions/runtimes/websocket/serialize-websocket-wrapper.ts","../src/functions/validate/workspace-validate.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent-types.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent.ts","../src/functions/wirings/ai-agent/pikku-command-public-agent.ts","../src/functions/wirings/ai-agent/serialize-agent-map.ts","../src/functions/wirings/ai-agent/serialize-ai-agent-types.ts","../src/functions/wirings/ai-agent/serialize-public-agent.ts","../src/functions/wirings/auth/pikku-command-auth.ts","../src/functions/wirings/auth/serialize-auth-gen.ts","../src/functions/wirings/auth/serialize-auth-meta.ts","../src/functions/wirings/auth/serialize-auth-types.ts","../src/functions/wirings/channels/pikku-channels.ts","../src/functions/wirings/channels/pikku-command-channel-types.ts","../src/functions/wirings/channels/pikku-command-channels-map.ts","../src/functions/wirings/channels/pikku-command-channels.ts","../src/functions/wirings/channels/serialize-channel-types.ts","../src/functions/wirings/channels/serialize-typed-channel-map.ts","../src/functions/wirings/cli/pikku-command-cli-entry.ts","../src/functions/wirings/cli/pikku-command-cli-types.ts","../src/functions/wirings/cli/pikku-command-cli.ts","../src/functions/wirings/cli/serialize-channel-cli-client.ts","../src/functions/wirings/cli/serialize-channel-cli.ts","../src/functions/wirings/cli/serialize-cli-types.ts","../src/functions/wirings/cli/serialize-local-cli-bootstrap.ts","../src/functions/wirings/console/pikku-command-console-functions.ts","../src/functions/wirings/console/pikku-command-node-types.ts","../src/functions/wirings/console/pikku-command-nodes-meta.ts","../src/functions/wirings/console/serialize-console-functions.ts","../src/functions/wirings/console/serialize-node-types.ts","../src/functions/wirings/credentials/pikku-command-credentials.ts","../src/functions/wirings/credentials/serialize-credentials-types.ts","../src/functions/wirings/emails/pikku-command-emails.ts","../src/functions/wirings/emails/serialize-emails.ts","../src/functions/wirings/functions/pikku-command-addon-types.ts","../src/functions/wirings/functions/pikku-command-function-types-split.ts","../src/functions/wirings/functions/pikku-command-function-types.ts","../src/functions/wirings/functions/pikku-command-functions.ts","../src/functions/wirings/functions/pikku-command-services.ts","../src/functions/wirings/functions/schemas.ts","../src/functions/wirings/functions/serialize-addon-types.ts","../src/functions/wirings/functions/serialize-function-imports.ts","../src/functions/wirings/functions/serialize-function-types.ts","../src/functions/wirings/functions/serialize-pikku-types-hub.ts","../src/functions/wirings/gateway/pikku-command-gateway.ts","../src/functions/wirings/http/pikku-command-http-map.ts","../src/functions/wirings/http/pikku-command-http-routes.ts","../src/functions/wirings/http/pikku-command-http-types.ts","../src/functions/wirings/http/pikku-command-openapi.ts","../src/functions/wirings/http/pikku-http-routes.ts","../src/functions/wirings/http/serialize-fetch-wrapper.ts","../src/functions/wirings/http/serialize-http-types.ts","../src/functions/wirings/http/serialize-typed-http-map.ts","../src/functions/wirings/mcp/pikku-command-mcp-json.ts","../src/functions/wirings/mcp/pikku-command-mcp-types.ts","../src/functions/wirings/mcp/pikku-command-mcp.ts","../src/functions/wirings/mcp/serialize-mcp-types.ts","../src/functions/wirings/middleware/pikku-command-middleware.ts","../src/functions/wirings/middleware/serialize-middleware-imports.ts","../src/functions/wirings/package/pikku-command-package-types.ts","../src/functions/wirings/package/pikku-command-package.ts","../src/functions/wirings/package/serialize-package-types.ts","../src/functions/wirings/package/serialize-package.ts","../src/functions/wirings/permissions/pikku-command-permissions.ts","../src/functions/wirings/permissions/serialize-permissions-imports.ts","../src/functions/wirings/queue/pikku-command-queue-map.ts","../src/functions/wirings/queue/pikku-command-queue-service.ts","../src/functions/wirings/queue/pikku-command-queue-types.ts","../src/functions/wirings/queue/pikku-command-queue.ts","../src/functions/wirings/queue/pikku-queue-map.ts","../src/functions/wirings/queue/pikku-queue.ts","../src/functions/wirings/queue/serialize-queue-map.ts","../src/functions/wirings/queue/serialize-queue-meta.ts","../src/functions/wirings/queue/serialize-queue-types.ts","../src/functions/wirings/queue/serialize-queue-wrapper.ts","../src/functions/wirings/realtime/pikku-command-events-scaffold.ts","../src/functions/wirings/realtime/pikku-command-realtime.ts","../src/functions/wirings/realtime/serialize-events-scaffold.ts","../src/functions/wirings/realtime/serialize-realtime-client.ts","../src/functions/wirings/rpc/pikku-command-public-rpc.ts","../src/functions/wirings/rpc/pikku-command-react-query.ts","../src/functions/wirings/rpc/pikku-command-remote-rpc.ts","../src/functions/wirings/rpc/pikku-command-rpc-client.ts","../src/functions/wirings/rpc/pikku-command-rpc-map.ts","../src/functions/wirings/rpc/pikku-command-rpc.ts","../src/functions/wirings/rpc/serialize-public-rpc.ts","../src/functions/wirings/rpc/serialize-react-query-hooks.ts","../src/functions/wirings/rpc/serialize-remote-rpc.ts","../src/functions/wirings/rpc/serialize-rpc-wrapper.ts","../src/functions/wirings/rpc/serialize-typed-rpc-map.ts","../src/functions/wirings/scheduler/pikku-command-scheduler-types.ts","../src/functions/wirings/scheduler/pikku-command-scheduler.ts","../src/functions/wirings/scheduler/serialize-scheduler-meta.ts","../src/functions/wirings/scheduler/serialize-scheduler-types.ts","../src/functions/wirings/secrets/pikku-command-secrets.ts","../src/functions/wirings/secrets/serialize-secrets-types.ts","../src/functions/wirings/triggers/pikku-command-trigger-types.ts","../src/functions/wirings/triggers/pikku-command-trigger.ts","../src/functions/wirings/triggers/serialize-trigger-meta.ts","../src/functions/wirings/triggers/serialize-trigger-types.ts","../src/functions/wirings/variables/pikku-command-variables.ts","../src/functions/wirings/variables/serialize-variables-types.ts","../src/functions/wirings/workflow/pikku-command-workflow-routes.ts","../src/functions/wirings/workflow/pikku-command-workflow.ts","../src/functions/wirings/workflow/serialize-workflow-bootstrap-map.ts","../src/functions/wirings/workflow/serialize-workflow-map.ts","../src/functions/wirings/workflow/serialize-workflow-meta.ts","../src/functions/wirings/workflow/serialize-workflow-registration.ts","../src/functions/wirings/workflow/serialize-workflow-routes.ts","../src/functions/wirings/workflow/serialize-workflow-types.ts","../src/functions/workflows/all.workflow.ts","../src/middleware/log-command-info-and-time.ts","../src/scaffold/rpc-remote.gen.ts","../src/services/cli-logger-forwarder.service.ts","../src/services/cli-logger.service.ts","../src/utils/check-required-types.ts","../src/utils/cli-session.ts","../src/utils/command-summary.ts","../src/utils/contract-versions.ts","../src/utils/device-auth.ts","../src/utils/file-import-path.ts","../src/utils/file-imports-serializer.ts","../src/utils/file-writer.ts","../src/utils/generate-bootstrap-file.ts","../src/utils/get-cli-version.ts","../src/utils/parse-cli-filters.ts","../src/utils/pikku-cli-config.ts","../src/utils/pikku-files-and-methods.ts","../src/utils/serialize-import-map.ts","../src/utils/serialize-meta-ts.ts","../src/utils/serialize-schemas.ts","../src/utils/strip-verbose-meta.ts","../.pikku/pikku-bootstrap.gen.ts","../.pikku/pikku-meta-service.gen.ts","../.pikku/pikku-services.gen.ts","../.pikku/pikku-types.gen.ts","../.pikku/agent/pikku-agent-map.gen.d.ts","../.pikku/agent/pikku-agent-types.gen.ts","../.pikku/channel/pikku-channel-types.gen.ts","../.pikku/cli/pikku-cli-channel.ts","../.pikku/cli/pikku-cli-types.gen.ts","../.pikku/cli/pikku-cli-wirings-meta.gen.ts","../.pikku/cli/pikku-cli-wirings.gen.ts","../.pikku/cli/pikku-cli.gen.ts","../.pikku/console/pikku-node-types.gen.ts","../.pikku/function/pikku-function-types.gen.ts","../.pikku/function/pikku-functions-meta.gen.ts","../.pikku/function/pikku-functions.gen.ts","../.pikku/http/pikku-http-types.gen.ts","../.pikku/http/pikku-http-wirings-map.gen.d.ts","../.pikku/http/pikku-http-wirings-meta.gen.ts","../.pikku/http/pikku-http-wirings.gen.ts","../.pikku/mcp/pikku-mcp-types.gen.ts","../.pikku/node/pikku-node-types.gen.ts","../.pikku/queue/pikku-queue-types.gen.ts","../.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts","../.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts","../.pikku/queue/pikku-queue-workers-wirings.gen.ts","../.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts","../.pikku/scheduler/pikku-scheduler-types.gen.ts","../.pikku/schemas/register.gen.ts","../.pikku/secrets/pikku-secret-types.gen.ts","../.pikku/secrets/pikku-secrets.gen.ts","../.pikku/trigger/pikku-trigger-types.gen.ts","../.pikku/variables/pikku-variable-types.gen.ts","../.pikku/variables/pikku-variables.gen.ts","../.pikku/workflow/pikku-workflow-map.gen.d.ts","../.pikku/workflow/pikku-workflow-types.gen.ts","../.pikku/workflow/pikku-workflow-wirings-meta.gen.ts","../.pikku/workflow/pikku-workflow-wirings.gen.ts","../types/application-types.d.ts","../types/bun-sqlite.d.ts","../types/config.d.ts"],"version":"5.9.3"}
|
|
1
|
+
{"root":["../bin/pikku.ts","../src/cli.wiring.ts","../src/services.ts","../src/deploy/build-pipeline.ts","../src/deploy/provider-adapter.ts","../src/deploy/server-entry.ts","../src/deploy/analyzer/analyzer.ts","../src/deploy/analyzer/index.ts","../src/deploy/analyzer/manifest.ts","../src/deploy/bundler/bundler.ts","../src/deploy/bundler/dep-extractor.ts","../src/deploy/bundler/index.ts","../src/deploy/bundler/types.ts","../src/deploy/codegen/index.ts","../src/deploy/codegen/per-unit-codegen.ts","../src/deploy/plan/executor.ts","../src/deploy/plan/formatter.ts","../src/deploy/plan/index.ts","../src/deploy/plan/planner.ts","../src/deploy/plan/provider.ts","../src/deploy/plan/types.ts","../src/fabric/fabric-commands.ts","../src/fabric/functions/add.function.ts","../src/fabric/functions/db-schema.function.ts","../src/fabric/functions/deploy-list.function.ts","../src/fabric/functions/deploy-units.function.ts","../src/fabric/functions/deploy.function.ts","../src/fabric/functions/domains-add.function.ts","../src/fabric/functions/domains-list.function.ts","../src/fabric/functions/domains-remove.function.ts","../src/fabric/functions/errors.function.ts","../src/fabric/functions/init.function.ts","../src/fabric/functions/link.function.ts","../src/fabric/functions/llm-key.function.ts","../src/fabric/functions/login.function.ts","../src/fabric/functions/logs.function.ts","../src/fabric/functions/metrics.function.ts","../src/fabric/functions/publish.function.ts","../src/fabric/functions/rollback.function.ts","../src/fabric/functions/secrets-list.function.ts","../src/fabric/functions/secrets-set.function.ts","../src/fabric/functions/smoke.function.ts","../src/fabric/functions/status.function.ts","../src/fabric/functions/trace.function.ts","../src/fabric/functions/validate-core.ts","../src/fabric/functions/validate.function.ts","../src/fabric/lib/config.ts","../src/fabric/lib/console-url.ts","../src/fabric/lib/git.ts","../src/fabric/lib/http.ts","../src/fabric/lib/not-implemented.ts","../src/fabric/lib/output.ts","../src/fabric/lib/prompt.ts","../src/fabric/lib/stage.ts","../src/fabric/sdk/http-map.gen.d.ts","../src/fabric/sdk/pikku-fetch.gen.ts","../src/fabric/sdk/pikku-rpc.gen.ts","../src/fabric/sdk/rpc-map.gen.d.ts","../src/functions/commands/all.ts","../src/functions/commands/binary.ts","../src/functions/commands/bootstrap.ts","../src/functions/commands/console.ts","../src/functions/commands/db-audit.ts","../src/functions/commands/db-generate.ts","../src/functions/commands/db-migrate.ts","../src/functions/commands/db-reset.ts","../src/functions/commands/db-seed.ts","../src/functions/commands/db-shared.ts","../src/functions/commands/deploy-apply.ts","../src/functions/commands/deploy-info.ts","../src/functions/commands/deploy-plan.ts","../src/functions/commands/dev.ts","../src/functions/commands/emails-init.ts","../src/functions/commands/enable.ts","../src/functions/commands/info.ts","../src/functions/commands/load-user-project.ts","../src/functions/commands/login.ts","../src/functions/commands/meta.ts","../src/functions/commands/new-addon.ts","../src/functions/commands/new-function.ts","../src/functions/commands/new-middleware.ts","../src/functions/commands/new-permission.ts","../src/functions/commands/new-wiring.ts","../src/functions/commands/pikku-command-bootstrap.ts","../src/functions/commands/pikku-command-summary.ts","../src/functions/commands/skills.ts","../src/functions/commands/tests-coverage.ts","../src/functions/commands/tests-init.ts","../src/functions/commands/versions-check.ts","../src/functions/commands/versions-init.ts","../src/functions/commands/versions-update.ts","../src/functions/commands/watch.ts","../src/functions/commands/workspace-validate.ts","../src/functions/db/annotation-parser.ts","../src/functions/db/better-auth-schema.ts","../src/functions/db/coercion-plugin.ts","../src/functions/db/db-codegen.ts","../src/functions/db/db-introspector.ts","../src/functions/db/db-migrator.ts","../src/functions/db/local-db.ts","../src/functions/db/zod-codegen.ts","../src/functions/db/postgres/pglite-kysely.ts","../src/functions/db/postgres/postgres-introspector.ts","../src/functions/db/postgres/postgres-migrator.ts","../src/functions/db/sqlite/seed.ts","../src/functions/db/sqlite/sqlite-introspector.ts","../src/functions/db/sqlite/sqlite-kysely.ts","../src/functions/db/sqlite/sqlite-migrator.ts","../src/functions/db/sqlite/sqlite-runtime-bun.ts","../src/functions/db/sqlite/sqlite-runtime-node.ts","../src/functions/db/sqlite/sqlite-runtime.ts","../src/functions/runtimes/fetch/index.ts","../src/functions/runtimes/nextjs/pikku-command-nextjs.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-worker-rpc-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.ts","../src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.ts","../src/functions/runtimes/tanstack-start/serialize-tanstack-start-shim.ts","../src/functions/runtimes/websocket/pikku-command-websocket-typed.ts","../src/functions/runtimes/websocket/serialize-websocket-wrapper.ts","../src/functions/validate/workspace-validate.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent-types.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent.ts","../src/functions/wirings/ai-agent/pikku-command-public-agent.ts","../src/functions/wirings/ai-agent/serialize-agent-map.ts","../src/functions/wirings/ai-agent/serialize-ai-agent-types.ts","../src/functions/wirings/ai-agent/serialize-public-agent.ts","../src/functions/wirings/auth/pikku-command-auth.ts","../src/functions/wirings/auth/serialize-auth-gen.ts","../src/functions/wirings/auth/serialize-auth-meta.ts","../src/functions/wirings/auth/serialize-auth-types.ts","../src/functions/wirings/channels/pikku-channels.ts","../src/functions/wirings/channels/pikku-command-channel-types.ts","../src/functions/wirings/channels/pikku-command-channels-map.ts","../src/functions/wirings/channels/pikku-command-channels.ts","../src/functions/wirings/channels/serialize-channel-types.ts","../src/functions/wirings/channels/serialize-typed-channel-map.ts","../src/functions/wirings/cli/pikku-command-cli-entry.ts","../src/functions/wirings/cli/pikku-command-cli-types.ts","../src/functions/wirings/cli/pikku-command-cli.ts","../src/functions/wirings/cli/serialize-channel-cli-client.ts","../src/functions/wirings/cli/serialize-channel-cli.ts","../src/functions/wirings/cli/serialize-cli-types.ts","../src/functions/wirings/cli/serialize-local-cli-bootstrap.ts","../src/functions/wirings/console/pikku-command-console-functions.ts","../src/functions/wirings/console/pikku-command-node-types.ts","../src/functions/wirings/console/pikku-command-nodes-meta.ts","../src/functions/wirings/console/serialize-console-functions.ts","../src/functions/wirings/console/serialize-node-types.ts","../src/functions/wirings/credentials/pikku-command-credentials.ts","../src/functions/wirings/credentials/serialize-credentials-types.ts","../src/functions/wirings/emails/pikku-command-emails.ts","../src/functions/wirings/emails/serialize-emails.ts","../src/functions/wirings/functions/pikku-command-addon-types.ts","../src/functions/wirings/functions/pikku-command-function-types-split.ts","../src/functions/wirings/functions/pikku-command-function-types.ts","../src/functions/wirings/functions/pikku-command-functions.ts","../src/functions/wirings/functions/pikku-command-services.ts","../src/functions/wirings/functions/schemas.ts","../src/functions/wirings/functions/serialize-addon-types.ts","../src/functions/wirings/functions/serialize-function-imports.ts","../src/functions/wirings/functions/serialize-function-types.ts","../src/functions/wirings/functions/serialize-pikku-types-hub.ts","../src/functions/wirings/gateway/pikku-command-gateway.ts","../src/functions/wirings/http/pikku-command-http-map.ts","../src/functions/wirings/http/pikku-command-http-routes.ts","../src/functions/wirings/http/pikku-command-http-types.ts","../src/functions/wirings/http/pikku-command-openapi.ts","../src/functions/wirings/http/pikku-http-routes.ts","../src/functions/wirings/http/serialize-fetch-wrapper.ts","../src/functions/wirings/http/serialize-http-types.ts","../src/functions/wirings/http/serialize-typed-http-map.ts","../src/functions/wirings/mcp/pikku-command-mcp-json.ts","../src/functions/wirings/mcp/pikku-command-mcp-types.ts","../src/functions/wirings/mcp/pikku-command-mcp.ts","../src/functions/wirings/mcp/serialize-mcp-types.ts","../src/functions/wirings/middleware/pikku-command-middleware.ts","../src/functions/wirings/middleware/serialize-middleware-imports.ts","../src/functions/wirings/package/pikku-command-package-types.ts","../src/functions/wirings/package/pikku-command-package.ts","../src/functions/wirings/package/serialize-package-types.ts","../src/functions/wirings/package/serialize-package.ts","../src/functions/wirings/permissions/pikku-command-permissions.ts","../src/functions/wirings/permissions/serialize-permissions-imports.ts","../src/functions/wirings/queue/pikku-command-queue-map.ts","../src/functions/wirings/queue/pikku-command-queue-service.ts","../src/functions/wirings/queue/pikku-command-queue-types.ts","../src/functions/wirings/queue/pikku-command-queue.ts","../src/functions/wirings/queue/pikku-queue-map.ts","../src/functions/wirings/queue/pikku-queue.ts","../src/functions/wirings/queue/serialize-queue-map.ts","../src/functions/wirings/queue/serialize-queue-meta.ts","../src/functions/wirings/queue/serialize-queue-types.ts","../src/functions/wirings/queue/serialize-queue-wrapper.ts","../src/functions/wirings/realtime/pikku-command-events-scaffold.ts","../src/functions/wirings/realtime/pikku-command-realtime.ts","../src/functions/wirings/realtime/serialize-events-scaffold.ts","../src/functions/wirings/realtime/serialize-realtime-client.ts","../src/functions/wirings/rpc/pikku-command-public-rpc.ts","../src/functions/wirings/rpc/pikku-command-react-query.ts","../src/functions/wirings/rpc/pikku-command-remote-rpc.ts","../src/functions/wirings/rpc/pikku-command-rpc-client.ts","../src/functions/wirings/rpc/pikku-command-rpc-map.ts","../src/functions/wirings/rpc/pikku-command-rpc.ts","../src/functions/wirings/rpc/serialize-public-rpc.ts","../src/functions/wirings/rpc/serialize-react-query-hooks.ts","../src/functions/wirings/rpc/serialize-remote-rpc.ts","../src/functions/wirings/rpc/serialize-rpc-wrapper.ts","../src/functions/wirings/rpc/serialize-typed-rpc-map.ts","../src/functions/wirings/scheduler/pikku-command-scheduler-types.ts","../src/functions/wirings/scheduler/pikku-command-scheduler.ts","../src/functions/wirings/scheduler/serialize-scheduler-meta.ts","../src/functions/wirings/scheduler/serialize-scheduler-types.ts","../src/functions/wirings/secrets/pikku-command-secrets.ts","../src/functions/wirings/secrets/serialize-secrets-types.ts","../src/functions/wirings/triggers/pikku-command-trigger-types.ts","../src/functions/wirings/triggers/pikku-command-trigger.ts","../src/functions/wirings/triggers/serialize-trigger-meta.ts","../src/functions/wirings/triggers/serialize-trigger-types.ts","../src/functions/wirings/variables/pikku-command-variables.ts","../src/functions/wirings/variables/serialize-variables-types.ts","../src/functions/wirings/workflow/pikku-command-workflow-routes.ts","../src/functions/wirings/workflow/pikku-command-workflow.ts","../src/functions/wirings/workflow/serialize-workflow-bootstrap-map.ts","../src/functions/wirings/workflow/serialize-workflow-map.ts","../src/functions/wirings/workflow/serialize-workflow-meta.ts","../src/functions/wirings/workflow/serialize-workflow-registration.ts","../src/functions/wirings/workflow/serialize-workflow-routes.ts","../src/functions/wirings/workflow/serialize-workflow-types.ts","../src/functions/workflows/all.workflow.ts","../src/middleware/log-command-info-and-time.ts","../src/scaffold/rpc-remote.gen.ts","../src/services/cli-logger-forwarder.service.ts","../src/services/cli-logger.service.ts","../src/utils/check-required-types.ts","../src/utils/cli-session.ts","../src/utils/command-summary.ts","../src/utils/contract-versions.ts","../src/utils/device-auth.ts","../src/utils/file-import-path.ts","../src/utils/file-imports-serializer.ts","../src/utils/file-writer.ts","../src/utils/generate-bootstrap-file.ts","../src/utils/get-cli-version.ts","../src/utils/parse-cli-filters.ts","../src/utils/pikku-cli-config.ts","../src/utils/pikku-files-and-methods.ts","../src/utils/serialize-import-map.ts","../src/utils/serialize-meta-ts.ts","../src/utils/serialize-schemas.ts","../src/utils/strip-verbose-meta.ts","../.pikku/pikku-bootstrap.gen.ts","../.pikku/pikku-meta-service.gen.ts","../.pikku/pikku-services.gen.ts","../.pikku/pikku-types.gen.ts","../.pikku/agent/pikku-agent-map.gen.d.ts","../.pikku/agent/pikku-agent-types.gen.ts","../.pikku/channel/pikku-channel-types.gen.ts","../.pikku/cli/pikku-cli-channel.ts","../.pikku/cli/pikku-cli-client.gen.ts","../.pikku/cli/pikku-cli-types.gen.ts","../.pikku/cli/pikku-cli-wirings-meta.gen.ts","../.pikku/cli/pikku-cli-wirings.gen.ts","../.pikku/cli/pikku-cli.gen.ts","../.pikku/console/pikku-node-types.gen.ts","../.pikku/function/pikku-function-types.gen.ts","../.pikku/function/pikku-functions-meta.gen.ts","../.pikku/function/pikku-functions.gen.ts","../.pikku/http/pikku-http-types.gen.ts","../.pikku/http/pikku-http-wirings-map.gen.d.ts","../.pikku/http/pikku-http-wirings-meta.gen.ts","../.pikku/http/pikku-http-wirings.gen.ts","../.pikku/mcp/pikku-mcp-types.gen.ts","../.pikku/node/pikku-node-types.gen.ts","../.pikku/queue/pikku-queue-types.gen.ts","../.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts","../.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts","../.pikku/queue/pikku-queue-workers-wirings.gen.ts","../.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts","../.pikku/scheduler/pikku-scheduler-types.gen.ts","../.pikku/schemas/register.gen.ts","../.pikku/secrets/pikku-secret-types.gen.ts","../.pikku/secrets/pikku-secrets.gen.ts","../.pikku/trigger/pikku-trigger-types.gen.ts","../.pikku/variables/pikku-variable-types.gen.ts","../.pikku/variables/pikku-variables.gen.ts","../.pikku/workflow/pikku-workflow-map.gen.d.ts","../.pikku/workflow/pikku-workflow-types.gen.ts","../.pikku/workflow/pikku-workflow-wirings-meta.gen.ts","../.pikku/workflow/pikku-workflow-wirings.gen.ts","../types/application-types.d.ts","../types/bun-sqlite.d.ts","../types/config.d.ts"],"version":"5.9.3"}
|