@zuplo/cli 6.73.24 → 6.73.26

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.
Files changed (49) hide show
  1. package/node_modules/@posthog/core/dist/surveys/activation.d.ts +8 -0
  2. package/node_modules/@posthog/core/dist/surveys/activation.d.ts.map +1 -1
  3. package/node_modules/@posthog/core/dist/surveys/activation.js +7 -1
  4. package/node_modules/@posthog/core/dist/surveys/activation.mjs +4 -1
  5. package/node_modules/@posthog/core/dist/surveys/index.d.ts +1 -1
  6. package/node_modules/@posthog/core/dist/surveys/index.d.ts.map +1 -1
  7. package/node_modules/@posthog/core/dist/surveys/index.js +3 -0
  8. package/node_modules/@posthog/core/dist/surveys/index.mjs +2 -2
  9. package/node_modules/@posthog/core/package.json +1 -1
  10. package/node_modules/@posthog/core/src/surveys/activation.ts +12 -0
  11. package/node_modules/@posthog/core/src/surveys/index.ts +1 -1
  12. package/node_modules/@zuplo/core/customer.cli.minified.js +205 -205
  13. package/node_modules/@zuplo/core/index.minified.js +210 -210
  14. package/node_modules/@zuplo/core/package.json +1 -1
  15. package/node_modules/@zuplo/graphql/package.json +1 -1
  16. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  17. package/node_modules/@zuplo/otel/package.json +1 -1
  18. package/node_modules/@zuplo/runtime/out/esm/chunk-A3425Z75.js +26 -0
  19. package/node_modules/@zuplo/runtime/out/esm/chunk-A3425Z75.js.map +1 -0
  20. package/node_modules/@zuplo/runtime/out/esm/{chunk-FPZAMUNA.js → chunk-PEUB7LX7.js} +2 -2
  21. package/node_modules/@zuplo/runtime/out/esm/chunk-PEUB7LX7.js.map +1 -0
  22. package/node_modules/@zuplo/runtime/out/esm/chunk-RB2LCXBX.js +26 -0
  23. package/node_modules/@zuplo/runtime/out/esm/chunk-RB2LCXBX.js.map +1 -0
  24. package/node_modules/@zuplo/runtime/out/esm/{chunk-SNZSLL63.js → chunk-SL6SOWIV.js} +2 -2
  25. package/node_modules/@zuplo/runtime/out/esm/chunk-TRBIM47E.js +26 -0
  26. package/node_modules/@zuplo/runtime/out/esm/chunk-TRBIM47E.js.map +1 -0
  27. package/node_modules/@zuplo/runtime/out/esm/{chunk-QWO5UTVQ.js → chunk-V4X24KCQ.js} +4 -4
  28. package/node_modules/@zuplo/runtime/out/esm/chunk-V4X24KCQ.js.map +1 -0
  29. package/node_modules/@zuplo/runtime/out/esm/{chunk-R7PMDIH4.js → chunk-WK5G5RKI.js} +108 -108
  30. package/node_modules/@zuplo/runtime/out/esm/chunk-WK5G5RKI.js.map +1 -0
  31. package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
  32. package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
  33. package/node_modules/@zuplo/runtime/out/esm/internal/index.js +1 -1
  34. package/node_modules/@zuplo/runtime/out/esm/mcp/messages/index.js +1 -1
  35. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
  36. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
  37. package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js +1 -1
  38. package/node_modules/@zuplo/runtime/out/esm/sdks/aws/index.js.map +1 -1
  39. package/node_modules/@zuplo/runtime/out/types/index.d.ts +28 -21
  40. package/node_modules/@zuplo/runtime/out/types/internal/index.d.ts +787 -0
  41. package/node_modules/@zuplo/runtime/package.json +2 -2
  42. package/package.json +6 -6
  43. package/node_modules/@zuplo/runtime/out/esm/chunk-FPZAMUNA.js.map +0 -1
  44. package/node_modules/@zuplo/runtime/out/esm/chunk-QWO5UTVQ.js.map +0 -1
  45. package/node_modules/@zuplo/runtime/out/esm/chunk-R7PMDIH4.js.map +0 -1
  46. package/node_modules/@zuplo/runtime/out/esm/chunk-US6ITPGV.js +0 -26
  47. package/node_modules/@zuplo/runtime/out/esm/chunk-US6ITPGV.js.map +0 -1
  48. /package/node_modules/@zuplo/runtime/out/esm/{chunk-SNZSLL63.js.map → chunk-SL6SOWIV.js.map} +0 -0
  49. /package/node_modules/@zuplo/runtime/out/esm/{chunk-R7PMDIH4.js.LEGAL.txt → chunk-WK5G5RKI.js.LEGAL.txt} +0 -0
