@cedarjs/cli-helpers 5.0.7-next.219 → 5.0.7-next.258
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authTasks.d.ts","sourceRoot":"","sources":["../../src/auth/authTasks.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AA2BxE,eAAO,MAAM,aAAa,cAA2B,CAAA;AAwDrD,eAAO,MAAM,YAAY,GAAI,+CAG1B;IACD,qBAAqB,EAAE,OAAO,CAAA;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B,SAgDA,CAAA;AAmCD,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,YAE9C,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,WA6CjD,CAAA;
|
|
1
|
+
{"version":3,"file":"authTasks.d.ts","sourceRoot":"","sources":["../../src/auth/authTasks.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAA;AA2BxE,eAAO,MAAM,aAAa,cAA2B,CAAA;AAwDrD,eAAO,MAAM,YAAY,GAAI,+CAG1B;IACD,qBAAqB,EAAE,OAAO,CAAA;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B,SAgDA,CAAA;AAmCD,eAAO,MAAM,eAAe,GAAI,SAAS,MAAM,YAE9C,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,SAAS,MAAM,WA6CjD,CAAA;AAuED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,SAAS,OAAO,aAAa,OAClC,SAAS,CAAC,gBAAgB,EAAE,QAAQ,CA8CxC,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,SAAS,MAAM,EAAE,UAAU,OAAO;;gBAgC1C,gBAAgB;CA0CrC,CAAA;AAED,eAAO,MAAM,iBAAiB;;;CAmB7B,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,QAAQ,SAAS,OAAO,aAAa,EACxE,SAAS,MAAM,EACf,UAAU,OAAO,KAChB,SAAS,CAAC,gBAAgB,EAAE,QAAQ,CAgDtC,CAAA;AASD,eAAO,MAAM,qBAAqB,GAChC,QAAQ,SAAS,OAAO,aAAa,EACrC,gBAAgB,SAAS,OAAO,aAAa,EAE7C,oBAAoB,MAAM;;gBAInB,gBAAgB,SACd,gBAAgB,CAAC,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB,CAAC;CAcvE,CAAA;AAEF,MAAM,MAAM,aAAa,GACrB,OAAO,GACP,SAAS,GACT,SAAS,GACT,SAAS,CAAA;AAEb,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,aAAa,CAAA;IACxB,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,EAAE,OAAO,CAAA;CACf;AAED,eAAO,MAAM,gBAAgB,GAC3B,QAAQ,SAAS,OAAO,aAAa,EACrC,gBAAgB,SAAS,OAAO,aAAa,EAE7C,OAAO,OAAO;;gBAKL,gBAAgB,QACf,gBAAgB,CAAC,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB,CAAC;CA2CzE,CAAA"}
|
package/dist/auth/authTasks.js
CHANGED
|
@@ -132,10 +132,10 @@ const addAuthProviderToApp = (content, setupMode) => {
|
|
|
132
132
|
content = removeAuthProvider(content);
|
|
133
133
|
}
|
|
134
134
|
const match = content.match(
|
|
135
|
-
/(\s+)(<
|
|
135
|
+
/(\s+)(<(?:Cedar|Redwood)Provider.*?>)(.*)(<\/(?:Cedar|Redwood)Provider>)/s
|
|
136
136
|
);
|
|
137
137
|
if (!match) {
|
|
138
|
-
throw new Error("Could not find <
|
|
138
|
+
throw new Error("Could not find <CedarProvider> in App.{jsx,tsx}");
|
|
139
139
|
}
|
|
140
140
|
if (/\s+<AuthProvider>/.test(content)) {
|
|
141
141
|
return content;
|
|
@@ -143,16 +143,16 @@ const addAuthProviderToApp = (content, setupMode) => {
|
|
|
143
143
|
const [
|
|
144
144
|
_,
|
|
145
145
|
newlineAndIndent,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
cedarProviderOpen,
|
|
147
|
+
cedarProviderChildren,
|
|
148
|
+
cedarProviderClose
|
|
149
149
|
] = match;
|
|
150
|
-
const
|
|
150
|
+
const cedarProviderChildrenLines = cedarProviderChildren.split("\n").map((line, index) => {
|
|
151
151
|
return `${index === 0 ? "" : " "}` + line;
|
|
152
152
|
});
|
|
153
|
-
const renderContent = newlineAndIndent +
|
|
153
|
+
const renderContent = newlineAndIndent + cedarProviderOpen + newlineAndIndent + ` <AuthProvider>` + cedarProviderChildrenLines.join("\n") + `</AuthProvider>` + newlineAndIndent + cedarProviderClose;
|
|
154
154
|
return content.replace(
|
|
155
|
-
/\s+<
|
|
155
|
+
/\s+<(?:Cedar|Redwood)Provider.*?>.*<\/(?:Cedar|Redwood)Provider>/s,
|
|
156
156
|
renderContent
|
|
157
157
|
);
|
|
158
158
|
};
|
|
@@ -42,6 +42,16 @@ export declare function formatRunWorkspaceScriptCommand(workspace: string, scrip
|
|
|
42
42
|
* pnpm → `pnpm exec <bin> [args]`
|
|
43
43
|
*/
|
|
44
44
|
export declare function formatRunBinCommand(bin: string, args?: string[]): string;
|
|
45
|
+
/**
|
|
46
|
+
* Returns a formatted string for running a transitive dependency's binary
|
|
47
|
+
* (one not listed directly in the project's package.json, e.g. Prisma) via
|
|
48
|
+
* the detected package manager.
|
|
49
|
+
*
|
|
50
|
+
* yarn → `npx <bin> [args]`
|
|
51
|
+
* npm → `npx <bin> [args]`
|
|
52
|
+
* pnpm → `pnpm exec <bin> [args]`
|
|
53
|
+
*/
|
|
54
|
+
export declare function formatRunTransitiveBinCommand(bin: string, args?: string[]): string;
|
|
45
55
|
/**
|
|
46
56
|
* Returns a formatted string for running a local binary in a workspace context
|
|
47
57
|
* via the detected package manager.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../src/packageManager/display.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CASzD;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,MAAM,EAAO,GAClB,MAAM,CAUR;AAED;;;;;;;GAOG;AACH,wBAAgB,+BAA+B,CAC7C,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,IAAI,GAAE,MAAM,EAAO,GAClB,MAAM,CAgBR;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,EAAO,GAAG,MAAM,CAa5E;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,IAAI,GAAE,MAAM,EAAO,GAClB,MAAM,CAcR;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAM,EAAO,GAAG,MAAM,CAS7E;AAED;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,MAAM,EAAE,EAClB,GAAG,UAAQ,GACV,MAAM,CAOR;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAAE,EAClB,GAAG,UAAQ,GACV,MAAM,CAeR;AAED;;;;;;;GAOG;AACH,wBAAgB,oCAAoC,CAClD,SAAS,EAAE,M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,MAAM,CAeR;AAED;;;;;;;GAOG;AACH,wBAAgB,oCAAoC,CAClD,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAAE,GACjB,MAAM,CAcR"}
|
|
@@ -43,6 +43,14 @@ function formatRunBinCommand(bin, args = []) {
|
|
|
43
43
|
}
|
|
44
44
|
return `yarn ${bin}${argStr}`;
|
|
45
45
|
}
|
|
46
|
+
function formatRunTransitiveBinCommand(bin, args = []) {
|
|
47
|
+
const pm = getPackageManager();
|
|
48
|
+
const argStr = args.length > 0 ? ` ${args.join(" ")}` : "";
|
|
49
|
+
if (pm === "pnpm") {
|
|
50
|
+
return `pnpm exec ${bin}${argStr}`;
|
|
51
|
+
}
|
|
52
|
+
return `npx ${bin}${argStr}`;
|
|
53
|
+
}
|
|
46
54
|
function formatRunWorkspaceBinCommand(workspace, bin, args = []) {
|
|
47
55
|
const pm = getPackageManager();
|
|
48
56
|
const argStr = args.length > 0 ? ` ${args.join(" ")}` : "";
|
|
@@ -101,6 +109,7 @@ export {
|
|
|
101
109
|
formatRemoveWorkspacePackagesCommand,
|
|
102
110
|
formatRunBinCommand,
|
|
103
111
|
formatRunScriptCommand,
|
|
112
|
+
formatRunTransitiveBinCommand,
|
|
104
113
|
formatRunWorkspaceBinCommand,
|
|
105
114
|
formatRunWorkspaceScriptCommand
|
|
106
115
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli-helpers",
|
|
3
|
-
"version": "5.0.7-next.
|
|
3
|
+
"version": "5.0.7-next.258",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -73,8 +73,8 @@
|
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
75
|
"@babel/core": "^7.26.10",
|
|
76
|
-
"@cedarjs/project-config": "5.0.7-next.
|
|
77
|
-
"@cedarjs/telemetry": "5.0.7-next.
|
|
76
|
+
"@cedarjs/project-config": "5.0.7-next.258",
|
|
77
|
+
"@cedarjs/telemetry": "5.0.7-next.258",
|
|
78
78
|
"@listr2/prompt-adapter-enquirer": "4.3.0",
|
|
79
79
|
"@opentelemetry/api": "1.9.1",
|
|
80
80
|
"ansis": "4.3.1",
|
|
@@ -93,9 +93,9 @@
|
|
|
93
93
|
"yargs-parser": "21.1.1"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
|
-
"@cedarjs/framework-tools": "5.0.7-next.
|
|
96
|
+
"@cedarjs/framework-tools": "5.0.7-next.258",
|
|
97
97
|
"@types/dotenv-defaults": "^5.0.0",
|
|
98
|
-
"@types/lodash": "4.17.
|
|
98
|
+
"@types/lodash": "4.17.25",
|
|
99
99
|
"@types/pascalcase": "1.0.3",
|
|
100
100
|
"@types/semver": "^7",
|
|
101
101
|
"@types/yargs": "17.0.35",
|