@pikku/cli 0.12.43 → 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-VleHndkw.css → index-DwyRdRuZ.css} +1 -1
- 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 +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
- 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 +55 -0
- 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 +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +102 -64
- 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 +1 -1
- 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 +6 -4
- 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 +11 -3
- 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/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/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/emails/pikku-command-emails.js +48 -19
- 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.js +7 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/skills/pikku-emails/SKILL.md +157 -0
- package/console-app/assets/index-AwGnKyWe.js +0 -254
|
@@ -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,
|
|
@@ -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.js
CHANGED
|
@@ -79,6 +79,13 @@ export const createConfig = async (_variablesService, data) => {
|
|
|
79
79
|
}
|
|
80
80
|
logger.setLevel(logLevel);
|
|
81
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);
|
|
82
89
|
// Display logo unless in silent mode
|
|
83
90
|
if (!isSilent && outputMode !== 'json') {
|
|
84
91
|
logger.logLogo();
|
|
@@ -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-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"}
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pikku/cli",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.44",
|
|
4
4
|
"author": "yasser.fadl@gmail.com",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"imports": {
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"@electric-sql/pglite": "^0.5.1",
|
|
29
29
|
"@openapi-contrib/json-schema-to-openapi-schema": "^4.3.1",
|
|
30
30
|
"@pikku/better-auth": "^0.12.9",
|
|
31
|
-
"@pikku/core": "^0.12.
|
|
31
|
+
"@pikku/core": "^0.12.35",
|
|
32
32
|
"@pikku/deploy-cloudflare": "^0.12.3",
|
|
33
33
|
"@pikku/fetch": "^0.12.3",
|
|
34
|
-
"@pikku/inspector": "^0.12.
|
|
34
|
+
"@pikku/inspector": "^0.12.22",
|
|
35
35
|
"@pikku/kysely": "^0.12.16",
|
|
36
36
|
"@pikku/kysely-node-sqlite": "^0.12.2",
|
|
37
37
|
"@pikku/node-http-server": "^0.12.2",
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: pikku-emails
|
|
3
|
+
description: "Use when working with Pikku's file-based email templates: authoring HTML/subject/text templates, locales, partials and theme, running `pikku emails generate`, and rendering/sending them through an EmailService.
|
|
4
|
+
TRIGGER when: code uses renderEmailTemplate, EmailTemplateName, EmailService, SendTemplateEmailInput, LocalEmailService, or imports from .pikku/email/pikku-emails.gen.
|
|
5
|
+
TRIGGER when: the project has an emails/ directory (templates/, locales/, partials/, theme.json) or emailTemplatesDir in pikku.config.json.
|
|
6
|
+
TRIGGER when: user asks to add/edit a transactional email (verification, password reset, invitation, receipt), wire email sending, or translate an email.
|
|
7
|
+
DO NOT TRIGGER when: user asks about i18n for the app UI (use pikku-i18n) or auth flows in general (use pikku-better-auth)."
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Pikku Emails
|
|
11
|
+
|
|
12
|
+
Pikku compiles a directory of plain template files into a typed, dependency-free
|
|
13
|
+
renderer. `pikku emails generate` reads `emailTemplatesDir` and writes
|
|
14
|
+
`.pikku/email/pikku-emails.gen.ts` (the `renderEmailTemplate` function + per-template
|
|
15
|
+
types) and `pikku-emails-meta.gen.json`. Templates are authored as files; the
|
|
16
|
+
generated output is never edited by hand.
|
|
17
|
+
|
|
18
|
+
## Agent Operating Procedure
|
|
19
|
+
|
|
20
|
+
1. Edit source files under `emailTemplatesDir` only. Never edit `.pikku/email/*`.
|
|
21
|
+
2. After any change run `pikku emails generate` (it is also part of `prebuild`, usually
|
|
22
|
+
`pikku bootstrap; pikku all; pikku emails generate`).
|
|
23
|
+
3. Validate by importing `renderEmailTemplate` and rendering with sample data, or run the
|
|
24
|
+
project's typecheck — the generated `data` type will flag missing/wrong variables.
|
|
25
|
+
4. Fix the source cause; do not patch generated files or update hashes by hand.
|
|
26
|
+
|
|
27
|
+
## Config
|
|
28
|
+
|
|
29
|
+
```jsonc
|
|
30
|
+
// pikku.config.json
|
|
31
|
+
{
|
|
32
|
+
"emailTemplatesDir": "emails", // relative to rootDir; omit to disable emails
|
|
33
|
+
"outDir": ".pikku" // gen lands in <outDir>/email/
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
If `emailTemplatesDir` is unset the command is a no-op.
|
|
38
|
+
|
|
39
|
+
## Directory layout
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
emails/
|
|
43
|
+
theme.json # brand tokens: appName, fonts, colors
|
|
44
|
+
locales/
|
|
45
|
+
en.json # translation strings, nested namespaces
|
|
46
|
+
de.json # one file per locale (filename = locale key)
|
|
47
|
+
partials/
|
|
48
|
+
layout.html # outer wrapper; must include {{content}}
|
|
49
|
+
footer.html # reusable fragment, included with {{> footer}}
|
|
50
|
+
templates/
|
|
51
|
+
verify-email.html # body (required)
|
|
52
|
+
verify-email.subject.txt # subject line (required)
|
|
53
|
+
verify-email.text.txt # plain-text alternative (optional)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
A template's **name** is its filename without the `.html` / `.subject.txt` / `.text.txt`
|
|
57
|
+
suffix (`verify-email` above). `html` and `subject` are required; `text` is optional and,
|
|
58
|
+
when present, becomes the plain-text MIME part.
|
|
59
|
+
|
|
60
|
+
## Templating syntax
|
|
61
|
+
|
|
62
|
+
Placeholders are `{{ ... }}`. Resolution order inside a template:
|
|
63
|
+
|
|
64
|
+
- `{{appName}}` — from `data.appName`, falling back to `theme.appName`.
|
|
65
|
+
- `{{theme.colors.accent}}`, `{{theme.fonts.body}}` — values from `theme.json`.
|
|
66
|
+
- `{{t.verifyEmail.heading}}` — string from the active locale file (`locales/<locale>.json`).
|
|
67
|
+
- `{{verifyUrl}}` — any other key is a **runtime variable**, supplied via `data`.
|
|
68
|
+
- `{{> footer}}` — include a partial from `partials/`.
|
|
69
|
+
- `{{content}}` / `{{subject}}` — only meaningful inside `partials/layout.html`
|
|
70
|
+
(the rendered body and subject). `layout.html` wraps every template if present.
|
|
71
|
+
|
|
72
|
+
Locale strings may themselves contain variables and partial-free placeholders, e.g.
|
|
73
|
+
`"subject": "{{inviterName}} invited you to join {{organizationName}}"`. These are
|
|
74
|
+
resolved in the same pass, so a subject of `{{t.invitation.subject}}` expands fully.
|
|
75
|
+
|
|
76
|
+
## Typed variables (per template)
|
|
77
|
+
|
|
78
|
+
The generator extracts the runtime variables each template references and emits a typed
|
|
79
|
+
`data` shape. Extraction is **scoped to the template**: it walks the template's
|
|
80
|
+
html/subject/text, the partials it includes, and only the locale keys it actually
|
|
81
|
+
references (transitively) — variables from unrelated locale entries do not leak in.
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
import {
|
|
85
|
+
renderEmailTemplate,
|
|
86
|
+
type EmailTemplateName,
|
|
87
|
+
type EmailTemplateVariables,
|
|
88
|
+
} from './.pikku/email/pikku-emails.gen.js'
|
|
89
|
+
|
|
90
|
+
// EmailTemplateVariables<'organization-invitation'> =
|
|
91
|
+
// { appName?: ...; inviteUrl?: ...; inviterName?: ...; organizationName?: ... }
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
To make a variable required-and-typed, reference it directly in the template body (not
|
|
95
|
+
only in a locale string), so it shows up as that template's variable.
|
|
96
|
+
|
|
97
|
+
## Rendering
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
const rendered = renderEmailTemplate({
|
|
101
|
+
name: 'verify-email', // EmailTemplateName (autocompleted)
|
|
102
|
+
locale: 'en', // optional, defaults to 'en'
|
|
103
|
+
data: { verifyUrl: url }, // EmailTemplateVariables<'verify-email'>
|
|
104
|
+
})
|
|
105
|
+
// rendered: { name, locale, subject, html, text?, variables, hash }
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
`hash` is a stable content hash (useful as an idempotency / dedupe key on outgoing mail).
|
|
109
|
+
|
|
110
|
+
## Sending through an EmailService
|
|
111
|
+
|
|
112
|
+
`@pikku/core/services` defines `EmailService.send(input)` where `input` is one of
|
|
113
|
+
`SendTextEmailInput`, `SendHTMLEmailInput`, or `SendTemplateEmailInput`:
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
import type { EmailService } from '@pikku/core/services'
|
|
117
|
+
|
|
118
|
+
await email.send({
|
|
119
|
+
to: user.email,
|
|
120
|
+
template: { name: 'verify-email', locale: user.locale, data: { verifyUrl } },
|
|
121
|
+
})
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
`LocalEmailService` (dev/test) captures the payload as-is. To actually render templates
|
|
125
|
+
before sending, wrap a delegate service: when `input.template` is present, call
|
|
126
|
+
`renderEmailTemplate` and forward `subject` / `html` / `text` to the delegate (e.g. a
|
|
127
|
+
Resend/SES/SMTP service). This wrapper is project-owned because `renderEmailTemplate`
|
|
128
|
+
is generated per project; wire it in `services.ts` and inject it into functions.
|
|
129
|
+
|
|
130
|
+
```ts
|
|
131
|
+
async send(input: SendEmailInput) {
|
|
132
|
+
if (!('template' in input) || !input.template) return this.delegate.send(input)
|
|
133
|
+
const r = renderEmailTemplate(input.template as RenderEmailInput<EmailTemplateName>)
|
|
134
|
+
return this.delegate.send({
|
|
135
|
+
to: input.to, from: input.from, subject: r.subject, html: r.html,
|
|
136
|
+
...(r.text ? { text: r.text } : {}),
|
|
137
|
+
})
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Generated artifacts
|
|
142
|
+
|
|
143
|
+
- `.pikku/email/pikku-emails.gen.ts` — `renderEmailTemplate`, `EmailTemplateName`,
|
|
144
|
+
`EmailLocale`, `EmailTemplateVariables<T>`, inlined templates/locales/partials/theme.
|
|
145
|
+
- `.pikku/email/pikku-emails-meta.gen.json` — per-template `variables`, `hasHtml/Subject/Text`,
|
|
146
|
+
and per-locale content hashes. Both are regenerated; keep them out of hand edits and
|
|
147
|
+
(typically) git-ignored.
|
|
148
|
+
|
|
149
|
+
## Gotchas
|
|
150
|
+
|
|
151
|
+
- New template not appearing → you added `.html` but forgot `.subject.txt` (subject is
|
|
152
|
+
required), or didn't rerun `pikku emails generate`.
|
|
153
|
+
- Variable typed `unknown`/missing → it's only in a locale string for a different template;
|
|
154
|
+
reference it in this template to scope it in.
|
|
155
|
+
- Editing a locale string changes that template's content hash — expected; the hash covers
|
|
156
|
+
the strings the template uses.
|
|
157
|
+
- `layout.html` must contain `{{content}}` or the body is dropped.
|