@webiny/project 6.6.0-alpha.5 → 6.6.0-alpha.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.
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import "tsx";
|
|
2
2
|
import { requireConfigWithExecute } from "../../../utils/index.js";
|
|
3
3
|
import fs from "fs";
|
|
4
|
+
process.on("disconnect", ()=>{
|
|
5
|
+
process.exit(0);
|
|
6
|
+
});
|
|
4
7
|
const workerData = JSON.parse(process.argv[2]);
|
|
5
8
|
const { package: pkg, env: env, variant: variant, region: region, debug: debug } = workerData;
|
|
6
9
|
const 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":["
|
|
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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/project",
|
|
3
|
-
"version": "6.6.0-alpha.
|
|
3
|
+
"version": "6.6.0-alpha.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -13,16 +13,16 @@
|
|
|
13
13
|
"description": "An SDK for managing Webiny projects.",
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@webiny/build-tools": "6.6.0-alpha.
|
|
16
|
+
"@webiny/build-tools": "6.6.0-alpha.7",
|
|
17
17
|
"@webiny/di": "1.1.0",
|
|
18
|
-
"@webiny/feature-flags": "6.6.0-alpha.
|
|
19
|
-
"@webiny/global-config": "6.6.0-alpha.
|
|
20
|
-
"@webiny/pulumi-sdk": "6.6.0-alpha.
|
|
21
|
-
"@webiny/react-properties": "6.6.0-alpha.
|
|
22
|
-
"@webiny/system-requirements": "6.6.0-alpha.
|
|
23
|
-
"@webiny/telemetry": "6.6.0-alpha.
|
|
24
|
-
"@webiny/utils": "6.6.0-alpha.
|
|
25
|
-
"@webiny/wcp": "6.6.0-alpha.
|
|
18
|
+
"@webiny/feature-flags": "6.6.0-alpha.7",
|
|
19
|
+
"@webiny/global-config": "6.6.0-alpha.7",
|
|
20
|
+
"@webiny/pulumi-sdk": "6.6.0-alpha.7",
|
|
21
|
+
"@webiny/react-properties": "6.6.0-alpha.7",
|
|
22
|
+
"@webiny/system-requirements": "6.6.0-alpha.7",
|
|
23
|
+
"@webiny/telemetry": "6.6.0-alpha.7",
|
|
24
|
+
"@webiny/utils": "6.6.0-alpha.7",
|
|
25
|
+
"@webiny/wcp": "6.6.0-alpha.7",
|
|
26
26
|
"chalk": "6.0.0",
|
|
27
27
|
"chokidar": "5.0.0",
|
|
28
28
|
"ci-info": "4.4.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getWcpGqlApiUrl } from "@webiny/wcp";
|
|
2
|
-
import { request } from "graphql-request";
|
|
3
2
|
class WcpGqlClient {
|
|
4
|
-
static execute(query, variables = {}, headers = {}) {
|
|
3
|
+
static async execute(query, variables = {}, headers = {}) {
|
|
4
|
+
const { request } = await import("graphql-request");
|
|
5
5
|
const wcpApiUrl = getWcpGqlApiUrl();
|
|
6
6
|
return request(wcpApiUrl, query, variables, headers);
|
|
7
7
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services/WcpService/WcpGqlClient.js","sources":["../../../src/services/WcpService/WcpGqlClient.ts"],"sourcesContent":["import { getWcpGqlApiUrl } from \"@webiny/wcp\";\
|
|
1
|
+
{"version":3,"file":"services/WcpService/WcpGqlClient.js","sources":["../../../src/services/WcpService/WcpGqlClient.ts"],"sourcesContent":["import { getWcpGqlApiUrl } from \"@webiny/wcp\";\n\nexport class WcpGqlClient {\n static async execute<TData extends Record<string, any> = Record<string, any>>(\n query: string,\n variables: Record<string, any> = {},\n headers: HeadersInit = {}\n ) {\n // Loaded here rather than at the top of the file: `graphql-request` pulls in all of\n // `graphql`, about 140 modules, and every CLI command would load it just to register this\n // service. Most commands never send a GraphQL request to WCP, since the environment lookup\n // uses the REST endpoint first.\n const { request } = await import(\"graphql-request\");\n\n const wcpApiUrl = getWcpGqlApiUrl();\n return request(wcpApiUrl, query, variables, headers) as Promise<TData>;\n }\n}\n"],"names":["WcpGqlClient","query","variables","headers","request","wcpApiUrl","getWcpGqlApiUrl"],"mappings":";AAEO,MAAMA;IACT,aAAa,QACTC,KAAa,EACbC,YAAiC,CAAC,CAAC,EACnCC,UAAuB,CAAC,CAAC,EAC3B;QAKE,MAAM,EAAEC,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC;QAEjC,MAAMC,YAAYC;QAClB,OAAOF,QAAQC,WAAWJ,OAAOC,WAAWC;IAChD;AACJ"}
|