@pikku/cli 0.12.62 → 0.12.63
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/console-app/assets/{index-CcpTZVoP.js → index-D9OhaZd5.js} +139 -153
- package/console-app/index.html +1 -1
- 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 +1 -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-contracts-meta.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.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.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.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/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 +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/fabric/functions/validate.function.js +102 -0
- package/dist/src/functions/validate/workspace-validate.js +14 -0
- package/dist/src/utils/pikku-cli-config.js +8 -2
- package/package.json +2 -2
package/console-app/index.html
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
}
|
|
22
22
|
} catch (e) {}
|
|
23
23
|
</script>
|
|
24
|
-
<script type="module" crossorigin src="/assets/index-
|
|
24
|
+
<script type="module" crossorigin src="/assets/index-D9OhaZd5.js"></script>
|
|
25
25
|
<link rel="stylesheet" crossorigin href="/assets/index-DwyRdRuZ.css">
|
|
26
26
|
</head>
|
|
27
27
|
<body>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.63
|
|
3
3
|
*/
|
|
4
4
|
import { CoreAIAgent, PikkuAIMiddlewareHooks } from '@pikku/core/ai-agent';
|
|
5
5
|
import type { PikkuPermission, PikkuMiddleware, Services, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.63
|
|
3
3
|
*/
|
|
4
4
|
export { wireVariable } from '@pikku/core/variable';
|
|
5
5
|
export type { CoreVariable, VariableDefinitionMeta, VariableDefinitionsMeta } from '@pikku/core/variable';
|
package/dist/bin/pikku-bin.mjs
CHANGED
|
@@ -11,8 +11,8 @@ async function checkForUpdate() {
|
|
|
11
11
|
})
|
|
12
12
|
if (!res.ok) return
|
|
13
13
|
const { version: latest } = await res.json()
|
|
14
|
-
if (latest !== '0.12.
|
|
15
|
-
process.stderr.write(`\n Update available 0.12.
|
|
14
|
+
if (latest !== '0.12.63') {
|
|
15
|
+
process.stderr.write(`\n Update available 0.12.63 → ${latest}\n brew upgrade pikku or npm install -g @pikku/cli\n\n`)
|
|
16
16
|
}
|
|
17
17
|
} catch {}
|
|
18
18
|
}
|
|
@@ -76,6 +76,42 @@ async function listSourceFiles(dir) {
|
|
|
76
76
|
return [];
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
// Heavy/generated dirs pruned during a source walk.
|
|
80
|
+
const SKIP_WALK_DIRS = new Set([
|
|
81
|
+
'node_modules', '.git', '.next', 'dist', 'build', '.pikku',
|
|
82
|
+
'.pikku-runtime', '.vite', '.tanstack', '.turbo', '.reports',
|
|
83
|
+
]);
|
|
84
|
+
// Recursively list handwritten .ts/.tsx files under a dir, pruning heavy dirs
|
|
85
|
+
// (node_modules, build output, generated) DURING traversal and skipping .gen.*
|
|
86
|
+
// files. Unlike listSourceFiles (which scans only src/ to dodge node_modules),
|
|
87
|
+
// this walks a whole workspace root — Next-style app layouts keep code outside
|
|
88
|
+
// src/ (pikku/, components/, views/, framework/).
|
|
89
|
+
async function walkSourceFiles(dir) {
|
|
90
|
+
const out = [];
|
|
91
|
+
const stack = [dir];
|
|
92
|
+
while (stack.length) {
|
|
93
|
+
const cur = stack.pop();
|
|
94
|
+
let entries;
|
|
95
|
+
try {
|
|
96
|
+
entries = await readdir(cur, { withFileTypes: true });
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
for (const ent of entries) {
|
|
102
|
+
if (ent.isDirectory()) {
|
|
103
|
+
if (!SKIP_WALK_DIRS.has(ent.name))
|
|
104
|
+
stack.push(join(cur, ent.name));
|
|
105
|
+
}
|
|
106
|
+
else if ((ent.name.endsWith('.ts') || ent.name.endsWith('.tsx')) &&
|
|
107
|
+
!ent.name.endsWith('.gen.ts') &&
|
|
108
|
+
!ent.name.endsWith('.gen.tsx')) {
|
|
109
|
+
out.push(join(cur, ent.name));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return out;
|
|
114
|
+
}
|
|
79
115
|
// Module-singleton-sensitive packages: a SECOND physical copy splits
|
|
80
116
|
// module-level state. The TanStack Start dev server registers its SSR
|
|
81
117
|
// middleware on one copy of @tanstack/start-plugin-core while the config hook
|
|
@@ -878,6 +914,72 @@ export async function runValidate(startDir = process.cwd()) {
|
|
|
878
914
|
}
|
|
879
915
|
}
|
|
880
916
|
}
|
|
917
|
+
// ── deprecated Next.js pikku client (dead codegen) ─────────────────────
|
|
918
|
+
// The Next HTTP/backend client (`nextHTTPFile`/`nextBackendFile` → *.gen.ts)
|
|
919
|
+
// is no longer emitted by pikku codegen — Fabric frontends use the fetch
|
|
920
|
+
// client generated into the functions-sdk (PikkuFetch/PikkuRPC + createPikku).
|
|
921
|
+
// The trap that bit heygermany's deploy: a frontend still imports the stale
|
|
922
|
+
// `nextjs-*.gen` file. It is gitignored (so `git add -A` never pushes it) AND
|
|
923
|
+
// `pikku all` no longer regenerates it — so it lingers on the dev's disk
|
|
924
|
+
// (validate/tsc pass locally) but is ABSENT in the clean build container,
|
|
925
|
+
// where tsc dies with "Cannot find module './nextjs-http.gen'" and aborts the
|
|
926
|
+
// deploy. Flag both the dead config keys and any surviving import.
|
|
927
|
+
{
|
|
928
|
+
const DEAD_NEXT_KEYS = ['nextHTTPFile', 'nextBackendFile'];
|
|
929
|
+
const rel = (p) => p.slice(root.length + 1);
|
|
930
|
+
const configPaths = [pikkuConfigPath];
|
|
931
|
+
for (const group of ['apps', 'packages']) {
|
|
932
|
+
const groupDir = join(root, group);
|
|
933
|
+
if (!existsSync(groupDir))
|
|
934
|
+
continue;
|
|
935
|
+
try {
|
|
936
|
+
for (const d of await readdir(groupDir, { withFileTypes: true })) {
|
|
937
|
+
if (!d.isDirectory())
|
|
938
|
+
continue;
|
|
939
|
+
const cfg = join(groupDir, d.name, 'pikku.config.json');
|
|
940
|
+
if (existsSync(cfg))
|
|
941
|
+
configPaths.push(cfg);
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
catch {
|
|
945
|
+
// ignore
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
for (const cfgPath of configPaths) {
|
|
949
|
+
const cfg = await readJsonSafe(cfgPath);
|
|
950
|
+
if (!cfg)
|
|
951
|
+
continue;
|
|
952
|
+
const deadKeys = DEAD_NEXT_KEYS.filter((k) => cfg[k]);
|
|
953
|
+
if (deadKeys.length) {
|
|
954
|
+
e(`dead-next-codegen-config-${rel(cfgPath).replace(/[^a-z0-9]/gi, '-')}`, `${rel(cfgPath)} declares ${deadKeys.join(', ')} — the Next.js pikku client is no longer generated by codegen, so the referenced *.gen file is gitignored + never regenerated and is absent in a clean build (tsc fails "Cannot find module")`, cfgPath, lines(`Remove the ${deadKeys.join('/')} key(s) and generate the fetch client into the functions-sdk instead:`, '"clientFiles": {', ' "fetchFile": "packages/functions-sdk/src/pikku/pikku-fetch.gen.ts",', ' "rpcWiringsFile": "packages/functions-sdk/src/pikku/pikku-rpc.gen.ts"', '}', 'Then in the frontend: import { PikkuFetch } / { PikkuRPC } from "@<scope>/functions-sdk/pikku/..." and wire them with createPikku(PikkuFetch, PikkuRPC, { serverUrl }).'));
|
|
955
|
+
}
|
|
956
|
+
}
|
|
957
|
+
// Scan handwritten frontend/package source for imports of the dead client.
|
|
958
|
+
const DEAD_IMPORT_RE = /['"][^'"]*\bnextjs-(?:http|backend)\.gen(?:\.[jt]sx?)?['"]/;
|
|
959
|
+
for (const group of ['apps', 'packages']) {
|
|
960
|
+
const groupDir = join(root, group);
|
|
961
|
+
if (!existsSync(groupDir))
|
|
962
|
+
continue;
|
|
963
|
+
let subdirs = [];
|
|
964
|
+
try {
|
|
965
|
+
subdirs = (await readdir(groupDir, { withFileTypes: true }))
|
|
966
|
+
.filter((d) => d.isDirectory())
|
|
967
|
+
.map((d) => d.name);
|
|
968
|
+
}
|
|
969
|
+
catch {
|
|
970
|
+
continue;
|
|
971
|
+
}
|
|
972
|
+
for (const name of subdirs) {
|
|
973
|
+
const wsPath = join(groupDir, name);
|
|
974
|
+
for (const file of await walkSourceFiles(wsPath)) {
|
|
975
|
+
const text = await readTextSafe(file);
|
|
976
|
+
if (!text || !DEAD_IMPORT_RE.test(text))
|
|
977
|
+
continue;
|
|
978
|
+
e(`dead-next-client-import-${rel(file).replace(/[^a-z0-9]/gi, '-')}`, `${rel(file)} imports the deprecated Next.js pikku client (nextjs-http.gen / nextjs-backend.gen) — pikku no longer generates it and it is gitignored, so a clean build has no such module and tsc aborts the deploy with "Cannot find module"`, file, lines('Replace the nextjs-*.gen import with the fetch client from the functions-sdk:', " import { PikkuFetch } from '@<scope>/functions-sdk/pikku/pikku-fetch.gen'", " import { PikkuRPC } from '@<scope>/functions-sdk/pikku/pikku-rpc.gen'", ' const pikku = createPikku(PikkuFetch, PikkuRPC, { serverUrl })', 'Emit those files via pikku.config.json clientFiles (fetchFile/rpcWiringsFile) and remove nextHTTPFile/nextBackendFile.'));
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
}
|
|
881
983
|
// ── packages/theme + packages/components ──────────────────────────────
|
|
882
984
|
const designDocUrl = 'https://pikkufabric.dev/docs/design';
|
|
883
985
|
if (!existsSync(join(root, 'packages', 'mantine-theme'))) {
|
|
@@ -141,6 +141,20 @@ export async function runWorkspaceValidate(startDir = process.cwd()) {
|
|
|
141
141
|
else if (fnPkg.type !== 'module') {
|
|
142
142
|
w('functions-pkg-no-esm', 'packages/functions/package.json is missing "type": "module"', fnPkgPath, 'Add "type": "module" to packages/functions/package.json');
|
|
143
143
|
}
|
|
144
|
+
// zod v4 must be installed in the functions package: pikku's generated
|
|
145
|
+
// schemas and the auth scaffold (auth-secrets.gen.ts) both `import { z }
|
|
146
|
+
// from 'zod'`, so a missing/old zod fails codegen (PKU489) or type-checks.
|
|
147
|
+
if (fnPkg) {
|
|
148
|
+
const fnDeps = { ...fnPkg.dependencies, ...fnPkg.devDependencies };
|
|
149
|
+
const zodRange = fnDeps.zod;
|
|
150
|
+
const zodMajor = zodRange?.match(/(\d+)/)?.[1];
|
|
151
|
+
if (!zodRange) {
|
|
152
|
+
e('functions-missing-zod', 'packages/functions/package.json does not declare "zod" — pikku schemas and the generated auth scaffold import it', fnPkgPath, 'Add "zod": "^4" to packages/functions dependencies');
|
|
153
|
+
}
|
|
154
|
+
else if (zodMajor !== '4') {
|
|
155
|
+
e('functions-zod-not-v4', `packages/functions requires zod v4 but found "${zodRange}"`, fnPkgPath, 'Set "zod": "^4" in packages/functions dependencies');
|
|
156
|
+
}
|
|
157
|
+
}
|
|
144
158
|
const servicesPath = join(fnDir, 'src', 'services.ts');
|
|
145
159
|
const servicesText = await readTextSafe(servicesPath);
|
|
146
160
|
if (!servicesText) {
|