@cedarjs/cli-helpers 2.1.0 → 2.1.1-next.0

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 (48) hide show
  1. package/dist/build.d.ts +2 -0
  2. package/dist/build.d.ts.map +1 -0
  3. package/dist/src/auth/__tests__/authFiles.test.d.ts +2 -0
  4. package/dist/src/auth/__tests__/authFiles.test.d.ts.map +1 -0
  5. package/dist/src/auth/__tests__/authTasks.test.d.ts +2 -0
  6. package/dist/src/auth/__tests__/authTasks.test.d.ts.map +1 -0
  7. package/dist/src/auth/__tests__/mockFsFiles.d.ts +14 -0
  8. package/dist/src/auth/__tests__/mockFsFiles.d.ts.map +1 -0
  9. package/dist/src/auth/__tests__/setupHelpers.test.d.ts +2 -0
  10. package/dist/src/auth/__tests__/setupHelpers.test.d.ts.map +1 -0
  11. package/dist/src/auth/authFiles.d.ts +44 -0
  12. package/dist/src/auth/authFiles.d.ts.map +1 -0
  13. package/dist/src/auth/authTasks.d.ts +49 -0
  14. package/dist/src/auth/authTasks.d.ts.map +1 -0
  15. package/dist/src/auth/setupHelpers.d.ts +26 -0
  16. package/dist/src/auth/setupHelpers.d.ts.map +1 -0
  17. package/dist/src/index.d.ts +12 -0
  18. package/dist/src/index.d.ts.map +1 -0
  19. package/dist/src/lib/__tests__/index.test.d.ts +2 -0
  20. package/dist/src/lib/__tests__/index.test.d.ts.map +1 -0
  21. package/dist/src/lib/__tests__/loadEnvFiles.test.d.ts +2 -0
  22. package/dist/src/lib/__tests__/loadEnvFiles.test.d.ts.map +1 -0
  23. package/dist/src/lib/__tests__/project.addTomlSetting.test.d.ts +2 -0
  24. package/dist/src/lib/__tests__/project.addTomlSetting.test.d.ts.map +1 -0
  25. package/dist/src/lib/__tests__/project.test.d.ts +2 -0
  26. package/dist/src/lib/__tests__/project.test.d.ts.map +1 -0
  27. package/dist/src/lib/__tests__/version.test.d.ts +2 -0
  28. package/dist/src/lib/__tests__/version.test.d.ts.map +1 -0
  29. package/dist/src/lib/colors.d.ts +22 -0
  30. package/dist/src/lib/colors.d.ts.map +1 -0
  31. package/dist/src/lib/index.d.ts +21 -0
  32. package/dist/src/lib/index.d.ts.map +1 -0
  33. package/dist/src/lib/installHelpers.d.ts +17 -0
  34. package/dist/src/lib/installHelpers.d.ts.map +1 -0
  35. package/dist/src/lib/loadEnvFiles.d.ts +5 -0
  36. package/dist/src/lib/loadEnvFiles.d.ts.map +1 -0
  37. package/dist/src/lib/paths.d.ts +6 -0
  38. package/dist/src/lib/paths.d.ts.map +1 -0
  39. package/dist/src/lib/project.d.ts +42 -0
  40. package/dist/src/lib/project.d.ts.map +1 -0
  41. package/dist/src/lib/version.d.ts +17 -0
  42. package/dist/src/lib/version.d.ts.map +1 -0
  43. package/dist/src/telemetry/index.d.ts +20 -0
  44. package/dist/src/telemetry/index.d.ts.map +1 -0
  45. package/dist/tsconfig.tsbuildinfo +1 -0
  46. package/dist/vitest.config.d.mts +3 -0
  47. package/dist/vitest.config.d.mts.map +1 -0
  48. package/package.json +5 -5
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=build.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build.d.ts","sourceRoot":"","sources":["../build.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=authFiles.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authFiles.test.d.ts","sourceRoot":"","sources":["../../../../src/auth/__tests__/authFiles.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=authTasks.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authTasks.test.d.ts","sourceRoot":"","sources":["../../../../src/auth/__tests__/authTasks.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,14 @@
1
+ export declare const webAppTsx: string;
2
+ export declare const graphqlTs: string;
3
+ export declare const auth0WebAuthTsTemplate: string;
4
+ export declare const clerkWebAuthTsTemplate: string;
5
+ export declare const routesTsx: string;
6
+ export declare const legacyAuthWebAppTsx: string;
7
+ export declare const customApolloAppTsx: string;
8
+ export declare const customPropsRoutesTsx: string;
9
+ export declare const useAuthRoutesTsx: string;
10
+ export declare const explicitReturnAppTsx: string;
11
+ export declare const withoutRedwoodApolloAppTsx: string;
12
+ export declare const withAuthDecoderGraphqlTs: string;
13
+ export declare const nonStandardAuthDecoderGraphqlTs: string;
14
+ //# sourceMappingURL=mockFsFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mockFsFiles.d.ts","sourceRoot":"","sources":["../../../../src/auth/__tests__/mockFsFiles.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,QAoBrB,CAAA;AAED,eAAO,MAAM,SAAS,QAoBrB,CAAA;AAED,eAAO,MAAM,sBAAsB,QAyBlC,CAAA;AAED,eAAO,MAAM,sBAAsB,QAsDlC,CAAA;AAED,eAAO,MAAM,SAAS,QAqBrB,CAAA;AAED,eAAO,MAAM,mBAAmB,QA4B/B,CAAA;AAED,eAAO,MAAM,kBAAkB,QAoB9B,CAAA;AAED,eAAO,MAAM,oBAAoB,QA8BhC,CAAA;AAED,eAAO,MAAM,gBAAgB,QAkC5B,CAAA;AAED,eAAO,MAAM,oBAAoB,QA+BhC,CAAA;AAED,eAAO,MAAM,0BAA0B,QAuBtC,CAAA;AAED,eAAO,MAAM,wBAAwB,QAwBpC,CAAA;AAED,eAAO,MAAM,+BAA+B,QAwB3C,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=setupHelpers.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setupHelpers.test.d.ts","sourceRoot":"","sources":["../../../../src/auth/__tests__/setupHelpers.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,44 @@
1
+ interface FilesArgs {
2
+ basedir: string;
3
+ webAuthn: boolean;
4
+ }
5
+ /**
6
+ * Get the api side file paths and file contents to write
7
+ *
8
+ * Example return value:
9
+ * ```json
10
+ * {
11
+ * "/Users/tobbe/dev/rw-app/api/src/lib/auth.ts": "<file content>",
12
+ * "/Users/tobbe/dev/rw-app/api/src/lib/helperFunctions.ts": "<file content>",
13
+ * "/Users/tobbe/dev/rw-app/api/src/functions/auth.ts": "<file content>"
14
+ * }
15
+ * ```
16
+ */
17
+ export declare const apiSideFiles: ({ basedir, webAuthn }: FilesArgs) => Promise<Record<string, string>>;
18
+ /**
19
+ * Loops through the keys in `filesRecord` and generates unique file paths if
20
+ * they conflict with existing files
21
+ *
22
+ * Given this input:
23
+ * ```json
24
+ * {
25
+ * "/Users/tobbe/dev/rw-app/api/src/lib/auth.ts": "<file content>",
26
+ * "/Users/tobbe/dev/rw-app/api/src/lib/helperFunctions.ts": "<file content>",
27
+ * "/Users/tobbe/dev/rw-app/api/src/lib/supertokens.ts": "<file content>",
28
+ * "/Users/tobbe/dev/rw-app/api/src/functions/auth.ts": "<file content>"
29
+ * }
30
+ * ```
31
+ *
32
+ * You could get this output, depending on what existing files there are
33
+ * ```json
34
+ * {
35
+ * "/Users/tobbe/dev/rw-app/api/src/lib/supertokensAuth3.ts": "<file content>",
36
+ * "/Users/tobbe/dev/rw-app/api/src/lib/supertokensHelperFunctions.ts": "<file content>",
37
+ * "/Users/tobbe/dev/rw-app/api/src/lib/supertokens2.ts": "<file content>",
38
+ * "/Users/tobbe/dev/rw-app/api/src/functions/auth.ts": "<file content>"
39
+ * }
40
+ * ```
41
+ */
42
+ export declare function generateUniqueFileNames(filesRecord: Record<string, string>, provider: string): Record<string, string>;
43
+ export {};
44
+ //# sourceMappingURL=authFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authFiles.d.ts","sourceRoot":"","sources":["../../../src/auth/authFiles.ts"],"names":[],"mappings":"AASA,UAAU,SAAS;IACjB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;CAClB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,YAAY,GAAU,uBAAuB,SAAS,oCAmElE,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,uBAAuB,CACrC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACnC,QAAQ,EAAE,MAAM,0BAwCjB"}
@@ -0,0 +1,49 @@
1
+ import type { ListrRenderer, ListrTask, ListrTaskWrapper } from 'listr2';
2
+ export declare const getWebAppPath: () => string;
3
+ export declare const addApiConfig: ({ replaceExistingImport, authDecoderImport, }: {
4
+ replaceExistingImport: boolean;
5
+ authDecoderImport?: string;
6
+ }) => void;
7
+ export declare const hasAuthProvider: (content: string) => boolean;
8
+ /**
9
+ * Removes <AuthProvider ...> and </AuthProvider> if they exist, and un-indents
10
+ * the content.
11
+ *
12
+ * Exported for testing
13
+ */
14
+ export declare const removeAuthProvider: (content: string) => string;
15
+ /**
16
+ * Actually inserts the required config lines into App.{jsx,tsx}
17
+ * Exported for testing
18
+ */
19
+ export declare const addConfigToWebApp: <Renderer extends typeof ListrRenderer>() => ListrTask<AuthGeneratorCtx, Renderer>;
20
+ export declare const createWebAuth: (basedir: string, webAuthn: boolean) => {
21
+ title: string;
22
+ task: (ctx: AuthGeneratorCtx) => Promise<void>;
23
+ };
24
+ export declare const addConfigToRoutes: () => {
25
+ title: string;
26
+ task: () => void;
27
+ };
28
+ /**
29
+ * Will find the templates inside `${basedir}/templates/api`,
30
+ * and write these files to disk with unique names if they are clashing.
31
+ *
32
+ * @returns Listr task
33
+ */
34
+ export declare const generateAuthApiFiles: <Renderer extends typeof ListrRenderer>(basedir: string, webAuthn: boolean) => ListrTask<AuthGeneratorCtx, Renderer>;
35
+ export declare const addAuthConfigToGqlApi: <Renderer extends typeof ListrRenderer, FallbackRenderer extends typeof ListrRenderer>(authDecoderImport?: string) => {
36
+ title: string;
37
+ task: (ctx: AuthGeneratorCtx, _task: ListrTaskWrapper<AuthGeneratorCtx, Renderer, FallbackRenderer>) => void;
38
+ };
39
+ export type AuthSetupMode = 'FORCE' | 'REPLACE' | 'COMBINE' | 'UNKNOWN';
40
+ export interface AuthGeneratorCtx {
41
+ setupMode: AuthSetupMode;
42
+ provider: string;
43
+ force: boolean;
44
+ }
45
+ export declare const setAuthSetupMode: <Renderer extends typeof ListrRenderer, FallbackRenderer extends typeof ListrRenderer>(force: boolean) => {
46
+ title: string;
47
+ task: (ctx: AuthGeneratorCtx, task: ListrTaskWrapper<AuthGeneratorCtx, Renderer, FallbackRenderer>) => Promise<void>;
48
+ };
49
+ //# sourceMappingURL=authTasks.d.ts.map
@@ -0,0 +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;AAmBxE,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;AAoED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAC5B,QAAQ,SAAS,OAAO,aAAa,OAClC,SAAS,CAAC,gBAAgB,EAAE,QAAQ,CA0CxC,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"}
@@ -0,0 +1,26 @@
1
+ import type { ListrTask } from 'listr2';
2
+ import type { Argv } from 'yargs';
3
+ import type { AuthGeneratorCtx } from './authTasks.js';
4
+ export declare const standardAuthBuilder: (yargs: Argv) => Argv<{
5
+ force: boolean;
6
+ } & {
7
+ verbose: boolean;
8
+ }>;
9
+ export interface AuthHandlerArgs {
10
+ basedir: string;
11
+ forceArg: boolean;
12
+ provider: string;
13
+ authDecoderImport?: string;
14
+ webAuthn?: boolean;
15
+ webPackages?: string[];
16
+ apiPackages?: string[];
17
+ extraTasks?: (ListrTask<AuthGeneratorCtx> | undefined)[];
18
+ notes?: string[];
19
+ verbose?: boolean;
20
+ }
21
+ /**
22
+ * basedir assumes that you must have a templates folder in that directory.
23
+ * See folder structure of auth providers in packages/auth-providers/<provider>/setup/src
24
+ */
25
+ export declare const standardAuthHandler: ({ basedir, forceArg, provider, authDecoderImport, webAuthn, webPackages, apiPackages, extraTasks, notes, verbose, }: AuthHandlerArgs) => Promise<void>;
26
+ //# sourceMappingURL=setupHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setupHelpers.d.ts","sourceRoot":"","sources":["../../../src/auth/setupHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAA;AAGvC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,OAAO,CAAA;AAWjC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAUtD,eAAO,MAAM,mBAAmB,GAAI,OAAO,IAAI;;;;EAoB9C,CAAA;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,UAAU,CAAC,EAAE,CAAC,SAAS,CAAC,gBAAgB,CAAC,GAAG,SAAS,CAAC,EAAE,CAAA;IACxD,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AASD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAU,qHAWvC,eAAe,kBAiFjB,CAAA"}
@@ -0,0 +1,12 @@
1
+ export * from './lib/index.js';
2
+ export * from './lib/colors.js';
3
+ export { loadEnvFiles } from './lib/loadEnvFiles.js';
4
+ export { loadDefaultEnvFiles, loadNodeEnvDerivedEnvFile, loadUserSpecifiedEnvFiles, } from './lib/loadEnvFiles.js';
5
+ export * from './lib/paths.js';
6
+ export * from './lib/project.js';
7
+ export * from './lib/version.js';
8
+ export * from './auth/setupHelpers.js';
9
+ export type { AuthHandlerArgs } from './auth/setupHelpers.js';
10
+ export * from './lib/installHelpers.js';
11
+ export * from './telemetry/index.js';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EACL,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,uBAAuB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,wBAAwB,CAAA;AACtC,YAAY,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAE7D,cAAc,yBAAyB,CAAA;AAEvC,cAAc,sBAAsB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../../../src/lib/__tests__/index.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=loadEnvFiles.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadEnvFiles.test.d.ts","sourceRoot":"","sources":["../../../../src/lib/__tests__/loadEnvFiles.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=project.addTomlSetting.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.addTomlSetting.test.d.ts","sourceRoot":"","sources":["../../../../src/lib/__tests__/project.addTomlSetting.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=project.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.test.d.ts","sourceRoot":"","sources":["../../../../src/lib/__tests__/project.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=version.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.test.d.ts","sourceRoot":"","sources":["../../../../src/lib/__tests__/version.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * To keep a consistent color/style palette between cli packages, such as
3
+ * @redwood/cli and @redwood/create-cedar-app, please only use the colors
4
+ * defined here. If you *really* can't find a color that fits your needs,
5
+ * it's better to add it here than to introduce a new one-off color in whatever
6
+ * package you're going to use it in.
7
+ */
8
+ export declare const colors: {
9
+ error: import("ansis").Ansis;
10
+ warning: import("ansis").Ansis;
11
+ highlight: import("ansis").Ansis;
12
+ success: import("ansis").Ansis;
13
+ info: import("ansis").Ansis;
14
+ bold: import("ansis").Ansis;
15
+ underline: import("ansis").Ansis;
16
+ note: import("ansis").Ansis;
17
+ tip: import("ansis").Ansis;
18
+ important: import("ansis").Ansis;
19
+ caution: import("ansis").Ansis;
20
+ link: import("ansis").Ansis;
21
+ };
22
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../src/lib/colors.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAalB,CAAA"}
@@ -0,0 +1,21 @@
1
+ import type { ListrTaskWrapper, ListrRenderer } from 'listr2';
2
+ import { Listr } from 'listr2';
3
+ export declare const transformTSToJS: (filename: string, content: string) => string | Promise<string>;
4
+ /**
5
+ * This returns the config present in `prettier.config.cjs` of a Redwood project.
6
+ */
7
+ export declare const getPrettierOptions: () => Promise<any>;
8
+ export declare const prettify: (templateFilename: string, renderedTemplate: string) => Promise<string>;
9
+ export type ExistingFiles = 'OVERWRITE' | 'SKIP' | 'FAIL';
10
+ export declare const writeFile: <Renderer extends typeof ListrRenderer>(target: string, contents: string, { existingFiles }?: {
11
+ existingFiles?: ExistingFiles;
12
+ }, task?: ListrTaskWrapper<never, Renderer, Renderer>) => void;
13
+ /**
14
+ * Creates a list of tasks that write files to the disk.
15
+ *
16
+ * @param files - {[filepath]: contents}
17
+ */
18
+ export declare const writeFilesTask: <Renderer extends typeof ListrRenderer>(files: Record<string, string>, options: {
19
+ existingFiles: ExistingFiles;
20
+ }) => Listr<never, Renderer, "simple">;
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,gBAAgB,EAChB,aAAa,EAEd,MAAM,QAAQ,CAAA;AACf,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAU9B,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,SAAS,MAAM,6BA8BhE,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,kBAAkB,oBAkB9B,CAAA;AAED,eAAO,MAAM,QAAQ,GACnB,kBAAkB,MAAM,EACxB,kBAAkB,MAAM,KACvB,OAAO,CAAC,MAAM,CAwBhB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,MAAM,GAAG,MAAM,CAAA;AAEzD,eAAO,MAAM,SAAS,GAAI,QAAQ,SAAS,OAAO,aAAa,EAC7D,QAAQ,MAAM,EACd,UAAU,MAAM,EAChB,oBAA4B;IAAE,aAAa,CAAC,EAAE,aAAa,CAAA;CAAO,EAGlE,OAAM,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAI/C,SAoBF,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,SAAS,OAAO,aAAa,EAClE,OAAO,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC7B,SAAS;IAAE,aAAa,EAAE,aAAa,CAAA;CAAE,qCAuB1C,CAAA"}
@@ -0,0 +1,17 @@
1
+ export declare const addWebPackages: (webPackages: string[]) => {
2
+ title: string;
3
+ task: () => Promise<void>;
4
+ };
5
+ export declare const addApiPackages: (apiPackages: string[]) => {
6
+ title: string;
7
+ task: () => Promise<void>;
8
+ };
9
+ export declare const addRootPackages: (packages: string[], devDependency?: boolean) => {
10
+ title: string;
11
+ task: () => Promise<void>;
12
+ };
13
+ export declare const installPackages: {
14
+ title: string;
15
+ task: () => Promise<void>;
16
+ };
17
+ //# sourceMappingURL=installHelpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installHelpers.d.ts","sourceRoot":"","sources":["../../../src/lib/installHelpers.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,cAAc,GAAI,aAAa,MAAM,EAAE;;;CAKlD,CAAA;AAEF,eAAO,MAAM,cAAc,GAAI,aAAa,MAAM,EAAE;;;CAKlD,CAAA;AAEF,eAAO,MAAM,eAAe,GAAI,UAAU,MAAM,EAAE,EAAE,uBAAqB;;;CAQxE,CAAA;AAED,eAAO,MAAM,eAAe;;;CAK3B,CAAA"}
@@ -0,0 +1,5 @@
1
+ export declare function loadEnvFiles(): void;
2
+ export declare function loadDefaultEnvFiles(cwd: string): void;
3
+ export declare function loadNodeEnvDerivedEnvFile(cwd: string): void;
4
+ export declare function loadUserSpecifiedEnvFiles(cwd: string, loadEnvFiles: string[]): void;
5
+ //# sourceMappingURL=loadEnvFiles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loadEnvFiles.d.ts","sourceRoot":"","sources":["../../../src/lib/loadEnvFiles.ts"],"names":[],"mappings":"AAUA,wBAAgB,YAAY,SAsB3B;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,QAQ9C;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,QAcpD;AAED,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,QAW5E"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This wraps the core version of getPaths into something that catches the exception
3
+ * and displays a helpful error message.
4
+ */
5
+ export declare function getPaths(): import("@cedarjs/project-config").Paths;
6
+ //# sourceMappingURL=paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../src/lib/paths.ts"],"names":[],"mappings":"AAQA;;;GAGG;AACH,wBAAgB,QAAQ,4CAUvB"}
@@ -0,0 +1,42 @@
1
+ import type { Config } from '@cedarjs/project-config';
2
+ export declare const getGraphqlPath: () => string | null;
3
+ export declare const graphFunctionDoesExist: () => boolean | "" | null;
4
+ export declare const isTypeScriptProject: () => boolean;
5
+ export declare const getInstalledRedwoodVersion: () => any;
6
+ /**
7
+ * Updates the project's redwood.toml file to include the specified packages plugin
8
+ *
9
+ * Uses toml parsing to determine if the plugin is already included in the file and
10
+ * only adds it if it is not.
11
+ *
12
+ * Writes the updated config to the file system by appending strings, not stringify-ing the toml.
13
+ */
14
+ export declare const updateTomlConfig: (packageName: string) => void;
15
+ export declare const updateTomlConfigTask: (packageName: string) => {
16
+ title: string;
17
+ task: () => void;
18
+ };
19
+ export declare const addEnvVarTask: (name: string, value: string, comment: string) => {
20
+ title: string;
21
+ task: () => void;
22
+ };
23
+ export declare const addEnvVar: (name: string, value: string, comment: string) => string | void;
24
+ /**
25
+ * This sets the `RWJS_CWD` env var to the redwood project directory. This is typically required for internal
26
+ * redwood packages to work correctly. For example, `@cedarjs/project-config` uses this when reading config
27
+ * or paths.
28
+ *
29
+ * @param cwd Explicitly set the redwood cwd. If not set, we'll try to determine it automatically. You likely
30
+ * only want to set this based on some specific input, like a CLI flag.
31
+ */
32
+ export declare const setRedwoodCWD: (cwd?: string) => void;
33
+ /**
34
+ * Create or update the given setting, in the given section, with the given value.
35
+ *
36
+ * If the section already exists it adds the new setting last
37
+ * If the section, and the setting, already exists, the setting is updated
38
+ * If the section does not exist it is created at the end of the file and the setting is added
39
+ * If the setting exists in the section, but is commented out, it will be uncommented and updated
40
+ */
41
+ export declare function setTomlSetting(section: keyof Config, setting: string, value: string | boolean | number): void;
42
+ //# sourceMappingURL=project.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../../src/lib/project.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAA;AAWrD,eAAO,MAAM,cAAc,qBAE1B,CAAA;AAED,eAAO,MAAM,sBAAsB,2BAGlC,CAAA;AAED,eAAO,MAAM,mBAAmB,eAM/B,CAAA;AAED,eAAO,MAAM,0BAA0B,WAQtC,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAI,aAAa,MAAM,SAmDnD,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM;;;CAOvD,CAAA;AAED,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,EAAE,SAAS,MAAM;;;CAOzE,CAAA;AAED,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,EAAE,OAAO,MAAM,EAAE,SAAS,MAAM,kBAqCrE,CAAA;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,SAyBzC,CAAA;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,QA0HjC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Check if the package at the given version is compatible with the current version of the user's RedwoodJS project. This is
3
+ * determined by checking if the package's engines.redwoodjs field intersects with the user's RedwoodJS version.
4
+ *
5
+ * If the preferred version is not compatible, the latest compatible version will be returned if one exists.
6
+ */
7
+ export declare function getCompatibilityData(packageName: string, preferredVersionOrTag: string): Promise<{
8
+ preferred: {
9
+ tag: string | undefined;
10
+ version: string;
11
+ };
12
+ compatible: {
13
+ tag: string | undefined;
14
+ version: string;
15
+ };
16
+ }>;
17
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../../src/lib/version.ts"],"names":[],"mappings":"AAgBA;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,MAAM,EACnB,qBAAqB,EAAE,MAAM;;;;;;;;;GA2F9B"}
@@ -0,0 +1,20 @@
1
+ import type { AttributeValue, Span } from '@opentelemetry/api';
2
+ type TelemetryAttributes = {
3
+ [key: string]: AttributeValue;
4
+ };
5
+ /**
6
+ * Safely records attributes to the opentelemetry span
7
+ *
8
+ * @param attributes An object of key-value pairs to be individually recorded as attributes
9
+ * @param span An optional span to record the attributes to. If not provided, the current active span will be used
10
+ */
11
+ export declare function recordTelemetryAttributes(attributes: TelemetryAttributes, span?: Span): void;
12
+ /**
13
+ * Safely records an error to the opentelemetry span
14
+ *
15
+ * @param error An error to record to the span
16
+ * @param span An optional span to record the error to. If not provided, the current active span will be used
17
+ */
18
+ export declare function recordTelemetryError(error: any, span?: Span): void;
19
+ export {};
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/telemetry/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAA;AAG9D,KAAK,mBAAmB,GAAG;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAA;CAC9B,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,mBAAmB,EAC/B,IAAI,CAAC,EAAE,IAAI,QASZ;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,EAAE,IAAI,QAe3D"}