@pikku/cli 0.12.34 → 0.12.36
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-Dxl3JsMK.js +233 -0
- 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 +6 -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 +6 -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 +2 -2
- package/dist/.pikku/function/pikku-function-types.gen.js +17 -3
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +238 -221
- package/dist/.pikku/function/pikku-functions.gen.js +3 -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 +5 -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 +17 -13
- package/dist/.pikku/schemas/schemas/DbGenerateInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuFunctionTypesInput.schema.json +1 -0
- 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/meta/allWorkflow.gen.json +22 -4
- 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 +5 -0
- package/dist/src/fabric/functions/login.function.d.ts +1 -1
- package/dist/src/fabric/functions/login.function.js +1 -1
- package/dist/src/functions/commands/bootstrap.js +1 -1
- package/dist/src/functions/commands/db-generate.d.ts +1 -0
- package/dist/src/functions/commands/db-generate.js +45 -0
- package/dist/src/functions/commands/db-migrate.js +13 -1
- package/dist/src/functions/db/annotation-parser.d.ts +27 -16
- package/dist/src/functions/db/annotation-parser.js +50 -110
- package/dist/src/functions/db/better-auth-schema.d.ts +23 -0
- package/dist/src/functions/db/better-auth-schema.js +122 -0
- package/dist/src/functions/db/coercion-plugin.d.ts +1 -1
- package/dist/src/functions/db/coercion-plugin.js +4 -0
- package/dist/src/functions/db/db-codegen.d.ts +13 -1
- package/dist/src/functions/db/db-codegen.js +142 -31
- package/dist/src/functions/db/db-introspector.d.ts +6 -0
- package/dist/src/functions/db/local-db.d.ts +33 -0
- package/dist/src/functions/db/local-db.js +221 -79
- package/dist/src/functions/db/postgres/postgres-introspector.js +2 -0
- package/dist/src/functions/db/zod-codegen.d.ts +38 -0
- package/dist/src/functions/db/zod-codegen.js +153 -38
- package/dist/src/functions/validate/workspace-validate.js +1 -1
- package/dist/src/functions/wirings/auth/pikku-command-auth.js +30 -4
- package/dist/src/functions/wirings/auth/serialize-auth-gen.d.ts +33 -1
- package/dist/src/functions/wirings/auth/serialize-auth-gen.js +122 -88
- package/dist/src/functions/wirings/auth/serialize-auth-meta.d.ts +32 -0
- package/dist/src/functions/wirings/auth/serialize-auth-meta.js +23 -0
- package/dist/src/functions/wirings/auth/serialize-auth-types.d.ts +27 -0
- package/dist/src/functions/wirings/auth/serialize-auth-types.js +58 -0
- package/dist/src/functions/wirings/functions/pikku-command-function-types.d.ts +7 -1
- package/dist/src/functions/wirings/functions/pikku-command-function-types.js +16 -3
- package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-services.js +9 -2
- package/dist/src/functions/wirings/functions/serialize-function-types.js +17 -3
- package/dist/src/functions/wirings/functions/serialize-pikku-types-hub.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-pikku-types-hub.js +2 -1
- package/dist/src/functions/workflows/all.workflow.js +16 -2
- package/dist/src/scaffold/rpc-remote.gen.js +1 -1
- package/dist/src/services.js +8 -0
- package/dist/src/utils/pikku-cli-config.js +12 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/skills/pikku-better-auth/SKILL.md +211 -0
- package/console-app/assets/index-DsW0T00Z.js +0 -233
- package/skills/pikku-auth-js/SKILL.md +0 -339
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PROVIDER_REGISTRY, pluginDisplayName } from '@pikku/better-auth';
|
|
2
|
+
/**
|
|
3
|
+
* Builds the `auth-meta.gen.json` payload from the inspected auth definition.
|
|
4
|
+
*
|
|
5
|
+
* Only providers known to {@link PROVIDER_REGISTRY} are emitted (the same ones
|
|
6
|
+
* the CLI wires a secret for); unknown keys (e.g. wired via the genericOAuth
|
|
7
|
+
* plugin) are dropped since they have no secret metadata. Every plugin id from
|
|
8
|
+
* the config is emitted, enriched with a display name.
|
|
9
|
+
*/
|
|
10
|
+
export const serializeAuthMeta = (definition, providers) => ({
|
|
11
|
+
basePath: definition.basePath,
|
|
12
|
+
hasCredentials: definition.hasCredentials,
|
|
13
|
+
providers: providers
|
|
14
|
+
.filter((id) => id in PROVIDER_REGISTRY)
|
|
15
|
+
.map((id) => {
|
|
16
|
+
const def = PROVIDER_REGISTRY[id];
|
|
17
|
+
return { id, displayName: def.displayName, secretId: def.secretId };
|
|
18
|
+
}),
|
|
19
|
+
plugins: definition.plugins.map((id) => ({
|
|
20
|
+
id,
|
|
21
|
+
displayName: pluginDisplayName(id),
|
|
22
|
+
})),
|
|
23
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates `.pikku/auth/auth.types.ts` — a typed wrapper around `pikkuBetterAuth`
|
|
3
|
+
* from `@pikku/better-auth` that substitutes the project's specific
|
|
4
|
+
* `SingletonServices` type for the generic `CoreSingletonServices`. This lets
|
|
5
|
+
* users write:
|
|
6
|
+
*
|
|
7
|
+
* import { pikkuBetterAuth } from '#pikku'
|
|
8
|
+
*
|
|
9
|
+
* and get proper autocomplete on the factory's `services` param (e.g.
|
|
10
|
+
* `(services) => betterAuth({ database: { db: services.kysely } })` types
|
|
11
|
+
* `services.kysely` as the project's Kysely instance, not the loose `any` from
|
|
12
|
+
* `CoreSingletonServices`).
|
|
13
|
+
*
|
|
14
|
+
* The wrapper also substitutes the project's generated `TypedSecretService` /
|
|
15
|
+
* `TypedVariablesService` for the base `secrets` / `variables` services and wraps
|
|
16
|
+
* them at runtime — the same treatment addon services get from
|
|
17
|
+
* `pikkuAddonServices`. That gives the factory typed, map-aware access:
|
|
18
|
+
*
|
|
19
|
+
* socialProviders: { github: await secrets.getSecret('GITHUB_OAUTH') }
|
|
20
|
+
*
|
|
21
|
+
* with no inline `getSecrets<{ ... }>()` generic, because the secret types flow
|
|
22
|
+
* from the generated `CredentialsMap`.
|
|
23
|
+
*
|
|
24
|
+
* The file is re-exported from `.pikku/pikku-types.gen.ts` (the `#pikku` hub)
|
|
25
|
+
* so the single import resolves correctly.
|
|
26
|
+
*/
|
|
27
|
+
export declare const serializeAuthTypes: (authTypesFile: string, functionTypesFile: string, secretsFile: string, variablesFile: string, packageMappings: Record<string, string>) => string;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
|
|
2
|
+
/**
|
|
3
|
+
* Generates `.pikku/auth/auth.types.ts` — a typed wrapper around `pikkuBetterAuth`
|
|
4
|
+
* from `@pikku/better-auth` that substitutes the project's specific
|
|
5
|
+
* `SingletonServices` type for the generic `CoreSingletonServices`. This lets
|
|
6
|
+
* users write:
|
|
7
|
+
*
|
|
8
|
+
* import { pikkuBetterAuth } from '#pikku'
|
|
9
|
+
*
|
|
10
|
+
* and get proper autocomplete on the factory's `services` param (e.g.
|
|
11
|
+
* `(services) => betterAuth({ database: { db: services.kysely } })` types
|
|
12
|
+
* `services.kysely` as the project's Kysely instance, not the loose `any` from
|
|
13
|
+
* `CoreSingletonServices`).
|
|
14
|
+
*
|
|
15
|
+
* The wrapper also substitutes the project's generated `TypedSecretService` /
|
|
16
|
+
* `TypedVariablesService` for the base `secrets` / `variables` services and wraps
|
|
17
|
+
* them at runtime — the same treatment addon services get from
|
|
18
|
+
* `pikkuAddonServices`. That gives the factory typed, map-aware access:
|
|
19
|
+
*
|
|
20
|
+
* socialProviders: { github: await secrets.getSecret('GITHUB_OAUTH') }
|
|
21
|
+
*
|
|
22
|
+
* with no inline `getSecrets<{ ... }>()` generic, because the secret types flow
|
|
23
|
+
* from the generated `CredentialsMap`.
|
|
24
|
+
*
|
|
25
|
+
* The file is re-exported from `.pikku/pikku-types.gen.ts` (the `#pikku` hub)
|
|
26
|
+
* so the single import resolves correctly.
|
|
27
|
+
*/
|
|
28
|
+
export const serializeAuthTypes = (authTypesFile, functionTypesFile, secretsFile, variablesFile, packageMappings) => {
|
|
29
|
+
const functionTypesImport = getFileImportRelativePath(authTypesFile, functionTypesFile, packageMappings);
|
|
30
|
+
const secretsImport = getFileImportRelativePath(authTypesFile, secretsFile, packageMappings);
|
|
31
|
+
const variablesImport = getFileImportRelativePath(authTypesFile, variablesFile, packageMappings);
|
|
32
|
+
return [
|
|
33
|
+
'// AUTO-GENERATED by pikku CLI — do not edit',
|
|
34
|
+
'',
|
|
35
|
+
`import { pikkuBetterAuth as _pikkuBetterAuth } from '@pikku/better-auth'`,
|
|
36
|
+
`import type { BetterAuthInstance, PikkuBetterAuthFactory } from '@pikku/better-auth'`,
|
|
37
|
+
`import type { SingletonServices } from '${functionTypesImport}'`,
|
|
38
|
+
`import { TypedSecretService } from '${secretsImport}'`,
|
|
39
|
+
`import { TypedVariablesService } from '${variablesImport}'`,
|
|
40
|
+
'',
|
|
41
|
+
`type AuthSingletonServices = Omit<SingletonServices, 'secrets' | 'variables'> & {`,
|
|
42
|
+
` secrets: TypedSecretService`,
|
|
43
|
+
` variables: TypedVariablesService`,
|
|
44
|
+
`}`,
|
|
45
|
+
'',
|
|
46
|
+
`export const pikkuBetterAuth = <I extends BetterAuthInstance>(`,
|
|
47
|
+
` factory: (services: AuthSingletonServices) => I | Promise<I>`,
|
|
48
|
+
`): PikkuBetterAuthFactory<I> =>`,
|
|
49
|
+
` _pikkuBetterAuth((services) =>`,
|
|
50
|
+
` factory({`,
|
|
51
|
+
` ...services,`,
|
|
52
|
+
` secrets: new TypedSecretService(services.secrets),`,
|
|
53
|
+
` variables: new TypedVariablesService(services.variables),`,
|
|
54
|
+
` } as AuthSingletonServices)`,
|
|
55
|
+
` )`,
|
|
56
|
+
'',
|
|
57
|
+
].join('\n');
|
|
58
|
+
};
|
|
@@ -1 +1,7 @@
|
|
|
1
|
-
export declare const pikkuFunctionTypes: import("#pikku").PikkuFunctionConfig<
|
|
1
|
+
export declare const pikkuFunctionTypes: import("#pikku").PikkuFunctionConfig<{
|
|
2
|
+
bootstrap?: boolean;
|
|
3
|
+
}, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<{
|
|
4
|
+
bootstrap?: boolean;
|
|
5
|
+
}, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
6
|
+
bootstrap?: boolean;
|
|
7
|
+
}, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -4,14 +4,27 @@ import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
|
4
4
|
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
5
5
|
import { serializePikkuTypesHub } from './serialize-pikku-types-hub.js';
|
|
6
6
|
export const pikkuFunctionTypes = pikkuSessionlessFunc({
|
|
7
|
-
func: async ({ logger, config }) => {
|
|
8
|
-
const { typesDeclarationFile: typesFile, packageMappings, functionTypesFile, httpTypesFile, channelsTypesFile, triggersTypesFile, schedulersTypesFile, queueTypesFile, mcpTypesFile, cliTypesFile, nodeTypesFile, secretTypesFile, addonTypesFile, } = config;
|
|
7
|
+
func: async ({ logger, config, getInspectorState }, data) => {
|
|
8
|
+
const { typesDeclarationFile: typesFile, packageMappings, functionTypesFile, httpTypesFile, channelsTypesFile, triggersTypesFile, schedulersTypesFile, queueTypesFile, mcpTypesFile, cliTypesFile, nodeTypesFile, secretTypesFile, addonTypesFile, authTypesFile, } = config;
|
|
9
9
|
const getImportPath = (file) => config.addon
|
|
10
10
|
? null
|
|
11
11
|
: getFileImportRelativePath(typesFile, file, packageMappings);
|
|
12
12
|
// Node and trigger types are included for addon packages
|
|
13
13
|
const getAlwaysImportPath = (file) => getFileImportRelativePath(typesFile, file, packageMappings);
|
|
14
|
-
|
|
14
|
+
// Include the typed pikkuBetterAuth re-export only when the project has a
|
|
15
|
+
// pikkuBetterAuth declaration. This avoids importing @pikku/better-auth in
|
|
16
|
+
// projects that don't use it.
|
|
17
|
+
//
|
|
18
|
+
// Skip inspector state entirely during cold bootstrap: .pikku doesn't exist
|
|
19
|
+
// yet, so a full inspect would runtime-import user files that themselves
|
|
20
|
+
// import `.pikku/pikku-types.gen.js` — deadlocking before this step can
|
|
21
|
+
// write that very file. The auth re-export is added on the later
|
|
22
|
+
// post-inspect pass (where .pikku already exists) instead.
|
|
23
|
+
const state = data?.bootstrap ? null : await getInspectorState();
|
|
24
|
+
const authTypesImportPath = authTypesFile && state?.auth.definition
|
|
25
|
+
? getFileImportRelativePath(typesFile, authTypesFile, packageMappings)
|
|
26
|
+
: null;
|
|
27
|
+
const content = serializePikkuTypesHub(getFileImportRelativePath(typesFile, functionTypesFile, packageMappings), getImportPath(httpTypesFile), getImportPath(channelsTypesFile), getAlwaysImportPath(triggersTypesFile), getImportPath(schedulersTypesFile), getImportPath(queueTypesFile), getImportPath(mcpTypesFile), getImportPath(cliTypesFile), getAlwaysImportPath(nodeTypesFile), getAlwaysImportPath(secretTypesFile), config.addon ? getAlwaysImportPath(addonTypesFile) : null, authTypesImportPath);
|
|
15
28
|
await writeFileInDir(logger, typesFile, content);
|
|
16
29
|
},
|
|
17
30
|
middleware: [
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const serializeServicesMap: (allSingletonServices: string[], allWireServices: string[], requiredServices: Set<string>, forceRequiredServices: string[] | undefined, servicesImport: string, wireServicesImport: string, addonRequiredParentServices?: string[]) => string;
|
|
1
|
+
export declare const serializeServicesMap: (allSingletonServices: string[], allWireServices: string[], requiredServices: Set<string>, forceRequiredServices: string[] | undefined, servicesImport: string, wireServicesImport: string, addonRequiredParentServices?: string[], authInjected?: boolean) => string;
|
|
2
2
|
export declare const pikkuServices: import("#pikku").PikkuFunctionConfig<void, void, "rpc" | "session", import("#pikku").PikkuFunctionSessionless<void, void, "rpc" | "session", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "rpc" | "session", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -3,7 +3,7 @@ import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
|
|
|
3
3
|
import { checkRequiredTypes } from '../../../utils/check-required-types.js';
|
|
4
4
|
import { writeFileInDir } from '../../../utils/file-writer.js';
|
|
5
5
|
import { logCommandInfoAndTime } from '../../../middleware/log-command-info-and-time.js';
|
|
6
|
-
export const serializeServicesMap = (allSingletonServices, allWireServices, requiredServices, forceRequiredServices = [], servicesImport, wireServicesImport, addonRequiredParentServices = []) => {
|
|
6
|
+
export const serializeServicesMap = (allSingletonServices, allWireServices, requiredServices, forceRequiredServices = [], servicesImport, wireServicesImport, addonRequiredParentServices = [], authInjected = false) => {
|
|
7
7
|
// Use pre-aggregated services from inspector state
|
|
8
8
|
// This includes services from:
|
|
9
9
|
// - Wired functions (HTTP, channels, queues, schedulers, MCP, CLI, RPC)
|
|
@@ -32,6 +32,13 @@ export const serializeServicesMap = (allSingletonServices, allWireServices, requ
|
|
|
32
32
|
// Services that are always required internally by the framework
|
|
33
33
|
const defaultServices = ['config', 'logger', 'variables', 'schema', 'secrets'];
|
|
34
34
|
defaultServices.forEach((service) => usedServices.add(service));
|
|
35
|
+
// When a pikkuBetterAuth factory is present, the generated `pikkuServices`
|
|
36
|
+
// wrapper always injects a resolved `auth` singleton. Mark it required so
|
|
37
|
+
// RequiredSingletonServices keeps `auth` non-optional and stays assignable
|
|
38
|
+
// to a SingletonServices type that types `auth` from the factory's return.
|
|
39
|
+
if (authInjected) {
|
|
40
|
+
usedServices.add('auth');
|
|
41
|
+
}
|
|
35
42
|
// Create singleton services map: all singleton services with true/false based on usage
|
|
36
43
|
const singletonServicesMap = {};
|
|
37
44
|
allSingletonServices.forEach((service) => {
|
|
@@ -103,7 +110,7 @@ export const pikkuServices = pikkuSessionlessFunc({
|
|
|
103
110
|
}
|
|
104
111
|
const servicesImport = `import type { ${singletonServicesType.type} } from '${getFileImportRelativePath(config.typesDeclarationFile, singletonServicesType.typePath, config.packageMappings)}'`;
|
|
105
112
|
const wireServicesImport = `import type { ${wireServicesType.type} } from '${getFileImportRelativePath(config.typesDeclarationFile, wireServicesType.typePath, config.packageMappings)}'`;
|
|
106
|
-
const servicesCode = serializeServicesMap(visitState.serviceAggregation.allSingletonServices, visitState.serviceAggregation.allWireServices, visitState.serviceAggregation.requiredServices, config.forceRequiredServices, servicesImport, wireServicesImport, config.addonName ? visitState.addonRequiredParentServices : []);
|
|
113
|
+
const servicesCode = serializeServicesMap(visitState.serviceAggregation.allSingletonServices, visitState.serviceAggregation.allWireServices, visitState.serviceAggregation.requiredServices, config.forceRequiredServices, servicesImport, wireServicesImport, config.addonName ? visitState.addonRequiredParentServices : [], Boolean(visitState.auth?.definition));
|
|
107
114
|
await writeFileInDir(logger, config.servicesFile, servicesCode);
|
|
108
115
|
},
|
|
109
116
|
middleware: [
|
|
@@ -629,12 +629,26 @@ export const pikkuConfig = (
|
|
|
629
629
|
* \`\`\`
|
|
630
630
|
*/
|
|
631
631
|
export const pikkuServices = (
|
|
632
|
-
func: (config: Config, existingServices: Partial<SingletonServices>) => Promise<RequiredSingletonServices
|
|
632
|
+
func: (config: Config, existingServices: Partial<SingletonServices>) => Promise<Omit<RequiredSingletonServices, 'auth'>>
|
|
633
633
|
) => {
|
|
634
634
|
return async (config: Config, existingServices: Partial<SingletonServices> = {}) => {
|
|
635
635
|
const services = await func(config, existingServices)
|
|
636
|
-
__pikkuState(null, 'package', '
|
|
637
|
-
|
|
636
|
+
const authFactory = __pikkuState(null, 'package', 'authFactory')
|
|
637
|
+
if (authFactory) {
|
|
638
|
+
let authInstance: Promise<unknown> | undefined
|
|
639
|
+
;(services as any).auth = () => {
|
|
640
|
+
authInstance ??= Promise.resolve()
|
|
641
|
+
.then(() => authFactory(services as any))
|
|
642
|
+
.catch((error) => {
|
|
643
|
+
authInstance = undefined
|
|
644
|
+
throw error
|
|
645
|
+
})
|
|
646
|
+
return authInstance
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
const resolved = services as RequiredSingletonServices
|
|
650
|
+
__pikkuState(null, 'package', 'singletonServices', resolved as any)
|
|
651
|
+
return resolved
|
|
638
652
|
}
|
|
639
653
|
}
|
|
640
654
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generates the main pikku-types.gen.ts file as a re-export hub
|
|
3
3
|
*/
|
|
4
|
-
export declare const serializePikkuTypesHub: (functionTypesImportPath: string, httpTypesImportPath: string | null, channelTypesImportPath: string | null, triggerTypesImportPath: string | null, schedulerTypesImportPath: string | null, queueTypesImportPath: string | null, mcpTypesImportPath: string | null, cliTypesImportPath: string | null, nodeTypesImportPath: string | null, secretTypesImportPath: string | null, addonTypesImportPath: string | null) => string;
|
|
4
|
+
export declare const serializePikkuTypesHub: (functionTypesImportPath: string, httpTypesImportPath: string | null, channelTypesImportPath: string | null, triggerTypesImportPath: string | null, schedulerTypesImportPath: string | null, queueTypesImportPath: string | null, mcpTypesImportPath: string | null, cliTypesImportPath: string | null, nodeTypesImportPath: string | null, secretTypesImportPath: string | null, addonTypesImportPath: string | null, authTypesImportPath?: string | null) => string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Generates the main pikku-types.gen.ts file as a re-export hub
|
|
3
3
|
*/
|
|
4
|
-
export const serializePikkuTypesHub = (functionTypesImportPath, httpTypesImportPath, channelTypesImportPath, triggerTypesImportPath, schedulerTypesImportPath, queueTypesImportPath, mcpTypesImportPath, cliTypesImportPath, nodeTypesImportPath, secretTypesImportPath, addonTypesImportPath) => {
|
|
4
|
+
export const serializePikkuTypesHub = (functionTypesImportPath, httpTypesImportPath, channelTypesImportPath, triggerTypesImportPath, schedulerTypesImportPath, queueTypesImportPath, mcpTypesImportPath, cliTypesImportPath, nodeTypesImportPath, secretTypesImportPath, addonTypesImportPath, authTypesImportPath = null) => {
|
|
5
5
|
const exports = [
|
|
6
6
|
{
|
|
7
7
|
comment: 'Core function, middleware, and permission types',
|
|
@@ -17,6 +17,7 @@ export const serializePikkuTypesHub = (functionTypesImportPath, httpTypesImportP
|
|
|
17
17
|
{ comment: 'Node wiring types', path: nodeTypesImportPath },
|
|
18
18
|
{ comment: 'Secret definition types', path: secretTypesImportPath },
|
|
19
19
|
{ comment: 'Addon types', path: addonTypesImportPath },
|
|
20
|
+
{ comment: 'Auth types (typed pikkuBetterAuth re-export)', path: authTypesImportPath },
|
|
20
21
|
];
|
|
21
22
|
const exportStatements = exports
|
|
22
23
|
.filter((e) => e.path)
|
|
@@ -30,7 +30,9 @@ export const allWorkflow = pikkuWorkflowComplexFunc({
|
|
|
30
30
|
logger.debug(`• .pikku directory not found, running bootstrap first...`);
|
|
31
31
|
await workflow.do('Bootstrap inspect', async () => getInspectorState(false, true, true));
|
|
32
32
|
await workflow.do('Bootstrap function types split', 'pikkuFunctionTypesSplit', { bootstrap: true });
|
|
33
|
-
await workflow.do('Bootstrap function types', 'pikkuFunctionTypes',
|
|
33
|
+
await workflow.do('Bootstrap function types', 'pikkuFunctionTypes', {
|
|
34
|
+
bootstrap: true,
|
|
35
|
+
});
|
|
34
36
|
await workflow.do('Bootstrap addon types', 'pikkuAddonTypes', {
|
|
35
37
|
bootstrap: true,
|
|
36
38
|
});
|
|
@@ -66,7 +68,7 @@ export const allWorkflow = pikkuWorkflowComplexFunc({
|
|
|
66
68
|
await workflow.do(`Scaffold ${generator}`, generator, null);
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
|
-
await workflow.do('Generate function types', 'pikkuFunctionTypes',
|
|
71
|
+
await workflow.do('Generate function types', 'pikkuFunctionTypes', {});
|
|
70
72
|
if (!typesDeclarationFileExists || missingScaffolds.length > 0) {
|
|
71
73
|
logger.debug(`• Type file or scaffolds first created, inspecting again...`);
|
|
72
74
|
await workflow.do('Re-inspect after types', async () => getInspectorState(true));
|
|
@@ -130,6 +132,18 @@ export const allWorkflow = pikkuWorkflowComplexFunc({
|
|
|
130
132
|
if (agents || !config.addon) {
|
|
131
133
|
await workflow.do('Re-inspect after agents', async () => getInspectorState(true));
|
|
132
134
|
}
|
|
135
|
+
// pikkuAuth generates auth-secrets.gen.ts (with wireSecret calls) inside the
|
|
136
|
+
// Promise.all above, but pikkuSecrets runs concurrently from the pre-auth
|
|
137
|
+
// inspector state. Re-run secret/credential/variable codegen now so that the
|
|
138
|
+
// freshly-generated auth-secrets.gen.ts (just picked up by Re-inspect above)
|
|
139
|
+
// is reflected in pikku-secrets-meta.gen.json.
|
|
140
|
+
if ((await getInspectorState()).auth.definition) {
|
|
141
|
+
await Promise.all([
|
|
142
|
+
workflow.do('Secrets (post-auth)', 'pikkuSecrets', null),
|
|
143
|
+
workflow.do('Credentials (post-auth)', 'pikkuCredentials', null),
|
|
144
|
+
workflow.do('Variables (post-auth)', 'pikkuVariables', null),
|
|
145
|
+
]);
|
|
146
|
+
}
|
|
133
147
|
const schemas = await workflow.do('Schemas', 'pikkuSchemas', null);
|
|
134
148
|
if (schemas) {
|
|
135
149
|
allImports.push(`${config.schemaDirectory}/register.gen.ts`);
|
package/dist/src/services.js
CHANGED
|
@@ -187,6 +187,14 @@ export const createSingletonServices = async (config) => {
|
|
|
187
187
|
config.workflowRoutesFile,
|
|
188
188
|
config.publicRpcFile,
|
|
189
189
|
config.publicAgentFile,
|
|
190
|
+
// The auth scaffold (catch-all routes + session middleware) and its
|
|
191
|
+
// sibling secrets file (wireSecret per provider) are generated into the
|
|
192
|
+
// scaffold dir, which may live outside srcDirectories (e.g. a project's
|
|
193
|
+
// `pikku/` dir). Add them explicitly so their wirings are inspected.
|
|
194
|
+
config.authFile,
|
|
195
|
+
config.authFile
|
|
196
|
+
? path.join(path.dirname(config.authFile), 'auth-secrets.gen.ts')
|
|
197
|
+
: undefined,
|
|
190
198
|
];
|
|
191
199
|
for (const file of scaffoldFiles) {
|
|
192
200
|
if (file && !wiringFiles.includes(file) && existsSync(file)) {
|
|
@@ -197,6 +197,15 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
|
|
|
197
197
|
if (result.scaffold?.console && !result.consoleFunctionsFile) {
|
|
198
198
|
result.consoleFunctionsFile = join(resolvedScaffoldDir, 'console.gen.ts');
|
|
199
199
|
}
|
|
200
|
+
if (!result.authFile) {
|
|
201
|
+
result.authFile = join(resolvedScaffoldDir, 'auth.gen.ts');
|
|
202
|
+
}
|
|
203
|
+
if (!result.authTypesFile) {
|
|
204
|
+
result.authTypesFile = join(result.outDir, 'auth', 'auth.types.ts');
|
|
205
|
+
}
|
|
206
|
+
if (!result.authMetaJsonFile) {
|
|
207
|
+
result.authMetaJsonFile = join(result.outDir, 'auth', 'pikku-auth-meta.gen.json');
|
|
208
|
+
}
|
|
200
209
|
if (result.scaffold?.events && !result.eventsChannelFile) {
|
|
201
210
|
result.eventsChannelFile = join(resolvedScaffoldDir, 'events.gen.ts');
|
|
202
211
|
}
|
|
@@ -422,6 +431,9 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
|
|
|
422
431
|
if (result.authFile && !isAbsolute(result.authFile)) {
|
|
423
432
|
result.authFile = join(result.configDir, result.authFile);
|
|
424
433
|
}
|
|
434
|
+
if (result.authTypesFile && !isAbsolute(result.authTypesFile)) {
|
|
435
|
+
result.authTypesFile = join(result.configDir, result.authTypesFile);
|
|
436
|
+
}
|
|
425
437
|
if (!isAbsolute(result.tsconfig)) {
|
|
426
438
|
result.tsconfig = join(result.rootDir, result.tsconfig);
|
|
427
439
|
}
|
|
@@ -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/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-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/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/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/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/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/command-summary.ts","../src/utils/contract-versions.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/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/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/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/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/command-summary.ts","../src/utils/contract-versions.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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pikku/cli",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.36",
|
|
4
4
|
"author": "yasser.fadl@gmail.com",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"imports": {
|
|
@@ -26,10 +26,11 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@openapi-contrib/json-schema-to-openapi-schema": "^4.3.1",
|
|
29
|
-
"@pikku/
|
|
29
|
+
"@pikku/better-auth": "workspace:*",
|
|
30
|
+
"@pikku/core": "^0.12.32",
|
|
30
31
|
"@pikku/deploy-cloudflare": "^0.12.3",
|
|
31
32
|
"@pikku/fetch": "^0.12.3",
|
|
32
|
-
"@pikku/inspector": "^0.12.
|
|
33
|
+
"@pikku/inspector": "^0.12.20",
|
|
33
34
|
"@pikku/kysely": "^0.12.14",
|
|
34
35
|
"@pikku/kysely-node-sqlite": "^0.12.1",
|
|
35
36
|
"@pikku/node-http-server": "^0.12.2",
|