@pikku/cli 0.12.125 → 0.12.126
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/CHANGELOG.md +166 -0
- package/dist/.pikku/addon/index.d.ts +1 -1
- package/dist/.pikku/addon/index.js +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/pikku-addon-types.gen.js +1 -1
- package/dist/.pikku/agent/index.d.ts +1 -1
- package/dist/.pikku/agent/index.js +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
- package/dist/.pikku/agent/pikku-model-aliases.gen.js +1 -1
- package/dist/.pikku/auth/index.d.ts +1 -1
- package/dist/.pikku/auth/index.js +1 -1
- package/dist/.pikku/auth/pikku-auth-types.gen.d.ts +1 -1
- package/dist/.pikku/auth/pikku-auth-types.gen.js +1 -1
- package/dist/.pikku/channel/index.d.ts +1 -1
- package/dist/.pikku/channel/index.js +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/index.d.ts +1 -1
- package/dist/.pikku/cli/index.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.js +6 -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-meta.gen.json +13 -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/error/index.d.ts +1 -1
- package/dist/.pikku/error/index.js +1 -1
- package/dist/.pikku/error/pikku-error-types.gen.d.ts +1 -1
- package/dist/.pikku/error/pikku-error-types.gen.js +1 -1
- package/dist/.pikku/function/index.d.ts +1 -1
- package/dist/.pikku/function/index.js +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 +35 -18
- package/dist/.pikku/function/pikku-functions.gen.js +1 -1
- package/dist/.pikku/gateway/index.d.ts +1 -1
- package/dist/.pikku/gateway/index.js +1 -1
- package/dist/.pikku/gateway/pikku-gateway-types.gen.d.ts +1 -1
- package/dist/.pikku/gateway/pikku-gateway-types.gen.js +1 -1
- package/dist/.pikku/http/index.d.ts +1 -1
- package/dist/.pikku/http/index.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/mcp/index.d.ts +1 -1
- package/dist/.pikku/mcp/index.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/middleware/index.d.ts +1 -1
- package/dist/.pikku/middleware/index.js +1 -1
- package/dist/.pikku/middleware/pikku-middleware-types.gen.d.ts +1 -1
- package/dist/.pikku/middleware/pikku-middleware-types.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap-scenarios.gen.d.ts +1 -1
- package/dist/.pikku/pikku-bootstrap-scenarios.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-services.gen.d.ts +1 -1
- package/dist/.pikku/queue/index.d.ts +1 -1
- package/dist/.pikku/queue/index.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 +1 -0
- package/dist/.pikku/scenarios/index.d.ts +1 -1
- package/dist/.pikku/scenarios/index.js +1 -1
- package/dist/.pikku/scenarios/pikku-personas.gen.js +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions-meta.gen.js +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-types.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-wirings-meta.gen.js +1 -1
- package/dist/.pikku/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/schemas/register.gen.d.ts +1 -1
- package/dist/.pikku/scenarios/schemas/register.gen.js +1 -1
- package/dist/.pikku/scheduler/index.d.ts +1 -1
- package/dist/.pikku/scheduler/index.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 +3 -1
- package/dist/.pikku/schemas/schemas/FabricSecretsListInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/FabricSecretsRotateInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/FabricSecretsSetInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/FabricVariablesGetInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/FabricVariablesSetInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PersonaSecretInput.schema.json +1 -0
- package/dist/.pikku/scopes/index.d.ts +1 -1
- package/dist/.pikku/scopes/index.js +1 -1
- package/dist/.pikku/scopes/pikku-personas.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-roles.gen.d.ts +1 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.d.ts +1 -1
- package/dist/.pikku/scopes/pikku-scope-types.gen.js +1 -1
- package/dist/.pikku/scopes/pikku-scopes.gen.d.ts +1 -1
- package/dist/.pikku/secrets/index.d.ts +1 -1
- package/dist/.pikku/secrets/index.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/services/pikku-meta-service.gen.d.ts +1 -1
- package/dist/.pikku/services/pikku-meta-service.gen.js +1 -1
- package/dist/.pikku/setup/index.d.ts +1 -1
- package/dist/.pikku/setup/index.js +1 -1
- package/dist/.pikku/setup/pikku-setup-types.gen.d.ts +1 -1
- package/dist/.pikku/setup/pikku-setup-types.gen.js +1 -1
- package/dist/.pikku/trigger/index.d.ts +1 -1
- package/dist/.pikku/trigger/index.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/index.d.ts +1 -1
- package/dist/.pikku/variables/index.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/index.d.ts +1 -1
- package/dist/.pikku/workflow/index.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 +6 -1
- package/dist/src/deploy/bundler/bun-bundler.js +12 -5
- package/dist/src/fabric/fabric-commands.d.ts +15 -15
- package/dist/src/fabric/functions/deploy.function.js +12 -2
- package/dist/src/fabric/functions/secrets-list.function.d.ts +4 -4
- package/dist/src/fabric/functions/secrets-list.function.js +4 -4
- package/dist/src/fabric/functions/secrets-rotate.function.d.ts +4 -4
- package/dist/src/fabric/functions/secrets-rotate.function.js +8 -5
- package/dist/src/fabric/functions/secrets-set.function.d.ts +4 -4
- package/dist/src/fabric/functions/secrets-set.function.js +4 -4
- package/dist/src/fabric/functions/validate.function.js +49 -24
- package/dist/src/fabric/functions/variables-get.function.d.ts +4 -4
- package/dist/src/fabric/functions/variables-get.function.js +4 -4
- package/dist/src/fabric/functions/variables-set.function.d.ts +4 -4
- package/dist/src/fabric/functions/variables-set.function.js +4 -4
- package/dist/src/fabric/lib/blank-comments.d.ts +21 -0
- package/dist/src/fabric/lib/blank-comments.js +71 -0
- package/dist/src/fabric/lib/blank-scenario-meta.d.ts +1 -0
- package/dist/src/fabric/lib/blank-scenario-meta.js +110 -0
- package/dist/src/fabric/lib/deployment.d.ts +26 -0
- package/dist/src/fabric/lib/deployment.js +35 -0
- package/dist/src/fabric/lib/stage.d.ts +19 -3
- package/dist/src/fabric/lib/stage.js +29 -6
- package/dist/src/functions/commands/db-reset.js +6 -2
- package/dist/src/functions/commands/dev.js +5 -1
- package/dist/src/functions/commands/persona.d.ts +18 -0
- package/dist/src/functions/commands/persona.js +41 -2
- package/dist/src/functions/commands/scenario-browser.d.ts +13 -5
- package/dist/src/functions/db/check-enums.d.ts +38 -0
- package/dist/src/functions/db/check-enums.js +103 -0
- package/dist/src/functions/db/db-codegen.js +15 -0
- package/dist/src/functions/db/postgres/postgres-introspector.d.ts +14 -0
- package/dist/src/functions/db/postgres/postgres-introspector.js +48 -0
- package/dist/src/functions/db/sqlite/sqlite-introspector.d.ts +3 -4
- package/dist/src/functions/db/sqlite/sqlite-introspector.js +5 -17
- package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.d.ts +9 -6
- package/dist/src/functions/wirings/virtual-user/serialize-virtual-user-functions.js +51 -27
- package/dist/src/server/actor-sign-in.d.ts +24 -1
- package/dist/src/server/actor-sign-in.js +45 -2
- package/dist/src/utils/persona-credentials.d.ts +23 -2
- package/dist/src/utils/persona-credentials.js +55 -2
- package/dist/src/utils/pikku-cli-config.d.ts +4 -4
- package/dist/src/utils/pikku-cli-config.js +30 -10
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/surface.json +101 -51
|
@@ -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.126
|
|
3
3
|
*/
|
|
4
4
|
import { WorkflowCancelledException } from '@pikku/core/workflow';
|
|
5
5
|
import type { PikkuWorkflowGraphConfig, PikkuWorkflowGraphResult } from '@pikku/core/workflow';
|
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.126') {
|
|
15
|
+
process.stderr.write(`\n Update available 0.12.126 → ${latest}\n brew upgrade pikku or npm install -g @pikku/cli\n\n`)
|
|
16
16
|
}
|
|
17
17
|
} catch {}
|
|
18
18
|
}
|
package/dist/src/cli.wiring.js
CHANGED
|
@@ -35,7 +35,7 @@ import { validate, renderValidate } from './functions/commands/validate.js';
|
|
|
35
35
|
import { knowledgeValidate, renderKnowledgeValidate, } from './functions/commands/knowledge-validate.js';
|
|
36
36
|
import { knowledgeIndex, renderKnowledgeIndex, } from './functions/commands/knowledge-index.js';
|
|
37
37
|
import { scenarioRun, scenarioList } from './functions/commands/scenario.js';
|
|
38
|
-
import { personaList, personaRun } from './functions/commands/persona.js';
|
|
38
|
+
import { personaList, personaRun, personaSecret, } from './functions/commands/persona.js';
|
|
39
39
|
import { personaSync } from './functions/commands/persona-sync.js';
|
|
40
40
|
import { pikkuVersionsInit } from './functions/commands/versions-init.js';
|
|
41
41
|
import { pikkuEmailsInit } from './functions/commands/emails-init.js';
|
|
@@ -642,6 +642,11 @@ wireCLI({
|
|
|
642
642
|
func: personaList,
|
|
643
643
|
description: 'List the declared personas — who each one is, what they may do, and what they are trying to get done',
|
|
644
644
|
}),
|
|
645
|
+
secret: pikkuCLICommand({
|
|
646
|
+
func: personaSecret,
|
|
647
|
+
description: 'Mint the actor credential for a persona from SCENARIO_ACTOR_SECRET, bound to their address. Hand these to a run as PIKKU_PERSONA_SECRETS instead of the root, which is entitled to every persona. Names none, mints all.',
|
|
648
|
+
parameters: '[personas...]',
|
|
649
|
+
}),
|
|
645
650
|
},
|
|
646
651
|
},
|
|
647
652
|
fabric: {
|
|
@@ -96,11 +96,18 @@ export class BunBundler extends BaseBundler {
|
|
|
96
96
|
entrypoints: [input.entryPath],
|
|
97
97
|
target: input.platform === 'node' ? 'node' : 'browser',
|
|
98
98
|
format: input.format === 'cjs' ? 'cjs' : 'esm',
|
|
99
|
-
//
|
|
100
|
-
//
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
|
|
99
|
+
// keepNames matches the esbuild bundler, which has always set it. The
|
|
100
|
+
// error→status mapping survives renaming either way — it compares a
|
|
101
|
+
// class against an instance of the SAME consistently-renamed class —
|
|
102
|
+
// but `Function.name` reaches further than that: it is the name every
|
|
103
|
+
// error answers with on the wire, the one an unregistered error is
|
|
104
|
+
// matched by, and what appears in a stack trace someone has to read.
|
|
105
|
+
minify: {
|
|
106
|
+
whitespace: true,
|
|
107
|
+
syntax: true,
|
|
108
|
+
identifiers: true,
|
|
109
|
+
keepNames: true,
|
|
110
|
+
},
|
|
104
111
|
sourcemap: input.sourcemap ? 'external' : 'none',
|
|
105
112
|
define: input.define,
|
|
106
113
|
banner: input.bannerJs,
|
|
@@ -563,7 +563,7 @@ export declare const fabricCommands: {
|
|
|
563
563
|
subcommands: {
|
|
564
564
|
set: import("@pikku/core/cli").CoreCLICommandConfig<import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
|
|
565
565
|
name: string;
|
|
566
|
-
branch
|
|
566
|
+
branch?: string | undefined;
|
|
567
567
|
value?: string | undefined;
|
|
568
568
|
force?: boolean | undefined;
|
|
569
569
|
}, {
|
|
@@ -571,7 +571,7 @@ export declare const fabricCommands: {
|
|
|
571
571
|
keyId: string;
|
|
572
572
|
}, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
|
|
573
573
|
name: string;
|
|
574
|
-
branch
|
|
574
|
+
branch?: string | undefined;
|
|
575
575
|
value?: string | undefined;
|
|
576
576
|
force?: boolean | undefined;
|
|
577
577
|
}, {
|
|
@@ -579,7 +579,7 @@ export declare const fabricCommands: {
|
|
|
579
579
|
keyId: string;
|
|
580
580
|
}, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
|
|
581
581
|
name: string;
|
|
582
|
-
branch
|
|
582
|
+
branch?: string | undefined;
|
|
583
583
|
value?: string | undefined;
|
|
584
584
|
force?: boolean | undefined;
|
|
585
585
|
}, {
|
|
@@ -587,7 +587,7 @@ export declare const fabricCommands: {
|
|
|
587
587
|
keyId: string;
|
|
588
588
|
}, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices>, undefined, undefined>, import("../../.pikku/middleware/pikku-middleware-types.gen.js").PikkuMiddleware, (services: import("../../types/application-types.js").SingletonServices, data: any, session?: import("../../types/application-types.js").UserSession | undefined) => void | Promise<void>, string>;
|
|
589
589
|
list: import("@pikku/core/cli").CoreCLICommandConfig<import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
|
|
590
|
-
branch
|
|
590
|
+
branch?: string | undefined;
|
|
591
591
|
json?: boolean | undefined;
|
|
592
592
|
}, {
|
|
593
593
|
secrets: {
|
|
@@ -595,7 +595,7 @@ export declare const fabricCommands: {
|
|
|
595
595
|
updatedAt: string;
|
|
596
596
|
}[];
|
|
597
597
|
}, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
|
|
598
|
-
branch
|
|
598
|
+
branch?: string | undefined;
|
|
599
599
|
json?: boolean | undefined;
|
|
600
600
|
}, {
|
|
601
601
|
secrets: {
|
|
@@ -603,7 +603,7 @@ export declare const fabricCommands: {
|
|
|
603
603
|
updatedAt: string;
|
|
604
604
|
}[];
|
|
605
605
|
}, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
|
|
606
|
-
branch
|
|
606
|
+
branch?: string | undefined;
|
|
607
607
|
json?: boolean | undefined;
|
|
608
608
|
}, {
|
|
609
609
|
secrets: {
|
|
@@ -612,17 +612,17 @@ export declare const fabricCommands: {
|
|
|
612
612
|
}[];
|
|
613
613
|
}, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices>, undefined, undefined>, import("../../.pikku/middleware/pikku-middleware-types.gen.js").PikkuMiddleware, (services: import("../../types/application-types.js").SingletonServices, data: any, session?: import("../../types/application-types.js").UserSession | undefined) => void | Promise<void>, string>;
|
|
614
614
|
rotate: import("@pikku/core/cli").CoreCLICommandConfig<import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
|
|
615
|
-
branch
|
|
615
|
+
branch?: string | undefined;
|
|
616
616
|
force?: boolean | undefined;
|
|
617
617
|
}, {
|
|
618
618
|
retiredKeyId: string | null;
|
|
619
619
|
}, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
|
|
620
|
-
branch
|
|
620
|
+
branch?: string | undefined;
|
|
621
621
|
force?: boolean | undefined;
|
|
622
622
|
}, {
|
|
623
623
|
retiredKeyId: string | null;
|
|
624
624
|
}, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
|
|
625
|
-
branch
|
|
625
|
+
branch?: string | undefined;
|
|
626
626
|
force?: boolean | undefined;
|
|
627
627
|
}, {
|
|
628
628
|
retiredKeyId: string | null;
|
|
@@ -634,29 +634,29 @@ export declare const fabricCommands: {
|
|
|
634
634
|
subcommands: {
|
|
635
635
|
set: import("@pikku/core/cli").CoreCLICommandConfig<import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
|
|
636
636
|
name: string;
|
|
637
|
-
branch: string;
|
|
638
637
|
value: string;
|
|
638
|
+
branch?: string | undefined;
|
|
639
639
|
}, {
|
|
640
640
|
name: string;
|
|
641
641
|
success: boolean;
|
|
642
642
|
}, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
|
|
643
643
|
name: string;
|
|
644
|
-
branch: string;
|
|
645
644
|
value: string;
|
|
645
|
+
branch?: string | undefined;
|
|
646
646
|
}, {
|
|
647
647
|
name: string;
|
|
648
648
|
success: boolean;
|
|
649
649
|
}, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
|
|
650
650
|
name: string;
|
|
651
|
-
branch: string;
|
|
652
651
|
value: string;
|
|
652
|
+
branch?: string | undefined;
|
|
653
653
|
}, {
|
|
654
654
|
name: string;
|
|
655
655
|
success: boolean;
|
|
656
656
|
}, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices>, undefined, undefined>, import("../../.pikku/middleware/pikku-middleware-types.gen.js").PikkuMiddleware, (services: import("../../types/application-types.js").SingletonServices, data: any, session?: import("../../types/application-types.js").UserSession | undefined) => void | Promise<void>, string>;
|
|
657
657
|
get: import("@pikku/core/cli").CoreCLICommandConfig<import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
|
|
658
658
|
name: string;
|
|
659
|
-
branch
|
|
659
|
+
branch?: string | undefined;
|
|
660
660
|
json?: boolean | undefined;
|
|
661
661
|
}, {
|
|
662
662
|
name: string;
|
|
@@ -664,7 +664,7 @@ export declare const fabricCommands: {
|
|
|
664
664
|
value: unknown;
|
|
665
665
|
}, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
|
|
666
666
|
name: string;
|
|
667
|
-
branch
|
|
667
|
+
branch?: string | undefined;
|
|
668
668
|
json?: boolean | undefined;
|
|
669
669
|
}, {
|
|
670
670
|
name: string;
|
|
@@ -672,7 +672,7 @@ export declare const fabricCommands: {
|
|
|
672
672
|
value: unknown;
|
|
673
673
|
}, "rpc" | "session", import("../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
|
|
674
674
|
name: string;
|
|
675
|
-
branch
|
|
675
|
+
branch?: string | undefined;
|
|
676
676
|
json?: boolean | undefined;
|
|
677
677
|
}, {
|
|
678
678
|
name: string;
|
|
@@ -5,7 +5,7 @@ import { getFabricRPC } from '../lib/http.js';
|
|
|
5
5
|
import { assertNamedBranchDeploySafety, resolveRef } from '../lib/git.js';
|
|
6
6
|
import { promptConfirm } from '../lib/prompt.js';
|
|
7
7
|
import { added, changed, removed, dim, table } from '../lib/output.js';
|
|
8
|
-
import { blockedReason, blockedSummary, missingConfigHints, changesAreEmpty, classifyStatus, describeDeployment, destructiveMigrations, isApprovable, readDeploymentStatus, readWorkers, stateLabel, waitForDeployment, } from '../lib/deployment.js';
|
|
8
|
+
import { blockedReason, blockedSummary, missingConfigHints, changesAreEmpty, classifyStatus, describeDeployment, destructiveMigrations, isApprovable, readDeploymentStatus, readWorkers, reconcileDeployedRef, stateLabel, waitForDeployment, } from '../lib/deployment.js';
|
|
9
9
|
const DEFAULT_TIMEOUT_SECONDS = 900;
|
|
10
10
|
export const FabricDeployInput = z.object({
|
|
11
11
|
branch: z.string().optional(),
|
|
@@ -181,7 +181,17 @@ export const FabricDeployApply = pikkuSessionlessFunc({
|
|
|
181
181
|
deploymentId = created.deploymentId;
|
|
182
182
|
stageId = created.stageId;
|
|
183
183
|
runId = created.runId;
|
|
184
|
-
|
|
184
|
+
// Read the commit back off the deployment rather than repeating the one
|
|
185
|
+
// that was asked for: `deployByStageKind` attaches to an already-parked
|
|
186
|
+
// plan for the branch instead of cutting a new one, and that plan is
|
|
187
|
+
// pinned to whatever commit it was created at.
|
|
188
|
+
ref = reconcileDeployedRef({
|
|
189
|
+
requested: resolved,
|
|
190
|
+
actual: (await describeDeployment(rpc, projectId, deploymentId))?.gitSha ??
|
|
191
|
+
null,
|
|
192
|
+
deploymentId,
|
|
193
|
+
});
|
|
194
|
+
emit({ event: 'created', deploymentId, branch, ref });
|
|
185
195
|
}
|
|
186
196
|
const base = {
|
|
187
197
|
event: 'result',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const FabricSecretsListInput: z.ZodObject<{
|
|
3
|
-
branch: z.ZodString
|
|
3
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
4
4
|
json: z.ZodOptional<z.ZodBoolean>;
|
|
5
5
|
}, z.core.$strip>;
|
|
6
6
|
export declare const FabricSecretsListOutput: z.ZodObject<{
|
|
@@ -10,7 +10,7 @@ export declare const FabricSecretsListOutput: z.ZodObject<{
|
|
|
10
10
|
}, z.core.$strip>>;
|
|
11
11
|
}, z.core.$strip>;
|
|
12
12
|
export declare const FabricSecretsList: import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
|
|
13
|
-
branch
|
|
13
|
+
branch?: string | undefined;
|
|
14
14
|
json?: boolean | undefined;
|
|
15
15
|
}, {
|
|
16
16
|
secrets: {
|
|
@@ -18,7 +18,7 @@ export declare const FabricSecretsList: import("../../../.pikku/function/pikku-f
|
|
|
18
18
|
updatedAt: string;
|
|
19
19
|
}[];
|
|
20
20
|
}, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
|
|
21
|
-
branch
|
|
21
|
+
branch?: string | undefined;
|
|
22
22
|
json?: boolean | undefined;
|
|
23
23
|
}, {
|
|
24
24
|
secrets: {
|
|
@@ -26,7 +26,7 @@ export declare const FabricSecretsList: import("../../../.pikku/function/pikku-f
|
|
|
26
26
|
updatedAt: string;
|
|
27
27
|
}[];
|
|
28
28
|
}, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
|
|
29
|
-
branch
|
|
29
|
+
branch?: string | undefined;
|
|
30
30
|
json?: boolean | undefined;
|
|
31
31
|
}, {
|
|
32
32
|
secrets: {
|
|
@@ -2,9 +2,9 @@ import { z } from 'zod';
|
|
|
2
2
|
import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
|
|
3
3
|
import { resolveApiContext } from '../lib/config.js';
|
|
4
4
|
import { getFabricRPC } from '../lib/http.js';
|
|
5
|
-
import {
|
|
5
|
+
import { resolveStage } from '../lib/stage.js';
|
|
6
6
|
export const FabricSecretsListInput = z.object({
|
|
7
|
-
branch: z.string(),
|
|
7
|
+
branch: z.string().optional(),
|
|
8
8
|
json: z.boolean().optional(),
|
|
9
9
|
});
|
|
10
10
|
export const FabricSecretsListOutput = z.object({
|
|
@@ -14,14 +14,14 @@ export const FabricSecretsList = pikkuSessionlessFunc({
|
|
|
14
14
|
description: 'List the secrets set on a stage, by name. Values are sealed to the stage and never leave it.',
|
|
15
15
|
input: FabricSecretsListInput,
|
|
16
16
|
output: FabricSecretsListOutput,
|
|
17
|
-
func: async (_services, { branch, json }) => {
|
|
17
|
+
func: async (_services, { branch: requested, json }) => {
|
|
18
18
|
const ctx = await resolveApiContext();
|
|
19
19
|
if (!ctx.token)
|
|
20
20
|
throw new Error('Not logged in. Run `pikku fabric login` first.');
|
|
21
21
|
if (!ctx.projectId)
|
|
22
22
|
throw new Error('No fabric project linked. Run `pikku fabric link` first.');
|
|
23
23
|
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
24
|
-
const stageId = await
|
|
24
|
+
const { stageId, branch } = await resolveStage(rpc, ctx.projectId, requested);
|
|
25
25
|
const result = await rpc.invoke('listStageSecretNames', { stageId });
|
|
26
26
|
if (json) {
|
|
27
27
|
console.log(JSON.stringify({ branch, secrets: result.secrets }, null, 2));
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const FabricSecretsRotateInput: z.ZodObject<{
|
|
3
|
-
branch: z.ZodString
|
|
3
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
4
4
|
force: z.ZodOptional<z.ZodBoolean>;
|
|
5
5
|
}, z.core.$strip>;
|
|
6
6
|
export declare const FabricSecretsRotateOutput: z.ZodObject<{
|
|
7
7
|
retiredKeyId: z.ZodNullable<z.ZodString>;
|
|
8
8
|
}, z.core.$strip>;
|
|
9
9
|
export declare const FabricSecretsRotate: import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
|
|
10
|
-
branch
|
|
10
|
+
branch?: string | undefined;
|
|
11
11
|
force?: boolean | undefined;
|
|
12
12
|
}, {
|
|
13
13
|
retiredKeyId: string | null;
|
|
14
14
|
}, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
|
|
15
|
-
branch
|
|
15
|
+
branch?: string | undefined;
|
|
16
16
|
force?: boolean | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
retiredKeyId: string | null;
|
|
19
19
|
}, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
|
|
20
|
-
branch
|
|
20
|
+
branch?: string | undefined;
|
|
21
21
|
force?: boolean | undefined;
|
|
22
22
|
}, {
|
|
23
23
|
retiredKeyId: string | null;
|
|
@@ -2,9 +2,9 @@ import { z } from 'zod';
|
|
|
2
2
|
import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
|
|
3
3
|
import { resolveApiContext } from '../lib/config.js';
|
|
4
4
|
import { getFabricRPC } from '../lib/http.js';
|
|
5
|
-
import {
|
|
5
|
+
import { resolveStage } from '../lib/stage.js';
|
|
6
6
|
export const FabricSecretsRotateInput = z.object({
|
|
7
|
-
branch: z.string(),
|
|
7
|
+
branch: z.string().optional(),
|
|
8
8
|
force: z.boolean().optional(),
|
|
9
9
|
});
|
|
10
10
|
export const FabricSecretsRotateOutput = z.object({
|
|
@@ -14,20 +14,23 @@ export const FabricSecretsRotate = pikkuSessionlessFunc({
|
|
|
14
14
|
description: "Retire a stage's sealing key so the next deploy issues a new one. Secrets sealed to the old key must be set again.",
|
|
15
15
|
input: FabricSecretsRotateInput,
|
|
16
16
|
output: FabricSecretsRotateOutput,
|
|
17
|
-
func: async (_services, { branch, force }) => {
|
|
17
|
+
func: async (_services, { branch: requested, force }) => {
|
|
18
18
|
const ctx = await resolveApiContext();
|
|
19
19
|
if (!ctx.token)
|
|
20
20
|
throw new Error('Not logged in. Run `pikku fabric login` first.');
|
|
21
21
|
if (!ctx.projectId)
|
|
22
22
|
throw new Error('No fabric project linked. Run `pikku fabric link` first.');
|
|
23
|
+
// Resolved before the refusal, so the one message standing between a
|
|
24
|
+
// typo and unreadable secrets names the stage that would actually be
|
|
25
|
+
// rotated rather than echoing an argument that may not have been passed.
|
|
26
|
+
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
27
|
+
const { stageId, branch } = await resolveStage(rpc, ctx.projectId, requested);
|
|
23
28
|
if (!force) {
|
|
24
29
|
// Not a confirmation for politeness — this is the one operation here
|
|
25
30
|
// that destroys access to data. Fabric cannot read the sealed values, so
|
|
26
31
|
// it cannot carry them over, and nobody can undo it afterwards.
|
|
27
32
|
throw new Error(`Rotating the sealing key on ${branch} makes every secret already set on it unreadable — fabric cannot re-seal values it cannot open, so each one must be set again after the next deploy. Re-run with --force if that is what you want.`);
|
|
28
33
|
}
|
|
29
|
-
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
30
|
-
const stageId = await resolveStageId(rpc, ctx.projectId, branch);
|
|
31
34
|
const result = await rpc.invoke('rotateStageSealingKey', { stageId });
|
|
32
35
|
console.log(`[fabric] retired sealing key ${result.retiredKeyId} on ${branch}`);
|
|
33
36
|
console.log('[fabric] deploy the stage to issue a new key, then set its secrets again');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const FabricSecretsSetInput: z.ZodObject<{
|
|
3
3
|
name: z.ZodString;
|
|
4
|
-
branch: z.ZodString
|
|
4
|
+
branch: z.ZodOptional<z.ZodString>;
|
|
5
5
|
value: z.ZodOptional<z.ZodString>;
|
|
6
6
|
force: z.ZodOptional<z.ZodBoolean>;
|
|
7
7
|
}, z.core.$strip>;
|
|
@@ -11,7 +11,7 @@ export declare const FabricSecretsSetOutput: z.ZodObject<{
|
|
|
11
11
|
}, z.core.$strip>;
|
|
12
12
|
export declare const FabricSecretsSet: import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionConfig<{
|
|
13
13
|
name: string;
|
|
14
|
-
branch
|
|
14
|
+
branch?: string | undefined;
|
|
15
15
|
value?: string | undefined;
|
|
16
16
|
force?: boolean | undefined;
|
|
17
17
|
}, {
|
|
@@ -19,7 +19,7 @@ export declare const FabricSecretsSet: import("../../../.pikku/function/pikku-fu
|
|
|
19
19
|
keyId: string;
|
|
20
20
|
}, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunctionSessionless<{
|
|
21
21
|
name: string;
|
|
22
|
-
branch
|
|
22
|
+
branch?: string | undefined;
|
|
23
23
|
value?: string | undefined;
|
|
24
24
|
force?: boolean | undefined;
|
|
25
25
|
}, {
|
|
@@ -27,7 +27,7 @@ export declare const FabricSecretsSet: import("../../../.pikku/function/pikku-fu
|
|
|
27
27
|
keyId: string;
|
|
28
28
|
}, "rpc" | "session", import("../../../.pikku/function/pikku-function-types.gen.js").WiredServices, unknown> | import("../../../.pikku/function/pikku-function-types.gen.js").PikkuFunction<{
|
|
29
29
|
name: string;
|
|
30
|
-
branch
|
|
30
|
+
branch?: string | undefined;
|
|
31
31
|
value?: string | undefined;
|
|
32
32
|
force?: boolean | undefined;
|
|
33
33
|
}, {
|
|
@@ -3,11 +3,11 @@ import { pikkuSessionlessFunc } from '../../../.pikku/function/index.js';
|
|
|
3
3
|
import { resolveApiContext } from '../lib/config.js';
|
|
4
4
|
import { getFabricRPC } from '../lib/http.js';
|
|
5
5
|
import { promptSecret } from '../lib/prompt.js';
|
|
6
|
-
import {
|
|
6
|
+
import { resolveStage } from '../lib/stage.js';
|
|
7
7
|
import { seal, serializeSealedValue } from '../lib/sealed-box.js';
|
|
8
8
|
export const FabricSecretsSetInput = z.object({
|
|
9
9
|
name: z.string(),
|
|
10
|
-
branch: z.string(),
|
|
10
|
+
branch: z.string().optional(),
|
|
11
11
|
value: z.string().optional(),
|
|
12
12
|
force: z.boolean().optional(),
|
|
13
13
|
});
|
|
@@ -19,7 +19,7 @@ export const FabricSecretsSet = pikkuSessionlessFunc({
|
|
|
19
19
|
description: 'Set a stage-scoped secret. Sealed here to the stage public key — the plaintext never leaves this machine.',
|
|
20
20
|
input: FabricSecretsSetInput,
|
|
21
21
|
output: FabricSecretsSetOutput,
|
|
22
|
-
func: async (_services, { name, branch, value }) => {
|
|
22
|
+
func: async (_services, { name, branch: requested, value }) => {
|
|
23
23
|
const ctx = await resolveApiContext();
|
|
24
24
|
if (!ctx.token)
|
|
25
25
|
throw new Error('Not logged in. Run `pikku fabric login` first.');
|
|
@@ -29,7 +29,7 @@ export const FabricSecretsSet = pikkuSessionlessFunc({
|
|
|
29
29
|
if (!plaintext)
|
|
30
30
|
throw new Error('Empty secret value — aborting.');
|
|
31
31
|
const rpc = getFabricRPC({ apiUrl: ctx.apiUrl, token: ctx.token });
|
|
32
|
-
const stageId = await
|
|
32
|
+
const { stageId, branch } = await resolveStage(rpc, ctx.projectId, requested);
|
|
33
33
|
// Fabric holds only the public half of this keypair. The private half went
|
|
34
34
|
// to the stage's worker at deploy time and was dropped there, so the value
|
|
35
35
|
// sealed below can be opened by that worker and by nothing else — including
|