@webiny/project 6.6.0-alpha.11 → 6.6.0-alpha.13

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 (54) hide show
  1. package/components/FeatureFlag.js +9 -9
  2. package/components/FeatureFlag.js.map +1 -1
  3. package/defineExtension/createExtensionReactComponent.js.map +1 -1
  4. package/extensions/AdminWebsocketsUrl.d.ts +5 -3
  5. package/extensions/AdminWebsocketsUrl.js +1 -1
  6. package/extensions/AdminWebsocketsUrl.js.map +1 -1
  7. package/extensions/DatabaseSetup.d.ts +1 -0
  8. package/extensions/DatabaseSetup.js +4 -3
  9. package/extensions/DatabaseSetup.js.map +1 -1
  10. package/extensions/FeatureFlags.d.ts +1 -0
  11. package/extensions/FeatureFlags.js +1 -0
  12. package/extensions/FeatureFlags.js.map +1 -1
  13. package/extensions/api/BackgroundTasks.js +1 -1
  14. package/extensions/api/BackgroundTasks.js.map +1 -1
  15. package/extensions/api/Cms/ModelFieldCompression.js +1 -1
  16. package/extensions/api/Cms/ModelFieldCompression.js.map +1 -1
  17. package/extensions/api/Route/ApiRoute.js +1 -1
  18. package/extensions/api/Route/ApiRoute.js.map +1 -1
  19. package/extensions/api/Route/routePath.d.ts +2 -1
  20. package/extensions/api/Route/routePath.js.map +1 -1
  21. package/extensions/api/index.d.ts +0 -2
  22. package/extensions/api/index.js +0 -2
  23. package/extensions/index.d.ts +8 -13
  24. package/extensions/index.js +2 -3
  25. package/extensions/index.js.map +1 -1
  26. package/features/BuildApp/PackagesBuilder/worker.js +6 -6
  27. package/features/BuildApp/PackagesBuilder/worker.js.map +1 -1
  28. package/features/Watch/watchers/worker.js +6 -6
  29. package/features/Watch/watchers/worker.js.map +1 -1
  30. package/package.json +18 -19
  31. package/services/GetProjectConfigService/EnvContext.js.map +1 -1
  32. package/services/GetProjectConfigService/FeatureFlagsContext.js.map +1 -1
  33. package/services/GetProjectConfigService/ProductionEnvironmentsContext.js.map +1 -1
  34. package/services/GetProjectConfigService/WcpProjectLicenseContext.d.ts +1 -0
  35. package/services/GetProjectConfigService/WcpProjectLicenseContext.js +2 -1
  36. package/services/GetProjectConfigService/WcpProjectLicenseContext.js.map +1 -1
  37. package/services/InstallExtensionService/updateWebinyConfig.js +9 -23
  38. package/services/InstallExtensionService/updateWebinyConfig.js.map +1 -1
  39. package/services/SetProjectIdService/SetProjectIdService.js +2 -7
  40. package/services/SetProjectIdService/SetProjectIdService.js.map +1 -1
  41. package/utils/ensureNamedImport.d.ts +12 -0
  42. package/utils/ensureNamedImport.js +27 -0
  43. package/utils/ensureNamedImport.js.map +1 -0
  44. package/utils/index.d.ts +1 -0
  45. package/utils/index.js +1 -0
  46. package/extensions/api/Mailer/Smtp.d.ts +0 -8
  47. package/extensions/api/Mailer/Smtp.js +0 -22
  48. package/extensions/api/Mailer/Smtp.js.map +0 -1
  49. package/extensions/api/Mailer/Smtp.test.d.ts +0 -1
  50. package/extensions/api/Mailer/Smtp.test.js +0 -127
  51. package/extensions/api/Mailer/Smtp.test.js.map +0 -1
  52. package/extensions/api/Mailer/SmtpParamsSchema.d.ts +0 -9
  53. package/extensions/api/Mailer/SmtpParamsSchema.js +0 -17
  54. package/extensions/api/Mailer/SmtpParamsSchema.js.map +0 -1
@@ -44,15 +44,15 @@ function CanUseWebhooks({ children }) {
44
44
  return flags.isExplicitlyDisabled("webhooks") ? null : /*#__PURE__*/ react.createElement(react.Fragment, null, children);
45
45
  }
46
46
  const FeatureFlag = {
47
- CanUse: CanUse,
48
- CanUseMultiTenancy: CanUseMultiTenancy,
49
- CanUseWorkflows: CanUseWorkflows,
50
- CanUseTeams: CanUseTeams,
51
- CanUsePrivateFiles: CanUsePrivateFiles,
52
- CanUseFileManagerThreatDetection: CanUseFileManagerThreatDetection,
53
- CanUseHcmsFieldPermissions: CanUseHcmsFieldPermissions,
54
- CanUseAiPowerups: CanUseAiPowerups,
55
- CanUseWebhooks: CanUseWebhooks
47
+ CanUse,
48
+ CanUseMultiTenancy,
49
+ CanUseWorkflows,
50
+ CanUseTeams,
51
+ CanUsePrivateFiles,
52
+ CanUseFileManagerThreatDetection,
53
+ CanUseHcmsFieldPermissions,
54
+ CanUseAiPowerups,
55
+ CanUseWebhooks
56
56
  };
57
57
  export { FeatureFlag };
58
58
 