@@ -16,5 +16,13 @@ export declare function doesSurveyActivateByEvent(survey: SurveyForRepeatActivat
16
16
  * platform-specific state (e.g. the web SDK's in-progress partial responses).
17
17
  */
18
18
  export declare function canSurveyActivateRepeatedly(survey: SurveyForRepeatActivation): boolean;
19
+ type SurveyForIterationCheck = Pick<Survey, 'schedule' | 'current_iteration'>;
20
+ /**
21
+ * True when a survey is meant to come back around on its own: a recurring schedule, or an
22
+ * iteration already under way. Stored display state is keyed by iteration
23
+ * (see `getSurveyIterationKey`), so for these surveys it rolls over and stops being a
24
+ * dependable "already answered" record; other surveys keep one stable key for good.
25
+ */
26
+ export declare function isSurveyIterationBased(survey: SurveyForIterationCheck): boolean;
19
27
  export {};
20
28
  //# sourceMappingURL=activation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"activation.d.ts","sourceRoot":"","sources":["../../src/surveys/activation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAkB,MAAM,UAAU,CAAA;AAIjD,KAAK,yBAAyB,GAAG,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG;IAC1D,UAAU,CAAC,EAAE;QACX,MAAM,CAAC,EAAE;YACP,kBAAkB,CAAC,EAAE,OAAO,CAAA;YAC5B,MAAM,CAAC,EAAE;gBAAE,IAAI,EAAE,MAAM,CAAA;aAAE,EAAE,CAAA;SAC5B,GAAG,IAAI,CAAA;KACT,GAAG,IAAI,CAAA;CACT,CAAA;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAEpF;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAKtF"}
1
+ {"version":3,"file":"activation.d.ts","sourceRoot":"","sources":["../../src/surveys/activation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAkB,MAAM,UAAU,CAAA;AAIjD,KAAK,yBAAyB,GAAG,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG;IAC1D,UAAU,CAAC,EAAE;QACX,MAAM,CAAC,EAAE;YACP,kBAAkB,CAAC,EAAE,OAAO,CAAA;YAC5B,MAAM,CAAC,EAAE;gBAAE,IAAI,EAAE,MAAM,CAAA;aAAE,EAAE,CAAA;SAC5B,GAAG,IAAI,CAAA;KACT,GAAG,IAAI,CAAA;CACT,CAAA;AAED,wBAAgB,yBAAyB,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAEpF;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,yBAAyB,GAAG,OAAO,CAKtF;AAED,KAAK,uBAAuB,GAAG,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,mBAAmB,CAAC,CAAA;AAE7E;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAE/E"}
@@ -25,6 +25,7 @@ var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
27
  doesSurveyActivateByEvent: ()=>doesSurveyActivateByEvent,
28
+ isSurveyIterationBased: ()=>isSurveyIterationBased,
28
29
  canSurveyActivateRepeatedly: ()=>canSurveyActivateRepeatedly
29
30
  });
30
31
  const external_types_js_namespaceObject = require("../types.js");
@@ -34,11 +35,16 @@ function doesSurveyActivateByEvent(survey) {
34
35
  function canSurveyActivateRepeatedly(survey) {
35
36
  return doesSurveyActivateByEvent(survey) && !!survey.conditions?.events?.repeatedActivation || survey.schedule === external_types_js_namespaceObject.SurveySchedule.Always;
36
37
  }
38
+ function isSurveyIterationBased(survey) {
39
+ return survey.schedule === external_types_js_namespaceObject.SurveySchedule.Recurring || (survey.current_iteration ?? 0) > 0;
40
+ }
37
41
  exports.canSurveyActivateRepeatedly = __webpack_exports__.canSurveyActivateRepeatedly;
38
42
  exports.doesSurveyActivateByEvent = __webpack_exports__.doesSurveyActivateByEvent;
43
+ exports.isSurveyIterationBased = __webpack_exports__.isSurveyIterationBased;
39
44
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
40
45
  "canSurveyActivateRepeatedly",
41
- "doesSurveyActivateByEvent"
46
+ "doesSurveyActivateByEvent",
47
+ "isSurveyIterationBased"
42
48
  ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
43
49
  Object.defineProperty(exports, '__esModule', {
44
50
  value: true
@@ -5,4 +5,7 @@ function doesSurveyActivateByEvent(survey) {
5
5
  function canSurveyActivateRepeatedly(survey) {
6
6
  return doesSurveyActivateByEvent(survey) && !!survey.conditions?.events?.repeatedActivation || survey.schedule === SurveySchedule.Always;
7
7
  }
8
- export { canSurveyActivateRepeatedly, doesSurveyActivateByEvent };
8
+ function isSurveyIterationBased(survey) {
9
+ return survey.schedule === SurveySchedule.Recurring || (survey.current_iteration ?? 0) > 0;
10
+ }
11
+ export { canSurveyActivateRepeatedly, doesSurveyActivateByEvent, isSurveyIterationBased };
@@ -1,6 +1,6 @@
1
1
  export { getValidationError, getLengthFromRules, getRequirementsHint } from './validation';
2
2
  export { buildSurveyResponseProperties, getSurveyInteractionProperty, getSurveyOldResponseKey, getSurveyResponseKey, getSurveyResponseValue, SURVEY_LANGUAGE_PROPERTY, surveyHasResponses, } from './events';
3
3
  export { applySurveyTranslation, detectSurveyLanguage, findBestTranslationMatch, getBaseLanguage, getLanguageFromStoredPersonProperties, normalizeLanguageCode, } from './translations';
4
- export { canSurveyActivateRepeatedly, doesSurveyActivateByEvent } from './activation';
4
+ export { canSurveyActivateRepeatedly, doesSurveyActivateByEvent, isSurveyIterationBased } from './activation';
5
5
  export { getSurveyIterationKey, isSurveyKeyForSurvey, type SurveyWithIteration } from './keys';
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/surveys/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAC1F,OAAO,EACL,6BAA6B,EAC7B,4BAA4B,EAC5B,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,eAAe,EACf,qCAAqC,EACrC,qBAAqB,GACtB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AACrF,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,KAAK,mBAAmB,EAAE,MAAM,QAAQ,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/surveys/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAC1F,OAAO,EACL,6BAA6B,EAC7B,4BAA4B,EAC5B,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACtB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,UAAU,CAAA;AACjB,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,eAAe,EACf,qCAAqC,EACrC,qBAAqB,GACtB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAA;AAC7G,OAAO,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,KAAK,mBAAmB,EAAE,MAAM,QAAQ,CAAA"}
@@ -28,6 +28,7 @@ __webpack_require__.d(__webpack_exports__, {
28
28
  getSurveyOldResponseKey: ()=>external_events_js_namespaceObject.getSurveyOldResponseKey,
29
29
  getBaseLanguage: ()=>external_translations_js_namespaceObject.getBaseLanguage,
30
30
  getSurveyResponseValue: ()=>external_events_js_namespaceObject.getSurveyResponseValue,
31
+ isSurveyIterationBased: ()=>external_activation_js_namespaceObject.isSurveyIterationBased,
31
32
  SURVEY_LANGUAGE_PROPERTY: ()=>external_events_js_namespaceObject.SURVEY_LANGUAGE_PROPERTY,
32
33
  detectSurveyLanguage: ()=>external_translations_js_namespaceObject.detectSurveyLanguage,
33
34
  applySurveyTranslation: ()=>external_translations_js_namespaceObject.applySurveyTranslation,
@@ -67,6 +68,7 @@ exports.getSurveyOldResponseKey = __webpack_exports__.getSurveyOldResponseKey;
67
68
  exports.getSurveyResponseKey = __webpack_exports__.getSurveyResponseKey;
68
69
  exports.getSurveyResponseValue = __webpack_exports__.getSurveyResponseValue;
69
70
  exports.getValidationError = __webpack_exports__.getValidationError;
71
+ exports.isSurveyIterationBased = __webpack_exports__.isSurveyIterationBased;
70
72
  exports.isSurveyKeyForSurvey = __webpack_exports__.isSurveyKeyForSurvey;
71
73
  exports.normalizeLanguageCode = __webpack_exports__.normalizeLanguageCode;
72
74
  exports.surveyHasResponses = __webpack_exports__.surveyHasResponses;
@@ -88,6 +90,7 @@ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
88
90
  "getSurveyResponseKey",
89
91
  "getSurveyResponseValue",
90
92
  "getValidationError",
93
+ "isSurveyIterationBased",
91
94
  "isSurveyKeyForSurvey",
92
95
  "normalizeLanguageCode",
93
96
  "surveyHasResponses"
@@ -1,6 +1,6 @@
1
1
  import { getLengthFromRules, getRequirementsHint, getValidationError } from "./validation.mjs";
2
2
  import { SURVEY_LANGUAGE_PROPERTY, buildSurveyResponseProperties, getSurveyInteractionProperty, getSurveyOldResponseKey, getSurveyResponseKey, getSurveyResponseValue, surveyHasResponses } from "./events.mjs";
3
3
  import { applySurveyTranslation, detectSurveyLanguage, findBestTranslationMatch, getBaseLanguage, getLanguageFromStoredPersonProperties, normalizeLanguageCode } from "./translations.mjs";
4
- import { canSurveyActivateRepeatedly, doesSurveyActivateByEvent } from "./activation.mjs";
4
+ import { canSurveyActivateRepeatedly, doesSurveyActivateByEvent, isSurveyIterationBased } from "./activation.mjs";
5
5
  import { getSurveyIterationKey, isSurveyKeyForSurvey } from "./keys.mjs";
6
- export { SURVEY_LANGUAGE_PROPERTY, applySurveyTranslation, buildSurveyResponseProperties, canSurveyActivateRepeatedly, detectSurveyLanguage, doesSurveyActivateByEvent, findBestTranslationMatch, getBaseLanguage, getLanguageFromStoredPersonProperties, getLengthFromRules, getRequirementsHint, getSurveyInteractionProperty, getSurveyIterationKey, getSurveyOldResponseKey, getSurveyResponseKey, getSurveyResponseValue, getValidationError, isSurveyKeyForSurvey, normalizeLanguageCode, surveyHasResponses };
6
+ export { SURVEY_LANGUAGE_PROPERTY, applySurveyTranslation, buildSurveyResponseProperties, canSurveyActivateRepeatedly, detectSurveyLanguage, doesSurveyActivateByEvent, findBestTranslationMatch, getBaseLanguage, getLanguageFromStoredPersonProperties, getLengthFromRules, getRequirementsHint, getSurveyInteractionProperty, getSurveyIterationKey, getSurveyOldResponseKey, getSurveyResponseKey, getSurveyResponseValue, getValidationError, isSurveyIterationBased, isSurveyKeyForSurvey, normalizeLanguageCode, surveyHasResponses };
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posthog/core",
3
- "version": "1.45.1",
3
+ "version": "1.45.2",
4
4
  "bugs": {
5
5
  "url": "https://github.com/PostHog/posthog-js/issues"
6
6
  },
@@ -26,3 +26,15 @@ export function canSurveyActivateRepeatedly(survey: SurveyForRepeatActivation):
26
26
  survey.schedule === SurveySchedule.Always
27
27
  )
28
28
  }
29
+
30
+ type SurveyForIterationCheck = Pick<Survey, 'schedule' | 'current_iteration'>
31
+
32
+ /**
33
+ * True when a survey is meant to come back around on its own: a recurring schedule, or an
34
+ * iteration already under way. Stored display state is keyed by iteration
35
+ * (see `getSurveyIterationKey`), so for these surveys it rolls over and stops being a
36
+ * dependable "already answered" record; other surveys keep one stable key for good.
37
+ */
38
+ export function isSurveyIterationBased(survey: SurveyForIterationCheck): boolean {
39
+ return survey.schedule === SurveySchedule.Recurring || (survey.current_iteration ?? 0) > 0
40
+ }
@@ -16,5 +16,5 @@ export {
16
16
  getLanguageFromStoredPersonProperties,
17
17
  normalizeLanguageCode,
18
18
  } from './translations'
19
- export { canSurveyActivateRepeatedly, doesSurveyActivateByEvent } from './activation'
19
+ export { canSurveyActivateRepeatedly, doesSurveyActivateByEvent, isSurveyIterationBased } from './activation'
20
20
  export { getSurveyIterationKey, isSurveyKeyForSurvey, type SurveyWithIteration } from './keys'