@junobuild/functions 0.0.11 → 0.0.12-next-2025-03-27

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.
@@ -96,9 +96,9 @@ export declare const DocUpsertSchema: z.ZodObject<{
96
96
  */
97
97
  export type DocUpsert = z.infer<typeof DocUpsertSchema>;
98
98
  /**
99
- * @see ProposedDoc
99
+ * @see SetDoc
100
100
  */
101
- export declare const ProposedDocSchema: z.ZodObject<{
101
+ export declare const SetDocSchema: z.ZodObject<{
102
102
  /**
103
103
  * The raw data of the document.
104
104
  */
@@ -121,10 +121,28 @@ export declare const ProposedDocSchema: z.ZodObject<{
121
121
  version?: bigint | undefined;
122
122
  }>;
123
123
  /**
124
- * Represents the proposed version of a document.
124
+ * Represents the proposed version of a document to be created or updated.
125
125
  * This can be validated before allowing the operation.
126
126
  */
127
- export type ProposedDoc = z.infer<typeof ProposedDocSchema>;
127
+ export type SetDoc = z.infer<typeof SetDocSchema>;
128
+ /**
129
+ * @see DelDoc
130
+ */
131
+ export declare const DelDocSchema: z.ZodObject<{
132
+ /**
133
+ * The expected version number to ensure consistency.
134
+ */
135
+ version: z.ZodOptional<z.ZodBigInt>;
136
+ }, "strict", z.ZodTypeAny, {
137
+ version?: bigint | undefined;
138
+ }, {
139
+ version?: bigint | undefined;
140
+ }>;
141
+ /**
142
+ * Represents the proposed version of a document to be deleted.
143
+ * This can be validated before allowing the operation.
144
+ */
145
+ export type DelDoc = z.infer<typeof SetDocSchema>;
128
146
  /**
129
147
  * @see DocAssertSet
130
148
  */
@@ -217,3 +235,79 @@ export declare const DocAssertSetSchema: z.ZodObject<{
217
235
  * throw an error if their validation fails.
218
236
  */
219
237
  export type DocAssertSet = z.infer<typeof DocAssertSetSchema>;
238
+ /**
239
+ * @see DocAssertDelete
240
+ */
241
+ export declare const DocAssertDeleteSchema: z.ZodObject<{
242
+ /**
243
+ * The current version of the document before the operation.
244
+ * Undefined if the document does not exist.
245
+ */
246
+ current: z.ZodOptional<z.ZodObject<{
247
+ owner: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
248
+ data: z.ZodType<Uint8Array<ArrayBufferLike>, z.ZodTypeDef, Uint8Array<ArrayBufferLike>>;
249
+ description: z.ZodOptional<z.ZodString>;
250
+ created_at: z.ZodBigInt;
251
+ updated_at: z.ZodBigInt;
252
+ version: z.ZodOptional<z.ZodBigInt>;
253
+ }, "strict", z.ZodTypeAny, {
254
+ owner: Uint8Array<ArrayBufferLike>;
255
+ data: Uint8Array<ArrayBufferLike>;
256
+ created_at: bigint;
257
+ updated_at: bigint;
258
+ description?: string | undefined;
259
+ version?: bigint | undefined;
260
+ }, {
261
+ owner: Uint8Array<ArrayBufferLike>;
262
+ data: Uint8Array<ArrayBufferLike>;
263
+ created_at: bigint;
264
+ updated_at: bigint;
265
+ description?: string | undefined;
266
+ version?: bigint | undefined;
267
+ }>>;
268
+ /**
269
+ * The proposed version of the document.
270
+ * This can be validated before allowing the operation.
271
+ */
272
+ proposed: z.ZodObject<{
273
+ /**
274
+ * The expected version number to ensure consistency.
275
+ */
276
+ version: z.ZodOptional<z.ZodBigInt>;
277
+ }, "strict", z.ZodTypeAny, {
278
+ version?: bigint | undefined;
279
+ }, {
280
+ version?: bigint | undefined;
281
+ }>;
282
+ }, "strict", z.ZodTypeAny, {
283
+ proposed: {
284
+ version?: bigint | undefined;
285
+ };
286
+ current?: {
287
+ owner: Uint8Array<ArrayBufferLike>;
288
+ data: Uint8Array<ArrayBufferLike>;
289
+ created_at: bigint;
290
+ updated_at: bigint;
291
+ description?: string | undefined;
292
+ version?: bigint | undefined;
293
+ } | undefined;
294
+ }, {
295
+ proposed: {
296
+ version?: bigint | undefined;
297
+ };
298
+ current?: {
299
+ owner: Uint8Array<ArrayBufferLike>;
300
+ data: Uint8Array<ArrayBufferLike>;
301
+ created_at: bigint;
302
+ updated_at: bigint;
303
+ description?: string | undefined;
304
+ version?: bigint | undefined;
305
+ } | undefined;
306
+ }>;
307
+ /**
308
+ * Represents a validation check before deleting a document.
309
+ *
310
+ * The developer can compare the `current` and `proposed` versions and
311
+ * throw an error if their validation fails.
312
+ */
313
+ export type DocAssertDelete = z.infer<typeof DocAssertDeleteSchema>;
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as I,b as T,c as S,d as J,e as y,f as d,g as h,h as z,i as r}from"./chunk-LVVTFR6B.js";import{a as U,b as w,c as P}from"./chunk-CCKUQNB5.js";import*as i from"zod";import*as o from"zod";var n=o.object({collections:o.array(o.string()).readonly()}).strict();import*as t from"zod";var f=e=>t.object({caller:S,data:e}).strict(),A=e=>t.function().args(e).returns(t.void()),l=e=>t.function().args(e).returns(t.promise(t.void()).or(t.void()));import*as O from"zod";import*as s from"zod";var u=s.object({before:r.optional(),after:r}).strict(),j=s.object({data:z,description:h.optional(),version:T.optional()}).strict(),k=s.object({current:r.optional(),proposed:j}).strict();var D=e=>O.object({collection:y,key:d,data:e}).strict(),F=f(D(u)),H=f(D(k));import*as c from"zod";var p=c.record(c.unknown());var C=e=>n.extend({assert:A(e)}).strict(),Z=C(H),oe=Z,v=e=>i.function().args(p).returns(e),re=e=>i.union([e,v(e)]);function ne(e){return e}import*as m from"zod";var R=e=>n.extend({run:l(e)}).strict(),g=R(F),ae=g,_=e=>m.function().args(p).returns(e),xe=e=>m.union([e,_(e)]);function fe(e){return e}import{jsonReplacer as E}from"@dfinity/utils";var a=e=>{let b=e.map(x=>typeof x=="object"?JSON.stringify(x,E):x).join(" ");globalThis.__ic_cdk_print(b)};globalThis.console={info(...e){a(e)},log(...e){a(e)},warn(...e){a(e)},error(...e){a(e)}};export{re as AssertFnOrObjectSchema,v as AssertFnSchema,A as AssertFunctionSchema,oe as AssertSchema,H as AssertSetDocContextSchema,Z as AssertSetDocSchema,y as CollectionSchema,n as CollectionsSchema,k as DocAssertSetSchema,D as DocContextSchema,h as DocDescriptionSchema,r as DocSchema,u as DocUpsertSchema,f as HookContextSchema,xe as HookFnOrObjectSchema,_ as HookFnSchema,ae as HookSchema,d as KeySchema,F as OnSetDocContextSchema,g as OnSetDocSchema,P as PrincipalSchema,j as ProposedDocSchema,z as RawDataSchema,w as RawPrincipalSchema,S as RawUserIdSchema,l as RunFunctionSchema,p as SatelliteEnvSchema,I as TimestampSchema,U as Uint8ArraySchema,J as UserIdSchema,T as VersionSchema,ne as defineAssert,fe as defineHook};
1
+ import{a as q,b as S,c as h,d as B,e as d,f as A,g as z,h as l,i as n}from"./chunk-LVVTFR6B.js";import{a as K,b as N,c as V}from"./chunk-CCKUQNB5.js";import*as m from"zod";import*as o from"zod";var s=o.object({collections:o.array(o.string()).readonly()}).strict();import*as t from"zod";var c=e=>t.object({caller:h,data:e}).strict(),D=e=>t.function().args(e).returns(t.void()),u=e=>t.function().args(e).returns(t.promise(t.void()).or(t.void()));import*as k from"zod";import*as r from"zod";var O=r.object({before:n.optional(),after:n}).strict(),v=r.object({data:l,description:z.optional(),version:S.optional()}).strict(),R=r.object({version:S.optional()}).strict(),b=r.object({current:n.optional(),proposed:v}).strict(),j=r.object({current:n.optional(),proposed:R}).strict();var T=e=>k.object({collection:d,key:A,data:e}).strict(),F=c(T(O)),H=c(T(b)),C=c(T(j));import*as p from"zod";var a=p.record(p.unknown());var Z=e=>s.extend({assert:D(e)}).strict(),g=Z(H),_=Z(C),ce=g.or(_),E=e=>m.function().args(a).returns(e),pe=e=>m.union([e,E(e)]);function ae(e){return e}import*as i from"zod";var I=e=>s.extend({run:u(e)}).strict(),U=I(F),Se=U,w=e=>i.function().args(a).returns(e),Te=e=>i.union([e,w(e)]);function he(e){return e}import{jsonReplacer as J}from"@dfinity/utils";var x=e=>{let y=e.map(f=>typeof f=="object"?JSON.stringify(f,J):f).join(" ");globalThis.__ic_cdk_print(y)};globalThis.console={info(...e){x(e)},log(...e){x(e)},warn(...e){x(e)},error(...e){x(e)}};export{C as AssertDeleteDocContextSchema,_ as AssertDeleteDocSchema,pe as AssertFnOrObjectSchema,E as AssertFnSchema,D as AssertFunctionSchema,ce as AssertSchema,H as AssertSetDocContextSchema,g as AssertSetDocSchema,d as CollectionSchema,s as CollectionsSchema,R as DelDocSchema,j as DocAssertDeleteSchema,b as DocAssertSetSchema,T as DocContextSchema,z as DocDescriptionSchema,n as DocSchema,O as DocUpsertSchema,c as HookContextSchema,Te as HookFnOrObjectSchema,w as HookFnSchema,Se as HookSchema,A as KeySchema,F as OnSetDocContextSchema,U as OnSetDocSchema,V as PrincipalSchema,l as RawDataSchema,N as RawPrincipalSchema,h as RawUserIdSchema,u as RunFunctionSchema,a as SatelliteEnvSchema,v as SetDocSchema,q as TimestampSchema,K as Uint8ArraySchema,B as UserIdSchema,S as VersionSchema,ae as defineAssert,he as defineHook};
2
2
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["src/hooks/db/assertions.ts", "src/hooks/schemas/collections.ts", "src/hooks/schemas/context.ts", "src/hooks/schemas/db/context.ts", "src/hooks/schemas/db/payload.ts", "src/hooks/schemas/satellite.env.ts", "src/hooks/db/hooks.ts", "src/polyfills/console.polyfill.ts"],
4
- "sourcesContent": ["import * as z from 'zod';\nimport {CollectionsSchema} from '../schemas/collections';\nimport {AssertFunctionSchema} from '../schemas/context';\nimport {AssertSetDocContextSchema} from '../schemas/db/context';\nimport {SatelliteEnvSchema} from '../schemas/satellite.env';\n\n/**\n * A generic schema for defining assertions related to collections.\n *\n * @template T - The type of context passed to the assertions when triggered.\n */\nconst OnAssertSchema = <T extends z.ZodTypeAny>(contextSchema: T) =>\n CollectionsSchema.extend({\n /**\n * A function that runs when the assertion is triggered for the specified collections.\n *\n * @param {T} context - Contains information about the affected document(s).\n * @returns {void} Resolves when the assertion completes.\n */\n assert: AssertFunctionSchema<T>(contextSchema)\n }).strict();\n\n/**\n * @see AssertSetDoc\n */\nexport const AssertSetDocSchema = OnAssertSchema(AssertSetDocContextSchema);\n\n/**\n * An assertion that runs when a document is created or updated.\n */\nexport type AssertSetDoc = z.infer<typeof AssertSetDocSchema>;\n\n// TODO: to be extended\n/**\n * @see Assert\n */\nexport const AssertSchema = AssertSetDocSchema;\n\n/**\n * All assertions definitions.\n */\nexport type Assert = z.infer<typeof AssertSchema>;\n\nexport const AssertFnSchema = <T extends z.ZodTypeAny>(assertSchema: T) =>\n z.function().args(SatelliteEnvSchema).returns(assertSchema);\nexport type AssertFn<T extends Assert> = (assert: z.infer<typeof SatelliteEnvSchema>) => T;\n\nexport const AssertFnOrObjectSchema = <T extends z.ZodTypeAny>(assertSchema: T) =>\n z.union([assertSchema, AssertFnSchema(assertSchema)]);\nexport type AssertFnOrObject<T extends Assert> = T | AssertFn<T>;\n\nexport function defineAssert<T extends Assert>(assert: T): T;\nexport function defineAssert<T extends Assert>(assert: AssertFn<T>): AssertFn<T>;\nexport function defineAssert<T extends Assert>(assert: AssertFnOrObject<T>): AssertFnOrObject<T>;\nexport function defineAssert<T extends Assert>(assert: AssertFnOrObject<T>): AssertFnOrObject<T> {\n return assert;\n}\n", "import * as z from 'zod';\n\n/**\n * @see Collections\n */\nexport const CollectionsSchema = z\n .object({\n /**\n * An array of collection names where the hook or assertion will run.\n * If empty, no hooks or assertions are triggered.\n */\n collections: z.array(z.string()).readonly()\n })\n .strict();\n\n/**\n * Defines the collections where a hook or assertion should run.\n */\nexport type Collections = z.infer<typeof CollectionsSchema>;\n", "import * as z from 'zod';\nimport {RawUserIdSchema} from '../../schemas/satellite';\n\n/**\n * @see HookContext\n */\nexport const HookContextSchema = <T extends z.ZodTypeAny>(dataSchema: T) =>\n z\n .object({\n /**\n * The user who originally triggered the function that in turn triggered the hook.\n */\n caller: RawUserIdSchema,\n\n /**\n * The data associated with the hook execution.\n */\n data: dataSchema\n })\n .strict();\n\n/**\n * Represents the context provided to hooks, containing information about the caller and related data.\n *\n * @template T - The type of data associated with the hook.\n */\nexport type HookContext<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof HookContextSchema<T>>>;\n\n/**\n * @see AssertFunction\n */\nexport const AssertFunctionSchema = <T extends z.ZodTypeAny>(contextSchema: T) =>\n z.function().args(contextSchema).returns(z.void());\n\n/**\n * Defines the `assert` function schema for assertions.\n *\n * The function takes a context argument and returns `void`.\n *\n * @template T - The type of context passed to the function.\n */\nexport type AssertFunction<T> = z.infer<ReturnType<typeof AssertFunctionSchema<z.ZodType<T>>>>;\n\n/**\n * @see RunFunction\n */\nexport const RunFunctionSchema = <T extends z.ZodTypeAny>(contextSchema: T) =>\n z.function().args(contextSchema).returns(z.promise(z.void()).or(z.void()));\n\n/**\n * Defines the `run` function schema for hooks.\n *\n * The function takes a context argument and returns either a `Promise<void>` or `void`.\n *\n * @template T - The type of context passed to the function.\n */\nexport type RunFunction<T> = z.infer<ReturnType<typeof RunFunctionSchema<z.ZodType<T>>>>;\n", "import * as z from 'zod';\nimport {CollectionSchema, KeySchema} from '../../../schemas/satellite';\nimport {HookContextSchema} from '../context';\nimport {DocAssertSetSchema, DocUpsertSchema} from './payload';\n\n/**\n * @see DocContext\n */\nexport const DocContextSchema = <T extends z.ZodTypeAny>(dataSchema: T) =>\n z\n .object({\n /**\n * The name of the collection where the document is stored.\n */\n collection: CollectionSchema,\n\n /**\n * The unique key identifying the document within the collection.\n */\n key: KeySchema,\n\n /**\n * The data associated with the document operation.\n */\n data: dataSchema\n })\n .strict();\n\n/**\n * Represents the context of a document operation within a collection.\n *\n * @template T - The type of data associated with the document.\n */\nexport type DocContext<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof DocContextSchema<T>>>;\n\n/**\n * @see OnSetDocContext\n */\nexport const OnSetDocContextSchema = HookContextSchema(DocContextSchema(DocUpsertSchema));\n\n/**\n * The context provided to the `onSetDoc` hook.\n *\n * This context contains information about the document being created or updated,\n * along with details about the user who triggered the operation.\n */\nexport type OnSetDocContext = z.infer<typeof OnSetDocContextSchema>;\n\n/**\n * @see AssertSetDocContext\n */\nexport const AssertSetDocContextSchema = HookContextSchema(DocContextSchema(DocAssertSetSchema));\n\n/**\n * The context provided to the `assertSetDoc` hook.\n *\n * This context contains information about the document being validated before\n * it is created or updated. If validation fails, the developer should throw an error.\n */\nexport type AssertSetDocContext = z.infer<typeof AssertSetDocContextSchema>;\n", "import * as z from 'zod';\nimport {DocDescriptionSchema, DocSchema, RawDataSchema} from '../../../schemas/db';\nimport {VersionSchema} from '../../../schemas/satellite';\n\n/**\n * @see DocUpsert\n */\nexport const DocUpsertSchema = z\n .object({\n /**\n * The previous version of the document before the update.\n * Undefined if this is a new document.\n */\n before: DocSchema.optional(),\n\n /**\n * The new version of the document after the update.\n */\n after: DocSchema\n })\n .strict();\n\n/**\n * Represents a document update operation.\n *\n * This is used in hooks where a document is either being created or updated.\n */\nexport type DocUpsert = z.infer<typeof DocUpsertSchema>;\n\n/**\n * @see ProposedDoc\n */\nexport const ProposedDocSchema = z\n .object({\n /**\n * The raw data of the document.\n */\n data: RawDataSchema,\n\n /**\n * An optional description of the document.\n */\n description: DocDescriptionSchema.optional(),\n\n /**\n * The expected version number to ensure consistency.\n */\n version: VersionSchema.optional()\n })\n .strict();\n\n/**\n * Represents the proposed version of a document.\n * This can be validated before allowing the operation.\n */\nexport type ProposedDoc = z.infer<typeof ProposedDocSchema>;\n\n/**\n * @see DocAssertSet\n */\nexport const DocAssertSetSchema = z\n .object({\n /**\n * The current version of the document before the operation.\n * Undefined if this is a new document.\n */\n current: DocSchema.optional(),\n\n /**\n * The proposed version of the document.\n * This can be validated before allowing the operation.\n */\n proposed: ProposedDocSchema\n })\n .strict();\n\n/**\n * Represents a validation check before setting a document.\n *\n * The developer can compare the `current` and `proposed` versions and\n * throw an error if their validation fails.\n */\nexport type DocAssertSet = z.infer<typeof DocAssertSetSchema>;\n", "import * as z from 'zod';\n\n/**\n * @see SatelliteEnv\n */\nexport const SatelliteEnvSchema = z.record(z.unknown());\n\n/**\n * Placeholder for future environment-specific configurations.\n *\n * Currently unused, but it may support features such as:\n * - Defining the execution mode (e.g., staging or production).\n * - Providing environment-specific values like `ckBtcLedgerId` for test or production.\n */\nexport type SatelliteEnv = z.infer<typeof SatelliteEnvSchema>;\n", "import * as z from 'zod';\nimport {CollectionsSchema} from '../schemas/collections';\nimport {RunFunctionSchema} from '../schemas/context';\nimport {OnSetDocContextSchema} from '../schemas/db/context';\nimport {SatelliteEnvSchema} from '../schemas/satellite.env';\n\n/**\n * A generic schema for defining hooks related to collections.\n *\n * @template T - The type of context passed to the hook when triggered.\n */\nconst OnHookSchema = <T extends z.ZodTypeAny>(contextSchema: T) =>\n CollectionsSchema.extend({\n /**\n * A function that runs when the hook is triggered for the specified collections.\n *\n * @param {T} context - Contains information about the affected document(s).\n * @returns {Promise<void>} Resolves when the operation completes.\n */\n run: RunFunctionSchema<T>(contextSchema)\n }).strict();\n\n/**\n * @see OnSetDoc\n */\nexport const OnSetDocSchema = OnHookSchema(OnSetDocContextSchema);\n\n/**\n * A hook that runs when a document is created or updated.\n */\nexport type OnSetDoc = z.infer<typeof OnSetDocSchema>;\n\n// TODO: to be extended\n/**\n * @see Hook\n */\nexport const HookSchema = OnSetDocSchema;\n\n/**\n * All hooks definitions.\n */\nexport type Hook = z.infer<typeof HookSchema>;\n\nexport const HookFnSchema = <T extends z.ZodTypeAny>(hookSchema: T) =>\n z.function().args(SatelliteEnvSchema).returns(hookSchema);\nexport type HookFn<T extends Hook> = (hook: z.infer<typeof SatelliteEnvSchema>) => T;\n\nexport const HookFnOrObjectSchema = <T extends z.ZodTypeAny>(hookSchema: T) =>\n z.union([hookSchema, HookFnSchema(hookSchema)]);\nexport type HookFnOrObject<T extends Hook> = T | HookFn<T>;\n\nexport function defineHook<T extends Hook>(hook: T): T;\nexport function defineHook<T extends Hook>(hook: HookFn<T>): HookFn<T>;\nexport function defineHook<T extends Hook>(hook: HookFnOrObject<T>): HookFnOrObject<T>;\nexport function defineHook<T extends Hook>(hook: HookFnOrObject<T>): HookFnOrObject<T> {\n return hook;\n}\n", "import {jsonReplacer} from '@dfinity/utils';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst __juno_satellite_console_log = (v: any[]) => {\n const msg = v\n .map((arg) => (typeof arg === 'object' ? JSON.stringify(arg, jsonReplacer) : arg))\n .join(' ');\n\n globalThis.__ic_cdk_print(msg);\n};\n\n// @ts-expect-error We want to override the console\nglobalThis.console = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n info(...v: any[]) {\n __juno_satellite_console_log(v);\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n log(...v: any[]) {\n __juno_satellite_console_log(v);\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n warn(...v: any[]) {\n __juno_satellite_console_log(v);\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n error(...v: any[]) {\n __juno_satellite_console_log(v);\n }\n};\n"],
5
- "mappings": "sJAAA,UAAYA,MAAO,MCAnB,UAAYC,MAAO,MAKZ,IAAMC,EACV,SAAO,CAKN,YAAe,QAAQ,SAAO,CAAC,EAAE,SAAS,CAC5C,CAAC,EACA,OAAO,ECbV,UAAYC,MAAO,MAMZ,IAAMC,EAA6CC,GAErD,SAAO,CAIN,OAAQC,EAKR,KAAMD,CACR,CAAC,EACA,OAAO,EAYCE,EAAgDC,GACzD,WAAS,EAAE,KAAKA,CAAa,EAAE,QAAU,OAAK,CAAC,EActCC,EAA6CD,GACtD,WAAS,EAAE,KAAKA,CAAa,EAAE,QAAU,UAAU,OAAK,CAAC,EAAE,GAAK,OAAK,CAAC,CAAC,EC/C3E,UAAYE,MAAO,MCAnB,UAAYC,MAAO,MAOZ,IAAMC,EACV,SAAO,CAKN,OAAQC,EAAU,SAAS,EAK3B,MAAOA,CACT,CAAC,EACA,OAAO,EAYGC,EACV,SAAO,CAIN,KAAMC,EAKN,YAAaC,EAAqB,SAAS,EAK3C,QAASC,EAAc,SAAS,CAClC,CAAC,EACA,OAAO,EAWGC,EACV,SAAO,CAKN,QAASL,EAAU,SAAS,EAM5B,SAAUC,CACZ,CAAC,EACA,OAAO,EDlEH,IAAMK,EAA4CC,GAEpD,SAAO,CAIN,WAAYC,EAKZ,IAAKC,EAKL,KAAMF,CACR,CAAC,EACA,OAAO,EAYCG,EAAwBC,EAAkBL,EAAiBM,CAAe,CAAC,EAa3EC,EAA4BF,EAAkBL,EAAiBQ,CAAkB,CAAC,EEnD/F,UAAYC,MAAO,MAKZ,IAAMC,EAAuB,SAAS,UAAQ,CAAC,ELMtD,IAAMC,EAA0CC,GAC9CC,EAAkB,OAAO,CAOvB,OAAQC,EAAwBF,CAAa,CAC/C,CAAC,EAAE,OAAO,EAKCG,EAAqBJ,EAAeK,CAAyB,EAW7DC,GAAeF,EAOfG,EAA0CC,GACnD,WAAS,EAAE,KAAKC,CAAkB,EAAE,QAAQD,CAAY,EAG/CE,GAAkDF,GAC3D,QAAM,CAACA,EAAcD,EAAeC,CAAY,CAAC,CAAC,EAM/C,SAASG,GAA+BC,EAAkD,CAC/F,OAAOA,CACT,CMxDA,UAAYC,MAAO,MAWnB,IAAMC,EAAwCC,GAC5CC,EAAkB,OAAO,CAOvB,IAAKC,EAAqBF,CAAa,CACzC,CAAC,EAAE,OAAO,EAKCG,EAAiBJ,EAAaK,CAAqB,EAWnDC,GAAaF,EAObG,EAAwCC,GACjD,WAAS,EAAE,KAAKC,CAAkB,EAAE,QAAQD,CAAU,EAG7CE,GAAgDF,GACzD,QAAM,CAACA,EAAYD,EAAaC,CAAU,CAAC,CAAC,EAMzC,SAASG,GAA2BC,EAA4C,CACrF,OAAOA,CACT,CCxDA,OAAQ,gBAAAC,MAAmB,iBAG3B,IAAMC,EAAgCC,GAAa,CACjD,IAAMC,EAAMD,EACT,IAAKE,GAAS,OAAOA,GAAQ,SAAW,KAAK,UAAUA,EAAKJ,CAAY,EAAII,CAAI,EAChF,KAAK,GAAG,EAEX,WAAW,eAAeD,CAAG,CAC/B,EAGA,WAAW,QAAU,CAEnB,QAAQD,EAAU,CAChBD,EAA6BC,CAAC,CAChC,EAEA,OAAOA,EAAU,CACfD,EAA6BC,CAAC,CAChC,EAEA,QAAQA,EAAU,CAChBD,EAA6BC,CAAC,CAChC,EAEA,SAASA,EAAU,CACjBD,EAA6BC,CAAC,CAChC,CACF",
6
- "names": ["z", "z", "CollectionsSchema", "z", "HookContextSchema", "dataSchema", "RawUserIdSchema", "AssertFunctionSchema", "contextSchema", "RunFunctionSchema", "z", "z", "DocUpsertSchema", "DocSchema", "ProposedDocSchema", "RawDataSchema", "DocDescriptionSchema", "VersionSchema", "DocAssertSetSchema", "DocContextSchema", "dataSchema", "CollectionSchema", "KeySchema", "OnSetDocContextSchema", "HookContextSchema", "DocUpsertSchema", "AssertSetDocContextSchema", "DocAssertSetSchema", "z", "SatelliteEnvSchema", "OnAssertSchema", "contextSchema", "CollectionsSchema", "AssertFunctionSchema", "AssertSetDocSchema", "AssertSetDocContextSchema", "AssertSchema", "AssertFnSchema", "assertSchema", "SatelliteEnvSchema", "AssertFnOrObjectSchema", "defineAssert", "assert", "z", "OnHookSchema", "contextSchema", "CollectionsSchema", "RunFunctionSchema", "OnSetDocSchema", "OnSetDocContextSchema", "HookSchema", "HookFnSchema", "hookSchema", "SatelliteEnvSchema", "HookFnOrObjectSchema", "defineHook", "hook", "jsonReplacer", "__juno_satellite_console_log", "v", "msg", "arg"]
4
+ "sourcesContent": ["import * as z from 'zod';\nimport {CollectionsSchema} from '../schemas/collections';\nimport {AssertFunctionSchema} from '../schemas/context';\nimport {AssertDeleteDocContextSchema, AssertSetDocContextSchema} from '../schemas/db/context';\nimport {SatelliteEnvSchema} from '../schemas/satellite.env';\n\n/**\n * A generic schema for defining assertions related to collections.\n *\n * @template T - The type of context passed to the assertions when triggered.\n */\nconst OnAssertSchema = <T extends z.ZodTypeAny>(contextSchema: T) =>\n CollectionsSchema.extend({\n /**\n * A function that runs when the assertion is triggered for the specified collections.\n *\n * @param {T} context - Contains information about the affected document(s).\n * @returns {void} Resolves when the assertion completes.\n */\n assert: AssertFunctionSchema<T>(contextSchema)\n }).strict();\n\n/**\n * @see AssertSetDoc\n */\nexport const AssertSetDocSchema = OnAssertSchema(AssertSetDocContextSchema);\n\n/**\n * An assertion that runs when a document is created or updated.\n */\nexport type AssertSetDoc = z.infer<typeof AssertSetDocSchema>;\n\n/**\n * @see AssertDeleteDoc\n */\nexport const AssertDeleteDocSchema = OnAssertSchema(AssertDeleteDocContextSchema);\n\n/**\n * An assertion that runs when a document is deleted.\n */\nexport type AssertDeleteDoc = z.infer<typeof AssertDeleteDocSchema>;\n\n/**\n * @see Assert\n */\nexport const AssertSchema = AssertSetDocSchema.or(AssertDeleteDocSchema);\n\n/**\n * All assertions definitions.\n */\nexport type Assert = z.infer<typeof AssertSchema>;\n\nexport const AssertFnSchema = <T extends z.ZodTypeAny>(assertSchema: T) =>\n z.function().args(SatelliteEnvSchema).returns(assertSchema);\nexport type AssertFn<T extends Assert> = (assert: z.infer<typeof SatelliteEnvSchema>) => T;\n\nexport const AssertFnOrObjectSchema = <T extends z.ZodTypeAny>(assertSchema: T) =>\n z.union([assertSchema, AssertFnSchema(assertSchema)]);\nexport type AssertFnOrObject<T extends Assert> = T | AssertFn<T>;\n\nexport function defineAssert<T extends Assert>(assert: T): T;\nexport function defineAssert<T extends Assert>(assert: AssertFn<T>): AssertFn<T>;\nexport function defineAssert<T extends Assert>(assert: AssertFnOrObject<T>): AssertFnOrObject<T>;\nexport function defineAssert<T extends Assert>(assert: AssertFnOrObject<T>): AssertFnOrObject<T> {\n return assert;\n}\n", "import * as z from 'zod';\n\n/**\n * @see Collections\n */\nexport const CollectionsSchema = z\n .object({\n /**\n * An array of collection names where the hook or assertion will run.\n * If empty, no hooks or assertions are triggered.\n */\n collections: z.array(z.string()).readonly()\n })\n .strict();\n\n/**\n * Defines the collections where a hook or assertion should run.\n */\nexport type Collections = z.infer<typeof CollectionsSchema>;\n", "import type {baseObjectInputType, baseObjectOutputType, ZodObject, ZodTypeAny} from 'zod';\nimport * as z from 'zod';\nimport {RawUserIdSchema} from '../../schemas/satellite';\n\n/**\n * @see HookContext\n */\nexport const HookContextSchema = <T extends z.ZodTypeAny>(dataSchema: T) => {\n const schemaShape = {\n /**\n * The user who originally triggered the function that in turn triggered the hook.\n */\n caller: RawUserIdSchema,\n\n /**\n * The data associated with the hook execution.\n */\n data: dataSchema\n };\n\n // TODO: workaround for https://github.com/colinhacks/zod/issues/3998\n return z.object(schemaShape).strict() as ZodObject<\n typeof schemaShape,\n 'strict',\n ZodTypeAny,\n baseObjectOutputType<typeof schemaShape>,\n baseObjectInputType<typeof schemaShape>\n >;\n};\n\n/**\n * Represents the context provided to hooks, containing information about the caller and related data.\n *\n * @template T - The type of data associated with the hook.\n */\nexport type HookContext<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof HookContextSchema<T>>>;\n\n/**\n * @see AssertFunction\n */\nexport const AssertFunctionSchema = <T extends z.ZodTypeAny>(contextSchema: T) =>\n z.function().args(contextSchema).returns(z.void());\n\n/**\n * Defines the `assert` function schema for assertions.\n *\n * The function takes a context argument and returns `void`.\n *\n * @template T - The type of context passed to the function.\n */\nexport type AssertFunction<T> = z.infer<ReturnType<typeof AssertFunctionSchema<z.ZodType<T>>>>;\n\n/**\n * @see RunFunction\n */\nexport const RunFunctionSchema = <T extends z.ZodTypeAny>(contextSchema: T) =>\n z.function().args(contextSchema).returns(z.promise(z.void()).or(z.void()));\n\n/**\n * Defines the `run` function schema for hooks.\n *\n * The function takes a context argument and returns either a `Promise<void>` or `void`.\n *\n * @template T - The type of context passed to the function.\n */\nexport type RunFunction<T> = z.infer<ReturnType<typeof RunFunctionSchema<z.ZodType<T>>>>;\n", "import type {baseObjectInputType, baseObjectOutputType, ZodObject, ZodTypeAny} from 'zod';\nimport * as z from 'zod';\nimport {CollectionSchema, KeySchema} from '../../../schemas/satellite';\nimport {HookContextSchema} from '../context';\nimport {DocAssertDeleteSchema, DocAssertSetSchema, DocUpsertSchema} from './payload';\n\n/**\n * @see DocContext\n */\nexport const DocContextSchema = <T extends z.ZodTypeAny>(dataSchema: T) => {\n const schemaShape = {\n /**\n * The name of the collection where the document is stored.\n */\n collection: CollectionSchema,\n\n /**\n * The unique key identifying the document within the collection.\n */\n key: KeySchema,\n\n /**\n * The data associated with the document operation.\n */\n data: dataSchema\n };\n\n // TODO: workaround for https://github.com/colinhacks/zod/issues/3998\n return z.object(schemaShape).strict() as ZodObject<\n typeof schemaShape,\n 'strict',\n ZodTypeAny,\n baseObjectOutputType<typeof schemaShape>,\n baseObjectInputType<typeof schemaShape>\n >;\n};\n\n/**\n * Represents the context of a document operation within a collection.\n *\n * @template T - The type of data associated with the document.\n */\nexport type DocContext<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof DocContextSchema<T>>>;\n\n/**\n * @see OnSetDocContext\n */\nexport const OnSetDocContextSchema = HookContextSchema(DocContextSchema(DocUpsertSchema));\n\n/**\n * The context provided to the `onSetDoc` hook.\n *\n * This context contains information about the document being created or updated,\n * along with details about the user who triggered the operation.\n */\nexport type OnSetDocContext = z.infer<typeof OnSetDocContextSchema>;\n\n/**\n * @see AssertSetDocContext\n */\nexport const AssertSetDocContextSchema = HookContextSchema(DocContextSchema(DocAssertSetSchema));\n\n/**\n * The context provided to the `assertDeleteDoc` hook.\n *\n * This context contains information about the document being validated before\n * it is created or updated. If validation fails, the developer should throw an error.\n */\nexport type AssertSetDocContext = z.infer<typeof AssertSetDocContextSchema>;\n\n/**\n * @see AssertDeleteDocContext\n */\nexport const AssertDeleteDocContextSchema = HookContextSchema(\n DocContextSchema(DocAssertDeleteSchema)\n);\n\n/**\n * The context provided to the `assertDeleteDoc` hook.\n *\n * This context contains information about the document being validated before\n * it is deleted. If validation fails, the developer should throw an error.\n */\nexport type AssertDeleteDocContext = z.infer<typeof AssertDeleteDocContextSchema>;\n", "import * as z from 'zod';\nimport {DocDescriptionSchema, DocSchema, RawDataSchema} from '../../../schemas/db';\nimport {VersionSchema} from '../../../schemas/satellite';\n\n/**\n * @see DocUpsert\n */\nexport const DocUpsertSchema = z\n .object({\n /**\n * The previous version of the document before the update.\n * Undefined if this is a new document.\n */\n before: DocSchema.optional(),\n\n /**\n * The new version of the document after the update.\n */\n after: DocSchema\n })\n .strict();\n\n/**\n * Represents a document update operation.\n *\n * This is used in hooks where a document is either being created or updated.\n */\nexport type DocUpsert = z.infer<typeof DocUpsertSchema>;\n\n/**\n * @see SetDoc\n */\nexport const SetDocSchema = z\n .object({\n /**\n * The raw data of the document.\n */\n data: RawDataSchema,\n\n /**\n * An optional description of the document.\n */\n description: DocDescriptionSchema.optional(),\n\n /**\n * The expected version number to ensure consistency.\n */\n version: VersionSchema.optional()\n })\n .strict();\n\n/**\n * Represents the proposed version of a document to be created or updated.\n * This can be validated before allowing the operation.\n */\nexport type SetDoc = z.infer<typeof SetDocSchema>;\n\n/**\n * @see DelDoc\n */\nexport const DelDocSchema = z\n .object({\n /**\n * The expected version number to ensure consistency.\n */\n version: VersionSchema.optional()\n })\n .strict();\n\n/**\n * Represents the proposed version of a document to be deleted.\n * This can be validated before allowing the operation.\n */\nexport type DelDoc = z.infer<typeof SetDocSchema>;\n\n/**\n * @see DocAssertSet\n */\nexport const DocAssertSetSchema = z\n .object({\n /**\n * The current version of the document before the operation.\n * Undefined if this is a new document.\n */\n current: DocSchema.optional(),\n\n /**\n * The proposed version of the document.\n * This can be validated before allowing the operation.\n */\n proposed: SetDocSchema\n })\n .strict();\n\n/**\n * Represents a validation check before setting a document.\n *\n * The developer can compare the `current` and `proposed` versions and\n * throw an error if their validation fails.\n */\nexport type DocAssertSet = z.infer<typeof DocAssertSetSchema>;\n\n/**\n * @see DocAssertDelete\n */\nexport const DocAssertDeleteSchema = z\n .object({\n /**\n * The current version of the document before the operation.\n * Undefined if the document does not exist.\n */\n current: DocSchema.optional(),\n\n /**\n * The proposed version of the document.\n * This can be validated before allowing the operation.\n */\n proposed: DelDocSchema\n })\n .strict();\n\n/**\n * Represents a validation check before deleting a document.\n *\n * The developer can compare the `current` and `proposed` versions and\n * throw an error if their validation fails.\n */\nexport type DocAssertDelete = z.infer<typeof DocAssertDeleteSchema>;\n", "import * as z from 'zod';\n\n/**\n * @see SatelliteEnv\n */\nexport const SatelliteEnvSchema = z.record(z.unknown());\n\n/**\n * Placeholder for future environment-specific configurations.\n *\n * Currently unused, but it may support features such as:\n * - Defining the execution mode (e.g., staging or production).\n * - Providing environment-specific values like `ckBtcLedgerId` for test or production.\n */\nexport type SatelliteEnv = z.infer<typeof SatelliteEnvSchema>;\n", "import * as z from 'zod';\nimport {CollectionsSchema} from '../schemas/collections';\nimport {RunFunctionSchema} from '../schemas/context';\nimport {OnSetDocContextSchema} from '../schemas/db/context';\nimport {SatelliteEnvSchema} from '../schemas/satellite.env';\n\n/**\n * A generic schema for defining hooks related to collections.\n *\n * @template T - The type of context passed to the hook when triggered.\n */\nconst OnHookSchema = <T extends z.ZodTypeAny>(contextSchema: T) =>\n CollectionsSchema.extend({\n /**\n * A function that runs when the hook is triggered for the specified collections.\n *\n * @param {T} context - Contains information about the affected document(s).\n * @returns {Promise<void>} Resolves when the operation completes.\n */\n run: RunFunctionSchema<T>(contextSchema)\n }).strict();\n\n/**\n * @see OnSetDoc\n */\nexport const OnSetDocSchema = OnHookSchema(OnSetDocContextSchema);\n\n/**\n * A hook that runs when a document is created or updated.\n */\nexport type OnSetDoc = z.infer<typeof OnSetDocSchema>;\n\n// TODO: to be extended\n/**\n * @see Hook\n */\nexport const HookSchema = OnSetDocSchema;\n\n/**\n * All hooks definitions.\n */\nexport type Hook = z.infer<typeof HookSchema>;\n\nexport const HookFnSchema = <T extends z.ZodTypeAny>(hookSchema: T) =>\n z.function().args(SatelliteEnvSchema).returns(hookSchema);\nexport type HookFn<T extends Hook> = (hook: z.infer<typeof SatelliteEnvSchema>) => T;\n\nexport const HookFnOrObjectSchema = <T extends z.ZodTypeAny>(hookSchema: T) =>\n z.union([hookSchema, HookFnSchema(hookSchema)]);\nexport type HookFnOrObject<T extends Hook> = T | HookFn<T>;\n\nexport function defineHook<T extends Hook>(hook: T): T;\nexport function defineHook<T extends Hook>(hook: HookFn<T>): HookFn<T>;\nexport function defineHook<T extends Hook>(hook: HookFnOrObject<T>): HookFnOrObject<T>;\nexport function defineHook<T extends Hook>(hook: HookFnOrObject<T>): HookFnOrObject<T> {\n return hook;\n}\n", "import {jsonReplacer} from '@dfinity/utils';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst __juno_satellite_console_log = (v: any[]) => {\n const msg = v\n .map((arg) => (typeof arg === 'object' ? JSON.stringify(arg, jsonReplacer) : arg))\n .join(' ');\n\n globalThis.__ic_cdk_print(msg);\n};\n\n// @ts-expect-error We want to override the console\nglobalThis.console = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n info(...v: any[]) {\n __juno_satellite_console_log(v);\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n log(...v: any[]) {\n __juno_satellite_console_log(v);\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n warn(...v: any[]) {\n __juno_satellite_console_log(v);\n },\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n error(...v: any[]) {\n __juno_satellite_console_log(v);\n }\n};\n"],
5
+ "mappings": "sJAAA,UAAYA,MAAO,MCAnB,UAAYC,MAAO,MAKZ,IAAMC,EACV,SAAO,CAKN,YAAe,QAAQ,SAAO,CAAC,EAAE,SAAS,CAC5C,CAAC,EACA,OAAO,ECZV,UAAYC,MAAO,MAMZ,IAAMC,EAA6CC,GAc/C,SAbW,CAIlB,OAAQC,EAKR,KAAMD,CACR,CAG2B,EAAE,OAAO,EAmBzBE,EAAgDC,GACzD,WAAS,EAAE,KAAKA,CAAa,EAAE,QAAU,OAAK,CAAC,EActCC,EAA6CD,GACtD,WAAS,EAAE,KAAKA,CAAa,EAAE,QAAU,UAAU,OAAK,CAAC,EAAE,GAAK,OAAK,CAAC,CAAC,ECvD3E,UAAYE,MAAO,MCDnB,UAAYC,MAAO,MAOZ,IAAMC,EACV,SAAO,CAKN,OAAQC,EAAU,SAAS,EAK3B,MAAOA,CACT,CAAC,EACA,OAAO,EAYGC,EACV,SAAO,CAIN,KAAMC,EAKN,YAAaC,EAAqB,SAAS,EAK3C,QAASC,EAAc,SAAS,CAClC,CAAC,EACA,OAAO,EAWGC,EACV,SAAO,CAIN,QAASD,EAAc,SAAS,CAClC,CAAC,EACA,OAAO,EAWGE,EACV,SAAO,CAKN,QAASN,EAAU,SAAS,EAM5B,SAAUC,CACZ,CAAC,EACA,OAAO,EAaGM,EACV,SAAO,CAKN,QAASP,EAAU,SAAS,EAM5B,SAAUK,CACZ,CAAC,EACA,OAAO,ED9GH,IAAMG,EAA4CC,GAmB9C,SAlBW,CAIlB,WAAYC,EAKZ,IAAKC,EAKL,KAAMF,CACR,CAG2B,EAAE,OAAO,EAmBzBG,EAAwBC,EAAkBL,EAAiBM,CAAe,CAAC,EAa3EC,EAA4BF,EAAkBL,EAAiBQ,CAAkB,CAAC,EAalFC,EAA+BJ,EAC1CL,EAAiBU,CAAqB,CACxC,EE3EA,UAAYC,MAAO,MAKZ,IAAMC,EAAuB,SAAS,UAAQ,CAAC,ELMtD,IAAMC,EAA0CC,GAC9CC,EAAkB,OAAO,CAOvB,OAAQC,EAAwBF,CAAa,CAC/C,CAAC,EAAE,OAAO,EAKCG,EAAqBJ,EAAeK,CAAyB,EAU7DC,EAAwBN,EAAeO,CAA4B,EAUnEC,GAAeJ,EAAmB,GAAGE,CAAqB,EAO1DG,EAA0CC,GACnD,WAAS,EAAE,KAAKC,CAAkB,EAAE,QAAQD,CAAY,EAG/CE,GAAkDF,GAC3D,QAAM,CAACA,EAAcD,EAAeC,CAAY,CAAC,CAAC,EAM/C,SAASG,GAA+BC,EAAkD,CAC/F,OAAOA,CACT,CMjEA,UAAYC,MAAO,MAWnB,IAAMC,EAAwCC,GAC5CC,EAAkB,OAAO,CAOvB,IAAKC,EAAqBF,CAAa,CACzC,CAAC,EAAE,OAAO,EAKCG,EAAiBJ,EAAaK,CAAqB,EAWnDC,GAAaF,EAObG,EAAwCC,GACjD,WAAS,EAAE,KAAKC,CAAkB,EAAE,QAAQD,CAAU,EAG7CE,GAAgDF,GACzD,QAAM,CAACA,EAAYD,EAAaC,CAAU,CAAC,CAAC,EAMzC,SAASG,GAA2BC,EAA4C,CACrF,OAAOA,CACT,CCxDA,OAAQ,gBAAAC,MAAmB,iBAG3B,IAAMC,EAAgCC,GAAa,CACjD,IAAMC,EAAMD,EACT,IAAKE,GAAS,OAAOA,GAAQ,SAAW,KAAK,UAAUA,EAAKJ,CAAY,EAAII,CAAI,EAChF,KAAK,GAAG,EAEX,WAAW,eAAeD,CAAG,CAC/B,EAGA,WAAW,QAAU,CAEnB,QAAQD,EAAU,CAChBD,EAA6BC,CAAC,CAChC,EAEA,OAAOA,EAAU,CACfD,EAA6BC,CAAC,CAChC,EAEA,QAAQA,EAAU,CAChBD,EAA6BC,CAAC,CAChC,EAEA,SAASA,EAAU,CACjBD,EAA6BC,CAAC,CAChC,CACF",
6
+ "names": ["z", "z", "CollectionsSchema", "z", "HookContextSchema", "dataSchema", "RawUserIdSchema", "AssertFunctionSchema", "contextSchema", "RunFunctionSchema", "z", "z", "DocUpsertSchema", "DocSchema", "SetDocSchema", "RawDataSchema", "DocDescriptionSchema", "VersionSchema", "DelDocSchema", "DocAssertSetSchema", "DocAssertDeleteSchema", "DocContextSchema", "dataSchema", "CollectionSchema", "KeySchema", "OnSetDocContextSchema", "HookContextSchema", "DocUpsertSchema", "AssertSetDocContextSchema", "DocAssertSetSchema", "AssertDeleteDocContextSchema", "DocAssertDeleteSchema", "z", "SatelliteEnvSchema", "OnAssertSchema", "contextSchema", "CollectionsSchema", "AssertFunctionSchema", "AssertSetDocSchema", "AssertSetDocContextSchema", "AssertDeleteDocSchema", "AssertDeleteDocContextSchema", "AssertSchema", "AssertFnSchema", "assertSchema", "SatelliteEnvSchema", "AssertFnOrObjectSchema", "defineAssert", "assert", "z", "OnHookSchema", "contextSchema", "CollectionsSchema", "RunFunctionSchema", "OnSetDocSchema", "OnSetDocContextSchema", "HookSchema", "HookFnSchema", "hookSchema", "SatelliteEnvSchema", "HookFnOrObjectSchema", "defineHook", "hook", "jsonReplacer", "__juno_satellite_console_log", "v", "msg", "arg"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/functions",
3
- "version": "0.0.11",
3
+ "version": "0.0.12-next-2025-03-27",
4
4
  "description": "JavaScript and TypeScript utilities for Juno Serverless Functions",
5
5
  "author": "David Dal Busco (https://daviddalbusco.com)",
6
6
  "license": "MIT",
@@ -46,11 +46,11 @@
46
46
  },
47
47
  "homepage": "https://juno.build",
48
48
  "peerDependencies": {
49
- "@dfinity/agent": "^2.3.0",
50
- "@dfinity/candid": "^2.3.0",
51
- "@dfinity/identity": "^2.3.0",
52
- "@dfinity/principal": "^2.3.0",
53
- "@dfinity/utils": "^2",
54
- "zod": "^3"
49
+ "@dfinity/agent": "*",
50
+ "@dfinity/candid": "*",
51
+ "@dfinity/identity": "*",
52
+ "@dfinity/principal": "*",
53
+ "@dfinity/utils": "*",
54
+ "zod": "*"
55
55
  }
56
- }
56
+ }