@pikku/addon-admin 0.12.8 → 0.12.10
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/dist/.pikku/addon/agent/index.d.ts +1 -1
- package/dist/.pikku/addon/agent/index.js +1 -1
- package/dist/.pikku/addon/agent/pikku-agent-map.gen.d.ts +1 -1
- package/dist/.pikku/addon/agent/pikku-agent-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/agent/pikku-model-aliases.gen.js +1 -1
- package/dist/.pikku/addon/agent/pikku-scorer-names.gen.d.ts +1 -1
- package/dist/.pikku/addon/analytics/index.d.ts +1 -1
- package/dist/.pikku/addon/analytics/index.js +1 -1
- package/dist/.pikku/addon/analytics/pikku-analytics-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/analytics/pikku-analytics-types.gen.js +1 -1
- package/dist/.pikku/addon/auth/index.d.ts +1 -1
- package/dist/.pikku/addon/auth/index.js +1 -1
- package/dist/.pikku/addon/auth/pikku-auth-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/auth/pikku-auth-types.gen.js +1 -1
- package/dist/.pikku/addon/channel/index.d.ts +1 -1
- package/dist/.pikku/addon/channel/index.js +1 -1
- package/dist/.pikku/addon/channel/pikku-channel-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/addon/cli/index.d.ts +1 -1
- package/dist/.pikku/addon/cli/index.js +1 -1
- package/dist/.pikku/addon/cli/pikku-cli-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/addon/error/index.d.ts +1 -1
- package/dist/.pikku/addon/error/index.js +1 -1
- package/dist/.pikku/addon/error/pikku-error-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/error/pikku-error-types.gen.js +1 -1
- package/dist/.pikku/addon/function/index.d.ts +1 -1
- package/dist/.pikku/addon/function/index.js +1 -1
- package/dist/.pikku/addon/function/pikku-function-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/function/pikku-function-types.gen.js +1 -1
- package/dist/.pikku/addon/function/pikku-functions-meta-verbose.gen.json +74 -4
- package/dist/.pikku/addon/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/addon/function/pikku-functions-meta.gen.json +59 -3
- package/dist/.pikku/addon/function/pikku-functions.gen.js +5 -1
- package/dist/.pikku/addon/function/pikku-functions.gen.js.map +1 -1
- package/dist/.pikku/addon/http/index.d.ts +1 -1
- package/dist/.pikku/addon/http/index.js +1 -1
- package/dist/.pikku/addon/http/pikku-http-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/addon/mcp/index.d.ts +1 -1
- package/dist/.pikku/addon/mcp/index.js +1 -1
- package/dist/.pikku/addon/mcp/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/addon/middleware/index.d.ts +1 -1
- package/dist/.pikku/addon/middleware/index.js +1 -1
- package/dist/.pikku/addon/middleware/pikku-middleware-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/middleware/pikku-middleware-types.gen.js +1 -1
- package/dist/.pikku/addon/pikku-bootstrap-scenarios.gen.d.ts +1 -1
- package/dist/.pikku/addon/pikku-bootstrap-scenarios.gen.js +1 -1
- package/dist/.pikku/addon/pikku-bootstrap.gen.d.ts +1 -1
- package/dist/.pikku/addon/pikku-bootstrap.gen.js +1 -1
- package/dist/.pikku/addon/pikku-local-services.gen.d.ts +28 -0
- package/dist/.pikku/addon/pikku-local-services.gen.d.ts.map +1 -0
- package/dist/.pikku/addon/pikku-local-services.gen.js +40 -0
- package/dist/.pikku/addon/pikku-local-services.gen.js.map +1 -0
- package/dist/.pikku/addon/pikku-package.gen.js +1 -1
- package/dist/.pikku/addon/pikku-services.gen.d.ts +1 -1
- package/dist/.pikku/addon/rpc/pikku-rpc-wirings-map.gen.d.ts +12 -6
- package/dist/.pikku/addon/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +12 -6
- package/dist/.pikku/addon/rpc/pikku-rpc-wirings-map.remote.gen.d.ts +10 -6
- package/dist/.pikku/addon/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
- package/dist/.pikku/addon/rpc/pikku-rpc-wirings-meta.internal.gen.json +2 -0
- package/dist/.pikku/addon/scenarios/index.d.ts +1 -1
- package/dist/.pikku/addon/scenarios/index.js +1 -1
- package/dist/.pikku/addon/scenarios/pikku-personas.gen.js +1 -1
- package/dist/.pikku/addon/scenarios/pikku-scenario-functions-meta.gen.js +1 -1
- package/dist/.pikku/addon/scenarios/pikku-scenario-functions.gen.d.ts +1 -1
- package/dist/.pikku/addon/scenarios/pikku-scenario-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/scenarios/pikku-scenario-wirings-meta.gen.js +1 -1
- package/dist/.pikku/addon/scenarios/pikku-scenario-wirings.gen.d.ts +1 -1
- package/dist/.pikku/addon/scenarios/schemas/register.gen.d.ts +1 -1
- package/dist/.pikku/addon/scenarios/schemas/register.gen.js +1 -1
- package/dist/.pikku/addon/schemas/register.gen.js +9 -1
- package/dist/.pikku/addon/schemas/register.gen.js.map +1 -1
- package/dist/.pikku/addon/schemas/schemas/TriggerSourceDisableInput.schema.json +1 -0
- package/dist/.pikku/addon/schemas/schemas/TriggerSourceDisableOutput.schema.json +1 -0
- package/dist/.pikku/addon/schemas/schemas/TriggerSourceEnableInput.schema.json +1 -0
- package/dist/.pikku/addon/schemas/schemas/TriggerSourceEnableOutput.schema.json +1 -0
- package/dist/.pikku/addon/schemas/schemas/TriggerSourceListOutput.schema.json +1 -1
- package/dist/.pikku/addon/scopes/index.d.ts +1 -1
- package/dist/.pikku/addon/scopes/index.js +1 -1
- package/dist/.pikku/addon/scopes/pikku-flags.gen.d.ts +1 -1
- package/dist/.pikku/addon/scopes/pikku-personas.gen.js +1 -1
- package/dist/.pikku/addon/scopes/pikku-roles.gen.d.ts +1 -1
- package/dist/.pikku/addon/scopes/pikku-scope-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/scopes/pikku-scope-types.gen.js +1 -1
- package/dist/.pikku/addon/scopes/pikku-scopes.gen.d.ts +1 -1
- package/dist/.pikku/addon/secrets/index.d.ts +1 -1
- package/dist/.pikku/addon/secrets/index.js +1 -1
- package/dist/.pikku/addon/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/addon/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/addon/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/addon/services/pikku-meta-service.gen.d.ts +1 -1
- package/dist/.pikku/addon/services/pikku-meta-service.gen.js +1 -1
- package/dist/.pikku/addon/setup/index.d.ts +1 -1
- package/dist/.pikku/addon/setup/index.js +1 -1
- package/dist/.pikku/addon/setup/pikku-addon-setup-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/setup/pikku-addon-setup-types.gen.js +1 -1
- package/dist/.pikku/addon/setup/pikku-setup-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/setup/pikku-setup-types.gen.js +1 -1
- package/dist/.pikku/addon/trigger/index.d.ts +1 -1
- package/dist/.pikku/addon/trigger/index.js +1 -1
- package/dist/.pikku/addon/trigger/pikku-trigger-types.gen.d.ts +25 -1
- package/dist/.pikku/addon/trigger/pikku-trigger-types.gen.d.ts.map +1 -1
- package/dist/.pikku/addon/trigger/pikku-trigger-types.gen.js +9 -1
- package/dist/.pikku/addon/trigger/pikku-trigger-types.gen.js.map +1 -1
- package/dist/.pikku/addon/variables/index.d.ts +1 -1
- package/dist/.pikku/addon/variables/index.js +1 -1
- package/dist/.pikku/addon/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/addon/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/addon/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/addon/webhooks/pikku-outgoing-webhooks.gen.d.ts +1 -1
- package/dist/.pikku/addon/workflow/index.d.ts +1 -1
- package/dist/.pikku/addon/workflow/index.js +1 -1
- package/dist/.pikku/addon/workflow/pikku-scenario-step-map.gen.d.ts +1 -1
- package/dist/.pikku/addon/workflow/pikku-workflow-map.gen.d.ts +1 -1
- package/dist/.pikku/addon/workflow/pikku-workflow-types.gen.d.ts +1 -1
- package/dist/.pikku/addon/workflow/pikku-workflow-types.gen.js +1 -1
- package/dist/.pikku/addon/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/addon/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
- package/dist/.pikku/addon/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/src/functions/flag-list.function.d.ts.map +1 -1
- package/dist/src/functions/flag-list.function.js +2 -3
- package/dist/src/functions/flag-list.function.js.map +1 -1
- package/dist/src/functions/trigger-source-disable.function.d.ts +21 -0
- package/dist/src/functions/trigger-source-disable.function.d.ts.map +1 -0
- package/dist/src/functions/trigger-source-disable.function.js +12 -0
- package/dist/src/functions/trigger-source-disable.function.js.map +1 -0
- package/dist/src/functions/trigger-source-enable.function.d.ts +21 -0
- package/dist/src/functions/trigger-source-enable.function.d.ts.map +1 -0
- package/dist/src/functions/trigger-source-enable.function.js +12 -0
- package/dist/src/functions/trigger-source-enable.function.js.map +1 -0
- package/dist/src/lib/flag-rows.d.ts +9 -0
- package/dist/src/lib/flag-rows.d.ts.map +1 -1
- package/dist/src/lib/flag-rows.js +23 -0
- package/dist/src/lib/flag-rows.js.map +1 -1
- package/dist/src/lib/flag-rows.test.js +38 -1
- package/dist/src/lib/flag-rows.test.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.173
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Trigger-specific type definitions for tree-shaking optimization
|
|
6
6
|
*/
|
|
7
|
+
import type { CoreTriggerWebhookSource, WebhookRequest, WebhookReceiveResult, WebhookLifecycleInput, WebhookCheckResult, WebhookSetupResult, WebhookTeardownInput, WebhookTeardownResult } from '@pikku/core/trigger';
|
|
7
8
|
import { CorePikkuTriggerFunction, CorePikkuTriggerFunctionConfig } from '@pikku/core/trigger';
|
|
8
9
|
import type { CoreNodeConfig } from '@pikku/core/node';
|
|
9
10
|
import type { SingletonServices } from '../../../types/application-types.d.js';
|
|
@@ -42,6 +43,21 @@ type PikkuTriggerFunctionConfigWithSchema<InputSchema extends StandardSchemaV1,
|
|
|
42
43
|
* Type definition for trigger wirings.
|
|
43
44
|
* Declares a trigger name and its target pikku function.
|
|
44
45
|
*/
|
|
46
|
+
/**
|
|
47
|
+
* One step of a webhook source: inline, a pikku function, or `ref('addon:fn')`.
|
|
48
|
+
*/
|
|
49
|
+
type WebhookSourceStep<In, Out> = {
|
|
50
|
+
func: (services: any, data: In, wire: any) => Promise<Out | void>;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* A webhook source, using project-specific services.
|
|
54
|
+
*/
|
|
55
|
+
type TriggerWebhookSource<Events extends Record<string, StandardSchemaV1>> = Omit<CoreTriggerWebhookSource<Events>, 'receive' | 'check' | 'setup' | 'teardown'> & {
|
|
56
|
+
receive?: WebhookSourceStep<WebhookRequest, WebhookReceiveResult>;
|
|
57
|
+
check?: WebhookSourceStep<WebhookLifecycleInput, WebhookCheckResult>;
|
|
58
|
+
setup?: WebhookSourceStep<WebhookLifecycleInput, WebhookSetupResult>;
|
|
59
|
+
teardown?: WebhookSourceStep<WebhookTeardownInput, WebhookTeardownResult>;
|
|
60
|
+
};
|
|
45
61
|
/**
|
|
46
62
|
* Creates a trigger function configuration.
|
|
47
63
|
* Use this to define trigger functions that set up subscriptions.
|
|
@@ -79,5 +95,13 @@ type PikkuTriggerFunctionConfigWithSchema<InputSchema extends StandardSchemaV1,
|
|
|
79
95
|
*/
|
|
80
96
|
export declare function pikkuTriggerFunc<InputSchema extends StandardSchemaV1, OutputSchema extends StandardSchemaV1 | undefined = undefined>(config: PikkuTriggerFunctionConfigWithSchema<InputSchema, OutputSchema>): PikkuTriggerFunctionConfig<InferSchemaOutput<InputSchema>, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, InputSchema, OutputSchema>;
|
|
81
97
|
export declare function pikkuTriggerFunc<TInput, TOutput = unknown>(triggerOrConfig: PikkuTriggerFunction<TInput, TOutput> | PikkuTriggerFunctionConfig<TInput, TOutput>): PikkuTriggerFunctionConfig<TInput, TOutput>;
|
|
98
|
+
/**
|
|
99
|
+
* Declares a webhook source this addon ships. An app that wires the addon
|
|
100
|
+
* mounts its route and can register it with the provider, but the source
|
|
101
|
+
* stays off until someone turns it on. Declaration only: nothing runs here.
|
|
102
|
+
*
|
|
103
|
+
* @param source - Webhook source with name, events and its steps
|
|
104
|
+
*/
|
|
105
|
+
export declare const wireTriggerWebhookSource: <Events extends Record<string, StandardSchemaV1> = Record<string, StandardSchemaV1>>(_source: TriggerWebhookSource<Events>) => void;
|
|
82
106
|
export {};
|
|
83
107
|
//# sourceMappingURL=pikku-trigger-types.gen.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pikku-trigger-types.gen.d.ts","sourceRoot":"","sources":["../../../../.pikku/addon/trigger/pikku-trigger-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;AAEH,OAAO,EACL,wBAAwB,EACxB,8BAA8B,EAC/B,MAAM,qBAAqB,CAAA;AAC5B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAC9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAI7D;;;;;;GAMG;AACH,KAA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AA;IACjE,KAAK,CAAC,EAAE,iBAAiB,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAAA;IACpE,KAAK,CAAC,EAAE,iBAAiB,CAAC,qBAAqB,EAAE,kBAAkB,CAAC,CAAA;IACpE,QAAQ,CAAC,EAAE,iBAAiB,CAAC,oBAAoB,EAAE,qBAAqB,CAAC,CAAA;CAC1E,CAAA;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,gBAAgB,CAC9B,WAAW,SAAS,gBAAgB,EACpC,YAAY,SAAS,gBAAgB,GAAG,SAAS,GAAG,SAAS,EAE7D,MAAM,EAAE,oCAAoC,CAAC,WAAW,EAAE,YAAY,CAAC,GACtE,0BAA0B,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE,YAAY,SAAS,gBAAgB,GAAG,iBAAiB,CAAC,YAAY,CAAC,GAAG,OAAO,EAAE,WAAW,EAAE,YAAY,CAAC,CAAA;AAC3K,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,EACxD,eAAe,EACX,oBAAoB,CAAC,MAAM,EAAE,OAAO,CAAC,GACrC,0BAA0B,CAAC,MAAM,EAAE,OAAO,CAAC,GAC9C,0BAA0B,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAS9C;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GACnC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,WAEzE,oBAAoB,CAAC,MAAM,CAAC,SAChC,CAAA"}
|
|
@@ -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.173
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Trigger-specific type definitions for tree-shaking optimization
|
|
@@ -10,4 +10,12 @@ export function pikkuTriggerFunc(triggerOrConfig) {
|
|
|
10
10
|
}
|
|
11
11
|
return triggerOrConfig;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Declares a webhook source this addon ships. An app that wires the addon
|
|
15
|
+
* mounts its route and can register it with the provider, but the source
|
|
16
|
+
* stays off until someone turns it on. Declaration only: nothing runs here.
|
|
17
|
+
*
|
|
18
|
+
* @param source - Webhook source with name, events and its steps
|
|
19
|
+
*/
|
|
20
|
+
export const wireTriggerWebhookSource = (_source) => { };
|
|
13
21
|
//# sourceMappingURL=pikku-trigger-types.gen.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pikku-trigger-types.gen.js","sourceRoot":"","sources":["../../../../.pikku/addon/trigger/pikku-trigger-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;
|
|
1
|
+
{"version":3,"file":"pikku-trigger-types.gen.js","sourceRoot":"","sources":["../../../../.pikku/addon/trigger/pikku-trigger-types.gen.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH;;GAEG;AAmIH,MAAM,UAAU,gBAAgB,CAAC,eAAoB;IACnD,IAAI,OAAO,eAAe,KAAK,UAAU,EAAE,CAAC;QAC1C,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,CAAA;IAClC,CAAC;IACD,OAAO,eAAe,CAAA;AACxB,CAAC;AAGD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAGtC,OAAqC,EACrC,EAAE,GAAE,CAAC,CAAA"}
|
|
@@ -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.173
|
|
3
3
|
*/
|
|
4
4
|
import { WorkflowCancelledException } from '@pikku/core/workflow';
|
|
5
5
|
import type { PikkuWorkflowGraphConfig, PikkuWorkflowGraphResult } from '@pikku/core/workflow';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flag-list.function.d.ts","sourceRoot":"","sources":["../../../src/functions/flag-list.function.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,qBAAqB,CAAA;AAE5B,eAAO,MAAM,QAAQ;WAEV,WAAW,EAAE;cAAY,OAAO;;;;;;;
|
|
1
|
+
{"version":3,"file":"flag-list.function.d.ts","sourceRoot":"","sources":["../../../src/functions/flag-list.function.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,WAAW,EACjB,MAAM,qBAAqB,CAAA;AAE5B,eAAO,MAAM,QAAQ;WAEV,WAAW,EAAE;cAAY,OAAO;;;;;;;oGAkCzC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { pikkuFunc } from '#pikku/addon/function';
|
|
2
2
|
import { asFlagStore } from '../lib/flag-store.js';
|
|
3
|
-
import { flagRowsFromSource,
|
|
3
|
+
import { flagRowsFromSource, flagRowsFromStore, } from '../lib/flag-rows.js';
|
|
4
4
|
export const flagList = pikkuFunc({
|
|
5
5
|
title: 'List Feature Flags',
|
|
6
6
|
description: 'Lists every declared feature flag with its rollout, whether it is still declared in code, and whether the backing store holds a row for it.',
|
|
@@ -9,9 +9,8 @@ export const flagList = pikkuFunc({
|
|
|
9
9
|
func: async ({ featureFlags }) => {
|
|
10
10
|
const store = asFlagStore(featureFlags);
|
|
11
11
|
if (store) {
|
|
12
|
-
const flags = await store.listFlags();
|
|
13
12
|
return {
|
|
14
|
-
flags:
|
|
13
|
+
flags: flagRowsFromStore(store.declaredFlags?.() ?? [], await store.listFlags()),
|
|
15
14
|
writable: true,
|
|
16
15
|
};
|
|
17
16
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flag-list.function.js","sourceRoot":"","sources":["../../../src/functions/flag-list.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EACL,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"flag-list.function.js","sourceRoot":"","sources":["../../../src/functions/flag-list.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAClD,OAAO,EACL,kBAAkB,EAClB,iBAAiB,GAElB,MAAM,qBAAqB,CAAA;AAE5B,MAAM,CAAC,MAAM,QAAQ,GAAG,SAAS,CAG/B;IACA,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EACT,6IAA6I;IAC/I,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,CAAC,kBAAkB,CAAC;IAC5B,IAAI,EAAE,KAAK,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE;QAC/B,MAAM,KAAK,GAAG,WAAW,CAAC,YAAY,CAAC,CAAA;QACvC,IAAI,KAAK,EAAE,CAAC;YACV,OAAO;gBACL,KAAK,EAAE,iBAAiB,CACtB,KAAK,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,EAC7B,MAAM,KAAK,CAAC,SAAS,EAAE,CACxB;gBACD,QAAQ,EAAE,IAAI;aACf,CAAA;QACH,CAAC;QAED,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAA;QACvC,CAAC;QAED,4EAA4E;QAC5E,yEAAyE;QACzE,yBAAyB;QACzB,OAAO;YACL,KAAK,EAAE,kBAAkB,CACvB,YAAY,CAAC,aAAa,EAAE,EAAE,IAAI,EAAE,EACpC,MAAM,YAAY,CAAC,QAAQ,EAAE,CAC9B;YACD,QAAQ,EAAE,KAAK;SAChB,CAAA;IACH,CAAC;CACF,CAAC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type WebhookSourceOutcome } from '@pikku/core/trigger';
|
|
2
|
+
export declare const triggerSourceDisable: import("#pikku/addon/function").PikkuFunctionConfig<{
|
|
3
|
+
name: string;
|
|
4
|
+
baseUrl?: string;
|
|
5
|
+
labelPrefix?: string;
|
|
6
|
+
}, {
|
|
7
|
+
outcome: WebhookSourceOutcome;
|
|
8
|
+
}, "rpc" | "session", import("#pikku/addon/function").PikkuFunction<{
|
|
9
|
+
name: string;
|
|
10
|
+
baseUrl?: string;
|
|
11
|
+
labelPrefix?: string;
|
|
12
|
+
}, {
|
|
13
|
+
outcome: WebhookSourceOutcome;
|
|
14
|
+
}, "rpc" | "session", import("#pikku/addon/function").WiredServices> | import("#pikku/addon/function").PikkuFunctionSessionless<{
|
|
15
|
+
name: string;
|
|
16
|
+
baseUrl?: string;
|
|
17
|
+
labelPrefix?: string;
|
|
18
|
+
}, {
|
|
19
|
+
outcome: WebhookSourceOutcome;
|
|
20
|
+
}, "rpc" | "session", import("#pikku/addon/function").WiredServices, unknown>, undefined, undefined>;
|
|
21
|
+
//# sourceMappingURL=trigger-source-disable.function.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trigger-source-disable.function.d.ts","sourceRoot":"","sources":["../../../src/functions/trigger-source-disable.function.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAA;AAE5B,eAAO,MAAM,oBAAoB;UACvB,MAAM;cAAY,MAAM;kBAAgB,MAAM;;aAC3C,oBAAoB;;;;;;;;;;;;;oGAU/B,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { pikkuFunc } from '#pikku/addon/function';
|
|
2
|
+
import { disableTriggerSource, } from '@pikku/core/trigger';
|
|
3
|
+
export const triggerSourceDisable = pikkuFunc({
|
|
4
|
+
title: 'Turn Off a Trigger Source',
|
|
5
|
+
description: 'Stops a trigger source receiving at once, then removes it from its provider.',
|
|
6
|
+
expose: true,
|
|
7
|
+
scopes: ['admin:triggers:manage'],
|
|
8
|
+
func: async (_services, input) => ({
|
|
9
|
+
outcome: await disableTriggerSource(input),
|
|
10
|
+
}),
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=trigger-source-disable.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trigger-source-disable.function.js","sourceRoot":"","sources":["../../../src/functions/trigger-source-disable.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EACL,oBAAoB,GAErB,MAAM,qBAAqB,CAAA;AAE5B,MAAM,CAAC,MAAM,oBAAoB,GAAG,SAAS,CAG3C;IACA,KAAK,EAAE,2BAA2B;IAClC,WAAW,EACT,8EAA8E;IAChF,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,CAAC,uBAAuB,CAAC;IACjC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;QACjC,OAAO,EAAE,MAAM,oBAAoB,CAAC,KAAK,CAAC;KAC3C,CAAC;CACH,CAAC,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { type WebhookSourceOutcome } from '@pikku/core/trigger';
|
|
2
|
+
export declare const triggerSourceEnable: import("#pikku/addon/function").PikkuFunctionConfig<{
|
|
3
|
+
name: string;
|
|
4
|
+
baseUrl?: string;
|
|
5
|
+
labelPrefix?: string;
|
|
6
|
+
}, {
|
|
7
|
+
outcome: WebhookSourceOutcome;
|
|
8
|
+
}, "rpc" | "session", import("#pikku/addon/function").PikkuFunction<{
|
|
9
|
+
name: string;
|
|
10
|
+
baseUrl?: string;
|
|
11
|
+
labelPrefix?: string;
|
|
12
|
+
}, {
|
|
13
|
+
outcome: WebhookSourceOutcome;
|
|
14
|
+
}, "rpc" | "session", import("#pikku/addon/function").WiredServices> | import("#pikku/addon/function").PikkuFunctionSessionless<{
|
|
15
|
+
name: string;
|
|
16
|
+
baseUrl?: string;
|
|
17
|
+
labelPrefix?: string;
|
|
18
|
+
}, {
|
|
19
|
+
outcome: WebhookSourceOutcome;
|
|
20
|
+
}, "rpc" | "session", import("#pikku/addon/function").WiredServices, unknown>, undefined, undefined>;
|
|
21
|
+
//# sourceMappingURL=trigger-source-enable.function.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trigger-source-enable.function.d.ts","sourceRoot":"","sources":["../../../src/functions/trigger-source-enable.function.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAA;AAE5B,eAAO,MAAM,mBAAmB;UACtB,MAAM;cAAY,MAAM;kBAAgB,MAAM;;aAC3C,oBAAoB;;;;;;;;;;;;;oGAU/B,CAAA"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { pikkuFunc } from '#pikku/addon/function';
|
|
2
|
+
import { enableTriggerSource, } from '@pikku/core/trigger';
|
|
3
|
+
export const triggerSourceEnable = pikkuFunc({
|
|
4
|
+
title: 'Turn On a Trigger Source',
|
|
5
|
+
description: 'Turns a declared trigger source on and registers it with its provider, at the address the last deployment recorded unless one is given. Sources are off until turned on here.',
|
|
6
|
+
expose: true,
|
|
7
|
+
scopes: ['admin:triggers:manage'],
|
|
8
|
+
func: async (_services, input) => ({
|
|
9
|
+
outcome: await enableTriggerSource(input),
|
|
10
|
+
}),
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=trigger-source-enable.function.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trigger-source-enable.function.js","sourceRoot":"","sources":["../../../src/functions/trigger-source-enable.function.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EACL,mBAAmB,GAEpB,MAAM,qBAAqB,CAAA;AAE5B,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAS,CAG1C;IACA,KAAK,EAAE,0BAA0B;IACjC,WAAW,EACT,+KAA+K;IACjL,MAAM,EAAE,IAAI;IACZ,MAAM,EAAE,CAAC,uBAAuB,CAAC;IACjC,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;QACjC,OAAO,EAAE,MAAM,mBAAmB,CAAC,KAAK,CAAC;KAC1C,CAAC;CACH,CAAC,CAAA"}
|
|
@@ -19,4 +19,13 @@ export declare const sortFlagRows: (rows: FlagListRow[]) => FlagListRow[];
|
|
|
19
19
|
* operator a switch that changes nothing.
|
|
20
20
|
*/
|
|
21
21
|
export declare const flagRowsFromSource: (declared: readonly DeclaredFlag[], snapshot: FlagConfigSnapshot) => FlagListRow[];
|
|
22
|
+
/**
|
|
23
|
+
* A pikku-owned store's rows, plus every declaration it holds no row for.
|
|
24
|
+
*
|
|
25
|
+
* The rows lead here, unlike a provider: a row whose declaration has gone is
|
|
26
|
+
* still an operator's to prune. A declaration without a row is the case the
|
|
27
|
+
* store alone cannot show — it fails open, so it is listed as live and unbacked
|
|
28
|
+
* rather than left off a board that would otherwise read "no flags".
|
|
29
|
+
*/
|
|
30
|
+
export declare const flagRowsFromStore: (declared: readonly DeclaredFlag[], rows: readonly FlagRow[]) => FlagListRow[];
|
|
22
31
|
//# sourceMappingURL=flag-rows.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flag-rows.d.ts","sourceRoot":"","sources":["../../../src/lib/flag-rows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,CAAA;AAIvD,eAAO,MAAM,YAAY,SAAU,WAAW,EAAE,KAAG,WAAW,EAC3C,CAAA;AAEnB;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,aACnB,SAAS,YAAY,EAAE,YACvB,kBAAkB,KAC3B,WAAW,EAYX,CAAA"}
|
|
1
|
+
{"version":3,"file":"flag-rows.d.ts","sourceRoot":"","sources":["../../../src/lib/flag-rows.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AACxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAEnD;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG;IAAE,MAAM,EAAE,OAAO,CAAA;CAAE,CAAA;AAIvD,eAAO,MAAM,YAAY,SAAU,WAAW,EAAE,KAAG,WAAW,EAC3C,CAAA;AAEnB;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,aACnB,SAAS,YAAY,EAAE,YACvB,kBAAkB,KAC3B,WAAW,EAYX,CAAA;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,aAClB,SAAS,YAAY,EAAE,QAC3B,SAAS,OAAO,EAAE,KACvB,WAAW,EAcb,CAAA"}
|
|
@@ -18,4 +18,27 @@ export const flagRowsFromSource = (declared, snapshot) => sortFlagRows(declared.
|
|
|
18
18
|
backed: row !== undefined,
|
|
19
19
|
};
|
|
20
20
|
}));
|
|
21
|
+
/**
|
|
22
|
+
* A pikku-owned store's rows, plus every declaration it holds no row for.
|
|
23
|
+
*
|
|
24
|
+
* The rows lead here, unlike a provider: a row whose declaration has gone is
|
|
25
|
+
* still an operator's to prune. A declaration without a row is the case the
|
|
26
|
+
* store alone cannot show — it fails open, so it is listed as live and unbacked
|
|
27
|
+
* rather than left off a board that would otherwise read "no flags".
|
|
28
|
+
*/
|
|
29
|
+
export const flagRowsFromStore = (declared, rows) => {
|
|
30
|
+
const stored = new Set(rows.map((row) => row.name));
|
|
31
|
+
return sortFlagRows([
|
|
32
|
+
...rows.map((row) => ({ ...row, backed: true })),
|
|
33
|
+
...declared
|
|
34
|
+
.filter((flag) => !stored.has(flag.name))
|
|
35
|
+
.map((flag) => ({
|
|
36
|
+
...flag,
|
|
37
|
+
enabled: true,
|
|
38
|
+
rolloutPercent: null,
|
|
39
|
+
declared: true,
|
|
40
|
+
backed: false,
|
|
41
|
+
})),
|
|
42
|
+
]);
|
|
43
|
+
};
|
|
21
44
|
//# sourceMappingURL=flag-rows.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flag-rows.js","sourceRoot":"","sources":["../../../src/lib/flag-rows.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,GAAG,CAAC,CAAc,EAAE,CAAc,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;AAE/E,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,IAAmB,EAAiB,EAAE,CACjE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;AAEnB;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAChC,QAAiC,EACjC,QAA4B,EACb,EAAE,CACjB,YAAY,CACV,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;IACpB,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAC/B,OAAO;QACL,GAAG,IAAI;QACP,OAAO,EAAE,GAAG,EAAE,OAAO,IAAI,IAAI;QAC7B,cAAc,EAAE,GAAG,EAAE,cAAc,IAAI,IAAI;QAC3C,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,GAAG,KAAK,SAAS;KAC1B,CAAA;AACH,CAAC,CAAC,CACH,CAAA"}
|
|
1
|
+
{"version":3,"file":"flag-rows.js","sourceRoot":"","sources":["../../../src/lib/flag-rows.ts"],"names":[],"mappings":"AAWA,MAAM,MAAM,GAAG,CAAC,CAAc,EAAE,CAAc,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAA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AE,IAAI;YACd,MAAM,EAAE,KAAK;SACd,CAAC,CAAC;KACN,CAAC,CAAA;AACJ,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, test } from 'node:test';
|
|
2
2
|
import * as assert from 'node:assert';
|
|
3
|
-
import { flagRowsFromSource } from './flag-rows.js';
|
|
3
|
+
import { flagRowsFromSource, flagRowsFromStore } from './flag-rows.js';
|
|
4
4
|
describe('flagRowsFromSource', () => {
|
|
5
5
|
test('joins a declaration onto the provider row', () => {
|
|
6
6
|
const [row] = flagRowsFromSource([{ name: 'sandboxes' }], {
|
|
@@ -26,4 +26,41 @@ describe('flagRowsFromSource', () => {
|
|
|
26
26
|
assert.deepEqual(rows.map((row) => row.name), ['nightlyReindex', 'sandboxes']);
|
|
27
27
|
});
|
|
28
28
|
});
|
|
29
|
+
describe('flagRowsFromStore', () => {
|
|
30
|
+
const stored = {
|
|
31
|
+
name: 'sandboxes',
|
|
32
|
+
enabled: false,
|
|
33
|
+
rolloutPercent: 25,
|
|
34
|
+
declared: true,
|
|
35
|
+
};
|
|
36
|
+
test('keeps a stored row as it is', () => {
|
|
37
|
+
const [row] = flagRowsFromStore([{ name: 'sandboxes' }], [stored]);
|
|
38
|
+
assert.equal(row?.enabled, false);
|
|
39
|
+
assert.equal(row?.rolloutPercent, 25);
|
|
40
|
+
assert.equal(row?.backed, true);
|
|
41
|
+
});
|
|
42
|
+
test('lists a declaration with no row as live and unbacked', () => {
|
|
43
|
+
const rows = flagRowsFromStore([{ name: 'devSwitcher', description: 'Sign in as' }], []);
|
|
44
|
+
assert.deepEqual(rows, [
|
|
45
|
+
{
|
|
46
|
+
name: 'devSwitcher',
|
|
47
|
+
description: 'Sign in as',
|
|
48
|
+
enabled: true,
|
|
49
|
+
rolloutPercent: null,
|
|
50
|
+
declared: true,
|
|
51
|
+
backed: false,
|
|
52
|
+
},
|
|
53
|
+
]);
|
|
54
|
+
});
|
|
55
|
+
test('keeps a row whose declaration has gone', () => {
|
|
56
|
+
const rows = flagRowsFromStore([], [{ ...stored, declared: false }]);
|
|
57
|
+
assert.equal(rows.length, 1);
|
|
58
|
+
assert.equal(rows[0]?.declared, false);
|
|
59
|
+
assert.equal(rows[0]?.backed, true);
|
|
60
|
+
});
|
|
61
|
+
test('sorts rows and declarations together', () => {
|
|
62
|
+
const rows = flagRowsFromStore([{ name: 'alpha' }], [stored]);
|
|
63
|
+
assert.deepEqual(rows.map((row) => row.name), ['alpha', 'sandboxes']);
|
|
64
|
+
});
|
|
65
|
+
});
|
|
29
66
|
//# sourceMappingURL=flag-rows.test.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flag-rows.test.js","sourceRoot":"","sources":["../../../src/lib/flag-rows.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"flag-rows.test.js","sourceRoot":"","sources":["../../../src/lib/flag-rows.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,KAAK,MAAM,MAAM,aAAa,CAAA;AACrC,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAEtE,QAAQ,CAAC,oBAAoB,EAAE,GAAG,EAAE;IAClC,IAAI,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACrD,MAAM,CAAC,GAAG,CAAC,GAAG,kBAAkB,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE;YACxD,SAAS,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;SACjE,CAAC,CAAA;QAEF,MAAM,CAAC,KA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MAAM,EAAE,CAAC,CAAC,CAAA;QAC5B,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAA;QACtC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,CAAA;IACrC,CAAC,CAAC,CAAA;IAEF,IAAI,CAAC,sCAAsC,EAAE,GAAG,EAAE;QAChD,MAAM,IAAI,GAAG,iBAAiB,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAA;QAE7D,MAAM,CAAC,SAAS,CACd,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAC3B,CAAC,OAAO,EAAE,WAAW,CAAC,CACvB,CAAA;IACH,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pikku/addon-admin",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.10",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/pikkujs/pikku.git",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"test:coverage": "bash run-tests.sh --coverage"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@pikku/better-auth": "^0.12.
|
|
36
|
-
"@pikku/core": "^0.12.
|
|
35
|
+
"@pikku/better-auth": "^0.12.50",
|
|
36
|
+
"@pikku/core": "^0.12.130",
|
|
37
37
|
"zod": "^4"
|
|
38
38
|
},
|
|
39
39
|
"peerDependenciesMeta": {
|
|
@@ -42,8 +42,8 @@
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@pikku/better-auth": "^0.12.
|
|
46
|
-
"@pikku/cli": "^0.12.
|
|
45
|
+
"@pikku/better-auth": "^0.12.50",
|
|
46
|
+
"@pikku/cli": "^0.12.173",
|
|
47
47
|
"@pikku/core": "*",
|
|
48
48
|
"@standard-schema/spec": "^1.1.0",
|
|
49
49
|
"zod": "^4"
|