@cedarjs/cli 0.8.0 → 0.8.1-next.4
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/dist/commands/generate/cell/templates/cell.tsx.template +4 -1
- package/dist/commands/generate/cell/templates/cellList.tsx.template +1 -1
- package/dist/commands/generate/function/templates/function.ts.template +1 -1
- package/dist/commands/generate/job/templates/job.ts.template +1 -1
- package/dist/commands/generate/job/templates/test.ts.template +1 -1
- package/dist/commands/generate/realtime/templates/subscriptions/blank/blank.service.ts.template +3 -3
- package/dist/commands/generate/realtime/templates/subscriptions/blank/blank.ts.template +1 -1
- package/dist/commands/generate/scaffold/templates/components/EditNameCell.tsx.template +1 -1
- package/dist/commands/generate/scaffold/templates/components/Name.tsx.template +2 -2
- package/dist/commands/generate/scaffold/templates/components/NameCell.tsx.template +1 -1
- package/dist/commands/generate/scaffold/templates/components/NameForm.tsx.template +1 -1
- package/dist/commands/generate/scaffold/templates/components/Names.tsx.template +2 -2
- package/dist/commands/generate/scaffold/templates/components/NamesCell.tsx.template +1 -1
- package/dist/commands/generate/scaffold/templates/components/NewName.tsx.template +1 -1
- package/dist/commands/generate/scaffold/templates/lib/formatters.test.tsx.template +1 -1
- package/dist/commands/generate/service/templates/service.ts.template +2 -2
- package/dist/commands/generate/service/templates/test.ts.template +2 -2
- package/dist/commands/setup/graphql/features/trustedDocuments/graphqlTransform.js +2 -2
- package/dist/commands/setup/jobs/templates/jobs.ts.template +2 -2
- package/dist/commands/setup/realtime/templates/subscriptions/newMessage/rooms.ts.template +3 -5
- package/package.json +11 -11
package/dist/commands/generate/realtime/templates/subscriptions/blank/blank.service.ts.template
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ${subscriptionInputType} } from 'types/graphql'
|
|
1
|
+
import type { ${subscriptionInputType} } from 'types/graphql.js'
|
|
2
2
|
|
|
3
|
-
import { logger } from 'src/lib/logger'
|
|
4
|
-
import type { Publish${typeName}ChannelType } from 'src/subscriptions/${name}/${name}'
|
|
3
|
+
import { logger } from 'src/lib/logger.js'
|
|
4
|
+
import type { Publish${typeName}ChannelType } from 'src/subscriptions/${name}/${name}.service.js'
|
|
5
5
|
|
|
6
6
|
export const ${subscriptionQueryName} = ({ id }) => [id]
|
|
7
7
|
|
|
@@ -2,7 +2,7 @@ ${useClientDirective}import type {
|
|
|
2
2
|
Edit${singularPascalName}By${pascalIdName},
|
|
3
3
|
Update${singularPascalName}Input,
|
|
4
4
|
Update${singularPascalName}MutationVariables
|
|
5
|
-
} from 'types/graphql'
|
|
5
|
+
} from 'types/graphql.js'
|
|
6
6
|
|
|
7
7
|
import { navigate, routes } from '@cedarjs/router'
|
|
8
8
|
import type {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { Delete${singularPascalName}Mutation, Delete${singularPascalName}MutationVariables, Find${singularPascalName}By${pascalIdName} } from 'types/graphql'
|
|
1
|
+
import type { Delete${singularPascalName}Mutation, Delete${singularPascalName}MutationVariables, Find${singularPascalName}By${pascalIdName} } from 'types/graphql.js'
|
|
2
2
|
|
|
3
3
|
import { Link, routes, navigate } from '@cedarjs/router'
|
|
4
4
|
import { useMutation } from '@cedarjs/web'
|
|
5
5
|
import type { TypedDocumentNode } from '@cedarjs/web'
|
|
6
6
|
import { toast } from '@cedarjs/web/toast'
|
|
7
7
|
|
|
8
|
-
import { ${formattersImports} } from 'src/lib/formatters'
|
|
8
|
+
import { ${formattersImports} } from 'src/lib/formatters.js'
|
|
9
9
|
|
|
10
10
|
const DELETE_${singularConstantName}_MUTATION: TypedDocumentNode<Delete${singularPascalName}Mutation, Delete${singularPascalName}MutationVariables> = gql`
|
|
11
11
|
mutation Delete${singularPascalName}Mutation($${idName}: ${idType}!) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
${useClientDirective}import type { Find${singularPascalName}By${pascalIdName}, Find${singularPascalName}By${pascalIdName}Variables } from 'types/graphql'
|
|
1
|
+
${useClientDirective}import type { Find${singularPascalName}By${pascalIdName}, Find${singularPascalName}By${pascalIdName}Variables } from 'types/graphql.js'
|
|
2
2
|
|
|
3
3
|
import type {
|
|
4
4
|
CellSuccessProps,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Edit${singularPascalName}By${pascalIdName}, Update${singularPascalName}Input } from 'types/graphql'
|
|
1
|
+
import type { Edit${singularPascalName}By${pascalIdName}, Update${singularPascalName}Input } from 'types/graphql.js'
|
|
2
2
|
|
|
3
3
|
import type { RWGqlError } from '@cedarjs/forms'
|
|
4
4
|
import {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Delete${singularPascalName}Mutation, Delete${singularPascalName}MutationVariables, Find${pluralPascalName} } from 'types/graphql'
|
|
1
|
+
import type { Delete${singularPascalName}Mutation, Delete${singularPascalName}MutationVariables, Find${pluralPascalName} } from 'types/graphql.js'
|
|
2
2
|
|
|
3
3
|
import { Link, routes } from '@cedarjs/router'
|
|
4
4
|
import { useMutation } from '@cedarjs/web'
|
|
@@ -6,7 +6,7 @@ import type { TypedDocumentNode } from '@cedarjs/web'
|
|
|
6
6
|
import { toast } from '@cedarjs/web/toast'
|
|
7
7
|
|
|
8
8
|
import { QUERY } from '${importComponentNamesCell}'
|
|
9
|
-
import { ${listFormattersImports} } from 'src/lib/formatters'
|
|
9
|
+
import { ${listFormattersImports} } from 'src/lib/formatters.js'
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
const DELETE_${singularConstantName}_MUTATION: TypedDocumentNode<Delete${singularPascalName}Mutation, Delete${singularPascalName}MutationVariables> = gql`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
${useClientDirective}import type { Find${pluralPascalName}, Find${pluralPascalName}Variables } from 'types/graphql'
|
|
1
|
+
${useClientDirective}import type { Find${pluralPascalName}, Find${pluralPascalName}Variables } from 'types/graphql.js'
|
|
2
2
|
|
|
3
3
|
import { Link, routes } from '@cedarjs/router'
|
|
4
4
|
import type {
|
|
@@ -2,7 +2,7 @@ ${useClientDirective}import type {
|
|
|
2
2
|
Create${singularPascalName}Mutation,
|
|
3
3
|
Create${singularPascalName}Input,
|
|
4
4
|
Create${singularPascalName}MutationVariables
|
|
5
|
-
} from 'types/graphql'
|
|
5
|
+
} from 'types/graphql.js'
|
|
6
6
|
|
|
7
7
|
import { navigate, routes } from '@cedarjs/router'
|
|
8
8
|
import { useMutation } from '@cedarjs/web'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { QueryResolvers<% if (crud) { %>, MutationResolvers<% } %><% if (relations.length) { %>, ${singularPascalName}RelationResolvers<% } %> } from 'types/graphql'
|
|
1
|
+
import type { QueryResolvers<% if (crud) { %>, MutationResolvers<% } %><% if (relations.length) { %>, ${singularPascalName}RelationResolvers<% } %> } from 'types/graphql.js'
|
|
2
2
|
|
|
3
|
-
import { db } from 'src/lib/db'
|
|
3
|
+
import { db } from 'src/lib/db.js'
|
|
4
4
|
|
|
5
5
|
export const ${pluralCamelName}: QueryResolvers['${pluralCamelName}'] = () => {
|
|
6
6
|
return db.${singularCamelName}.findMany()
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
} %>
|
|
34
34
|
<% if (prismaImport) { %>import { Prisma, ${prismaModel} } from '@prisma/client'<% } else { %>import type { ${prismaModel} } from '@prisma/client'<% } %>
|
|
35
35
|
|
|
36
|
-
import { ${pluralCamelName}<% if (crud) { %>,${singularCamelName}, create${singularPascalName}, update${singularPascalName}, delete${singularPascalName}<% } %> } from './${pluralCamelName}'
|
|
37
|
-
import type { StandardScenario } from './${pluralCamelName}.scenarios'
|
|
36
|
+
import { ${pluralCamelName}<% if (crud) { %>,${singularCamelName}, create${singularPascalName}, update${singularPascalName}, delete${singularPascalName}<% } %> } from './${pluralCamelName}.js'
|
|
37
|
+
import type { StandardScenario } from './${pluralCamelName}.scenarios.js'
|
|
38
38
|
|
|
39
39
|
// Generated boilerplate tests do not account for all circumstances
|
|
40
40
|
// and can fail without adjustments, e.g. Float.
|
|
@@ -3,13 +3,13 @@ function transform(file, api) {
|
|
|
3
3
|
const root = j(file.source);
|
|
4
4
|
const allImports = root.find(j.ImportDeclaration);
|
|
5
5
|
const hasStoreImport = allImports.some((i) => {
|
|
6
|
-
return i.get("source").value.value === "src/lib/trustedDocumentsStore";
|
|
6
|
+
return i.get("source").value.value === "src/lib/trustedDocumentsStore.js";
|
|
7
7
|
});
|
|
8
8
|
if (!hasStoreImport) {
|
|
9
9
|
allImports.at(-1).insertAfter(
|
|
10
10
|
j.importDeclaration(
|
|
11
11
|
[j.importSpecifier(j.identifier("store"))],
|
|
12
|
-
j.literal("src/lib/trustedDocumentsStore")
|
|
12
|
+
j.literal("src/lib/trustedDocumentsStore.js")
|
|
13
13
|
)
|
|
14
14
|
);
|
|
15
15
|
}
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import { PrismaAdapter, JobManager } from '@cedarjs/jobs'
|
|
6
6
|
|
|
7
|
-
import { db } from 'src/lib/db'
|
|
8
|
-
import { logger } from 'src/lib/logger'
|
|
7
|
+
import { db } from 'src/lib/db.js'
|
|
8
|
+
import { logger } from 'src/lib/logger.js'
|
|
9
9
|
|
|
10
10
|
export const jobs = new JobManager({
|
|
11
11
|
adapters: {
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import type { SendMessageInput } from 'types/graphql'
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { logger } from 'src/lib/logger'
|
|
1
|
+
import type { SendMessageInput } from 'types/graphql.js'
|
|
2
|
+
import type { NewMessageChannelType } from 'src/subscriptions/newMessage/newMessage.js'
|
|
3
|
+
import { logger } from 'src/lib/logger.js'
|
|
6
4
|
|
|
7
5
|
export const room = ({ id }) => [id]
|
|
8
6
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.1-next.4+ddcc18ccc",
|
|
4
4
|
"description": "The Redwood Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@babel/preset-typescript": "7.27.1",
|
|
34
34
|
"@babel/runtime-corejs3": "7.27.6",
|
|
35
|
-
"@cedarjs/api-server": "0.8.
|
|
36
|
-
"@cedarjs/cli-helpers": "0.8.
|
|
37
|
-
"@cedarjs/fastify-web": "0.8.
|
|
38
|
-
"@cedarjs/internal": "0.8.
|
|
39
|
-
"@cedarjs/prerender": "0.8.
|
|
40
|
-
"@cedarjs/project-config": "0.8.
|
|
41
|
-
"@cedarjs/structure": "0.8.
|
|
42
|
-
"@cedarjs/telemetry": "0.8.
|
|
43
|
-
"@cedarjs/web-server": "0.8.
|
|
35
|
+
"@cedarjs/api-server": "0.8.1-next.4+ddcc18ccc",
|
|
36
|
+
"@cedarjs/cli-helpers": "0.8.1-next.4+ddcc18ccc",
|
|
37
|
+
"@cedarjs/fastify-web": "0.8.1-next.4+ddcc18ccc",
|
|
38
|
+
"@cedarjs/internal": "0.8.1-next.4+ddcc18ccc",
|
|
39
|
+
"@cedarjs/prerender": "0.8.1-next.4+ddcc18ccc",
|
|
40
|
+
"@cedarjs/project-config": "0.8.1-next.4+ddcc18ccc",
|
|
41
|
+
"@cedarjs/structure": "0.8.1-next.4+ddcc18ccc",
|
|
42
|
+
"@cedarjs/telemetry": "0.8.1-next.4+ddcc18ccc",
|
|
43
|
+
"@cedarjs/web-server": "0.8.1-next.4+ddcc18ccc",
|
|
44
44
|
"@listr2/prompt-adapter-enquirer": "2.0.16",
|
|
45
45
|
"@opentelemetry/api": "1.8.0",
|
|
46
46
|
"@opentelemetry/core": "1.22.0",
|
|
@@ -102,5 +102,5 @@
|
|
|
102
102
|
"publishConfig": {
|
|
103
103
|
"access": "public"
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "ddcc18ccc5833d100ce0c5f69eff50407894e101"
|
|
106
106
|
}
|