@@ -1 +1 @@
1
- {"version":3,"file":"components/FeatureFlag.js","sources":["../../src/components/FeatureFlag.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FeatureFlagName } from \"@webiny/feature-flags\";\nimport { useProjectFeatureFlags } from \"~/services/GetProjectConfigService/FeatureFlagsContext.js\";\n\ninterface CanUseProps {\n name: FeatureFlagName;\n children: React.ReactNode;\n}\n\nfunction CanUse({ name, children }: CanUseProps) {\n const flags = useProjectFeatureFlags();\n return flags.isEnabled(name) ? <>{children}</> : null;\n}\n\nfunction CanUseMultiTenancy({ children }: { children: React.ReactNode }) {\n return <CanUse name=\"multiTenancy\">{children}</CanUse>;\n}\n\nfunction CanUseWorkflows({ children }: { children: React.ReactNode }) {\n return <CanUse name=\"advancedPublishingWorkflow\">{children}</CanUse>;\n}\n\nfunction CanUseTeams({ children }: { children: React.ReactNode }) {\n return <CanUse name=\"advancedAccessControlLayer.teams\">{children}</CanUse>;\n}\n\nfunction CanUsePrivateFiles({ children }: { children: React.ReactNode }) {\n return <CanUse name=\"advancedAccessControlLayer.privateFiles\">{children}</CanUse>;\n}\n\nfunction CanUseFileManagerThreatDetection({ children }: { children: React.ReactNode }) {\n return <CanUse name=\"fileManager.threatDetection\">{children}</CanUse>;\n}\n\nfunction CanUseHcmsFieldPermissions({ children }: { children: React.ReactNode }) {\n return <CanUse name=\"advancedAccessControlLayer.hcmsFieldPermissions\">{children}</CanUse>;\n}\n\nfunction CanUseAiPowerups({ children }: { children: React.ReactNode }) {\n return <CanUse name=\"aiPowerups\">{children}</CanUse>;\n}\n\n/**\n * Webhooks are on unless the project sets `webhooks: false`, so this can't go through `CanUse`:\n * `isEnabled` reads an unset flag as off (and, for a flag the license doesn't list, as off without a\n * license).\n */\nfunction CanUseWebhooks({ children }: { children: React.ReactNode }) {\n const flags = useProjectFeatureFlags();\n return flags.isExplicitlyDisabled(\"webhooks\") ? null : <>{children}</>;\n}\n\nexport const FeatureFlag = {\n CanUse,\n CanUseMultiTenancy,\n CanUseWorkflows,\n CanUseTeams,\n CanUsePrivateFiles,\n CanUseFileManagerThreatDetection,\n CanUseHcmsFieldPermissions,\n CanUseAiPowerups,\n CanUseWebhooks\n};\n"],"names":["CanUse","name","children","flags","useProjectFeatureFlags","CanUseMultiTenancy","CanUseWorkflows","CanUseTeams","CanUsePrivateFiles","CanUseFileManagerThreatDetection","CanUseHcmsFieldPermissions","CanUseAiPowerups","CanUseWebhooks","FeatureFlag"],"mappings":";;AASA,SAASA,OAAO,EAAEC,IAAI,EAAEC,QAAQ,EAAe;IAC3C,MAAMC,QAAQC;IACd,OAAOD,MAAM,SAAS,CAACF,QAAQ,WAARA,GAAQ,0CAAGC,YAAe;AACrD;AAEA,SAASG,mBAAmB,EAAEH,QAAQ,EAAiC;IACnE,OAAO,WAAP,GAAO,oBAACF,QAAMA;QAAC,MAAK;OAAgBE;AACxC;AAEA,SAASI,gBAAgB,EAAEJ,QAAQ,EAAiC;IAChE,OAAO,WAAP,GAAO,oBAACF,QAAMA;QAAC,MAAK;OAA8BE;AACtD;AAEA,SAASK,YAAY,EAAEL,QAAQ,EAAiC;IAC5D,OAAO,WAAP,GAAO,oBAACF,QAAMA;QAAC,MAAK;OAAoCE;AAC5D;AAEA,SAASM,mBAAmB,EAAEN,QAAQ,EAAiC;IACnE,OAAO,WAAP,GAAO,oBAACF,QAAMA;QAAC,MAAK;OAA2CE;AACnE;AAEA,SAASO,iCAAiC,EAAEP,QAAQ,EAAiC;IACjF,OAAO,WAAP,GAAO,oBAACF,QAAMA;QAAC,MAAK;OAA+BE;AACvD;AAEA,SAASQ,2BAA2B,EAAER,QAAQ,EAAiC;IAC3E,OAAO,WAAP,GAAO,oBAACF,QAAMA;QAAC,MAAK;OAAmDE;AAC3E;AAEA,SAASS,iBAAiB,EAAET,QAAQ,EAAiC;IACjE,OAAO,WAAP,GAAO,oBAACF,QAAMA;QAAC,MAAK;OAAcE;AACtC;AAOA,SAASU,eAAe,EAAEV,QAAQ,EAAiC;IAC/D,MAAMC,QAAQC;IACd,OAAOD,MAAM,oBAAoB,CAAC,cAAc,OAAO,WAAP,GAAO,0CAAGD;AAC9D;AAEO,MAAMW,cAAc;IACvBb,QAAAA;IACAK,oBAAAA;IACAC,iBAAAA;IACAC,aAAAA;IACAC,oBAAAA;IACAC,kCAAAA;IACAC,4BAAAA;IACAC,kBAAAA;IACAC,gBAAAA;AACJ"}
1
+ {"version":3,"file":"components/FeatureFlag.js","sources":["../../src/components/FeatureFlag.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FeatureFlagName } from \"@webiny/feature-flags\";\nimport { useProjectFeatureFlags } from \"~/services/GetProjectConfigService/FeatureFlagsContext.js\";\n\ninterface CanUseProps {\n name: FeatureFlagName;\n children: React.ReactNode;\n}\n\nfunction CanUse({ name, children }: CanUseProps) {\n const flags = useProjectFeatureFlags();\n return flags.isEnabled(name) ? <>{children}</> : null;\n}\n\nfunction CanUseMultiTenancy({ children }: { children: React.ReactNode }) {\n return <CanUse name=\"multiTenancy\">{children}</CanUse>;\n}\n\nfunction CanUseWorkflows({ children }: { children: React.ReactNode }) {\n return <CanUse name=\"advancedPublishingWorkflow\">{children}</CanUse>;\n}\n\nfunction CanUseTeams({ children }: { children: React.ReactNode }) {\n return <CanUse name=\"advancedAccessControlLayer.teams\">{children}</CanUse>;\n}\n\nfunction CanUsePrivateFiles({ children }: { children: React.ReactNode }) {\n return <CanUse name=\"advancedAccessControlLayer.privateFiles\">{children}</CanUse>;\n}\n\nfunction CanUseFileManagerThreatDetection({ children }: { children: React.ReactNode }) {\n return <CanUse name=\"fileManager.threatDetection\">{children}</CanUse>;\n}\n\nfunction CanUseHcmsFieldPermissions({ children }: { children: React.ReactNode }) {\n return <CanUse name=\"advancedAccessControlLayer.hcmsFieldPermissions\">{children}</CanUse>;\n}\n\nfunction CanUseAiPowerups({ children }: { children: React.ReactNode }) {\n return <CanUse name=\"aiPowerups\">{children}</CanUse>;\n}\n\n/**\n * Webhooks are on unless the project sets `webhooks: false`, so this can't go through `CanUse`:\n * `isEnabled` reads an unset flag as off (and, for a flag the license doesn't list, as off without a\n * license).\n */\nfunction CanUseWebhooks({ children }: { children: React.ReactNode }) {\n const flags = useProjectFeatureFlags();\n return flags.isExplicitlyDisabled(\"webhooks\") ? null : <>{children}</>;\n}\n\nexport const FeatureFlag = {\n CanUse,\n CanUseMultiTenancy,\n CanUseWorkflows,\n CanUseTeams,\n CanUsePrivateFiles,\n CanUseFileManagerThreatDetection,\n CanUseHcmsFieldPermissions,\n CanUseAiPowerups,\n CanUseWebhooks\n};\n"],"names":["CanUse","name","children","flags","useProjectFeatureFlags","CanUseMultiTenancy","CanUseWorkflows","CanUseTeams","CanUsePrivateFiles","CanUseFileManagerThreatDetection","CanUseHcmsFieldPermissions","CanUseAiPowerups","CanUseWebhooks","FeatureFlag"],"mappings":";;AASA,SAASA,OAAO,EAAEC,IAAI,EAAEC,QAAQ,EAAe;IAC3C,MAAMC,QAAQC;IACd,OAAOD,MAAM,SAAS,CAACF,QAAQ,WAARA,GAAQ,0CAAGC,YAAe;AACrD;AAEA,SAASG,mBAAmB,EAAEH,QAAQ,EAAiC;IACnE,OAAO,WAAP,GAAO,oBAACF,QAAAA;QAAO,MAAK;OAAgBE;AACxC;AAEA,SAASI,gBAAgB,EAAEJ,QAAQ,EAAiC;IAChE,OAAO,WAAP,GAAO,oBAACF,QAAAA;QAAO,MAAK;OAA8BE;AACtD;AAEA,SAASK,YAAY,EAAEL,QAAQ,EAAiC;IAC5D,OAAO,WAAP,GAAO,oBAACF,QAAAA;QAAO,MAAK;OAAoCE;AAC5D;AAEA,SAASM,mBAAmB,EAAEN,QAAQ,EAAiC;IACnE,OAAO,WAAP,GAAO,oBAACF,QAAAA;QAAO,MAAK;OAA2CE;AACnE;AAEA,SAASO,iCAAiC,EAAEP,QAAQ,EAAiC;IACjF,OAAO,WAAP,GAAO,oBAACF,QAAAA;QAAO,MAAK;OAA+BE;AACvD;AAEA,SAASQ,2BAA2B,EAAER,QAAQ,EAAiC;IAC3E,OAAO,WAAP,GAAO,oBAACF,QAAAA;QAAO,MAAK;OAAmDE;AAC3E;AAEA,SAASS,iBAAiB,EAAET,QAAQ,EAAiC;IACjE,OAAO,WAAP,GAAO,oBAACF,QAAAA;QAAO,MAAK;OAAcE;AACtC;AAOA,SAASU,eAAe,EAAEV,QAAQ,EAAiC;IAC/D,MAAMC,QAAQC;IACd,OAAOD,MAAM,oBAAoB,CAAC,cAAc,OAAO,WAAP,GAAO,0CAAGD;AAC9D;AAEO,MAAMW,cAAc;IACvBb;IACAK;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;IACAC;AACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"defineExtension/createExtensionReactComponent.js","sources":["../../src/defineExtension/createExtensionReactComponent.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { Property, useIdGenerator } from \"@webiny/react-properties\";\nimport { type DefineExtensionParams } from \"./types.js\";\nimport { type z } from \"zod\";\nimport { assertHostingType } from \"~/extensions/hosting/assertHostingType.js\";\nimport { getExtensionImplementation } from \"~/extensions/hosting/getExtensionImplementation.js\";\n\nconst KeyValues = (props: Record<string, any>) => {\n const getId = useIdGenerator(\"\");\n return Object.entries(props).map(([key, value]) => {\n return <Property key={key} name={key} id={getId(key)} value={value} />;\n });\n};\n\ntype ExtensionReactComponentProps<TParamsSchema extends z.ZodTypeAny> = z.infer<TParamsSchema> & {\n remove?: boolean;\n before?: string;\n after?: string;\n name?: string;\n};\n\nexport function createExtensionReactComponent<TParamsSchema extends z.ZodTypeAny>(\n extensionParams: DefineExtensionParams<TParamsSchema>\n) {\n const ExtensionProperty: React.FC<ExtensionReactComponentProps<TParamsSchema>> = props => {\n const { name, remove, before, after, ...keyValues } = props;\n\n const getId = useIdGenerator(extensionParams.type);\n\n // By passing undefined, we're letting RP generate a unique ID for us.\n const propertyId = useMemo(() => {\n if (extensionParams.multiple) {\n return name ? getId(name) : undefined;\n }\n\n return getId(extensionParams.type);\n }, [name, extensionParams.multiple, getId]);\n\n const propertyName = name || extensionParams.type;\n\n const placeAfter = after !== undefined ? getId(after) : undefined;\n const placeBefore = before !== undefined ? getId(before) : undefined;\n\n // @ts-expect-error move KeyValues back inside the Property component to avoid this error\n const KeyValuesComponent = parentProps => <KeyValues {...parentProps} {...keyValues} />;\n\n return (\n <>\n <Property\n id={propertyId}\n name={propertyName}\n array={extensionParams.multiple}\n remove={remove}\n before={placeBefore}\n after={placeAfter}\n >\n <KeyValuesComponent />\n </Property>\n {extensionParams.render && extensionParams.render(props)}\n </>\n );\n };\n\n const ExtensionReactComponent: React.FC<\n ExtensionReactComponentProps<TParamsSchema>\n > = props => {\n assertHostingType(extensionParams.type, extensionParams.tags.hosting);\n\n /*\n * A hosting package may have registered its own component for this extension type. That\n * component is created by `defineExtension` too, so it finds itself here and renders as\n * usual.\n */\n const Implementation = getExtensionImplementation(extensionParams.type);\n if (Implementation && Implementation !== ExtensionReactComponent) {\n return <Implementation {...props} />;\n }\n\n return <ExtensionProperty {...props} />;\n };\n\n ExtensionReactComponent.displayName = `ExtensionReactComponent(${extensionParams.type})`;\n return ExtensionReactComponent;\n}\n"],"names":["KeyValues","props","getId","useIdGenerator","Object","key","value","Property","createExtensionReactComponent","extensionParams","ExtensionProperty","name","remove","before","after","keyValues","propertyId","useMemo","undefined","propertyName","placeAfter","placeBefore","KeyValuesComponent","parentProps","ExtensionReactComponent","assertHostingType","Implementation","getExtensionImplementation"],"mappings":";;;;AAOA,MAAMA,YAAY,CAACC;IACf,MAAMC,QAAQC,eAAe;IAC7B,OAAOC,OAAO,OAAO,CAACH,OAAO,GAAG,CAAC,CAAC,CAACI,KAAKC,MAAM,GACnC,WAAP,GAAO,oBAACC,UAAQA;YAAC,KAAKF;YAAK,MAAMA;YAAK,IAAIH,MAAMG;YAAM,OAAOC;;AAErE;AASO,SAASE,8BACZC,eAAqD;IAErD,MAAMC,oBAA2ET,CAAAA;QAC7E,MAAM,EAAEU,IAAI,EAAEC,MAAM,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAGC,WAAW,GAAGd;QAEtD,MAAMC,QAAQC,eAAeM,gBAAgB,IAAI;QAGjD,MAAMO,aAAaC,QAAQ;YACvB,IAAIR,gBAAgB,QAAQ,EACxB,OAAOE,OAAOT,MAAMS,QAAQO;YAGhC,OAAOhB,MAAMO,gBAAgB,IAAI;QACrC,GAAG;YAACE;YAAMF,gBAAgB,QAAQ;YAAEP;SAAM;QAE1C,MAAMiB,eAAeR,QAAQF,gBAAgB,IAAI;QAEjD,MAAMW,aAAaN,AAAUI,WAAVJ,QAAsBZ,MAAMY,SAASI;QACxD,MAAMG,cAAcR,AAAWK,WAAXL,SAAuBX,MAAMW,UAAUK;QAG3D,MAAMI,qBAAqBC,CAAAA,cAAAA,WAAAA,GAAe,oBAACvB,WAASA;gBAAE,GAAGuB,WAAW;gBAAG,GAAGR,SAAS;;QAEnF,OAAO,WAAP,GACI,wDACI,oBAACR,UAAQA;YACL,IAAIS;YACJ,MAAMG;YACN,OAAOV,gBAAgB,QAAQ;YAC/B,QAAQG;YACR,QAAQS;YACR,OAAOD;yBAEP,oBAACE,oBAAAA,QAEJb,gBAAgB,MAAM,IAAIA,gBAAgB,MAAM,CAACR;IAG9D;IAEA,MAAMuB,0BAEFvB,CAAAA;QACAwB,kBAAkBhB,gBAAgB,IAAI,EAAEA,gBAAgB,IAAI,CAAC,OAAO;QAOpE,MAAMiB,iBAAiBC,2BAA2BlB,gBAAgB,IAAI;QACtE,IAAIiB,kBAAkBA,mBAAmBF,yBACrC,OAAO,WAAP,GAAO,oBAACE,gBAAmBzB;QAG/B,OAAO,WAAP,GAAO,oBAACS,mBAAsBT;IAClC;IAEAuB,wBAAwB,WAAW,GAAG,CAAC,wBAAwB,EAAEf,gBAAgB,IAAI,CAAC,CAAC,CAAC;IACxF,OAAOe;AACX"}
1
+ {"version":3,"file":"defineExtension/createExtensionReactComponent.js","sources":["../../src/defineExtension/createExtensionReactComponent.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { Property, useIdGenerator } from \"@webiny/react-properties\";\nimport { type DefineExtensionParams } from \"./types.js\";\nimport { type z } from \"zod\";\nimport { assertHostingType } from \"~/extensions/hosting/assertHostingType.js\";\nimport { getExtensionImplementation } from \"~/extensions/hosting/getExtensionImplementation.js\";\n\nconst KeyValues = (props: Record<string, any>) => {\n const getId = useIdGenerator(\"\");\n return Object.entries(props).map(([key, value]) => {\n return <Property key={key} name={key} id={getId(key)} value={value} />;\n });\n};\n\ntype ExtensionReactComponentProps<TParamsSchema extends z.ZodTypeAny> = z.infer<TParamsSchema> & {\n remove?: boolean;\n before?: string;\n after?: string;\n name?: string;\n};\n\nexport function createExtensionReactComponent<TParamsSchema extends z.ZodTypeAny>(\n extensionParams: DefineExtensionParams<TParamsSchema>\n) {\n const ExtensionProperty: React.FC<ExtensionReactComponentProps<TParamsSchema>> = props => {\n const { name, remove, before, after, ...keyValues } = props;\n\n const getId = useIdGenerator(extensionParams.type);\n\n // By passing undefined, we're letting RP generate a unique ID for us.\n const propertyId = useMemo(() => {\n if (extensionParams.multiple) {\n return name ? getId(name) : undefined;\n }\n\n return getId(extensionParams.type);\n }, [name, extensionParams.multiple, getId]);\n\n const propertyName = name || extensionParams.type;\n\n const placeAfter = after !== undefined ? getId(after) : undefined;\n const placeBefore = before !== undefined ? getId(before) : undefined;\n\n // @ts-expect-error move KeyValues back inside the Property component to avoid this error\n const KeyValuesComponent = parentProps => <KeyValues {...parentProps} {...keyValues} />;\n\n return (\n <>\n <Property\n id={propertyId}\n name={propertyName}\n array={extensionParams.multiple}\n remove={remove}\n before={placeBefore}\n after={placeAfter}\n >\n <KeyValuesComponent />\n </Property>\n {extensionParams.render && extensionParams.render(props)}\n </>\n );\n };\n\n const ExtensionReactComponent: React.FC<\n ExtensionReactComponentProps<TParamsSchema>\n > = props => {\n assertHostingType(extensionParams.type, extensionParams.tags.hosting);\n\n /*\n * A hosting package may have registered its own component for this extension type. That\n * component is created by `defineExtension` too, so it finds itself here and renders as\n * usual.\n */\n const Implementation = getExtensionImplementation(extensionParams.type);\n if (Implementation && Implementation !== ExtensionReactComponent) {\n return <Implementation {...props} />;\n }\n\n return <ExtensionProperty {...props} />;\n };\n\n ExtensionReactComponent.displayName = `ExtensionReactComponent(${extensionParams.type})`;\n return ExtensionReactComponent;\n}\n"],"names":["KeyValues","props","getId","useIdGenerator","Object","key","value","Property","createExtensionReactComponent","extensionParams","ExtensionProperty","name","remove","before","after","keyValues","propertyId","useMemo","undefined","propertyName","placeAfter","placeBefore","KeyValuesComponent","parentProps","ExtensionReactComponent","assertHostingType","Implementation","getExtensionImplementation"],"mappings":";;;;AAOA,MAAMA,YAAY,CAACC;IACf,MAAMC,QAAQC,eAAe;IAC7B,OAAOC,OAAO,OAAO,CAACH,OAAO,GAAG,CAAC,CAAC,CAACI,KAAKC,MAAM,GACnC,WAAP,GAAO,oBAACC,UAAQA;YAAC,KAAKF;YAAK,MAAMA;YAAK,IAAIH,MAAMG;YAAM,OAAOC;;AAErE;AASO,SAASE,8BACZC,eAAqD;IAErD,MAAMC,oBAA2ET,CAAAA;QAC7E,MAAM,EAAEU,IAAI,EAAEC,MAAM,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAGC,WAAW,GAAGd;QAEtD,MAAMC,QAAQC,eAAeM,gBAAgB,IAAI;QAGjD,MAAMO,aAAaC,QAAQ;YACvB,IAAIR,gBAAgB,QAAQ,EACxB,OAAOE,OAAOT,MAAMS,QAAQO;YAGhC,OAAOhB,MAAMO,gBAAgB,IAAI;QACrC,GAAG;YAACE;YAAMF,gBAAgB,QAAQ;YAAEP;SAAM;QAE1C,MAAMiB,eAAeR,QAAQF,gBAAgB,IAAI;QAEjD,MAAMW,aAAaN,AAAUI,WAAVJ,QAAsBZ,MAAMY,SAASI;QACxD,MAAMG,cAAcR,AAAWK,WAAXL,SAAuBX,MAAMW,UAAUK;QAG3D,MAAMI,qBAAqBC,CAAAA,cAAAA,WAAAA,GAAe,oBAACvB,WAAAA;gBAAW,GAAGuB,WAAW;gBAAG,GAAGR,SAAS;;QAEnF,OAAO,WAAP,GACI,wDACI,oBAACR,UAAQA;YACL,IAAIS;YACJ,MAAMG;YACN,OAAOV,gBAAgB,QAAQ;YAC/B,QAAQG;YACR,QAAQS;YACR,OAAOD;yBAEP,oBAACE,oBAAAA,QAEJb,gBAAgB,MAAM,IAAIA,gBAAgB,MAAM,CAACR;IAG9D;IAEA,MAAMuB,0BAEFvB,CAAAA;QACAwB,kBAAkBhB,gBAAgB,IAAI,EAAEA,gBAAgB,IAAI,CAAC,OAAO;QAOpE,MAAMiB,iBAAiBC,2BAA2BlB,gBAAgB,IAAI;QACtE,IAAIiB,kBAAkBA,mBAAmBF,yBACrC,OAAO,WAAP,GAAO,oBAACE,gBAAmBzB;QAG/B,OAAO,WAAP,GAAO,oBAACS,mBAAsBT;IAClC;IAEAuB,wBAAwB,WAAW,GAAG,CAAC,wBAAwB,EAAEf,gBAAgB,IAAI,CAAC,CAAC,CAAC;IACxF,OAAOe;AACX"}
@@ -2,9 +2,11 @@ import { z } from "zod";
2
2
  /**
3
3
  * Sets a dedicated WebSocket URL for the Admin app, baked into the admin bundle as
4
4
  * `WEBINY_ADMIN_WS_API_URL`. This is optional: when omitted, the admin derives the WebSocket URL
5
- * from the API URL (same origin, http -> ws), which is what the standalone hosting type needs by
6
- * default. Set it only when WebSockets are served from a different origin than the API. Because the
7
- * config is evaluated at build time, the value can come from any env var the user chooses, e.g.
5
+ * from the API URL (same origin, http -> ws, plus the `/ws` path the standalone server takes
6
+ * upgrades on), which is what the standalone hosting type needs by default. Set it only when that
7
+ * derivation lands in the wrong place: WebSockets on a different origin, or a proxy that rewrites
8
+ * the path. The value is the full socket URL and is used as is. Because the config is evaluated at
9
+ * build time, the value can come from any env var the user chooses, e.g.
8
10
  * `<Admin.WebsocketsUrl url={process.env.MY_WS_URL} />`.
9
11
  */
