@walkeros/core 4.3.0-next-1783517345197 → 4.3.0-next-1784055686454

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @walkeros/core
2
2
 
3
- ## 4.3.0-next-1783517345197
3
+ ## 4.3.0-next-1784055686454
4
4
 
5
5
  ### Minor Changes
6
6
 
@@ -19,6 +19,12 @@
19
19
  to agents. Batching destinations now emit per-event records, and live-web
20
20
  vendor calls are captured when a destination reaches its callable through
21
21
  `getEnv`, though batched sends stay uncaptured.
22
+ - f8408fd: Preview links are now app-signed and bound to your site's origin,
23
+ verified locally in the bundle with no server round trip. Bundles that support
24
+ preview activation import a new `browserSwapActivator` from `@walkeros/core`.
25
+ The CLI wrap step's `preview` option replaces `previewOrigin`/`previewScope`,
26
+ and a new `previewGrantTargets` option lets a preview forward its grant to
27
+ server-bound destinations too.
22
28
  - 9506e3e: Events now carry per-flow config provenance on
23
29
  `event.source.release`, a flow-name to release map that accumulates as an
24
30
  event crosses flows (web capture to server processing), so a delivered event
package/dist/dev.d.mts CHANGED
@@ -301,6 +301,28 @@ declare const UserSchema: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodOption
301
301
  * (browser, dataLayer, gtag, ...). All other fields are optional since each
302
302
  * source kind augments this differently via `SourceMap`.
303
303
  */
