@pikku/cli 0.12.14 → 0.12.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/console-app/android-chrome-192x192.png +0 -0
- package/console-app/android-chrome-512x512.png +0 -0
- package/console-app/apple-touch-icon.png +0 -0
- package/console-app/assets/index-DvrDbftC.css +1 -0
- package/console-app/assets/index-robZPL3O.js +672 -0
- package/console-app/favicon-16x16.png +0 -0
- package/console-app/favicon-32x32.png +0 -0
- package/console-app/favicon.ico +0 -0
- package/console-app/index.html +33 -0
- package/console-app/pikku-console-logo.png +0 -0
- package/console-app/site.webmanifest +19 -0
- package/console-app/wiring-icons/cron.svg +6 -0
- package/console-app/wiring-icons/function.png +0 -0
- package/console-app/wiring-icons/http.svg +2 -0
- package/console-app/wiring-icons/mcp.svg +1 -0
- package/console-app/wiring-icons/queue.svg +18 -0
- package/console-app/wiring-icons/sse.svg +5 -0
- package/console-app/wiring-icons/websocket.svg +8 -0
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
- package/dist/.pikku/agent/pikku-agent-wirings-meta.gen.js +1 -1
- package/dist/.pikku/agent/pikku-agent-wirings.gen.d.ts +1 -1
- package/dist/.pikku/agent/pikku-agent-wirings.gen.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/channel/pikku-channels-meta.gen.js +1 -1
- package/dist/.pikku/channel/pikku-channels.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channels.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.js +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-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 +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +202 -202
- package/dist/.pikku/function/pikku-functions.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings-meta.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.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/pikku-websocket.gen.d.ts +1 -1
- package/dist/.pikku/pikku-websocket.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-remote-rpc-workers.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 +15 -15
- 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/scheduler/pikku-schedulers-wirings-meta.gen.js +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +11 -11
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/src/functions/commands/new-addon.js +2 -3
- package/dist/src/functions/wirings/functions/serialize-addon-types.js +3 -3
- package/dist/src/functions/wirings/package/pikku-command-package.js +13 -1
- package/dist/src/functions/wirings/package/serialize-package.d.ts +7 -1
- package/dist/src/functions/wirings/package/serialize-package.js +5 -2
- package/package.json +2 -2
|
@@ -31,46 +31,46 @@
|
|
|
31
31
|
"pikkuAIAgentTypes": "pikkuAIAgentTypes",
|
|
32
32
|
"pikkuAIAgent": "pikkuAIAgent",
|
|
33
33
|
"pikkuPublicAgent": "pikkuPublicAgent",
|
|
34
|
-
"pikkuCLIEntry": "pikkuCLIEntry",
|
|
35
|
-
"pikkuCLITypes": "pikkuCLITypes",
|
|
36
|
-
"pikkuCLI": "pikkuCLI",
|
|
37
34
|
"pikkuChannels": "pikkuChannels",
|
|
38
35
|
"pikkuChannelTypes": "pikkuChannelTypes",
|
|
39
36
|
"pikkuChannelsMap": "pikkuChannelsMap",
|
|
37
|
+
"pikkuCLIEntry": "pikkuCLIEntry",
|
|
38
|
+
"pikkuCLITypes": "pikkuCLITypes",
|
|
39
|
+
"pikkuCLI": "pikkuCLI",
|
|
40
40
|
"pikkuConsoleFunctions": "pikkuConsoleFunctions",
|
|
41
41
|
"pikkuNodeTypes": "pikkuNodeTypes",
|
|
42
42
|
"pikkuNodesMeta": "pikkuNodesMeta",
|
|
43
43
|
"pikkuCredentials": "pikkuCredentials",
|
|
44
|
-
"
|
|
45
|
-
"pikkuHTTP": "pikkuHTTP",
|
|
46
|
-
"pikkuHTTPTypes": "pikkuHTTPTypes",
|
|
44
|
+
"pikkuGateway": "pikkuGateway",
|
|
47
45
|
"pikkuAddonTypes": "pikkuAddonTypes",
|
|
48
46
|
"pikkuFunctionTypesSplit": "pikkuFunctionTypesSplit",
|
|
49
47
|
"pikkuFunctionTypes": "pikkuFunctionTypes",
|
|
50
48
|
"pikkuFunctions": "pikkuFunctions",
|
|
51
49
|
"pikkuServices": "pikkuServices",
|
|
50
|
+
"pikkuHTTPMap": "pikkuHTTPMap",
|
|
51
|
+
"pikkuHTTP": "pikkuHTTP",
|
|
52
|
+
"pikkuHTTPTypes": "pikkuHTTPTypes",
|
|
53
|
+
"pikkuMCPJSON": "pikkuMCPJSON",
|
|
54
|
+
"pikkuMCPTypes": "pikkuMCPTypes",
|
|
55
|
+
"pikkuMCP": "pikkuMCP",
|
|
52
56
|
"pikkuMiddleware": "pikkuMiddleware",
|
|
53
|
-
"pikkuGateway": "pikkuGateway",
|
|
54
57
|
"pikkuSecretDefinitionTypes": "pikkuSecretDefinitionTypes",
|
|
55
58
|
"pikkuVariableDefinitionTypes": "pikkuVariableDefinitionTypes",
|
|
56
59
|
"pikkuPackage": "pikkuPackage",
|
|
57
60
|
"pikkuPermissions": "pikkuPermissions",
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
+
"pikkuQueueMap": "pikkuQueueMap",
|
|
62
|
+
"pikkuQueueTypes": "pikkuQueueTypes",
|
|
63
|
+
"pikkuQueue": "pikkuQueue",
|
|
61
64
|
"pikkuPublicRPC": "pikkuPublicRPC",
|
|
62
65
|
"pikkuRemoteRPC": "pikkuRemoteRPC",
|
|
63
66
|
"pikkuRPCInternalMap": "pikkuRPCInternalMap",
|
|
64
67
|
"pikkuRPCExposedMap": "pikkuRPCExposedMap",
|
|
65
68
|
"pikkuRPC": "pikkuRPC",
|
|
66
|
-
"pikkuQueueMap": "pikkuQueueMap",
|
|
67
|
-
"pikkuQueueTypes": "pikkuQueueTypes",
|
|
68
|
-
"pikkuQueue": "pikkuQueue",
|
|
69
69
|
"pikkuSchedulerTypes": "pikkuSchedulerTypes",
|
|
70
70
|
"pikkuScheduler": "pikkuScheduler",
|
|
71
|
-
"
|
|
71
|
+
"pikkuSecrets": "pikkuSecrets",
|
|
72
72
|
"pikkuTriggerTypes": "pikkuTriggerTypes",
|
|
73
73
|
"pikkuTrigger": "pikkuTrigger",
|
|
74
|
-
"
|
|
74
|
+
"pikkuVariables": "pikkuVariables",
|
|
75
75
|
"pikkuWorkflow": "pikkuWorkflow"
|
|
76
76
|
}
|
|
@@ -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.15
|
|
3
3
|
*/
|
|
4
4
|
import { addSchema } from '@pikku/core/schema';
|
|
5
5
|
import * as PikkuSchemasOutput from './schemas/PikkuSchemasOutput.schema.json' with { type: 'json' };
|
|
@@ -26,28 +26,28 @@ import * as PikkuAIAgentOutput from './schemas/PikkuAIAgentOutput.schema.json' w
|
|
|
26
26
|
addSchema('PikkuAIAgentOutput', PikkuAIAgentOutput);
|
|
27
27
|
import * as PikkuPublicAgentOutput from './schemas/PikkuPublicAgentOutput.schema.json' with { type: 'json' };
|
|
28
28
|
addSchema('PikkuPublicAgentOutput', PikkuPublicAgentOutput);
|
|
29
|
+
import * as PikkuChannelsOutput from './schemas/PikkuChannelsOutput.schema.json' with { type: 'json' };
|
|
30
|
+
addSchema('PikkuChannelsOutput', PikkuChannelsOutput);
|
|
29
31
|
import * as PikkuCLIOutput from './schemas/PikkuCLIOutput.schema.json' with { type: 'json' };
|
|
30
32
|
addSchema('PikkuCLIOutput', PikkuCLIOutput);
|
|
31
33
|
import * as PikkuConsoleFunctionsOutput from './schemas/PikkuConsoleFunctionsOutput.schema.json' with { type: 'json' };
|
|
32
34
|
addSchema('PikkuConsoleFunctionsOutput', PikkuConsoleFunctionsOutput);
|
|
33
35
|
import * as PikkuNodesMetaOutput from './schemas/PikkuNodesMetaOutput.schema.json' with { type: 'json' };
|
|
34
36
|
addSchema('PikkuNodesMetaOutput', PikkuNodesMetaOutput);
|
|
35
|
-
import * as
|
|
36
|
-
addSchema('
|
|
37
|
+
import * as PikkuFunctionsOutput from './schemas/PikkuFunctionsOutput.schema.json' with { type: 'json' };
|
|
38
|
+
addSchema('PikkuFunctionsOutput', PikkuFunctionsOutput);
|
|
37
39
|
import * as PikkuGatewayOutput from './schemas/PikkuGatewayOutput.schema.json' with { type: 'json' };
|
|
38
40
|
addSchema('PikkuGatewayOutput', PikkuGatewayOutput);
|
|
39
41
|
import * as PikkuHTTPOutput from './schemas/PikkuHTTPOutput.schema.json' with { type: 'json' };
|
|
40
42
|
addSchema('PikkuHTTPOutput', PikkuHTTPOutput);
|
|
41
43
|
import * as PikkuMCPOutput from './schemas/PikkuMCPOutput.schema.json' with { type: 'json' };
|
|
42
44
|
addSchema('PikkuMCPOutput', PikkuMCPOutput);
|
|
43
|
-
import * as PikkuFunctionsOutput from './schemas/PikkuFunctionsOutput.schema.json' with { type: 'json' };
|
|
44
|
-
addSchema('PikkuFunctionsOutput', PikkuFunctionsOutput);
|
|
45
|
-
import * as PikkuPermissionsOutput from './schemas/PikkuPermissionsOutput.schema.json' with { type: 'json' };
|
|
46
|
-
addSchema('PikkuPermissionsOutput', PikkuPermissionsOutput);
|
|
47
|
-
import * as PikkuMiddlewareOutput from './schemas/PikkuMiddlewareOutput.schema.json' with { type: 'json' };
|
|
48
|
-
addSchema('PikkuMiddlewareOutput', PikkuMiddlewareOutput);
|
|
49
45
|
import * as PikkuPackageOutput from './schemas/PikkuPackageOutput.schema.json' with { type: 'json' };
|
|
50
46
|
addSchema('PikkuPackageOutput', PikkuPackageOutput);
|
|
47
|
+
import * as PikkuMiddlewareOutput from './schemas/PikkuMiddlewareOutput.schema.json' with { type: 'json' };
|
|
48
|
+
addSchema('PikkuMiddlewareOutput', PikkuMiddlewareOutput);
|
|
49
|
+
import * as PikkuPermissionsOutput from './schemas/PikkuPermissionsOutput.schema.json' with { type: 'json' };
|
|
50
|
+
addSchema('PikkuPermissionsOutput', PikkuPermissionsOutput);
|
|
51
51
|
import * as PikkuQueueOutput from './schemas/PikkuQueueOutput.schema.json' with { type: 'json' };
|
|
52
52
|
addSchema('PikkuQueueOutput', PikkuQueueOutput);
|
|
53
53
|
import * as PikkuPublicRPCOutput from './schemas/PikkuPublicRPCOutput.schema.json' with { type: 'json' };
|
|
@@ -58,9 +58,9 @@ import * as PikkuRPCOutput from './schemas/PikkuRPCOutput.schema.json' with { ty
|
|
|
58
58
|
addSchema('PikkuRPCOutput', PikkuRPCOutput);
|
|
59
59
|
import * as PikkuSchedulerOutput from './schemas/PikkuSchedulerOutput.schema.json' with { type: 'json' };
|
|
60
60
|
addSchema('PikkuSchedulerOutput', PikkuSchedulerOutput);
|
|
61
|
-
import * as PikkuTriggerOutput from './schemas/PikkuTriggerOutput.schema.json' with { type: 'json' };
|
|
62
|
-
addSchema('PikkuTriggerOutput', PikkuTriggerOutput);
|
|
63
61
|
import * as PikkuWorkflowOutput from './schemas/PikkuWorkflowOutput.schema.json' with { type: 'json' };
|
|
64
62
|
addSchema('PikkuWorkflowOutput', PikkuWorkflowOutput);
|
|
63
|
+
import * as PikkuTriggerOutput from './schemas/PikkuTriggerOutput.schema.json' with { type: 'json' };
|
|
64
|
+
addSchema('PikkuTriggerOutput', PikkuTriggerOutput);
|
|
65
65
|
import * as PikkuCLIConfig from './schemas/PikkuCLIConfig.schema.json' with { type: 'json' };
|
|
66
66
|
addSchema('PikkuCLIConfig', PikkuCLIConfig);
|
|
@@ -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.15
|
|
3
3
|
*/
|
|
4
4
|
export { wireVariable } from '@pikku/core/variable';
|
|
5
5
|
export type { CoreVariable, VariableDefinitionMeta, VariableDefinitionsMeta } from '@pikku/core/variable';
|
|
@@ -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.15
|
|
3
3
|
*/
|
|
4
4
|
import { WorkflowCancelledException } from '@pikku/core/workflow';
|
|
5
5
|
import { workflow as coreWorkflow, workflowStart as coreWorkflowStart, workflowStatus as coreWorkflowStatus, graphStart as coreGraphStart, } from '@pikku/core/workflow';
|
|
@@ -112,7 +112,7 @@ ${description}
|
|
|
112
112
|
`;
|
|
113
113
|
// src/services.ts
|
|
114
114
|
if (flags.credential && flags.credential !== 'oauth2') {
|
|
115
|
-
// Per-user credential: use createWireServices with wire.
|
|
115
|
+
// Per-user credential: use createWireServices with wire.getCredential()
|
|
116
116
|
const credField = flags.credential === 'bearer' ? 'token' : 'apiKey';
|
|
117
117
|
files['src/services.ts'] =
|
|
118
118
|
`import { ${pascalName}Service } from './${name}-api.service.js'
|
|
@@ -120,8 +120,7 @@ import { pikkuAddonWireServices } from '#pikku'
|
|
|
120
120
|
|
|
121
121
|
export const createWireServices = pikkuAddonWireServices(
|
|
122
122
|
async ({ variables }, wire) => {
|
|
123
|
-
const
|
|
124
|
-
const cred = credentials['${camelName}'] as { ${credField}: string } | undefined
|
|
123
|
+
const cred = await wire.getCredential<{ ${credField}: string }>('${camelName}')
|
|
125
124
|
if (!cred?.${credField}) {
|
|
126
125
|
throw new Error('Missing ${camelName} credential')
|
|
127
126
|
}
|
|
@@ -3,7 +3,7 @@ export const serializeAddonTypes = (singletonServicesTypeImport, singletonServic
|
|
|
3
3
|
* Addon package types for pikkuAddonConfig and pikkuAddonServices
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { CreateConfig } from '@pikku/core'
|
|
6
|
+
import type { CreateConfig, PikkuWire } from '@pikku/core'
|
|
7
7
|
${singletonServicesTypeImport}
|
|
8
8
|
${configTypeImport}
|
|
9
9
|
${requiredServicesTypeImport}
|
|
@@ -93,9 +93,9 @@ export const pikkuAddonServices = <T extends Record<string, any>, ExistingServic
|
|
|
93
93
|
* \`\`\`
|
|
94
94
|
*/
|
|
95
95
|
export const pikkuAddonWireServices = <ExistingServices extends Omit<Partial<SingletonServices>, 'variables' | 'secrets'> & AddonBaseServices>(
|
|
96
|
-
func: (services: ExistingServices, wire:
|
|
96
|
+
func: (services: ExistingServices, wire: PikkuWire) => Promise<Record<string, any>>
|
|
97
97
|
) => {
|
|
98
|
-
return ((services: any, wire:
|
|
98
|
+
return ((services: any, wire: PikkuWire) => {
|
|
99
99
|
const typedVariables = new TypedVariablesService(services.variables)
|
|
100
100
|
const typedSecrets = new TypedSecretService(services.secrets)
|
|
101
101
|
return func({ ...services, variables: typedVariables, secrets: typedSecrets } as ExistingServices, wire)
|
|
@@ -23,6 +23,18 @@ export const pikkuPackage = pikkuSessionlessFunc({
|
|
|
23
23
|
const state = await getInspectorState();
|
|
24
24
|
const { filesAndMethods } = state;
|
|
25
25
|
const { pikkuConfigFactory, singletonServicesFactory, wireServicesFactory, } = filesAndMethods;
|
|
26
|
+
// Build credential metadata for this addon package
|
|
27
|
+
const credentialsMeta = {};
|
|
28
|
+
if (state.credentials?.definitions) {
|
|
29
|
+
for (const def of state.credentials.definitions) {
|
|
30
|
+
credentialsMeta[def.name] = {
|
|
31
|
+
name: def.name,
|
|
32
|
+
displayName: def.displayName ?? def.name,
|
|
33
|
+
type: def.type ?? 'singleton',
|
|
34
|
+
oauth2: !!def.oauth2,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
}
|
|
26
38
|
const content = serializePackageFactories(packageFile, addonName, pikkuConfigFactory
|
|
27
39
|
? {
|
|
28
40
|
file: pikkuConfigFactory.file,
|
|
@@ -38,7 +50,7 @@ export const pikkuPackage = pikkuSessionlessFunc({
|
|
|
38
50
|
file: wireServicesFactory.file,
|
|
39
51
|
variable: wireServicesFactory.variable,
|
|
40
52
|
}
|
|
41
|
-
: undefined, packageMappings);
|
|
53
|
+
: undefined, packageMappings, Object.keys(credentialsMeta).length > 0 ? credentialsMeta : undefined);
|
|
42
54
|
if (!content) {
|
|
43
55
|
logger.info({
|
|
44
56
|
message: 'Skipping package factories - no service factories found',
|
|
@@ -2,4 +2,10 @@ export interface PackageFactoryInfo {
|
|
|
2
2
|
file: string;
|
|
3
3
|
variable: string;
|
|
4
4
|
}
|
|
5
|
-
export
|
|
5
|
+
export interface CredentialMetaForPackage {
|
|
6
|
+
name: string;
|
|
7
|
+
displayName: string;
|
|
8
|
+
type: 'singleton' | 'wire';
|
|
9
|
+
oauth2?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const serializePackageFactories: (outputPath: string, packageName: string, configFactory: PackageFactoryInfo | undefined, singletonServicesFactory: PackageFactoryInfo | undefined, wireServicesFactory: PackageFactoryInfo | undefined, packageMappings?: Record<string, string>, credentialsMeta?: Record<string, CredentialMetaForPackage>) => string | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
|
|
2
|
-
export const serializePackageFactories = (outputPath, packageName, configFactory, singletonServicesFactory, wireServicesFactory, packageMappings = {}) => {
|
|
2
|
+
export const serializePackageFactories = (outputPath, packageName, configFactory, singletonServicesFactory, wireServicesFactory, packageMappings = {}, credentialsMeta) => {
|
|
3
3
|
const imports = [
|
|
4
4
|
`import { pikkuState } from '@pikku/core/internal'`,
|
|
5
5
|
];
|
|
@@ -23,10 +23,13 @@ export const serializePackageFactories = (outputPath, packageName, configFactory
|
|
|
23
23
|
if (factoryEntries.length === 0) {
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
|
+
const credentialsLine = credentialsMeta && Object.keys(credentialsMeta).length > 0
|
|
27
|
+
? `\npikkuState('${packageName}', 'package', 'credentialsMeta', ${JSON.stringify(credentialsMeta)})\n`
|
|
28
|
+
: '';
|
|
26
29
|
return `${imports.join('\n')}
|
|
27
30
|
|
|
28
31
|
pikkuState('${packageName}', 'package', 'factories', {
|
|
29
32
|
${factoryEntries.join('\n')}
|
|
30
33
|
})
|
|
31
|
-
`;
|
|
34
|
+
${credentialsLine}`;
|
|
32
35
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pikku/cli",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.15",
|
|
4
4
|
"author": "yasser.fadl@gmail.com",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"imports": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@openapi-contrib/json-schema-to-openapi-schema": "^4.3.1",
|
|
29
|
-
"@pikku/core": "^0.12.
|
|
29
|
+
"@pikku/core": "^0.12.14",
|
|
30
30
|
"@pikku/inspector": "^0.12.7",
|
|
31
31
|
"@pikku/openapi-parser": "^0.12.9",
|
|
32
32
|
"@types/cookie": "^1.0.0",
|