@webiny/project 6.4.12-beta.6 → 6.4.12-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Wcp.js +6 -6
- package/components/Wcp.js.map +1 -1
- package/defineExtension/createExtensionReactComponent.js.map +1 -1
- package/features/BuildApp/PackagesBuilder/worker.js +6 -6
- package/features/BuildApp/PackagesBuilder/worker.js.map +1 -1
- package/features/Watch/watchers/worker.js +6 -6
- package/features/Watch/watchers/worker.js.map +1 -1
- package/package.json +25 -25
- package/services/GetProjectConfigService/EnvContext.js.map +1 -1
- package/services/GetProjectConfigService/ProductionEnvironmentsContext.js.map +1 -1
- package/services/GetProjectConfigService/WcpProjectLicenseContext.js.map +1 -1
- package/services/GetProjectConfigService/renderConfigWorker.js +1 -1
- package/services/GetProjectConfigService/renderConfigWorker.js.map +1 -1
- package/services/PulumiGetStackOutputService/mapStackOutput.js +1 -1
- package/services/PulumiGetStackOutputService/mapStackOutput.js.map +1 -1
package/components/Wcp.js
CHANGED
|
@@ -25,12 +25,12 @@ function CanUseHcmsFieldPermissions({ children }) {
|
|
|
25
25
|
return wcp.canUseHcmsFieldPermissions() ? /*#__PURE__*/ react.createElement(react.Fragment, null, children) : null;
|
|
26
26
|
}
|
|
27
27
|
const Wcp = {
|
|
28
|
-
CanUseMultiTenancy
|
|
29
|
-
CanUseTeams
|
|
30
|
-
CanUsePrivateFiles
|
|
31
|
-
CanUseFileManagerThreatDetection
|
|
32
|
-
CanUseWorkflows
|
|
33
|
-
CanUseHcmsFieldPermissions
|
|
28
|
+
CanUseMultiTenancy,
|
|
29
|
+
CanUseTeams,
|
|
30
|
+
CanUsePrivateFiles,
|
|
31
|
+
CanUseFileManagerThreatDetection,
|
|
32
|
+
CanUseWorkflows,
|
|
33
|
+
CanUseHcmsFieldPermissions
|
|
34
34
|
};
|
|
35
35
|
export { Wcp };
|
|
36
36
|
|
package/components/Wcp.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components/Wcp.js","sources":["../../src/components/Wcp.tsx"],"sourcesContent":["import React from \"react\";\nimport { useWcpProjectLicense } from \"~/services/GetProjectConfigService/WcpProjectLicenseContext.js\";\n\ninterface ChildrenProps {\n children: React.ReactNode;\n}\n\nfunction CanUseMultiTenancy({ children }: ChildrenProps) {\n const wcp = useWcpProjectLicense();\n\n return wcp.canUseMultiTenancy() ? <>{children}</> : null;\n}\n\nfunction CanUseTeams({ children }: ChildrenProps) {\n const wcp = useWcpProjectLicense();\n\n return wcp.canUseTeams() ? <>{children}</> : null;\n}\n\nfunction CanUsePrivateFiles({ children }: ChildrenProps) {\n const wcp = useWcpProjectLicense();\n\n return wcp.canUsePrivateFiles() ? <>{children}</> : null;\n}\n\nfunction CanUseFileManagerThreatDetection({ children }: ChildrenProps) {\n const wcp = useWcpProjectLicense();\n\n return wcp.canUseFileManagerThreatDetection() ? <>{children}</> : null;\n}\n\nfunction CanUseWorkflows({ children }: ChildrenProps) {\n const wcp = useWcpProjectLicense();\n\n return wcp.canUseWorkflows() ? <>{children}</> : null;\n}\n\nfunction CanUseHcmsFieldPermissions({ children }: ChildrenProps) {\n const wcp = useWcpProjectLicense();\n\n return wcp.canUseHcmsFieldPermissions() ? <>{children}</> : null;\n}\n\nexport const Wcp = {\n CanUseMultiTenancy,\n CanUseTeams,\n CanUsePrivateFiles,\n CanUseFileManagerThreatDetection,\n CanUseWorkflows,\n CanUseHcmsFieldPermissions\n};\n"],"names":["CanUseMultiTenancy","children","wcp","useWcpProjectLicense","CanUseTeams","CanUsePrivateFiles","CanUseFileManagerThreatDetection","CanUseWorkflows","CanUseHcmsFieldPermissions","Wcp"],"mappings":";;AAOA,SAASA,mBAAmB,EAAEC,QAAQ,EAAiB;IACnD,MAAMC,MAAMC;IAEZ,OAAOD,IAAI,kBAAkB,KAAK,WAAL,GAAK,0CAAGD,YAAe;AACxD;AAEA,SAASG,YAAY,EAAEH,QAAQ,EAAiB;IAC5C,MAAMC,MAAMC;IAEZ,OAAOD,IAAI,WAAW,KAAK,WAAL,GAAK,0CAAGD,YAAe;AACjD;AAEA,SAASI,mBAAmB,EAAEJ,QAAQ,EAAiB;IACnD,MAAMC,MAAMC;IAEZ,OAAOD,IAAI,kBAAkB,KAAK,WAAL,GAAK,0CAAGD,YAAe;AACxD;AAEA,SAASK,iCAAiC,EAAEL,QAAQ,EAAiB;IACjE,MAAMC,MAAMC;IAEZ,OAAOD,IAAI,gCAAgC,KAAK,WAAL,GAAK,0CAAGD,YAAe;AACtE;AAEA,SAASM,gBAAgB,EAAEN,QAAQ,EAAiB;IAChD,MAAMC,MAAMC;IAEZ,OAAOD,IAAI,eAAe,KAAK,WAAL,GAAK,0CAAGD,YAAe;AACrD;AAEA,SAASO,2BAA2B,EAAEP,QAAQ,EAAiB;IAC3D,MAAMC,MAAMC;IAEZ,OAAOD,IAAI,0BAA0B,KAAK,WAAL,GAAK,0CAAGD,YAAe;AAChE;AAEO,MAAMQ,MAAM;IACfT
|
|
1
|
+
{"version":3,"file":"components/Wcp.js","sources":["../../src/components/Wcp.tsx"],"sourcesContent":["import React from \"react\";\nimport { useWcpProjectLicense } from \"~/services/GetProjectConfigService/WcpProjectLicenseContext.js\";\n\ninterface ChildrenProps {\n children: React.ReactNode;\n}\n\nfunction CanUseMultiTenancy({ children }: ChildrenProps) {\n const wcp = useWcpProjectLicense();\n\n return wcp.canUseMultiTenancy() ? <>{children}</> : null;\n}\n\nfunction CanUseTeams({ children }: ChildrenProps) {\n const wcp = useWcpProjectLicense();\n\n return wcp.canUseTeams() ? <>{children}</> : null;\n}\n\nfunction CanUsePrivateFiles({ children }: ChildrenProps) {\n const wcp = useWcpProjectLicense();\n\n return wcp.canUsePrivateFiles() ? <>{children}</> : null;\n}\n\nfunction CanUseFileManagerThreatDetection({ children }: ChildrenProps) {\n const wcp = useWcpProjectLicense();\n\n return wcp.canUseFileManagerThreatDetection() ? <>{children}</> : null;\n}\n\nfunction CanUseWorkflows({ children }: ChildrenProps) {\n const wcp = useWcpProjectLicense();\n\n return wcp.canUseWorkflows() ? <>{children}</> : null;\n}\n\nfunction CanUseHcmsFieldPermissions({ children }: ChildrenProps) {\n const wcp = useWcpProjectLicense();\n\n return wcp.canUseHcmsFieldPermissions() ? <>{children}</> : null;\n}\n\nexport const Wcp = {\n CanUseMultiTenancy,\n CanUseTeams,\n CanUsePrivateFiles,\n CanUseFileManagerThreatDetection,\n CanUseWorkflows,\n CanUseHcmsFieldPermissions\n};\n"],"names":["CanUseMultiTenancy","children","wcp","useWcpProjectLicense","CanUseTeams","CanUsePrivateFiles","CanUseFileManagerThreatDetection","CanUseWorkflows","CanUseHcmsFieldPermissions","Wcp"],"mappings":";;AAOA,SAASA,mBAAmB,EAAEC,QAAQ,EAAiB;IACnD,MAAMC,MAAMC;IAEZ,OAAOD,IAAI,kBAAkB,KAAK,WAAL,GAAK,0CAAGD,YAAe;AACxD;AAEA,SAASG,YAAY,EAAEH,QAAQ,EAAiB;IAC5C,MAAMC,MAAMC;IAEZ,OAAOD,IAAI,WAAW,KAAK,WAAL,GAAK,0CAAGD,YAAe;AACjD;AAEA,SAASI,mBAAmB,EAAEJ,QAAQ,EAAiB;IACnD,MAAMC,MAAMC;IAEZ,OAAOD,IAAI,kBAAkB,KAAK,WAAL,GAAK,0CAAGD,YAAe;AACxD;AAEA,SAASK,iCAAiC,EAAEL,QAAQ,EAAiB;IACjE,MAAMC,MAAMC;IAEZ,OAAOD,IAAI,gCAAgC,KAAK,WAAL,GAAK,0CAAGD,YAAe;AACtE;AAEA,SAASM,gBAAgB,EAAEN,QAAQ,EAAiB;IAChD,MAAMC,MAAMC;IAEZ,OAAOD,IAAI,eAAe,KAAK,WAAL,GAAK,0CAAGD,YAAe;AACrD;AAEA,SAASO,2BAA2B,EAAEP,QAAQ,EAAiB;IAC3D,MAAMC,MAAMC;IAEZ,OAAOD,IAAI,0BAA0B,KAAK,WAAL,GAAK,0CAAGD,YAAe;AAChE;AAEO,MAAMQ,MAAM;IACfT;IACAI;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\";\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 ExtensionReactComponent: React.FC<\n ExtensionReactComponentProps<TParamsSchema>\n > = 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 ExtensionReactComponent.displayName = `ExtensionReactComponent(${extensionParams.type})`;\n return ExtensionReactComponent;\n}\n"],"names":["KeyValues","props","getId","useIdGenerator","Object","key","value","Property","createExtensionReactComponent","extensionParams","ExtensionReactComponent","name","remove","before","after","keyValues","propertyId","useMemo","undefined","propertyName","placeAfter","placeBefore","KeyValuesComponent","parentProps"],"mappings":";;AAKA,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,0BAEFT,CAAAA;QACA,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,
|
|
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\";\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 ExtensionReactComponent: React.FC<\n ExtensionReactComponentProps<TParamsSchema>\n > = 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 ExtensionReactComponent.displayName = `ExtensionReactComponent(${extensionParams.type})`;\n return ExtensionReactComponent;\n}\n"],"names":["KeyValues","props","getId","useIdGenerator","Object","key","value","Property","createExtensionReactComponent","extensionParams","ExtensionReactComponent","name","remove","before","after","keyValues","propertyId","useMemo","undefined","propertyName","placeAfter","placeBefore","KeyValuesComponent","parentProps"],"mappings":";;AAKA,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,0BAEFT,CAAAA;QACA,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;IAEAS,wBAAwB,WAAW,GAAG,CAAC,wBAAwB,EAAED,gBAAgB,IAAI,CAAC,CAAC,CAAC;IACxF,OAAOC;AACX"}
|
|
@@ -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
|
|
26
|
+
const { package: pkg, env, variant, region, debug } = workerData;
|
|
27
27
|
const options = {
|
|
28
28
|
cwd: pkg.paths.packageFolder,
|
|
29
|
-
env
|
|
30
|
-
variant
|
|
31
|
-
region
|
|
32
|
-
debug
|
|
29
|
+
env,
|
|
30
|
+
variant,
|
|
31
|
+
region,
|
|
32
|
+
debug
|
|
33
33
|
};
|
|
34
34
|
const config = await requireConfigWithExecute(pkg.paths.webinyConfigFile, {
|
|
35
|
-
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,
|
|
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"}
|
|
@@ -2,20 +2,20 @@ import "tsx";
|
|
|
2
2
|
import { requireConfigWithExecute } from "../../../utils/index.js";
|
|
3
3
|
import fs from "fs";
|
|
4
4
|
const workerData = JSON.parse(process.argv[2]);
|
|
5
|
-
const { package: pkg, env
|
|
5
|
+
const { package: pkg, env, variant, region, debug } = workerData;
|
|
6
6
|
const options = {
|
|
7
7
|
cwd: pkg.paths.packageFolder,
|
|
8
|
-
env
|
|
9
|
-
variant
|
|
10
|
-
region
|
|
11
|
-
debug
|
|
8
|
+
env,
|
|
9
|
+
variant,
|
|
10
|
+
region,
|
|
11
|
+
debug
|
|
12
12
|
};
|
|
13
13
|
if (!fs.existsSync(pkg.paths.webinyConfigFile)) {
|
|
14
14
|
console.warn(`Cannot watch "${pkg.name}" package. No "webiny.config.ts" file found.`);
|
|
15
15
|
process.exit(0);
|
|
16
16
|
}
|
|
17
17
|
const config = await requireConfigWithExecute(pkg.paths.webinyConfigFile, {
|
|
18
|
-
options
|
|
18
|
+
options
|
|
19
19
|
});
|
|
20
20
|
const hasWatch = config.commands && "function" == typeof config.commands.watch;
|
|
21
21
|
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\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":["workerData","JSON","process","pkg","env","variant","region","debug","options","fs","console","config","requireConfigWithExecute","hasWatch","Error"],"mappings":";;;AAIA,MAAMA,aAAaC,KAAK,KAAK,CAACC,QAAQ,IAAI,CAAC,EAAE;AAC7C,MAAM,EAAE,SAASC,GAAG,EAAEC,
|
|
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\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":["workerData","JSON","process","pkg","env","variant","region","debug","options","fs","console","config","requireConfigWithExecute","hasWatch","Error"],"mappings":";;;AAIA,MAAMA,aAAaC,KAAK,KAAK,CAACC,QAAQ,IAAI,CAAC,EAAE;AAC7C,MAAM,EAAE,SAASC,GAAG,EAAEC,GAAG,EAAEC,OAAO,EAAEC,MAAM,EAAEC,KAAK,EAAE,GAAGP;AAEtD,MAAMQ,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;IACpFD,QAAQ,IAAI,CAAC;AACjB;AAEA,MAAMS,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/project",
|
|
3
|
-
"version": "6.4.12-beta.
|
|
3
|
+
"version": "6.4.12-beta.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -13,54 +13,54 @@
|
|
|
13
13
|
"description": "An SDK for managing Webiny projects.",
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@webiny/aws-sdk": "6.4.12-beta.
|
|
17
|
-
"@webiny/build-tools": "6.4.12-beta.
|
|
16
|
+
"@webiny/aws-sdk": "6.4.12-beta.7",
|
|
17
|
+
"@webiny/build-tools": "6.4.12-beta.7",
|
|
18
18
|
"@webiny/di": "1.1.0",
|
|
19
|
-
"@webiny/feature-flags": "6.4.12-beta.
|
|
20
|
-
"@webiny/global-config": "6.4.12-beta.
|
|
21
|
-
"@webiny/pulumi-sdk": "6.4.12-beta.
|
|
22
|
-
"@webiny/react-properties": "6.4.12-beta.
|
|
23
|
-
"@webiny/system-requirements": "6.4.12-beta.
|
|
24
|
-
"@webiny/telemetry": "6.4.12-beta.
|
|
25
|
-
"@webiny/utils": "6.4.12-beta.
|
|
26
|
-
"@webiny/wcp": "6.4.12-beta.
|
|
27
|
-
"chalk": "6.0.
|
|
28
|
-
"chokidar": "
|
|
19
|
+
"@webiny/feature-flags": "6.4.12-beta.7",
|
|
20
|
+
"@webiny/global-config": "6.4.12-beta.7",
|
|
21
|
+
"@webiny/pulumi-sdk": "6.4.12-beta.7",
|
|
22
|
+
"@webiny/react-properties": "6.4.12-beta.7",
|
|
23
|
+
"@webiny/system-requirements": "6.4.12-beta.7",
|
|
24
|
+
"@webiny/telemetry": "6.4.12-beta.7",
|
|
25
|
+
"@webiny/utils": "6.4.12-beta.7",
|
|
26
|
+
"@webiny/wcp": "6.4.12-beta.7",
|
|
27
|
+
"chalk": "6.0.1",
|
|
28
|
+
"chokidar": "6.0.0",
|
|
29
29
|
"ci-info": "4.4.0",
|
|
30
30
|
"debounce": "3.0.0",
|
|
31
31
|
"deepmerge": "4.3.1",
|
|
32
|
-
"dotenv": "18.0.
|
|
32
|
+
"dotenv": "18.0.9",
|
|
33
33
|
"execa": "5.1.1",
|
|
34
34
|
"exit-hook": "5.1.0",
|
|
35
35
|
"fast-glob": "3.3.3",
|
|
36
36
|
"find-up": "8.0.0",
|
|
37
37
|
"get-tsconfig": "4.14.3",
|
|
38
38
|
"graphql-request": "7.4.0",
|
|
39
|
-
"humanize-duration": "3.35.
|
|
40
|
-
"jsdom": "
|
|
39
|
+
"humanize-duration": "3.35.1",
|
|
40
|
+
"jsdom": "31.0.0",
|
|
41
41
|
"load-json-file": "7.0.1",
|
|
42
42
|
"lodash": "4.18.1",
|
|
43
|
-
"minimatch": "
|
|
44
|
-
"mqtt": "5.16.
|
|
43
|
+
"minimatch": "11.0.5",
|
|
44
|
+
"mqtt": "5.16.1",
|
|
45
45
|
"neverthrow": "8.2.0",
|
|
46
|
-
"p-retry": "
|
|
47
|
-
"pino": "10.
|
|
48
|
-
"pino-pretty": "13.
|
|
46
|
+
"p-retry": "9.0.0",
|
|
47
|
+
"pino": "10.4.0",
|
|
48
|
+
"pino-pretty": "13.2.0",
|
|
49
49
|
"react": "18.3.1",
|
|
50
50
|
"react-dom": "18.3.1",
|
|
51
51
|
"replace-in-path": "1.1.0",
|
|
52
|
-
"serialize-error": "13.0
|
|
52
|
+
"serialize-error": "13.1.0",
|
|
53
53
|
"ts-morph": "28.0.0",
|
|
54
54
|
"tsx": "4.23.15",
|
|
55
55
|
"write-json-file": "7.0.0",
|
|
56
|
-
"zod": "4.6.
|
|
56
|
+
"zod": "4.6.7"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@types/debounce": "1.2.4",
|
|
60
60
|
"@types/humanize-duration": "3.27.4",
|
|
61
61
|
"@types/jsdom": "30.0.0",
|
|
62
|
-
"@types/lodash": "4.17.
|
|
63
|
-
"rimraf": "6.1.
|
|
62
|
+
"@types/lodash": "4.17.27",
|
|
63
|
+
"rimraf": "6.1.4",
|
|
64
64
|
"type-fest": "5.10.0",
|
|
65
65
|
"typescript": "6.0.3"
|
|
66
66
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services/GetProjectConfigService/EnvContext.js","sources":["../../../src/services/GetProjectConfigService/EnvContext.tsx"],"sourcesContent":["import React, { createContext, useContext } from \"react\";\nimport { getProjectSdkContextFromEnv } from \"~/utils/index.js\";\n\nexport interface EnvContextValue {\n env: string;\n variant?: string;\n region?: string;\n}\n\nconst EnvContext = createContext<EnvContextValue | null>(null);\n\nexport const EnvProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {\n const context = getProjectSdkContextFromEnv();\n\n const value: EnvContextValue = {\n env: context?.env || \"dev\",\n variant: context?.variant,\n region: context?.region\n };\n\n return <EnvContext.Provider value={value}>{children}</EnvContext.Provider>;\n};\n\nexport const useEnv = () => {\n const context = useContext(EnvContext);\n if (!context) {\n throw new Error(\"useEnv must be used within an EnvProvider\");\n }\n return context.env;\n};\n\nexport const useVariant = () => {\n const context = useContext(EnvContext);\n if (!context) {\n throw new Error(\"useVariant must be used within an EnvProvider\");\n }\n return context.variant;\n};\n\nexport const useRegion = () => {\n const context = useContext(EnvContext);\n if (!context) {\n throw new Error(\"useRegion must be used within an EnvProvider\");\n }\n return context.region;\n};\n\nexport const useEnvContext = () => {\n const context = useContext(EnvContext);\n if (!context) {\n throw new Error(\"useEnvContext must be used within an EnvProvider\");\n }\n return context;\n};\n"],"names":["EnvContext","createContext","EnvProvider","children","context","getProjectSdkContextFromEnv","value","useEnv","useContext","Error","useVariant","useRegion","useEnvContext"],"mappings":";;AASA,MAAMA,aAAa,
|
|
1
|
+
{"version":3,"file":"services/GetProjectConfigService/EnvContext.js","sources":["../../../src/services/GetProjectConfigService/EnvContext.tsx"],"sourcesContent":["import React, { createContext, useContext } from \"react\";\nimport { getProjectSdkContextFromEnv } from \"~/utils/index.js\";\n\nexport interface EnvContextValue {\n env: string;\n variant?: string;\n region?: string;\n}\n\nconst EnvContext = createContext<EnvContextValue | null>(null);\n\nexport const EnvProvider: React.FC<{ children: React.ReactNode }> = ({ children }) => {\n const context = getProjectSdkContextFromEnv();\n\n const value: EnvContextValue = {\n env: context?.env || \"dev\",\n variant: context?.variant,\n region: context?.region\n };\n\n return <EnvContext.Provider value={value}>{children}</EnvContext.Provider>;\n};\n\nexport const useEnv = () => {\n const context = useContext(EnvContext);\n if (!context) {\n throw new Error(\"useEnv must be used within an EnvProvider\");\n }\n return context.env;\n};\n\nexport const useVariant = () => {\n const context = useContext(EnvContext);\n if (!context) {\n throw new Error(\"useVariant must be used within an EnvProvider\");\n }\n return context.variant;\n};\n\nexport const useRegion = () => {\n const context = useContext(EnvContext);\n if (!context) {\n throw new Error(\"useRegion must be used within an EnvProvider\");\n }\n return context.region;\n};\n\nexport const useEnvContext = () => {\n const context = useContext(EnvContext);\n if (!context) {\n throw new Error(\"useEnvContext must be used within an EnvProvider\");\n }\n return context;\n};\n"],"names":["EnvContext","createContext","EnvProvider","children","context","getProjectSdkContextFromEnv","value","useEnv","useContext","Error","useVariant","useRegion","useEnvContext"],"mappings":";;AASA,MAAMA,aAAa,WAAbA,GAAaC,cAAsC;AAElD,MAAMC,cAAuD,CAAC,EAAEC,QAAQ,EAAE;IAC7E,MAAMC,UAAUC;IAEhB,MAAMC,QAAyB;QAC3B,KAAKF,SAAS,OAAO;QACrB,SAASA,SAAS;QAClB,QAAQA,SAAS;IACrB;IAEA,OAAO,WAAP,GAAO,oBAACJ,WAAW,QAAQ;QAAC,OAAOM;OAAQH;AAC/C;AAEO,MAAMI,SAAS;IAClB,MAAMH,UAAUI,WAAWR;IAC3B,IAAI,CAACI,SACD,MAAM,IAAIK,MAAM;IAEpB,OAAOL,QAAQ,GAAG;AACtB;AAEO,MAAMM,aAAa;IACtB,MAAMN,UAAUI,WAAWR;IAC3B,IAAI,CAACI,SACD,MAAM,IAAIK,MAAM;IAEpB,OAAOL,QAAQ,OAAO;AAC1B;AAEO,MAAMO,YAAY;IACrB,MAAMP,UAAUI,WAAWR;IAC3B,IAAI,CAACI,SACD,MAAM,IAAIK,MAAM;IAEpB,OAAOL,QAAQ,MAAM;AACzB;AAEO,MAAMQ,gBAAgB;IACzB,MAAMR,UAAUI,WAAWR;IAC3B,IAAI,CAACI,SACD,MAAM,IAAIK,MAAM;IAEpB,OAAOL;AACX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services/GetProjectConfigService/ProductionEnvironmentsContext.js","sources":["../../../src/services/GetProjectConfigService/ProductionEnvironmentsContext.tsx"],"sourcesContent":["import React, { createContext, useContext, useState } from \"react\";\n\ninterface ProductionEnvironmentsContextValue {\n prodEnvs: string[];\n setProdEnvs: React.Dispatch<React.SetStateAction<string[]>>;\n}\n\nconst ProductionEnvironmentsContext = createContext<ProductionEnvironmentsContextValue | null>(\n null\n);\n\nexport const ProductionEnvironmentsCollector: React.FC<{ children: React.ReactNode }> = ({\n children\n}) => {\n const [prodEnvs, setProdEnvs] = useState<string[]>([]);\n return (\n <ProductionEnvironmentsContext.Provider value={{ prodEnvs, setProdEnvs }}>\n {children}\n </ProductionEnvironmentsContext.Provider>\n );\n};\n\nexport const useProductionEnvironments = (): string[] => {\n return useContext(ProductionEnvironmentsContext)?.prodEnvs ?? [];\n};\n\nexport const useRegisterProductionEnvironments = () => {\n return useContext(ProductionEnvironmentsContext)?.setProdEnvs ?? null;\n};\n"],"names":["ProductionEnvironmentsContext","createContext","ProductionEnvironmentsCollector","children","prodEnvs","setProdEnvs","useState","useProductionEnvironments","useContext","useRegisterProductionEnvironments"],"mappings":";AAOA,MAAMA,gCAAgC,
|
|
1
|
+
{"version":3,"file":"services/GetProjectConfigService/ProductionEnvironmentsContext.js","sources":["../../../src/services/GetProjectConfigService/ProductionEnvironmentsContext.tsx"],"sourcesContent":["import React, { createContext, useContext, useState } from \"react\";\n\ninterface ProductionEnvironmentsContextValue {\n prodEnvs: string[];\n setProdEnvs: React.Dispatch<React.SetStateAction<string[]>>;\n}\n\nconst ProductionEnvironmentsContext = createContext<ProductionEnvironmentsContextValue | null>(\n null\n);\n\nexport const ProductionEnvironmentsCollector: React.FC<{ children: React.ReactNode }> = ({\n children\n}) => {\n const [prodEnvs, setProdEnvs] = useState<string[]>([]);\n return (\n <ProductionEnvironmentsContext.Provider value={{ prodEnvs, setProdEnvs }}>\n {children}\n </ProductionEnvironmentsContext.Provider>\n );\n};\n\nexport const useProductionEnvironments = (): string[] => {\n return useContext(ProductionEnvironmentsContext)?.prodEnvs ?? [];\n};\n\nexport const useRegisterProductionEnvironments = () => {\n return useContext(ProductionEnvironmentsContext)?.setProdEnvs ?? null;\n};\n"],"names":["ProductionEnvironmentsContext","createContext","ProductionEnvironmentsCollector","children","prodEnvs","setProdEnvs","useState","useProductionEnvironments","useContext","useRegisterProductionEnvironments"],"mappings":";AAOA,MAAMA,gCAAgC,WAAhCA,GAAgCC,cAClC;AAGG,MAAMC,kCAA2E,CAAC,EACrFC,QAAQ,EACX;IACG,MAAM,CAACC,UAAUC,YAAY,GAAGC,SAAmB,EAAE;IACrD,OAAO,WAAP,GACI,oBAACN,8BAA8B,QAAQ;QAAC,OAAO;YAAEI;YAAUC;QAAY;OAClEF;AAGb;AAEO,MAAMI,4BAA4B,IAC9BC,WAAWR,gCAAgC,YAAY,EAAE;AAG7D,MAAMS,oCAAoC,IACtCD,WAAWR,gCAAgC,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services/GetProjectConfigService/WcpProjectLicenseContext.js","sources":["../../../src/services/GetProjectConfigService/WcpProjectLicenseContext.tsx"],"sourcesContent":["import React, { createContext, useContext, useMemo } from \"react\";\nimport { License } from \"@webiny/wcp\";\nimport type { DecryptedWcpProjectLicense } from \"@webiny/wcp/types.js\";\n\nexport interface WcpProjectLicenseContextValue {\n hasLicense: boolean;\n canUseMultiTenancy: () => boolean;\n canUseTeams: () => boolean;\n canUsePrivateFiles: () => boolean;\n canUseFileManagerThreatDetection: () => boolean;\n canUseWorkflows: () => boolean;\n canUseHcmsFieldPermissions: () => boolean;\n}\n\nconst WcpProjectLicenseContext = createContext<WcpProjectLicenseContextValue | null>(null);\n\nexport const WcpProjectLicenseProvider: React.FC<{ children: React.ReactNode }> = ({\n children\n}) => {\n const license = useMemo(() => {\n const licenseEnv = process.env.WCP_PROJECT_LICENSE;\n if (!licenseEnv) {\n return null;\n }\n\n try {\n const licenseDto = JSON.parse(licenseEnv) as DecryptedWcpProjectLicense;\n return License.fromLicenseDto(licenseDto);\n } catch (e) {\n console.warn(\n \"Failed to parse WCP_PROJECT_LICENSE environment variable. Expected valid JSON with DecryptedWcpProjectLicense format:\",\n e\n );\n return null;\n }\n }, []);\n\n const hasLicense = !!license;\n\n const value: WcpProjectLicenseContextValue = {\n hasLicense,\n canUseMultiTenancy: () => hasLicense,\n canUseTeams: () => license?.canUseTeams() ?? false,\n canUsePrivateFiles: () => license?.canUsePrivateFiles() ?? false,\n canUseFileManagerThreatDetection: () =>\n license?.canUseFileManagerThreatDetection() ?? false,\n canUseWorkflows: () => license?.canUseWorkflows() ?? false,\n canUseHcmsFieldPermissions: () => license?.canUseHcmsFieldPermissions() ?? false\n };\n\n return (\n <WcpProjectLicenseContext.Provider value={value}>\n {children}\n </WcpProjectLicenseContext.Provider>\n );\n};\n\nexport const useWcpProjectLicense = () => {\n const context = useContext(WcpProjectLicenseContext);\n if (!context) {\n throw new Error(\"useWcpProjectLicense must be used within a WcpProjectLicenseProvider\");\n }\n return context;\n};\n"],"names":["WcpProjectLicenseContext","createContext","WcpProjectLicenseProvider","children","license","useMemo","licenseEnv","process","licenseDto","JSON","License","e","console","hasLicense","value","useWcpProjectLicense","context","useContext","Error"],"mappings":";;AAcA,MAAMA,2BAA2B,
|
|
1
|
+
{"version":3,"file":"services/GetProjectConfigService/WcpProjectLicenseContext.js","sources":["../../../src/services/GetProjectConfigService/WcpProjectLicenseContext.tsx"],"sourcesContent":["import React, { createContext, useContext, useMemo } from \"react\";\nimport { License } from \"@webiny/wcp\";\nimport type { DecryptedWcpProjectLicense } from \"@webiny/wcp/types.js\";\n\nexport interface WcpProjectLicenseContextValue {\n hasLicense: boolean;\n canUseMultiTenancy: () => boolean;\n canUseTeams: () => boolean;\n canUsePrivateFiles: () => boolean;\n canUseFileManagerThreatDetection: () => boolean;\n canUseWorkflows: () => boolean;\n canUseHcmsFieldPermissions: () => boolean;\n}\n\nconst WcpProjectLicenseContext = createContext<WcpProjectLicenseContextValue | null>(null);\n\nexport const WcpProjectLicenseProvider: React.FC<{ children: React.ReactNode }> = ({\n children\n}) => {\n const license = useMemo(() => {\n const licenseEnv = process.env.WCP_PROJECT_LICENSE;\n if (!licenseEnv) {\n return null;\n }\n\n try {\n const licenseDto = JSON.parse(licenseEnv) as DecryptedWcpProjectLicense;\n return License.fromLicenseDto(licenseDto);\n } catch (e) {\n console.warn(\n \"Failed to parse WCP_PROJECT_LICENSE environment variable. Expected valid JSON with DecryptedWcpProjectLicense format:\",\n e\n );\n return null;\n }\n }, []);\n\n const hasLicense = !!license;\n\n const value: WcpProjectLicenseContextValue = {\n hasLicense,\n canUseMultiTenancy: () => hasLicense,\n canUseTeams: () => license?.canUseTeams() ?? false,\n canUsePrivateFiles: () => license?.canUsePrivateFiles() ?? false,\n canUseFileManagerThreatDetection: () =>\n license?.canUseFileManagerThreatDetection() ?? false,\n canUseWorkflows: () => license?.canUseWorkflows() ?? false,\n canUseHcmsFieldPermissions: () => license?.canUseHcmsFieldPermissions() ?? false\n };\n\n return (\n <WcpProjectLicenseContext.Provider value={value}>\n {children}\n </WcpProjectLicenseContext.Provider>\n );\n};\n\nexport const useWcpProjectLicense = () => {\n const context = useContext(WcpProjectLicenseContext);\n if (!context) {\n throw new Error(\"useWcpProjectLicense must be used within a WcpProjectLicenseProvider\");\n }\n return context;\n};\n"],"names":["WcpProjectLicenseContext","createContext","WcpProjectLicenseProvider","children","license","useMemo","licenseEnv","process","licenseDto","JSON","License","e","console","hasLicense","value","useWcpProjectLicense","context","useContext","Error"],"mappings":";;AAcA,MAAMA,2BAA2B,WAA3BA,GAA2BC,cAAoD;AAE9E,MAAMC,4BAAqE,CAAC,EAC/EC,QAAQ,EACX;IACG,MAAMC,UAAUC,QAAQ;QACpB,MAAMC,aAAaC,QAAQ,GAAG,CAAC,mBAAmB;QAClD,IAAI,CAACD,YACD,OAAO;QAGX,IAAI;YACA,MAAME,aAAaC,KAAK,KAAK,CAACH;YAC9B,OAAOI,QAAQ,cAAc,CAACF;QAClC,EAAE,OAAOG,GAAG;YACRC,QAAQ,IAAI,CACR,yHACAD;YAEJ,OAAO;QACX;IACJ,GAAG,EAAE;IAEL,MAAME,aAAa,CAAC,CAACT;IAErB,MAAMU,QAAuC;QACzCD;QACA,oBAAoB,IAAMA;QAC1B,aAAa,IAAMT,SAAS,iBAAiB;QAC7C,oBAAoB,IAAMA,SAAS,wBAAwB;QAC3D,kCAAkC,IAC9BA,SAAS,sCAAsC;QACnD,iBAAiB,IAAMA,SAAS,qBAAqB;QACrD,4BAA4B,IAAMA,SAAS,gCAAgC;IAC/E;IAEA,OAAO,WAAP,GACI,oBAACJ,yBAAyB,QAAQ;QAAC,OAAOc;OACrCX;AAGb;AAEO,MAAMY,uBAAuB;IAChC,MAAMC,UAAUC,WAAWjB;IAC3B,IAAI,CAACgB,SACD,MAAM,IAAIE,MAAM;IAEpB,OAAOF;AACX"}
|
|
@@ -40,7 +40,7 @@ process.on("unhandledRejection", (reason)=>{
|
|
|
40
40
|
});
|
|
41
41
|
const { project: projectModelDto } = JSON.parse(process.argv[2]);
|
|
42
42
|
const project = ProjectModel.fromDto(projectModelDto);
|
|
43
|
-
const { Extensions
|
|
43
|
+
const { Extensions } = await import(toImportSpecifier(project.paths.webinyConfigBaseFile.toString()));
|
|
44
44
|
const RENDER_TIMEOUT_MS = 30000;
|
|
45
45
|
const timeout = setTimeout(()=>{
|
|
46
46
|
sendError(new Error(`Config rendering timed out after ${RENDER_TIMEOUT_MS}ms. This usually means an <Await> promise never settled.`));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services/GetProjectConfigService/renderConfigWorker.js","sources":["../../../src/services/GetProjectConfigService/renderConfigWorker.tsx"],"sourcesContent":["import \"tsx/esm\";\nimport { AsyncProperties, toObject } from \"@webiny/react-properties\";\nimport debounce from \"debounce\";\nimport React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport { JSDOM } from \"jsdom\";\nimport { serializeError } from \"serialize-error\";\nimport type { RenderConfigParamsDto, RenderConfigWorkerMessageDto } from \"./renderConfig.js\";\nimport { ProjectModel } from \"~/models/ProjectModel.js\";\nimport { toImportSpecifier } from \"~/utils/index.js\";\nimport { EnvProvider } from \"./EnvContext.js\";\nimport { WcpProjectLicenseProvider } from \"./WcpProjectLicenseContext.js\";\nimport { ProductionEnvironmentsCollector } from \"./ProductionEnvironmentsContext.js\";\n\nconst sendError = (err: Error) => {\n const message: RenderConfigWorkerMessageDto = {\n type: \"error\",\n error: serializeError(err),\n data: null\n };\n\n if (process.send) {\n process.send!(message);\n } else {\n console.error(message);\n }\n};\n\nconst sendSuccess = (data: Record<string, any> = {}) => {\n const message: RenderConfigWorkerMessageDto = {\n type: \"success\",\n error: null,\n data\n };\n\n if (process.send) {\n process.send!(message);\n } else {\n console.log(message);\n }\n};\n\nprocess.on(\"uncaughtException\", err => {\n sendError(err);\n process.exit(1);\n});\n\nprocess.on(\"unhandledRejection\", reason => {\n const err = reason instanceof Error ? reason : new Error(String(reason));\n sendError(err);\n process.exit(1);\n});\n\nconst { project: projectModelDto } = JSON.parse(process.argv[2]) as RenderConfigParamsDto;\nconst project = ProjectModel.fromDto(projectModelDto);\n\nconst { Extensions } = await import(\n toImportSpecifier(project.paths.webinyConfigBaseFile.toString())\n);\n\nconst RENDER_TIMEOUT_MS = 30_000;\n\nconst timeout = setTimeout(() => {\n sendError(\n new Error(\n `Config rendering timed out after ${RENDER_TIMEOUT_MS}ms. ` +\n `This usually means an <Await> promise never settled.`\n )\n );\n process.exit(1);\n}, RENDER_TIMEOUT_MS);\n\nconst onChange = debounce((value: any) => {\n clearTimeout(timeout);\n sendSuccess(toObject(value));\n process.exit(0);\n});\n\nconst { window } = new JSDOM(`<div id=\"root\"/>`);\n\n(global as any).window = window;\n\n(global as any).document = window.document;\n\nconst root = window.document.getElementById(\"root\")!;\n\nconst reactRoot = createRoot(root);\n\nreactRoot.render(\n <WcpProjectLicenseProvider>\n <EnvProvider>\n <ProductionEnvironmentsCollector>\n <AsyncProperties onChange={onChange}>\n <Extensions />\n </AsyncProperties>\n </ProductionEnvironmentsCollector>\n </EnvProvider>\n </WcpProjectLicenseProvider>\n);\n"],"names":["sendError","err","message","serializeError","process","console","sendSuccess","data","reason","Error","String","projectModelDto","JSON","project","ProjectModel","Extensions","toImportSpecifier","RENDER_TIMEOUT_MS","timeout","setTimeout","onChange","debounce","value","clearTimeout","toObject","window","JSDOM","global","root","reactRoot","createRoot","WcpProjectLicenseProvider","EnvProvider","ProductionEnvironmentsCollector","AsyncProperties"],"mappings":";;;;;;;;;;;;;AAcA,MAAMA,YAAY,CAACC;IACf,MAAMC,UAAwC;QAC1C,MAAM;QACN,OAAOC,eAAeF;QACtB,MAAM;IACV;IAEA,IAAIG,QAAQ,IAAI,EACZA,QAAQ,IAAI,CAAEF;SAEdG,QAAQ,KAAK,CAACH;AAEtB;AAEA,MAAMI,cAAc,CAACC,OAA4B,CAAC,CAAC;IAC/C,MAAML,UAAwC;QAC1C,MAAM;QACN,OAAO;QACPK;IACJ;IAEA,IAAIH,QAAQ,IAAI,EACZA,QAAQ,IAAI,CAAEF;SAEdG,QAAQ,GAAG,CAACH;AAEpB;AAEAE,QAAQ,EAAE,CAAC,qBAAqBH,CAAAA;IAC5BD,UAAUC;IACVG,QAAQ,IAAI,CAAC;AACjB;AAEAA,QAAQ,EAAE,CAAC,sBAAsBI,CAAAA;IAC7B,MAAMP,MAAMO,kBAAkBC,QAAQD,SAAS,IAAIC,MAAMC,OAAOF;IAChER,UAAUC;IACVG,QAAQ,IAAI,CAAC;AACjB;AAEA,MAAM,EAAE,SAASO,eAAe,EAAE,GAAGC,KAAK,KAAK,CAACR,QAAQ,IAAI,CAAC,EAAE;AAC/D,MAAMS,UAAUC,aAAa,OAAO,CAACH;AAErC,MAAM,EAAEI,
|
|
1
|
+
{"version":3,"file":"services/GetProjectConfigService/renderConfigWorker.js","sources":["../../../src/services/GetProjectConfigService/renderConfigWorker.tsx"],"sourcesContent":["import \"tsx/esm\";\nimport { AsyncProperties, toObject } from \"@webiny/react-properties\";\nimport debounce from \"debounce\";\nimport React from \"react\";\nimport { createRoot } from \"react-dom/client\";\nimport { JSDOM } from \"jsdom\";\nimport { serializeError } from \"serialize-error\";\nimport type { RenderConfigParamsDto, RenderConfigWorkerMessageDto } from \"./renderConfig.js\";\nimport { ProjectModel } from \"~/models/ProjectModel.js\";\nimport { toImportSpecifier } from \"~/utils/index.js\";\nimport { EnvProvider } from \"./EnvContext.js\";\nimport { WcpProjectLicenseProvider } from \"./WcpProjectLicenseContext.js\";\nimport { ProductionEnvironmentsCollector } from \"./ProductionEnvironmentsContext.js\";\n\nconst sendError = (err: Error) => {\n const message: RenderConfigWorkerMessageDto = {\n type: \"error\",\n error: serializeError(err),\n data: null\n };\n\n if (process.send) {\n process.send!(message);\n } else {\n console.error(message);\n }\n};\n\nconst sendSuccess = (data: Record<string, any> = {}) => {\n const message: RenderConfigWorkerMessageDto = {\n type: \"success\",\n error: null,\n data\n };\n\n if (process.send) {\n process.send!(message);\n } else {\n console.log(message);\n }\n};\n\nprocess.on(\"uncaughtException\", err => {\n sendError(err);\n process.exit(1);\n});\n\nprocess.on(\"unhandledRejection\", reason => {\n const err = reason instanceof Error ? reason : new Error(String(reason));\n sendError(err);\n process.exit(1);\n});\n\nconst { project: projectModelDto } = JSON.parse(process.argv[2]) as RenderConfigParamsDto;\nconst project = ProjectModel.fromDto(projectModelDto);\n\nconst { Extensions } = await import(\n toImportSpecifier(project.paths.webinyConfigBaseFile.toString())\n);\n\nconst RENDER_TIMEOUT_MS = 30_000;\n\nconst timeout = setTimeout(() => {\n sendError(\n new Error(\n `Config rendering timed out after ${RENDER_TIMEOUT_MS}ms. ` +\n `This usually means an <Await> promise never settled.`\n )\n );\n process.exit(1);\n}, RENDER_TIMEOUT_MS);\n\nconst onChange = debounce((value: any) => {\n clearTimeout(timeout);\n sendSuccess(toObject(value));\n process.exit(0);\n});\n\nconst { window } = new JSDOM(`<div id=\"root\"/>`);\n\n(global as any).window = window;\n\n(global as any).document = window.document;\n\nconst root = window.document.getElementById(\"root\")!;\n\nconst reactRoot = createRoot(root);\n\nreactRoot.render(\n <WcpProjectLicenseProvider>\n <EnvProvider>\n <ProductionEnvironmentsCollector>\n <AsyncProperties onChange={onChange}>\n <Extensions />\n </AsyncProperties>\n </ProductionEnvironmentsCollector>\n </EnvProvider>\n </WcpProjectLicenseProvider>\n);\n"],"names":["sendError","err","message","serializeError","process","console","sendSuccess","data","reason","Error","String","projectModelDto","JSON","project","ProjectModel","Extensions","toImportSpecifier","RENDER_TIMEOUT_MS","timeout","setTimeout","onChange","debounce","value","clearTimeout","toObject","window","JSDOM","global","root","reactRoot","createRoot","WcpProjectLicenseProvider","EnvProvider","ProductionEnvironmentsCollector","AsyncProperties"],"mappings":";;;;;;;;;;;;;AAcA,MAAMA,YAAY,CAACC;IACf,MAAMC,UAAwC;QAC1C,MAAM;QACN,OAAOC,eAAeF;QACtB,MAAM;IACV;IAEA,IAAIG,QAAQ,IAAI,EACZA,QAAQ,IAAI,CAAEF;SAEdG,QAAQ,KAAK,CAACH;AAEtB;AAEA,MAAMI,cAAc,CAACC,OAA4B,CAAC,CAAC;IAC/C,MAAML,UAAwC;QAC1C,MAAM;QACN,OAAO;QACPK;IACJ;IAEA,IAAIH,QAAQ,IAAI,EACZA,QAAQ,IAAI,CAAEF;SAEdG,QAAQ,GAAG,CAACH;AAEpB;AAEAE,QAAQ,EAAE,CAAC,qBAAqBH,CAAAA;IAC5BD,UAAUC;IACVG,QAAQ,IAAI,CAAC;AACjB;AAEAA,QAAQ,EAAE,CAAC,sBAAsBI,CAAAA;IAC7B,MAAMP,MAAMO,kBAAkBC,QAAQD,SAAS,IAAIC,MAAMC,OAAOF;IAChER,UAAUC;IACVG,QAAQ,IAAI,CAAC;AACjB;AAEA,MAAM,EAAE,SAASO,eAAe,EAAE,GAAGC,KAAK,KAAK,CAACR,QAAQ,IAAI,CAAC,EAAE;AAC/D,MAAMS,UAAUC,aAAa,OAAO,CAACH;AAErC,MAAM,EAAEI,UAAU,EAAE,GAAG,MAAM,MAAM,CAC/BC,kBAAkBH,QAAQ,KAAK,CAAC,oBAAoB,CAAC,QAAQ;AAGjE,MAAMI,oBAAoB;AAE1B,MAAMC,UAAUC,WAAW;IACvBnB,UACI,IAAIS,MACA,CAAC,iCAAiC,EAAEQ,kBAAkB,wDAAI,CAAC;IAInEb,QAAQ,IAAI,CAAC;AACjB,GAAGa;AAEH,MAAMG,WAAWC,SAAS,CAACC;IACvBC,aAAaL;IACbZ,YAAYkB,SAASF;IACrBlB,QAAQ,IAAI,CAAC;AACjB;AAEA,MAAM,EAAEqB,QAAM,2BAAE,GAAG,IAAIC,MAAM;AAE5BC,oBAAAA,CAAMA,CAAS,MAAM,GAAGF;AAExBE,oBAAAA,CAAMA,CAAS,QAAQ,GAAGF,0BAAO,QAAQ;AAE1C,MAAMG,OAAOH,0BAAO,QAAQ,CAAC,cAAc,CAAC;AAE5C,MAAMI,YAAYC,WAAWF;AAE7BC,UAAU,MAAM,CAAC,WAAD,GACZ,oBAACE,2BAAyBA,MAAAA,WAAAA,GACtB,oBAACC,aAAWA,MAAAA,WAAAA,GACR,oBAACC,iCAA+BA,MAAAA,WAAAA,GAC5B,oBAACC,iBAAeA;IAAC,UAAUd;iBACvB,oBAACL,YAAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services/PulumiGetStackOutputService/mapStackOutput.js","sources":["../../../src/services/PulumiGetStackOutputService/mapStackOutput.ts"],"sourcesContent":["import get from \"lodash/get.js\";\nimport chalk from \"chalk\";\n\nconst { yellow } = chalk;\n\nexport const mapStackOutput = <T extends Record<string, any> = Record<string, any>>(\n output: Record<string, any>,\n map: Record<string, any>\n): T => {\n const values: T = {} as T;\n const regex = /\\${(.*)}/;\n\n Object.keys(map).forEach(key => {\n const valuePattern = map[key];\n const match = regex.exec(valuePattern);\n if (match) {\n const [replace, valuePath] = match;\n const value = get(output, valuePath);\n if (!value) {\n console.log(yellow(`Could not map \"${valuePath}\" to \"${key}\" - value missing.`));\n return;\n }\n /**\n * It is ok to expect error here.\n */\n if (typeof value === \"object\" && value !== null) {\n // @ts-expect-error\n values[key] = valuePattern.replace(replace, JSON.stringify(value));\n } else {\n // @ts-expect-error\n values[key] = valuePattern.replace(replace, value);\n }\n }\n });\n\n return values;\n};\n"],"names":["yellow","chalk","mapStackOutput","output","map","values","regex","Object","key","valuePattern","match","replace","valuePath","value","get","console","JSON"],"mappings":";;AAGA,MAAM,EAAEA,
|
|
1
|
+
{"version":3,"file":"services/PulumiGetStackOutputService/mapStackOutput.js","sources":["../../../src/services/PulumiGetStackOutputService/mapStackOutput.ts"],"sourcesContent":["import get from \"lodash/get.js\";\nimport chalk from \"chalk\";\n\nconst { yellow } = chalk;\n\nexport const mapStackOutput = <T extends Record<string, any> = Record<string, any>>(\n output: Record<string, any>,\n map: Record<string, any>\n): T => {\n const values: T = {} as T;\n const regex = /\\${(.*)}/;\n\n Object.keys(map).forEach(key => {\n const valuePattern = map[key];\n const match = regex.exec(valuePattern);\n if (match) {\n const [replace, valuePath] = match;\n const value = get(output, valuePath);\n if (!value) {\n console.log(yellow(`Could not map \"${valuePath}\" to \"${key}\" - value missing.`));\n return;\n }\n /**\n * It is ok to expect error here.\n */\n if (typeof value === \"object\" && value !== null) {\n // @ts-expect-error\n values[key] = valuePattern.replace(replace, JSON.stringify(value));\n } else {\n // @ts-expect-error\n values[key] = valuePattern.replace(replace, value);\n }\n }\n });\n\n return values;\n};\n"],"names":["yellow","chalk","mapStackOutput","output","map","values","regex","Object","key","valuePattern","match","replace","valuePath","value","get","console","JSON"],"mappings":";;AAGA,MAAM,EAAEA,MAAM,EAAE,GAAGC;AAEZ,MAAMC,iBAAiB,CAC1BC,QACAC;IAEA,MAAMC,SAAY,CAAC;IACnB,MAAMC,QAAQ;IAEdC,OAAO,IAAI,CAACH,KAAK,OAAO,CAACI,CAAAA;QACrB,MAAMC,eAAeL,GAAG,CAACI,IAAI;QAC7B,MAAME,QAAQJ,MAAM,IAAI,CAACG;QACzB,IAAIC,OAAO;YACP,MAAM,CAACC,SAASC,UAAU,GAAGF;YAC7B,MAAMG,QAAQC,IAAIX,QAAQS;YAC1B,IAAI,CAACC,OAAO,YACRE,QAAQ,GAAG,CAACf,OAAO,CAAC,eAAe,EAAEY,UAAU,MAAM,EAAEJ,IAAI,kBAAkB,CAAC;YAMlF,IAAI,AAAiB,YAAjB,OAAOK,SAAsBA,AAAU,SAAVA,OAE7BR,MAAM,CAACG,IAAI,GAAGC,aAAa,OAAO,CAACE,SAASK,KAAK,SAAS,CAACH;iBAG3DR,MAAM,CAACG,IAAI,GAAGC,aAAa,OAAO,CAACE,SAASE;QAEpD;IACJ;IAEA,OAAOR;AACX"}
|