304
+ /**
305
+ * Declared Source fields as a standalone object schema. Composed into
306
+ * SourceSchema below. Also the drift guard's index-free key source: unlike
307
+ * `PropertiesSchema.and(...)`, a plain object schema keeps `keyof z.infer` to
308
+ * the declared field names, so it can be compared against
309
+ * `WalkerOS.SourceFields` (see __tests__/config-drift.test-d.ts). Not added to
310
+ * the schemas/index.ts curated exports and carries no `.meta` id, so it is not
311
+ * registered for JSON-schema/OpenAPI generation.
312
+ */
313
+ declare const SourceFieldsSchema: z.ZodObject<{
314
+ type: z.ZodString;
315
+ platform: z.ZodOptional<z.ZodString>;
316
+ version: z.ZodOptional<z.ZodString>;
317
+ schema: z.ZodOptional<z.ZodString>;
318
+ count: z.ZodOptional<z.ZodNumber>;
319
+ trace: z.ZodOptional<z.ZodString>;
320
+ release: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
321
+ url: z.ZodOptional<z.ZodString>;
322
+ referrer: z.ZodOptional<z.ZodString>;
323
+ tool: z.ZodOptional<z.ZodString>;
324
+ command: z.ZodOptional<z.ZodString>;
325
+ }, z.core.$strip>;
304
326
  declare const SourceSchema$1: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>, z.ZodObject<{
305
327
  type: z.ZodString;
306
328
  platform: z.ZodOptional<z.ZodString>;
@@ -487,6 +509,7 @@ declare const walkeros_PartialEventSchema: typeof PartialEventSchema;
487
509
  declare const walkeros_PropertiesSchema: typeof PropertiesSchema;
488
510
  declare const walkeros_PropertySchema: typeof PropertySchema;
489
511
  declare const walkeros_PropertyTypeSchema: typeof PropertyTypeSchema;
512
+ declare const walkeros_SourceFieldsSchema: typeof SourceFieldsSchema;
490
513
  declare const walkeros_SourceTypeSchema: typeof SourceTypeSchema;
491
514
  declare const walkeros_UserSchema: typeof UserSchema;
492
515
  declare const walkeros_consentJsonSchema: typeof consentJsonSchema;
@@ -498,7 +521,7 @@ declare const walkeros_propertiesJsonSchema: typeof propertiesJsonSchema;
498
521
  declare const walkeros_sourceTypeJsonSchema: typeof sourceTypeJsonSchema;
499
522
  declare const walkeros_userJsonSchema: typeof userJsonSchema;
500
523
  declare namespace walkeros {
501
- export { walkeros_ConsentSchema as ConsentSchema, walkeros_DeepPartialEventSchema as DeepPartialEventSchema, walkeros_EntitiesSchema as EntitiesSchema, walkeros_EntitySchema as EntitySchema, walkeros_EventSchema as EventSchema, walkeros_OrderedPropertiesSchema as OrderedPropertiesSchema, walkeros_PartialEventSchema as PartialEventSchema, walkeros_PropertiesSchema as PropertiesSchema, walkeros_PropertySchema as PropertySchema, walkeros_PropertyTypeSchema as PropertyTypeSchema, SourceSchema$1 as SourceSchema, walkeros_SourceTypeSchema as SourceTypeSchema, walkeros_UserSchema as UserSchema, walkeros_consentJsonSchema as consentJsonSchema, walkeros_entityJsonSchema as entityJsonSchema, walkeros_eventJsonSchema as eventJsonSchema, walkeros_orderedPropertiesJsonSchema as orderedPropertiesJsonSchema, walkeros_partialEventJsonSchema as partialEventJsonSchema, walkeros_propertiesJsonSchema as propertiesJsonSchema, walkeros_sourceTypeJsonSchema as sourceTypeJsonSchema, walkeros_userJsonSchema as userJsonSchema };
524
+ export { walkeros_ConsentSchema as ConsentSchema, walkeros_DeepPartialEventSchema as DeepPartialEventSchema, walkeros_EntitiesSchema as EntitiesSchema, walkeros_EntitySchema as EntitySchema, walkeros_EventSchema as EventSchema, walkeros_OrderedPropertiesSchema as OrderedPropertiesSchema, walkeros_PartialEventSchema as PartialEventSchema, walkeros_PropertiesSchema as PropertiesSchema, walkeros_PropertySchema as PropertySchema, walkeros_PropertyTypeSchema as PropertyTypeSchema, walkeros_SourceFieldsSchema as SourceFieldsSchema, SourceSchema$1 as SourceSchema, walkeros_SourceTypeSchema as SourceTypeSchema, walkeros_UserSchema as UserSchema, walkeros_consentJsonSchema as consentJsonSchema, walkeros_entityJsonSchema as entityJsonSchema, walkeros_eventJsonSchema as eventJsonSchema, walkeros_orderedPropertiesJsonSchema as orderedPropertiesJsonSchema, walkeros_partialEventJsonSchema as partialEventJsonSchema, walkeros_propertiesJsonSchema as propertiesJsonSchema, walkeros_sourceTypeJsonSchema as sourceTypeJsonSchema, walkeros_userJsonSchema as userJsonSchema };
502
525
  }
503
526
 
504
527
  /**
@@ -8846,7 +8869,15 @@ interface User extends Properties {
8846
8869
  internal?: boolean;
8847
8870
  }
8848
8871
  type SourcePlatform = 'web' | 'server' | 'app' | 'ios' | 'android' | 'terminal' | string;
8849
- interface Source extends Properties {
8872
+ /**
8873
+ * Declared (named) fields of an event Source. Kept as a standalone interface so
8874
+ * its key set stays index-signature-free: `Source extends Properties` adds a
8875
+ * string index signature that collapses `keyof Source` to `string | number`,
8876
+ * which would defeat the type↔schema drift guard. The guard compares
8877
+ * `keyof SourceFields` against `keyof z.infer<typeof SourceFieldsSchema>`
8878
+ * (see schemas/__tests__/config-drift.test-d.ts).
8879
+ */
8880
+ interface SourceFields {
8850
8881
  type: string;
8851
8882
  platform?: SourcePlatform;
8852
8883
  /** Deployment version of the source emitter (string). */
@@ -8865,6 +8896,8 @@ interface Source extends Properties {
8865
8896
  tool?: string;
8866
8897
  command?: string;
8867
8898
  }
8899
+ interface Source extends Properties, SourceFields {
8900
+ }
8868
8901
  type PropertyType = boolean | string | number | {
8869
8902
  [key: string]: Property;
8870
8903
  };
package/dist/dev.d.ts CHANGED
@@ -301,6 +301,28 @@ declare const UserSchema: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodOption
301
301
  * (browser, dataLayer, gtag, ...). All other fields are optional since each
302
302
  * source kind augments this differently via `SourceMap`.
303
303
  */
304
+ /**
305
+ * Declared Source fields as a standalone object schema. Composed into
306
+ * SourceSchema below. Also the drift guard's index-free key source: unlike
307
+ * `PropertiesSchema.and(...)`, a plain object schema keeps `keyof z.infer` to
308
+ * the declared field names, so it can be compared against
309
+ * `WalkerOS.SourceFields` (see __tests__/config-drift.test-d.ts). Not added to
310
+ * the schemas/index.ts curated exports and carries no `.meta` id, so it is not
311
+ * registered for JSON-schema/OpenAPI generation.
312
+ */
313
+ declare const SourceFieldsSchema: z.ZodObject<{
314
+ type: z.ZodString;
315
+ platform: z.ZodOptional<z.ZodString>;
316
+ version: z.ZodOptional<z.ZodString>;
317
+ schema: z.ZodOptional<z.ZodString>;
318
+ count: z.ZodOptional<z.ZodNumber>;
319
+ trace: z.ZodOptional<z.ZodString>;
320
+ release: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
321
+ url: z.ZodOptional<z.ZodString>;
322
+ referrer: z.ZodOptional<z.ZodString>;
323
+ tool: z.ZodOptional<z.ZodString>;
324
+ command: z.ZodOptional<z.ZodString>;
325
+ }, z.core.$strip>;
304
326
  declare const SourceSchema$1: z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>, z.ZodObject<{
305
327
  type: z.ZodString;
306
328
  platform: z.ZodOptional<z.ZodString>;
@@ -487,6 +509,7 @@ declare const walkeros_PartialEventSchema: typeof PartialEventSchema;
487
509
  declare const walkeros_PropertiesSchema: typeof PropertiesSchema;
488
510
  declare const walkeros_PropertySchema: typeof PropertySchema;
489
511
  declare const walkeros_PropertyTypeSchema: typeof PropertyTypeSchema;
512
+ declare const walkeros_SourceFieldsSchema: typeof SourceFieldsSchema;
490
513
  declare const walkeros_SourceTypeSchema: typeof SourceTypeSchema;
491
514
  declare const walkeros_UserSchema: typeof UserSchema;
492
515
  declare const walkeros_consentJsonSchema: typeof consentJsonSchema;
@@ -498,7 +521,7 @@ declare const walkeros_propertiesJsonSchema: typeof propertiesJsonSchema;
498
521
  declare const walkeros_sourceTypeJsonSchema: typeof sourceTypeJsonSchema;
499
522
  declare const walkeros_userJsonSchema: typeof userJsonSchema;
500
523
  declare namespace walkeros {
501
- export { walkeros_ConsentSchema as ConsentSchema, walkeros_DeepPartialEventSchema as DeepPartialEventSchema, walkeros_EntitiesSchema as EntitiesSchema, walkeros_EntitySchema as EntitySchema, walkeros_EventSchema as EventSchema, walkeros_OrderedPropertiesSchema as OrderedPropertiesSchema, walkeros_PartialEventSchema as PartialEventSchema, walkeros_PropertiesSchema as PropertiesSchema, walkeros_PropertySchema as PropertySchema, walkeros_PropertyTypeSchema as PropertyTypeSchema, SourceSchema$1 as SourceSchema, walkeros_SourceTypeSchema as SourceTypeSchema, walkeros_UserSchema as UserSchema, walkeros_consentJsonSchema as consentJsonSchema, walkeros_entityJsonSchema as entityJsonSchema, walkeros_eventJsonSchema as eventJsonSchema, walkeros_orderedPropertiesJsonSchema as orderedPropertiesJsonSchema, walkeros_partialEventJsonSchema as partialEventJsonSchema, walkeros_propertiesJsonSchema as propertiesJsonSchema, walkeros_sourceTypeJsonSchema as sourceTypeJsonSchema, walkeros_userJsonSchema as userJsonSchema };
524
+ export { walkeros_ConsentSchema as ConsentSchema, walkeros_DeepPartialEventSchema as DeepPartialEventSchema, walkeros_EntitiesSchema as EntitiesSchema, walkeros_EntitySchema as EntitySchema, walkeros_EventSchema as EventSchema, walkeros_OrderedPropertiesSchema as OrderedPropertiesSchema, walkeros_PartialEventSchema as PartialEventSchema, walkeros_PropertiesSchema as PropertiesSchema, walkeros_PropertySchema as PropertySchema, walkeros_PropertyTypeSchema as PropertyTypeSchema, walkeros_SourceFieldsSchema as SourceFieldsSchema, SourceSchema$1 as SourceSchema, walkeros_SourceTypeSchema as SourceTypeSchema, walkeros_UserSchema as UserSchema, walkeros_consentJsonSchema as consentJsonSchema, walkeros_entityJsonSchema as entityJsonSchema, walkeros_eventJsonSchema as eventJsonSchema, walkeros_orderedPropertiesJsonSchema as orderedPropertiesJsonSchema, walkeros_partialEventJsonSchema as partialEventJsonSchema, walkeros_propertiesJsonSchema as propertiesJsonSchema, walkeros_sourceTypeJsonSchema as sourceTypeJsonSchema, walkeros_userJsonSchema as userJsonSchema };
502
525
  }
503
526
 
504
527
  /**
@@ -8846,7 +8869,15 @@ interface User extends Properties {
8846
8869
  internal?: boolean;
8847
8870
  }
8848
8871
  type SourcePlatform = 'web' | 'server' | 'app' | 'ios' | 'android' | 'terminal' | string;
8849
- interface Source extends Properties {
8872
+ /**
8873
+ * Declared (named) fields of an event Source. Kept as a standalone interface so
8874
+ * its key set stays index-signature-free: `Source extends Properties` adds a
8875
+ * string index signature that collapses `keyof Source` to `string | number`,
8876
+ * which would defeat the type↔schema drift guard. The guard compares
8877
+ * `keyof SourceFields` against `keyof z.infer<typeof SourceFieldsSchema>`
8878
+ * (see schemas/__tests__/config-drift.test-d.ts).
8879
+ */
8880
+ interface SourceFields {
8850
8881
  type: string;
8851
8882
  platform?: SourcePlatform;
8852
8883
  /** Deployment version of the source emitter (string). */
@@ -8865,6 +8896,8 @@ interface Source extends Properties {
8865
8896
  tool?: string;
8866
8897
  command?: string;
8867
8898
  }
8899
+ interface Source extends Properties, SourceFields {
8900
+ }
8868
8901
  type PropertyType = boolean | string | number | {
8869
8902
  [key: string]: Property;
8870
8903
  };