10
12
  export declare const AdminWebsocketsUrl: import("~/defineExtension/index.js").ExtensionComponent<z.ZodObject<{
@@ -10,7 +10,7 @@ const AdminWebsocketsUrl = defineExtension({
10
10
  },
11
11
  description: "Set a dedicated WebSocket URL for the Admin app.",
12
12
  paramsSchema: z.object({
13
- url: z.string().describe("The WebSocket origin, e.g. wss://ws.example.com or ws://localhost:3002")
13
+ url: z.string().describe("The full WebSocket URL, e.g. wss://ws.example.com/ws or ws://localhost:3002/ws")
14
14
  }),
15
15
  render: (props)=>/*#__PURE__*/ react.createElement(EnvVar, {
16
16
  varName: "WEBINY_ADMIN_WS_API_URL",
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/AdminWebsocketsUrl.js","sources":["../../src/extensions/AdminWebsocketsUrl.tsx"],"sourcesContent":["import React from \"react\";\nimport { z } from \"zod\";\nimport { defineExtension } from \"~/defineExtension/index.js\";\nimport { EnvVar } from \"./EnvVar.js\";\n\n/**\n * Sets a dedicated WebSocket URL for the Admin app, baked into the admin bundle as\n * `WEBINY_ADMIN_WS_API_URL`. This is optional: when omitted, the admin derives the WebSocket URL\n * from the API URL (same origin, http -> ws), which is what the standalone hosting type needs by\n * default. Set it only when WebSockets are served from a different origin than the API. Because the\n * config is evaluated at build time, the value can come from any env var the user chooses, e.g.\n * `<Admin.WebsocketsUrl url={process.env.MY_WS_URL} />`.\n */\nexport const AdminWebsocketsUrl = defineExtension({\n type: \"Admin/WebsocketsUrl\",\n tags: { runtimeContext: \"project\", hosting: \"all\" },\n description: \"Set a dedicated WebSocket URL for the Admin app.\",\n paramsSchema: z.object({\n url: z\n .string()\n .describe(\"The WebSocket origin, e.g. wss://ws.example.com or ws://localhost:3002\")\n }),\n render: props => {\n return <EnvVar varName=\"WEBINY_ADMIN_WS_API_URL\" value={props.url} />;\n }\n});\n"],"names":["AdminWebsocketsUrl","defineExtension","z","props","EnvVar"],"mappings":";;;;AAaO,MAAMA,qBAAqBC,gBAAgB;IAC9C,MAAM;IACN,MAAM;QAAE,gBAAgB;QAAW,SAAS;IAAM;IAClD,aAAa;IACb,cAAcC,EAAE,MAAM,CAAC;QACnB,KAAKA,EAAAA,MACM,GACN,QAAQ,CAAC;IAClB;IACA,QAAQC,CAAAA,QACG,WAAP,GAAO,oBAACC,QAAMA;YAAC,SAAQ;YAA0B,OAAOD,MAAM,GAAG;;AAEzE"}
1
+ {"version":3,"file":"extensions/AdminWebsocketsUrl.js","sources":["../../src/extensions/AdminWebsocketsUrl.tsx"],"sourcesContent":["import React from \"react\";\nimport { z } from \"zod\";\nimport { defineExtension } from \"~/defineExtension/index.js\";\nimport { EnvVar } from \"./EnvVar.js\";\n\n/**\n * Sets a dedicated WebSocket URL for the Admin app, baked into the admin bundle as\n * `WEBINY_ADMIN_WS_API_URL`. This is optional: when omitted, the admin derives the WebSocket URL\n * from the API URL (same origin, http -> ws, plus the `/ws` path the standalone server takes\n * upgrades on), which is what the standalone hosting type needs by default. Set it only when that\n * derivation lands in the wrong place: WebSockets on a different origin, or a proxy that rewrites\n * the path. The value is the full socket URL and is used as is. Because the config is evaluated at\n * build time, the value can come from any env var the user chooses, e.g.\n * `<Admin.WebsocketsUrl url={process.env.MY_WS_URL} />`.\n */\nexport const AdminWebsocketsUrl = defineExtension({\n type: \"Admin/WebsocketsUrl\",\n tags: { runtimeContext: \"project\", hosting: \"all\" },\n description: \"Set a dedicated WebSocket URL for the Admin app.\",\n paramsSchema: z.object({\n url: z\n .string()\n .describe(\n \"The full WebSocket URL, e.g. wss://ws.example.com/ws or ws://localhost:3002/ws\"\n )\n }),\n render: props => {\n return <EnvVar varName=\"WEBINY_ADMIN_WS_API_URL\" value={props.url} />;\n }\n});\n"],"names":["AdminWebsocketsUrl","defineExtension","z","props","EnvVar"],"mappings":";;;;AAeO,MAAMA,qBAAqBC,gBAAgB;IAC9C,MAAM;IACN,MAAM;QAAE,gBAAgB;QAAW,SAAS;IAAM;IAClD,aAAa;IACb,cAAcC,EAAE,MAAM,CAAC;QACnB,KAAKA,EAAAA,MACM,GACN,QAAQ,CACL;IAEZ;IACA,QAAQC,CAAAA,QACG,WAAP,GAAO,oBAACC,QAAMA;YAAC,SAAQ;YAA0B,OAAOD,MAAM,GAAG;;AAEzE"}
@@ -4,5 +4,6 @@ export declare const DatabaseSetup: import("./index.js").ExtensionComponent<z.Zo
4
4
  ddb: "ddb";
5
5
  "ddb+es": "ddb+es";
6
6
  "ddb+os": "ddb+os";
7
+ pg: "pg";
7
8
  }>;
8
9
  }, z.core.$strip>>;
@@ -6,13 +6,14 @@ const DatabaseSetup = defineExtension({
6
6
  runtimeContext: "project",
7
7
  hosting: "all"
8
8
  },
9
- description: "Define the database setup configuration (ddb, ddb+es, or ddb+os).",
9
+ description: "Define the database setup configuration (ddb, ddb+es, ddb+os or pg).",
10
10
  paramsSchema: z.object({
11
11
  setupName: z["enum"]([
12
12
  "ddb",
13
13
  "ddb+es",
14
- "ddb+os"
15
- ]).describe("The database setup type: ddb (DynamoDB only), ddb+es (DynamoDB + ElasticSearch), or ddb+os (DynamoDB + OpenSearch)")
14
+ "ddb+os",
15
+ "pg"
16
+ ]).describe("The database setup type: ddb (DynamoDB only), ddb+es (DynamoDB + ElasticSearch), ddb+os (DynamoDB + OpenSearch), or pg (PostgreSQL)")
16
17
  })
17
18
  });
18
19
  export { DatabaseSetup };
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/DatabaseSetup.js","sources":["../../src/extensions/DatabaseSetup.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { defineExtension } from \"../defineExtension/index.js\";\n\nexport const DatabaseSetup = defineExtension({\n type: \"Project/DatabaseSetup\",\n tags: { runtimeContext: \"project\", hosting: \"all\" },\n description: \"Define the database setup configuration (ddb, ddb+es, or ddb+os).\",\n paramsSchema: z.object({\n setupName: z\n .enum([\"ddb\", \"ddb+es\", \"ddb+os\"])\n .describe(\n \"The database setup type: ddb (DynamoDB only), ddb+es (DynamoDB + ElasticSearch), or ddb+os (DynamoDB + OpenSearch)\"\n )\n })\n});\n"],"names":["DatabaseSetup","defineExtension","z"],"mappings":";;AAGO,MAAMA,gBAAgBC,gBAAgB;IACzC,MAAM;IACN,MAAM;QAAE,gBAAgB;QAAW,SAAS;IAAM;IAClD,aAAa;IACb,cAAcC,EAAE,MAAM,CAAC;QACnB,WAAWA,CAAC,CAADA,OACF,CAAC;YAAC;YAAO;YAAU;SAAS,EAChC,QAAQ,CACL;IAEZ;AACJ"}
1
+ {"version":3,"file":"extensions/DatabaseSetup.js","sources":["../../src/extensions/DatabaseSetup.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { defineExtension } from \"../defineExtension/index.js\";\n\nexport const DatabaseSetup = defineExtension({\n type: \"Project/DatabaseSetup\",\n tags: { runtimeContext: \"project\", hosting: \"all\" },\n description: \"Define the database setup configuration (ddb, ddb+es, ddb+os or pg).\",\n paramsSchema: z.object({\n setupName: z\n .enum([\"ddb\", \"ddb+es\", \"ddb+os\", \"pg\"])\n .describe(\n \"The database setup type: ddb (DynamoDB only), ddb+es (DynamoDB + ElasticSearch), ddb+os (DynamoDB + OpenSearch), or pg (PostgreSQL)\"\n )\n })\n});\n"],"names":["DatabaseSetup","defineExtension","z"],"mappings":";;AAGO,MAAMA,gBAAgBC,gBAAgB;IACzC,MAAM;IACN,MAAM;QAAE,gBAAgB;QAAW,SAAS;IAAM;IAClD,aAAa;IACb,cAAcC,EAAE,MAAM,CAAC;QACnB,WAAWA,CAAC,CAADA,OACF,CAAC;YAAC;YAAO;YAAU;YAAU;SAAK,EACtC,QAAQ,CACL;IAEZ;AACJ"}
@@ -25,6 +25,7 @@ export declare const FeatureFlags: import("~/defineExtension/index.js").Extensio
25
25
  }, z.core.$strip>>;
26
26
  lexicalGeneration: z.ZodOptional<z.ZodBoolean>;
27
27
  adminAssistant: z.ZodOptional<z.ZodBoolean>;
28
+ remoteComponents: z.ZodOptional<z.ZodBoolean>;
28
29
  cms: z.ZodOptional<z.ZodObject<{
29
30
  entryGeneration: z.ZodOptional<z.ZodBoolean>;
30
31
  entryComparison: z.ZodOptional<z.ZodBoolean>;
@@ -42,6 +42,7 @@ const FeatureFlags = defineExtension({
42
42
  }).optional(),
43
43
  lexicalGeneration: z.boolean().optional(),
44
44
  adminAssistant: z.boolean().optional(),
45
+ remoteComponents: z.boolean().optional(),
45
46
  cms: z.object({
46
47
  entryGeneration: z.boolean().optional(),
47
48
  entryComparison: z.boolean().optional(),
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/FeatureFlags.js","sources":["../../src/extensions/FeatureFlags.tsx"],"sourcesContent":["import React from \"react\";\nimport { z } from \"zod\";\nimport { BuildParam } from \"./ApiBuildParam.js\";\nimport { AdminBuildParam } from \"./AdminBuildParam.js\";\nimport { defineExtension } from \"~/defineExtension/index.js\";\nimport { setProjectFeatureFlags } from \"~/services/GetProjectConfigService/FeatureFlagsContext.js\";\n\nexport const FeatureFlags = defineExtension({\n type: \"FeatureFlags\",\n tags: { runtimeContext: \"project\", hosting: \"all\" },\n description: \"Enable or disable features.\",\n paramsSchema: z.object({\n // Follows `IFeatureFlagsDto` from `packages/feature-flags/src/types.ts`.\n features: z.object({\n multiTenancy: z.boolean().optional(),\n languages: z.boolean().optional(),\n advancedPublishingWorkflow: z.boolean().optional(),\n advancedAccessControlLayer: z\n .union([\n z.boolean(),\n z.object({\n teams: z.boolean().optional(),\n privateFiles: z.boolean().optional(),\n folderLevelPermissions: z.boolean().optional(),\n hcmsFieldPermissions: z.boolean().optional()\n })\n ])\n .optional(),\n auditLogs: z.boolean().optional(),\n recordLocking: z.boolean().optional(),\n fileManager: z\n .object({\n threatDetection: z.boolean().optional()\n })\n .optional(),\n aiPowerups: z\n .union([\n z.boolean(),\n z.object({\n websiteBuilder: z\n .object({\n pageGeneration: z.boolean().optional(),\n pageTranslation: z.boolean().optional()\n })\n .optional(),\n fileManager: z\n .object({\n imageEnrichment: z.boolean().optional()\n })\n .optional(),\n lexicalGeneration: z.boolean().optional(),\n adminAssistant: z.boolean().optional(),\n cms: z\n .object({\n entryGeneration: z.boolean().optional(),\n entryComparison: z.boolean().optional(),\n entryTranslation: z.boolean().optional()\n })\n .optional()\n })\n ])\n .optional(),\n abTesting: z.boolean().optional(),\n collaboration: z\n .union([\n z.boolean(),\n z.object({\n comments: z.boolean().optional(),\n activityLog: z.boolean().optional()\n })\n ])\n .optional(),\n webhooks: z.boolean().optional()\n })\n }),\n render: ({ features = {} }) => {\n setProjectFeatureFlags(features);\n return (\n <>\n <BuildParam paramName=\"FeatureFlags\" value={features} />\n <AdminBuildParam paramName=\"FeatureFlags\" value={features} />\n </>\n );\n }\n});\n"],"names":["FeatureFlags","defineExtension","z","features","setProjectFeatureFlags","BuildParam","AdminBuildParam"],"mappings":";;;;;;AAOO,MAAMA,eAAeC,gBAAgB;IACxC,MAAM;IACN,MAAM;QAAE,gBAAgB;QAAW,SAAS;IAAM;IAClD,aAAa;IACb,cAAcC,EAAE,MAAM,CAAC;QAEnB,UAAUA,EAAE,MAAM,CAAC;YACf,cAAcA,EAAE,OAAO,GAAG,QAAQ;YAClC,WAAWA,EAAE,OAAO,GAAG,QAAQ;YAC/B,4BAA4BA,EAAE,OAAO,GAAG,QAAQ;YAChD,4BAA4BA,EAAAA,KAClB,CAAC;gBACHA,EAAE,OAAO;gBACTA,EAAE,MAAM,CAAC;oBACL,OAAOA,EAAE,OAAO,GAAG,QAAQ;oBAC3B,cAAcA,EAAE,OAAO,GAAG,QAAQ;oBAClC,wBAAwBA,EAAE,OAAO,GAAG,QAAQ;oBAC5C,sBAAsBA,EAAE,OAAO,GAAG,QAAQ;gBAC9C;aACH,EACA,QAAQ;YACb,WAAWA,EAAE,OAAO,GAAG,QAAQ;YAC/B,eAAeA,EAAE,OAAO,GAAG,QAAQ;YACnC,aAAaA,EAAAA,MACF,CAAC;gBACJ,iBAAiBA,EAAE,OAAO,GAAG,QAAQ;YACzC,GACC,QAAQ;YACb,YAAYA,EAAAA,KACF,CAAC;gBACHA,EAAE,OAAO;gBACTA,EAAE,MAAM,CAAC;oBACL,gBAAgBA,EAAAA,MACL,CAAC;wBACJ,gBAAgBA,EAAE,OAAO,GAAG,QAAQ;wBACpC,iBAAiBA,EAAE,OAAO,GAAG,QAAQ;oBACzC,GACC,QAAQ;oBACb,aAAaA,EAAAA,MACF,CAAC;wBACJ,iBAAiBA,EAAE,OAAO,GAAG,QAAQ;oBACzC,GACC,QAAQ;oBACb,mBAAmBA,EAAE,OAAO,GAAG,QAAQ;oBACvC,gBAAgBA,EAAE,OAAO,GAAG,QAAQ;oBACpC,KAAKA,EAAAA,MACM,CAAC;wBACJ,iBAAiBA,EAAE,OAAO,GAAG,QAAQ;wBACrC,iBAAiBA,EAAE,OAAO,GAAG,QAAQ;wBACrC,kBAAkBA,EAAE,OAAO,GAAG,QAAQ;oBAC1C,GACC,QAAQ;gBACjB;aACH,EACA,QAAQ;YACb,WAAWA,EAAE,OAAO,GAAG,QAAQ;YAC/B,eAAeA,EAAAA,KACL,CAAC;gBACHA,EAAE,OAAO;gBACTA,EAAE,MAAM,CAAC;oBACL,UAAUA,EAAE,OAAO,GAAG,QAAQ;oBAC9B,aAAaA,EAAE,OAAO,GAAG,QAAQ;gBACrC;aACH,EACA,QAAQ;YACb,UAAUA,EAAE,OAAO,GAAG,QAAQ;QAClC;IACJ;IACA,QAAQ,CAAC,EAAEC,WAAW,CAAC,CAAC,EAAE;QACtBC,uBAAuBD;QACvB,OAAO,WAAP,GACI,wDACI,oBAACE,YAAUA;YAAC,WAAU;YAAe,OAAOF;0BAC5C,oBAACG,iBAAeA;YAAC,WAAU;YAAe,OAAOH;;IAG7D;AACJ"}
1
+ {"version":3,"file":"extensions/FeatureFlags.js","sources":["../../src/extensions/FeatureFlags.tsx"],"sourcesContent":["import React from \"react\";\nimport { z } from \"zod\";\nimport { BuildParam } from \"./ApiBuildParam.js\";\nimport { AdminBuildParam } from \"./AdminBuildParam.js\";\nimport { defineExtension } from \"~/defineExtension/index.js\";\nimport { setProjectFeatureFlags } from \"~/services/GetProjectConfigService/FeatureFlagsContext.js\";\n\nexport const FeatureFlags = defineExtension({\n type: \"FeatureFlags\",\n tags: { runtimeContext: \"project\", hosting: \"all\" },\n description: \"Enable or disable features.\",\n paramsSchema: z.object({\n // Follows `IFeatureFlagsDto` from `packages/feature-flags/src/types.ts`.\n features: z.object({\n multiTenancy: z.boolean().optional(),\n languages: z.boolean().optional(),\n advancedPublishingWorkflow: z.boolean().optional(),\n advancedAccessControlLayer: z\n .union([\n z.boolean(),\n z.object({\n teams: z.boolean().optional(),\n privateFiles: z.boolean().optional(),\n folderLevelPermissions: z.boolean().optional(),\n hcmsFieldPermissions: z.boolean().optional()\n })\n ])\n .optional(),\n auditLogs: z.boolean().optional(),\n recordLocking: z.boolean().optional(),\n fileManager: z\n .object({\n threatDetection: z.boolean().optional()\n })\n .optional(),\n aiPowerups: z\n .union([\n z.boolean(),\n z.object({\n websiteBuilder: z\n .object({\n pageGeneration: z.boolean().optional(),\n pageTranslation: z.boolean().optional()\n })\n .optional(),\n fileManager: z\n .object({\n imageEnrichment: z.boolean().optional()\n })\n .optional(),\n lexicalGeneration: z.boolean().optional(),\n adminAssistant: z.boolean().optional(),\n remoteComponents: z.boolean().optional(),\n cms: z\n .object({\n entryGeneration: z.boolean().optional(),\n entryComparison: z.boolean().optional(),\n entryTranslation: z.boolean().optional()\n })\n .optional()\n })\n ])\n .optional(),\n abTesting: z.boolean().optional(),\n collaboration: z\n .union([\n z.boolean(),\n z.object({\n comments: z.boolean().optional(),\n activityLog: z.boolean().optional()\n })\n ])\n .optional(),\n webhooks: z.boolean().optional()\n })\n }),\n render: ({ features = {} }) => {\n setProjectFeatureFlags(features);\n return (\n <>\n <BuildParam paramName=\"FeatureFlags\" value={features} />\n <AdminBuildParam paramName=\"FeatureFlags\" value={features} />\n </>\n );\n }\n});\n"],"names":["FeatureFlags","defineExtension","z","features","setProjectFeatureFlags","BuildParam","AdminBuildParam"],"mappings":";;;;;;AAOO,MAAMA,eAAeC,gBAAgB;IACxC,MAAM;IACN,MAAM;QAAE,gBAAgB;QAAW,SAAS;IAAM;IAClD,aAAa;IACb,cAAcC,EAAE,MAAM,CAAC;QAEnB,UAAUA,EAAE,MAAM,CAAC;YACf,cAAcA,EAAE,OAAO,GAAG,QAAQ;YAClC,WAAWA,EAAE,OAAO,GAAG,QAAQ;YAC/B,4BAA4BA,EAAE,OAAO,GAAG,QAAQ;YAChD,4BAA4BA,EAAAA,KAClB,CAAC;gBACHA,EAAE,OAAO;gBACTA,EAAE,MAAM,CAAC;oBACL,OAAOA,EAAE,OAAO,GAAG,QAAQ;oBAC3B,cAAcA,EAAE,OAAO,GAAG,QAAQ;oBAClC,wBAAwBA,EAAE,OAAO,GAAG,QAAQ;oBAC5C,sBAAsBA,EAAE,OAAO,GAAG,QAAQ;gBAC9C;aACH,EACA,QAAQ;YACb,WAAWA,EAAE,OAAO,GAAG,QAAQ;YAC/B,eAAeA,EAAE,OAAO,GAAG,QAAQ;YACnC,aAAaA,EAAAA,MACF,CAAC;gBACJ,iBAAiBA,EAAE,OAAO,GAAG,QAAQ;YACzC,GACC,QAAQ;YACb,YAAYA,EAAAA,KACF,CAAC;gBACHA,EAAE,OAAO;gBACTA,EAAE,MAAM,CAAC;oBACL,gBAAgBA,EAAAA,MACL,CAAC;wBACJ,gBAAgBA,EAAE,OAAO,GAAG,QAAQ;wBACpC,iBAAiBA,EAAE,OAAO,GAAG,QAAQ;oBACzC,GACC,QAAQ;oBACb,aAAaA,EAAAA,MACF,CAAC;wBACJ,iBAAiBA,EAAE,OAAO,GAAG,QAAQ;oBACzC,GACC,QAAQ;oBACb,mBAAmBA,EAAE,OAAO,GAAG,QAAQ;oBACvC,gBAAgBA,EAAE,OAAO,GAAG,QAAQ;oBACpC,kBAAkBA,EAAE,OAAO,GAAG,QAAQ;oBACtC,KAAKA,EAAAA,MACM,CAAC;wBACJ,iBAAiBA,EAAE,OAAO,GAAG,QAAQ;wBACrC,iBAAiBA,EAAE,OAAO,GAAG,QAAQ;wBACrC,kBAAkBA,EAAE,OAAO,GAAG,QAAQ;oBAC1C,GACC,QAAQ;gBACjB;aACH,EACA,QAAQ;YACb,WAAWA,EAAE,OAAO,GAAG,QAAQ;YAC/B,eAAeA,EAAAA,KACL,CAAC;gBACHA,EAAE,OAAO;gBACTA,EAAE,MAAM,CAAC;oBACL,UAAUA,EAAE,OAAO,GAAG,QAAQ;oBAC9B,aAAaA,EAAE,OAAO,GAAG,QAAQ;gBACrC;aACH,EACA,QAAQ;YACb,UAAUA,EAAE,OAAO,GAAG,QAAQ;QAClC;IACJ;IACA,QAAQ,CAAC,EAAEC,WAAW,CAAC,CAAC,EAAE;QACtBC,uBAAuBD;QACvB,OAAO,WAAP,GACI,wDACI,oBAACE,YAAUA;YAAC,WAAU;YAAe,OAAOF;0BAC5C,oBAACG,iBAAeA;YAAC,WAAU;YAAe,OAAOH;;IAG7D;AACJ"}
@@ -12,7 +12,7 @@ const BackgroundTasks = defineExtension({
12
12
  hosting: "all"
13
13
  },
14
14
  description: "Configure default settings for background tasks. The retention value is used as the default when no admin has explicitly set a value via the Settings UI.",
15
- paramsSchema: paramsSchema,
15
+ paramsSchema,
16
16
  render (params) {
17
17
  return /*#__PURE__*/ react.createElement(BuildParam, {
18
18
  paramName: "BackgroundTasks.RetentionDays",
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/api/BackgroundTasks.js","sources":["../../../src/extensions/api/BackgroundTasks.tsx"],"sourcesContent":["import React from \"react\";\nimport { z } from \"zod\";\nimport { defineExtension } from \"~/defineExtension/index.js\";\nimport { BuildParam } from \"~/extensions/ApiBuildParam.js\";\n\nconst paramsSchema = z.object({\n retentionDays: z\n .number()\n .int()\n .min(0)\n .max(3650)\n .describe(\n \"Default retention period (in days) for completed background task runs. 0 = never delete. Max 3650.\"\n )\n});\n\nexport const BackgroundTasks = defineExtension({\n type: \"Api/BackgroundTasks\",\n tags: { runtimeContext: \"project\", hosting: \"all\" },\n description:\n \"Configure default settings for background tasks. The retention value is used as the default when no admin has explicitly set a value via the Settings UI.\",\n paramsSchema,\n render(params) {\n return (\n <BuildParam paramName=\"BackgroundTasks.RetentionDays\" value={params.retentionDays} />\n );\n }\n});\n"],"names":["paramsSchema","z","BackgroundTasks","defineExtension","params","BuildParam"],"mappings":";;;;AAKA,MAAMA,eAAeC,EAAE,MAAM,CAAC;IAC1B,eAAeA,EAAAA,MACJ,GACN,GAAG,GACH,GAAG,CAAC,GACJ,GAAG,CAAC,MACJ,QAAQ,CACL;AAEZ;AAEO,MAAMC,kBAAkBC,gBAAgB;IAC3C,MAAM;IACN,MAAM;QAAE,gBAAgB;QAAW,SAAS;IAAM;IAClD,aACI;IACJH,cAAAA;IACA,QAAOI,MAAM;QACT,OAAO,WAAP,GACI,oBAACC,YAAUA;YAAC,WAAU;YAAgC,OAAOD,OAAO,aAAa;;IAEzF;AACJ"}
1
+ {"version":3,"file":"extensions/api/BackgroundTasks.js","sources":["../../../src/extensions/api/BackgroundTasks.tsx"],"sourcesContent":["import React from \"react\";\nimport { z } from \"zod\";\nimport { defineExtension } from \"~/defineExtension/index.js\";\nimport { BuildParam } from \"~/extensions/ApiBuildParam.js\";\n\nconst paramsSchema = z.object({\n retentionDays: z\n .number()\n .int()\n .min(0)\n .max(3650)\n .describe(\n \"Default retention period (in days) for completed background task runs. 0 = never delete. Max 3650.\"\n )\n});\n\nexport const BackgroundTasks = defineExtension({\n type: \"Api/BackgroundTasks\",\n tags: { runtimeContext: \"project\", hosting: \"all\" },\n description:\n \"Configure default settings for background tasks. The retention value is used as the default when no admin has explicitly set a value via the Settings UI.\",\n paramsSchema,\n render(params) {\n return (\n <BuildParam paramName=\"BackgroundTasks.RetentionDays\" value={params.retentionDays} />\n );\n }\n});\n"],"names":["paramsSchema","z","BackgroundTasks","defineExtension","params","BuildParam"],"mappings":";;;;AAKA,MAAMA,eAAeC,EAAE,MAAM,CAAC;IAC1B,eAAeA,EAAAA,MACJ,GACN,GAAG,GACH,GAAG,CAAC,GACJ,GAAG,CAAC,MACJ,QAAQ,CACL;AAEZ;AAEO,MAAMC,kBAAkBC,gBAAgB;IAC3C,MAAM;IACN,MAAM;QAAE,gBAAgB;QAAW,SAAS;IAAM;IAClD,aACI;IACJH;IACA,QAAOI,MAAM;QACT,OAAO,WAAP,GACI,oBAACC,YAAUA;YAAC,WAAU;YAAgC,OAAOD,OAAO,aAAa;;IAEzF;AACJ"}
@@ -12,7 +12,7 @@ const ModelFieldCompression = defineExtension({
12
12
  hosting: "all"
13
13
  },
14
14
  description: "Enable or disable compression of Headless CMS model fields at the database storage level.",
15
- paramsSchema: paramsSchema,
15
+ paramsSchema,
16
16
  render (params) {
17
17
  return /*#__PURE__*/ react.createElement(BuildParam, {
18
18
  paramName: "ContentModelFieldCompression",
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/api/Cms/ModelFieldCompression.js","sources":["../../../../src/extensions/api/Cms/ModelFieldCompression.tsx"],"sourcesContent":["import React from \"react\";\nimport { z } from \"zod\";\nimport { defineExtension } from \"~/defineExtension/index.js\";\nimport { BuildParam } from \"~/extensions/ApiBuildParam.js\";\n\nconst paramsSchema = z.object({\n enabled: z\n .boolean()\n .describe(\"Enable compression of model fields before storing in the database.\")\n});\n\nexport const ModelFieldCompression = defineExtension({\n type: \"Api/Cms/ModelFieldCompression\",\n tags: { runtimeContext: \"project\", hosting: \"all\" },\n description:\n \"Enable or disable compression of Headless CMS model fields at the database storage level.\",\n paramsSchema,\n render(params) {\n return <BuildParam paramName=\"ContentModelFieldCompression\" value={params.enabled} />;\n }\n});\n"],"names":["paramsSchema","z","ModelFieldCompression","defineExtension","params","BuildParam"],"mappings":";;;;AAKA,MAAMA,eAAeC,EAAE,MAAM,CAAC;IAC1B,SAASA,EAAAA,OACG,GACP,QAAQ,CAAC;AAClB;AAEO,MAAMC,wBAAwBC,gBAAgB;IACjD,MAAM;IACN,MAAM;QAAE,gBAAgB;QAAW,SAAS;IAAM;IAClD,aACI;IACJH,cAAAA;IACA,QAAOI,MAAM;QACT,OAAO,WAAP,GAAO,oBAACC,YAAUA;YAAC,WAAU;YAA+B,OAAOD,OAAO,OAAO;;IACrF;AACJ"}
1
+ {"version":3,"file":"extensions/api/Cms/ModelFieldCompression.js","sources":["../../../../src/extensions/api/Cms/ModelFieldCompression.tsx"],"sourcesContent":["import React from \"react\";\nimport { z } from \"zod\";\nimport { defineExtension } from \"~/defineExtension/index.js\";\nimport { BuildParam } from \"~/extensions/ApiBuildParam.js\";\n\nconst paramsSchema = z.object({\n enabled: z\n .boolean()\n .describe(\"Enable compression of model fields before storing in the database.\")\n});\n\nexport const ModelFieldCompression = defineExtension({\n type: \"Api/Cms/ModelFieldCompression\",\n tags: { runtimeContext: \"project\", hosting: \"all\" },\n description:\n \"Enable or disable compression of Headless CMS model fields at the database storage level.\",\n paramsSchema,\n render(params) {\n return <BuildParam paramName=\"ContentModelFieldCompression\" value={params.enabled} />;\n }\n});\n"],"names":["paramsSchema","z","ModelFieldCompression","defineExtension","params","BuildParam"],"mappings":";;;;AAKA,MAAMA,eAAeC,EAAE,MAAM,CAAC;IAC1B,SAASA,EAAAA,OACG,GACP,QAAQ,CAAC;AAClB;AAEO,MAAMC,wBAAwBC,gBAAgB;IACjD,MAAM;IACN,MAAM;QAAE,gBAAgB;QAAW,SAAS;IAAM;IAClD,aACI;IACJH;IACA,QAAOI,MAAM;QACT,OAAO,WAAP,GAAO,oBAACC,YAAUA;YAAC,WAAU;YAA+B,OAAOD,OAAO,OAAO;;IACrF;AACJ"}
@@ -15,7 +15,7 @@ const HTTP_METHODS = [
15
15
  "OPTIONS"
16
16
  ];
17
17
  const REGISTER_EXTENSION_PLUGIN_PATH = "@webiny/handler/plugins/RegisterExtensionPlugin.js";
18
- const EVENT_HANDLER_CORE_PATH = "@webiny/event-handler-core";
18
+ const EVENT_HANDLER_CORE_PATH = "@webiny/api-kernel-core";
19
19
  const getImportInsertIndex = (source)=>{
20
20
  const importDeclarations = source.getImportDeclarations();
21
21
  const lastImport = importDeclarations[importDeclarations.length - 1];
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/api/Route/ApiRoute.js","sources":["../../../../src/extensions/api/Route/ApiRoute.ts"],"sourcesContent":["import path from \"path\";\nimport crypto from \"crypto\";\nimport { z } from \"zod\";\nimport { Node } from \"ts-morph\";\nimport { Project } from \"ts-morph\";\nimport { type ArrayLiteralExpression } from \"ts-morph\";\nimport { type SourceFile } from \"ts-morph\";\nimport { defineExtension } from \"~/defineExtension/index.js\";\nimport { zodSrcPath } from \"~/defineExtension/index.js\";\nimport { ExtensionSrcResolver } from \"~/index.js\";\nimport { deriveRouteName } from \"./routePath.js\";\nimport { toRouterPath } from \"./routePath.js\";\n\n/*\n * The methods the DI router can match. It compares a definition's method to the request's exactly,\n * so a catch-all such as API Gateway's `ANY` would register a route no request can reach.\n */\nexport const HTTP_METHODS = [\"DELETE\", \"GET\", \"HEAD\", \"PATCH\", \"POST\", \"PUT\", \"OPTIONS\"] as const;\n\nconst REGISTER_EXTENSION_PLUGIN_PATH = \"@webiny/handler/plugins/RegisterExtensionPlugin.js\";\nconst EVENT_HANDLER_CORE_PATH = \"@webiny/event-handler-core\";\n\n// Right after the last import, or at the top of a file that has none.\nconst getImportInsertIndex = (source: SourceFile) => {\n const importDeclarations = source.getImportDeclarations();\n const lastImport = importDeclarations[importDeclarations.length - 1];\n if (!lastImport) {\n return 1;\n }\n return lastImport.getChildIndex() + 1;\n};\n\n/*\n * Adds `name` to the named imports from `moduleSpecifier`, adding the import declaration after the\n * last import when there is none. An existing import from the same module may name other things,\n * e.g. BuildParam imports `createRegisterBuildParamPlugin` from the RegisterExtensionPlugin path.\n */\nconst ensureNamedImport = (source: SourceFile, moduleSpecifier: string, name: string) => {\n const existing = source.getImportDeclaration(moduleSpecifier);\n if (existing) {\n const namedImports = existing.getNamedImports();\n if (!namedImports.some(i => i.getName() === name)) {\n existing.addNamedImport(name);\n }\n return;\n }\n\n const index = getImportInsertIndex(source);\n source.insertImportDeclaration(index, {\n namedImports: [name],\n moduleSpecifier\n });\n};\n\n/**\n * Registers a custom HTTP route with the API's DI router, for every hosting type. The build step\n * adds the route's handler and an `HttpRouteDefinition` to `apps/api/graphql/src/extensions.ts`.\n * That is all a standalone project needs, because its HTTP server hands every request to the\n * router. `@webiny/project-aws` registers its own implementation, which also adds the route to API\n * Gateway.\n */\nexport const ApiRoute = defineExtension({\n type: \"Api/Route\",\n tags: { runtimeContext: \"app-build\", appName: \"api\", hosting: \"all\" },\n description: \"Register a custom HTTP route on the API.\",\n multiple: true,\n paramsSchema: ({ project }) => {\n return z.object({\n // Path parameters may be written `{orderId}` (API Gateway) or `:orderId` (the DI\n // router). Both are accepted and converted per consumer, see `routePath.ts`.\n path: z.string().startsWith(\"/\"),\n method: z.enum(HTTP_METHODS),\n // The `src` file must default-export a route HANDLER, the result of\n // `HttpRouteHandler.createImplementation` from `@webiny/event-handler-core`. It does\n // NOT declare its own method/path: the `HttpRouteDefinition` the router matches on is\n // generated below from the props here, so the route the gateway forwards to and the\n // route the router matches cannot drift apart.\n src: zodSrcPath({ project }),\n // Doubles as the route's DI name, so a decorator on HttpRouteDefinition can pick this\n // route out by it. Derived from path + method when omitted, same as the Pulumi name.\n routeName: z.string().optional()\n });\n },\n async build(params, ctx) {\n const extensionsTsFilePath = ctx.project.paths.workspaceFolder\n .join(\"apps\", \"api\", \"graphql\", \"src\", \"extensions.ts\")\n .toString();\n\n const absoluteSrcFilePath = ExtensionSrcResolver.resolvePath(params.src, ctx.project);\n\n // Stable alias to avoid naming conflicts across multiple routes.\n const hash = crypto.createHash(\"sha256\").update(params.src).digest(\"hex\");\n const alias = `ApiRoute_${hash.slice(-10)}`;\n\n const extensionsTsFolder = path.dirname(extensionsTsFilePath);\n const importPath = path\n .relative(extensionsTsFolder, absoluteSrcFilePath)\n .replace(/\\.tsx?$/, \".js\");\n\n const tsProject = new Project();\n tsProject.addSourceFileAtPath(extensionsTsFilePath);\n const source = tsProject.getSourceFileOrThrow(extensionsTsFilePath);\n\n // Register an HttpRouteDefinition built from the props above. The router matches on\n // definitions and only then builds the handler, so registering the handler alone would\n // leave the route unreachable: the request reaches the API and dispatch finds nothing. The\n // path is converted to the router's `:param` syntax.\n const routerPath = toRouterPath(params.path);\n const routeName = params.routeName ?? deriveRouteName(params.path, params.method);\n const nameProperty = `name: ${JSON.stringify(routeName)},`;\n const registration = `\\ncreateRegisterExtensionPlugin(ctx => {\\n\\tctx.container.register(\\n\\t\\tcreateHttpRouteDefinition({\\n\\t\\t\\t${nameProperty}\\n\\t\\t\\tmethod: ${JSON.stringify(params.method)},\\n\\t\\t\\tpath: ${JSON.stringify(routerPath)},\\n\\t\\t\\thandler: ${alias}\\n\\t\\t})\\n\\t);\\n})`;\n\n /*\n * The workspace is regenerated before every build and watch, so a registration already in\n * the file comes from another `<Api.Route>` in the same config. The same route twice is\n * skipped. Two routes with one name would be two DI definitions a decorator can't tell\n * apart, and on AWS two API Gateway resources with one Pulumi name, so the build stops.\n */\n const sourceText = source.getFullText();\n // Whitespace is ignored: ts-morph re-indents an element when it inserts it.\n const compactSource = sourceText.replace(/\\s+/g, \"\");\n const compactRegistration = registration.replace(/\\s+/g, \"\");\n if (compactSource.includes(compactRegistration)) {\n return;\n }\n if (sourceText.includes(nameProperty)) {\n throw new Error(\n `Two \"Api.Route\" entries resolve to the route name \"${routeName}\". A derived name leaves out path parameters, so \"/orders\" and \"/orders/{id}\" collide; set \"routeName\" on one of them.`\n );\n }\n\n // One handler file may back several routes, so its import is added only once.\n if (!source.getImportDeclaration(importPath)) {\n const index = getImportInsertIndex(source);\n source.insertImportDeclaration(index, {\n defaultImport: alias,\n moduleSpecifier: importPath\n });\n }\n\n ensureNamedImport(source, REGISTER_EXTENSION_PLUGIN_PATH, \"createRegisterExtensionPlugin\");\n ensureNamedImport(source, EVENT_HANDLER_CORE_PATH, \"createHttpRouteDefinition\");\n\n const pluginsArray = source.getFirstDescendant(node =>\n Node.isArrayLiteralExpression(node)\n ) as ArrayLiteralExpression;\n\n pluginsArray.addElement(registration);\n\n await source.save();\n }\n});\n"],"names":["HTTP_METHODS","REGISTER_EXTENSION_PLUGIN_PATH","EVENT_HANDLER_CORE_PATH","getImportInsertIndex","source","importDeclarations","lastImport","ensureNamedImport","moduleSpecifier","name","existing","namedImports","i","index","ApiRoute","defineExtension","project","z","zodSrcPath","params","ctx","extensionsTsFilePath","absoluteSrcFilePath","ExtensionSrcResolver","hash","crypto","alias","extensionsTsFolder","path","importPath","tsProject","Project","routerPath","toRouterPath","routeName","deriveRouteName","nameProperty","JSON","registration","sourceText","compactSource","compactRegistration","Error","pluginsArray","node","Node"],"mappings":"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"}
1
+ {"version":3,"file":"extensions/api/Route/ApiRoute.js","sources":["../../../../src/extensions/api/Route/ApiRoute.ts"],"sourcesContent":["import path from \"path\";\nimport crypto from \"crypto\";\nimport { z } from \"zod\";\nimport { Node } from \"ts-morph\";\nimport { Project } from \"ts-morph\";\nimport { type ArrayLiteralExpression } from \"ts-morph\";\nimport { type SourceFile } from \"ts-morph\";\nimport { defineExtension } from \"~/defineExtension/index.js\";\nimport { zodSrcPath } from \"~/defineExtension/index.js\";\nimport { ExtensionSrcResolver } from \"~/index.js\";\nimport { deriveRouteName } from \"./routePath.js\";\nimport { toRouterPath } from \"./routePath.js\";\n\n/*\n * The methods the DI router can match. It compares a definition's method to the request's exactly,\n * so a catch-all such as API Gateway's `ANY` would register a route no request can reach.\n */\nexport const HTTP_METHODS = [\"DELETE\", \"GET\", \"HEAD\", \"PATCH\", \"POST\", \"PUT\", \"OPTIONS\"] as const;\n\nconst REGISTER_EXTENSION_PLUGIN_PATH = \"@webiny/handler/plugins/RegisterExtensionPlugin.js\";\nconst EVENT_HANDLER_CORE_PATH = \"@webiny/api-kernel-core\";\n\n// Right after the last import, or at the top of a file that has none.\nconst getImportInsertIndex = (source: SourceFile) => {\n const importDeclarations = source.getImportDeclarations();\n const lastImport = importDeclarations[importDeclarations.length - 1];\n if (!lastImport) {\n return 1;\n }\n return lastImport.getChildIndex() + 1;\n};\n\n/*\n * Adds `name` to the named imports from `moduleSpecifier`, adding the import declaration after the\n * last import when there is none. An existing import from the same module may name other things,\n * e.g. BuildParam imports `createRegisterBuildParamPlugin` from the RegisterExtensionPlugin path.\n */\nconst ensureNamedImport = (source: SourceFile, moduleSpecifier: string, name: string) => {\n const existing = source.getImportDeclaration(moduleSpecifier);\n if (existing) {\n const namedImports = existing.getNamedImports();\n if (!namedImports.some(i => i.getName() === name)) {\n existing.addNamedImport(name);\n }\n return;\n }\n\n const index = getImportInsertIndex(source);\n source.insertImportDeclaration(index, {\n namedImports: [name],\n moduleSpecifier\n });\n};\n\n/**\n * Registers a custom HTTP route with the API's DI router, for every hosting type. The build step\n * adds the route's handler and an `HttpRouteDefinition` to `apps/api/graphql/src/extensions.ts`.\n * That is all a standalone project needs, because its HTTP server hands every request to the\n * router. `@webiny/project-aws` registers its own implementation, which also adds the route to API\n * Gateway.\n */\nexport const ApiRoute = defineExtension({\n type: \"Api/Route\",\n tags: { runtimeContext: \"app-build\", appName: \"api\", hosting: \"all\" },\n description: \"Register a custom HTTP route on the API.\",\n multiple: true,\n paramsSchema: ({ project }) => {\n return z.object({\n // Path parameters may be written `{orderId}` (API Gateway) or `:orderId` (the DI\n // router). Both are accepted and converted per consumer, see `routePath.ts`.\n path: z.string().startsWith(\"/\"),\n method: z.enum(HTTP_METHODS),\n // The `src` file must default-export a route HANDLER, the result of\n // `HttpRouteHandler.createImplementation` from `@webiny/api-kernel-core`. It does\n // NOT declare its own method/path: the `HttpRouteDefinition` the router matches on is\n // generated below from the props here, so the route the gateway forwards to and the\n // route the router matches cannot drift apart.\n src: zodSrcPath({ project }),\n // Doubles as the route's DI name, so a decorator on HttpRouteDefinition can pick this\n // route out by it. Derived from path + method when omitted, same as the Pulumi name.\n routeName: z.string().optional()\n });\n },\n async build(params, ctx) {\n const extensionsTsFilePath = ctx.project.paths.workspaceFolder\n .join(\"apps\", \"api\", \"graphql\", \"src\", \"extensions.ts\")\n .toString();\n\n const absoluteSrcFilePath = ExtensionSrcResolver.resolvePath(params.src, ctx.project);\n\n // Stable alias to avoid naming conflicts across multiple routes.\n const hash = crypto.createHash(\"sha256\").update(params.src).digest(\"hex\");\n const alias = `ApiRoute_${hash.slice(-10)}`;\n\n const extensionsTsFolder = path.dirname(extensionsTsFilePath);\n const importPath = path\n .relative(extensionsTsFolder, absoluteSrcFilePath)\n .replace(/\\.tsx?$/, \".js\");\n\n const tsProject = new Project();\n tsProject.addSourceFileAtPath(extensionsTsFilePath);\n const source = tsProject.getSourceFileOrThrow(extensionsTsFilePath);\n\n // Register an HttpRouteDefinition built from the props above. The router matches on\n // definitions and only then builds the handler, so registering the handler alone would\n // leave the route unreachable: the request reaches the API and dispatch finds nothing. The\n // path is converted to the router's `:param` syntax.\n const routerPath = toRouterPath(params.path);\n const routeName = params.routeName ?? deriveRouteName(params.path, params.method);\n const nameProperty = `name: ${JSON.stringify(routeName)},`;\n const registration = `\\ncreateRegisterExtensionPlugin(ctx => {\\n\\tctx.container.register(\\n\\t\\tcreateHttpRouteDefinition({\\n\\t\\t\\t${nameProperty}\\n\\t\\t\\tmethod: ${JSON.stringify(params.method)},\\n\\t\\t\\tpath: ${JSON.stringify(routerPath)},\\n\\t\\t\\thandler: ${alias}\\n\\t\\t})\\n\\t);\\n})`;\n\n /*\n * The workspace is regenerated before every build and watch, so a registration already in\n * the file comes from another `<Api.Route>` in the same config. The same route twice is\n * skipped. Two routes with one name would be two DI definitions a decorator can't tell\n * apart, and on AWS two API Gateway resources with one Pulumi name, so the build stops.\n */\n const sourceText = source.getFullText();\n // Whitespace is ignored: ts-morph re-indents an element when it inserts it.\n const compactSource = sourceText.replace(/\\s+/g, \"\");\n const compactRegistration = registration.replace(/\\s+/g, \"\");\n if (compactSource.includes(compactRegistration)) {\n return;\n }\n if (sourceText.includes(nameProperty)) {\n throw new Error(\n `Two \"Api.Route\" entries resolve to the route name \"${routeName}\". A derived name leaves out path parameters, so \"/orders\" and \"/orders/{id}\" collide; set \"routeName\" on one of them.`\n );\n }\n\n // One handler file may back several routes, so its import is added only once.\n if (!source.getImportDeclaration(importPath)) {\n const index = getImportInsertIndex(source);\n source.insertImportDeclaration(index, {\n defaultImport: alias,\n moduleSpecifier: importPath\n });\n }\n\n ensureNamedImport(source, REGISTER_EXTENSION_PLUGIN_PATH, \"createRegisterExtensionPlugin\");\n ensureNamedImport(source, EVENT_HANDLER_CORE_PATH, \"createHttpRouteDefinition\");\n\n const pluginsArray = source.getFirstDescendant(node =>\n Node.isArrayLiteralExpression(node)\n ) as ArrayLiteralExpression;\n\n pluginsArray.addElement(registration);\n\n await source.save();\n }\n});\n"],"names":["HTTP_METHODS","REGISTER_EXTENSION_PLUGIN_PATH","EVENT_HANDLER_CORE_PATH","getImportInsertIndex","source","importDeclarations","lastImport","ensureNamedImport","moduleSpecifier","name","existing","namedImports","i","index","ApiRoute","defineExtension","project","z","zodSrcPath","params","ctx","extensionsTsFilePath","absoluteSrcFilePath","ExtensionSrcResolver","hash","crypto","alias","extensionsTsFolder","path","importPath","tsProject","Project","routerPath","toRouterPath","routeName","deriveRouteName","nameProperty","JSON","registration","sourceText","compactSource","compactRegistration","Error","pluginsArray","node","Node"],"mappings":"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"}
@@ -3,7 +3,8 @@
3
3
  * API Gateway wants `{orderId}`, the DI `HttpRouter` wants `:orderId`. Rather than pick a winner and
4
4
  * break whichever projects already used the other, accept both and convert per consumer. The API
5
5
  * Gateway conversion lives in `@webiny/project-aws` (`toApiGatewayPath.ts`), the only package that
6
- * creates API Gateway routes.
6
+ * creates API Gateway routes, next to the CloudFront one (`toCloudFrontPathPattern.ts`) that routes a
7
+ * path to the web function.
7
8
  *
8
9
  * Wildcards are left alone. `HttpRouter` matches a trailing `/*`, API Gateway spells the same thing
9
10
  * `{proxy+}`, and translating between them changes what the route captures — so a wildcard route
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/api/Route/routePath.js","sources":["../../../../src/extensions/api/Route/routePath.ts"],"sourcesContent":["/**\n * The `path` prop on `<Api.Route>` feeds two consumers that spell path parameters differently:\n * API Gateway wants `{orderId}`, the DI `HttpRouter` wants `:orderId`. Rather than pick a winner and\n * break whichever projects already used the other, accept both and convert per consumer. The API\n * Gateway conversion lives in `@webiny/project-aws` (`toApiGatewayPath.ts`), the only package that\n * creates API Gateway routes.\n *\n * Wildcards are left alone. `HttpRouter` matches a trailing `/*`, API Gateway spells the same thing\n * `{proxy+}`, and translating between them changes what the route captures — so a wildcard route\n * has to be written for the target it's aimed at.\n */\n\n/** `/orders/{orderId}` → `/orders/:orderId`. Already-colon segments pass through. */\nexport function toRouterPath(path: string): string {\n return path.replace(/\\{([^}]+)\\}/g, (_match, name: string) => {\n return `:${name}`;\n });\n}\n\n/**\n * `/asd/{id}/xs` + POST → `asd-xs-post`. Handles either parameter syntax.\n *\n * Used for BOTH the Pulumi resource name and the route's DI name, so the name a decorator matches\n * on is the same one that shows up in infrastructure.\n */\nexport function deriveRouteName(routePath: string, method: string): string {\n // /asd/{id}/xs + POST → asd-xs-post. Strips parameters in either syntax.\n const pathPart = routePath\n .replace(/^\\//, \"\")\n .replace(/\\{[^}]*\\}/g, \"\")\n .replace(/(^|\\/):[^/]+/g, \"$1\")\n .replace(/\\/+/g, \"-\")\n .replace(/^-+|-+$/g, \"\")\n .toLowerCase();\n\n return `${pathPart}-${method.toLowerCase()}`;\n}\n"],"names":["toRouterPath","path","_match","name","deriveRouteName","routePath","method","pathPart"],"mappings":"AAaO,SAASA,aAAaC,IAAY;IACrC,OAAOA,KAAK,OAAO,CAAC,gBAAgB,CAACC,QAAQC,OAClC,CAAC,CAAC,EAAEA,MAAM;AAEzB;AAQO,SAASC,gBAAgBC,SAAiB,EAAEC,MAAc;IAE7D,MAAMC,WAAWF,UACZ,OAAO,CAAC,OAAO,IACf,OAAO,CAAC,cAAc,IACtB,OAAO,CAAC,iBAAiB,MACzB,OAAO,CAAC,QAAQ,KAChB,OAAO,CAAC,YAAY,IACpB,WAAW;IAEhB,OAAO,GAAGE,SAAS,CAAC,EAAED,OAAO,WAAW,IAAI;AAChD"}
1
+ {"version":3,"file":"extensions/api/Route/routePath.js","sources":["../../../../src/extensions/api/Route/routePath.ts"],"sourcesContent":["/**\n * The `path` prop on `<Api.Route>` feeds two consumers that spell path parameters differently:\n * API Gateway wants `{orderId}`, the DI `HttpRouter` wants `:orderId`. Rather than pick a winner and\n * break whichever projects already used the other, accept both and convert per consumer. The API\n * Gateway conversion lives in `@webiny/project-aws` (`toApiGatewayPath.ts`), the only package that\n * creates API Gateway routes, next to the CloudFront one (`toCloudFrontPathPattern.ts`) that routes a\n * path to the web function.\n *\n * Wildcards are left alone. `HttpRouter` matches a trailing `/*`, API Gateway spells the same thing\n * `{proxy+}`, and translating between them changes what the route captures — so a wildcard route\n * has to be written for the target it's aimed at.\n */\n\n/** `/orders/{orderId}` → `/orders/:orderId`. Already-colon segments pass through. */\nexport function toRouterPath(path: string): string {\n return path.replace(/\\{([^}]+)\\}/g, (_match, name: string) => {\n return `:${name}`;\n });\n}\n\n/**\n * `/asd/{id}/xs` + POST → `asd-xs-post`. Handles either parameter syntax.\n *\n * Used for BOTH the Pulumi resource name and the route's DI name, so the name a decorator matches\n * on is the same one that shows up in infrastructure.\n */\nexport function deriveRouteName(routePath: string, method: string): string {\n // /asd/{id}/xs + POST → asd-xs-post. Strips parameters in either syntax.\n const pathPart = routePath\n .replace(/^\\//, \"\")\n .replace(/\\{[^}]*\\}/g, \"\")\n .replace(/(^|\\/):[^/]+/g, \"$1\")\n .replace(/\\/+/g, \"-\")\n .replace(/^-+|-+$/g, \"\")\n .toLowerCase();\n\n return `${pathPart}-${method.toLowerCase()}`;\n}\n"],"names":["toRouterPath","path","_match","name","deriveRouteName","routePath","method","pathPart"],"mappings":"AAcO,SAASA,aAAaC,IAAY;IACrC,OAAOA,KAAK,OAAO,CAAC,gBAAgB,CAACC,QAAQC,OAClC,CAAC,CAAC,EAAEA,MAAM;AAEzB;AAQO,SAASC,gBAAgBC,SAAiB,EAAEC,MAAc;IAE7D,MAAMC,WAAWF,UACZ,OAAO,CAAC,OAAO,IACf,OAAO,CAAC,cAAc,IACtB,OAAO,CAAC,iBAAiB,MACzB,OAAO,CAAC,QAAQ,KAChB,OAAO,CAAC,YAAY,IACpB,WAAW;IAEhB,OAAO,GAAGE,SAAS,CAAC,EAAED,OAAO,WAAW,IAAI;AAChD"}
@@ -1,5 +1,3 @@
1
1
  export * from "./BackgroundTasks.js";
2
2
  export * from "./Route/index.js";
3
3
  export * from "./Cms/ModelFieldCompression.js";
4
- export * from "./Mailer/Smtp.js";
5
- export * from "./Mailer/SmtpParamsSchema.js";
@@ -1,5 +1,3 @@
1
1
  export * from "./BackgroundTasks.js";
2
2
  export * from "./Route/index.js";
3
3
  export * from "./Cms/ModelFieldCompression.js";
4
- export * from "./Mailer/Smtp.js";
5
- export * from "./Mailer/SmtpParamsSchema.js";
@@ -74,6 +74,7 @@ export declare const definitions: (import("./index.js").ExtensionDefinitionModel
74
74
  }, import("zod/v4/core").$strip>>;
75
75
  lexicalGeneration: import("zod").ZodOptional<import("zod").ZodBoolean>;
76
76
  adminAssistant: import("zod").ZodOptional<import("zod").ZodBoolean>;
77
+ remoteComponents: import("zod").ZodOptional<import("zod").ZodBoolean>;
77
78
  cms: import("zod").ZodOptional<import("zod").ZodObject<{
78
79
  entryGeneration: import("zod").ZodOptional<import("zod").ZodBoolean>;
79
80
  entryComparison: import("zod").ZodOptional<import("zod").ZodBoolean>;
@@ -87,14 +88,8 @@ export declare const definitions: (import("./index.js").ExtensionDefinitionModel
87
88
  }, import("zod/v4/core").$strip>]>>;
88
89
  webhooks: import("zod").ZodOptional<import("zod").ZodBoolean>;
89
90
  }, import("zod/v4/core").$strip>;
90
- }, import("zod/v4/core").$strip>> | import("./index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
91
- src: import("zod").ZodString;
92
- }, import("zod/v4/core").$strip>> | import("./index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
93
- id: import("zod").ZodString;
94
91
  }, import("zod/v4/core").$strip>> | import("./index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
95
92
  src: import("zod").ZodPipe<import("zod").ZodString, import("zod").ZodTransform<string, string>>;
96
- }, import("zod/v4/core").$strip>> | import("./index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
97
- url: import("zod").ZodString;
98
93
  }, import("zod/v4/core").$strip>> | import("./index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
99
94
  varName: import("zod").ZodString;
100
95
  value: import("zod").ZodString;
@@ -102,6 +97,10 @@ export declare const definitions: (import("./index.js").ExtensionDefinitionModel
102
97
  token: import("zod").ZodOptional<import("zod").ZodString>;
103
98
  repository: import("zod").ZodOptional<import("zod").ZodString>;
104
99
  labels: import("zod").ZodOptional<import("zod").ZodString>;
100
+ }, import("zod/v4/core").$strip>> | import("./index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
101
+ id: import("zod").ZodString;
102
+ }, import("zod/v4/core").$strip>> | import("./index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
103
+ src: import("zod").ZodString;
105
104
  }, import("zod/v4/core").$strip>> | import("./index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
106
105
  environments: import("zod").ZodArray<import("zod").ZodString>;
107
106
  }, import("zod/v4/core").$strip>> | import("./index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
@@ -109,18 +108,14 @@ export declare const definitions: (import("./index.js").ExtensionDefinitionModel
109
108
  ddb: "ddb";
110
109
  "ddb+es": "ddb+es";
111
110
  "ddb+os": "ddb+os";
111
+ pg: "pg";
112
112
  }>;
113
+ }, import("zod/v4/core").$strip>> | import("./index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
114
+ url: import("zod").ZodString;
113
115
  }, import("zod/v4/core").$strip>> | import("./index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
114
116
  retentionDays: import("zod").ZodNumber;
115
117
  }, import("zod/v4/core").$strip>> | import("./index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
116
118
  enabled: import("zod").ZodBoolean;
117
- }, import("zod/v4/core").$strip>> | import("./index.js").ExtensionDefinitionModel<import("zod").ZodObject<{
118
- host: import("zod").ZodString;
119
- port: import("zod").ZodNumber;
120
- user: import("zod").ZodString;
121
- password: import("zod").ZodString;
122
- from: import("zod").ZodString;
123
- replyTo: import("zod").ZodOptional<import("zod").ZodString>;
124
119
  }, import("zod/v4/core").$strip>>)[];
125
120
  export { Project } from "./Project.js";
126
121
  export * from "../defineExtension/index.js";
@@ -13,7 +13,7 @@ import { AdminApiUrl } from "./AdminApiUrl.js";
13
13
  import { AdminWebsocketsUrl } from "./AdminWebsocketsUrl.js";
14
14
  import { AdminExtension } from "./AdminExtension.js";
15
15
  import { ApiExtension } from "./ApiExtension.js";
16
- import { ApiRoute, BackgroundTasks, ModelFieldCompression, Smtp } from "./api/index.js";
16
+ import { ApiRoute, BackgroundTasks, ModelFieldCompression } from "./api/index.js";
17
17
  import { AdminAfterBuild, AdminBeforeBuild, AdminBeforeWatch, AfterBuild, ApiAfterBuild, ApiBeforeBuild, ApiBeforeWatch, BeforeBuild, BeforeWatch, CoreAfterBuild, CoreBeforeBuild, CoreBeforeWatch } from "./hooks/index.js";
18
18
  import { ProductionEnvironments } from "./ProductionEnvironments.js";
19
19
  export * from "../defineExtension/index.js";
@@ -48,8 +48,7 @@ const definitions = [
48
48
  ApiExtension.def,
49
49
  ApiRoute.def,
50
50
  BackgroundTasks.def,
51
- ModelFieldCompression.def,
52
- Smtp.def
51
+ ModelFieldCompression.def
53
52
  ];
54
53
  export { Project } from "./Project.js";
55
54
  export { AdminAfterBuild, AdminApiUrl, AdminBeforeBuild, AdminBeforeWatch, AdminBuildParam, AdminExtension, AdminWebsocketsUrl, AfterBuild, ApiAfterBuild, ApiBeforeBuild, ApiBeforeWatch, ApiExtension, BeforeBuild, BeforeWatch, BugReporter, BuildParam, CoreAfterBuild, CoreBeforeBuild, CoreBeforeWatch, DatabaseSetup, EnvVar, ExtensionDefinitions, FeatureFlags, ProductionEnvironments, ProjectDecorator, ProjectId, ProjectImplementation, Telemetry, definitions };
@@ -1 +1 @@
1
- {"version":3,"file":"extensions/index.js","sources":["../../src/extensions/index.ts"],"sourcesContent":["import { ExtensionDefinitions } from \"./ExtensionDefinitions.js\";\nimport { ProjectDecorator } from \"./ProjectDecorator.js\";\nimport { ProjectImplementation } from \"./ProjectImplementation.js\";\nimport { ProjectId } from \"./ProjectId.js\";\nimport { Telemetry } from \"./Telemetry.js\";\nimport { EnvVar } from \"./EnvVar.js\";\nimport { DatabaseSetup } from \"./DatabaseSetup.js\";\nimport { FeatureFlags } from \"./FeatureFlags.js\";\nimport { BugReporter } from \"./BugReporter.js\";\nimport { BuildParam } from \"./ApiBuildParam.js\";\nimport { AdminBuildParam } from \"./AdminBuildParam.js\";\nimport { AdminApiUrl } from \"./AdminApiUrl.js\";\nimport { AdminWebsocketsUrl } from \"./AdminWebsocketsUrl.js\";\nimport { AdminExtension } from \"./AdminExtension.js\";\nimport { ApiExtension } from \"./ApiExtension.js\";\nimport { ApiRoute } from \"./api/index.js\";\nimport { BackgroundTasks } from \"./api/index.js\";\nimport { ModelFieldCompression } from \"./api/index.js\";\nimport { Smtp } from \"./api/index.js\";\n\n// Hooks.\nimport {\n AdminAfterBuild,\n AdminBeforeBuild,\n AdminBeforeWatch,\n AfterBuild,\n BeforeWatch,\n ApiAfterBuild,\n ApiBeforeBuild,\n ApiBeforeWatch,\n BeforeBuild,\n CoreAfterBuild,\n CoreBeforeBuild,\n CoreBeforeWatch\n} from \"./hooks/index.js\";\n\nimport { ProductionEnvironments } from \"./ProductionEnvironments.js\";\n\n// Exports.\nexport { Telemetry };\nexport { ProjectId };\nexport { ProjectDecorator };\nexport { ProjectImplementation };\nexport { ExtensionDefinitions };\nexport { EnvVar };\nexport { FeatureFlags };\nexport { BugReporter };\nexport { DatabaseSetup };\nexport { BuildParam };\nexport { AdminBuildParam };\nexport { AdminApiUrl };\nexport { AdminWebsocketsUrl };\nexport { AdminExtension };\nexport { ApiExtension };\n\n// Hooks.\nexport { BeforeBuild };\nexport { BeforeWatch };\nexport { AfterBuild };\nexport { AdminBeforeBuild };\nexport { AdminBeforeWatch };\nexport { AdminAfterBuild };\nexport { ApiBeforeBuild };\nexport { ApiBeforeWatch };\nexport { ApiAfterBuild };\nexport { CoreBeforeBuild };\nexport { CoreBeforeWatch };\nexport { CoreAfterBuild };\n\nexport { ProductionEnvironments };\n\n// Definitions (used internally). 👇\nexport const definitions = [\n Telemetry.def,\n ProjectId.def,\n ProjectDecorator.def,\n ProjectImplementation.def,\n ExtensionDefinitions.def,\n EnvVar.def,\n FeatureFlags.def,\n BugReporter.def,\n\n // Hooks.\n AdminAfterBuild.def,\n BeforeBuild.def,\n BeforeWatch.def,\n AfterBuild.def,\n AdminBeforeBuild.def,\n AdminBeforeWatch.def,\n ApiAfterBuild.def,\n ApiBeforeBuild.def,\n ApiBeforeWatch.def,\n CoreAfterBuild.def,\n CoreBeforeBuild.def,\n CoreBeforeWatch.def,\n\n ProductionEnvironments.def,\n DatabaseSetup.def,\n BuildParam.def,\n AdminBuildParam.def,\n AdminApiUrl.def,\n AdminWebsocketsUrl.def,\n AdminExtension.def,\n ApiExtension.def,\n ApiRoute.def,\n\n // Api settings that apply to every hosting type.\n BackgroundTasks.def,\n ModelFieldCompression.def,\n Smtp.def\n];\n\nexport { Project } from \"./Project.js\";\n\nexport * from \"../defineExtension/index.js\";\n"],"names":["definitions","Telemetry","ProjectId","ProjectDecorator","ProjectImplementation","ExtensionDefinitions","EnvVar","FeatureFlags","BugReporter","AdminAfterBuild","BeforeBuild","BeforeWatch","AfterBuild","AdminBeforeBuild","AdminBeforeWatch","ApiAfterBuild","ApiBeforeBuild","ApiBeforeWatch","CoreAfterBuild","CoreBeforeBuild","CoreBeforeWatch","ProductionEnvironments","DatabaseSetup","BuildParam","AdminBuildParam","AdminApiUrl","AdminWebsocketsUrl","AdminExtension","ApiExtension","ApiRoute","BackgroundTasks","ModelFieldCompression","Smtp"],"mappings":";;;;;;;;;;;;;;;;;;;AAwEO,MAAMA,cAAc;IACvBC,UAAU,GAAG;IACbC,UAAU,GAAG;IACbC,iBAAiB,GAAG;IACpBC,sBAAsB,GAAG;IACzBC,qBAAqB,GAAG;IACxBC,OAAO,GAAG;IACVC,aAAa,GAAG;IAChBC,YAAY,GAAG;IAGfC,gBAAgB,GAAG;IACnBC,YAAY,GAAG;IACfC,YAAY,GAAG;IACfC,WAAW,GAAG;IACdC,iBAAiB,GAAG;IACpBC,iBAAiB,GAAG;IACpBC,cAAc,GAAG;IACjBC,eAAe,GAAG;IAClBC,eAAe,GAAG;IAClBC,eAAe,GAAG;IAClBC,gBAAgB,GAAG;IACnBC,gBAAgB,GAAG;IAEnBC,uBAAuB,GAAG;IAC1BC,cAAc,GAAG;IACjBC,WAAW,GAAG;IACdC,gBAAgB,GAAG;IACnBC,YAAY,GAAG;IACfC,mBAAmB,GAAG;IACtBC,eAAe,GAAG;IAClBC,aAAa,GAAG;IAChBC,SAAS,GAAG;IAGZC,gBAAgB,GAAG;IACnBC,sBAAsB,GAAG;IACzBC,KAAK,GAAG;CACX"}
1
+ {"version":3,"file":"extensions/index.js","sources":["../../src/extensions/index.ts"],"sourcesContent":["import { ExtensionDefinitions } from \"./ExtensionDefinitions.js\";\nimport { ProjectDecorator } from \"./ProjectDecorator.js\";\nimport { ProjectImplementation } from \"./ProjectImplementation.js\";\nimport { ProjectId } from \"./ProjectId.js\";\nimport { Telemetry } from \"./Telemetry.js\";\nimport { EnvVar } from \"./EnvVar.js\";\nimport { DatabaseSetup } from \"./DatabaseSetup.js\";\nimport { FeatureFlags } from \"./FeatureFlags.js\";\nimport { BugReporter } from \"./BugReporter.js\";\nimport { BuildParam } from \"./ApiBuildParam.js\";\nimport { AdminBuildParam } from \"./AdminBuildParam.js\";\nimport { AdminApiUrl } from \"./AdminApiUrl.js\";\nimport { AdminWebsocketsUrl } from \"./AdminWebsocketsUrl.js\";\nimport { AdminExtension } from \"./AdminExtension.js\";\nimport { ApiExtension } from \"./ApiExtension.js\";\nimport { ApiRoute } from \"./api/index.js\";\nimport { BackgroundTasks } from \"./api/index.js\";\nimport { ModelFieldCompression } from \"./api/index.js\";\n\n// Hooks.\nimport {\n AdminAfterBuild,\n AdminBeforeBuild,\n AdminBeforeWatch,\n AfterBuild,\n BeforeWatch,\n ApiAfterBuild,\n ApiBeforeBuild,\n ApiBeforeWatch,\n BeforeBuild,\n CoreAfterBuild,\n CoreBeforeBuild,\n CoreBeforeWatch\n} from \"./hooks/index.js\";\n\nimport { ProductionEnvironments } from \"./ProductionEnvironments.js\";\n\n// Exports.\nexport { Telemetry };\nexport { ProjectId };\nexport { ProjectDecorator };\nexport { ProjectImplementation };\nexport { ExtensionDefinitions };\nexport { EnvVar };\nexport { FeatureFlags };\nexport { BugReporter };\nexport { DatabaseSetup };\nexport { BuildParam };\nexport { AdminBuildParam };\nexport { AdminApiUrl };\nexport { AdminWebsocketsUrl };\nexport { AdminExtension };\nexport { ApiExtension };\n\n// Hooks.\nexport { BeforeBuild };\nexport { BeforeWatch };\nexport { AfterBuild };\nexport { AdminBeforeBuild };\nexport { AdminBeforeWatch };\nexport { AdminAfterBuild };\nexport { ApiBeforeBuild };\nexport { ApiBeforeWatch };\nexport { ApiAfterBuild };\nexport { CoreBeforeBuild };\nexport { CoreBeforeWatch };\nexport { CoreAfterBuild };\n\nexport { ProductionEnvironments };\n\n// Definitions (used internally). 👇\nexport const definitions = [\n Telemetry.def,\n ProjectId.def,\n ProjectDecorator.def,\n ProjectImplementation.def,\n ExtensionDefinitions.def,\n EnvVar.def,\n FeatureFlags.def,\n BugReporter.def,\n\n // Hooks.\n AdminAfterBuild.def,\n BeforeBuild.def,\n BeforeWatch.def,\n AfterBuild.def,\n AdminBeforeBuild.def,\n AdminBeforeWatch.def,\n ApiAfterBuild.def,\n ApiBeforeBuild.def,\n ApiBeforeWatch.def,\n CoreAfterBuild.def,\n CoreBeforeBuild.def,\n CoreBeforeWatch.def,\n\n ProductionEnvironments.def,\n DatabaseSetup.def,\n BuildParam.def,\n AdminBuildParam.def,\n AdminApiUrl.def,\n AdminWebsocketsUrl.def,\n AdminExtension.def,\n ApiExtension.def,\n ApiRoute.def,\n\n // Api settings that apply to every hosting type.\n BackgroundTasks.def,\n ModelFieldCompression.def\n];\n\nexport { Project } from \"./Project.js\";\n\nexport * from \"../defineExtension/index.js\";\n"],"names":["definitions","Telemetry","ProjectId","ProjectDecorator","ProjectImplementation","ExtensionDefinitions","EnvVar","FeatureFlags","BugReporter","AdminAfterBuild","BeforeBuild","BeforeWatch","AfterBuild","AdminBeforeBuild","AdminBeforeWatch","ApiAfterBuild","ApiBeforeBuild","ApiBeforeWatch","CoreAfterBuild","CoreBeforeBuild","CoreBeforeWatch","ProductionEnvironments","DatabaseSetup","BuildParam","AdminBuildParam","AdminApiUrl","AdminWebsocketsUrl","AdminExtension","ApiExtension","ApiRoute","BackgroundTasks","ModelFieldCompression"],"mappings":";;;;;;;;;;;;;;;;;;;AAuEO,MAAMA,cAAc;IACvBC,UAAU,GAAG;IACbC,UAAU,GAAG;IACbC,iBAAiB,GAAG;IACpBC,sBAAsB,GAAG;IACzBC,qBAAqB,GAAG;IACxBC,OAAO,GAAG;IACVC,aAAa,GAAG;IAChBC,YAAY,GAAG;IAGfC,gBAAgB,GAAG;IACnBC,YAAY,GAAG;IACfC,YAAY,GAAG;IACfC,WAAW,GAAG;IACdC,iBAAiB,GAAG;IACpBC,iBAAiB,GAAG;IACpBC,cAAc,GAAG;IACjBC,eAAe,GAAG;IAClBC,eAAe,GAAG;IAClBC,eAAe,GAAG;IAClBC,gBAAgB,GAAG;IACnBC,gBAAgB,GAAG;IAEnBC,uBAAuB,GAAG;IAC1BC,cAAc,GAAG;IACjBC,WAAW,GAAG;IACdC,gBAAgB,GAAG;IACnBC,YAAY,GAAG;IACfC,mBAAmB,GAAG;IACtBC,eAAe,GAAG;IAClBC,aAAa,GAAG;IAChBC,SAAS,GAAG;IAGZC,gBAAgB,GAAG;IACnBC,sBAAsB,GAAG;CAC5B"}
@@ -23,16 +23,16 @@ process.on("unhandledRejection", (reason)=>{
23
23
  sendError(err);
24
24
  });
25
25
  const workerData = JSON.parse(process.argv[2]);
26
- const { package: pkg, env: env, variant: variant, region: region, debug: debug } = workerData;
26
+ const { package: pkg, env, variant, region, debug } = workerData;
27
27
  const options = {
28
28
  cwd: pkg.paths.packageFolder,
29
- env: env,
30
- variant: variant,
31
- region: region,
32
- debug: debug
29
+ env,
30
+ variant,
31
+ region,
32
+ debug
33
33
  };
34
34
  const config = await requireConfigWithExecute(pkg.paths.webinyConfigFile, {
35
- options: options
35
+ options
36
36
  });
37
37
  const hasBuild = config.commands && "function" == typeof config.commands.build;
38
38
  if (!hasBuild) throw new Error("Build command not found.");
@@ -1 +1 @@
1
- {"version":3,"file":"features/BuildApp/PackagesBuilder/worker.js","sources":["../../../../src/features/BuildApp/PackagesBuilder/worker.ts"],"sourcesContent":["import \"tsx/esm\";\nimport { requireConfigWithExecute } from \"~/utils/index.js\";\nimport { serializeError } from \"serialize-error\";\n\nconst sendError = (err: Error) => {\n const response = {\n type: \"error\",\n error: serializeError(err)\n };\n\n process.send!(response);\n};\n\nconst sendSuccess = () => {\n const response = {\n type: \"success\",\n error: null\n };\n\n process.send!(response);\n};\n\nprocess.on(\"uncaughtException\", err => {\n sendError(err);\n});\n\nprocess.on(\"unhandledRejection\", reason => {\n const err = reason instanceof Error ? reason : new Error(String(reason));\n sendError(err);\n});\n\nconst workerData = JSON.parse(process.argv[2]);\n\nconst { package: pkg, env, variant, region, debug } = workerData;\nconst options = {\n cwd: pkg.paths.packageFolder,\n env,\n variant,\n region,\n debug\n};\n\nconst config = await requireConfigWithExecute(pkg.paths.webinyConfigFile, {\n options\n});\n\nconst hasBuild = config.commands && typeof config.commands.build === \"function\";\nif (!hasBuild) {\n throw new Error(\"Build command not found.\");\n}\n\nawait config.commands.build(options);\n\nsendSuccess();\n"],"names":["sendError","err","response","serializeError","process","sendSuccess","reason","Error","String","workerData","JSON","pkg","env","variant","region","debug","options","config","requireConfigWithExecute","hasBuild"],"mappings":";;;AAIA,MAAMA,YAAY,CAACC;IACf,MAAMC,WAAW;QACb,MAAM;QACN,OAAOC,eAAeF;IAC1B;IAEAG,QAAQ,IAAI,CAAEF;AAClB;AAEA,MAAMG,cAAc;IAChB,MAAMH,WAAW;QACb,MAAM;QACN,OAAO;IACX;IAEAE,QAAQ,IAAI,CAAEF;AAClB;AAEAE,QAAQ,EAAE,CAAC,qBAAqBH,CAAAA;IAC5BD,UAAUC;AACd;AAEAG,QAAQ,EAAE,CAAC,sBAAsBE,CAAAA;IAC7B,MAAML,MAAMK,kBAAkBC,QAAQD,SAAS,IAAIC,MAAMC,OAAOF;IAChEN,UAAUC;AACd;AAEA,MAAMQ,aAAaC,KAAK,KAAK,CAACN,QAAQ,IAAI,CAAC,EAAE;AAE7C,MAAM,EAAE,SAASO,GAAG,EAAEC,KAAAA,GAAG,EAAEC,SAAAA,OAAO,EAAEC,QAAAA,MAAM,EAAEC,OAAAA,KAAK,EAAE,GAAGN;AACtD,MAAMO,UAAU;IACZ,KAAKL,IAAI,KAAK,CAAC,aAAa;IAC5BC,KAAAA;IACAC,SAAAA;IACAC,QAAAA;IACAC,OAAAA;AACJ;AAEA,MAAME,SAAS,MAAMC,yBAAyBP,IAAI,KAAK,CAAC,gBAAgB,EAAE;IACtEK,SAAAA;AACJ;AAEA,MAAMG,WAAWF,OAAO,QAAQ,IAAI,AAAiC,cAAjC,OAAOA,OAAO,QAAQ,CAAC,KAAK;AAChE,IAAI,CAACE,UACD,MAAM,IAAIZ,MAAM;AAGpB,MAAMU,OAAO,QAAQ,CAAC,KAAK,CAACD;AAE5BX"}
1
+ {"version":3,"file":"features/BuildApp/PackagesBuilder/worker.js","sources":["../../../../src/features/BuildApp/PackagesBuilder/worker.ts"],"sourcesContent":["import \"tsx/esm\";\nimport { requireConfigWithExecute } from \"~/utils/index.js\";\nimport { serializeError } from \"serialize-error\";\n\nconst sendError = (err: Error) => {\n const response = {\n type: \"error\",\n error: serializeError(err)\n };\n\n process.send!(response);\n};\n\nconst sendSuccess = () => {\n const response = {\n type: \"success\",\n error: null\n };\n\n process.send!(response);\n};\n\nprocess.on(\"uncaughtException\", err => {\n sendError(err);\n});\n\nprocess.on(\"unhandledRejection\", reason => {\n const err = reason instanceof Error ? reason : new Error(String(reason));\n sendError(err);\n});\n\nconst workerData = JSON.parse(process.argv[2]);\n\nconst { package: pkg, env, variant, region, debug } = workerData;\nconst options = {\n cwd: pkg.paths.packageFolder,\n env,\n variant,\n region,\n debug\n};\n\nconst config = await requireConfigWithExecute(pkg.paths.webinyConfigFile, {\n options\n});\n\nconst hasBuild = config.commands && typeof config.commands.build === \"function\";\nif (!hasBuild) {\n throw new Error(\"Build command not found.\");\n}\n\nawait config.commands.build(options);\n\nsendSuccess();\n"],"names":["sendError","err","response","serializeError","process","sendSuccess","reason","Error","String","workerData","JSON","pkg","env","variant","region","debug","options","config","requireConfigWithExecute","hasBuild"],"mappings":";;;AAIA,MAAMA,YAAY,CAACC;IACf,MAAMC,WAAW;QACb,MAAM;QACN,OAAOC,eAAeF;IAC1B;IAEAG,QAAQ,IAAI,CAAEF;AAClB;AAEA,MAAMG,cAAc;IAChB,MAAMH,WAAW;QACb,MAAM;QACN,OAAO;IACX;IAEAE,QAAQ,IAAI,CAAEF;AAClB;AAEAE,QAAQ,EAAE,CAAC,qBAAqBH,CAAAA;IAC5BD,UAAUC;AACd;AAEAG,QAAQ,EAAE,CAAC,sBAAsBE,CAAAA;IAC7B,MAAML,MAAMK,kBAAkBC,QAAQD,SAAS,IAAIC,MAAMC,OAAOF;IAChEN,UAAUC;AACd;AAEA,MAAMQ,aAAaC,KAAK,KAAK,CAACN,QAAQ,IAAI,CAAC,EAAE;AAE7C,MAAM,EAAE,SAASO,GAAG,EAAEC,GAAG,EAAEC,OAAO,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAGN;AACtD,MAAMO,UAAU;IACZ,KAAKL,IAAI,KAAK,CAAC,aAAa;IAC5BC;IACAC;IACAC;IACAC;AACJ;AAEA,MAAME,SAAS,MAAMC,yBAAyBP,IAAI,KAAK,CAAC,gBAAgB,EAAE;IACtEK;AACJ;AAEA,MAAMG,WAAWF,OAAO,QAAQ,IAAI,AAAiC,cAAjC,OAAOA,OAAO,QAAQ,CAAC,KAAK;AAChE,IAAI,CAACE,UACD,MAAM,IAAIZ,MAAM;AAGpB,MAAMU,OAAO,QAAQ,CAAC,KAAK,CAACD;AAE5BX"}
@@ -5,20 +5,20 @@ process.on("disconnect", ()=>{
5
5
  process.exit(0);
6
6
  });
7
7
  const workerData = JSON.parse(process.argv[2]);
8
- const { package: pkg, env: env, variant: variant, region: region, debug: debug } = workerData;
8
+ const { package: pkg, env, variant, region, debug } = workerData;
9
9
  const options = {
10
10
  cwd: pkg.paths.packageFolder,
11
- env: env,
12
- variant: variant,
13
- region: region,
14
- debug: debug
11
+ env,
12
+ variant,
13
+ region,
14
+ debug
15
15
  };
16
16
  if (!fs.existsSync(pkg.paths.webinyConfigFile)) {
17
17
  console.warn(`Cannot watch "${pkg.name}" package. No "webiny.config.ts" file found.`);
18
18
  process.exit(0);
19
19
  }
20
20
  const config = await requireConfigWithExecute(pkg.paths.webinyConfigFile, {
21
- options: options
21
+ options
22
22
  });
23
23
  const hasWatch = config.commands && "function" == typeof config.commands.watch;
24
24
  if (hasWatch) await config.commands.watch(options, {});
@@ -1 +1 @@
1
- {"version":3,"file":"features/Watch/watchers/worker.js","sources":["../../../../src/features/Watch/watchers/worker.ts"],"sourcesContent":["import \"tsx\";\nimport { requireConfigWithExecute } from \"~/utils/index.js\";\nimport fs from \"fs\";\n\n// The CLI forks this worker with an IPC channel, and the channel closes when the CLI stops, however\n// it stops. Without this, a worker outlives a CLI that was killed and keeps rebuilding into the\n// workspace. The next `webiny watch` then regenerates that workspace while this worker is still\n// bundling it, and its server loads a half-written build.\nprocess.on(\"disconnect\", () => {\n process.exit(0);\n});\n\nconst workerData = JSON.parse(process.argv[2]);\nconst { package: pkg, env, variant, region, debug } = workerData;\n\nconst options = { cwd: pkg.paths.packageFolder, env, variant, region, debug };\n\nif (!fs.existsSync(pkg.paths.webinyConfigFile)) {\n console.warn(`Cannot watch \"${pkg.name}\" package. No \"webiny.config.ts\" file found.`);\n process.exit(0);\n}\n\nconst config = await requireConfigWithExecute(pkg.paths.webinyConfigFile, {\n options\n});\n\nconst hasWatch = config.commands && typeof config.commands.watch === \"function\";\nif (hasWatch) {\n await config.commands.watch(options, {});\n} else {\n throw new Error(\"Watch command not found.\");\n}\n"],"names":["process","workerData","JSON","pkg","env","variant","region","debug","options","fs","console","config","requireConfigWithExecute","hasWatch","Error"],"mappings":";;;AAQAA,QAAQ,EAAE,CAAC,cAAc;IACrBA,QAAQ,IAAI,CAAC;AACjB;AAEA,MAAMC,aAAaC,KAAK,KAAK,CAACF,QAAQ,IAAI,CAAC,EAAE;AAC7C,MAAM,EAAE,SAASG,GAAG,EAAEC,KAAAA,GAAG,EAAEC,SAAAA,OAAO,EAAEC,QAAAA,MAAM,EAAEC,OAAAA,KAAK,EAAE,GAAGN;AAEtD,MAAMO,UAAU;IAAE,KAAKL,IAAI,KAAK,CAAC,aAAa;IAAEC,KAAAA;IAAKC,SAAAA;IAASC,QAAAA;IAAQC,OAAAA;AAAM;AAE5E,IAAI,CAACE,GAAG,UAAU,CAACN,IAAI,KAAK,CAAC,gBAAgB,GAAG;IAC5CO,QAAQ,IAAI,CAAC,CAAC,cAAc,EAAEP,IAAI,IAAI,CAAC,4CAA4C,CAAC;IACpFH,QAAQ,IAAI,CAAC;AACjB;AAEA,MAAMW,SAAS,MAAMC,yBAAyBT,IAAI,KAAK,CAAC,gBAAgB,EAAE;IACtEK,SAAAA;AACJ;AAEA,MAAMK,WAAWF,OAAO,QAAQ,IAAI,AAAiC,cAAjC,OAAOA,OAAO,QAAQ,CAAC,KAAK;AAChE,IAAIE,UACA,MAAMF,OAAO,QAAQ,CAAC,KAAK,CAACH,SAAS,CAAC;KAEtC,MAAM,IAAIM,MAAM"}
1
+ {"version":3,"file":"features/Watch/watchers/worker.js","sources":["../../../../src/features/Watch/watchers/worker.ts"],"sourcesContent":["import \"tsx\";\nimport { requireConfigWithExecute } from \"~/utils/index.js\";\nimport fs from \"fs\";\n\n// The CLI forks this worker with an IPC channel, and the channel closes when the CLI stops, however\n// it stops. Without this, a worker outlives a CLI that was killed and keeps rebuilding into the\n// workspace. The next `webiny watch` then regenerates that workspace while this worker is still\n// bundling it, and its server loads a half-written build.\nprocess.on(\"disconnect\", () => {\n process.exit(0);\n});\n\nconst workerData = JSON.parse(process.argv[2]);\nconst { package: pkg, env, variant, region, debug } = workerData;\n\nconst options = { cwd: pkg.paths.packageFolder, env, variant, region, debug };\n\nif (!fs.existsSync(pkg.paths.webinyConfigFile)) {\n console.warn(`Cannot watch \"${pkg.name}\" package. No \"webiny.config.ts\" file found.`);\n process.exit(0);\n}\n\nconst config = await requireConfigWithExecute(pkg.paths.webinyConfigFile, {\n options\n});\n\nconst hasWatch = config.commands && typeof config.commands.watch === \"function\";\nif (hasWatch) {\n await config.commands.watch(options, {});\n} else {\n throw new Error(\"Watch command not found.\");\n}\n"],"names":["process","workerData","JSON","pkg","env","variant","region","debug","options","fs","console","config","requireConfigWithExecute","hasWatch","Error"],"mappings":";;;AAQAA,QAAQ,EAAE,CAAC,cAAc;IACrBA,QAAQ,IAAI,CAAC;AACjB;AAEA,MAAMC,aAAaC,KAAK,KAAK,CAACF,QAAQ,IAAI,CAAC,EAAE;AAC7C,MAAM,EAAE,SAASG,GAAG,EAAEC,GAAG,EAAEC,OAAO,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAGN;AAEtD,MAAMO,UAAU;IAAE,KAAKL,IAAI,KAAK,CAAC,aAAa;IAAEC;IAAKC;IAASC;IAAQC;AAAM;AAE5E,IAAI,CAACE,GAAG,UAAU,CAACN,IAAI,KAAK,CAAC,gBAAgB,GAAG;IAC5CO,QAAQ,IAAI,CAAC,CAAC,cAAc,EAAEP,IAAI,IAAI,CAAC,4CAA4C,CAAC;IACpFH,QAAQ,IAAI,CAAC;AACjB;AAEA,MAAMW,SAAS,MAAMC,yBAAyBT,IAAI,KAAK,CAAC,gBAAgB,EAAE;IACtEK;AACJ;AAEA,MAAMK,WAAWF,OAAO,QAAQ,IAAI,AAAiC,cAAjC,OAAOA,OAAO,QAAQ,CAAC,KAAK;AAChE,IAAIE,UACA,MAAMF,OAAO,QAAQ,CAAC,KAAK,CAACH,SAAS,CAAC;KAEtC,MAAM,IAAIM,MAAM"}